Sandbox
The Inventory Mapping API has a sandbox environment that allows sellers to test different types of inputs and their responses. All returned data is mocked.
When a seller provides an input in a startListingPreviewsCreation mutation, they will receive a task ID in the mock response (just like in production). They can then use this task ID in a listingPreviewsCreationTaskById query to retrieve the corresponding result. To do so:
- Call a startListingPreviewsCreation mutation and provide the test input (such as title, images aspects, etc.). The mutation responds with a task Id.
- Call a listingPreviewsCreationTaskById query using the returned task Id.
- The query returns a mock recommendation result determined by the input used in the mutation.
Note: Processing time is randomized and can take up to 10 minutes. Sellers may also subscribe to the Sandbox Notification API LISTING_PREVIEW_CREATION_TASK_STATUS topic to receive a notification when recommendations are ready. If you are not familiar with the Notification API, see the Sell Communications Guide for more information.
Below are possible inputs a user can provide in a startListingPreviewsCreation mutation request and the type of result they will get in the listingPreviewsCreationTaskById query response:
Note: Seller can send inputs in the same combinations as production:
- title only
- image only
- title + image
- title + aspects
- title + GTIN
Valid image
In this use case, the seller uses the startListingPreviewsCreation mutation to create a listing preview based on the provided image.
startListingPreviewsCreation mutation input:
{
"input": {
"externalProducts": [
{
"images": ["https://i.ebayimg.com/sample/png"]
}
]
}
}
Using the listingPreviewsCreationTaskById query, the seller can retrieve information about the task's status and results. In this sample, the listing preview task has been completed, and the image the seller provided is valid.
listingPreviewsCreationTaskById query output:
{
"data": {
"listingPreviewsCreationTaskById": {
"__typename": "ListingPreviewsCreationTaskByIdOutput",
"requestedId": "3QgRrIfPLfRs3d87jxSZ6L7NA",
"listingPreviewsCreationTask": {
"id": "3QgRrIfPLfRs3d87jxSZ6L7NA",
"result": {
"completionStatus": "COMPLETED",
"listingPreviews": [
{
"clientProvidedProductDetails": {
"externalProductIdentifier": null,
"title": null,
"images": [
"https://i.ebayimg.com/sample/png"
],
"category": null,
"sku": null
},
"title": "Sample Title",
"description": null,
"category": {
"id": "31387"
},
"images": [
"https://i.ebayimg.com/sample/png"
],
"aspects": [
{
"name": "Department",
"aspectValues": [
"Men"
]
},
{
"name": "Style",
"aspectValues": [
"Dress/Formal"
]
},
{
"name": "Type",
"aspectValues": [
"Wristwatch"
]
},
{
"name": "Dial Color",
"aspectValues": [
"White"
]
},
{
"name": "Movement",
"aspectValues": [
"Mechanical (Automatic)"
]
}
],
"sku": null,
"product": null
}
],
"unprocessedProducts": [],
"unmappedProducts": [],
"invalidProducts": []
}
}
}
}
}
Unmapped image
In this use case, the seller uses the startListingPreviewsCreation mutation to create a listing preview based on the provided image.
startListingPreviewsCreation mutation input:
{
"input": {
"externalProducts": [
{
"images": ["https://i.ebayimg.com/unmapped/png"]
}
]
}
}
Using the listingPreviewsCreationTaskById query, the seller can retrieve information about the task's status and results. In this sample, the listing preview task has been completed, but with an error. The image the seller provided is unmapped, as shown by the unmappedProducts container.
Note: An unmapped product is a valid external product that was not successfully mapped by eBay into a listing preview.
listingPreviewsCreationTaskById query output:
{
"data": {
"listingPreviewsCreationTaskById": {
"__typename": "ListingPreviewsCreationTaskByIdOutput",
"requestedId": "Wtgy1uVsl1qiMu97L7ecG5BZt",
"listingPreviewsCreationTask": {
"id": "Wtgy1uVsl1qiMu97L7ecG5BZt",
"result": {
"completionStatus": "COMPLETED_WITH_ERROR",
"listingPreviews": [],
"unprocessedProducts": [],
"unmappedProducts": [
{
"externalProductIdentifier": null,
"title": null,
"images": [
"https://i.ebayimg.com/unmapped/png"
],
"aspects": [],
"category": null,
"sku": null
}
],
"invalidProducts": []
}
}
}
}
}
Invalid image
In this use case, the seller uses the startListingPreviewsCreation mutation to create a listing preview based on the provided image.
startListingPreviewsCreation mutation input:
{
"input": {
"externalProducts": [
{
"images": ["https://i.ebayimg.com/failed/png"]
}
]
}
}
Using the listingPreviewsCreationTaskById query, the seller can retrieve information about the task's status and results. In this sample, the listing preview task has been completed, but with an error. The image the seller provided is invalid and did not process, as shown by the unprocessedProducts container.
listingPreviewsCreationTaskById query output:
{
"data": {
"listingPreviewsCreationTaskById": {
"__typename": "ListingPreviewsCreationTaskByIdOutput",
"requestedId": "DuH9KnGdQ7w3odoiDOBVuESjJ",
"listingPreviewsCreationTask": {
"id": "DuH9KnGdQ7w3odoiDOBVuESjJ",
"result": {
"completionStatus": "COMPLETED_WITH_ERROR",
"listingPreviews": [],
"unprocessedProducts": [
{
"externalProductIdentifier": null,
"title": null,
"images": [
"https://i.ebayimg.com/failed/png"
],
"aspects": [],
"category": null,
"sku": null
}
],
"unmappedProducts": [],
"invalidProducts": []
}
}
}
}
}
Valid title
In this use case, the seller uses the startListingPreviewsCreation mutation to create a listing preview based on the provided title.
startListingPreviewsCreation mutation input:
{
"input": {
"externalProducts": [
{
"title": "Title"
}
]
}
}
Using the listingPreviewsCreationTaskById query, the seller can retrieve information about the task's status and results. In this sample, the listing preview task has been completed and the title the seller provided was valid.
listingPreviewsCreationTaskById query output:
{
"data": {
"listingPreviewsCreationTaskById": {
"__typename": "ListingPreviewsCreationTaskByIdOutput",
"requestedId": "zk6OlmkjJ3wWrD0tdwt9hRKNS",
"listingPreviewsCreationTask": {
"id": "zk6OlmkjJ3wWrD0tdwt9hRKNS",
"result": {
"completionStatus": "COMPLETED",
"listingPreviews": [
{
"clientProvidedProductDetails": {
"externalProductIdentifier": null,
"title": "Title",
"images": [],
"category": null,
"sku": null
},
"title": "Title",
"description": null,
"category": {
"id": "31387"
},
"images": [],
"aspects": [
{
"name": "Department",
"aspectValues": [
"Men"
]
},
{
"name": "Style",
"aspectValues": [
"Dress/Formal"
]
},
{
"name": "Type",
"aspectValues": [
"Wristwatch"
]
},
{
"name": "Dial Color",
"aspectValues": [
"White"
]
},
{
"name": "Movement",
"aspectValues": [
"Mechanical (Automatic)"
]
}
],
"sku": null,
"product": null
}
],
"unprocessedProducts": [],
"unmappedProducts": [],
"invalidProducts": []
}
}
}
}
}
Unmapped title
In this use case, the seller uses the startListingPreviewsCreation mutation to create a listing preview based on the provided title.
startListingPreviewsCreation mutation input:
{
"input": {
"externalProducts": [
{
"title": "Unmapped Title"
}
]
}
}
Using the listingPreviewsCreationTaskById query, the seller can retrieve information about the task's status and results. In this sample, the listing preview task has been completed, but with an error. The title the seller provided is unmapped, as shown by the unmappedProducts container.
Note: An unmapped product is a valid external product that was not successfully mapped by eBay into a listing preview.
listingPreviewsCreationTaskById query output:
{
"data": {
"listingPreviewsCreationTaskById": {
"__typename": "ListingPreviewsCreationTaskByIdOutput",
"requestedId": "tUaKvd5YRnYesfWUKi620ygsU",
"listingPreviewsCreationTask": {
"id": "tUaKvd5YRnYesfWUKi620ygsU",
"result": {
"completionStatus": "COMPLETED_WITH_ERROR",
"listingPreviews": [],
"unprocessedProducts": [],
"unmappedProducts": [
{
"externalProductIdentifier": null,
"title": "Unmapped Title",
"images": [],
"aspects": [],
"category": null,
"sku": null
}
],
"invalidProducts": []
}
}
}
}
}
Valid title/image/aspects
In this use case, the seller uses the startListingPreviewsCreation mutation to create a listing preview based on the provided title, image, and item aspect.
startListingPreviewsCreation mutation input:
{
"input": {
"externalProducts": [
{
"title": "Title",
"images": ["https://anything.com/png", "https://i.ebayimg.com/sample/png"],
"aspects": [
{
"name": "Color",
"values": [
"Blue"
]
}
]
}
]
}
}
Using the listingPreviewsCreationTaskById query, the seller can retrieve information about the task's status and results. In this sample, the listing preview task has been completed, and all provided inputs were valid.
listingPreviewsCreationTaskById query output:
{
"data": {
"listingPreviewsCreationTaskById": {
"__typename": "ListingPreviewsCreationTaskByIdOutput",
"requestedId": "8q1ffMFbIuuTaZW2g7BTPOVAo",
"listingPreviewsCreationTask": {
"id": "8q1ffMFbIuuTaZW2g7BTPOVAo",
"result": {
"completionStatus": "COMPLETED",
"listingPreviews": [
{
"clientProvidedProductDetails": {
"externalProductIdentifier": null,
"title": "Title",
"images": [
"https://anything.com/png",
"https://i.ebayimg.com/sample/png"
],
"category": null,
"sku": null
},
"title": "Title",
"description": null,
"category": {
"id": "31387"
},
"images": [
"http://i.ebayimg.sandbox.ebay.com/images/g/G1AAAeSw16lpRc9L/s-l1600.jpg",
"http://i.ebayimg.sandbox.ebay.com/images/g/G1EAAeSw16lpRc9L/s-l1600.jpg"
],
"aspects": [
{
"name": "Department",
"aspectValues": [
"Men"
]
},
{
"name": "Style",
"aspectValues": [
"Dress/Formal"
]
},
{
"name": "Type",
"aspectValues": [
"Wristwatch"
]
},
{
"name": "Dial Color",
"aspectValues": [
"White"
]
},
{
"name": "Movement",
"aspectValues": [
"Mechanical (Automatic)"
]
}
],
"sku": null,
"product": null
}
],
"unprocessedProducts": [],
"unmappedProducts": [],
"invalidProducts": []
}
}
}
}
}
Unmapped title/image/aspects
In this use case, the seller uses the startListingPreviewsCreation mutation to create a listing preview based on the provided title, image, and item aspect.
startListingPreviewsCreation mutation input:
{
"input": {
"externalProducts": [
{
"images": ["https://i.ebayimg.com/unmapped/png"],
"title": "Unmapped Title",
"aspects": [
{
"name": "Color",
"values": [
"Blue"
]
}
]
}
]
}
}
Using the listingPreviewsCreationTaskById query, the seller can retrieve information about the task's status and results. In this sample, the listing preview task has been completed, but with an error. The inputs the seller provided are unmapped, as shown by the unmappedProducts container.
Note: An unmapped product is a valid external product that was not successfully mapped by eBay into a listing preview.
listingPreviewsCreationTaskById query output:
{
"data": {
"listingPreviewsCreationTaskById": {
"__typename": "ListingPreviewsCreationTaskByIdOutput",
"requestedId": "hmXow5UO6anXqZuAYwCyqQXDu",
"listingPreviewsCreationTask": {
"id": "hmXow5UO6anXqZuAYwCyqQXDu",
"result": {
"completionStatus": "COMPLETED_WITH_ERROR",
"listingPreviews": [],
"unprocessedProducts": [],
"unmappedProducts": [
{
"externalProductIdentifier": null,
"title": "Unmapped Title",
"images": [
"https://i.ebayimg.com/unmapped/png"
],
"aspects": [
{
"name": "Color",
"values": [
"Blue"
]
}
],
"category": null,
"sku": null
}
],
"invalidProducts": []
}
}
}
}
}
Invalid product ID
In this use case, the seller uses the startListingPreviewsCreation mutation to create a listing preview based on the provided product ID and title.
startListingPreviewsCreation mutation input:
{
"input": {
"externalProducts": [
{
"externalProductIdentifierInput": {
"productId": "222",
"productType": "UPC"
},
"title": "Something"
}
]
}
}
Using the listingPreviewsCreationTaskById query, the seller can retrieve information about the task's status and results. In this sample, the listing preview task has been completed, but with an error. The inputs the seller provided are invalid , as shown by the invalidProducts container.
listingPreviewsCreationTaskById query output:
{
"data": {
"listingPreviewsCreationTaskById": {
"__typename": "ListingPreviewsCreationTaskByIdOutput",
"requestedId": "A7qjRpR808sg38wAa2Dh3wphE",
"listingPreviewsCreationTask": {
"id": "A7qjRpR808sg38wAa2Dh3wphE",
"result": {
"completionStatus": "COMPLETED_WITH_ERROR",
"listingPreviews": [],
"unprocessedProducts": [],
"unmappedProducts": [],
"invalidProducts": [
{
"clientProvidedProductDetails": {
"externalProductIdentifier": {
"productId": "222",
"productType": "UPC"
},
"title": "Something",
"images": [],
"category": null,
"sku": null
},
"description": "Invalid external product details request"
}
]
}
}
}
}
}