Products

Working with products.

Create Product

POST /v1/products/variations

Creates a product.

Request Body

CreateProduct

Return Type

ProductVariations

Types for the Request Body

CreateProduct (root level)

KeyDescriptionTypesRestrictions
skuThe product’s Stock Keeping Unit.stringrequired
not null
match is /^[a-z0-9\-_.]{2,}$/i
nameThe product’s name.stringrequired
not null
min length is 3
barcodeThe product barcode.stringrequired
not null
match is /^\d{3,20}$/
brandProduct brand id.integerrequired
not null
min is 1
channelProduct channel id.integerrequired
not null
min is 1
new_componentComponent data. Required when creating a new warehouse product. It can’t appear in the payload along with existing_components.NewComponentoptionally required
not null
existing_componentsComponents to use. Required when creating a new virtual product. It can’t appear in the payload along with new_component.array<ExistingComponent>optionally required
not null
min count is 1

Doq

KeyDescriptionTypesRestrictions
lengthLength in MM.integerrequired
not null
min is 1
widthWidth in MM.integerrequired
not null
min is 1
heightHeight in MM.integerrequired
not null
min is 1
weightWeight in KG.numberrequired
not null
min is 0.001
quantityQuantity.integerrequired
not null
min is 1
typeShort code for the DOQ.enum(INNER_PACK, MASTER_CASE, PALLET, SINGLE_PRODUCT)required
not null
shippableIs this a shippable item?booleanrequired
not null
barcodeBarcode.stringnot null
match is /^[0-9]{6,}$/

ExistingComponent

KeyDescriptionTypesRestrictions
idThe product component ID.integerrequired
not null
min is 1
quantityThe quantity required to build the virtual product.integerrequired
not null
min is 1

NewComponent

KeyDescriptionTypesRestrictions
perishableIs the product perishable?booleanrequired
not null
organicIs the product organic?booleanrequired
not null
dangerousIs the product dangerous?booleannot null
dutiableIs the product dutiable?booleannot null
hygieneIs the product for hygiene?booleannot null
batteryDoes the product have battery?booleannot null
fragileIs the product fragile?booleannot null
what_is_itPart of customs details: What is the product?stringrequired
not null
min length is 1
made_ofPart of customs details: What is the product made of?stringrequired
not null
min length is 1
used_forPart of customs details: What is the product used for?stringrequired
not null
min length is 1
customs_country_of_origin_countryThe ISO2 or ISO3 code or the ID of the country of origin.string
or integer
required
not null
if type is string, then min length is 1
if type is string, then max length is 3
if type is integer, then min is 1
product_component_customs_code_idCustoms code ID.integerrequired
not null
min is 1
part_numberManufacturer or supplier part number for the product.stringmax length is 200
doqsList of product DOQs.array<Doq>required
not null
min count is 1
batch_codes_enabledEnable batch codes?string

Available expands

FieldReturn TypeDescription
componentsarray<ProductVariationComponents>Variation component.
components.instanceProductComponentInstancesComponent instance.
components.instance.componentProductComponentsProduct component.
components.instance.component.doqsarray<ProductComponentDoqs>Product component DOQ.
components.instance.component.doqs.typeProductComponentDoqTypesProduct component DOQ Types.
descriptionsarray<ProductVariationDescriptions>Variation descriptions.
descriptions.localeLocalesLocale data.
primary_componentarray<ProductComponents>Product component.
productProductsProduct data. Products are grouping entries and may represent multiple different kinds of physical products.
product.brandProductBrandsProduct brand data.
product.brand.organisationOrganisationsOrganisation data.
product.channelProductChannelsGeographical region data.
product.channel.organisationOrganisationsOrganisation data.
stock_data_summariesarray<ProductVariationStockDataSummary>Variation stock breakdown.
tagsarray<Tags>A tag.
typeProductVariationTypesProduct variation type data.

Rate limit cost

Each call to this endpoint deducts 2 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::MANAGE.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("POST", "https://public-api.bladepro.io/v1/products/variations?expand=*", [
    "body" => json_encode([
        "sku" => "RED-BIKE-01A",
        "name" => "Red bike",
        "barcode" => "0793573679000",
        "brand" => 1,
        "channel" => 1,
        "new_component" => [
            "perishable" => true,
            "organic" => true,
            "dangerous" => true,
            "dutiable" => true,
            "hygiene" => true,
            "battery" => true,
            "fragile" => true,
            "what_is_it" => "Bicycle.",
            "made_of" => "metal, rubber, plastic",
            "used_for" => "sports",
            "customs_country_of_origin_country" => "GBR",
            "product_component_customs_code_id" => 1,
            "part_number" => "ABC123",
            "doqs" => [
                [
                    "length" => 2500,
                    "width" => 1000,
                    "height" => 4500,
                    "weight" => 1.45,
                    "quantity" => 10,
                    "type" => "INNER_PACK",
                    "shippable" => true,
                    "barcode" => "0793573679000",
                ],
            ],
            "batch_codes_enabled" => "enabled",
        ],
    ]),
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.post 'https://public-api.bladepro.io/v1/products/variations?expand=*', {
  sku: "RED-BIKE-01A",
  name: "Red bike",
  barcode: "0793573679000",
  brand: 1,
  channel: 1,
  new_component: {
    perishable: true,
    organic: true,
    dangerous: true,
    dutiable: true,
    hygiene: true,
    battery: true,
    fragile: true,
    what_is_it: "Bicycle.",
    made_of: "metal, rubber, plastic",
    used_for: "sports",
    customs_country_of_origin_country: "GBR",
    product_component_customs_code_id: 1,
    part_number: "ABC123",
    doqs: [
      {
        length: 2500,
        width: 1000,
        height: 4500,
        weight: 1.45,
        quantity: 10,
        type: "INNER_PACK",
        shippable: true,
        barcode: "0793573679000",
      },
    ],
    batch_codes_enabled: "enabled",
  },
}, {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "POST",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations?expand=*",
    body: {
        "sku": "RED-BIKE-01A",
        "name": "Red bike",
        "barcode": "0793573679000",
        "brand": 1,
        "channel": 1,
        "new_component": {
            "perishable": false,
            "organic": false,
            "dangerous": false,
            "dutiable": false,
            "hygiene": false,
            "battery": false,
            "fragile": false,
            "what_is_it": "Bicycle.",
            "made_of": "metal, rubber, plastic",
            "used_for": "sports",
            "customs_country_of_origin_country": "GBR",
            "product_component_customs_code_id": 1,
            "part_number": "ABC123",
            "doqs": [
                {
                    "length": 2500,
                    "width": 1000,
                    "height": 4500,
                    "weight": 1.45,
                    "quantity": 10,
                    "type": "INNER_PACK",
                    "shippable": true,
                    "barcode": "0793573679000"
                }
            ],
            "batch_codes_enabled": "enabled"
        }
    },
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request POST 'https://public-api.bladepro.io/v1/products/variations?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "sku": "RED-BIKE-01A",
    "name": "Red bike",
    "barcode": "0793573679000",
    "brand": 1,
    "channel": 1,
    "new_component": {
        "perishable": false,
        "organic": false,
        "dangerous": false,
        "dutiable": false,
        "hygiene": false,
        "battery": false,
        "fragile": false,
        "what_is_it": "Bicycle.",
        "made_of": "metal, rubber, plastic",
        "used_for": "sports",
        "customs_country_of_origin_country": "GBR",
        "product_component_customs_code_id": 1,
        "part_number": "ABC123",
        "doqs": [
            {
                "length": 2500,
                "width": 1000,
                "height": 4500,
                "weight": 1.45,
                "quantity": 10,
                "type": "INNER_PACK",
                "shippable": true,
                "barcode": "0793573679000"
            }
        ],
        "batch_codes_enabled": "enabled"
    }
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 1,
        "product_id": 1,
        "status": "active",
        "sku": "DEMO-SKU-01",
        "barcode": "0123456789012",
        "product_variation_type_id": 1,
        "discontinued_date": "2019-11-25T14:52:56.000Z",
        "despatch_instructions": "Always pack facing upwards.",
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z",
        "product": {
            "id": 1,
            "product_channel_id": 1,
            "product_brand_id": 1,
            "product_category_id": 1,
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z",
            "channel": {
                "id": 1,
                "organisation_id": 1,
                "status": "active",
                "outbound_email": "someone@example.com",
                "default_warehouse_id": 1,
                "default_product_brand_id": 1,
                "global": false,
                "name": "Demo Channel",
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "organisation": {
                    "id": 1,
                    "name": "Demo",
                    "active": true,
                    "vat_number": "GB999 9999 73",
                    "notes": "Demo account...",
                    "contact_name": "Mr Joe Bloggs",
                    "contact_phone": "+44 01425 000 000",
                    "contact_mobile": "+44 00000000",
                    "contact_email": "joe.bloggs@example.com",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z"
                }
            },
            "brand": {
                "id": 1,
                "name": "Demo Brand",
                "organisation_id": 1,
                "active": true,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "organisation": {
                    "id": 1,
                    "name": "Demo",
                    "active": true,
                    "vat_number": "GB999 9999 73",
                    "notes": "Demo account...",
                    "contact_name": "Mr Joe Bloggs",
                    "contact_phone": "+44 01425 000 000",
                    "contact_mobile": "+44 00000000",
                    "contact_email": "joe.bloggs@example.com",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z"
                }
            }
        },
        "type": {
            "id": 1,
            "name": "Standard Product",
            "type": "product",
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z"
        },
        "components": [
            {
                "product_variation_id": 1,
                "product_component_instance_id": 1,
                "quantity": 1,
                "instance": {
                    "id": 1,
                    "product_component_id": 1,
                    "component": {
                        "id": 1,
                        "status": "active",
                        "sku": "DEMO-SKU-01",
                        "barcode": "123123123000",
                        "perishable": false,
                        "fragile": false,
                        "battery": false,
                        "dangerous": false,
                        "organic": false,
                        "what_is_it": "Tape measure.",
                        "made_of": "Synthetic rubber & Polyvinyl chloride",
                        "used_for": "A tool for measuring distances.",
                        "customs_country_of_origin_country_id": 1,
                        "product_component_customs_code_id": 1,
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z",
                        "count_product_component_batches": 1,
                        "batch_codes_enabled": "enabled"
                    }
                }
            }
        ],
        "descriptions": [
            {
                "id": 1,
                "product_variation_id": 1,
                "locale_id": 1,
                "name": "Example product",
                "full_description": "Example product description",
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "locale": {
                    "id": 1,
                    "name": "English",
                    "code": "en",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z"
                }
            }
        ],
        "primary_component": [
            {
                "id": 1,
                "status": "active",
                "sku": "DEMO-SKU-01",
                "barcode": "123123123000",
                "perishable": false,
                "fragile": false,
                "battery": false,
                "dangerous": false,
                "organic": false,
                "what_is_it": "Tape measure.",
                "made_of": "Synthetic rubber & Polyvinyl chloride",
                "used_for": "A tool for measuring distances.",
                "customs_country_of_origin_country_id": 1,
                "product_component_customs_code_id": 1,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "count_product_component_batches": 1,
                "batch_codes_enabled": "enabled"
            }
        ],
        "tags": [
            {
                "id": 1,
                "name": "Processed",
                "shortcode": "PROCESSED",
                "description": "Marked a as processed by XYZ system",
                "created": "2019-11-25T14:52:56.000Z"
            }
        ],
        "stock_data_summaries": [
            {
                "product_variation_id": 1,
                "warehouse_id": 1,
                "warehouse_code": "CHR",
                "warehouse_name": "Christchurch",
                "total": 156,
                "total_saleable": 140,
                "saleable": 134,
                "available": 121,
                "allocated": 10,
                "misc": 34,
                "expected": 100,
                "under_investigation": 1
            }
        ]
    }
}

List Product Variations

GET /v1/products/variations

Get a list of product variations. Please note that all expands will be applied automatically.

Return Type

array<CachedProductVariation>

Filters

FieldOperatorsValue List URL
searchLIKEfuzzy search across selected attributes
idEQUALS, IN
product.channel.idIN, NOT_IN
tags.shortcodeIN, NOT_IN
statusIN, NOT_IN
skuEQUALS, IN
type.idIN
is_primaryEQUALS
order_channel_idIN/v1/orders/channels

Sortings

Results can be sorted by the following keys: created, product.channel.name, sku, status.

Available expands

FieldReturn TypeDescription
componentsarray<CachedProductVariationComponent>Variation component.
createdCachedProductVariationCreatedVariation specific data.
descriptionsarray<CachedProductVariationDescription>Variation descriptions.
descriptions.localeSummarisedLocaleLocale / Language.
primary_product_categorySummarisedProductCategorySummary of a product category.
productCachedProductTop level product data.
product.channelCachedProductChannelCached product channel.
product.channel.organisationCachedProductChannelOrganisationTop level product data.
tagsarray<SummarisedTag>A tag.
typeSummarisedProductVariationTypeTop level product data.

Rate limit cost

Each call to this endpoint deducts 1 credit from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::READ.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/products/variations?expand=*", [
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.get 'https://public-api.bladepro.io/v1/products/variations?expand=*', {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "GET",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations?expand=*",
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request GET 'https://public-api.bladepro.io/v1/products/variations?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86",
        "paging": {
            "page": 1,
            "records": 1,
            "per_page": 250,
            "total_records": 1,
            "total_pages": 1
        }
    },
    "data": [
        {
            "id": 1,
            "sku": "DEMO-SKU-01",
            "name": "Example product",
            "is_primary": false,
            "status": "active",
            "created": {},
            "product": {
                "id": 1,
                "channel": {
                    "id": 1,
                    "name": "Demo Channel",
                    "default_warehouse_id": 1,
                    "global": false,
                    "organisation": {
                        "id": 1,
                        "name": "Demo Organisation"
                    }
                }
            },
            "tags": [
                {
                    "name": "Processed",
                    "shortcode": "processed",
                    "description": "Processed by a 3rd party system"
                }
            ],
            "descriptions": [
                {
                    "id": 1,
                    "product_variation_id": 1,
                    "locale_id": 1,
                    "name": "Example Product",
                    "full_description": "Example product description",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z",
                    "locale": {
                        "id": 1,
                        "name": "English",
                        "code": "en",
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z"
                    }
                }
            ],
            "components": [
                {
                    "id": 1,
                    "sku": "DEMO-SKU-01",
                    "name": "Example Product",
                    "barcode": 1234567891020,
                    "quantity": 1
                }
            ],
            "type": {
                "id": 1,
                "name": "Standard Product",
                "type": "product"
            },
            "primary_product_category": {
                "id": 4,
                "name": "Bicycles"
            }
        }
    ]
}

View Product Variation

GET /v1/products/variations/:id

View a single product variation.

Parameter Regular Expressions

  • :id: [1-9][0-9]{0,}

Return Type

ProductVariations

Available expands

FieldReturn TypeDescription
componentsarray<ProductVariationComponents>Variation component.
components.instanceProductComponentInstancesComponent instance.
components.instance.componentProductComponentsProduct component.
components.instance.component.doqsarray<ProductComponentDoqs>Product component DOQ.
components.instance.component.doqs.typeProductComponentDoqTypesProduct component DOQ Types.
descriptionsarray<ProductVariationDescriptions>Variation descriptions.
descriptions.localeLocalesLocale data.
primary_componentarray<ProductComponents>Product component.
productProductsProduct data. Products are grouping entries and may represent multiple different kinds of physical products.
product.brandProductBrandsProduct brand data.
product.brand.organisationOrganisationsOrganisation data.
product.channelProductChannelsGeographical region data.
product.channel.organisationOrganisationsOrganisation data.
stock_data_summariesarray<ProductVariationStockDataSummary>Variation stock breakdown.
tagsarray<Tags>A tag.
typeProductVariationTypesProduct variation type data.

Rate limit cost

Each call to this endpoint deducts 15 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::READ.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/products/variations/:id?expand=*", [
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.get 'https://public-api.bladepro.io/v1/products/variations/:id?expand=*', {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "GET",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/:id?expand=*",
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request GET 'https://public-api.bladepro.io/v1/products/variations/:id?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 1,
        "product_id": 1,
        "status": "active",
        "sku": "DEMO-SKU-01",
        "barcode": "0123456789012",
        "product_variation_type_id": 1,
        "discontinued_date": "2019-11-25T14:52:56.000Z",
        "despatch_instructions": "Always pack facing upwards.",
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z",
        "product": {
            "id": 1,
            "product_channel_id": 1,
            "product_brand_id": 1,
            "product_category_id": 1,
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z",
            "channel": {
                "id": 1,
                "organisation_id": 1,
                "status": "active",
                "outbound_email": "someone@example.com",
                "default_warehouse_id": 1,
                "default_product_brand_id": 1,
                "global": false,
                "name": "Demo Channel",
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "organisation": {
                    "id": 1,
                    "name": "Demo",
                    "active": true,
                    "vat_number": "GB999 9999 73",
                    "notes": "Demo account...",
                    "contact_name": "Mr Joe Bloggs",
                    "contact_phone": "+44 01425 000 000",
                    "contact_mobile": "+44 00000000",
                    "contact_email": "joe.bloggs@example.com",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z"
                }
            },
            "brand": {
                "id": 1,
                "name": "Demo Brand",
                "organisation_id": 1,
                "active": true,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "organisation": {
                    "id": 1,
                    "name": "Demo",
                    "active": true,
                    "vat_number": "GB999 9999 73",
                    "notes": "Demo account...",
                    "contact_name": "Mr Joe Bloggs",
                    "contact_phone": "+44 01425 000 000",
                    "contact_mobile": "+44 00000000",
                    "contact_email": "joe.bloggs@example.com",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z"
                }
            }
        },
        "type": {
            "id": 1,
            "name": "Standard Product",
            "type": "product",
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z"
        },
        "components": [
            {
                "product_variation_id": 1,
                "product_component_instance_id": 1,
                "quantity": 1,
                "instance": {
                    "id": 1,
                    "product_component_id": 1,
                    "component": {
                        "id": 1,
                        "status": "active",
                        "sku": "DEMO-SKU-01",
                        "barcode": "123123123000",
                        "perishable": false,
                        "fragile": false,
                        "battery": false,
                        "dangerous": false,
                        "organic": false,
                        "what_is_it": "Tape measure.",
                        "made_of": "Synthetic rubber & Polyvinyl chloride",
                        "used_for": "A tool for measuring distances.",
                        "customs_country_of_origin_country_id": 1,
                        "product_component_customs_code_id": 1,
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z",
                        "count_product_component_batches": 1,
                        "batch_codes_enabled": "enabled"
                    }
                }
            }
        ],
        "descriptions": [
            {
                "id": 1,
                "product_variation_id": 1,
                "locale_id": 1,
                "name": "Example product",
                "full_description": "Example product description",
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "locale": {
                    "id": 1,
                    "name": "English",
                    "code": "en",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z"
                }
            }
        ],
        "primary_component": [
            {
                "id": 1,
                "status": "active",
                "sku": "DEMO-SKU-01",
                "barcode": "123123123000",
                "perishable": false,
                "fragile": false,
                "battery": false,
                "dangerous": false,
                "organic": false,
                "what_is_it": "Tape measure.",
                "made_of": "Synthetic rubber & Polyvinyl chloride",
                "used_for": "A tool for measuring distances.",
                "customs_country_of_origin_country_id": 1,
                "product_component_customs_code_id": 1,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "count_product_component_batches": 1,
                "batch_codes_enabled": "enabled"
            }
        ],
        "tags": [
            {
                "id": 1,
                "name": "Processed",
                "shortcode": "PROCESSED",
                "description": "Marked a as processed by XYZ system",
                "created": "2019-11-25T14:52:56.000Z"
            }
        ],
        "stock_data_summaries": [
            {
                "product_variation_id": 1,
                "warehouse_id": 1,
                "warehouse_code": "CHR",
                "warehouse_name": "Christchurch",
                "total": 156,
                "total_saleable": 140,
                "saleable": 134,
                "available": 121,
                "allocated": 10,
                "misc": 34,
                "expected": 100,
                "under_investigation": 1
            }
        ]
    }
}

Update Name and Description

PUT /v1/products/variations/:id/description

Updates product’s name and description.

Parameter Regular Expressions

  • :id: [1-9][0-9]{0,}

Request Body

UpdateVariationNameAndDescription

Return Type

ProductVariationDescriptions

Types for the Request Body

UpdateVariationNameAndDescription (root level)

KeyDescriptionTypesRestrictions
localeID or code of locale.string
or integer
required
not null
if type is string, then min length is 2
if type is string, then max length is 2
if type is integer, then min is 1
nameName.stringrequired
not null
min length is 1
full_descriptionDescription.stringrequired
not null
min length is 0

Available expands

FieldReturn TypeDescription
localeLocalesLocale data.

Rate limit cost

Each call to this endpoint deducts 2 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::MANAGE.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/products/variations/12345/description?expand=*", [
    "body" => json_encode([
        "locale" => "en",
        "name" => "Red Ball",
        "full_description" => "A beautiful red ball.",
    ]),
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/products/variations/12345/description?expand=*', {
  locale: "en",
  name: "Red Ball",
  full_description: "A beautiful red ball.",
}, {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "PUT",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/12345/description?expand=*",
    body: {
        "locale": "en",
        "name": "Red Ball",
        "full_description": "A beautiful red ball."
    },
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request PUT 'https://public-api.bladepro.io/v1/products/variations/12345/description?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "locale": "en",
    "name": "Red Ball",
    "full_description": "A beautiful red ball."
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 1,
        "product_variation_id": 1,
        "locale_id": 1,
        "name": "Example product",
        "full_description": "Example product description",
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z",
        "locale": {
            "id": 1,
            "name": "English",
            "code": "en",
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z"
        }
    }
}

Activate Product Variation

PUT /v1/products/variations/:id/activate

Set the product variation’s status to “active”.

Parameter Regular Expressions

  • :id: [1-9][0-9]{0,}

Request Body

Ignored.

Return Type

ProductVariations

Available expands

FieldReturn TypeDescription
componentsarray<ProductVariationComponents>Variation component.
components.instanceProductComponentInstancesComponent instance.
components.instance.componentProductComponentsProduct component.
components.instance.component.doqsarray<ProductComponentDoqs>Product component DOQ.
components.instance.component.doqs.typeProductComponentDoqTypesProduct component DOQ Types.
descriptionsarray<ProductVariationDescriptions>Variation descriptions.
descriptions.localeLocalesLocale data.
primary_componentarray<ProductComponents>Product component.
productProductsProduct data. Products are grouping entries and may represent multiple different kinds of physical products.
product.brandProductBrandsProduct brand data.
product.brand.organisationOrganisationsOrganisation data.
product.channelProductChannelsGeographical region data.
product.channel.organisationOrganisationsOrganisation data.
stock_data_summariesarray<ProductVariationStockDataSummary>Variation stock breakdown.
tagsarray<Tags>A tag.
typeProductVariationTypesProduct variation type data.

Rate limit cost

Each call to this endpoint deducts 2 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::MANAGE.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/products/variations/:id/activate?expand=*", [
    "body" => "{}",
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/products/variations/:id/activate?expand=*', {}, {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "PUT",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/:id/activate?expand=*",
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request PUT 'https://public-api.bladepro.io/v1/products/variations/:id/activate?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 1,
        "product_id": 1,
        "status": "active",
        "sku": "DEMO-SKU-01",
        "barcode": "0123456789012",
        "product_variation_type_id": 1,
        "discontinued_date": "2019-11-25T14:52:56.000Z",
        "despatch_instructions": "Always pack facing upwards.",
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z",
        "product": {
            "id": 1,
            "product_channel_id": 1,
            "product_brand_id": 1,
            "product_category_id": 1,
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z",
            "channel": {
                "id": 1,
                "organisation_id": 1,
                "status": "active",
                "outbound_email": "someone@example.com",
                "default_warehouse_id": 1,
                "default_product_brand_id": 1,
                "global": false,
                "name": "Demo Channel",
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "organisation": {
                    "id": 1,
                    "name": "Demo",
                    "active": true,
                    "vat_number": "GB999 9999 73",
                    "notes": "Demo account...",
                    "contact_name": "Mr Joe Bloggs",
                    "contact_phone": "+44 01425 000 000",
                    "contact_mobile": "+44 00000000",
                    "contact_email": "joe.bloggs@example.com",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z"
                }
            },
            "brand": {
                "id": 1,
                "name": "Demo Brand",
                "organisation_id": 1,
                "active": true,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "organisation": {
                    "id": 1,
                    "name": "Demo",
                    "active": true,
                    "vat_number": "GB999 9999 73",
                    "notes": "Demo account...",
                    "contact_name": "Mr Joe Bloggs",
                    "contact_phone": "+44 01425 000 000",
                    "contact_mobile": "+44 00000000",
                    "contact_email": "joe.bloggs@example.com",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z"
                }
            }
        },
        "type": {
            "id": 1,
            "name": "Standard Product",
            "type": "product",
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z"
        },
        "components": [
            {
                "product_variation_id": 1,
                "product_component_instance_id": 1,
                "quantity": 1,
                "instance": {
                    "id": 1,
                    "product_component_id": 1,
                    "component": {
                        "id": 1,
                        "status": "active",
                        "sku": "DEMO-SKU-01",
                        "barcode": "123123123000",
                        "perishable": false,
                        "fragile": false,
                        "battery": false,
                        "dangerous": false,
                        "organic": false,
                        "what_is_it": "Tape measure.",
                        "made_of": "Synthetic rubber & Polyvinyl chloride",
                        "used_for": "A tool for measuring distances.",
                        "customs_country_of_origin_country_id": 1,
                        "product_component_customs_code_id": 1,
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z",
                        "count_product_component_batches": 1,
                        "batch_codes_enabled": "enabled"
                    }
                }
            }
        ],
        "descriptions": [
            {
                "id": 1,
                "product_variation_id": 1,
                "locale_id": 1,
                "name": "Example product",
                "full_description": "Example product description",
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "locale": {
                    "id": 1,
                    "name": "English",
                    "code": "en",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z"
                }
            }
        ],
        "primary_component": [
            {
                "id": 1,
                "status": "active",
                "sku": "DEMO-SKU-01",
                "barcode": "123123123000",
                "perishable": false,
                "fragile": false,
                "battery": false,
                "dangerous": false,
                "organic": false,
                "what_is_it": "Tape measure.",
                "made_of": "Synthetic rubber & Polyvinyl chloride",
                "used_for": "A tool for measuring distances.",
                "customs_country_of_origin_country_id": 1,
                "product_component_customs_code_id": 1,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "count_product_component_batches": 1,
                "batch_codes_enabled": "enabled"
            }
        ],
        "tags": [
            {
                "id": 1,
                "name": "Processed",
                "shortcode": "PROCESSED",
                "description": "Marked a as processed by XYZ system",
                "created": "2019-11-25T14:52:56.000Z"
            }
        ],
        "stock_data_summaries": [
            {
                "product_variation_id": 1,
                "warehouse_id": 1,
                "warehouse_code": "CHR",
                "warehouse_name": "Christchurch",
                "total": 156,
                "total_saleable": 140,
                "saleable": 134,
                "available": 121,
                "allocated": 10,
                "misc": 34,
                "expected": 100,
                "under_investigation": 1
            }
        ]
    }
}

Discontinue Product Variation

PUT /v1/products/variations/:id/discontinue

Set the product variation’s status to “discontinued”.

Parameter Regular Expressions

  • :id: [1-9][0-9]{0,}

Request Body

Ignored.

Return Type

ProductVariations

Available expands

FieldReturn TypeDescription
componentsarray<ProductVariationComponents>Variation component.
components.instanceProductComponentInstancesComponent instance.
components.instance.componentProductComponentsProduct component.
components.instance.component.doqsarray<ProductComponentDoqs>Product component DOQ.
components.instance.component.doqs.typeProductComponentDoqTypesProduct component DOQ Types.
descriptionsarray<ProductVariationDescriptions>Variation descriptions.
descriptions.localeLocalesLocale data.
primary_componentarray<ProductComponents>Product component.
productProductsProduct data. Products are grouping entries and may represent multiple different kinds of physical products.
product.brandProductBrandsProduct brand data.
product.brand.organisationOrganisationsOrganisation data.
product.channelProductChannelsGeographical region data.
product.channel.organisationOrganisationsOrganisation data.
stock_data_summariesarray<ProductVariationStockDataSummary>Variation stock breakdown.
tagsarray<Tags>A tag.
typeProductVariationTypesProduct variation type data.

Rate limit cost

Each call to this endpoint deducts 2 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::MANAGE.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/products/variations/:id/discontinue?expand=*", [
    "body" => "{}",
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/products/variations/:id/discontinue?expand=*', {}, {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "PUT",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/:id/discontinue?expand=*",
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request PUT 'https://public-api.bladepro.io/v1/products/variations/:id/discontinue?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 1,
        "product_id": 1,
        "status": "active",
        "sku": "DEMO-SKU-01",
        "barcode": "0123456789012",
        "product_variation_type_id": 1,
        "discontinued_date": "2019-11-25T14:52:56.000Z",
        "despatch_instructions": "Always pack facing upwards.",
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z",
        "product": {
            "id": 1,
            "product_channel_id": 1,
            "product_brand_id": 1,
            "product_category_id": 1,
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z",
            "channel": {
                "id": 1,
                "organisation_id": 1,
                "status": "active",
                "outbound_email": "someone@example.com",
                "default_warehouse_id": 1,
                "default_product_brand_id": 1,
                "global": false,
                "name": "Demo Channel",
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "organisation": {
                    "id": 1,
                    "name": "Demo",
                    "active": true,
                    "vat_number": "GB999 9999 73",
                    "notes": "Demo account...",
                    "contact_name": "Mr Joe Bloggs",
                    "contact_phone": "+44 01425 000 000",
                    "contact_mobile": "+44 00000000",
                    "contact_email": "joe.bloggs@example.com",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z"
                }
            },
            "brand": {
                "id": 1,
                "name": "Demo Brand",
                "organisation_id": 1,
                "active": true,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "organisation": {
                    "id": 1,
                    "name": "Demo",
                    "active": true,
                    "vat_number": "GB999 9999 73",
                    "notes": "Demo account...",
                    "contact_name": "Mr Joe Bloggs",
                    "contact_phone": "+44 01425 000 000",
                    "contact_mobile": "+44 00000000",
                    "contact_email": "joe.bloggs@example.com",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z"
                }
            }
        },
        "type": {
            "id": 1,
            "name": "Standard Product",
            "type": "product",
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z"
        },
        "components": [
            {
                "product_variation_id": 1,
                "product_component_instance_id": 1,
                "quantity": 1,
                "instance": {
                    "id": 1,
                    "product_component_id": 1,
                    "component": {
                        "id": 1,
                        "status": "active",
                        "sku": "DEMO-SKU-01",
                        "barcode": "123123123000",
                        "perishable": false,
                        "fragile": false,
                        "battery": false,
                        "dangerous": false,
                        "organic": false,
                        "what_is_it": "Tape measure.",
                        "made_of": "Synthetic rubber & Polyvinyl chloride",
                        "used_for": "A tool for measuring distances.",
                        "customs_country_of_origin_country_id": 1,
                        "product_component_customs_code_id": 1,
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z",
                        "count_product_component_batches": 1,
                        "batch_codes_enabled": "enabled"
                    }
                }
            }
        ],
        "descriptions": [
            {
                "id": 1,
                "product_variation_id": 1,
                "locale_id": 1,
                "name": "Example product",
                "full_description": "Example product description",
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "locale": {
                    "id": 1,
                    "name": "English",
                    "code": "en",
                    "created": "2019-11-25T14:52:56.000Z",
                    "modified": "2019-11-25T14:52:56.000Z"
                }
            }
        ],
        "primary_component": [
            {
                "id": 1,
                "status": "active",
                "sku": "DEMO-SKU-01",
                "barcode": "123123123000",
                "perishable": false,
                "fragile": false,
                "battery": false,
                "dangerous": false,
                "organic": false,
                "what_is_it": "Tape measure.",
                "made_of": "Synthetic rubber & Polyvinyl chloride",
                "used_for": "A tool for measuring distances.",
                "customs_country_of_origin_country_id": 1,
                "product_component_customs_code_id": 1,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "count_product_component_batches": 1,
                "batch_codes_enabled": "enabled"
            }
        ],
        "tags": [
            {
                "id": 1,
                "name": "Processed",
                "shortcode": "PROCESSED",
                "description": "Marked a as processed by XYZ system",
                "created": "2019-11-25T14:52:56.000Z"
            }
        ],
        "stock_data_summaries": [
            {
                "product_variation_id": 1,
                "warehouse_id": 1,
                "warehouse_code": "CHR",
                "warehouse_name": "Christchurch",
                "total": 156,
                "total_saleable": 140,
                "saleable": 134,
                "available": 121,
                "allocated": 10,
                "misc": 34,
                "expected": 100,
                "under_investigation": 1
            }
        ]
    }
}

Add Product Timeline

POST /v1/products/variations/:id/timeline

Add a message or note to the timeline.

Parameter Regular Expressions

  • :id: [1-9][0-9]{0,}

Request Body

CreateAudit

Return Type

ProductAudits

Types for the Request Body

CreateAudit (root level)

KeyDescriptionTypesRestrictions
messageThe message or note to be added to the timeline.stringrequired
not null
max length is 65535

Rate limit cost

Each call to this endpoint deducts 2 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::MANAGE.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("POST", "https://public-api.bladepro.io/v1/products/variations/1234567/timeline", [
    "body" => json_encode([
        "message" => "Marked as processed with in system XYZ.",
    ]),
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.post 'https://public-api.bladepro.io/v1/products/variations/1234567/timeline', {
  message: "Marked as processed with in system XYZ.",
}, {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "POST",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/1234567/timeline",
    body: {
        "message": "Marked as processed with in system XYZ."
    },
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request POST 'https://public-api.bladepro.io/v1/products/variations/1234567/timeline' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "message": "Marked as processed with in system XYZ."
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "message": "Marked as processed with in system XYZ."
    }
}

Apply Product Tag

POST /v1/products/variations/:id/tags

Applies a tag to a product variation.

Parameter Regular Expressions

  • :id: [1-9][0-9]{0,}

Request Body

ApplyTag

Return Type

ProductVariationTags

Types for the Request Body

ApplyTag (root level)

KeyDescriptionTypesRestrictions
shortcodeThe tag shortcode.stringrequired
not null
min length is 1

Rate limit cost

Each call to this endpoint deducts 2 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::MANAGE.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("POST", "https://public-api.bladepro.io/v1/products/variations/12345/tags", [
    "body" => json_encode([
        "shortcode" => "PROCESSED",
    ]),
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.post 'https://public-api.bladepro.io/v1/products/variations/12345/tags', {
  shortcode: "PROCESSED",
}, {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "POST",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/12345/tags",
    body: {
        "shortcode": "PROCESSED"
    },
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request POST 'https://public-api.bladepro.io/v1/products/variations/12345/tags' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "shortcode": "PROCESSED"
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 1,
        "name": "Processed",
        "shortcode": "PROCESSED",
        "description": "Marked a as processed by XYZ system",
        "created": "2019-11-25T14:52:56.000Z"
    }
}

Remove Product Tag

DELETE /v1/products/variations/:id/tags/:tagShortcode

Remove a tag from a product variation.

Parameter Regular Expressions

  • :id: [1-9][0-9]{0,}
  • :tagShortcode: [a-zA-Z0-9]{3,20}

Return Type

Empty.

Rate limit cost

Each call to this endpoint deducts 2 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::MANAGE.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("DELETE", "https://public-api.bladepro.io/v1/products/variations/1234567/tags/PROCESSED", [
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.delete 'https://public-api.bladepro.io/v1/products/variations/1234567/tags/PROCESSED', {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "DELETE",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/1234567/tags/PROCESSED",
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request DELETE 'https://public-api.bladepro.io/v1/products/variations/1234567/tags/PROCESSED' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'

Example result:

null

Find variations with suppliers

GET /v1/products/variations/suppliers

Retrieves basic data about the list of available marketplace listable products.

Return Type

array<ProductChannelVariations>

Filters

FieldOperatorsValue List URL
skuLIKE, NOT_LIKE, IN
channelIN, NOT_IN

Rate limit cost

Each call to this endpoint deducts 1 credit from your request bucket.

Scopes

This endpoint is available to all users.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/products/variations/suppliers", [
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.get 'https://public-api.bladepro.io/v1/products/variations/suppliers', {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "GET",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/suppliers",
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request GET 'https://public-api.bladepro.io/v1/products/variations/suppliers' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86",
        "paging": {
            "page": 1,
            "records": 1,
            "per_page": 250,
            "total_records": 1,
            "total_pages": 1
        }
    },
    "data": [
        {
            "channel": 123,
            "sku": "DEMO-SKU-01",
            "product_component_sku": "DEMO-SKU-01",
            "product_component_supplier_id": 123,
            "product_component_id": 123,
            "warehouse_id": 123
        }
    ]
}

Bulk List Stock

PUT /v1/products/variations/stocks

Fetches stock data for a set list of products. THIS ENDPOINT IS BEING DEPRECATED

Request Body

BulkGetVariationStockData

Return Type

array<ProductVariationStockDataSummary>

Types for the Request Body

BulkGetVariationStockData (root level)

KeyDescriptionTypesRestrictions
product_variation_idList of product variation ID’s.array<number>required
not null
min count is 1
warehouse_codeWarehouse code to limit the results to. If omitted or null, it won’t be applied as a filter.stringmin length is 1

Rate limit cost

Each call to this endpoint deducts 15 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::READ.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/products/variations/stocks", [
    "body" => json_encode([
        "product_variation_id" => [
            1,
        ],
        "warehouse_code" => "CHR",
    ]),
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/products/variations/stocks', {
  product_variation_id: [
    1,
  ],
  warehouse_code: "CHR",
}, {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "PUT",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/stocks",
    body: {
        "product_variation_id": [
            1
        ],
        "warehouse_code": "CHR"
    },
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request PUT 'https://public-api.bladepro.io/v1/products/variations/stocks' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "product_variation_id": [
        1
    ],
    "warehouse_code": "CHR"
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": [
        {
            "product_variation_id": 1,
            "warehouse_id": 1,
            "warehouse_code": "CHR",
            "warehouse_name": "Christchurch",
            "total": 156,
            "total_saleable": 140,
            "saleable": 134,
            "available": 121,
            "allocated": 10,
            "misc": 34,
            "expected": 100,
            "under_investigation": 1
        }
    ]
}

Bulk List Stock

PUT /v1/products/variations/stocks_v2

Fetches stock data for a set list of products.

Request Body

BulkGetVariationStockData

Return Type

array<ProductVariationStockDataSummaryV2>

Types for the Request Body

BulkGetVariationStockData (root level)

KeyDescriptionTypesRestrictions
product_variation_idList of product variation ID’s.array<number>required
not null
min count is 1
warehouse_codeWarehouse code to limit the results to. If omitted or null, it won’t be applied as a filter.stringmin length is 1

Available expands

FieldReturn TypeDescription
on_handProductVariationStockDataOnHandVariation stock data on hand
on_hand.committedProductVariationStockDataOnHandCommittedVariation stock data committed
on_hand.unsaleableProductVariationStockDataOnHandUnsellableVariation stock data unsellable

Rate limit cost

Each call to this endpoint deducts 5 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::READ.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/products/variations/stocks_v2?expand=*", [
    "body" => json_encode([
        "product_variation_id" => [
            1,
        ],
        "warehouse_code" => "CHR",
    ]),
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/products/variations/stocks_v2?expand=*', {
  product_variation_id: [
    1,
  ],
  warehouse_code: "CHR",
}, {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "PUT",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/stocks_v2?expand=*",
    body: {
        "product_variation_id": [
            1
        ],
        "warehouse_code": "CHR"
    },
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request PUT 'https://public-api.bladepro.io/v1/products/variations/stocks_v2?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "product_variation_id": [
        1
    ],
    "warehouse_code": "CHR"
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": [
        {
            "product_variation_id": 1,
            "warehouse_id": 1,
            "warehouse_code": "CHR",
            "warehouse_name": "Christchurch",
            "on_hand": {
                "on_hand_total": 1,
                "available": 1,
                "committed": {
                    "committed_total": 1,
                    "allocated": 1,
                    "picked": 1
                },
                "unsaleable": {
                    "unsaleable_total": 1,
                    "batch_reserved": 1,
                    "ring_fenced": 1,
                    "goodsin_processing": 1,
                    "returns_processing": 1,
                    "stock_processing": 1,
                    "quarantine": 1,
                    "expired": 1
                },
                "under_investigation": 1
            },
            "expected": 1
        }
    ]
}

Bulk List Stock with Expiry

PUT /v1/products/variations/stocks/expiry

Fetches perishable stock data for a set list of products.

Request Body

BulkGetVariationPerishableStockData

Return Type

array<ProductVariationPerishableStockDataSummary>

Types for the Request Body

BulkGetVariationPerishableStockData (root level)

KeyDescriptionTypesRestrictions
product_variation_idList of product variation ID’s.array<number>required
not null
min count is 1
warehouse_codeWarehouse code to limit the results to. If omitted or null, it won’t be applied as a filter.stringmin length is 1

Rate limit cost

Each call to this endpoint deducts 15 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::READ.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/products/variations/stocks/expiry", [
    "body" => json_encode([
        "product_variation_id" => [
            1,
        ],
        "warehouse_code" => "CHR",
    ]),
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/products/variations/stocks/expiry', {
  product_variation_id: [
    1,
  ],
  warehouse_code: "CHR",
}, {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "PUT",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/stocks/expiry",
    body: {
        "product_variation_id": [
            1
        ],
        "warehouse_code": "CHR"
    },
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request PUT 'https://public-api.bladepro.io/v1/products/variations/stocks/expiry' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "product_variation_id": [
        1
    ],
    "warehouse_code": "CHR"
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": [
        {
            "product_variation_id": 1,
            "warehouse_id": 1,
            "warehouse_code": "CHR",
            "warehouse_name": "Christchurch",
            "total": 156,
            "total_saleable": 140,
            "saleable": 134,
            "available": 121,
            "allocated": 10,
            "misc": 34,
            "expected": 100,
            "under_investigation": 1
        }
    ]
}

Bulk List Stock with Batch Codes

PUT /v1/products/variations/stocks/batch_code

Fetches batch stock data for a set list of products.

Request Body

BulkGetVariationBatchStockData

Return Type

array<ProductVariationBatchStockDataSummary>

Types for the Request Body

BulkGetVariationBatchStockData (root level)

KeyDescriptionTypesRestrictions
product_variation_idList of product variation ID’s.array<number>required
not null
min count is 1
warehouse_codeWarehouse code to limit the results to. If omitted or null, it won’t be applied as a filter.stringmin length is 1

Rate limit cost

Each call to this endpoint deducts 15 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::READ.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/products/variations/stocks/batch_code", [
    "body" => json_encode([
        "product_variation_id" => [
            1,
        ],
        "warehouse_code" => "CHR",
    ]),
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/products/variations/stocks/batch_code', {
  product_variation_id: [
    1,
  ],
  warehouse_code: "CHR",
}, {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "PUT",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/stocks/batch_code",
    body: {
        "product_variation_id": [
            1
        ],
        "warehouse_code": "CHR"
    },
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request PUT 'https://public-api.bladepro.io/v1/products/variations/stocks/batch_code' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "product_variation_id": [
        1
    ],
    "warehouse_code": "CHR"
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": [
        {
            "product_variation_id": 1,
            "batch_code": "1234",
            "warehouse_id": 1,
            "warehouse_code": "CHR",
            "warehouse_name": "Christchurch",
            "total": 156,
            "total_saleable": 140,
            "saleable": 134,
            "available": 121,
            "allocated": 10,
            "misc": 34,
            "expected": 100,
            "under_investigation": 1
        }
    ]
}

List Product Variations

GET /v1/products/variations/stock_availability

Get a list of product variations. Please note that all expands will be applied automatically.

Return Type

array<StockAvailability>

Filters

FieldOperatorsValue List URL
searchLIKEfuzzy search across selected attributes
idEQUALS, IN
skuEQUALS, IN
order_channel_idIN/v1/orders/channels

Sortings

Results can be sorted by the following keys: created, product.channel.name, sku, status.

Available expands

FieldReturn TypeDescription

Rate limit cost

Each call to this endpoint deducts 3 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::PRODUCTS::READ.

<?php

// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();

// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/products/variations/stock_availability?expand=*", [
    "headers" => [
        "Content-Type" => "application/json",
        "Access-Token" => "my-token-from-login",
    ],
]);

// Process the response
$responseBody = json_decode($response->getBody(), true);
require 'rest-client'
require 'json'

# Make the request
response = RestClient.get 'https://public-api.bladepro.io/v1/products/variations/stock_availability?expand=*', {
  access_token: 'my-token-from-login',
  content_type: :json,
  accept: :json
}

# Process the response
puts response.body
// Require the node HTTP module
var request = require("request");

// Make the request
request({
    method: "GET",
    json: true,
    uri: "https://public-api.bladepro.io/v1/products/variations/stock_availability?expand=*",
    headers: {
        "Access-Token": "my-token-from-login",
        "Content-Type": "application/json",
    },
    (error, response, body) => {
        // Process the response
        console.log(body);
    },
});
# Make the request
curl --location --request GET 'https://public-api.bladepro.io/v1/products/variations/stock_availability?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86",
        "paging": {
            "page": 1,
            "records": 1,
            "per_page": 250,
            "total_records": 1,
            "total_pages": 1
        }
    },
    "data": [
        {
            "id": 1,
            "sku": "DEMO-SKU-01",
            "barcode": "0123456789012",
            "stocks": {
                "product_variation_id": 1,
                "warehouse_id": 1,
                "warehouse_code": "CHR",
                "total": 156,
                "available": 121
            }
        }
    ]
}