Inventory Update Run in API Explorer
Ask AI
Inventory Update (Retail)
To support changes to item availability, Deliverect can receive an inventory file.
Purpose
The method to transfer an Inventory CSV file allows the following;
- Defining product ranging per Location / Location_Group
- Defining pricing strategy per Location / Location_Group and Channel
- Updating stock count per Location
- Updating stock status (
IN_STOCK/OUT_OF_STOCK)
Method
To process Inventory updates, a two step process is required to first request a signed URL via Google Cloud Services (GCS) to then submit a CSV file of Inventory data via PUT request.
1.Request a Signed URL
Sending a request to this endpoint with a callbackUrl will return a signedUrl from GCS (Google Cloud Services) with specific headers.
2.Submit .csv file via PUT Request
Once a signedUrl is retrieved, the Inventory update process is as follows;
- Your Inventory .csv file should be submitted via a PUT request to the
signedUrlwith all the headers provided - Deliverect will then process the CSV asynchronously and callback to the provided
callbackUrlwhen the CSV file has been fully processed.
POST
/catalog/accounts/{accountId}/inventoryUploadUrl
curl \
--request POST 'https://api.staging.deliverect.com/catalog/accounts/{accountId}/inventoryUploadUrl' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--header "X-Deliverect-Version: retail" \
--data '{"callbackUrl":"https://example.com/inventoryCallback"}'
Request example
{
"callbackUrl": "https://example.com/inventoryCallback"
}
Response examples (200)
{
"fileId": "4e*********************************c1",
"signedUrl": "https://storage.googleapis.com/deliverect-retail-import-dev/66e05ea4ca347e0fef7e43c2/catalogue_66e05ea4ca347e0fef7e43c2_1726066804.csv?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=deliverect-retail-import%40deliverect-dev.iam.gserviceaccount.com%2F20240911%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240911T150004Z&X-Goog-Expires=3600&X-Goog-SignedHeaders=content-type%3Bhost%3Bx-goog-meta-callback&X-Goog-Signature=6eba9b***5a",
"headers": {
"x-goog-meta-user": "61********************b4",
"x-goog-meta-callback": "https://example.com/inventoryCallback",
"content-type": "text/csv",
"Host": "storage.googleapis.com"
}
Response examples (400)
{}