Purchase Orders
Working with purchase orders.
List Purchase Orders
GET /v1/purchase_orders
List purchase orders.
Return Type
Filters
| Field | Operators | Value List URL |
|---|---|---|
| search | LIKE | fuzzy search across selected attributes |
| product_channel_id | IN, NOT_IN | /v1/products/channels |
| product_component_supplier_id | IN, NOT_IN | |
| status | IN, NOT_IN | |
| purchase_order_type_id | IN, NOT_IN | |
| completed_date | LESS_THAN, ON_DATE, MORE_THAN |
Sortings
Results can be sorted by the following keys: created, id, warehouse.name.
Available expands
| Field | Return Type | Description |
|---|---|---|
channel | CachedProductChannel | Cached product channel. |
currency | SummarisedCurrency | A currency. |
goodsins | array<PurchaseOrderGoodsins> | One shipment to a purchase order. |
goodsins.items | array<PurchaseOrderGoodsinItems> | Received items for a goodsin. |
references | array<PurchaseOrderReferences> | Purchase order references. |
supplier | ProductComponentSuppliers | Product Suppliers. |
supplier.currency | SummarisedCurrency | A currency. |
type | PurchaseOrderTypes | Types of purchase orders |
warehouse | SummarisedWarehouse | A warehouse. |
warehouse.country | SummarisedCountry | A 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
Return Type
Types for the Request Body
CreatePurchaseOrder (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
product_channel_id | Product channel ID. | number | requirednot null |
product_component_supplier_id | Supplier ID. | number | requirednot null |
references | List of references. | array<Reference> | not null |
warehouse_code | Warehouse code. | string | requirednot nullmin length is 1 |
currency_code | Currency code | string | requirednot nullmin length is 3max length is 3 |
goodsin | First goodsin. | Goodsin | requirednot null |
lines | Products ordered. | array<Line> | not null |
Goodsin
| Key | Description | Types | Restrictions |
|---|---|---|---|
expected_pallets | Number of expected pallets. | integer | requirednot nullmin is 0 |
expected_cartons | Number of expected cartons. | integer | requirednot nullmin is 0 |
shipping_company | Name of the shipping company. | string | not null |
tracking_number | Tracking number for the shipment. | string | not null |
shipping_method | Method of travel. | enum(air, sea, road) | requirednot null |
expected_delivery_date | Expected delivery date. | date | requirednot null |
Line
| Key | Description | Types | Restrictions |
|---|---|---|---|
sku | Product SKU. | string | optionally requirednot nullmin length is 1match is /^[0-9a-z_.-]+$/i |
product_component_id | Product component ID. | integer | optionally requirednot nullmin is 1 |
quantity | Ordered quantity. | integer | requirednot nullmin is 1 |
cost_price | Cost price. | number | not nullmin is 0 |
duty | Duty rate. | number | not nullmin is 0 |
batch_method | The 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_code | If the batch code capturing is predefined, supply a batch code reference. | string | optionally requiredmin length is 1 |
Reference
| Key | Description | Types | Restrictions |
|---|---|---|---|
name | Name. | string | requirednot null |
value | Value. | string | requirednot null |
Available expands
| Field | Return Type | Description |
|---|---|---|
channel | CachedProductChannel | Cached product channel. |
currency | SummarisedCurrency | A currency. |
goodsins | array<PurchaseOrderGoodsins> | One shipment to a purchase order. |
goodsins.consignment_qualities | array<ConsignmentQualities> | Consignment quality description. |
goodsins.containers | array<PurchaseOrderGoodsinContainers> | A container for a goodsin. |
goodsins.items | array<PurchaseOrderGoodsinItems> | Received items for a goodsin. |
goodsins.items.batch | ProductComponentBatches | Description of a batch. |
goodsins.items.component | ProductComponents | Product component. |
goodsins.items.component.doqs | array<ProductComponentDoqs> | Product component DOQ. |
goodsins.items.component.doqs.type | ProductComponentDoqTypes | Product component DOQ Types. |
goodsins.items.component.last_cost | ProductComponentLandedPrices | Landed prices. |
goodsins.items.component.last_cost.cost_currency | Currencies | Currency data. |
goodsins.items.component.last_cost.landed_currency | SummarisedCurrency | A currency. |
goodsins.items.component.sales | ProductComponentSalesSummary | Sales summary for a product. |
goodsins.items.component.stock | ProductComponentStockSummary | Stock summary for a product component. |
goodsins.items.cost | ProductComponentCostPrices | A cost price. |
goodsins.items.cost.currency | SummarisedCurrency | A currency. |
goodsins.items.cost.transports | ProductComponentCostPriceTransports | Transport costs. |
goodsins.port | Ports | Shipping ports. |
lines | array<PurchaseOrderLines> | An item ordered in a purchase order. |
lines.component | ProductComponents | Product component. |
lines.component.doqs | array<ProductComponentDoqs> | Product component DOQ. |
lines.component.doqs.type | ProductComponentDoqTypes | Product component DOQ Types. |
lines.component.last_cost | ProductComponentLandedPrices | Landed prices. |
lines.component.last_cost.cost_currency | Currencies | Currency data. |
lines.component.last_cost.landed_currency | SummarisedCurrency | A currency. |
lines.component.sales | ProductComponentSalesSummary | Sales summary for a product. |
lines.component.stock | ProductComponentStockSummary | Stock summary for a product component. |
lines.doq | ProductComponentDoqs | Product component DOQ. |
payments | array<PurchaseOrderPayments> | Payments made towards purchase order suppliers. |
payments.currency | SummarisedCurrency | A currency. |
references | array<PurchaseOrderReferences> | Purchase order references. |
supplier | ProductComponentSuppliers | Product Suppliers. |
supplier.currency | SummarisedCurrency | A currency. |
tags | array<Tags> | A tag. |
type | PurchaseOrderTypes | Types of purchase orders |
warehouse | SummarisedWarehouse | A warehouse. |
warehouse.country | SummarisedCountry | A 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
Return Type
Types for the Request Body
CreateFastTrackPurchaseOrder (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
warehouse_code | Warehouse code. | string | requirednot nullmin length is 1 |
product_channel_id | Product channel ID. | number | requirednot null |
currency_code | Currency code | string | requirednot nullmin length is 3max length is 3 |
reference | Reference value. | string | requirednot null |
lines | Products ordered. | array<Line> | requirednot nullmin count is 1 |
Line
| Key | Description | Types | Restrictions |
|---|---|---|---|
sku | Product SKU. | string | requirednot nullmin length is 1match is /^[0-9a-z_-]+$/i |
quantity | Ordered quantity. | integer | requirednot nullmin is 1 |
Available expands
| Field | Return Type | Description |
|---|---|---|
channel | CachedProductChannel | Cached product channel. |
currency | SummarisedCurrency | A currency. |
goodsins | array<PurchaseOrderGoodsins> | One shipment to a purchase order. |
goodsins.consignment_qualities | array<ConsignmentQualities> | Consignment quality description. |
goodsins.containers | array<PurchaseOrderGoodsinContainers> | A container for a goodsin. |
goodsins.items | array<PurchaseOrderGoodsinItems> | Received items for a goodsin. |
goodsins.items.batch | ProductComponentBatches | Description of a batch. |
goodsins.items.component | ProductComponents | Product component. |
goodsins.items.component.doqs | array<ProductComponentDoqs> | Product component DOQ. |
goodsins.items.component.doqs.type | ProductComponentDoqTypes | Product component DOQ Types. |
goodsins.items.component.last_cost | ProductComponentLandedPrices | Landed prices. |
goodsins.items.component.last_cost.cost_currency | Currencies | Currency data. |
goodsins.items.component.last_cost.landed_currency | SummarisedCurrency | A currency. |
goodsins.items.component.sales | ProductComponentSalesSummary | Sales summary for a product. |
goodsins.items.component.stock | ProductComponentStockSummary | Stock summary for a product component. |
goodsins.items.cost | ProductComponentCostPrices | A cost price. |
goodsins.items.cost.currency | SummarisedCurrency | A currency. |
goodsins.items.cost.transports | ProductComponentCostPriceTransports | Transport costs. |
goodsins.port | Ports | Shipping ports. |
lines | array<PurchaseOrderLines> | An item ordered in a purchase order. |
lines.component | ProductComponents | Product component. |
lines.component.doqs | array<ProductComponentDoqs> | Product component DOQ. |
lines.component.doqs.type | ProductComponentDoqTypes | Product component DOQ Types. |
lines.component.last_cost | ProductComponentLandedPrices | Landed prices. |
lines.component.last_cost.cost_currency | Currencies | Currency data. |
lines.component.last_cost.landed_currency | SummarisedCurrency | A currency. |
lines.component.sales | ProductComponentSalesSummary | Sales summary for a product. |
lines.component.stock | ProductComponentStockSummary | Stock summary for a product component. |
lines.doq | ProductComponentDoqs | Product component DOQ. |
payments | array<PurchaseOrderPayments> | Payments made towards purchase order suppliers. |
payments.currency | SummarisedCurrency | A currency. |
references | array<PurchaseOrderReferences> | Purchase order references. |
supplier | ProductComponentSuppliers | Product Suppliers. |
supplier.currency | SummarisedCurrency | A currency. |
tags | array<Tags> | A tag. |
type | PurchaseOrderTypes | Types of purchase orders |
warehouse | SummarisedWarehouse | A warehouse. |
warehouse.country | SummarisedCountry | A 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
Available expands
| Field | Return Type | Description |
|---|---|---|
channel | CachedProductChannel | Cached product channel. |
currency | SummarisedCurrency | A currency. |
goodsins | array<PurchaseOrderGoodsins> | One shipment to a purchase order. |
goodsins.consignment_qualities | array<ConsignmentQualities> | Consignment quality description. |
goodsins.containers | array<PurchaseOrderGoodsinContainers> | A container for a goodsin. |
goodsins.items | array<PurchaseOrderGoodsinItems> | Received items for a goodsin. |
goodsins.items.batch | ProductComponentBatches | Description of a batch. |
goodsins.items.component | ProductComponents | Product component. |
goodsins.items.component.doqs | array<ProductComponentDoqs> | Product component DOQ. |
goodsins.items.component.doqs.type | ProductComponentDoqTypes | Product component DOQ Types. |
goodsins.items.component.last_cost | ProductComponentLandedPrices | Landed prices. |
goodsins.items.component.last_cost.cost_currency | Currencies | Currency data. |
goodsins.items.component.last_cost.landed_currency | SummarisedCurrency | A currency. |
goodsins.items.component.sales | ProductComponentSalesSummary | Sales summary for a product. |
goodsins.items.component.stock | ProductComponentStockSummary | Stock summary for a product component. |
goodsins.items.cost | ProductComponentCostPrices | A cost price. |
goodsins.items.cost.currency | SummarisedCurrency | A currency. |
goodsins.items.cost.transports | ProductComponentCostPriceTransports | Transport costs. |
goodsins.port | Ports | Shipping ports. |
lines | array<PurchaseOrderLines> | An item ordered in a purchase order. |
lines.component | ProductComponents | Product component. |
lines.component.doqs | array<ProductComponentDoqs> | Product component DOQ. |
lines.component.doqs.type | ProductComponentDoqTypes | Product component DOQ Types. |
lines.component.last_cost | ProductComponentLandedPrices | Landed prices. |
lines.component.last_cost.cost_currency | Currencies | Currency data. |
lines.component.last_cost.landed_currency | SummarisedCurrency | A currency. |
lines.component.sales | ProductComponentSalesSummary | Sales summary for a product. |
lines.component.stock | ProductComponentStockSummary | Stock summary for a product component. |
lines.doq | ProductComponentDoqs | Product component DOQ. |
payments | array<PurchaseOrderPayments> | Payments made towards purchase order suppliers. |
payments.currency | SummarisedCurrency | A currency. |
references | array<PurchaseOrderReferences> | Purchase order references. |
supplier | ProductComponentSuppliers | Product Suppliers. |
supplier.currency | SummarisedCurrency | A currency. |
tags | array<Tags> | A tag. |
type | PurchaseOrderTypes | Types of purchase orders |
warehouse | SummarisedWarehouse | A warehouse. |
warehouse.country | SummarisedCountry | A 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
Return Type
Types for the Request Body
CancelPurchaseOrder (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
reason | Reason for cancellation. | string | requirednot 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
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::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:
nullAdd 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
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::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
Return Type
Types for the Request Body
ConfirmPurchaseOrder (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
container_shipment | Container shipment. | boolean | requirednot null |
shipment_size | Shipment size. | ShipmentSize | requirednot null |
delivery_date | Delivery date. | DeliveryDate | requirednot null |
DeliveryDate
| Key | Description | Types | Restrictions |
|---|---|---|---|
preferred_delivery_date | Preferred delivery date. | date | requirednot null |
preferred_time_slot | Preferred delivery time slot. | enum(AM, PM) | requirednot null |
ShipmentSize
| Key | Description | Types | Restrictions |
|---|---|---|---|
expected_pallets | Number of expected pallets. | integer | optionally requirednot nullmin is 0 |
expected_cartons | Number of expected cartons. | integer | optionally requirednot nullmin is 0 |
expected_20ft_containers | Number of expected 20ft containers. | integer | optionally requirednot nullmin is 0 |
expected_40ft_containers | Number of expected 40ft containers. | integer | optionally requirednot nullmin is 0 |
expected_40ft_HC_containers | Number of expected 40ft HC containers. | integer | optionally requirednot nullmin 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
Return Type
Types for the Request Body
CancelPurchaseOrderGoodsin (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
reason | Reason for cancellation. | string | requirednot 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"
}
}