Stock Locations
A stock provider may have stock areas located in multiple locations. In order to match these stock locations with the respective stock provider, they need to be defined in Whippy Ware. The brand needs to assign a unique value to each stock location and ensuring that these values are defined both within their own system and in Whippy Ware.
List Locations
This method is used to get a list of location objects.
GET
List-Locations
Path: /api/v1/stock-locations/
Parameters
The following parameters can be used to get a list of location 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 location
name
string
The name of the stock location
code
string
The code of the stock location
provider
integer
The provider ID
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the stock location
Location Instance
This method is used to get the details of the location object with the specified location ID.
GET
Location-Instance
Path: /api/v1/stock-locations/{location_id}/
Parameters
The following parameters can be used to get the details of the location objects.
api_token
string
header
The API key of the customer account
{location_id}
string
query
The ID number of the location
Example Request
Example Response (200 OK)
The response includes the following parameters.
id
integer
The primary key of the stock location
name
string
The name of the stock location
code
string
The code of the stock location
provider
integer
The stock provider ID
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the stock location
Create Location
This method is used to create a location object with the request body.
POST
Create-Location
Path: /api/v1/stock-locations/
Parameters
The following parameters can be used to create a location object.
api_token
string
header
✓
The API key of the customer account
name
string
body
✓
The name of the stock location
code
string
body
✓
The code of the stock location
provider
integer
body
✓
The stock provider ID
Example Request
Example Response (201 Created)
The response includes the following parameters.
id
integer
The primary key of the stock location
name
string
The name of the stock location
code
string
The code of the stock location
provider
integer
The stock provider ID
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the stock location
Example Response (400 Bad Request)
Search Locations
This method is used to search location objects with the specified filters.
GET
Search-Locations
Path: /api/v1/stock-locations/?code__icontains=<string>&code=<string>&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>&name=<string>&provider=<string>&provider_name=<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
name
string
query
The name of the stock location
code
string
query
The code of the stock location
provider
string
query
The stock provider ID
provider_name
string
query
The name of the provider
created_date
date
query
The creation date
modified_date
date
query
The last modified date
is_active
boolean
query
The activation status of the stock location
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 location
name
string
The name of the stock location
code
string
The code of the stock location
provider
integer
The stock provider ID
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the stock location
Location Partial Update
This method is used to partially update the specified location object with PATCH request.
PATCH
Location-Partial-Update
Path: /api/v1/stock-locations/{stocklocation_id}/
Parameters
The following parameters can be used to partially update the location object.
api_token
string
header
The API key of the customer account
{stocklocation_id}
string
query
The ID number of the stock location
Example Request
Example Response (200 OK)
The response includes the following parameters.
id
integer
The primary key of the stock location
name
string
The name of the stock location
code
string
The code of the stock location
provider
integer
The stock provider ID
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the stock location
Example Response (400 Bad Request)
Location Full Update
This method is used to update all fields of the specified location object with PUT request.
PUT
Location-Full-Update
Path: /api/v1/stock-locations/{stocklocation_id}/
Parameters
The following parameters can be used to full update the location object.
api_token
string
header
The API key of the customer account
{stocklocation_id}
string
query
The ID number of the stock location
Example Request
Example Response (200 OK)
The response includes the following parameters.
id
integer
The primary key of the stock location
name
string
The name of the stock location
code
string
The code of the stock location
provider
integer
The stock provider ID
created_date
date
The creation date
modified_date
date
The last modified date
is_active
boolean
The activation status of the stock location
Example Response (400 Bad Request)
Last updated
Was this helpful?