Miscellaneous

Uncategorised endpoints.

List Countries

GET /v1/countries

Retrieves a list of all the countries BladePRO can accept shipping destinations for.

Return Type

array<Countries>

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::MISC.

<?php

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

// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/countries", [
    "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/countries', {
  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/countries",
    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/countries' \
--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,
            "name": "United Kingdom",
            "iso_2": "GB",
            "iso_3": "GBR",
            "region_id": 1,
            "currency_id": 1,
            "block": "EU"
        }
    ]
}

List Currencies

GET /v1/currencies

List Currencies.

Return Type

array<Currencies>

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::MISC.

<?php

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

// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/currencies", [
    "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/currencies', {
  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/currencies",
    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/currencies' \
--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,
            "code": "GBP",
            "name": "Great British Pounds",
            "symbol": "£",
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z"
        }
    ]
}

List Tax Rates

GET /v1/taxes

List Tax Rates.

Return Type

array<OrganisationTaxes>

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::MISC.

<?php

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

// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/taxes", [
    "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/taxes', {
  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/taxes",
    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/taxes' \
--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,
            "name": "standard",
            "code": "20",
            "rate": 20,
            "description": "standard 20%",
            "active": true,
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z"
        }
    ]
}

List Brands

GET /v1/brands

Retrieves a list of all the organisational brands.

Return Type

array<Brands>

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::MISC.

<?php

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

// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/brands", [
    "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/brands', {
  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/brands",
    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/brands' \
--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": 5,
            "name": "Demo Brand"
        }
    ]
}

List Retailers

GET /v1/retailers

Retrieves a list of the retailers available to the organisation.

Return Type

array<Retailers>

Filters

FieldOperatorsValue List URL
nameLIKE, NOT_LIKE
warehouseIN, NOT_IN

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::ORDERS::READ.

<?php

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

// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/retailers", [
    "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/retailers', {
  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/retailers",
    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/retailers' \
--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,
            "name": "Demo Retailer",
            "description": "Demo Retailer",
            "active": 1,
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z"
        }
    ]
}

List Locales

GET /v1/locales

Lists available locales.

Return Type

array<Locales>

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::MISC.

<?php

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

// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/locales", [
    "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/locales', {
  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/locales",
    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/locales' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": [
        {
            "id": 1,
            "name": "English",
            "code": "en",
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z"
        }
    ]
}

List templates

GET /v1/templates

Return a list of templates

Return Type

Templates

Filters

FieldOperatorsValue List URL
organisation_idIN, NOT_IN
template_category_idIN, NOT_IN
template_category_codeIN, NOT_IN
nameLIKE

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::TEMPLATES::READ.

<?php

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

// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/templates", [
    "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/templates', {
  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/templates",
    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/templates' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 1,
        "organisation_id": 1,
        "template_category_id": 1,
        "template_category_code": "DESPATCH_NOTE",
        "name": "Default despatch note",
        "status": "portrait",
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z"
    }
}

Return rendered template

PUT /v1/templates/render

Return a template rendered for different resources and languages

Request Body

RenderTemplate

Return Type

Templates

Types for the Request Body

RenderTemplate (root level)

KeyDescriptionTypesRestrictions
template_idID of template.integerrequired
not null
min is 1
resource_idsList of resource ID’s.array<number>required
not null
min count is 1
localesList of resource ID’s.array<string>required
not null
min count 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::TEMPLATES::READ.

<?php

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

// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/templates/render", [
    "body" => json_encode([
        "template_id" => "en",
        "resource_ids" => [
            1,
        ],
        "locales" => [
            "en",
        ],
    ]),
    "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/templates/render', {
  template_id: "en",
  resource_ids: [
    1,
  ],
  locales: [
    "en",
  ],
}, {
  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/templates/render",
    body: {
        "template_id": "en",
        "resource_ids": [
            1
        ],
        "locales": [
            "en"
        ]
    },
    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/templates/render' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "template_id": "en",
    "resource_ids": [
        1
    ],
    "locales": [
        "en"
    ]
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 1,
        "organisation_id": 1,
        "template_category_id": 1,
        "template_category_code": "DESPATCH_NOTE",
        "name": "Default despatch note",
        "status": "portrait",
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z"
    }
}

List File Order Importer Mapping Templates

GET /v1/mappings

List the mapping templates for File Order Importer.

Return Type

array<Mappings>

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::ORDERS::READ.

<?php

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

// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/mappings", [
    "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/mappings', {
  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/mappings",
    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/mappings' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": [
        {
            "id": 1,
            "slug": "default",
            "name": "Default",
            "organisation_id": 1,
            "fields": {},
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z"
        }
    ]
}