LogoLogo
  • Welcome to Akinon Documentation
  • Products
    • ACC
    • Omnitron
    • Commerce
    • Order Management System (OMS)
    • Instore
    • Integrator
    • Marketplace Dashboard (MPD)
    • Project Zero (PZ)
    • Seller Center
    • Akifast
    • App Maker
  • API Reference
    • Welcome to Akinon API Reference
  • Omnitron
    • Getting Started
    • Integration
      • Product
        • Product
        • Pre-Product
        • Attribute
        • Attribute Value
        • Attribute Set
        • Product Image
      • Price
        • Price List
        • Product Price
        • Currency Unit Table
      • Stock
        • Stock List
        • Product Stock
      • Order
        • Get Orders
        • Search Order
        • Get Order Detail by Order Number
        • Get Order Item Detail
        • Orders ID Detail Integration
        • Orders Waiting to Send to ERP
        • Update Order and Order Item
        • Stock Reservation Release
        • Order Cancellation
        • Cancellation & Refund Pending Orders
        • Order Discount Items
        • Order Status Codes & Cancellation Statuses
      • Migration
        • Getting Started
        • User Migration
        • Address Migration
        • Old Order Migration
        • Old Order Item Migration
        • View Migration Progress
        • Currency Options
    • PIM
      • Attributes & Sets
      • Mapping
      • Localization
      • Media
    • Catalogue
      • Introduction
      • Price List
      • Stock List
      • Catalogue Item
      • Category Trees
      • Product Collection
      • Product Sorting
    • Channels
      • Introduction
      • Payments
      • Customers
    • Order
      • Getting Started
      • Fulfillment
      • Cancellations & Refunds
    • Retail Stores
      • Retail Stores
    • User Management
      • Roles & Permissions
      • Add & Remove
    • Whippy Ware
      • Introduction
      • Stock
      • Stock Lists
      • Stock List Rules
      • Stock Providers
      • Stock Locations
  • Omnitron OpenAPIs
    • Without Server
      • Customers
      • Reporting
      • Deleted Items
      • Pos
      • AttributeValues
      • Attribute Values
      • Providers
      • LDAPProviders
      • Healthcheck
      • LoyaltyTransactions
      • Policies
      • Exports
      • Dashboard
      • AuthTOTP
      • Price Lists
      • ProductPrices
      • Districts
      • Cities
      • Countries
      • Townships
      • PrometheusMetrics
      • Language
      • Content Types
      • Mappings
      • Applications
      • ApplicationPermissions
      • Error Reports
      • MailTemplates
      • UploadLogo
      • SalesChannelMarketPlaceAttributeSetConfig
      • SalesChannelCancellationRequestImage
      • SalesChannelCities
      • SalesChannelCancellationReasons
      • SalesChannelCargoCompany
      • SalesChannelProductImage
      • SalesChannelAttributeConfig
      • SalesChannelAttributeValueConfig
      • SalesChannelTownships
      • SalesChannelCustomers
      • SalesChannelFailedIntegrations
      • SalesChannelGetStockList
      • SalesChannelRetailStore
      • IntegrationActions
      • SalesChannelOrderShippingInfo
      • SalesChannelBatchRequests
      • SalesChannelAddresses
      • SalesChannelMarketPlaceAttributeSet
      • SalesChannelErrorReports
      • SalesChannelCategoryNodes
      • SalesChannelDistricts
      • SalesChannelProductStock
      • SalesChannelExtraProductStock
      • SalesChannelOrders
      • SalesChannelCancellationPlans
      • SalesChannelExtraProductPrices
      • SalesChannelProduct
      • SalesChannelAttributeSchemas
      • SalesChannelProductCategories
      • SalesChannelCancellationRequests
      • SalesChannelMarketPlaceAttributeValue
      • SalesChannelMappedProduct
      • SalesChannelMarketPlaceAttribute
      • SalesChannelOrderItem
      • SalesChannelProductPrice
      • SalesChannelCreateOrder
      • GetPriceList
      • SalesChannelCountries
      • SalesChannelGetPriceList
      • SalesChannelCategoryTree
    • With Server
      • Customers
      • Reporting
      • Deleted Items
      • Pos
      • AttributeValues
      • Attribute Values
      • Providers
      • LDAPProviders
      • Healthcheck
      • LoyaltyTransactions
      • Policies
      • Exports
      • Dashboard
      • AuthTOTP
      • Price Lists
      • ProductPrices
      • Districts
      • Cities
      • Countries
      • Townships
      • PrometheusMetrics
      • Language
      • Mappings
      • Content Types
      • Applications
      • ApplicationPermissions
      • Error Reports
      • MailTemplates
      • UploadLogo
      • SalesChannelMarketPlaceAttributeSetConfig
      • SalesChannelCancellationRequestImage
      • SalesChannelCities
      • SalesChannelCancellationReasons
      • SalesChannelCargoCompany
      • SalesChannelProductImage
      • SalesChannelAttributeConfig
      • SalesChannelAttributeValueConfig
      • SalesChannelTownships
      • SalesChannelCustomers
      • SalesChannelFailedIntegrations
      • SalesChannelGetStockList
      • IntegrationActions
      • SalesChannelRetailStore
      • SalesChannelOrderShippingInfo
      • SalesChannelBatchRequests
      • SalesChannelAddresses
      • SalesChannelMarketPlaceAttributeSet
      • SalesChannelErrorReports
      • SalesChannelDistricts
      • SalesChannelCategoryNodes
      • SalesChannelProductStock
      • SalesChannelExtraProductStock
      • SalesChannelCountries
      • SalesChannelOrders
      • SalesChannelProduct
      • SalesChannelCancellationPlans
      • SalesChannelExtraProductPrices
      • SalesChannelProductCategories
      • SalesChannelAttributeSchemas
      • SalesChannelCancellationRequests
      • SalesChannelMarketPlaceAttributeValue
      • SalesChannelMappedProduct
      • SalesChannelMarketPlaceAttribute
      • SalesChannelOrderItem
      • SalesChannelProductPrice
      • SalesChannelCreateOrder
      • GetPriceList
      • SalesChannelGetPriceList
      • SalesChannelCategoryTree
  • Commerce
    • Users
      • Getting Started
      • User Management & Authentication
      • Password & OTP Operations
      • User Profile & Segment Management
      • User Payment & Card Management
      • User Orders & Cancellations
      • Anonymous User Orders & Cancellations
      • User Support & Conversation
      • Captcha Validation
      • Currency & Akifast Operations
    • Checkout
      • Payment Related
      • Payment Strategy Related
      • Shipping Related
      • Independent Pages
    • Product
    • User Collections
    • Basket
    • Discount
    • Autocomplete
    • Breadcrumb
    • Pretty URLs
    • Menu
    • Widgets
    • Loyalty Accounts
    • Address Migration
    • Index Configuration
    • Favourite Products
    • User Address
    • Data Warehouse
    • Introduction
      • Filtering Parameters
    • Data Warehouse
    • Default
  • OMS
    • Package Services
    • Package Item Services
    • Package Denial Reason Services
    • Order Services
    • Order Item Services
    • Transfer Order Services
    • Transfer Item Services
    • Channel Services
    • Cancellation Plan Services
    • Cancellation Reason Services
    • Address Setup Services
    • City Services
    • District Services
    • Township Services
    • Stock Location Address Services
    • Webhook Setup Services
    • Webhook Event Services
    • Omnitron Order Webhooks
    • Undelivered Webhook Event Services
    • Inventory Discrepancy Services
    • OMS Setup Services
    • UI Settings Services
    • OMS Audit Events Service
    • Customer Address Services
    • Application Settings Services
    • Content Type Services
    • Customer Services
    • Channel Setup Services
    • Demo Data Service
    • Order Execution Plan Services
    • Invoice Services
    • Localization Services
    • Action Log Services
    • Order Log Services
    • Celery Metrics Service
    • Stock Location Services
    • Stock Location Address Services
    • Stock Location Sender Address Services
    • Stock Location Sender Address Setup Services
    • Cargo Company Condition Services
    • Permission Group Services
  • OMS OpenAPIs
    • Package Services
      • Default
    • Transfer Order Services
      • Default
  • Instore
    • Password Reset Services
  • Integrator
    • Projects
    • Flows
    • Logs
  • Seller Center
    • Languages
    • Categories
    • Introduction
    • Products
    • Packages
    • Orders
    • Claims
    • Shipping Methods
  • Akifast
    • Authentication
  • B2B
    • Quotation
    • Basket
    • Division
    • User
    • Staff User
    • Groups
    • Notification
    • Notification Template
  • Flows
    • Shipment Flows
    • Payment Flows
    • SMS Flows
    • Basket Offer Flows
Powered by GitBook

© 2025 Akinon. All rights reserved.

On this page
  • List Stock​
  • Create Stock​
  • Search Stocks​
  • Increase Reserved Stock​
  • Decrease Reserved Stock​
  • Stock Query​
  • Multi Stock Query​
  • Multi Salable Stock Query​
  • Salable Stock Query​
  • Insert/Update Single/Multiple Stock​
  • List Active Stock​

Was this helpful?

  1. Omnitron
  2. Whippy Ware

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.

Parameter
Data Type
In
Description

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​

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.

Parameter
Data Type
Description

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

{
   "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.

Parameter
Data Type
In
Required
Description

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​

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.

Parameter
Data Type
Description

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

{
   "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.

Parameter
Data Type
In
Description

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.

"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.

Parameter
Data Type
Description

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

{
   "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.

Parameter
Data Type
In
Required
Description

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​

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.

Parameter
Data Type
Description

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

{
   "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.

Parameter
Data Type
In
Required
Description

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​

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.

Parameter
Data Type
Description

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

{
   "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.

Parameter
Data Type
In
Required
Description

api_token

string

header

✓

The API key of the customer account

sku

string

query

✓

The 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.

Parameter
Data Type
Description

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

{ 
"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.

Parameter
Data Type
In
Required
Description

api_token

string

header

✓

The API key of the customer account

sku

string

query

✓

The 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.

Parameter
Data Type
Description

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

{ 
  "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.

Parameter
Data Type
In
Required
Description

api_token

string

header

✓

The API key of the customer account

sku

string

query

✓

The 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.

Parameter
Data Type
Description

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

{ 
  "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.

Parameter
Data Type
In
Required
Description

api_token

string

header

✓

The API key of the customer account

sku

string

query

✓

The 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.

Parameter
Data Type
Description

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

{ 
  "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.

Parameter
Data Type
In
Required
Description

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​

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)
{ 
    "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.

Parameter
Data Type
In
Required
Description

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​

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.

Parameter
Data Type
Description

sku

string

The SKU of the product

stock

integer

The 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.

Parameter
Data Type
In
Required
Description

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​

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.

Parameter
Data Type
Description

sku

string

The SKU of the product

stock

integer

The 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, 
         } 
    ] 
}
PreviousIntroductionNextStock Lists

Last updated 16 days ago

Was this helpful?

Example Response (200 OK)

​