Purchase Orders

Working with purchase orders.

List Purchase Orders

GET /v1/purchase_orders

List purchase orders.

Return Type

PurchaseOrders

Filters

FieldOperatorsValue List URL
searchLIKEfuzzy search across selected attributes
product_channel_idIN, NOT_IN/v1/products/channels
product_component_supplier_idIN, NOT_IN
statusIN, NOT_IN
purchase_order_type_idIN, NOT_IN
completed_dateLESS_THAN, ON_DATE, MORE_THAN

Sortings

Results can be sorted by the following keys: created, id, warehouse.name.

Available expands

FieldReturn TypeDescription
channelCachedProductChannelCached product channel.
currencySummarisedCurrencyA currency.
goodsinsarray<PurchaseOrderGoodsins>One shipment to a purchase order.
goodsins.itemsarray<PurchaseOrderGoodsinItems>Received items for a goodsin.
referencesarray<PurchaseOrderReferences>Purchase order references.
supplierProductComponentSuppliersProduct Suppliers.
supplier.currencySummarisedCurrencyA currency.
typePurchaseOrderTypesTypes of purchase orders
warehouseSummarisedWarehouseA warehouse.
warehouse.countrySummarisedCountryA country.

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

<?php

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

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

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 125,
        "product_channel_id": 12,
        "purchase_order_type_id": 1,
        "product_component_supplier_id": 500,
        "warehouse_id": 1,
        "currency_id": 1,
        "status": "open",
        "notification_email_addresses": "support.team@i-fulfilment.co.uk",
        "comments": "Sample comments.",
        "reject_reason": null,
        "approved_date": "2019-11-25T14:52:56.000Z",
        "completed_date": "2019-11-25T14:52:56.000Z",
        "discount": 0,
        "discount_type": "value",
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z",
        "warehouse": {
            "id": 1,
            "short_code": "CHR",
            "name": "Christchurch"
        },
        "currency": {
            "code": "GBP",
            "name": "British Pound",
            "symbol": "£"
        },
        "channel": {
            "id": 1,
            "name": "Demo Channel",
            "default_warehouse_id": 1,
            "global": false
        },
        "type": {
            "id": 1,
            "code": "standard",
            "name": "Standard",
            "description": "Check-in and put away to locations"
        },
        "supplier": {
            "id": 6,
            "organisation_id": 1,
            "name": "Demo Supplier",
            "active": true,
            "port_id": 4,
            "currency_code": "GBP",
            "nominal_code": "5000",
            "xero_code": "ABC/9/99",
            "organisation_tax_id": 1
        },
        "goodsins": [
            {
                "id": 174,
                "source": "API",
                "shipping_company": "DHL",
                "tracking_number": "DHL-TN-1209341234",
                "expected_pallets": 32,
                "expected_cartons": 3200,
                "received_pallets": 32,
                "received_cartons": 3200,
                "received_container": "20FT",
                "container_shipment": true,
                "container_size": "full",
                "expected_delivery_date": "2019-11-25T14:52:56.000Z",
                "expected_delivery_time_slot": "am",
                "preferred_delivery_date": "2019-11-25T14:52:56.000Z",
                "preferred_delivery_time_slot": "am",
                "shipping_method": "sea",
                "port_id": 4,
                "purchase_order_goodsin_shipping_term_id": 1,
                "status": "completed",
                "is_third_party": false,
                "third_party_emails": null,
                "third_party_contact_name": null,
                "booking_requested": "2019-11-25T14:52:56.000Z",
                "booking_approved_by": 1,
                "booking_approved": "2019-11-25T14:52:56.000Z",
                "unique_booking_reference": "UQBR-2020/10934934",
                "check_in_by": "2019-11-25T14:52:56.000Z",
                "transport_costs_locked": "2019-11-25T14:52:56.000Z",
                "lock_user_id": 1,
                "receiving_started": "2019-11-25T14:52:56.000Z",
                "receiving_completed": "2019-11-25T14:52:56.000Z",
                "checkin_started": "2019-11-25T14:52:56.000Z",
                "checkin_completed": "2019-11-25T14:52:56.000Z",
                "putaway_started": "2019-11-25T14:52:56.000Z",
                "putaway_completed": "2019-11-25T14:52:56.000Z",
                "ignore_from_billing": false,
                "returns_damaged_count": 0,
                "returns_unidentifiable_count": 0,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "items": [
                    {
                        "id": 123124,
                        "product_component_id": 1,
                        "quantity": 34,
                        "expiry_date": null,
                        "product_component_batch_id": 52567,
                        "purchase_order_goodsin_item_issue_id": 78,
                        "product_component_cost_price_id": 54349,
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z",
                        "count_audit_ids": 0
                    }
                ]
            }
        ],
        "references": [
            {
                "name": "Supplier",
                "value": "SO25115481514"
            }
        ]
    }
}

Create Purchase Order

POST /v1/purchase_orders

Creates a purchase order.

Request Body

CreatePurchaseOrder

Return Type

PurchaseOrders

Types for the Request Body

CreatePurchaseOrder (root level)

KeyDescriptionTypesRestrictions
product_channel_idProduct channel ID.numberrequired
not null
product_component_supplier_idSupplier ID.numberrequired
not null
referencesList of references.array<Reference>not null
warehouse_codeWarehouse code.stringrequired
not null
min length is 1
currency_codeCurrency codestringrequired
not null
min length is 3
max length is 3
goodsinFirst goodsin.Goodsinrequired
not null
linesProducts ordered.array<Line>not null

Goodsin

KeyDescriptionTypesRestrictions
expected_palletsNumber of expected pallets.integerrequired
not null
min is 0
expected_cartonsNumber of expected cartons.integerrequired
not null
min is 0
shipping_companyName of the shipping company.stringnot null
tracking_numberTracking number for the shipment.stringnot null
shipping_methodMethod of travel.enum(air, sea, road)required
not null
expected_delivery_dateExpected delivery date.daterequired
not null

Line

KeyDescriptionTypesRestrictions
skuProduct SKU.stringoptionally required
not null
min length is 1
match is /^[0-9a-z_.-]+$/i
product_component_idProduct component ID.integeroptionally required
not null
min is 1
quantityOrdered quantity.integerrequired
not null
min is 1
cost_priceCost price.numbernot null
min is 0
dutyDuty rate.numbernot null
min is 0
batch_methodThe way to handle batch code capturing. If set to ‘predefined’, a product component batch ID will also need to be supplied.enum(predefined, capture)
batch_codeIf the batch code capturing is predefined, supply a batch code reference.stringoptionally required
min length is 1

Reference

KeyDescriptionTypesRestrictions
nameName.stringrequired
not null
valueValue.stringrequired
not null

Available expands

FieldReturn TypeDescription
channelCachedProductChannelCached product channel.
currencySummarisedCurrencyA currency.
goodsinsarray<PurchaseOrderGoodsins>One shipment to a purchase order.
goodsins.consignment_qualitiesarray<ConsignmentQualities>Consignment quality description.
goodsins.containersarray<PurchaseOrderGoodsinContainers>A container for a goodsin.
goodsins.itemsarray<PurchaseOrderGoodsinItems>Received items for a goodsin.
goodsins.items.batchProductComponentBatchesDescription of a batch.
goodsins.items.componentProductComponentsProduct component.
goodsins.items.component.doqsarray<ProductComponentDoqs>Product component DOQ.
goodsins.items.component.doqs.typeProductComponentDoqTypesProduct component DOQ Types.
goodsins.items.component.last_costProductComponentLandedPricesLanded prices.
goodsins.items.component.last_cost.cost_currencyCurrenciesCurrency data.
goodsins.items.component.last_cost.landed_currencySummarisedCurrencyA currency.
goodsins.items.component.salesProductComponentSalesSummarySales summary for a product.
goodsins.items.component.stockProductComponentStockSummaryStock summary for a product component.
goodsins.items.costProductComponentCostPricesA cost price.
goodsins.items.cost.currencySummarisedCurrencyA currency.
goodsins.items.cost.transportsProductComponentCostPriceTransportsTransport costs.
goodsins.portPortsShipping ports.
linesarray<PurchaseOrderLines>An item ordered in a purchase order.
lines.componentProductComponentsProduct component.
lines.component.doqsarray<ProductComponentDoqs>Product component DOQ.
lines.component.doqs.typeProductComponentDoqTypesProduct component DOQ Types.
lines.component.last_costProductComponentLandedPricesLanded prices.
lines.component.last_cost.cost_currencyCurrenciesCurrency data.
lines.component.last_cost.landed_currencySummarisedCurrencyA currency.
lines.component.salesProductComponentSalesSummarySales summary for a product.
lines.component.stockProductComponentStockSummaryStock summary for a product component.
lines.doqProductComponentDoqsProduct component DOQ.
paymentsarray<PurchaseOrderPayments>Payments made towards purchase order suppliers.
payments.currencySummarisedCurrencyA currency.
referencesarray<PurchaseOrderReferences>Purchase order references.
supplierProductComponentSuppliersProduct Suppliers.
supplier.currencySummarisedCurrencyA currency.
tagsarray<Tags>A tag.
typePurchaseOrderTypesTypes of purchase orders
warehouseSummarisedWarehouseA warehouse.
warehouse.countrySummarisedCountryA country.

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::PURCHASE-ORDERS::MANAGE.

<?php

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

// Make the request
$response = $client->request("POST", "https://public-api.bladepro.io/v1/purchase_orders?expand=*", [
    "body" => json_encode([
        "product_channel_id" => 1,
        "product_component_supplier_id" => 6,
        "references" => [
            [
                "name" => "Supplier",
                "value" => "SO25115481514",
            ],
        ],
        "warehouse_code" => "CHR",
        "currency_code" => "GBP",
        "goodsin" => [
            "expected_pallets" => 32,
            "expected_cartons" => 3200,
            "shipping_company" => "DHL",
            "tracking_number" => "DHL-TN-1209341234",
            "shipping_method" => "sea",
            "expected_delivery_date" => "2026-09-01T07:38:34.704Z",
        ],
        "lines" => [
            [
                "sku" => "DEMO-SKU-01",
                "product_component_id" => null,
                "quantity" => 3200,
                "cost_price" => 156.5,
                "duty" => 14.5,
                "batch_method" => "capture",
                "batch_code" => null,
            ],
        ],
    ]),
    "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/purchase_orders?expand=*', {
  product_channel_id: 1,
  product_component_supplier_id: 6,
  references: [
    {
      name: "Supplier",
      value: "SO25115481514",
    },
  ],
  warehouse_code: "CHR",
  currency_code: "GBP",
  goodsin: {
    expected_pallets: 32,
    expected_cartons: 3200,
    shipping_company: "DHL",
    tracking_number: "DHL-TN-1209341234",
    shipping_method: "sea",
    expected_delivery_date: "2026-09-01T07:38:34.704Z",
  },
  lines: [
    {
      sku: "DEMO-SKU-01",
      product_component_id: nil,
      quantity: 3200,
      cost_price: 156.5,
      duty: 14.5,
      batch_method: "capture",
      batch_code: nil,
    },
  ],
}, {
  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/purchase_orders?expand=*",
    body: {
        "product_channel_id": 1,
        "product_component_supplier_id": 6,
        "references": [
            {
                "name": "Supplier",
                "value": "SO25115481514"
            }
        ],
        "warehouse_code": "CHR",
        "currency_code": "GBP",
        "goodsin": {
            "expected_pallets": 32,
            "expected_cartons": 3200,
            "shipping_company": "DHL",
            "tracking_number": "DHL-TN-1209341234",
            "shipping_method": "sea",
            "expected_delivery_date": "2026-09-01T07:38:34.704Z"
        },
        "lines": [
            {
                "sku": "DEMO-SKU-01",
                "product_component_id": null,
                "quantity": 3200,
                "cost_price": 156.5,
                "duty": 14.5,
                "batch_method": "capture",
                "batch_code": null
            }
        ]
    },
    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/purchase_orders?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "product_channel_id": 1,
    "product_component_supplier_id": 6,
    "references": [
        {
            "name": "Supplier",
            "value": "SO25115481514"
        }
    ],
    "warehouse_code": "CHR",
    "currency_code": "GBP",
    "goodsin": {
        "expected_pallets": 32,
        "expected_cartons": 3200,
        "shipping_company": "DHL",
        "tracking_number": "DHL-TN-1209341234",
        "shipping_method": "sea",
        "expected_delivery_date": "2026-09-01T07:38:34.704Z"
    },
    "lines": [
        {
            "sku": "DEMO-SKU-01",
            "product_component_id": null,
            "quantity": 3200,
            "cost_price": 156.5,
            "duty": 14.5,
            "batch_method": "capture",
            "batch_code": null
        }
    ]
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 125,
        "product_channel_id": 12,
        "purchase_order_type_id": 1,
        "product_component_supplier_id": 500,
        "warehouse_id": 1,
        "currency_id": 1,
        "status": "open",
        "notification_email_addresses": "support.team@i-fulfilment.co.uk",
        "comments": "Sample comments.",
        "reject_reason": null,
        "approved_date": "2019-11-25T14:52:56.000Z",
        "completed_date": "2019-11-25T14:52:56.000Z",
        "discount": 0,
        "discount_type": "value",
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z",
        "warehouse": {
            "id": 1,
            "short_code": "CHR",
            "name": "Christchurch"
        },
        "currency": {
            "code": "GBP",
            "name": "British Pound",
            "symbol": "£"
        },
        "channel": {
            "id": 1,
            "name": "Demo Channel",
            "default_warehouse_id": 1,
            "global": false
        },
        "type": {
            "id": 1,
            "code": "standard",
            "name": "Standard",
            "description": "Check-in and put away to locations"
        },
        "supplier": {
            "id": 6,
            "organisation_id": 1,
            "name": "Demo Supplier",
            "active": true,
            "port_id": 4,
            "currency_code": "GBP",
            "nominal_code": "5000",
            "xero_code": "ABC/9/99",
            "organisation_tax_id": 1
        },
        "lines": {
            "id": 3423,
            "product_component_id": 34309,
            "name": "Green ball",
            "quantity": 5000,
            "cost_price": 12.4,
            "duty": 0,
            "capture_batch_code_on_checkin": null,
            "batch_code": null,
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z",
            "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",
                "last_cost": {
                    "id": 2923,
                    "product_component_instance_id": 44309,
                    "product_component_id": 34309,
                    "net_cost_price": 12.4,
                    "cost_price_currency_code": "GBP",
                    "cost_currency": {
                        "id": 1,
                        "code": "GBP",
                        "name": "Great British Pounds",
                        "symbol": "£",
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z"
                    },
                    "cost_price_duty_rate": 1,
                    "notes": "Example notes.",
                    "landed_price_currency_code": "GBP",
                    "landed_currency": {
                        "id": 1,
                        "code": "GBP",
                        "name": "Great British Pounds",
                        "symbol": "£",
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z"
                    },
                    "stock": 1354,
                    "created": "2019-11-25T14:52:56.000Z",
                    "landed_price": 12.9
                },
                "stock": {
                    "total": 35,
                    "total_saleable": 34,
                    "saleable": 34,
                    "pickable": 34,
                    "available": 34,
                    "allocated": 0,
                    "reserved": 0,
                    "misc": 1,
                    "gistock": 0,
                    "expected": 5,
                    "picked": 0,
                    "under_investigation": 1
                },
                "count_product_component_batches": 1,
                "sales": {
                    "1_week": 54,
                    "1_month": 220,
                    "3_months": 583,
                    "6_months": 1124,
                    "1_year": 2930,
                    "lifetime": 2930
                },
                "batch_codes_enabled": "enabled"
            },
            "doq": {
                "id": 1,
                "quantity": 1,
                "weight": 1.45,
                "depth": 1000,
                "width": 1500,
                "height": 1000,
                "shippable": true,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z"
            }
        },
        "payments": [
            {
                "id": 94324,
                "name": "30% deposit",
                "amount": 10000,
                "currency_code": "GBP",
                "effective_date": "2019-11-25T14:52:56.000Z",
                "currency": {
                    "code": "GBP",
                    "name": "British Pound",
                    "symbol": "£"
                }
            }
        ],
        "goodsins": [
            {
                "id": 174,
                "source": "API",
                "shipping_company": "DHL",
                "tracking_number": "DHL-TN-1209341234",
                "expected_pallets": 32,
                "expected_cartons": 3200,
                "received_pallets": 32,
                "received_cartons": 3200,
                "received_container": "20FT",
                "container_shipment": true,
                "container_size": "full",
                "expected_delivery_date": "2019-11-25T14:52:56.000Z",
                "expected_delivery_time_slot": "am",
                "preferred_delivery_date": "2019-11-25T14:52:56.000Z",
                "preferred_delivery_time_slot": "am",
                "shipping_method": "sea",
                "port_id": 4,
                "purchase_order_goodsin_shipping_term_id": 1,
                "status": "completed",
                "is_third_party": false,
                "third_party_emails": null,
                "third_party_contact_name": null,
                "booking_requested": "2019-11-25T14:52:56.000Z",
                "booking_approved_by": 1,
                "booking_approved": "2019-11-25T14:52:56.000Z",
                "unique_booking_reference": "UQBR-2020/10934934",
                "check_in_by": "2019-11-25T14:52:56.000Z",
                "transport_costs_locked": "2019-11-25T14:52:56.000Z",
                "lock_user_id": 1,
                "receiving_started": "2019-11-25T14:52:56.000Z",
                "receiving_completed": "2019-11-25T14:52:56.000Z",
                "checkin_started": "2019-11-25T14:52:56.000Z",
                "checkin_completed": "2019-11-25T14:52:56.000Z",
                "putaway_started": "2019-11-25T14:52:56.000Z",
                "putaway_completed": "2019-11-25T14:52:56.000Z",
                "ignore_from_billing": false,
                "returns_damaged_count": 0,
                "returns_unidentifiable_count": 0,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "items": [
                    {
                        "id": 123124,
                        "product_component_id": 1,
                        "quantity": 34,
                        "expiry_date": null,
                        "product_component_batch_id": 52567,
                        "purchase_order_goodsin_item_issue_id": 78,
                        "product_component_cost_price_id": 54349,
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z",
                        "count_audit_ids": 0
                    }
                ]
            }
        ],
        "tags": [
            {
                "id": 1,
                "name": "Processed",
                "shortcode": "PROCESSED",
                "description": "Marked a as processed by XYZ system",
                "created": "2019-11-25T14:52:56.000Z"
            }
        ],
        "references": [
            {
                "name": "Supplier",
                "value": "SO25115481514"
            }
        ]
    }
}

Create Fast-Track Purchase Order

POST /v1/purchase_orders/fast_track

Creates a fast-track purchase order.

Fast track Purchase Orders are a simplified purchase order that can only be used if enabled in a warehouse and on an organisation using our SaaS product.They should only be used with authorisation from your SaaS Account Manager. For further details please contact the SaaS team.

Request Body

CreateFastTrackPurchaseOrder

Return Type

PurchaseOrders

Types for the Request Body

CreateFastTrackPurchaseOrder (root level)

KeyDescriptionTypesRestrictions
warehouse_codeWarehouse code.stringrequired
not null
min length is 1
product_channel_idProduct channel ID.numberrequired
not null
currency_codeCurrency codestringrequired
not null
min length is 3
max length is 3
referenceReference value.stringrequired
not null
linesProducts ordered.array<Line>required
not null
min count is 1

Line

KeyDescriptionTypesRestrictions
skuProduct SKU.stringrequired
not null
min length is 1
match is /^[0-9a-z_-]+$/i
quantityOrdered quantity.integerrequired
not null
min is 1

Available expands

FieldReturn TypeDescription
channelCachedProductChannelCached product channel.
currencySummarisedCurrencyA currency.
goodsinsarray<PurchaseOrderGoodsins>One shipment to a purchase order.
goodsins.consignment_qualitiesarray<ConsignmentQualities>Consignment quality description.
goodsins.containersarray<PurchaseOrderGoodsinContainers>A container for a goodsin.
goodsins.itemsarray<PurchaseOrderGoodsinItems>Received items for a goodsin.
goodsins.items.batchProductComponentBatchesDescription of a batch.
goodsins.items.componentProductComponentsProduct component.
goodsins.items.component.doqsarray<ProductComponentDoqs>Product component DOQ.
goodsins.items.component.doqs.typeProductComponentDoqTypesProduct component DOQ Types.
goodsins.items.component.last_costProductComponentLandedPricesLanded prices.
goodsins.items.component.last_cost.cost_currencyCurrenciesCurrency data.
goodsins.items.component.last_cost.landed_currencySummarisedCurrencyA currency.
goodsins.items.component.salesProductComponentSalesSummarySales summary for a product.
goodsins.items.component.stockProductComponentStockSummaryStock summary for a product component.
goodsins.items.costProductComponentCostPricesA cost price.
goodsins.items.cost.currencySummarisedCurrencyA currency.
goodsins.items.cost.transportsProductComponentCostPriceTransportsTransport costs.
goodsins.portPortsShipping ports.
linesarray<PurchaseOrderLines>An item ordered in a purchase order.
lines.componentProductComponentsProduct component.
lines.component.doqsarray<ProductComponentDoqs>Product component DOQ.
lines.component.doqs.typeProductComponentDoqTypesProduct component DOQ Types.
lines.component.last_costProductComponentLandedPricesLanded prices.
lines.component.last_cost.cost_currencyCurrenciesCurrency data.
lines.component.last_cost.landed_currencySummarisedCurrencyA currency.
lines.component.salesProductComponentSalesSummarySales summary for a product.
lines.component.stockProductComponentStockSummaryStock summary for a product component.
lines.doqProductComponentDoqsProduct component DOQ.
paymentsarray<PurchaseOrderPayments>Payments made towards purchase order suppliers.
payments.currencySummarisedCurrencyA currency.
referencesarray<PurchaseOrderReferences>Purchase order references.
supplierProductComponentSuppliersProduct Suppliers.
supplier.currencySummarisedCurrencyA currency.
tagsarray<Tags>A tag.
typePurchaseOrderTypesTypes of purchase orders
warehouseSummarisedWarehouseA warehouse.
warehouse.countrySummarisedCountryA country.

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::PURCHASE-ORDERS::MANAGE.

<?php

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

// Make the request
$response = $client->request("POST", "https://public-api.bladepro.io/v1/purchase_orders/fast_track?expand=*", [
    "body" => json_encode([
        "warehouse_code" => "CHR",
        "product_channel_id" => 1,
        "currency_code" => "GBP",
        "reference" => "SO25115481514",
        "lines" => [
            [
                "sku" => "DEMO-SKU-01",
                "quantity" => 3200,
            ],
        ],
    ]),
    "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/purchase_orders/fast_track?expand=*', {
  warehouse_code: "CHR",
  product_channel_id: 1,
  currency_code: "GBP",
  reference: "SO25115481514",
  lines: [
    {
      sku: "DEMO-SKU-01",
      quantity: 3200,
    },
  ],
}, {
  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/purchase_orders/fast_track?expand=*",
    body: {
        "warehouse_code": "CHR",
        "product_channel_id": 1,
        "currency_code": "GBP",
        "reference": "SO25115481514",
        "lines": [
            {
                "sku": "DEMO-SKU-01",
                "quantity": 3200
            }
        ]
    },
    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/purchase_orders/fast_track?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "warehouse_code": "CHR",
    "product_channel_id": 1,
    "currency_code": "GBP",
    "reference": "SO25115481514",
    "lines": [
        {
            "sku": "DEMO-SKU-01",
            "quantity": 3200
        }
    ]
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 125,
        "product_channel_id": 12,
        "purchase_order_type_id": 1,
        "product_component_supplier_id": 500,
        "warehouse_id": 1,
        "currency_id": 1,
        "status": "open",
        "notification_email_addresses": "support.team@i-fulfilment.co.uk",
        "comments": "Sample comments.",
        "reject_reason": null,
        "approved_date": "2019-11-25T14:52:56.000Z",
        "completed_date": "2019-11-25T14:52:56.000Z",
        "discount": 0,
        "discount_type": "value",
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z",
        "warehouse": {
            "id": 1,
            "short_code": "CHR",
            "name": "Christchurch"
        },
        "currency": {
            "code": "GBP",
            "name": "British Pound",
            "symbol": "£"
        },
        "channel": {
            "id": 1,
            "name": "Demo Channel",
            "default_warehouse_id": 1,
            "global": false
        },
        "type": {
            "id": 1,
            "code": "standard",
            "name": "Standard",
            "description": "Check-in and put away to locations"
        },
        "supplier": {
            "id": 6,
            "organisation_id": 1,
            "name": "Demo Supplier",
            "active": true,
            "port_id": 4,
            "currency_code": "GBP",
            "nominal_code": "5000",
            "xero_code": "ABC/9/99",
            "organisation_tax_id": 1
        },
        "lines": {
            "id": 3423,
            "product_component_id": 34309,
            "name": "Green ball",
            "quantity": 5000,
            "cost_price": 12.4,
            "duty": 0,
            "capture_batch_code_on_checkin": null,
            "batch_code": null,
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z",
            "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",
                "last_cost": {
                    "id": 2923,
                    "product_component_instance_id": 44309,
                    "product_component_id": 34309,
                    "net_cost_price": 12.4,
                    "cost_price_currency_code": "GBP",
                    "cost_currency": {
                        "id": 1,
                        "code": "GBP",
                        "name": "Great British Pounds",
                        "symbol": "£",
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z"
                    },
                    "cost_price_duty_rate": 1,
                    "notes": "Example notes.",
                    "landed_price_currency_code": "GBP",
                    "landed_currency": {
                        "id": 1,
                        "code": "GBP",
                        "name": "Great British Pounds",
                        "symbol": "£",
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z"
                    },
                    "stock": 1354,
                    "created": "2019-11-25T14:52:56.000Z",
                    "landed_price": 12.9
                },
                "stock": {
                    "total": 35,
                    "total_saleable": 34,
                    "saleable": 34,
                    "pickable": 34,
                    "available": 34,
                    "allocated": 0,
                    "reserved": 0,
                    "misc": 1,
                    "gistock": 0,
                    "expected": 5,
                    "picked": 0,
                    "under_investigation": 1
                },
                "count_product_component_batches": 1,
                "sales": {
                    "1_week": 54,
                    "1_month": 220,
                    "3_months": 583,
                    "6_months": 1124,
                    "1_year": 2930,
                    "lifetime": 2930
                },
                "batch_codes_enabled": "enabled"
            },
            "doq": {
                "id": 1,
                "quantity": 1,
                "weight": 1.45,
                "depth": 1000,
                "width": 1500,
                "height": 1000,
                "shippable": true,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z"
            }
        },
        "payments": [
            {
                "id": 94324,
                "name": "30% deposit",
                "amount": 10000,
                "currency_code": "GBP",
                "effective_date": "2019-11-25T14:52:56.000Z",
                "currency": {
                    "code": "GBP",
                    "name": "British Pound",
                    "symbol": "£"
                }
            }
        ],
        "goodsins": [
            {
                "id": 174,
                "source": "API",
                "shipping_company": "DHL",
                "tracking_number": "DHL-TN-1209341234",
                "expected_pallets": 32,
                "expected_cartons": 3200,
                "received_pallets": 32,
                "received_cartons": 3200,
                "received_container": "20FT",
                "container_shipment": true,
                "container_size": "full",
                "expected_delivery_date": "2019-11-25T14:52:56.000Z",
                "expected_delivery_time_slot": "am",
                "preferred_delivery_date": "2019-11-25T14:52:56.000Z",
                "preferred_delivery_time_slot": "am",
                "shipping_method": "sea",
                "port_id": 4,
                "purchase_order_goodsin_shipping_term_id": 1,
                "status": "completed",
                "is_third_party": false,
                "third_party_emails": null,
                "third_party_contact_name": null,
                "booking_requested": "2019-11-25T14:52:56.000Z",
                "booking_approved_by": 1,
                "booking_approved": "2019-11-25T14:52:56.000Z",
                "unique_booking_reference": "UQBR-2020/10934934",
                "check_in_by": "2019-11-25T14:52:56.000Z",
                "transport_costs_locked": "2019-11-25T14:52:56.000Z",
                "lock_user_id": 1,
                "receiving_started": "2019-11-25T14:52:56.000Z",
                "receiving_completed": "2019-11-25T14:52:56.000Z",
                "checkin_started": "2019-11-25T14:52:56.000Z",
                "checkin_completed": "2019-11-25T14:52:56.000Z",
                "putaway_started": "2019-11-25T14:52:56.000Z",
                "putaway_completed": "2019-11-25T14:52:56.000Z",
                "ignore_from_billing": false,
                "returns_damaged_count": 0,
                "returns_unidentifiable_count": 0,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "items": [
                    {
                        "id": 123124,
                        "product_component_id": 1,
                        "quantity": 34,
                        "expiry_date": null,
                        "product_component_batch_id": 52567,
                        "purchase_order_goodsin_item_issue_id": 78,
                        "product_component_cost_price_id": 54349,
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z",
                        "count_audit_ids": 0
                    }
                ]
            }
        ],
        "tags": [
            {
                "id": 1,
                "name": "Processed",
                "shortcode": "PROCESSED",
                "description": "Marked a as processed by XYZ system",
                "created": "2019-11-25T14:52:56.000Z"
            }
        ],
        "references": [
            {
                "name": "Supplier",
                "value": "SO25115481514"
            }
        ]
    }
}

View Purchase Order

GET /v1/purchase_orders/:id

Retrieve one purchase order.

Parameter Regular Expressions

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

Return Type

PurchaseOrders

Available expands

FieldReturn TypeDescription
channelCachedProductChannelCached product channel.
currencySummarisedCurrencyA currency.
goodsinsarray<PurchaseOrderGoodsins>One shipment to a purchase order.
goodsins.consignment_qualitiesarray<ConsignmentQualities>Consignment quality description.
goodsins.containersarray<PurchaseOrderGoodsinContainers>A container for a goodsin.
goodsins.itemsarray<PurchaseOrderGoodsinItems>Received items for a goodsin.
goodsins.items.batchProductComponentBatchesDescription of a batch.
goodsins.items.componentProductComponentsProduct component.
goodsins.items.component.doqsarray<ProductComponentDoqs>Product component DOQ.
goodsins.items.component.doqs.typeProductComponentDoqTypesProduct component DOQ Types.
goodsins.items.component.last_costProductComponentLandedPricesLanded prices.
goodsins.items.component.last_cost.cost_currencyCurrenciesCurrency data.
goodsins.items.component.last_cost.landed_currencySummarisedCurrencyA currency.
goodsins.items.component.salesProductComponentSalesSummarySales summary for a product.
goodsins.items.component.stockProductComponentStockSummaryStock summary for a product component.
goodsins.items.costProductComponentCostPricesA cost price.
goodsins.items.cost.currencySummarisedCurrencyA currency.
goodsins.items.cost.transportsProductComponentCostPriceTransportsTransport costs.
goodsins.portPortsShipping ports.
linesarray<PurchaseOrderLines>An item ordered in a purchase order.
lines.componentProductComponentsProduct component.
lines.component.doqsarray<ProductComponentDoqs>Product component DOQ.
lines.component.doqs.typeProductComponentDoqTypesProduct component DOQ Types.
lines.component.last_costProductComponentLandedPricesLanded prices.
lines.component.last_cost.cost_currencyCurrenciesCurrency data.
lines.component.last_cost.landed_currencySummarisedCurrencyA currency.
lines.component.salesProductComponentSalesSummarySales summary for a product.
lines.component.stockProductComponentStockSummaryStock summary for a product component.
lines.doqProductComponentDoqsProduct component DOQ.
paymentsarray<PurchaseOrderPayments>Payments made towards purchase order suppliers.
payments.currencySummarisedCurrencyA currency.
referencesarray<PurchaseOrderReferences>Purchase order references.
supplierProductComponentSuppliersProduct Suppliers.
supplier.currencySummarisedCurrencyA currency.
tagsarray<Tags>A tag.
typePurchaseOrderTypesTypes of purchase orders
warehouseSummarisedWarehouseA warehouse.
warehouse.countrySummarisedCountryA country.

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

<?php

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

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

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 125,
        "product_channel_id": 12,
        "purchase_order_type_id": 1,
        "product_component_supplier_id": 500,
        "warehouse_id": 1,
        "currency_id": 1,
        "status": "open",
        "notification_email_addresses": "support.team@i-fulfilment.co.uk",
        "comments": "Sample comments.",
        "reject_reason": null,
        "approved_date": "2019-11-25T14:52:56.000Z",
        "completed_date": "2019-11-25T14:52:56.000Z",
        "discount": 0,
        "discount_type": "value",
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z",
        "warehouse": {
            "id": 1,
            "short_code": "CHR",
            "name": "Christchurch"
        },
        "currency": {
            "code": "GBP",
            "name": "British Pound",
            "symbol": "£"
        },
        "channel": {
            "id": 1,
            "name": "Demo Channel",
            "default_warehouse_id": 1,
            "global": false
        },
        "type": {
            "id": 1,
            "code": "standard",
            "name": "Standard",
            "description": "Check-in and put away to locations"
        },
        "supplier": {
            "id": 6,
            "organisation_id": 1,
            "name": "Demo Supplier",
            "active": true,
            "port_id": 4,
            "currency_code": "GBP",
            "nominal_code": "5000",
            "xero_code": "ABC/9/99",
            "organisation_tax_id": 1
        },
        "lines": {
            "id": 3423,
            "product_component_id": 34309,
            "name": "Green ball",
            "quantity": 5000,
            "cost_price": 12.4,
            "duty": 0,
            "capture_batch_code_on_checkin": null,
            "batch_code": null,
            "created": "2019-11-25T14:52:56.000Z",
            "modified": "2019-11-25T14:52:56.000Z",
            "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",
                "last_cost": {
                    "id": 2923,
                    "product_component_instance_id": 44309,
                    "product_component_id": 34309,
                    "net_cost_price": 12.4,
                    "cost_price_currency_code": "GBP",
                    "cost_currency": {
                        "id": 1,
                        "code": "GBP",
                        "name": "Great British Pounds",
                        "symbol": "£",
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z"
                    },
                    "cost_price_duty_rate": 1,
                    "notes": "Example notes.",
                    "landed_price_currency_code": "GBP",
                    "landed_currency": {
                        "id": 1,
                        "code": "GBP",
                        "name": "Great British Pounds",
                        "symbol": "£",
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z"
                    },
                    "stock": 1354,
                    "created": "2019-11-25T14:52:56.000Z",
                    "landed_price": 12.9
                },
                "stock": {
                    "total": 35,
                    "total_saleable": 34,
                    "saleable": 34,
                    "pickable": 34,
                    "available": 34,
                    "allocated": 0,
                    "reserved": 0,
                    "misc": 1,
                    "gistock": 0,
                    "expected": 5,
                    "picked": 0,
                    "under_investigation": 1
                },
                "count_product_component_batches": 1,
                "sales": {
                    "1_week": 54,
                    "1_month": 220,
                    "3_months": 583,
                    "6_months": 1124,
                    "1_year": 2930,
                    "lifetime": 2930
                },
                "batch_codes_enabled": "enabled"
            },
            "doq": {
                "id": 1,
                "quantity": 1,
                "weight": 1.45,
                "depth": 1000,
                "width": 1500,
                "height": 1000,
                "shippable": true,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z"
            }
        },
        "payments": [
            {
                "id": 94324,
                "name": "30% deposit",
                "amount": 10000,
                "currency_code": "GBP",
                "effective_date": "2019-11-25T14:52:56.000Z",
                "currency": {
                    "code": "GBP",
                    "name": "British Pound",
                    "symbol": "£"
                }
            }
        ],
        "goodsins": [
            {
                "id": 174,
                "source": "API",
                "shipping_company": "DHL",
                "tracking_number": "DHL-TN-1209341234",
                "expected_pallets": 32,
                "expected_cartons": 3200,
                "received_pallets": 32,
                "received_cartons": 3200,
                "received_container": "20FT",
                "container_shipment": true,
                "container_size": "full",
                "expected_delivery_date": "2019-11-25T14:52:56.000Z",
                "expected_delivery_time_slot": "am",
                "preferred_delivery_date": "2019-11-25T14:52:56.000Z",
                "preferred_delivery_time_slot": "am",
                "shipping_method": "sea",
                "port_id": 4,
                "purchase_order_goodsin_shipping_term_id": 1,
                "status": "completed",
                "is_third_party": false,
                "third_party_emails": null,
                "third_party_contact_name": null,
                "booking_requested": "2019-11-25T14:52:56.000Z",
                "booking_approved_by": 1,
                "booking_approved": "2019-11-25T14:52:56.000Z",
                "unique_booking_reference": "UQBR-2020/10934934",
                "check_in_by": "2019-11-25T14:52:56.000Z",
                "transport_costs_locked": "2019-11-25T14:52:56.000Z",
                "lock_user_id": 1,
                "receiving_started": "2019-11-25T14:52:56.000Z",
                "receiving_completed": "2019-11-25T14:52:56.000Z",
                "checkin_started": "2019-11-25T14:52:56.000Z",
                "checkin_completed": "2019-11-25T14:52:56.000Z",
                "putaway_started": "2019-11-25T14:52:56.000Z",
                "putaway_completed": "2019-11-25T14:52:56.000Z",
                "ignore_from_billing": false,
                "returns_damaged_count": 0,
                "returns_unidentifiable_count": 0,
                "created": "2019-11-25T14:52:56.000Z",
                "modified": "2019-11-25T14:52:56.000Z",
                "items": [
                    {
                        "id": 123124,
                        "product_component_id": 1,
                        "quantity": 34,
                        "expiry_date": null,
                        "product_component_batch_id": 52567,
                        "purchase_order_goodsin_item_issue_id": 78,
                        "product_component_cost_price_id": 54349,
                        "created": "2019-11-25T14:52:56.000Z",
                        "modified": "2019-11-25T14:52:56.000Z",
                        "count_audit_ids": 0
                    }
                ]
            }
        ],
        "tags": [
            {
                "id": 1,
                "name": "Processed",
                "shortcode": "PROCESSED",
                "description": "Marked a as processed by XYZ system",
                "created": "2019-11-25T14:52:56.000Z"
            }
        ],
        "references": [
            {
                "name": "Supplier",
                "value": "SO25115481514"
            }
        ]
    }
}

Cancel a Purchase Order

PUT /v1/purchase_orders/:id/cancel

Cancel a purchase order.

Parameter Regular Expressions

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

Request Body

CancelPurchaseOrder

Return Type

PurchaseOrders

Types for the Request Body

CancelPurchaseOrder (root level)

KeyDescriptionTypesRestrictions
reasonReason for cancellation.stringrequired
not null

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::PURCHASE-ORDERS::MANAGE.

<?php

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

// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/purchase_orders/:id/cancel", [
    "body" => json_encode([
        "reason" => "No longer needed",
    ]),
    "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/purchase_orders/:id/cancel', {
  reason: "No longer needed",
}, {
  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/purchase_orders/:id/cancel",
    body: {
        "reason": "No longer needed"
    },
    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/purchase_orders/:id/cancel' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "reason": "No longer needed"
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 125,
        "product_channel_id": 12,
        "purchase_order_type_id": 1,
        "product_component_supplier_id": 500,
        "warehouse_id": 1,
        "currency_id": 1,
        "status": "open",
        "notification_email_addresses": "support.team@i-fulfilment.co.uk",
        "comments": "Sample comments.",
        "reject_reason": null,
        "approved_date": "2019-11-25T14:52:56.000Z",
        "completed_date": "2019-11-25T14:52:56.000Z",
        "discount": 0,
        "discount_type": "value",
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z"
    }
}

Apply Purchase Order Tag

POST /v1/purchase_orders/:id/tags

Applies a tag to a purchase order.

Parameter Regular Expressions

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

Request Body

ApplyTag

Return Type

PurchaseOrderTags

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::PURCHASE-ORDERS::MANAGE.

<?php

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

// Make the request
$response = $client->request("POST", "https://public-api.bladepro.io/v1/purchase_orders/:id/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/purchase_orders/:id/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/purchase_orders/:id/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/purchase_orders/:id/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 Purchase Order Tag

DELETE /v1/purchase_orders/:id/tags/:tagShortcode

Remove a tag from a purchase order.

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::PURCHASE-ORDERS::MANAGE.

<?php

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

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

Example result:

null

Add Purchase Order Timeline

POST /v1/purchase_orders/:id/timeline

Add a message or note to the timeline.

Parameter Regular Expressions

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

Request Body

CreateAudit

Return Type

PurchaseOrderAudits

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::PURCHASE-ORDERS::MANAGE.

<?php

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

// Make the request
$response = $client->request("POST", "https://public-api.bladepro.io/v1/purchase_orders/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/purchase_orders/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/purchase_orders/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/purchase_orders/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."
    }
}

Confirm and Book In Purchase Order

POST /v1/purchase_orders/:id/arrange_goods_in

Confirm a purchase order.

Parameter Regular Expressions

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

Request Body

ConfirmPurchaseOrder

Return Type

ConfirmBooking

Types for the Request Body

ConfirmPurchaseOrder (root level)

KeyDescriptionTypesRestrictions
container_shipmentContainer shipment.booleanrequired
not null
shipment_sizeShipment size.ShipmentSizerequired
not null
delivery_dateDelivery date.DeliveryDaterequired
not null

DeliveryDate

KeyDescriptionTypesRestrictions
preferred_delivery_datePreferred delivery date.daterequired
not null
preferred_time_slotPreferred delivery time slot.enum(AM, PM)required
not null

ShipmentSize

KeyDescriptionTypesRestrictions
expected_palletsNumber of expected pallets.integeroptionally required
not null
min is 0
expected_cartonsNumber of expected cartons.integeroptionally required
not null
min is 0
expected_20ft_containersNumber of expected 20ft containers.integeroptionally required
not null
min is 0
expected_40ft_containersNumber of expected 40ft containers.integeroptionally required
not null
min is 0
expected_40ft_HC_containersNumber of expected 40ft HC containers.integeroptionally required
not null
min is 0

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::PURCHASE-ORDERS::MANAGE.

<?php

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

// Make the request
$response = $client->request("POST", "https://public-api.bladepro.io/v1/purchase_orders/:id/arrange_goods_in", [
    "body" => json_encode([
        "container_shipment" => true,
        "shipment_size" => [
            "expected_pallets" => 10,
            "expected_cartons" => 10,
            "expected_20ft_containers" => 10,
            "expected_40ft_containers" => 10,
            "expected_40ft_HC_containers" => 10,
        ],
        "delivery_date" => [
            "preferred_delivery_date" => "2024-11-25T14:52:56.000Z",
            "preferred_time_slot" => "AM",
        ],
    ]),
    "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/purchase_orders/:id/arrange_goods_in', {
  container_shipment: true,
  shipment_size: {
    expected_pallets: 10,
    expected_cartons: 10,
    expected_20ft_containers: 10,
    expected_40ft_containers: 10,
    expected_40ft_HC_containers: 10,
  },
  delivery_date: {
    preferred_delivery_date: "2024-11-25T14:52:56.000Z",
    preferred_time_slot: "AM",
  },
}, {
  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/purchase_orders/:id/arrange_goods_in",
    body: {
        "container_shipment": true,
        "shipment_size": {
            "expected_pallets": 10,
            "expected_cartons": 10,
            "expected_20ft_containers": 10,
            "expected_40ft_containers": 10,
            "expected_40ft_HC_containers": 10
        },
        "delivery_date": {
            "preferred_delivery_date": "2024-11-25T14:52:56.000Z",
            "preferred_time_slot": "AM"
        }
    },
    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/purchase_orders/:id/arrange_goods_in' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "container_shipment": true,
    "shipment_size": {
        "expected_pallets": 10,
        "expected_cartons": 10,
        "expected_20ft_containers": 10,
        "expected_40ft_containers": 10,
        "expected_40ft_HC_containers": 10
    },
    "delivery_date": {
        "preferred_delivery_date": "2024-11-25T14:52:56.000Z",
        "preferred_time_slot": "AM"
    }
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "purchase_order_id": 123456,
        "goods_in_id": 987654,
        "expected_date": "2025-08-30",
        "expected_time_slot": "AM"
    }
}

Cancel Goodsin

PUT /v1/purchase_orders/goodsin/:id/cancel

Cancel a goodsin.

Parameter Regular Expressions

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

Request Body

CancelPurchaseOrderGoodsin

Return Type

PurchaseOrderGoodsins

Types for the Request Body

CancelPurchaseOrderGoodsin (root level)

KeyDescriptionTypesRestrictions
reasonReason for cancellation.stringrequired
not null

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::PURCHASE-ORDERS::MANAGE.

<?php

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

// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/purchase_orders/goodsin/:id/cancel", [
    "body" => json_encode([
        "reason" => "No longer needed",
    ]),
    "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/purchase_orders/goodsin/:id/cancel', {
  reason: "No longer needed",
}, {
  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/purchase_orders/goodsin/:id/cancel",
    body: {
        "reason": "No longer needed"
    },
    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/purchase_orders/goodsin/:id/cancel' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "reason": "No longer needed"
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "id": 174,
        "source": "API",
        "shipping_company": "DHL",
        "tracking_number": "DHL-TN-1209341234",
        "expected_pallets": 32,
        "expected_cartons": 3200,
        "received_pallets": 32,
        "received_cartons": 3200,
        "received_container": "20FT",
        "container_shipment": true,
        "container_size": "full",
        "expected_delivery_date": "2019-11-25T14:52:56.000Z",
        "expected_delivery_time_slot": "am",
        "preferred_delivery_date": "2019-11-25T14:52:56.000Z",
        "preferred_delivery_time_slot": "am",
        "shipping_method": "sea",
        "port_id": 4,
        "purchase_order_goodsin_shipping_term_id": 1,
        "status": "completed",
        "is_third_party": false,
        "third_party_emails": null,
        "third_party_contact_name": null,
        "booking_requested": "2019-11-25T14:52:56.000Z",
        "booking_approved_by": 1,
        "booking_approved": "2019-11-25T14:52:56.000Z",
        "unique_booking_reference": "UQBR-2020/10934934",
        "check_in_by": "2019-11-25T14:52:56.000Z",
        "transport_costs_locked": "2019-11-25T14:52:56.000Z",
        "lock_user_id": 1,
        "receiving_started": "2019-11-25T14:52:56.000Z",
        "receiving_completed": "2019-11-25T14:52:56.000Z",
        "checkin_started": "2019-11-25T14:52:56.000Z",
        "checkin_completed": "2019-11-25T14:52:56.000Z",
        "putaway_started": "2019-11-25T14:52:56.000Z",
        "putaway_completed": "2019-11-25T14:52:56.000Z",
        "ignore_from_billing": false,
        "returns_damaged_count": 0,
        "returns_unidentifiable_count": 0,
        "created": "2019-11-25T14:52:56.000Z",
        "modified": "2019-11-25T14:52:56.000Z"
    }
}