Skip to main content

Inventory Sync

Get current inventory level data

GET https://devops-campania.herokuapps.com/api/inventory

Returns inventory data from Shopify

Query Parameters

NameTypeDescription
inventory_item_id*Int64Inventory Item ID from Shopify

Headers

NameTypeDescription
API_Key*StringAPI KEY
API_Store*StringShopify primary myshopify.com url

Request Body

NameTypeDescription
available*IntegerNumber of items available for sale
inventory_item_id*Int64Inventory Item ID from Shopify
location_id*Int64Location ID from Shopify

INFO tab title="200: OK Inventory Data Return"

[{
"available": 6,
"inventory_item_id": 450789469,
"location_id": 40642626
},
{
"available": 6,
"inventory_item_id": 450789469,
"location_id": 40642627
}]

INFO tab title="401: Unauthorized API Key or API_Store Invalid"

{
"code" : "api-failed-auth",
"error" : "API Failed to authenticate"
}

INFO tab title="403: Forbidden After 3 Failed 401" After 3 failed API authentications, the API Failed alert will fire and the server will block ALL requests with a 403: Forbidden response for 1 hour. Reset alert in the Shopify Admin App Panel by resetting the API KEY

{
"code" : "api-blocked",
"error" : "API Failed - Blocked for 1 hour"
}

INFO tab title="404: Not Found Inventory Item ID not Found on Shopify"

{
"code" : "inventory_item_id-not-found",
"error" : "Inventory Item ID: {{ inventoryID }} not found in Shopify."
}