Preliminaries
Our API endpoint is:
https://bc-wh.myintegrator.com.au/api/store/{store_code}
The {store_code} is your store’s hash code. Found at the top of General settings.
You must supply a Bearer token. The token can be found in the Advanced settings.
There are no limitations as of now. It can take some time to push thousands of products.
Curl example:
curl -L --request GET \
--url 'https://bc-wh.myintegrator.com.au/api/store/{Your Store Hash}/products/?page=1' \
--header 'Authorization: Bearer {Store API Token Secret}'
Operations
Get Products (100 product per page)
GET https://bc-wh.myintegrator.com.au/api/store/{store_code}/products/?page=1
Bulk Upsert (Insert or Update) Products
POST https://bc-wh.myintegrator.com.au/api/store/{store_code}/products/bulk
Example Request (Body):
{
"products": [
{
"sku": "ABC001",
"stock": [
{
"location_code": "MELBOURNE",
"quantity": 10,
"zero_threshold": 5, // optional
"low_threshold": 10, // optional
"zero_message": "Stock unavailable until Jan 1st, 2022", // optional
"low_message": "Please contact store" // optional
"stock_message": "Stock in Shelf A" // optional
},
{
"location_code": "SYDNEY",
"quantity": 20
}
]
},
{
"sku": "BCE001",
"stock": [
{
"location_code": "TOKYO",
"quantity": 5
}
]
}
]
}
Example Response:
{
"data": {
"records_affected": 1
},
"errors": {
"products": [
[
"location_code.TOKYO not found"
]
]
}
}
There are some additional fields for products that can be leveraged as below (although, optional to send across).
- “zero_threshold” (optional) → the threshold in which the stock item is considered “Out of Stock”
- “low_threshold” (optional) → the threshold in which the stock item is considered “Low Stock, Contact Store”
- “zero_message” (optional) → the custom message in which the stock item is considered “Out of Stock”
- “low_message” (optional) → the custom message in which the stock item is considered “Low Stock, Contact Store”
- “stock_message” (optional) → the custom message in which the stock item is considered “In Stock”
Bulk Delete Products
DELETE https://bc-wh.myintegrator.com.au/api/store/{store_code}/products/bulk
Will delete all the product inventory data for all the products. Same behaviour has “Delete All Products” in the Products tab.
You can delete by specific location by specifying the store_code in the request.
Example Request (Body):
{
"data": [],
"message": "",
"success": true
}
Example Response:
{
"location_code": "PERTH"
}
Bulk Delete Products (V2):
DELETE https://bc-wh.myintegrator.com.au/api/store/{store_code}/products/bulk/v2
Will delete products specified by sku and location_code.
If location_code is set, only delete the SKU for the specific locations, otherwise delete the sku from all locations.
Example Request (Body):
{
"products": [
{
"sku": "ABC001",
"stock": [ // Delete "ABC001" from "PERTH" and "SYDNEY" only
{ "location_code": "PERTH" },
{ "location_code": "SYDNEY" }
]
},
{
"sku": "BCE001" // Will delete from all locations
}
]
}
Example Response:
{
"data": {
"records_affected": 2
},
"errors": {
"products": [
[
"(sku.ABC001) location_code.PERTH not found"
]
]
}
}
Bulk Upsert (Insert or Update) Locations
POST https://bc-wh.myintegrator.com.au/api/store/{store_code}/locations/bulk
Will create/update locations specified by location_code.
If location_code exists, the data will be overwritten.
Example Request (Body):
{
"locations": [
{
"location_code": "MEL",
"location_name": "Melbourne",
"address": "22 Albert Road, South Melbourne VIC, Australia",
"address_street": "22 Albert Road",
"address_city": "South Melbourne",
"address_country": "AU",
"address_state": "Victoria",
"address_postcode": "3205",
"hidden": false,
"email": "account@domain.com",
"phone": "0390050823",
"notes": "Checkout page information here",
"mapping": "Melbourne, Victoria, 3205",
"zones": [
{
"label": "Australia : Victoria",
"value": "Victoria"
}
],
"lat": -37.8331939,
"lng": 144.971364
}
]
}
Example Response:
{
"data": {
"records_affected": 1
},
"errors": {
"locations": []
}
}
Bulk Delete Locations
DELETE https://bc-wh.myintegrator.com.au/api/store/{store_code}/locations/bulk
Will delete locations specified by location_code.
Example Request (Body):
{
"locations": [
{
"location_code": "MEL"
},
{
"location_code": "SYD"
}
]
}
Example Response:
{
"data": {
"records_affected": 1
},
"errors": {
"locations": {
"SYD": "location code not found"
}
}
}