Skip to main content

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.

ParameterData TypeInDescription
api_tokenstringheaderThe API key of the customer account
limitintegerqueryThe amount of line items returned per page
pagestringqueryThe number of page returned

Example Request

import requests

url = "http://localhost:8000/api/v1/stocks/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload={}
headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token)
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Example Response (200 OK)

The response includes the following parameters.

ParameterData TypeDescription
idintegerThe primary key of the stock
skustringThe SKU of the product
providerstringThe name of the provider
locationintegerThe stock location ID
stockintegerThe number of existing stocks
perioddateThe stock period
unittypestringThe type of the stock unit
stock_typestringThe type of the stock
reserved_stockintegerReserved stock count
created_datedateThe creation date
modified_datedateThe last modified date
is_activebooleanThe activation status of the stock
{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"id": 2,
"created_date": "2023-05-10T13:37:18.209869+03:00",
"modified_date": "2023-05-10T13:37:18.210018+03:00",
"period": null,
"stock_type": "standard",
"unit_type": "qty",
"provider": "shop_provider",
"location": "110",
"stock": 5,
"is_active": true,
"sku": "555AB1300456213002",
"reserved_stock": 0
},
{
"id": 4,
"created_date": "2023-05-10T15:14:40.733472+03:00",
"modified_date": "2023-05-10T15:14:40.733504+03:00",
"period": null,
"stock_type": "standard",
"unit_type": "qty",
"provider": "shop_provider",
"location": "110",
"stock": 5,
"is_active": true,
"sku": "555AB1300456213003",
"reserved_stock": 0
},
{
"id": 6,
"created_date": "2023-05-10T15:15:03.254957+03:00",
"modified_date": "2023-05-10T15:15:03.254980+03:00",
"period": null,
"stock_type": "standard",
"unit_type": "qty",
"provider": "shop_provider",
"location": "110",
"stock": 5,
"is_active": true,
"sku": "555AB1300456213004",
"reserved_stock": 0
}
]
}

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.

ParameterData TypeInRequiredDescription
api_tokenstringheaderThe API key of the customer account
skustringbodyThe SKU of the product
providerstringbodyThe name of the provider
locationstringbodyThe stock location
stockintegerbodyThe number of the existing stock for this product

Example Request

import requests
import json

url = "https://{whippy_api_url}/api/v1/stocks/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps({
"period": None,
"stock_type": "standard",
"unit_type": "qty",
"provider": "shop_provider",
"location": "110",
"stock": 5,
"is_active": True,
"sku": "555AB1300456213004",
"reserved_stock": 0
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Token {}'.format(api_token)
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response (201 Created)

The response includes the following parameters.

ParameterData TypeDescription
idintegerThe primary key of the stock
skustringThe SKU of the product
providerstringThe name of the provider
locationintegerThe stock location ID
stockintegerThe number of existing stocks
perioddateThe stock period
unittypestringThe type of the stock unit
stock_typestringThe type of the stock
reserved_stockintegerReserved stock count
created_datedateThe creation date
modified_datedateThe last modified date
is_activebooleanThe activation status of the stock
{
"id": 6,
"created_date": "2023-05-10T15:15:03.254957+03:00",
"modified_date": "2023-05-10T15:15:03.254980+03:00",
"period": null,
"stock_type": "standard",
"unit_type": "qty",
"provider": "shop_provider",
"location": "110",
"stock": 5,
"is_active": true,
"sku": "555AB1300456213004",
"reserved_stock": 0
}

Example Response (400 Bad Request)

{
"stock_exists_error": "Stock already exists."
}
—-------
{
"provider": [
"This field is required."
],
"location": [
"This field is required."
],
"stock": [
"This field is required."
],
"sku": [
"This field is required."
]
}
---
{
"invalid_location": "Location does not belong to provider."
}

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.

ParameterData TypeInDescription
api_tokenstringheaderThe API key of the customer account
locationstringqueryThe code of the stock location
location_namestringqueryThe name of the stock location
providerstringqueryThe stock provider ID
provider_namestringqueryThe name of the provider
is_activebooleanqueryThe activation status of the stock
created_datedatequeryThe creation date
modified_datedatequeryThe last modified date
modified_date__gtdatequeryAfter that date
unit_typestringquery"quantity", "kilogram"
stock_typestringquery"standard", "scheduled"
stock__gtintegerqueryMinimum stock count

The following filters can be applied via the request URL.

"filters": {
"sku": {
"type": "CharFilter",
"lookup_types": [
"exact"
]
},
"stock": {
"type": "NumberFilter",
"lookup_types": [
"gt",
"gte",
"lt",
"lte",
"exact"
]
},
"reserved_stock": {
"type": "NumberFilter",
"lookup_types": [
"gt",
"gte",
"lt",
"lte",
"exact"
]
},
"created_date": {
"type": "IsoDateTimeFilter",
"lookup_types": [
"gt",
"gte",
"lt",
"lte",
"exact"
]
},
"modified_date": {
"type": "IsoDateTimeFilter",
"lookup_types": [
"gt",
"gte",
"lt",
"lte",
"exact"
]
},
"is_active": {
"type": "BooleanFilter",
"lookup_types": [
"exact"
]
},
"period": {
"type": "IsoDateTimeFilter",
"lookup_types": [
"startswith__gte",
"startswith__lte",
"endswith__gte",
"endswith__lte"
]
},
"location": {
"type": "CharFilter",
"lookup_types": [
"exact"
]
},
"provider": {
"type": "CharFilter",
"lookup_types": [
"exact"
]
},
"location_name": {
"type": "CharFilter",
"lookup_types": [
"icontains"
]
},
"provider_name": {
"type": "CharFilter",
"lookup_types": [
"icontains"
]
},
"unit_type": {
"type": "ChoiceFilter",
"lookup_types": [
"exact"
]
},
"stock_type": {
"type": "ChoiceFilter",
"lookup_types": [
"exact"
]
}
}

Example Request

import requests

url = "https://{whippy_api_url}/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>"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload={}
headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token),
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Example Response (200 OK)

The response includes the following parameters.

ParameterData TypeDescription
idintegerThe primary key of the stock
skustringThe SKU of the product
providerstringThe name of the provider
locationintegerThe stock location ID
stockintegerThe number of existing stocks
perioddateThe stock period
unittypestringThe type of the stock unit
stock_typestringThe type of the stock
reserved_stockintegerReserved stock count
created_datedateThe creation date
modified_datedateThe last modified date
is_activebooleanThe activation status of the stock
{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"id": 2,
"created_date": "2023-05-10T13:37:18.209869+03:00",
"modified_date": "2023-05-10T13:37:18.210018+03:00",
"period": null,
"stock_type": "standard",
"unit_type": "qty",
"provider": "shop_provider",
"location": "110",
"stock": 5,
"is_active": true,
"sku": "555AB1300456213002",
"reserved_stock": 0
},
{
"id": 4,
"created_date": "2023-05-10T15:14:40.733472+03:00",
"modified_date": "2023-05-10T15:14:40.733504+03:00",
"period": null,
"stock_type": "standard",
"unit_type": "qty",
"provider": "shop_provider",
"location": "110",
"stock": 5,
"is_active": true,
"sku": "555AB1300456213003",
"reserved_stock": 0
},
{
"id": 6,
"created_date": "2023-05-10T15:15:03.254957+03:00",
"modified_date": "2023-05-10T15:15:03.254980+03:00",
"period": null,
"stock_type": "standard",
"unit_type": "qty",
"provider": "shop_provider",
"location": "110",
"stock": 5,
"is_active": true,
"sku": "555AB1300456213004",
"reserved_stock": 0
}
]
}

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.

ParameterData TypeInRequiredDescription
api_tokenstringheaderThe API key of the customer account
skustringqueryThe SKU of the product
locationstringqueryThe ID of the location
providerstringqueryThe ID of the provider
datedatequeryThe creation date of the stock

Example Request

import requests
import json

url = "https://{whippy_api_url}/api/v1/stocks/increase_reserved_stock/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps({
"sku": "555AB1300456213004",
"location": "110"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Token {}'.format(api_token)
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response (201 Created)

The response includes the following parameters.

ParameterData TypeDescription
idintegerThe primary key of the stock
skustringThe SKU of the product
providerstringThe name of the provider
locationintegerThe stock location ID
stockintegerThe number of existing stocks
perioddateThe stock period
unittypestringThe type of the stock unit
stock_typestringThe type of the stock
reserved_stockintegerReserved stock count
created_datedateThe creation date
modified_datedateThe last modified date
is_activebooleanThe activation status of the stock
{
"id": 6,
"created_date": "2023-05-10T15:15:03.254957+03:00",
"modified_date": "2023-05-10T17:16:02.653646+03:00",
"period": null,
"stock_type": "standard",
"unit_type": "qty",
"provider": "shop_provider",
"location": "110",
"stock": 5,
"is_active": true,
"sku": "555AB1300456213004",
"reserved_stock": 1
}

Example Response (400 Bad Request - 208 Already Reported)

HTTP 400
{
"sku": [
"This field is required."
],
"location": [
"This field is required."
]
}

HTTP 208
{
"message": "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.

ParameterData TypeInRequiredDescription
api_tokenstringheaderThe API key of the customer account
skustringqueryThe SKU of the product
locationstringqueryThe ID of the location
providerstringqueryThe ID of the provider
datedatequeryThe creation date of the stock

Example Request

import requests
import json

url = "https://{whippy_api_url}/api/v1/stocks/decrease_reserved_stock/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps({
"sku": "555AB1300456213004",
"location": "110"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Token {}'.format(api_token)
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response (201 Created)

The response includes the following parameters.

ParameterData TypeDescription
idintegerThe primary key of the stock location
skustringThe SKU of the product
providerstringThe name of the provider
locationintegerThe stock location ID
stockintegerThe number of existing stocks
perioddateThe stock period
unittypestringThe type of the stock unit
stock_typestringThe type of the stock
reserved_stockintegerReserved stock count
created_datedateThe creation date
modified_datedateThe last modified date
is_activebooleanThe activation status of the stock
{
"id": 6,
"created_date": "2023-05-10T15:15:03.254957+03:00",
"modified_date": "2023-05-10T17:55:05.904288+03:00",
"period": null,
"stock_type": "standard",
"unit_type": "qty",
"provider": "shop_provider",
"location": "110",
"stock": 3,
"is_active": true,
"sku": "555AB1300456213004",
"reserved_stock": 10
}

Example Response (400 Bad Request - 208 Already Reported)

HTTP 400
{
"sku": [
"This field is required."
],
"location": [
"This field is required."
]
}

HTTP 208
{
"message": "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.

ParameterData TypeInRequiredDescription
api_tokenstringheaderThe API key of the customer account
skustringqueryThe SKU of the product

Example Request

import requests
import json

url = "https://{whippy_api_url}/api/v1/stocks/stock_query/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps({
'sku': '500'
})

headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token),
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Example Response (200 OK)

The response includes the following parameters.

ParameterData TypeDescription
skustringThe SKU of the product
retail_store_codestringThe code of the retail store
retail_store_namestringThe name of the retail store
stockintegerThe number of the existing stock
{ 
"Store_checkResult": [
{
"sku": "500",
"retail_store_code": "110",
"retail_store_name": "110",
"stock": 5
},
{
"sku": "500",
"retail_store_code": "112",
"retail_store_name": "112",
"stock": 5
},
{
"sku": "500",
"retail_store_code": "115",
"retail_store_name": "115",
"stock": 5
},
{
"sku": "500",
"retail_store_code": "117",
"retail_store_name": "117",
"stock": 5
},
{
"sku": "500",
"retail_store_code": "119",
"retail_store_name": "119",
"stock": 5
}
]
}

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.

ParameterData TypeInRequiredDescription
api_tokenstringheaderThe API key of the customer account
skustringqueryThe SKU of the product

Example Request

import requests
import json

url = "https://{whippy_api_url}/api/v1/stocks/multi_stock_query/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps({
'sku': ['500','505']
})

headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token),
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

import requests
import json

url = "https://{whippy_api_url}/api/v1/stocks/multi_stock_query/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps({
'sku': ['500','505']
})

headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token),
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Example Response (200 OK)

The response includes the following parameters.

ParameterData TypeDescription
skustringThe SKU of the product
retail_store_codestringThe code of the retail store
retail_store_namestringThe name of the retail store
stockintegerThe number of the existing stock
{ 
"Store_checkResult": {
"500": [
{
"sku": "500",
"retail_store_code": "110",
"retail_store_name": "110",
"stock": 5
},
{
"sku": "500",
"retail_store_code": "112",
"retail_store_name": "112",
"stock": 5
},
{
"sku": "500",
"retail_store_code": "117",
"retail_store_name": "117",
"stock": 5
}
],
"505": [
{
"sku": "505",
"retail_store_code": "110",
"retail_store_name": "110",
"stock": 3
},
{
"sku": "505",
"retail_store_code": "112",
"retail_store_name": "112",
"stock": 3
},
{
"sku": "505",
"retail_store_code": "115",
"retail_store_name": "115",
"stock": 3
}
} ]
}

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.

ParameterData TypeInRequiredDescription
api_tokenstringheaderThe API key of the customer account
skustringqueryThe SKU of the product

Example Request

import requests
import json

url = "https://{whippy_api_url}/api/v1/stocks/multi_salable_stock_query/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps({
'sku': ['500','505']
})

headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token),
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Example Response (200 OK)

The response includes the following parameters.

ParameterData TypeDescription
skustringThe SKU of the product
retail_store_codestringThe code of the retail store
retail_store_namestringThe name of the retail store
stockintegerThe number of the existing stock
{ 
"Store_checkResult": {
"500": [
{
"sku": "500",
"retail_store_code": "110",
"retail_store_name": "110",
"stock": 5
},
{
"sku": "500",
"retail_store_code": "112",
"retail_store_name": "112",
"stock": 5
},
{
"sku": "500",
"retail_store_code": "117",
"retail_store_name": "117",
"stock": 5
}
],
"505": [
{
"sku": "505",
"retail_store_code": "110",
"retail_store_name": "110",
"stock": 3
},
{
"sku": "505",
"retail_store_code": "112",
"retail_store_name": "112",
"stock": 3
},
{
"sku": "505",
"retail_store_code": "115",
"retail_store_name": "115",
"stock": 3
}
]
}
}

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.

ParameterData TypeInRequiredDescription
api_tokenstringheaderThe API key of the customer account
skustringqueryThe SKU of the product

Example Request

import requests
import json

url = "https://{whippy_api_url}/api/v1/stocks/salable_stock_query/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps({
'sku': '500'
})

headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token),
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Example Response (200 OK)

The response includes the following parameters.

ParameterData TypeDescription
skustringThe SKU of the product
retail_store_codestringThe code of the retail store
retail_store_namestringThe name of the retail store
stockintegerThe number of the existing stock
{ 
"Store_checkResult": [
{
"sku": "500",
"retail_store_code": "110",
"retail_store_name": "110",
"stock": 5
},
{
"sku": "500",
"retail_store_code": "112",
"retail_store_name": "112",
"stock": 5
},
{
"sku": "500",
"retail_store_code": "115",
"retail_store_name": "115",
"stock": 5
},
{
"sku": "500",
"retail_store_code": "117",
"retail_store_name": "117",
"stock": 5
},
{
"sku": "500",
"retail_store_code": "119",
"retail_store_name": "119",
"stock": 5
}
]
}

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.

ParameterData TypeInRequiredDescription
api_tokenstringheaderThe API key of the customer account
skustringbodyThe SKU of the product
providerstringbodyThe name of the provider
locationstringbodyThe stock location
stockintegerbodyThe number of the existing stock for this product

Example Request

import requests
import json

url = "https://{whippy_api_url}/api/v1/stocks/insert_or_update_stock/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps([
{
"provider": "shop_provider",
"location": "stock_loc_1",
"stock": 5,
"sku": "500"
},
{
"provider": "shop_provider",
"location": "stock_loc_1",
"stock": 5,
"sku": "520"
},
{
"provider": "shop_provider",
"location": "stock_loc_1",
"stock": 5,
"sku": "540"
},
{
"provider": "shop_provider",
"location": "stock_loc_1",
"stock": 5,
"sku": "560"
])

headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token),
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Example Response (200 OK)

{ 
"Store_checkResult": {}
}

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.

ParameterData TypeInRequiredDescription
api_tokenstringheaderThe API key of the customer account
{stocklist_id}stringqueryThe ID of the stock list
skustringqueryThe SKU of the product

Example Request

import requests
import json

url = "https://{whippy_api_url}/api/v1/active-stocks/{stocklist_id}/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps({
"sku": "500"
})

headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token),
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response (200 OK)

The response includes the following parameters.

ParameterData TypeDescription
skustringThe SKU of the product
stockintegerThe number of the existing stock
{ 
"next": "https://{whippy_api_url}/api/v1/active-stocks/1/?page=2",
"previous": null,
"results": [
{
"sku": "100",
"stock": 5,
"extra_field": {
"locations": null
}
},
{
"sku": "300",
"stock": 5,
"extra_field": {
"locations": null
}
},
{
"sku": "500",
"stock": 5,
"extra_field": {
"locations": null
}
}
]
}

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.

ParameterData TypeInRequiredDescription
api_tokenstringheaderThe API key of the customer account
{stocklist_id}stringqueryThe ID of the stock list

Example Request

import requests
import json

url = "https://{whippy_api_url}/api/v1/active-stocks/{stocklist_id}/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token),
}

response = requests.request("POST", url, headers=headers)

print(response.text)

Example Response (200 OK)

The response includes the following parameters.

ParameterData TypeDescription
skustringThe SKU of the product
stockintegerThe number of the existing stock
{ 
"next": "https://{whippy_api_url}/api/v1/active-stocks/1/?page=2",
"previous": null,
"results": [
{
"sku": "100",
"stock": 5,
},
{
"sku": "300",
"stock": 5,
},
{
"sku": "500",
"stock": 5,
}
]
}