Vendor Order Metadata

Working with vendor orders metadata.

List Vendor Order Metadata

GET /v1/vendor_orders/:id/metadata

Retrieves a list of all the metadata stored against a vendor order.

Parameter Regular Expressions

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

Return Type

array<VendorOrderResourceMetadatas>

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

<?php

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

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

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": [
        {
            "key": "my_key",
            "value": "some-value"
        }
    ]
}

Get Vendor Order Metadata

GET /v1/vendor_orders/:id/metadata/:key

Retrieves a single piece of metadata stored against a vendor order.

Parameter Regular Expressions

  • :id: [1-9][0-9]{0,}
  • :key: [a-zA-Z_][a-zA-Z0-9_]{0,}

Return Type

VendorOrderResourceMetadatas

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

<?php

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

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

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "key": "my_key",
        "value": "some-value"
    }
}

Set Vendor Order Metadata

PUT /v1/vendor_orders/:id/metadata/:key

Sets some metadata against a Vendor.

Parameter Regular Expressions

  • :id: [1-9][0-9]{0,}
  • :key: [a-zA-Z_][a-zA-Z0-9_]{0,}

Request Body

UpdateResourceMetadata

Return Type

VendorOrderResourceMetadatas

Types for the Request Body

UpdateResourceMetadata (root level)

KeyDescriptionTypesRestrictions
valueThe value.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::VENDOR-ORDERS::MANAGE.

<?php

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

// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/vendor_orders/1234567/metadata/my_key", [
    "body" => json_encode([
        "value" => "some-value",
    ]),
    "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/vendor_orders/1234567/metadata/my_key', {
  value: "some-value",
}, {
  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/vendor_orders/1234567/metadata/my_key",
    body: {
        "value": "some-value"
    },
    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/vendor_orders/1234567/metadata/my_key' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
    "value": "some-value"
}'

Example result:

{
    "meta": {
        "request_reference": "235chjz9h-c893v86"
    },
    "data": {
        "key": "my_key",
        "value": "some-value"
    }
}

Delete Vendor Order Metadata

DELETE /v1/vendor_orders/:id/metadata/:key

Deletes some metadata against a vendor order.

Parameter Regular Expressions

  • :id: [1-9][0-9]{0,}
  • :key: [a-zA-Z_][a-zA-Z0-9_]{0,}

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

<?php

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

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

Example result:

null