Retrieving a list of all the service rates available to the current user.
Scope
Any of the following scopes:
Request parameters
For more specific requests, the following parameters can be included as query parameters.
Parameter |
Type |
Description |
filter[weight] |
integer |
Weight in grams to filter on. This will only return service-rates for which the following is true weight_min ≤ filter[weight] ≤ weight_max . |
filter[volumetric_weight] |
integer |
Volumetric weight in grams to filter on. Use together with weight filter for the most accurate results. This filter uses the same logic as the weight filter, but uses the higher value between the two sent filters to determine what weight range should be returned (only applies to service-rates for services that use volumetric_weight). |
filter[service] |
string |
Comma separated string of service ids to filter the service rates by. |
filter[contract] |
string |
Comma separated string of contract ids to filter the service rates by. |
filter[has_active_contract] |
boolean |
A true value will filter services-rates that have active contract associations. false will result in service-rates that do not have active contract associations. To retrieve all services regardless of contract, omit this filter. |
Request
GET /service-rates HTTP/1.1
Accept: application/vnd.api+json
Example: https://sandbox-api.myparcel.com/service-rates
Response
{
"data": [
{
"type": "service-rates",
"id": "09a8f83a-bc8d-4598-81e6-ebf9d59a186a",
"attributes": {
"weight_min": 0,
"weight_max": 2000,
"length_max": 300,
"width_max": 200,
"height_max": 200,
"volume_max": 12,
"price": {
"amount": 995,
"currency": "EUR"
},
"step_price": {
"amount": 995,
"currency": "EUR"
},
"step_size": 100
},
"relationships": {
"contract": {
"data": {
"type": "contracts",
"id": "2cb32706-5762-4b96-9212-327e6afaeeff"
},
"links": {
"related": "https://sandbox-api.myparcel.com/contracts/2cb32706-5762-4b96-9212-327e6afaeeff"
}
},
"service": {
"data": {
"type": "services",
"id": "175a235f-aff5-4e44-87b5-3657b75c1deb"
},
"links": {
"related": "https://sandbox-api.myparcel.com/services/175a235f-aff5-4e44-87b5-3657b75c1deb"
}
},
"service_options": {
"data": [
{
"type": "service-options",
"id": "4c675b1a-516c-4410-abff-d237fd45bcd0",
"meta": {
"price": {
"amount": 995,
"currency": "EUR"
},
"included": true
}
}
]
}
},
"links": {
"self": "https://sandbox-api.myparcel.com/service-rates/c9ce29a4-6325-11e7-907b-a6006ad3dba0"
}
}
],
"meta": {
"total_pages": 13,
"total_records": 373
},
"links": {
"self": "https://sandbox-api.myparcel.com/service-rates?page[number]=3&page[size]=30",
"first": "https://sandbox-api.myparcel.com/service-rates?page[number]=1&page[size]=30",
"prev": "https://sandbox-api.myparcel.com/service-rates?page[number]=2&page[size]=30",
"next": "https://sandbox-api.myparcel.com/service-rates?page[number]=4&page[size]=30",
"last": "https://sandbox-api.myparcel.com/service-rates?page[number]=13&page[size]=30"
}
}