Skip to main content

Import a Price

POST 

/pcm/pricebooks/import

You can create and update product price books and prices in bulk, at both organization and store level, using the Price Book Import API. This is useful, for example, if you have a promotion and want to update 50,000 product prices. Rather than having to go to each price book and manually edit 50,000 prices, you can use the Price Book Import API to bulk update all your product prices at the same time, including setting different prices for different currencies.

The API uses a JSONL file. The JSONL file can be compressed to a GZIP file. Here is an example of a JSONL file. See Price Book Export JSONL File.

The API works on a "best endeavours" approach. In other words, the API does its best to create/update the price book objects based on the file that you provide. If there are any errors, then the import is aborted, and the job fails with an error. You can then use the job results to understand what objects the API created/updated until the import failed, and to troubleshoot any errors. See Import Results.

Price book imports are processed sequentially in the order that you send your import API requests.

Responses

The created price book

Schema
    data objectrequired

    Top level entity in the jobs domain model. It contains a job details.

    id stringrequired
    attributes objectrequired
    created_at date-timerequired
    updated_at date-timerequired
    started_at date-timenullable
    completed_at date-timenullable
    type stringrequired
    status stringrequired
    meta objectrequired
    x_request_id stringrequired
Loading...