Products
Working with products.
Create Product
POST /v1/products/variations
Creates a product.
Request Body
Return Type
Types for the Request Body
CreateProduct (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
sku | The product’s Stock Keeping Unit. | string | requirednot nullmatch is /^[a-z0-9\-_.]{2,}$/i |
name | The product’s name. | string | requirednot nullmin length is 3 |
barcode | The product barcode. | string | requirednot nullmatch is /^\d{3,20}$/ |
brand | Product brand id. | integer | requirednot nullmin is 1 |
channel | Product channel id. | integer | requirednot nullmin is 1 |
new_component | Component data. Required when creating a new warehouse product. It can’t appear in the payload along with existing_components. | NewComponent | optionally requirednot null |
existing_components | Components to use. Required when creating a new virtual product. It can’t appear in the payload along with new_component. | array<ExistingComponent> | optionally requirednot nullmin count is 1 |
Doq
| Key | Description | Types | Restrictions |
|---|---|---|---|
length | Length in MM. | integer | requirednot nullmin is 1 |
width | Width in MM. | integer | requirednot nullmin is 1 |
height | Height in MM. | integer | requirednot nullmin is 1 |
weight | Weight in KG. | number | requirednot nullmin is 0.001 |
quantity | Quantity. | integer | requirednot nullmin is 1 |
type | Short code for the DOQ. | enum(INNER_PACK, MASTER_CASE, PALLET, SINGLE_PRODUCT) | requirednot null |
shippable | Is this a shippable item? | boolean | requirednot null |
barcode | Barcode. | string | not nullmatch is /^[0-9]{6,}$/ |
ExistingComponent
| Key | Description | Types | Restrictions |
|---|---|---|---|
id | The product component ID. | integer | requirednot nullmin is 1 |
quantity | The quantity required to build the virtual product. | integer | requirednot nullmin is 1 |
NewComponent
| Key | Description | Types | Restrictions |
|---|---|---|---|
perishable | Is the product perishable? | boolean | requirednot null |
organic | Is the product organic? | boolean | requirednot null |
dangerous | Is the product dangerous? | boolean | not null |
dutiable | Is the product dutiable? | boolean | not null |
hygiene | Is the product for hygiene? | boolean | not null |
battery | Does the product have battery? | boolean | not null |
fragile | Is the product fragile? | boolean | not null |
what_is_it | Part of customs details: What is the product? | string | requirednot nullmin length is 1 |
made_of | Part of customs details: What is the product made of? | string | requirednot nullmin length is 1 |
used_for | Part of customs details: What is the product used for? | string | requirednot nullmin length is 1 |
customs_country_of_origin_country | The ISO2 or ISO3 code or the ID of the country of origin. | stringor integer | requirednot nullif type is string, then min length is 1if type is string, then max length is 3if type is integer, then min is 1 |
product_component_customs_code_id | Customs code ID. | integer | requirednot nullmin is 1 |
part_number | Manufacturer or supplier part number for the product. | string | max length is 200 |
doqs | List of product DOQs. | array<Doq> | requirednot nullmin count is 1 |
batch_codes_enabled | Enable batch codes? | string |
Available expands
| Field | Return Type | Description |
|---|---|---|
components | array<ProductVariationComponents> | Variation component. |
components.instance | ProductComponentInstances | Component instance. |
components.instance.component | ProductComponents | Product component. |
components.instance.component.doqs | array<ProductComponentDoqs> | Product component DOQ. |
components.instance.component.doqs.type | ProductComponentDoqTypes | Product component DOQ Types. |
descriptions | array<ProductVariationDescriptions> | Variation descriptions. |
descriptions.locale | Locales | Locale data. |
primary_component | array<ProductComponents> | Product component. |
product | Products | Product data. Products are grouping entries and may represent multiple different kinds of physical products. |
product.brand | ProductBrands | Product brand data. |
product.brand.organisation | Organisations | Organisation data. |
product.channel | ProductChannels | Geographical region data. |
product.channel.organisation | Organisations | Organisation data. |
stock_data_summaries | array<ProductVariationStockDataSummary> | Variation stock breakdown. |
tags | array<Tags> | A tag. |
type | ProductVariationTypes | Product 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
| Field | Operators | Value List URL |
|---|---|---|
| search | LIKE | fuzzy search across selected attributes |
| id | EQUALS, IN | |
| product.channel.id | IN, NOT_IN | |
| tags.shortcode | IN, NOT_IN | |
| status | IN, NOT_IN | |
| sku | EQUALS, IN | |
| type.id | IN | |
| is_primary | EQUALS | |
| order_channel_id | IN | /v1/orders/channels |
Sortings
Results can be sorted by the following keys: created, product.channel.name, sku, status.
Available expands
| Field | Return Type | Description |
|---|---|---|
components | array<CachedProductVariationComponent> | Variation component. |
created | CachedProductVariationCreated | Variation specific data. |
descriptions | array<CachedProductVariationDescription> | Variation descriptions. |
descriptions.locale | SummarisedLocale | Locale / Language. |
primary_product_category | SummarisedProductCategory | Summary of a product category. |
product | CachedProduct | Top level product data. |
product.channel | CachedProductChannel | Cached product channel. |
product.channel.organisation | CachedProductChannelOrganisation | Top level product data. |
tags | array<SummarisedTag> | A tag. |
type | SummarisedProductVariationType | Top 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
Available expands
| Field | Return Type | Description |
|---|---|---|
components | array<ProductVariationComponents> | Variation component. |
components.instance | ProductComponentInstances | Component instance. |
components.instance.component | ProductComponents | Product component. |
components.instance.component.doqs | array<ProductComponentDoqs> | Product component DOQ. |
components.instance.component.doqs.type | ProductComponentDoqTypes | Product component DOQ Types. |
descriptions | array<ProductVariationDescriptions> | Variation descriptions. |
descriptions.locale | Locales | Locale data. |
primary_component | array<ProductComponents> | Product component. |
product | Products | Product data. Products are grouping entries and may represent multiple different kinds of physical products. |
product.brand | ProductBrands | Product brand data. |
product.brand.organisation | Organisations | Organisation data. |
product.channel | ProductChannels | Geographical region data. |
product.channel.organisation | Organisations | Organisation data. |
stock_data_summaries | array<ProductVariationStockDataSummary> | Variation stock breakdown. |
tags | array<Tags> | A tag. |
type | ProductVariationTypes | Product 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
Types for the Request Body
UpdateVariationNameAndDescription (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
locale | ID or code of locale. | stringor integer | requirednot nullif type is string, then min length is 2if type is string, then max length is 2if type is integer, then min is 1 |
name | Name. | string | requirednot nullmin length is 1 |
full_description | Description. | string | requirednot nullmin length is 0 |
Available expands
| Field | Return Type | Description |
|---|---|---|
locale | Locales | Locale 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
Available expands
| Field | Return Type | Description |
|---|---|---|
components | array<ProductVariationComponents> | Variation component. |
components.instance | ProductComponentInstances | Component instance. |
components.instance.component | ProductComponents | Product component. |
components.instance.component.doqs | array<ProductComponentDoqs> | Product component DOQ. |
components.instance.component.doqs.type | ProductComponentDoqTypes | Product component DOQ Types. |
descriptions | array<ProductVariationDescriptions> | Variation descriptions. |
descriptions.locale | Locales | Locale data. |
primary_component | array<ProductComponents> | Product component. |
product | Products | Product data. Products are grouping entries and may represent multiple different kinds of physical products. |
product.brand | ProductBrands | Product brand data. |
product.brand.organisation | Organisations | Organisation data. |
product.channel | ProductChannels | Geographical region data. |
product.channel.organisation | Organisations | Organisation data. |
stock_data_summaries | array<ProductVariationStockDataSummary> | Variation stock breakdown. |
tags | array<Tags> | A tag. |
type | ProductVariationTypes | Product 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
Available expands
| Field | Return Type | Description |
|---|---|---|
components | array<ProductVariationComponents> | Variation component. |
components.instance | ProductComponentInstances | Component instance. |
components.instance.component | ProductComponents | Product component. |
components.instance.component.doqs | array<ProductComponentDoqs> | Product component DOQ. |
components.instance.component.doqs.type | ProductComponentDoqTypes | Product component DOQ Types. |
descriptions | array<ProductVariationDescriptions> | Variation descriptions. |
descriptions.locale | Locales | Locale data. |
primary_component | array<ProductComponents> | Product component. |
product | Products | Product data. Products are grouping entries and may represent multiple different kinds of physical products. |
product.brand | ProductBrands | Product brand data. |
product.brand.organisation | Organisations | Organisation data. |
product.channel | ProductChannels | Geographical region data. |
product.channel.organisation | Organisations | Organisation data. |
stock_data_summaries | array<ProductVariationStockDataSummary> | Variation stock breakdown. |
tags | array<Tags> | A tag. |
type | ProductVariationTypes | Product 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
Return Type
Types for the Request Body
CreateAudit (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
message | The message or note to be added to the timeline. | string | requirednot nullmax 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
Return Type
Types for the Request Body
ApplyTag (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
shortcode | The tag shortcode. | string | requirednot nullmin 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:
nullFind variations with suppliers
GET /v1/products/variations/suppliers
Retrieves basic data about the list of available marketplace listable products.
Return Type
array<ProductChannelVariations>
Filters
| Field | Operators | Value List URL |
|---|---|---|
| sku | LIKE, NOT_LIKE, IN | |
| channel | IN, 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
Return Type
array<ProductVariationStockDataSummary>
Types for the Request Body
BulkGetVariationStockData (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
product_variation_id | List of product variation ID’s. | array<number> | requirednot nullmin count is 1 |
warehouse_code | Warehouse code to limit the results to. If omitted or null, it won’t be applied as a filter. | string | min 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
Return Type
array<ProductVariationStockDataSummaryV2>
Types for the Request Body
BulkGetVariationStockData (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
product_variation_id | List of product variation ID’s. | array<number> | requirednot nullmin count is 1 |
warehouse_code | Warehouse code to limit the results to. If omitted or null, it won’t be applied as a filter. | string | min length is 1 |
Available expands
| Field | Return Type | Description |
|---|---|---|
on_hand | ProductVariationStockDataOnHand | Variation stock data on hand |
on_hand.committed | ProductVariationStockDataOnHandCommitted | Variation stock data committed |
on_hand.unsaleable | ProductVariationStockDataOnHandUnsellable | Variation 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)
| Key | Description | Types | Restrictions |
|---|---|---|---|
product_variation_id | List of product variation ID’s. | array<number> | requirednot nullmin count is 1 |
warehouse_code | Warehouse code to limit the results to. If omitted or null, it won’t be applied as a filter. | string | min 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)
| Key | Description | Types | Restrictions |
|---|---|---|---|
product_variation_id | List of product variation ID’s. | array<number> | requirednot nullmin count is 1 |
warehouse_code | Warehouse code to limit the results to. If omitted or null, it won’t be applied as a filter. | string | min 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
| Field | Operators | Value List URL |
|---|---|---|
| search | LIKE | fuzzy search across selected attributes |
| id | EQUALS, IN | |
| sku | EQUALS, IN | |
| order_channel_id | IN | /v1/orders/channels |
Sortings
Results can be sorted by the following keys: created, product.channel.name, sku, status.
Available expands
| Field | Return Type | Description |
|---|
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
}
}
]
}