This API allows the user to query a list of inventory upload jobs, and find the complete information (e.g. job ID, type, and status) for each job. The endpoints for the API can be accessed using the Inventory credentials for the desired environment.
Once an inventory file has been uploaded for Order Management to process, call the API to find the correct job ID as well as the status of the job. Once the job has been found, continue calling the API to monitor the status of the inventory upload and see when the job has been successfully uploaded, as well as the number of items uploaded.
Note that unlike other APIs, there are two endpoints that may be used. Each endpoint is associated with a different API key related to a package - either a generic inventory or an "inventory specific" package. The Inventory Specific package is the preferred endpoint to use, but some implementations may use the generic one depending on their configuration.
Version | 1.0 |
Call - Inventory Production | https://{tenantId}-translation.mozu.com/api/v1/queue/ |
Call - Inventory Specific | https://{tenantId}-translation.mozu.com/inv/api/v1/queue/ |
Call - Inventory Specific (Staging) | https://{tenantId}-translation.sandbox.mozu.com/inv/api/v1/queue/ |
Supported Formats | JSON |
HTTP Method | GET |
To query based on Job ID only, the ID only needs to be appended to the endpoint:
- https://integration.shopatron.com/inv/api/v1/queue/[Job ID]
To query for multiple parameters, such as both a Job ID and Fulfiller ID, a “/?” is added to the call followed by parameter names and values that are joined by the “&” symbol:
- https://integration.shopatron.com/inv/api/v1/queue/?jobID=[Job ID]&fulfillerID=[Fulfiller ID]
In the case of performing a search with multiple terms of the same parameter, such as retrieving multiple locations’ jobs at once, use a comma-separated list as shown below.
- https://integration.shopatron.com/inventory/api/v1/queue/?locationID=[Location ID One],[Location ID Two],[Location ID Three]
Example
The example case searches for inventory jobs and their statuses according to the following characteristics:
- Fulfiller 00000
- Jobs based on file DEALERCDK_REFRESH_161017060234.csv
This guide will demonstrate how to perform this search.
Available Parameters
Jobs can be searched for with any of the following parameters, with none specifically required:
Parameter | Type | Description |
types | string | Comma-separated string containing any combination of the valid job type enum values. |
locationID | integer | A unique identifier for the owning location. |
originalFileName | string | The full name of the file that was picked up at the secure drop point server before being split up by location. This applies only to refresh and adjust jobs created via file fetch process. |
limit | integer | The maximum number of results to return. |
The Full Request
This is the entire request that will retrieve the relevant jobs for this fulfiller and inventory file.
https://{tenantId}-translation.mozu.com/inv/api/v1/queue/?fulfillerID=00000&originalFilename=DEALERCDK_REFRESH_161017060234.csv
The Full Response
Unless a specific Job ID was searched for in the endpoint, the response will be a collection of jobs.
Once the job has been completed, the “itemCount” field will show in the response and display the number of items that have been added or updated in the system for REFRESH and ADJUST files. For example, if a file is uploaded with three products that have a stock of 50 items each, the “itemCount” field will display three and not 150.
[ { "jobID":010101010, "fulfillerID":00000, "locationID":11111, "type":"REFRESH", "added":"2016-12-14T23:23:19+0000", "originalFilename":"DEALERCDK_REFRESH_161017060234.csv", "hasData":false, "status":"PENDING" }, { "jobID":020202020, "fulfillerID":00000, "locationID":11111, "type":"REFRESH", "added":"2016-12-14T23:23:19+0000", "originalFilename":"DEALERCDK_REFRESH_161017060234.csv", "hasData":false, "status":"PENDING" }, { "jobID":030303030, "fulfillerID":00000, "locationID":11111, "type":"REFRESH", "added":"2016-12-14T23:23:19+0000", "originalFilename":"DEALERCDK_REFRESH_161017060234.csv", "hasData":false, "status":"PENDING" }, { "jobID":040404040, "fulfillerID":00000, "locationID":11111, "type":"REFRESH", "added":"2016-12-14T23:23:19+0000", "originalFilename":"DEALERCDK_REFRESH_161017060234.csv", "hasData":false, "status":"PENDING" }, { "jobID":050505050, "fulfillerID":00000, "locationID":11111, "type":"REFRESH", "added":"2016-12-14T23:23:19+0000", "originalFilename":"DEALERCDK_REFRESH_161017060234.csv", "hasData":false, "status":"PENDING" }, { "jobID":060606060, "fulfillerID":00000, "locationID":11111, "type":"REFRESH", "added":"2016-12-14T23:23:19+0000", "originalFilename":"DEALERCDK_REFRESH_161017060234.csv", "hasData":false, "status":"PENDING" }, { "jobID":070707070, "fulfillerID":00000, "locationID":11111, "type":"REFRESH", "added":"2016-12-14T23:23:19+0000", "originalFilename":"DEALERCDK_REFRESH_161017060234.csv", "hasData":false, "status":"PENDING" } ]