productBulkDownload.html - alexistaylor-cocacola/Seller-API-Documentation Wiki


Home > Product Catalog > Product Bulk Download


Product Bulk Download API details for sellers

This is an API used to download a large list of products you want to receive information about. You can request it in either json or csv format, and in response you will receive a callback code to use with a GET call. You may poll for results using the callback code in the GET call, and once your request is finished processing, you will be able to download your results using a URL received in the response. You can choose whether to receive this information in csv or json format.

This works like a bulk form of the List Products API.

This page describes how sellers may utilize the product bulk download API to submit a request for a large quantity of product information.


POST Request

Sandbox: https://sandbox.sellerapi.mywabi2b.com/v1/listProductsBulkDownload
Production: https://sellerapi.mywabi2b.com/v1/listProductsBulkDownload

Maximum 10000 products can be provided at once. All calls to this API are throttled at max 750 calls per 5 minutes and max 15,000 calls in 24 hours per seller.

You must send an Authorization header containing a JWT token which will be used for authentication purposes. You will obtain this JWT token from the Authenticate API. For more details, see the authentication page.
The name of the Authorization header must be Authorization.

You must also send a "Format" header to indicate which format you are sending. Valid values are "csv" or "json", representing a csv or json payload respectively.

You must also provide an x-api-key on a header which will be given to you during onboarding.

Request Payload Fields

Field Name Data Type Description
gtins array An array of gtins you want to receive information on.

JSON schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$title": "Bulk Download Post Request Payload",
    "description": "The payload for a Bulk Download post request",
    "type": "object",
    "required": ["gtins"],
    
    "properties": {
        "gtins": {
            "description": "A list of product gtins whose information you want to receive",
            "type": "array",
            "uniqueItems": true,
            "maxItems": 10000,
            "items": {
                "type": "string"
            }
        }
    }
}

Example POST Request Payload:

Headers:
Authorization: jwtTokenHere
Format: json (OR csv)
x-api-key: keyGoesHere

{
    "gtins": [
        "00025000040210",
        "00025000040290"
    ]
}

POST Response

The POST response payload is a callback code. This can be passed on a GET call to poll for results. The process to do this is detailed below.

Response Payload Fields

Field Name Data Type Description
callBackCode string A callback code to use in a GET call to poll for results

JSON schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$title": "Product Bulk Download Post Response Payload",
    "description": "The payload for a Product Bulk Download post response",
    "type": "object",
    "required": [],
    
    "properties": {
        "callBackCode": {
            "description": "A callback code to use in a GET call to poll for results",
            "type": "string"
        }
    }
}

Example Response Payload:

{
    "callBackCode": "bf41e1a4656ff069512249b5bac13c17d702d7e0"
}

GET Request

Sandbox: https://sandbox.sellerapi.mywabi2b.com/v1/listProductsBulkDownload
Production: https://sellerapi.mywabi2b.com/v1/listProductsBulkDownload

The get request can be used by passing the callBackCode obtained from the POST call on a URL parameter. It will respond with status information and results.

You must send an Authorization header containing a JWT token which will be used for authentication purposes. You will obtain this JWT token from the Authenticate API. For more details, see the authentication page.
The name of the Authorization header must be Authorization.

You must also provide an x-api-key on a header which will be given to you during onboarding.

Request Parameters

Param Name Description
callBackCode The callback code received from the POST request

Example GET Request Call:

Headers:
Authorization: jwtTokenHere
x-api-key: keyGoesHere

https://sandbox.sellerapi.mywabi2b.com/v1/listProductsBulkDownload?callBackCode=bf41e1a4656ff069512249b5bac13c17d702d7e0

GET Response

Response Payload Fields

Field Name Data Type Description
seller string The seller ID
format string The format of the file requested
path string The URL path that can be used to download the results
status string The status of the process

JSON schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$title": "Product Bulk Download GET Response Payload",
    "description": "The payload for a Product Bulk Download get response",
    "type": "object",
    "required": ["seller", "format", "path", "status"],
    
    "properties": {
        "seller": {
            "description": "The seller ID",
            "type": "string"
        },
        "format": {
            "description": "The format of the file requested",
            "type": "string"
        },
        "path": {
            "description": "The URL path that can be used to download the results",
            "type": "string"
        },
        "status": {
            "description": "The status of the process",
            "type": "string"
        }
    }
}

Example Response Payload:

{
    "format": "json",
    "seller": "SID-0001",
    "path": "https://sandbox.sellerapi.mywabi2b.com/tmp/short/productDownload/2022-8/23/17/e4c457c01b940ee99a4c4a2e913eb2d9be327dbb.json",
    "status": "Complete"
}

Example In Progress Response Payload:

{
    "seller": "SID-0001",
    "format": "json",
    "status": "In Progress"
}

Final Results from URL

This section describes the structure and examples of the final results that can be received from the URL given after the request is finished processing.

Response Payload Fields

Field Name Data Type Description
product string The gtin of the product.
productName string The name of the product.
productDescription string The description of the product.
brand string The product's brand.
category string The product's category.
ownsProductMasterData boolean Indicates whether the master data matches yours.
inMyCatalog boolean Indicates whether you are selling this product.
specs array Array of product specs in name-value pairs.
specs.name string The name of the spec.
specs.value string The value of the spec.
media array Array of product media, in type-url pairs.
media.type string The type of the media. Possible values: "Product Image", "Product Search Image", "Product Image Thumbnail"
media.url string The url of the product media.
lastSaveStatus string The saving status of any recent updates to this product. Possible values: "SAVING", "COMPLETED", "FAILED_TO_SAVE"
publishStatus string The publish status of the product. Possible values: "Pending Review", "In Creation", "Rejected", "Approved", "Released"
failedReason string If the last save status is failed, this will contain the reason. Null otherwise.
rejectionReason string If the product's publish status is Rejected, this will contain the reason. Null otherwise.

Regarding Publish Status, "Pending Review" means your own request to sell this product has not been reviewed yet. It will take precedence over other statuses. "In Creation" means the product has not yet been published to Wabi2b in order to be sold. "Rejected" means your request to sell the item has been reviewed and rejected. "Approved" means you have been approved to sell, but may not mean the product itself is published and ready to sell. And finally, "Released" means that the product has been published and is ready to be added to product catalogs and sold on Wabi2b.

JSON schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$title": "List Products Response Payload",
    "description": "The payload for a List Products post response",
    "type": "array",
    "items": {
        "type": "object",
        "description": "Product information",
        "required": ["product", "productName", "productDescription", "brand", "category", "ownsProductMasterData", "inMyCatalog", "rejectionReason", "specs", "media", "lastSaveStatus", "publishStatus", "failedReason"],

        "properties": {
            "product": {
                "description": "The gtin of the product.",
                "type": "string",
                "minLength": 14,
                "maxLength": 14
            },
            "productName": {
                "description": "The name of the product.",
                "type": "string"
            },
            "productDescription": {
                "description": "The description of the product.",
                "type": "string"
            },
            "brand": {
                "description": "The product's brand.",
                "type": "string"
            },
            "category": {
                "description": "The product's category.",
                "type": "string"
            },
            "ownsProductMasterData": {
                "description": "Indicates whether the master data came from you.",
                "type": "boolean"
            },
            "inMyCatalog": {
                "description": "Indicates whether you are selling this product.",
                "type": "boolean"
            },
            "specs": {
                "description": "Array of product specs in name-value pairs.",
                "type": "array",
                "items": { "$ref": "#/$defs/spec" }
            },
            "media": {
                "description": "Array of product media, in type-url pairs.",
                "type": "array",
                "items": { "$ref": "#/$defs/media" }
            }, 
            "lastSaveStatus": {
                "description": "The saving status of any recent updates to this product.",
                "type": "string",
                "enum": ["SAVING", "COMPLETED", "FAILED_TO_SAVE"]
            },
            "publishStatus": {
                "description": "The publish status of the product.",
                "type": "string",
                "enum": ["Pending Review", "In Creation", "Rejected", "Approved", "Released"]
            },
            "failedReason": {
                "description": "If the last save status is failed, this will contain the reason. Null otherwise.",
                "type": "string"
            },
            "rejectionReason": {
                "description": "If the product's publish status is Rejected, this will contain the reason. Null otherwise.",
                "type": "string"
            }
        }
    },

    "$defs": {
        "spec": {
            "type": "object",
            "description": "A name-value pair describing a spec.",
            "required": ["name", "value"],

            "properties": {
                "name": {
                    "description": "The name of the spec.",
                    "type": "string"
                }, 
                "value": {
                    "description": "The value of the spec.",
                    "type": "string"
                }
            }
        },
        "media": {
            "type": "object",
            "description": "A type-url pair describing a product media.",
            "required": ["type", "url"],

            "properties": {
                "type": {
                    "description": "The type of the media.",
                    "type": "string",
                    "enum": ["Product Image", "Product Search Image", "Product Image Thumbnail"]
                },
                "url": {
                    "description": "The url of the product media.",
                    "type": "string"
                }
            }
        }
    }
}

Example JSON Response Payload

[
    {
        "product": "00025000040295",
        "media": [
            {
                "type": "Product Image",
                "url": "https://sandbox.productimages.mywabi2b.com/images/00025000040295/63f9b922f7f3fd2005c493e4263459ac/20220728124551788/ProductImage.jpg"
            },
            {
                "type": "Product Image Thumbnail",
                "url": "https://sandbox.productimages.mywabi2b.com/images/00025000040295/63f9b922f7f3fd2005c493e4263459ac/20220728124551788/ProductImageThumbnail.jpg"
            },
            {
                "type": "Product Search Image",
                "url": "https://sandbox.productimages.mywabi2b.com/images/00025000040295/63f9b922f7f3fd2005c493e4263459ac/20220728124551788/ProductSearchImage.jpg"
            }
        ],
        "productName": null,
        "specs": [
            {
                "name": "Unit Of Measure",
                "value": "oz"
            },
            {
                "name": "Unit Size",
                "value": "12"
            }
        ],
        "rejectionReason": null,
        "category": "Snacks & Chips",
        "brand": "Super Chips Co",
        "productDescription": null,
        "ownsProductMasterData": false,
        "inMyCatalog": false
    }
]

Example CSV Response Payload

product,productName,productDescription,brand,ownsProductMasterData,inMyCatalog,rejectionReason,category,media1-url,media1-type,media2-url,media2-type,media3-url,media3-type,spec1-name,spec1-value,spec2-name,spec2-value,spec3-name,spec3-value,spec4-name,spec4-value,spec5-name,spec5-value
00025000040295,,,Super Chips Co,false,false,,Snacks & Chips,https://sandbox.productimages.mywabi2b.com/images/00025000040295/63f9b922f7f3fd2005c493e4263459ac/20220728124551788/ProductImage.jpg,Product Image,https://sandbox.productimages.mywabi2b.com/images/00025000040295/63f9b922f7f3fd2005c493e4263459ac/20220728124551788/ProductImageThumbnail.jpg,Product Image Thumbnail,https://sandbox.productimages.mywabi2b.com/images/00025000040295/63f9b922f7f3fd2005c493e4263459ac/20220728124551788/ProductSearchImage.jpg,Product Search Image,Unit Of Measure,oz,Unit Size,12,,,,,,