eBay inventory API: Get InventoryItems Always return 0 Results - ebay-api

I have a problem about ebay API.
When I call the inventory_item API I get an empty result.
My request is
https://api.ebay.com/sell/inventory/v1/inventory_item?limit=2&offset=0
Response body is:
{
"total": 0,
"size": 0
}
Then I call the inventory_item API By SKU, of course I failed again.
My request is:
https://api.ebay.com/sell/inventory/v1/inventory_item/80003953
(80003953 is my sku in ebay sell platform)
Response body is:
{
"errors": [
{
"errorId": 25710,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "REQUEST",
"message": "We didn't find the entity you are requesting. Please verify the request"
}
]
}
I'm confirm my authorization and sku are correct!

Perhaps you are trying to get items that are created by Ebay-GUI.
This case was already discribed here
So it turns out that eBay's Inventory API is fairly new. Only items created via the Inventory API's can be queried with the Inventory API.
In my case, using the old Trading-API solved the problem.

First, try the getInventoryItems API without limit and offset values.
If the value still returns 0 as count, try to gain new token for the Bearer and double-check with the actual account in the ebay website.
It may be that you are obtaining valid token, but from another account.
Else, try to contact the developers in ebay.

The getInventoryItem (ie first url) call assumes that an item with the given sku exists, while getInventoryItems does not.
It looks like an item with sku 80003953 doesn't exist. You will need to use createOrRemplaceInventoryItem to create a new one.

Related

qualtrics contacts api extRef

I am using the Qualtrics API to create contacts in a mailing list. In making a call to https://ca1.qualtrics.com/API/v3/mailinglists/ML_identity/contacts I am pushing a json string containing extRef. However, I keep getting the following response:
"httpStatus": "400 - Bad Request",
"error": {
"errorMessage": "Unexpected json key provided: extRef",
"errorCode": "RP_9"
},
The documentation clearly states extRef is what the field is called. What am I missing here?
The field should be externalDataRef instead of extRef (Qualtrics is inconsitent when it comes to that field). See: https://api.qualtrics.com/api-reference/reference/researchCore.json/paths/~1mailinglists~1{mailingListId}~1contacts/post
Note that the API call is specific to Research Core Contacts. XM Directory uses a different API call to add a contact.

Ebay Inventory API "Get Inventory Item " 404 Not Found

When I am tryping to request on ebay inventory API using API Exploler. I am geting the Call Respond Statud code 404.
and Following error message. can anyone help me to solve the issue
{"errors": [
{
"errorId": 25710,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "REQUEST",
"message": "We didn't find the entity you are requesting. Please verify the request"
} ]}
That message means there is an issue either with the item, or the SKU. Maybe you typed the SKU incorrectly. Maybe you're looking in the account of the wrong user.
But my guess... The SKU was of an item that wasn't created with the API, and was instead created manually using eBay's front end. That command only works on items also created by similar commands.

Question about testIamPermissions method in Billing API

I'm trying to use cloudbilling.billingAccounts.testIamPermissions in the APIs Explorer, but I get an error.
API URL
https://developers.google.com/apis-explorer/?hl=ko#p/cloudbilling/v1/cloudbilling.billingAccounts.testIamPermissions?resource=billingAccounts%252F01183E-6A3E97-BE2C7A&resource=%257B%250A%257D&_h=1&
Error Result
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}
The error message appears as 'Request contains an invalid argument', so the value entered in resource seems to be incorrect.
I entered billingAccounts / {billingAccountID} for resource, but I do not know why I get an error.
{billingAccountID} has entered the billing account ID you are using.
What value should be put in the resource?
You need to use your full ID "billingAccounts/012345-567890-ABCDEF`" as an string. Also avoid to share your private information for security reasons use examples instead.
Confirm that the other options of the API works for you.

Office 365 REST API /$count filter giving wrong data

I'm trying to get count of records for different objects. The response of /$count filtered APIs is inconsistently giving wrong response.
I am referring this documentation link for usage instructions.
Request URL: GET https://outlook.office.com/api/v2.0/me/Events/$count
Response: -1
To verify if the above mentioned response is legitimate, I tried to get all events with a skip filter to identify the actual number of records present.
After a certain attempts following request URL gave me final count:
Request URL: GET https://outlook.office.com/api/v2.0/me/events/?$skip=159
Response:
{
"#odata.context": "https://outlook.office.com/api/v2.0/$metadata#Me/Events",
"value": [
{
"Id": "AAMkADMzYzIxNTBjLWUyMWUtNDgzYi04NTEwLTc5YTkzMWI5MmE4MgBGAAAAAABjOnbtK9ZkTIjwInd5bfYcBwDe_ScfFfAUQaKHRwnzV1lBAAAAAAENAADe_ScfFfAUQaKHRwnzV1lBAACs2ojfAAA=",
"CreatedDateTime": "2016-11-28T11:09:03.8359488Z",
"LastModifiedDateTime": "2017-02-21T08:04:48.8262751Z"
}
]
}
This implies that after skipping 159 records, I've 160th record present in the authenticated account but $count filtered API doesn't give me a valid response.
I tried testing this scenario with two different accounts where I noticed this anomaly for /message API as well. The HTTP GET call to messages/$count gives me 1563 whereas after trying with skip filter I found the total count to be 1396
I want to know if $count returns a legitimate response? If yes then explain this anomaly If no then is there any pattern where we should expect response to inconsistent?
To get a count of the number of events, you need to specify start time and end time. Here is what I use:
https://outlook.office.com/api/v2.0/me/calendarview/$count?startDateTime=2017-05-01T00:00:00Z&endDateTime=2017-05-31T23:59:59Z
If you don't specify the dates, you will get 400 with the following error message:
{"error":{"code":"ErrorInvalidParameter","message":"This request requires a time window specified by the query string parameters StartDateTime and EndDateTime."}}

Can't create replies to some existing youtube comments

I have a software, which allows you to create a reply to a comment on your youtube video. Therefore I use the youtube API v3 comments.insert method.
POST https://www.googleapis.com/youtube/v3/comments?part=id%2Csnippet&access_token=[access_token]
{
"snippet": {
"parentId": "parentId",
"textOriginal": "test message"
}
}
Most of the time the requests are successful. But for some comments I can't create replies this way. The API always returns:
{
"error": {
"errors": [
{
"domain": "youtube.comment",
"reason": "processingFailure",
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the <code>comment</code> resource in the request body to ensure that it is valid.",
"locationType": "other",
"location": "body"
}
],
"code": 400,
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the <code>comment</code> resource in the request body to ensure that it is valid."
}
}
I'm using a valid access token and the parentId is valid, too, because I can retrieve it through the API.
I took a look at the successful and failing requests, but didn't find any difference. So I assume that the request input isn't invalid as it is mentioned in the error message.
In my opinion this error isn't a transient error, because the same requests are still failing after some days.
I also tried to create a reply on such a comment through the API Explorer but the result was the same.
Does anyone have the same problems or am I doing something wrong?
When I go to the video and look at the comments directly, the comment with ID z13tjxdqnuygy1lga04cilcqxqipg1zbtbs has a "reply" option under it, while the comment with ID z13rgftjgw3bulyou04ccfnbjofztxg54yo0k does not. It seems that the user posted the comment via their Google+ page and disabled replies to their posts.