Knowledge Base > Find In Store Product Availability > API

API


Preliminaries


Our API endpoint is:

 https://bc-instore.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.


Operations


Bulk Upsert (Insert or Update)

POST https://bc-instore.myintegrator.com.au/api/store/{store_code}/products/bulk

Example Request (Body):

{
    "products": [
        {
            "sku": "OROT_11000475001",
            "stock": [
                {
                    "store_code": "403",
                    "quantity": 25
                },
                {
                    "store_code": "407",
                    "quantity": 2
                },
            ]
        },
        {
            "sku": "OROT_11000475001",
            "stock": [
                {
                    "store_code": "403",
                    "quantity": 25
                }
            ]
        }
    ]
}

Example Response:

{
    "data": {
        "records_affected": 1
    },
    "errors": {
        "products": [
             [
                 "store_code.bad_cat not found"
             ]
        ]
    }
}

There are some additional fields for products that can be leveraged as below (although, optional to send across).

  • "zero_threshold" → 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"

Bulk Delete

DELETE https://bc-instore.myintegrator.com.au/api/store/{store_code}/products/bulk

Will delete all the product inventory data for all the products. Same behavior 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):

{
    "store_code": "403"
}

Example Response:

{
    "data": [],
    "message": "",
    "success": true
}

Did you find this article useful?