Marketplaces
Marketplaces
Sync marketplace listings
POST /v1/marketplaces/listings/sync
Sync listings from the marketplace down to BladePRO.
Request Body
array<SyncMarketplaceListingValidator>
Return Type
array<SyncedMarketplaceListing>
Types for the Request Body
Location
| Key | Description | Types | Restrictions |
|---|---|---|---|
marketplace_location_id | ID of the marketplace location mapping. | integer | requirednot nullmin is 1 |
quantity | Current quantity. | integer | requirednot nullmin is 0 |
marketplace_reference | Marketplace reference for the link between the listing variation and the marketplace location. | string |
ResourceMetadata
| Key | Description | Types | Restrictions |
|---|---|---|---|
key | Key of the resource metadata. | string | requirednot nullmin length is 1 |
value | Value of the resource metadata. | string | requirednot nullmin length is 1 |
SyncMarketplaceListingValidator
| Key | Description | Types | Restrictions |
|---|---|---|---|
listing_reference | Parent or first reference provided by the 3rd party marketplace. | string | requirednot nullmin length is 1 |
listing_variation_reference | Child or second reference provided by the 3rd party marketplace. You may repeat the first reference if there’s only one. | string | requirednot nullmin length is 1 |
sku | Current marketplace SKU. | string | requirednot nullmin length is 1 |
title | Current marketplace title. | string | requirednot nullmin length is 1 |
quantity | Current marketplace stock level. | integer | requirednot nullmin is 0 |
price | Current marketplace price. | number | requirednot nullmin is 0 |
status | Current marketplace status. | string | not null |
metadata | List of resource metadatas. | array<ResourceMetadata> | |
locations | List of resource locations. | array<Location> |
Rate limit cost
Each call to this endpoint deducts 5 credits from your request bucket.
Scopes
This endpoint is only available for users with scope APP::MARKETPLACES::MANAGE.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("POST", "https://public-api.bladepro.io/v1/marketplaces/listings/sync", [
"body" => json_encode([
[
"listing_reference" => "ABC-123",
"listing_variation_reference" => "ABC-123",
"sku" => "ACME_BICY",
"title" => "ACME Bicycle",
"quantity" => 50,
"price" => 122.99,
"status" => "live",
"metadata" => [
[
"key" => "GRAPHQL_ID",
"value" => "http://my-graphql-id/132163",
],
],
"locations" => [
[
"marketplace_location_id" => 81,
"quantity" => 0,
"marketplace_reference" => 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/marketplaces/listings/sync', [
{
listing_reference: "ABC-123",
listing_variation_reference: "ABC-123",
sku: "ACME_BICY",
title: "ACME Bicycle",
quantity: 50,
price: 122.99,
status: "live",
metadata: [
{
key: "GRAPHQL_ID",
value: "http://my-graphql-id/132163",
},
],
locations: [
{
marketplace_location_id: 81,
quantity: 0,
marketplace_reference: 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/marketplaces/listings/sync",
body: [
{
"listing_reference": "ABC-123",
"listing_variation_reference": "ABC-123",
"sku": "ACME_BICY",
"title": "ACME Bicycle",
"quantity": 50,
"price": 122.99,
"status": "live",
"metadata": [
{
"key": "GRAPHQL_ID",
"value": "http://my-graphql-id/132163"
}
],
"locations": [
{
"marketplace_location_id": 81,
"quantity": 0,
"marketplace_reference": 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/marketplaces/listings/sync' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '[
{
"listing_reference": "ABC-123",
"listing_variation_reference": "ABC-123",
"sku": "ACME_BICY",
"title": "ACME Bicycle",
"quantity": 50,
"price": 122.99,
"status": "live",
"metadata": [
{
"key": "GRAPHQL_ID",
"value": "http://my-graphql-id/132163"
}
],
"locations": [
{
"marketplace_location_id": 81,
"quantity": 0,
"marketplace_reference": null
}
]
}
]'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": [
{
"listing_reference": "ABC-123",
"listing_variation_reference": "ABC-123",
"sku": "ABC",
"result": "updated",
"error": "Failed to look up SKU: ABC-XYX. Please ensure this product is set in BladePRO before importing the listing."
}
]
}Import marketplace listings
POST /v1/marketplaces/listings/import
Creates a marketplace listings with all the marketplace references. This endpoint always expands all expandables.
Request Body
Return Type
Types for the Request Body
ImportMarketplaceListing (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
marketplace_reference | Marketplace ID. | string | requirednot nullmin length is 1 |
attributes | List of attributes. | array<Attribute> | |
options | List of option labels. | array<string> | |
resource_metadatas | List of resource metadatas. | array<ResourceMetadata> | |
variations | List of marketplace listing variations. | array<Variation> | |
product_category_id | The ID for the product category. | integer | requiredmin is 1 |
images | List of image URLs. | array<string> |
Attribute
| Key | Description | Types | Restrictions |
|---|---|---|---|
code | Code to reference the attribute by. | string | requirednot nullmin length is 1 |
value | Value of the attribute. | string | requiredmin length is 0 |
label | Label of the attribute. | string | requiredmin length is 0 |
MarketplaceLocation
| Key | Description | Types | Restrictions |
|---|---|---|---|
marketplace_location_id | ID of the marketplace location mapping. | integer | requirednot nullmin is 1 |
quantity | Current quantity. | integer | requirednot nullmin is 0 |
marketplace_reference | Marketplace reference for the link between the listing variation and the marketplace location. | string |
ResourceMetadata
| Key | Description | Types | Restrictions |
|---|---|---|---|
key | Key of the resource metadata. | string | requirednot nullmin length is 1 |
value | Value of the resource metadata. | string | requirednot nullmin length is 1 |
Variation
| Key | Description | Types | Restrictions |
|---|---|---|---|
product_variation_id | The ID for the product variation. | integer | requirednot nullmin is 1 |
sku | Current marketplace SKU. | string | requirednot nullmin length is 1 |
title | Current marketplace title. | string | requirednot nullmin length is 1 |
subtitle | Current marketplace subtitle. | string | min length is 1 |
description | Current marketplace description. | string | min length is 0 |
marketplace_reference | The marketplace reference. | string | requirednot nullmin length is 1 |
quantity | Current marketplace stock level. | integer | requirednot nullmin is 0 |
price | Current marketplace price. | number | requirednot nullmin is 0 |
status | The listing status. | enum(draft, live, void, pending_live, pending_void) | requirednot null |
keep_price | Should BladePRO keep the price. | boolean | requirednot null |
keep_title | Should BladePRO keep the title. | boolean | requirednot null |
keep_description | Should BladePRO keep the description. | boolean | requirednot null |
options | List of option values. | array<string> | |
attributes | List of attributes | array<Attribute> | |
resource_metadatas | List of resource metadatas. | array<ResourceMetadata> | |
images | List of image URLs. | array<string> | |
locations | List of marketplace location mappings. | array<MarketplaceLocation> |
Available expands
| Field | Return Type | Description |
|---|---|---|
marketplace_listing_variations | array<ImportMarketplaceListingVariation> | A marketplace listing variation during import. |
marketplace_listing_variations.options | array<ImportMarketplaceListingVariationOption> | A marketplace listing variation option during import. |
options | array<ImportMarketplaceListingOption> | A marketplace listing option during import. |
Rate limit cost
Each call to this endpoint deducts 5 credits from your request bucket.
Scopes
This endpoint is only available for users with scope APP::MARKETPLACES::MANAGE.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("POST", "https://public-api.bladepro.io/v1/marketplaces/listings/import?expand=*", [
"body" => json_encode([
"marketplace_reference" => "FOREIGN_ID",
"attributes" => [
[
"code" => "ASIN",
"value" => "ASODAIY12371938",
"label" => "ASIN",
],
],
"options" => [
"Frame Colour",
],
"resource_metadatas" => [
[
"key" => "GRAPHQL_ID",
"value" => "http://my-graphql-id/132163",
],
],
"variations" => [
[
"product_variation_id" => 8435,
"sku" => "ACME_BICY",
"title" => "ACME Bicycle",
"subtitle" => null,
"description" => "A brand new ACME bicycle.",
"marketplace_reference" => "FOREIGN_ID",
"quantity" => 50,
"price" => 122.99,
"status" => "live",
"keep_price" => true,
"keep_title" => true,
"keep_description" => true,
"options" => [
"Sky Blue",
],
"attributes" => [
[
"code" => "ASIN",
"value" => "ASODAIY12371938",
"label" => "ASIN",
],
],
"resource_metadatas" => [
[
"key" => "GRAPHQL_ID",
"value" => "http://my-graphql-id/132163",
],
],
"images" => [
"https://some-cdn/image01.jpeg",
],
"locations" => [
[
"marketplace_location_id" => 81,
"quantity" => 0,
"marketplace_reference" => null,
],
],
],
],
"product_category_id" => 8435,
"images" => [
"https://some-cdn/image01.jpeg",
],
]),
"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/marketplaces/listings/import?expand=*', {
marketplace_reference: "FOREIGN_ID",
attributes: [
{
code: "ASIN",
value: "ASODAIY12371938",
label: "ASIN",
},
],
options: [
"Frame Colour",
],
resource_metadatas: [
{
key: "GRAPHQL_ID",
value: "http://my-graphql-id/132163",
},
],
variations: [
{
product_variation_id: 8435,
sku: "ACME_BICY",
title: "ACME Bicycle",
subtitle: nil,
description: "A brand new ACME bicycle.",
marketplace_reference: "FOREIGN_ID",
quantity: 50,
price: 122.99,
status: "live",
keep_price: true,
keep_title: true,
keep_description: true,
options: [
"Sky Blue",
],
attributes: [
{
code: "ASIN",
value: "ASODAIY12371938",
label: "ASIN",
},
],
resource_metadatas: [
{
key: "GRAPHQL_ID",
value: "http://my-graphql-id/132163",
},
],
images: [
"https://some-cdn/image01.jpeg",
],
locations: [
{
marketplace_location_id: 81,
quantity: 0,
marketplace_reference: nil,
},
],
},
],
product_category_id: 8435,
images: [
"https://some-cdn/image01.jpeg",
],
}, {
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/marketplaces/listings/import?expand=*",
body: {
"marketplace_reference": "FOREIGN_ID",
"attributes": [
{
"code": "ASIN",
"value": "ASODAIY12371938",
"label": "ASIN"
}
],
"options": [
"Frame Colour"
],
"resource_metadatas": [
{
"key": "GRAPHQL_ID",
"value": "http://my-graphql-id/132163"
}
],
"variations": [
{
"product_variation_id": 8435,
"sku": "ACME_BICY",
"title": "ACME Bicycle",
"subtitle": null,
"description": "A brand new ACME bicycle.",
"marketplace_reference": "FOREIGN_ID",
"quantity": 50,
"price": 122.99,
"status": "live",
"keep_price": true,
"keep_title": true,
"keep_description": true,
"options": [
"Sky Blue"
],
"attributes": [
{
"code": "ASIN",
"value": "ASODAIY12371938",
"label": "ASIN"
}
],
"resource_metadatas": [
{
"key": "GRAPHQL_ID",
"value": "http://my-graphql-id/132163"
}
],
"images": [
"https://some-cdn/image01.jpeg"
],
"locations": [
{
"marketplace_location_id": 81,
"quantity": 0,
"marketplace_reference": null
}
]
}
],
"product_category_id": 8435,
"images": [
"https://some-cdn/image01.jpeg"
]
},
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/marketplaces/listings/import?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
"marketplace_reference": "FOREIGN_ID",
"attributes": [
{
"code": "ASIN",
"value": "ASODAIY12371938",
"label": "ASIN"
}
],
"options": [
"Frame Colour"
],
"resource_metadatas": [
{
"key": "GRAPHQL_ID",
"value": "http://my-graphql-id/132163"
}
],
"variations": [
{
"product_variation_id": 8435,
"sku": "ACME_BICY",
"title": "ACME Bicycle",
"subtitle": null,
"description": "A brand new ACME bicycle.",
"marketplace_reference": "FOREIGN_ID",
"quantity": 50,
"price": 122.99,
"status": "live",
"keep_price": true,
"keep_title": true,
"keep_description": true,
"options": [
"Sky Blue"
],
"attributes": [
{
"code": "ASIN",
"value": "ASODAIY12371938",
"label": "ASIN"
}
],
"resource_metadatas": [
{
"key": "GRAPHQL_ID",
"value": "http://my-graphql-id/132163"
}
],
"images": [
"https://some-cdn/image01.jpeg"
],
"locations": [
{
"marketplace_location_id": 81,
"quantity": 0,
"marketplace_reference": null
}
]
}
],
"product_category_id": 8435,
"images": [
"https://some-cdn/image01.jpeg"
]
}'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": {
"id": 123,
"marketplace_reference": "FOREIGN_ID",
"product_category_id": 4,
"marketplace_listing_variations": [
{
"id": 1235,
"title": "ACME Bicycle",
"subtitle": null,
"description": "A brand new ACME bicycle.",
"listing_mode": "keep_in_sync",
"stock_mode": "keep_in_sync",
"marketplace_reference": "FOREIGN_ID",
"price": 122.99,
"product_variation_id": 8435,
"quantity": 50,
"sku": "ACME_BICY",
"status": "live",
"options": [
{
"id": 34512,
"marketplace_listing_option_id": 9745,
"value": "Sky Blue"
}
]
}
],
"options": [
{
"id": 9745,
"name": "Frame colour"
}
]
}
}Get marketplace listing variations
GET /v1/marketplaces/listings/variations
Retrieves a list of marketplace listing variations.
Return Type
array<CachedMarketplaceListingVariation>
Filters
| Field | Operators | Value List URL |
|---|---|---|
| id | IN | |
| marketplace_reference | IN | |
| sku | IN | |
| marketplace_listing_id | IN | |
| status | IN, NOT_IN | |
| product_variation.id | IN |
Available expands
| Field | Return Type | Description |
|---|---|---|
attributes | array<CachedMarketplaceListingVariationAttribute> | Marketplace listing variation attributes |
attributes.attribute | CachedApplicationMarketplaceAttribute | Marketplace attribute |
images | array<CachedMarketplaceListingVariationImage> | Marketplace listing variation images |
marketplace_listing | CachedMarketplaceListing | Marketplace listing |
marketplace_listing.attributes | array<CachedMarketplaceListingAttribute> | Marketplace listing attributes |
marketplace_listing.attributes.attribute | CachedApplicationMarketplaceAttribute | Marketplace attribute |
marketplace_listing.images | array<CachedMarketplaceListingImage> | Marketplace listing variation images |
marketplace_listing.options | array<CachedMarketplaceListingOption> | Marketplace listing option definition. |
marketplace_listing.related_listing_variations | array<CachedMarketplaceListingVariationRelatedVariation> | Related listing variations that belong to the same parent marketplace_listing |
options | array<CachedMarketplaceListingVariationOption> | Value for a marketplace listing option. |
options.option | CachedMarketplaceListingOption | Marketplace listing option definition. |
product_variation | CachedMarketplaceListingVariationProductVariation | Marketplace listing variation attributes |
product_variation.aspects | array<CachedMarketplaceListingVariationProductVariationAspects> | Marketplace listing variation aspects |
product_variation.aspects.aspect | CachedApplicationMarketplaceAttribute | Marketplace attribute |
product_variation.category | CachedMarketplaceListingVariationProductVariationCategory | Marketplace listing variation category |
product_variation.category.preferences | array<CachedMarketplaceListingVariationProductVariationCategoryPreferences> | Marketplace listing variation category preferences |
product_variation.category.preferences.preference | CachedMarketplaceListingVariationProductVariationCategoryPreferencesPreference | Marketplace listing variation aspects |
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::MARKETPLACES::READ.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/marketplaces/listings/variations?expand=*", [
"headers" => [
"Content-Type" => "application/json",
"Access-Token" => "my-token-from-login",
],
]);
// Process the response
$responseBody = json_decode($response->getBody(), true);require 'rest-client'
require 'json'
# Make the request
response = RestClient.get 'https://public-api.bladepro.io/v1/marketplaces/listings/variations?expand=*', {
access_token: 'my-token-from-login',
content_type: :json,
accept: :json
}
# Process the response
puts response.body// Require the node HTTP module
var request = require("request");
// Make the request
request({
method: "GET",
json: true,
uri: "https://public-api.bladepro.io/v1/marketplaces/listings/variations?expand=*",
headers: {
"Access-Token": "my-token-from-login",
"Content-Type": "application/json",
},
(error, response, body) => {
// Process the response
console.log(body);
},
});# Make the request
curl --location --request GET 'https://public-api.bladepro.io/v1/marketplaces/listings/variations?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86",
"paging": {
"page": 1,
"records": 1,
"per_page": 250,
"total_records": 1,
"total_pages": 1
}
},
"data": [
{
"id": "123",
"marketplace_listing_id": "123",
"marketplace_reference": "123456",
"sku": "ABC_123",
"price": "12.99",
"status": "live",
"listing_mode": "keep_in_sync",
"stock_mode": "keep_in_sync",
"marketplace_listing": {
"id": "123",
"marketplace_reference": "123456",
"attributes": [
{
"label_json": "{}",
"value": "f376ji34G4F",
"attribute": {
"id": "4324",
"name": "External Product Code",
"description": "The code of the product as defined on Amazon.",
"code": "EXTERNAL_PRODUCT_CODE"
}
}
],
"options": [
{
"id": 1234,
"name": "Colour"
}
],
"images": [
{
"primary": false,
"sequence": false,
"url": false
}
],
"related_listing_variations": [
{
"id": 67834,
"marketplace_reference": "ABC123",
"status": "pending_live",
"sku": "RED-CAR-001"
}
]
},
"product_variation": {
"id": 432,
"sku": "RED-CAR-001",
"aspects": [
{
"value": "red",
"label": "Red",
"aspect": {
"name": "Colour",
"code": "21234_CAR_COLOUR",
"required": true,
"type": "dropdown"
}
}
],
"category": {
"id": 32,
"name": "Bikes",
"preferences": [
{
"value": "red",
"label": "Red",
"preference": {
"name": "Colour",
"code": "21234_CAR_COLOUR"
}
}
]
}
},
"attributes": [
{
"label_json": "{}",
"value": "f376ji34G4F",
"attribute": {
"id": "4324",
"name": "External Product Code",
"description": "The code of the product as defined on Amazon.",
"code": "EXTERNAL_PRODUCT_CODE"
}
}
],
"options": [
{
"id": 12345,
"marketplace_listing_option_id": 1234,
"value": "Sky blue",
"option": {
"id": 1234,
"name": "Colour"
}
}
],
"images": [
{
"primary": false,
"sequence": false,
"url": false
}
]
}
]
}Purge marketplace listings
PUT /v1/marketplaces/listings/variations/purge
Detach all listings in BladePRO from the marketplace.
Request Body
Ignored.
Return Type
Rate limit cost
Each call to this endpoint deducts 5 credits from your request bucket.
Scopes
This endpoint is only available for users with scope APP::MARKETPLACES::MANAGE.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/marketplaces/listings/variations/purge", [
"body" => "{}",
"headers" => [
"Content-Type" => "application/json",
"Access-Token" => "my-token-from-login",
],
]);
// Process the response
$responseBody = json_decode($response->getBody(), true);require 'rest-client'
require 'json'
# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/marketplaces/listings/variations/purge', {}, {
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/marketplaces/listings/variations/purge",
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/marketplaces/listings/variations/purge' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": {
"success": true
}
}Set reference
PUT /v1/marketplaces/listings/:listingId/variations/:listingVariationId/marketplace_reference
Set the listing variation marketplace reference.
Parameter Regular Expressions
- :listingId: [1-9][0-9]{0,}
- :listingVariationId: [1-9][0-9]{0,}
Request Body
Return Type
Types for the Request Body
SetMarketplaceReference (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
marketplace_reference | The new reference. | 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::MARKETPLACES::MANAGE.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/marketplaces/listings/:listingId/variations/:listingVariationId/marketplace_reference", [
"body" => "{}",
"headers" => [
"Content-Type" => "application/json",
"Access-Token" => "my-token-from-login",
],
]);
// Process the response
$responseBody = json_decode($response->getBody(), true);require 'rest-client'
require 'json'
# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/marketplaces/listings/:listingId/variations/:listingVariationId/marketplace_reference', {}, {
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/marketplaces/listings/:listingId/variations/:listingVariationId/marketplace_reference",
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/marketplaces/listings/:listingId/variations/:listingVariationId/marketplace_reference' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": {
"id": "123",
"marketplace_reference": "7x34nu03248n0",
"price": "11.99",
"status": "LIVE",
"sku": "RED_CAR_01",
"product_variation_id": "21",
"quantity": "323"
}
}Mark As Live
PUT /v1/marketplaces/listings/:listingId/variations/:listingVariationId/mark_as_live
Set the listing variation status to live.
Parameter Regular Expressions
- :listingId: [1-9][0-9]{0,}
- :listingVariationId: [1-9][0-9]{0,}
Request Body
Ignored.
Return Type
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::MARKETPLACES::MANAGE.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/marketplaces/listings/:listingId/variations/:listingVariationId/mark_as_live", [
"body" => "{}",
"headers" => [
"Content-Type" => "application/json",
"Access-Token" => "my-token-from-login",
],
]);
// Process the response
$responseBody = json_decode($response->getBody(), true);require 'rest-client'
require 'json'
# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/marketplaces/listings/:listingId/variations/:listingVariationId/mark_as_live', {}, {
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/marketplaces/listings/:listingId/variations/:listingVariationId/mark_as_live",
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/marketplaces/listings/:listingId/variations/:listingVariationId/mark_as_live' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": {
"id": "123",
"marketplace_reference": "7x34nu03248n0",
"price": "11.99",
"status": "LIVE",
"sku": "RED_CAR_01",
"product_variation_id": "21",
"quantity": "323"
}
}Mark As Void
PUT /v1/marketplaces/listings/:listingId/variations/:listingVariationId/mark_as_void
Set the listing variation status to void.
Parameter Regular Expressions
- :listingId: [1-9][0-9]{0,}
- :listingVariationId: [1-9][0-9]{0,}
Request Body
Ignored.
Return Type
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::MARKETPLACES::MANAGE.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/marketplaces/listings/:listingId/variations/:listingVariationId/mark_as_void", [
"body" => "{}",
"headers" => [
"Content-Type" => "application/json",
"Access-Token" => "my-token-from-login",
],
]);
// Process the response
$responseBody = json_decode($response->getBody(), true);require 'rest-client'
require 'json'
# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/marketplaces/listings/:listingId/variations/:listingVariationId/mark_as_void', {}, {
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/marketplaces/listings/:listingId/variations/:listingVariationId/mark_as_void",
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/marketplaces/listings/:listingId/variations/:listingVariationId/mark_as_void' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": {
"id": "123",
"marketplace_reference": "7x34nu03248n0",
"price": "11.99",
"status": "LIVE",
"sku": "RED_CAR_01",
"product_variation_id": "21",
"quantity": "323"
}
}Set reference
PUT /v1/marketplaces/listings/:listingId/marketplace_reference
Set the listing marketplace reference.
Parameter Regular Expressions
- :listingId: [1-9][0-9]{0,}
Request Body
Return Type
Types for the Request Body
SetMarketplaceReference (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
marketplace_reference | The new reference. | 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::MARKETPLACES::MANAGE.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/marketplaces/listings/:listingId/marketplace_reference", [
"body" => "{}",
"headers" => [
"Content-Type" => "application/json",
"Access-Token" => "my-token-from-login",
],
]);
// Process the response
$responseBody = json_decode($response->getBody(), true);require 'rest-client'
require 'json'
# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/marketplaces/listings/:listingId/marketplace_reference', {}, {
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/marketplaces/listings/:listingId/marketplace_reference",
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/marketplaces/listings/:listingId/marketplace_reference' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": {
"id": "123",
"marketplace_reference": "7x34nu03248n0"
}
}Bulk get marketplace listing stock
GET /v1/marketplaces/listings/stock/:mode
Retrieves a simplified list of every marketplace listing.
Parameter Regular Expressions
- :mode: all|changed
Return Type
array<MarketplaceListingStock>
Available expands
| Field | Return Type | Description |
|---|---|---|
resource_metadatas | array<MarketplaceListingResourceMetadatas> | Stores arbitrary data against a marketplace listing. |
variations | array<MarketplaceListingVariationStock> | Marketplace listing variation stock |
variations.marketplace_locations | array<MarketplaceListingVariationStockMarketplaceLocations> | Marketplace listing variation’s location-based stock |
variations.resource_metadatas | array<MarketplaceListingVariationResourceMetadatas> | Stores arbitrary data against a marketplace listing variation. |
Rate limit cost
Each call to this endpoint deducts 5 credits from your request bucket.
Scopes
This endpoint is only available for users with scope APP::MARKETPLACES::READ.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/marketplaces/listings/stock/:mode?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/marketplaces/listings/stock/:mode?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/marketplaces/listings/stock/:mode?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/marketplaces/listings/stock/:mode?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": [
{
"id": "123",
"marketplace_reference": "123456",
"resource_metadatas": [
{
"key": "my_key",
"value": "some-value"
}
],
"variations": [
{
"id": 123,
"marketplace_reference": "123456",
"sku": "DEMO-SKU-01",
"product_variation_id": "456",
"current_listed_quantity": 12,
"quantity_to_list": 10,
"resource_metadatas": [
{
"key": "my_key",
"value": "some-value"
}
],
"marketplace_locations": [
{
"marketplace_location_id": 567,
"current_listed_quantity": 12,
"quantity_to_list": 10
}
]
}
]
}
]
}Bulk get marketplace listing cost price
GET /v1/marketplaces/listings/cost_price
Retrieves a simplified list of every marketplace listing.
Return Type
array<MarketplaceListingCostPrice>
Available expands
| Field | Return Type | Description |
|---|---|---|
resource_metadatas | array<MarketplaceListingResourceMetadatas> | Stores arbitrary data against a marketplace listing. |
variations | array<MarketplaceListingVariationCostPrice> | Marketplace listing variation cost price |
variations.resource_metadatas | array<MarketplaceListingVariationResourceMetadatas> | Stores arbitrary data against a marketplace listing variation. |
Rate limit cost
Each call to this endpoint deducts 3 credits from your request bucket.
Scopes
This endpoint is only available for users with scope APP::MARKETPLACES::READ.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/marketplaces/listings/cost_price?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/marketplaces/listings/cost_price?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/marketplaces/listings/cost_price?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/marketplaces/listings/cost_price?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": [
{
"id": "123",
"marketplace_reference": "123456",
"resource_metadatas": [
{
"key": "my_key",
"value": "some-value"
}
],
"variations": [
{
"id": 123,
"marketplace_reference": "123456",
"sku": "DEMO-SKU-01",
"product_variation_id": "456",
"cost_price": 15.16,
"resource_metadatas": [
{
"key": "my_key",
"value": "some-value"
}
]
}
]
}
]
}Get listing variation stock
GET /v1/marketplaces/listings/:listingId/variations/:listingVariationId/stock
Retrieves a simplified stock record for a single marketplace listing variation.
Parameter Regular Expressions
- :listingId: [1-9][0-9]{0,}
- :listingVariationId: [1-9][0-9]{0,}
Return Type
MarketplaceListingVariationStock
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::MARKETPLACES::READ.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/marketplaces/listings/:listingId/variations/:listingVariationId/stock", [
"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/marketplaces/listings/:listingId/variations/:listingVariationId/stock', {
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/marketplaces/listings/:listingId/variations/:listingVariationId/stock",
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/marketplaces/listings/:listingId/variations/:listingVariationId/stock' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": {
"id": 123,
"marketplace_reference": "123456",
"sku": "DEMO-SKU-01",
"product_variation_id": "456",
"current_listed_quantity": 12,
"quantity_to_list": 10
}
}Get unclaimed marketplace listing updates
GET /v1/marketplaces/listings/updates/unclaimed
Retrieves a list of the listing’s unclaimed updates.
Return Type
array<MarketplaceListingUpdates>
Available expands
| Field | Return Type | Description |
|---|---|---|
marketplace_listing | MarketplaceListingUpdateListings | Marketplace listing updates |
marketplace_listing.attributes | array<MarketplaceListingUpdateAttributes> | Marketplace attribute |
marketplace_listing_variation | MarketplaceListingUpdateListingVariations | Marketplace listing updates |
marketplace_listing_variation.attributes | array<MarketplaceListingUpdateAttributes> | Marketplace attribute |
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::MARKETPLACES::READ.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/marketplaces/listings/updates/unclaimed?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/marketplaces/listings/updates/unclaimed?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/marketplaces/listings/updates/unclaimed?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/marketplaces/listings/updates/unclaimed?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": [
{
"id": "123",
"code": "PRICE",
"listing_id": "44",
"variation_id": "55",
"old_value": "12",
"new_value": "10",
"status": "pending",
"marketplace_listing": {
"id": "2332",
"marketplace_reference": "abcdefg-1234567",
"attributes": [
{
"code": "PRODUCT_ASIN",
"name": "Product ASIN",
"value": "LIVE"
}
]
},
"marketplace_listing_variation": {
"id": "2332",
"marketplace_reference": "gfd4352gfd54-434-gfddfg",
"sku": "RED-CAR-01",
"price": "21.99",
"status": "LIVE",
"attributes": [
{
"code": "PRODUCT_ASIN",
"name": "Product ASIN",
"value": "LIVE"
}
]
}
}
]
}Bulk update listed quantities
PUT /v1/marketplaces/listings/updates/bulk_update_listed_quantities
Updated the listed quantity in BladePRO for marketplace listings in bulk.
Request Body
array<BulkUpdateListedQuantity>
Return Type
array<MarketplaceListingBulkUpdateQuantities>
Types for the Request Body
BulkUpdateListedQuantity
| Key | Description | Types | Restrictions |
|---|---|---|---|
marketplace_listing_variation_id | The marketplace listing variation id. | integer | requirednot nullmin is 1 |
quantity | The listed quantity. | integer | requirednot nullmin is 0 |
marketplace_location_id | The marketplace location ID, if enabled in the app. | integer | requiredmin is 1 |
Rate limit cost
Each call to this endpoint deducts 5 credits from your request bucket.
Scopes
This endpoint is only available for users with scope APP::MARKETPLACES::MANAGE.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/marketplaces/listings/updates/bulk_update_listed_quantities", [
"body" => json_encode([
[
"marketplace_listing_variation_id" => 1,
"quantity" => 142,
"marketplace_location_id" => 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.put 'https://public-api.bladepro.io/v1/marketplaces/listings/updates/bulk_update_listed_quantities', [
{
marketplace_listing_variation_id: 1,
quantity: 142,
marketplace_location_id: 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: "PUT",
json: true,
uri: "https://public-api.bladepro.io/v1/marketplaces/listings/updates/bulk_update_listed_quantities",
body: [
{
"marketplace_listing_variation_id": 1,
"quantity": 142,
"marketplace_location_id": 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 PUT 'https://public-api.bladepro.io/v1/marketplaces/listings/updates/bulk_update_listed_quantities' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '[
{
"marketplace_listing_variation_id": 1,
"quantity": 142,
"marketplace_location_id": null
}
]'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": [
{
"success": true
}
]
}Finalize update
PUT /v1/marketplaces/listings/updates/:updateId/complete
Mark update as completed.
Parameter Regular Expressions
- :updateId: [1-9][0-9]{0,}
Request Body
Ignored.
Return Type
Available expands
| Field | Return Type | Description |
|---|
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::MARKETPLACES::MANAGE.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/marketplaces/listings/updates/:updateId/complete?expand=*", [
"body" => "{}",
"headers" => [
"Content-Type" => "application/json",
"Access-Token" => "my-token-from-login",
],
]);
// Process the response
$responseBody = json_decode($response->getBody(), true);require 'rest-client'
require 'json'
# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/marketplaces/listings/updates/:updateId/complete?expand=*', {}, {
access_token: 'my-token-from-login',
content_type: :json,
accept: :json
}
# Process the response
puts response.body// Require the node HTTP module
var request = require("request");
// Make the request
request({
method: "PUT",
json: true,
uri: "https://public-api.bladepro.io/v1/marketplaces/listings/updates/:updateId/complete?expand=*",
headers: {
"Access-Token": "my-token-from-login",
"Content-Type": "application/json",
},
(error, response, body) => {
// Process the response
console.log(body);
},
});# Make the request
curl --location --request PUT 'https://public-api.bladepro.io/v1/marketplaces/listings/updates/:updateId/complete?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": {
"id": "123",
"code": "PRICE",
"listing_id": "44",
"variation_id": "55",
"old_value": "12",
"new_value": "10",
"status": "pending"
}
}Fail update
PUT /v1/marketplaces/listings/updates/:updateId/fail
Mark update as failed.
Parameter Regular Expressions
- :updateId: [1-9][0-9]{0,}
Request Body
Return Type
Types for the Request Body
FailListingUpdate (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
reason | The reason for the failure. | string | requirednot null |
Available expands
| Field | Return Type | Description |
|---|
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::MARKETPLACES::MANAGE.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/marketplaces/listings/updates/:updateId/fail?expand=*", [
"body" => "{}",
"headers" => [
"Content-Type" => "application/json",
"Access-Token" => "my-token-from-login",
],
]);
// Process the response
$responseBody = json_decode($response->getBody(), true);require 'rest-client'
require 'json'
# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/marketplaces/listings/updates/:updateId/fail?expand=*', {}, {
access_token: 'my-token-from-login',
content_type: :json,
accept: :json
}
# Process the response
puts response.body// Require the node HTTP module
var request = require("request");
// Make the request
request({
method: "PUT",
json: true,
uri: "https://public-api.bladepro.io/v1/marketplaces/listings/updates/:updateId/fail?expand=*",
headers: {
"Access-Token": "my-token-from-login",
"Content-Type": "application/json",
},
(error, response, body) => {
// Process the response
console.log(body);
},
});# Make the request
curl --location --request PUT 'https://public-api.bladepro.io/v1/marketplaces/listings/updates/:updateId/fail?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": {
"id": "123",
"code": "PRICE",
"listing_id": "44",
"variation_id": "55",
"old_value": "12",
"new_value": "10",
"status": "pending"
}
}Finalize updates
PUT /v1/marketplaces/listings/updates/bulk/complete
Mark updates as completed.
Request Body
CompleteMarketplaceListingUpdates
Return Type
array<MarketplaceListingUpdates>
Types for the Request Body
CompleteMarketplaceListingUpdates (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
updates | List of update IDs. | array<number> | requirednot nullmin count is 1 |
Available expands
| Field | Return Type | Description |
|---|
Rate limit cost
Each call to this endpoint deducts 5 credits from your request bucket.
Scopes
This endpoint is only available for users with scope APP::MARKETPLACES::MANAGE.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/marketplaces/listings/updates/bulk/complete?expand=*", [
"body" => json_encode([
"updates" => [
1,
],
]),
"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/marketplaces/listings/updates/bulk/complete?expand=*', {
updates: [
1,
],
}, {
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/marketplaces/listings/updates/bulk/complete?expand=*",
body: {
"updates": [
1
]
},
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/marketplaces/listings/updates/bulk/complete?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
"updates": [
1
]
}'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": [
{
"id": "123",
"code": "PRICE",
"listing_id": "44",
"variation_id": "55",
"old_value": "12",
"new_value": "10",
"status": "pending"
}
]
}Bulk render marketplace listing templates
PUT /v1/marketplaces/listings/templates/render/bulk
Return a list of rendered templates grouped by marketplace listing variation.
Request Body
RenderMarketplaceListingTemplatesBulk
Return Type
array<MarketplaceListingTemplates>
Types for the Request Body
RenderMarketplaceListingTemplatesBulk (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
marketplace_listing_variation_ids | List of marketplace listing variation IDs. | array<number> | requirednot nullmin count is 1 |
locales | List of locale codes. | array<string> | requirednot nullmin count is 1 |
Rate limit cost
Each call to this endpoint deducts 5 credits from your request bucket.
Scopes
This endpoint is only available for users with scope APP::MARKETPLACES::READ.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/marketplaces/listings/templates/render/bulk", [
"body" => json_encode([
"marketplace_listing_variation_ids" => [
1,
2,
3,
],
"locales" => [
"en",
],
]),
"headers" => [
"Content-Type" => "application/json",
"Access-Token" => "my-token-from-login",
],
]);
// Process the response
$responseBody = json_decode($response->getBody(), true);require 'rest-client'
require 'json'
# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/marketplaces/listings/templates/render/bulk', {
marketplace_listing_variation_ids: [
1,
2,
3,
],
locales: [
"en",
],
}, {
access_token: 'my-token-from-login',
content_type: :json,
accept: :json
}
# Process the response
puts response.body// Require the node HTTP module
var request = require("request");
// Make the request
request({
method: "PUT",
json: true,
uri: "https://public-api.bladepro.io/v1/marketplaces/listings/templates/render/bulk",
body: {
"marketplace_listing_variation_ids": [
1,
2,
3
],
"locales": [
"en"
]
},
headers: {
"Access-Token": "my-token-from-login",
"Content-Type": "application/json",
},
(error, response, body) => {
// Process the response
console.log(body);
},
});# Make the request
curl --location --request PUT 'https://public-api.bladepro.io/v1/marketplaces/listings/templates/render/bulk' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
"marketplace_listing_variation_ids": [
1,
2,
3
],
"locales": [
"en"
]
}'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": [
{
"marketplace_listing_variation_id": "1",
"locale": "EN",
"title": "Refrigerator",
"subtitle": "Great deal",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
}
]
}Render marketplace listing templates
PUT /v1/marketplaces/listings/templates/render
Return a list of rendered templates for a specific marketplace listing variation.
Request Body
RenderMarketplaceListingTemplates
Return Type
Types for the Request Body
RenderMarketplaceListingTemplates (root level)
| Key | Description | Types | Restrictions |
|---|---|---|---|
marketplace_listing_variation_id | Marketplace listing variation ID. | number | requirednot null |
locale | Locale code. | string | requirednot nullmatch is /[a-zA-Z]{2}/ |
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::MARKETPLACES::READ.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("PUT", "https://public-api.bladepro.io/v1/marketplaces/listings/templates/render", [
"body" => json_encode([
"marketplace_listing_variation_id" => 1,
"locale" => "en",
]),
"headers" => [
"Content-Type" => "application/json",
"Access-Token" => "my-token-from-login",
],
]);
// Process the response
$responseBody = json_decode($response->getBody(), true);require 'rest-client'
require 'json'
# Make the request
response = RestClient.put 'https://public-api.bladepro.io/v1/marketplaces/listings/templates/render', {
marketplace_listing_variation_id: 1,
locale: "en",
}, {
access_token: 'my-token-from-login',
content_type: :json,
accept: :json
}
# Process the response
puts response.body// Require the node HTTP module
var request = require("request");
// Make the request
request({
method: "PUT",
json: true,
uri: "https://public-api.bladepro.io/v1/marketplaces/listings/templates/render",
body: {
"marketplace_listing_variation_id": 1,
"locale": "en"
},
headers: {
"Access-Token": "my-token-from-login",
"Content-Type": "application/json",
},
(error, response, body) => {
// Process the response
console.log(body);
},
});# Make the request
curl --location --request PUT 'https://public-api.bladepro.io/v1/marketplaces/listings/templates/render' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login' \
--data-raw '{
"marketplace_listing_variation_id": 1,
"locale": "en"
}'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": {
"marketplace_listing_variation_id": "1",
"locale": "EN",
"title": "Refrigerator",
"subtitle": "Great deal",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
}
}List marketplace locations
GET /v1/marketplaces/locations
Retrieves a list of all the marketplace location mappings in BladePRO.
Return Type
array<MarketplaceLocations>
Available expands
| Field | Return Type | Description |
|---|---|---|
despatch_warehouse | Warehouses | A warehouse. |
stock_warehouses | array<Warehouses> | A warehouse. |
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::MARKETPLACES::READ.
<?php
// Instantiate a GuzzleHttp client
$client = new \GuzzleHttp\Client();
// Make the request
$response = $client->request("GET", "https://public-api.bladepro.io/v1/marketplaces/locations?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/marketplaces/locations?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/marketplaces/locations?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/marketplaces/locations?expand=*' \
--header 'Content-Type: application/json' \
--header 'Access-Token: my-token-from-login'Example result:
{
"meta": {
"request_reference": "235chjz9h-c893v86"
},
"data": [
{
"id": 43,
"despatch_warehouse_id": 1,
"location_name": "Christchurch",
"location_key": "uk-12a",
"location_extra": "uk-12a",
"default_stock_mode": "keep_in_sync",
"despatch_warehouse": {
"id": 1,
"name": "Christchurch",
"short_code": "CHR",
"latitude": 50.739492,
"longitude": -1.734224,
"country_id": 1,
"active": true,
"currency_id": 1,
"virtual": false,
"return_warehouse_id": 1,
"created": "2019-11-25T14:52:56.000Z",
"modified": "2019-11-25T14:52:56.000Z"
},
"stock_warehouses": [
{
"id": 1,
"name": "Christchurch",
"short_code": "CHR",
"latitude": 50.739492,
"longitude": -1.734224,
"country_id": 1,
"active": true,
"currency_id": 1,
"virtual": false,
"return_warehouse_id": 1,
"created": "2019-11-25T14:52:56.000Z",
"modified": "2019-11-25T14:52:56.000Z"
}
]
}
]
}