[Xero][Quote] Can not store tracking category option for quote line item - xero-api

I have the issue when creating or updating the Quote. I can not set TrackingCategory options for line items. I request api like document but it not success.
The Tracking Category I have
tracking category
Here is my expected:
my expected
Please help me
Thanks you
Here is format payload for lineItems
"LineItems": [
{
"AccountCode": "200",
"Description": "Development work - developer onsite per day",
"UnitAmount": 650.0000,
"DiscountRate": 10.00,
"LineAmount": 585.00,
"ItemCode": "DevD",
"Quantity": 1.0000,
"TaxAmount": 58.50,
"TaxType": "OUTPUT",
"Tracking": [
{
"Name": "Location",
"Option": "Foo Bar"
}
]
}
],

Related

Get specific fields from Rally API for Feature

I am fetching the data using below API :
https://rally1.rallydev.com/slm/webservice/v2.0/PortfolioItem/Feature/?fetch=ObjectID,FormattedID,Name,Parent&pagesize=2000
I don't want to fetch all fields in Parent. All I need Name,FormattedID,ObjectID,Parent.ObjectID,Parent.Name of Feature. A
{
"_rallyAPIMajor": "2",
"_rallyAPIMinor": "0",
"ObjectID": blabla,
"FormattedID": "F3792",
"DirectChildrenCount": 23,
"Name": "Phase 2: Fork Messages (New flow of messages that will feed data to 8 reports for D&P)",
"Parent": {
"_rallyAPIMajor": "2",
"_rallyAPIMinor": "0",
"_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/portfolioitem/portfolio/blabla",
"_refObjectUUID": "8fae",
"_objectVersion": "67",
"_refObjectName": "blabla",
"ObjectID": blabla,
"FormattedID": "P1ABC",
"DirectChildrenCount": 13,
"Name": "blabla",
"_type": "PortfolioItem/Portfolio"
},
"_type": "PortfolioItem/Feature"
}
This is just the way the Web Services API works. Any fields included in the fetch will be returned on any object that has them. This is very useful for being able to hydrate fields on associated objects- Parent, Iteration, etc.

HERE Places API: not all items have PVID

I'm using HERE Places API.
Firstly I'm doing a search.
For Example this query :
https://places.cit.api.here.com/places/v1/discover/search?q=Test&at=35.6111,-97.5467&r=500&size=1&app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg&show_refs=pvid&pretty
According to this documentation (Link) If I add show_refs=pvid to query string, in result I will get external id which I can use to query lookup endpoint.
But in result I get next response :
{
"results": {
"next": "https://places.cit.api.here.com/places/v1/discover/search;context=Zmxvdy1pZD1hY2ExNzk3NC0zYzg3LTU5NzQtYmZkMC04YjAzMDZlYWIzMWJfMTUwNjA3NjMzMTYyMl83NDY3XzM4NTAmb2Zmc2V0PTEmc2l6ZT0x?at=35.6111%2C-97.5467&q=Test&app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg",
"items": [
{
"position": [
35.60369,
-97.51761
],
"distance": 2756,
"title": "Southwest Test & Balance",
"averageRating": 0,
"category": {
"id": "business-services",
"title": "Business & Services",
"href": "https://places.cit.api.here.com/places/v1/categories/places/business-services?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg",
"type": "urn:nlp-types:category",
"system": "places"
},
"icon": "https://download.vcdn.cit.data.here.com/p/d/places2_stg/icons/categories/02.icon",
"vicinity": "200 NW 132nd St<br/>Oklahoma City, OK 73114",
"having": [],
"type": "urn:nlp-types:place",
"href": "https://places.cit.api.here.com/places/v1/places/8403fv6k-d1b2fde0616e0326e321a54b88cd9f53;context=Zmxvdy1pZD1hY2ExNzk3NC0zYzg3LTU5NzQtYmZkMC04YjAzMDZlYWIzMWJfMTUwNjA3NjMzMTYyMl83NDY3XzM4NTAmcmFuaz0w?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg",
"id": "8403fv6k-d1b2fde0616e0326e321a54b88cd9f53",
"authoritative": true
}
]
},
"search": {
"context": {
"location": {
"position": [
35.6111,
-97.5467
],
"address": {
"text": "Oklahoma City, OK 73134<br/>USA",
"postalCode": "73134",
"city": "Oklahoma City",
"county": "Oklahoma",
"stateCode": "OK",
"country": "United States",
"countryCode": "USA"
}
},
"type": "urn:nlp-types:place",
"href": "https://places.cit.api.here.com/places/v1/places/loc-dmVyc2lvbj0xO3RpdGxlPU9rbGFob21hK0NpdHk7bGF0PTM1LjYxMTE7bG9uPS05Ny41NDY3O2NpdHk9T2tsYWhvbWErQ2l0eTtwb3N0YWxDb2RlPTczMTM0O2NvdW50cnk9VVNBO3N0YXRlQ29kZT1PSztjb3VudHk9T2tsYWhvbWE7Y2F0ZWdvcnlJZD1jaXR5LXRvd24tdmlsbGFnZTtzb3VyY2VTeXN0ZW09aW50ZXJuYWw;context=c2VhcmNoQ29udGV4dD0x?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg"
}
}
}
In response no object references
Is it a bug or not every place has this external id?
I am responding as member of the team around HERE Places API.
Yes, not every place has a pvid. That is why I would suggest using the Sharing Id instead. I realize that the documentation should be improved to clarify that.
The Sharing Ids can be obtained by adding show_refs=sharing to either your search query or a place details request. It can be found in the field references. Once you have the sharing id you can you the lookup endpoint as you intended.
Take a look at:
https://places.cit.api.here.com/places/v1/places/8403fv6k-d1b2fde0616e0326e321a54b88cd9f53;context=Zmxvdy1pZD00YWU2ZWZjNi01ZjgzLTUwYTQtOTI4OS0xZjliMGMwNWY3NjBfMTUwNzA0NDE0OTc3NV84MTI5XzU1NDcmcmFuaz0w?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg&show_refs=pvid
and
https://places.cit.api.here.com/places/v1/places/8409q8yy-6af3c3e50bcb4f859686797b2be5773d;context=Zmxvdy1pZD00YWU2ZWZjNi01ZjgzLTUwYTQtOTI4OS0xZjliMGMwNWY3NjBfMTUwNzA0NDE0OTc3NV84MTI5XzU1NDcmcmFuaz0w?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg&show_refs=pvid
On those two examples, the only difference is the placeId.
In the docs, there's not a single reference saying that the external identifier is required or existant for every place.
Since it represents an external identifier, I believe we could assume that it's not required.
And it's what we just saw with your place (8403fv6k-d1b2fde0616e0326e321a54b88cd9f53): this one don't have any external identifier.
Based on your comments, what you need is the information about a place.
So, after you run your first query, you should get something like:
{
title: "Southwest Test & Balance",
position: [],
id: "8403fv6k-d1b2fde0616e0326e321a54b88cd9f53",
href: "https://[...]"
}
With this ID, you could access it:
places.cit.api.here.com/places/v1/places/8403fv6k-d1b2fde0616e0326e321a54b88cd9f53;context=Zmxvdy1pZD0zYTFlZjg5ZS02ZTY5LTUxYmEtYWFkYS1kY2UwZWMyNDdkMDBfMTUwNzEzNjUxNjI5N182NjExXzc2OTgmcmFuaz0w?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg
Or directly using the href information.
This response already is giving you the ID and URL to access all the info of a single place.
You don't need any other external ID or reference.

Parsed JSON in multiple columns

I'm working on some API info collecting and I've written a program that reads the domains and looks up the API info and after it finds the info it puts the whole JSON text it made into a column in Microsoft SQL server table.
This is how one of the JSON output looks:
{
"id": "3e3562a7-b160-4fd8-a190-8ca0a5288794",
"name": "Garmin",
"legalName": "Garmin Ltd.",
"domain": "garmin.com",
"domainAliases": [
"garmin.de",
"garmin.se",
"garmin.si",
"garmin.nl",
"garmin.dk",
"garmin.it",
"garmin.fi",
"garmin.no",
"garmin.hr",
"garmin.at",
"garmin.pl",
"garmin.cl",
"garmin.com.au",
"garmin.co.uk",
"garmin.be",
"garminconnect.com",
"garmin.com.mx",
"garminservice.de",
"garmin.es",
"garminasus.com",
"garminonline.de",
"opencaching.com",
"garmin.com.br",
"garmin.pt",
"garminfrance.com",
"garmin.ro",
"garmin.com.hr",
"garmin.com.ar",
"garmin.ca",
"inreachdelorme.com"
],
"site": {
"title": "Garmin International | Home",
"h1": "NEW VIRBĀ® 360",
"metaDescription": "Delivering innovative GPS technology across diverse markets, including aviation, marine, fitness, outdoor recreation, tracking and mobile apps.",
"metaAuthor": "Garmin",
"phoneNumbers": [
"+1 913-397-8200"
],
"emailAddresses": [
"domain.admin#garmin.com",
"productsupport.privacy#garmin.com",
"webmaster#garmin.com",
"garminsecurity#garmin.com",
"copyright#garmin.com"
]
},
"category": {
"sector": "Information Technology",
"industryGroup": "Software & Services",
"industry": "Internet Software & Services",
"subIndustry": "Internet Software & Services",
"sicCode": "3812",
"naicsCode": null
},
"tags": [
"Technology",
"E-commerce",
"Enterprise",
"B2B",
"B2C",
"Consumer Discretionary",
"Consumer Electronics"
],
"description": "Delivering innovative GPS technology across diverse markets, including aviation, marine, fitness, outdoor recreation, tracking and mobile apps.",
"foundedYear": 1989,
"location": "Olathe, KS 66062, USA",
"timeZone": "America/Chicago",
"utcOffset": -5,
"geo": {
"streetNumber": null,
"streetName": null,
"subPremise": null,
"city": "Olathe",
"postalCode": "66062",
"state": "Kansas",
"stateCode": "KS",
"country": "United States",
"countryCode": "US",
"lat": 38.8271089,
"lng": -94.7898731
},
"logo": "https://logo.clearbit.com/garmin.com",
"facebook": {
"handle": "garmin",
"likes": 1542748
},
"linkedin": {
"handle": "company/garmin-international"
},
"twitter": {
"handle": "Garmin",
"id": "15324722",
"followers": 136976,
"following": 812,
"location": "at Garmin HQ just outside KC",
},
"crunchbase": {
"handle": "organization/garmin"
},
"emailProvider": false,
"type": "public",
"ticker": "GRMN",
"phone": "+41 52 630 16 00",
"metrics": {
"alexaUsRank": 1094,
"alexaGlobalRank": 1535,
"googleRank": null,
"employees": 10000,
"employeesRange": "1000+",
"marketCap": 9800000000,
"raised": null,
"annualRevenue": 3018665000,
"fiscalYearEnd": 12
},
"indexedAt": "2017-07-06T02:54:05.626Z",
"tech": [
"centos",
"akamai_dns",
"apache",
"outlook",
"microsoft_office_365",
"google_analytics",
"microsoft_exchange_online",
"debian",
"tealium",
"youtube",
"recaptcha"
],
"similarDomains": [
"cerner.com",
"delorme.com",
"fitbit.com",
"google.com",
"gpscity.com",
"lowrance.com",
"magellangps.com",
"novatel.com",
"polar.com",
"suunto.com",
"thegpsstore.com",
"trimble.com"
]
}
Picture example:
So what I need to do now is take only some of the data out like "Company name", "category" (with all sub-category info), "employees", "employeesrange", "marketcap", "annnualrevenue" and "similardomains" (this one should go as a full text column) and sort each one in its own column. I would be very happy for any help or directions I can get.
Using JSON_VALUE function you can extract all data from your JSON column
SELECT * ,
JSON_VALUE(JsonColumn,'$.name') AS CompanyName
, JSON_VALUE(JsonColumn,'$.category.sector') AS CategorySector
, JSON_VALUE(JsonColumn, '$.category.industryGroup') AS CategoryIndustryGroup
-- etc
FROM YourTable

BigCommerce API - Undefined Resource Property - Banners :: item_id

I am working with the BigCommerce API for the Banners resource, but I do not know the usage/definition for one of the properties - specifically: item_id
The usage documentation shows the following as the JSON response:
{
"id": "1",
"name": "Grand Closing Sale",
"page": "home_page",
"content": "Thanks for shopping with us.",
"date_to": "1393218000",
"item_id": "0",
"visible": "0",
"location": "top",
"date_from": "1391576400",
"date_type": "custom",
"date_created": "1392073898"
},
The property documentation however makes no reference to item_id (and also has other various typos and unlinked properties).
What is item_id?
Is it maybe supposed to be catorbrandid, which says "ID for the brand or category."
Thanks in advance!

Yodlee getSiteLoginForm API response changes between attempts

There seems to be an inconsistency with the responses for Yodlee's getSiteLoginForm REST API function.
For a site that has a login field with radio buttons, sometimes the data coming back from Yodlee for that particular field will look like this:
{
"fieldInfoList": [
{
"validValues": [
"1",
"2",
"3",
"4"
],
"displayValidValues": [
"1",
"2",
"3",
"4"
],
"valueIdentifier": "OPTIONS",
"valueMask": "LOGIN_FIELD",
"fieldType": {
"typeName": "OPTIONS"
},
"size": 20,
"maxlength": 40,
"name": "OPTIONS",
"displayName": "Issue Number",
"isEditable": true,
"isOptional": false,
"isEscaped": false,
"helpText": "76367",
"isOptionalMFA": false,
"isMFA": false
}
]
}
and other times it looks like this:
{
"validValues": [
"1",
"2",
"3",
"4"
],
"displayValidValues": [
"1",
"2",
"3",
"4"
],
"valueIdentifier": "OPTION",
"valueMask": "LOGIN_FIELD",
"fieldType": {
"typeName": "OPTIONS"
},
"size": 20,
"maxlength": 40,
"name": "OPTION",
"displayName": "Issue Number",
"isEditable": true,
"isOptional": false,
"isEscaped": false,
"helpText": "76367",
"isOptionalMFA": false,
"isMFA": false
}
It's the same field but the valueIdentifier value has changed and the data isn't being enclosed in a fieldInfoList variable.
What would be the reason for this response data-set changing between two attempts if there's no difference in the code?
In addition to that, could a similar response inconsistency be affecting other API functions from Yodlee, and if so how does one deal with this uncertain variance?
We did analysis and Yodlee provides every time same response, no matter how many attempts you'll do. While I am assuming that you might be confused between getSiteLoginForm and getLoginFomForContentService, as both are two different APIs and belongs to approach i.e., Site Based and Container Based respectively. And the response you have mentioned first comes when you use getSiteLoginForm while the later one comes with getLoginFormForContentService.
Hope this helps as there is no issue with the API, these are two different response from 2 different APIs.