Gets all Prices
GEThttps://euwest.api.elasticpath.com/pcm/pricebooks/prices
Allows you to retrieve all prices for a product, irrespective of the different price books that include that product's price. For example, you can filter for all prices for a specified sku
, or filter for all prices changed before or after a given date. This will retrieve prices from all price books.
Filtering
This endpoint supports filtering. For general syntax, see Filtering.
Operator | Attribute | Description | Example |
---|---|---|---|
eq | external_ref , sku , id | Equals. Checks if the values of two operands are equal. If they are, the condition is true. | filter=eq(sku,some-sku) |
in | external_ref , sku , id | In. Checks if the values are included in the specified list. If they are, the condition is true. | filter=in(sku,some-sku) |
like | external_ref , sku | Like. Checks if the operand contains the specified string. Wildcards are supported. | filter=like(sku,some-sku) |
gt | updated_at , created_at | Greater than. Checks if the value on the left of the operator is greater than the value on the right. If it is, the condition is true. | filter=gt(updated_at,2018-04-16T10:11:59.715Z) |
lt | updated_at , created_at | Less than. Checks if the value on the left of the operator is less than the value on the right. If it is, the condition is true. | filter=lt(updated_at,2018-04-16T10:11:59.715Z) |
Request
Query Parameters
This endpoint supports filtering. See Filtering.
Possible values: >= 1
The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the page length store setting is used.
Possible values: <= 10000
The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page offset is set, the page length store setting is used.
Responses
- 200
- default
The price list.
- application/json
- Schema
- Example (auto)
Schema
meta object
data object[]required
links object
{
"meta": {
"page": {
"limit": 10,
"offset": 0,
"current": 0,
"total": 1
}
},
"data": [
{
"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"
}
}
],
"links": {
"self": "/pcm/pricebooks/prices?filter=like(sku,product)",
"first": "string",
"prev": "string",
"next": "string"
}
}
Unexpected error
- application/json
- Schema
- Example (auto)
Schema
errors object[]
{
"errors": [
{
"detail": "The price already exists",
"status": "409",
"title": "conflict"
}
]
}
Authorization: Authorization
name: Authorizationtype: httpin: headerscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://euwest.api.elasticpath.com/pcm/pricebooks/prices");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <Authorization>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());