Skip to content

Quote shipping rates for a destination country and optional basket.

POST
/v1/shipping-rates
curl --request POST \
--url 'https://api.staging.elasticstage.com/store/v1/shipping-rates?currency=GBP' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "country_code": "GB", "items": [ { "sku": "LUM-ME-12-001", "quantity": 1 } ] }'
currency
string
default: GBP
Allowed values: GBP USD EUR JPY
Example
GBP
Media typeapplication/json
object
country_code
required
string
/^[A-Za-z]{2}$/
Example
GB
items
Array<object>
object
sku
required
string
quantity
required
integer
>= 1 <= 9007199254740991
Example
{
"country_code": "GB",
"items": [
{
"sku": "LUM-ME-12-001",
"quantity": 1
}
]
}

Default Response

Media typeapplication/json
object
data
required
Array<object>
object
id
required
string
name
required
string
carriers
required
Array<string>
description
Any of:
string
price
required
object
amount
required
integer
<= 9007199254740991
currency
required
string
Allowed values: GBP USD EUR JPY
Example
{
"data": [
{
"id": "standard_eu",
"name": "Standard (EU)",
"carriers": [
"Royal Mail",
"Whistl"
],
"description": "Tracked delivery across the EU.",
"price": {
"amount": 799,
"currency": "GBP"
}
}
]
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"error": "Bad Request",
"message": "Request validation failed.",
"details": [
{
"field": "items",
"reason": "must contain at least 1 item"
}
]
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 401,
"code": "UNAUTHORIZED",
"error": "Unauthorized",
"message": "Authentication required."
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 403,
"code": "FORBIDDEN",
"error": "Forbidden",
"message": "Insufficient permissions."
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 422,
"code": "UNPROCESSABLE_ENTITY",
"error": "Unprocessable Entity",
"message": "One or more items could not be shipped.",
"details": [
{
"field": "items.0.sku",
"reason": "Variant 'LUM-ME-12-001' is not available for purchase."
}
]
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 429,
"code": "RATE_LIMITED",
"error": "Too Many Requests",
"message": "Rate limit exceeded."
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 500,
"code": "INTERNAL_ERROR",
"error": "Internal Server Error",
"message": "An unexpected error occurred."
}

Default Response

Media typeapplication/json
object
statusCode
required
number
code
required
string
Allowed values: VALIDATION_ERROR UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_ENTITY RATE_LIMITED SERVICE_UNAVAILABLE INTERNAL_ERROR
error
required
string
message
required
string
details
Array
Example
{
"statusCode": 503,
"code": "SERVICE_UNAVAILABLE",
"error": "Service Unavailable",
"message": "The service is temporarily unavailable."
}