08-01-2023 11:08 PM - edited 08-01-2023 11:10 PM
I tried making an offer in the EBAY_CA market place, but I keep getting the error: "12345 could not be found or is not available in the system for the marketplace EBAY_CA."
Call to createOrReplaceInventoryItem
URI
https://api.ebay.com/sell/inventory/v1/inventory_item/12345?&GLOBAL-ID=EBAY-CA
and
https://api.ebay.com/sell/inventory/v1/inventory_item/12345?&GLOBAL-ID=EBAY-ENCA
and
https://api.ebay.com/sell/inventory/v1/inventory_item/12345
Request Body
{
"availability": {
"shipToLocationAvailability": {
"availabilityDistributions": [
{
"fulfillmentTime": {
"unit": "DAY",
"value": 1
},
"merchantLocationKey": "warehouse1",
"quantity": 1
}
],
"quantity": 1
}
},
"condition": "NEW",
"product": {
"epid": "3096452",
"title": "TEST LISTING DO NOT BUY - The Graduate DVD"
}
}
Call to createOffer (for EBAY_CA)
URI
https://api.ebay.com/sell/inventory/v1/offer
Request Body
{
"sku": "12345",
"marketplaceId": "EBAY_CA",
"format": "FIXED_PRICE",
"listingDescription": "<ul><li><font face=\"Arial\"><span style=\"font-size: 18.6667px;\"><p class=\"p1\">Test listing - do not bid or buy <\/p><\/span><\/font><\/li><li><p class=\"p1\">Built-in GPS. <\/p><\/li><li><p class=\"p1\">Water resistance to 50 meters.<\/p><\/li><li><p class=\"p1\"> A new lightning-fast dual-core processor. <\/p><\/li><li><p class=\"p1\">And a display that\u2019s two times brighter than before. <\/p><\/li><li><p class=\"p1\">Full of features that help you stay active, motivated, and connected, Apple Watch Series 2 is designed for all the ways you move<\/p><\/li><\/ul>",
"availableQuantity": 1,
"quantityLimitPerBuyer": 1,
"pricingSummary": {
"price": {
"value": 999.99,
"currency": "CAD"
}
},
"listingPolicies": {
"fulfillmentPolicyId": "338460050022",
"paymentPolicyId": "338331111022",
"returnPolicyId": "338331130022"
},
"categoryId": "617",
"merchantLocationKey": "warehouse1"
}
Response body
{
"errors": [
{
"errorId": 25751,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "REQUEST",
"message": "12345 could not be found or is not available in the system for the marketplace EBAY_CA.",
"parameters": [
{
"name": "text1",
"value": "12345"
},
{
"name": "text2",
"value": "EBAY_CA"
}
]
}
]
}
Call to createOffer (for EBAY_US)
URI
https://api.ebay.com/sell/inventory/v1/offer
Request Body
{
"sku": "12345",
"marketplaceId": "EBAY_US",
"format": "FIXED_PRICE",
"listingDescription": "<ul><li><font face=\"Arial\"><span style=\"font-size: 18.6667px;\"><p class=\"p1\">Test listing - do not bid or buy <\/p><\/span><\/font><\/li><li><p class=\"p1\">Built-in GPS. <\/p><\/li><li><p class=\"p1\">Water resistance to 50 meters.<\/p><\/li><li><p class=\"p1\"> A new lightning-fast dual-core processor. <\/p><\/li><li><p class=\"p1\">And a display that\u2019s two times brighter than before. <\/p><\/li><li><p class=\"p1\">Full of features that help you stay active, motivated, and connected, Apple Watch Series 2 is designed for all the ways you move<\/p><\/li><\/ul>",
"availableQuantity": 1,
"quantityLimitPerBuyer": 1,
"pricingSummary": {
"price": {
"value": 999.99,
"currency": "USD"
}
},
"listingPolicies": {
"fulfillmentPolicyId": "338460050022",
"paymentPolicyId": "338331111022",
"returnPolicyId": "338331130022"
},
"categoryId": "617",
"merchantLocationKey": "warehouse1"
}
Response body
{
"offerId": "342246458016"
}
So createOffer works fine when marketplaceId is EBAY_US, but not EBAY_CA.
08-01-2023 11:23 PM
You are using EBAY_CA instead of EBAY-ENCA
eBay Site ID to Global ID Mapping
https://developer.ebay.com/devzone/merchandising/docs/concepts/siteidtoglobalid.html
08-02-2023 02:09 AM - edited 08-02-2023 02:12 AM
For the URIs?
For the createOrReplaceProductCompatibility call request I tried:
https://api.ebay.com/sell/inventory/v1/offer?GLOBAL-ID=EBAY-ENCA
For the createOffer call request I tried:
https://api.ebay.com/sell/inventory/v1/offer
and
https://api.ebay.com/sell/inventory/v1/offer?GLOBAL-ID=EBAY-ENCA
And for the marketplaceId field in the createOffer call request I kept it at EBAY_CA:
{
"sku": "12345",
"marketplaceId": "EBAY_CA",
"format": "FIXED_PRICE",
"listingDescription": "<ul><li><font face=\"Arial\"><span style=\"font-size: 18.6667px;\"><p class=\"p1\">Test listing - do not bid or buy <\/p><\/span><\/font><\/li><li><p class=\"p1\">Built-in GPS. <\/p><\/li><li><p class=\"p1\">Water resistance to 50 meters.<\/p><\/li><li><p class=\"p1\"> A new lightning-fast dual-core processor. <\/p><\/li><li><p class=\"p1\">And a display that\u2019s two times brighter than before. <\/p><\/li><li><p class=\"p1\">Full of features that help you stay active, motivated, and connected, Apple Watch Series 2 is designed for all the ways you move<\/p><\/li><\/ul>",
"availableQuantity": 1,
"quantityLimitPerBuyer": 1,
"pricingSummary": {
"price": {
"value": 999.99,
"currency": "CAD"
}
},
"listingPolicies": {
"fulfillmentPolicyId": "338460050022",
"paymentPolicyId": "338331111022",
"returnPolicyId": "338331130022"
},
"categoryId": "617",
"merchantLocationKey": "warehouse1"
}
08-02-2023 02:36 AM
It would be for the
marketplaceId
attribute only. Everything else looks okay to me for now
08-02-2023 09:39 AM
Okay thank you. Must be something wrong with my inventory location, policies, or the item I created then.
I'll start from the beginning and see if I can find out whats going on.
08-02-2023 11:14 AM
I ended up just using the Trading API after messing around with the Inventory API for 3 days. What a nightmare.
I didn't know any XML and yet I still got an item listed after an hour of reading 😂
08-02-2023 06:11 PM
No worries! I didn't know about the trading API until I read the messages. And yes XML can be a tad confusing
Im glad you got your issue resolved. I'm always on here if you ever need a hand (Software Engineering Student)
03-22-2024 01:16 AM
Hello, have you been able to figure out the problem?
I too am facing the same issue where the
/inventory_item
API is giving me 0 results in spite of having several items listed.