Update a Price Book by ID
PUT/pcm/pricebooks/:pricebookID
Updates the specified price book. Specify whichever attributes you want to change. The values of the other attributes remain the same. If the attributes section is empty, the price book is not updated.
Request
Path Parameters
The unique identifier of a price book.
- application/json
Body
required
An updated price book with the following attributes.
data objectrequired
Updates the specified price book.
The unique identifier of a price book.
Possible values: [pricebook
]
Default value: pricebook
Always pricebook
.
attributes objectrequired
A brief description that describes a price book, for example, flash sale pricing or preferred customer pricing.
Possible values: non-empty
The name of a price book. Price books must have a unique name.
A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.
Responses
- 200
- default
An updated price book with the following attributes.
- application/json
- Schema
- Example (from schema)
Schema
data objectrequired
A price book with the following attributes.
A unique identifier of a price book.
Possible values: [pricebook
]
Default value: pricebook
Always pricebook
.
attributes objectrequired
A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.
A brief description that outlines the purpose of a price book, for example, flash sale pricing or preferred customer pricing.
The name of a price book. Price books must have a unique name
The date and time when the price book was created.
The date and time when the price book was last updated.
meta object
The resource owner, either organization
or store
.
links object
Links are used to allow you to move between requests.
Single entities use a self parameter with a link to that specific resource.
{
"data": {
"id": "4c45e4ec-26e0-4043-86e4-c15b9cf985a7",
"type": "pricebook",
"attributes": {
"external_ref": "an-external-ref",
"description": "This is a test price book",
"name": "Standard Price Book",
"created_at": "2020-09-22T09:00:00Z",
"updated_at": "2020-09-22T09:00:00Z"
},
"meta": {
"owner": "store"
}
},
"links": {
"self": "/pcm/pricebooks/4c45e4ec-26e0-4043-86e4-c15b9cf985a7"
}
}
Unexpected error.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
{
"errors": [
{
"detail": "The price book already exists",
"status": "409",
"title": "conflict"
}
]
}