Create a Price Book
POST
Create a Price Book
https://api.moltin.com/pcm/pricebooks
Creates a price book. You can add the prices to the price book now or update the price book later.
Parameters
Headers
Name | Required | Type | Description |
---|---|---|---|
Authorization | Required | string | The Bearer token to grant access to the API. |
Body
Required. A pricebook
object with the following attributes:
Name | Required | Type | Description |
---|---|---|---|
type | Required | string | Always: pricebook |
attributes.name | Required | string | A unique name for the price book. |
attributes.description | Optional | string | The purpose for the price book, such as flash sale pricing or preferred customer pricing. |
Request Example
curl -X POST https://api.moltin.com/pcm/pricebooks \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "pricebook",
"attributes": {
"name": "Customer AAA Pricing",
"description": "Tier 1 pricing"
}
}
}'
Response Example
200 OK
{
"data": {
"id": "60472644-9682-4364-8ff6-40c92f4bb091",
"type": "pricebook",
"attributes": {
"created_at": "2021-02-08T20:54:07.494Z",
"description": "Tier 1 pricing",
"name": "Customer AAA Pricing",
"updated_at": "2021-02-08T20:54:07.494Z"
},
"meta": {
"owner": "store"
}
},
"links": {
"self": "/pcm/pricebooks/60472644-9682-4364-8ff6-40c92f4bb091"
}
}