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

KeyDescriptionTypesRestrictions
marketplace_location_idID of the marketplace location mapping.integerrequired
not null
min is 1
quantityCurrent quantity.integerrequired
not null
min is 0
marketplace_referenceMarketplace reference for the link between the listing variation and the marketplace location.string

ResourceMetadata

KeyDescriptionTypesRestrictions
keyKey of the resource metadata.stringrequired
not null
min length is 1
valueValue of the resource metadata.stringrequired
not null
min length is 1

SyncMarketplaceListingValidator

KeyDescriptionTypesRestrictions
listing_referenceParent or first reference provided by the 3rd party marketplace.stringrequired
not null
min length is 1
listing_variation_referenceChild or second reference provided by the 3rd party marketplace. You may repeat the first reference if there’s only one.stringrequired
not null
min length is 1
skuCurrent marketplace SKU.stringrequired
not null
min length is 1
titleCurrent marketplace title.stringrequired
not null
min length is 1
quantityCurrent marketplace stock level.integerrequired
not null
min is 0
priceCurrent marketplace price.numberrequired
not null
min is 0
statusCurrent marketplace status.stringnot null
metadataList of resource metadatas.array<ResourceMetadata>
locationsList 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

ImportMarketplaceListing

Return Type

ImportMarketplaceListing

Types for the Request Body

ImportMarketplaceListing (root level)

KeyDescriptionTypesRestrictions
marketplace_referenceMarketplace ID.stringrequired
not null
min length is 1
attributesList of attributes.array<Attribute>
optionsList of option labels.array<string>
resource_metadatasList of resource metadatas.array<ResourceMetadata>
variationsList of marketplace listing variations.array<Variation>
product_category_idThe ID for the product category.integerrequired
min is 1
imagesList of image URLs.array<string>

Attribute

KeyDescriptionTypesRestrictions
codeCode to reference the attribute by.stringrequired
not null
min length is 1
valueValue of the attribute.stringrequired
min length is 0
labelLabel of the attribute.stringrequired
min length is 0

MarketplaceLocation

KeyDescriptionTypesRestrictions
marketplace_location_idID of the marketplace location mapping.integerrequired
not null
min is 1
quantityCurrent quantity.integerrequired
not null
min is 0
marketplace_referenceMarketplace reference for the link between the listing variation and the marketplace location.string

ResourceMetadata

KeyDescriptionTypesRestrictions
keyKey of the resource metadata.stringrequired
not null
min length is 1
valueValue of the resource metadata.stringrequired
not null
min length is 1

Variation

KeyDescriptionTypesRestrictions
product_variation_idThe ID for the product variation.integerrequired
not null
min is 1
skuCurrent marketplace SKU.stringrequired
not null
min length is 1
titleCurrent marketplace title.stringrequired
not null
min length is 1
subtitleCurrent marketplace subtitle.stringmin length is 1
descriptionCurrent marketplace description.stringmin length is 0
marketplace_referenceThe marketplace reference.stringrequired
not null
min length is 1
quantityCurrent marketplace stock level.integerrequired
not null
min is 0
priceCurrent marketplace price.numberrequired
not null
min is 0
statusThe listing status.enum(draft, live, void, pending_live, pending_void)required
not null
keep_priceShould BladePRO keep the price.booleanrequired
not null
keep_titleShould BladePRO keep the title.booleanrequired
not null
keep_descriptionShould BladePRO keep the description.booleanrequired
not null
optionsList of option values.array<string>
attributesList of attributesarray<Attribute>
resource_metadatasList of resource metadatas.array<ResourceMetadata>
imagesList of image URLs.array<string>
locationsList of marketplace location mappings.array<MarketplaceLocation>

Available expands

FieldReturn TypeDescription
marketplace_listing_variationsarray<ImportMarketplaceListingVariation>A marketplace listing variation during import.
marketplace_listing_variations.optionsarray<ImportMarketplaceListingVariationOption>A marketplace listing variation option during import.
optionsarray<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

FieldOperatorsValue List URL
idIN
marketplace_referenceIN
skuIN
marketplace_listing_idIN
statusIN, NOT_IN
product_variation.idIN

Available expands

FieldReturn TypeDescription
attributesarray<CachedMarketplaceListingVariationAttribute>Marketplace listing variation attributes
attributes.attributeCachedApplicationMarketplaceAttributeMarketplace attribute
imagesarray<CachedMarketplaceListingVariationImage>Marketplace listing variation images
marketplace_listingCachedMarketplaceListingMarketplace listing
marketplace_listing.attributesarray<CachedMarketplaceListingAttribute>Marketplace listing attributes
marketplace_listing.attributes.attributeCachedApplicationMarketplaceAttributeMarketplace attribute
marketplace_listing.imagesarray<CachedMarketplaceListingImage>Marketplace listing variation images
marketplace_listing.optionsarray<CachedMarketplaceListingOption>Marketplace listing option definition.
marketplace_listing.related_listing_variationsarray<CachedMarketplaceListingVariationRelatedVariation>Related listing variations that belong to the same parent marketplace_listing
optionsarray<CachedMarketplaceListingVariationOption>Value for a marketplace listing option.
options.optionCachedMarketplaceListingOptionMarketplace listing option definition.
product_variationCachedMarketplaceListingVariationProductVariationMarketplace listing variation attributes
product_variation.aspectsarray<CachedMarketplaceListingVariationProductVariationAspects>Marketplace listing variation aspects
product_variation.aspects.aspectCachedApplicationMarketplaceAttributeMarketplace attribute
product_variation.categoryCachedMarketplaceListingVariationProductVariationCategoryMarketplace listing variation category
product_variation.category.preferencesarray<CachedMarketplaceListingVariationProductVariationCategoryPreferences>Marketplace listing variation category preferences
product_variation.category.preferences.preferenceCachedMarketplaceListingVariationProductVariationCategoryPreferencesPreferenceMarketplace 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

MarketplaceListingPurge

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

SetMarketplaceReference

Return Type

MarketplaceListingVariation

Types for the Request Body

SetMarketplaceReference (root level)

KeyDescriptionTypesRestrictions
marketplace_referenceThe new reference.stringrequired
not null

Rate limit cost

Each call to this endpoint deducts 2 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::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

MarketplaceListingVariation

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

MarketplaceListingVariation

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

SetMarketplaceReference

Return Type

MarketplaceListings

Types for the Request Body

SetMarketplaceReference (root level)

KeyDescriptionTypesRestrictions
marketplace_referenceThe new reference.stringrequired
not null

Rate limit cost

Each call to this endpoint deducts 2 credits from your request bucket.

Scopes

This endpoint is only available for users with scope APP::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

FieldReturn TypeDescription
resource_metadatasarray<MarketplaceListingResourceMetadatas>Stores arbitrary data against a marketplace listing.
variationsarray<MarketplaceListingVariationStock>Marketplace listing variation stock
variations.marketplace_locationsarray<MarketplaceListingVariationStockMarketplaceLocations>Marketplace listing variation’s location-based stock
variations.resource_metadatasarray<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

FieldReturn TypeDescription
resource_metadatasarray<MarketplaceListingResourceMetadatas>Stores arbitrary data against a marketplace listing.
variationsarray<MarketplaceListingVariationCostPrice>Marketplace listing variation cost price
variations.resource_metadatasarray<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

FieldReturn TypeDescription
marketplace_listingMarketplaceListingUpdateListingsMarketplace listing updates
marketplace_listing.attributesarray<MarketplaceListingUpdateAttributes>Marketplace attribute
marketplace_listing_variationMarketplaceListingUpdateListingVariationsMarketplace listing updates
marketplace_listing_variation.attributesarray<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

KeyDescriptionTypesRestrictions
marketplace_listing_variation_idThe marketplace listing variation id.integerrequired
not null
min is 1
quantityThe listed quantity.integerrequired
not null
min is 0
marketplace_location_idThe marketplace location ID, if enabled in the app.integerrequired
min 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

MarketplaceListingUpdates

Available expands

FieldReturn TypeDescription

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

FailListingUpdate

Return Type

MarketplaceListingUpdates

Types for the Request Body

FailListingUpdate (root level)

KeyDescriptionTypesRestrictions
reasonThe reason for the failure.stringrequired
not null

Available expands

FieldReturn TypeDescription

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)

KeyDescriptionTypesRestrictions
updatesList of update IDs.array<number>required
not null
min count is 1

Available expands

FieldReturn TypeDescription

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)

KeyDescriptionTypesRestrictions
marketplace_listing_variation_idsList of marketplace listing variation IDs.array<number>required
not null
min count is 1
localesList of locale codes.array<string>required
not null
min 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

MarketplaceListingTemplates

Types for the Request Body

RenderMarketplaceListingTemplates (root level)

KeyDescriptionTypesRestrictions
marketplace_listing_variation_idMarketplace listing variation ID.numberrequired
not null
localeLocale code.stringrequired
not null
match 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

FieldReturn TypeDescription
despatch_warehouseWarehousesA warehouse.
stock_warehousesarray<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"
                }
            ]
        }
    ]
}