Get a Price Book by ID
GEThttps://euwest.api.elasticpath.com/pcm/pricebooks/:pricebookID
Retrieves the specified price book. To include prices in the response, append ?include=prices
to the path.
Request
Path Parameters
pricebookID stringrequired
The unique identifier of a price book.
Query Parameters
include string
Possible values: [prices
]
To include product prices in a response, add include=prices
.
Responses
- 200
- default
The price book.
- application/json
- Schema
- Example (from schema)
Schema
data objectrequired
links object
included object[]
{
"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"
},
"included": [
{
"type": "product-price",
"pricebook_external_ref": "a-pricebook-external-ref",
"attributes": {
"currencies": {
"USD": {
"amount": 100,
"includes_tax": false,
"tiers": {
"min_5": {
"minimum_quantity": 5,
"amount": 50
}
}
},
"CAD": {
"amount": 127,
"includes_tax": false,
"tiers": {
"min_10": {
"minimum_quantity": 10,
"amount": 100
}
}
},
"GBP": {
"amount": 73,
"includes_tax": true,
"tiers": {
"min_20": {
"minimum_quantity": 20,
"amount": 60
}
}
}
},
"sku": "product-sku-a",
"sales": {
"summer": {
"schedule": {
"valid_form": "2023-12-24T09:00:00",
"valid_to": "2023-12-25T09:00:00"
},
"currencies": {
"USD": {
"amount": 90,
"includes_tax": false,
"tiers": {
"min_5": {
"minimum_quantity": 5,
"amount": 40
}
}
},
"CAD": {
"amount": 117,
"includes_tax": false,
"tiers": {
"min_10": {
"minimum_quantity": 10,
"amount": 80
}
}
},
"GBP": {
"amount": 65,
"includes_tax": true,
"tiers": {
"min_20": {
"minimum_quantity": 20,
"amount": 50
}
}
}
}
}
},
"external_ref": "external-ref",
"created_at": "2020-09-22T09:00:00Z",
"updated_at": "2020-09-22T09:00:00Z",
"admin_attributes": {
"cost_of_goods": "42.0",
"charge_type": "credit card"
},
"shopper_attributes": {
"cost_of_goods": "42.0",
"charge_type": "credit card"
}
},
"id": "a915553d-935d-4d56-870b-817b47a44a99",
"meta": {
"owner": "store",
"pricebook_id": "4c45e4ec-26e0-4043-86e4-c15b9cf985a7"
}
}
]
}
Unexpected error.
- application/json
- Schema
- Example (from schema)
Schema
errors object[]
{
"errors": [
{
"detail": "The price book already exists",
"status": "409",
"title": "conflict"
}
]
}
Authorization: Authorization
name: Authorizationtype: httpin: headerscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X GET 'https://euwest.api.elasticpath.com/pcm/pricebooks/:pricebookID' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
ResponseClear