Stock
The stocks are fetched from the brand through integration, utilizing SKUs, locations, and stock providers. The stock object contains details about the quantity of reserved stocks for a specific SKU in the corresponding location. These reserved stocks are allocated for orders that have not yet been sent to the ERP or transitioned to the "Preparing" status.
List Stock
This method is used to get a list of stock objects.
GET
List-Stock
Path: /api/v1/stocks/
Parameters
The following parameters can be used to get a list of stock objects.
api_token
string
header
The API key of the customer account
limit
integer
query
The amount of line items returned per page
page
string
query
The number of page returned
Example Request
Example Response (200 OK)
The response includes the following parameters.
id
integer
The primary key of the stock
sku
string
The SKU of the product
provider
string
The name of the provider
location
integer
The stock location ID
stock
integer
The number of existing stocks
period
date
The stock period
unittype
string
The type of the stock unit
stock_type
string
The type of the stock
reserved_stock
integer
Reserved stock count
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the stock
Create Stock
This method is used to create a stock object with the request body.
POST
Create-Stock
Path: /api/v1/stocks/
Parameters
The following parameters can be used to create a stock object.
api_token
string
header
✓
The API key of the customer account
sku
string
body
✓
The SKU of the product
provider
string
body
✓
The name of the provider
location
string
body
✓
The stock location
stock
integer
body
✓
The number of the existing stock for this product
Example Request
Example Response (201 Created)
The response includes the following parameters.
id
integer
The primary key of the stock
sku
string
The SKU of the product
provider
string
The name of the provider
location
integer
The stock location ID
stock
integer
The number of existing stocks
period
date
The stock period
unittype
string
The type of the stock unit
stock_type
string
The type of the stock
reserved_stock
integer
Reserved stock count
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the stock
Example Response (400 Bad Request)
Search Stocks
This method is used to search stock objects with the specified filters.
GET
Search-Stocks
Path: /api/v1/stocks/?sku=<string>&stock__gt=<number>&stock__gte=<number>&stock__lt=<number>&stock__lte=<number>&stock=<number>&reserved_stock__gt=<number>&reserved_stock__gte=<number>&reserved_stock__lt=<number>&reserved_stock__lte=<number>&reserved_stock=<number>&created_date__gt=<string>&created_date__gte=<string>&created_date__lt=<string>&created_date__lte=<string>&created_date=<string>&modified_date__gt=<string>&modified_date__gte=<string>&modified_date__lt=<string>&modified_date__lte=<string>&modified_date=<string>&is_active=<string>&location=<string>&provider=<string>&location_name=<string>&provider_name=<string>&period=<string>&unit_type=<string>&stock_type=<string>&sort=<string>&page=<integer>&limit=<integer>
Filters
The following parameters can be used to filter GET request results.
api_token
string
header
The API key of the customer account
location
string
query
The code of the stock location
location_name
string
query
The name of the stock location
provider
string
query
The stock provider ID
provider_name
string
query
The name of the provider
is_active
boolean
query
The activation status of the stock
created_date
date
query
The creation date
modified_date
date
query
The last modified date
modified_date__gt
date
query
After that date
unit_type
string
query
"quantity", "kilogram"
stock_type
string
query
"standard", "scheduled"
stock__gt
integer
query
Minimum stock count
The following filters can be applied via the request URL.
Example Request
Example Response (200 OK)
The response includes the following parameters.
id
integer
The primary key of the stock
sku
string
The SKU of the product
provider
string
The name of the provider
location
integer
The stock location ID
stock
integer
The number of existing stocks
period
date
The stock period
unittype
string
The type of the stock unit
stock_type
string
The type of the stock
reserved_stock
integer
Reserved stock count
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the stock
Increase Reserved Stock
This method is used to increase the reserved stock for the specified SKU, location and provider.
POST
Increase-Reserved-Stock
Path: /api/v1/stocks/increase_reserved_stock/
Parameters
The following parameters can be used to increase reserved stock.
api_token
string
header
✓
The API key of the customer account
sku
string
query
✓
The SKU of the product
location
string
query
✓
The ID of the location
provider
string
query
The ID of the provider
date
date
query
The creation date of the stock
Example Request
Example Response (201 Created)
The response includes the following parameters.
id
integer
The primary key of the stock
sku
string
The SKU of the product
provider
string
The name of the provider
location
integer
The stock location ID
stock
integer
The number of existing stocks
period
date
The stock period
unittype
string
The type of the stock unit
stock_type
string
The type of the stock
reserved_stock
integer
Reserved stock count
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the stock
Example Response (400 Bad Request - 208 Already Reported)
Decrease Reserved Stock
This method is used to decrease the reserved stock for the specified SKU, location and provider.
POST
Decrease-Reserved-Stock
Path: /api/v1/stocks/decrease_reserved_stock/
Parameters
The following parameters can be used to decrease reserved stock.
api_token
string
header
✓
The API key of the customer account
sku
string
query
✓
The SKU of the product
location
string
query
✓
The ID of the location
provider
string
query
The ID of the provider
date
date
query
The creation date of the stock
Example Request
Example Response (201 Created)
The response includes the following parameters.
id
integer
The primary key of the stock location
sku
string
The SKU of the product
provider
string
The name of the provider
location
integer
The stock location ID
stock
integer
The number of existing stocks
period
date
The stock period
unittype
string
The type of the stock unit
stock_type
string
The type of the stock
reserved_stock
integer
Reserved stock count
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the stock
Example Response (400 Bad Request - 208 Already Reported)
Stock Query
This method is used to query stock.
GET
Stock-Query
Path: /api/v1/stocks/stock_query/
Parameters
The following parameters can be used to query stock.
api_token
string
header
✓
The API key of the customer account
sku
string
query
✓
The SKU of the product
Example Request
Example Response (200 OK)
The response includes the following parameters.
sku
string
The SKU of the product
retail_store_code
string
The code of the retail store
retail_store_name
string
The name of the retail store
stock
integer
The number of the existing stock
Multi Stock Query
This method is used to query multiple stock.
GET
Multi-Stock-Query
Path: /api/v1/stocks/multi_stock_query/
Parameters
The following parameters can be used to query multiple stock.
api_token
string
header
✓
The API key of the customer account
sku
string
query
✓
The SKU of the product
Example Request
Example Response (200 OK)
The response includes the following parameters.
sku
string
The SKU of the product
retail_store_code
string
The code of the retail store
retail_store_name
string
The name of the retail store
stock
integer
The number of the existing stock
Multi Salable Stock Query
This method is used to query multiple salable stock.
GET
Multi-Salable Stock-Query
Path: /api/v1/stocks/multi_salable_stock_query/
Parameters
The following parameters can be used to query multiple salable stock.
api_token
string
header
✓
The API key of the customer account
sku
string
query
✓
The SKU of the product
Example Request
Example Response (200 OK)
The response includes the following parameters.
sku
string
The SKU of the product
retail_store_code
string
The code of the retail store
retail_store_name
string
The name of the retail store
stock
integer
The number of the existing stock
Salable Stock Query
This method is used to query salable stock.
GET
Salable Stock-Query
Path: api/v1/stocks/salable_stock_query/
Parameters
The following parameters can be used to query salable stock.
api_token
string
header
✓
The API key of the customer account
sku
string
query
✓
The SKU of the product
Example Request
Example Response (200 OK)
The response includes the following parameters.
sku
string
The SKU of the product
retail_store_code
string
The code of the retail store
retail_store_name
string
The name of the retail store
stock
integer
The number of the existing stock
Insert/Update Single/Multiple Stock
This method is used to upsert single or multiple stock.
POST
Single-or-Multiple-Stock-Upsert
Path: /api/v1/stocks/insert_or_update_stock/
Parameters
The following parameters can be used to upsert single or multiple stock.
api_token
string
header
✓
The API key of the customer account
sku
string
body
✓
The SKU of the product
provider
string
body
✓
The name of the provider
location
string
body
✓
The stock location
stock
integer
body
✓
The number of the existing stock for this product
Example Request
List Active Stock
This methods are used to get a list of single or multiple active stock.
List Single Active Stock
This methods are used to get a list of single active stock.
POST
List-Single-Active-Stock
Path: /api/v1/active-stocks/{stocklist_id}/
Parameters
The following parameters can be used to get a list of single active stock.
api_token
string
header
✓
The API key of the customer account
{stocklist_id}
string
query
✓
The ID of the stock list (also referred to as the stock list code in Omnitron)
sku
string
query
✓
The SKU of the product
Example Request
Example Response (200 OK)
The response includes the following parameters.
sku
string
The SKU of the product
stock
integer
The number of the existing stock
List Multiple Active Stock
This methods are used to get a list of multiple active stock.
POST
List-Multiple-Active-Stock
Path: /api/v1/stocks/{stocklist_id}/
Parameters
The following parameters can be used to get a list of multiple active stock.
api_token
string
header
✓
The API key of the customer account
{stocklist_id}
string
query
✓
The ID of the stock list (also referred to as the stock list code in Omnitron)
Example Request
Example Response (200 OK)
The response includes the following parameters.
sku
string
The SKU of the product
stock
integer
The number of the existing stock
Last updated
Was this helpful?