Shipping Methods
Prerequisites
access_token
from Headless API AuthenticationcultureCode
, e.g.en-US
(string)countryId
from CountriespriceGroupId
from the cart or from Price Groups
Get Shipping Methods
Optional Parameters
maxItems
, limits the number of results returned. in PaginationnextPagingToken
, required to fetch the next page. Read more in Pagination
Request
curl -D- -X GET <base_url>/api/v1/shipping-methods?cultureCode=<cultureCode>&countryId=<countryId>&priceGroupId=<priceGroupId> \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
-H 'Content-Type: application/json' \
Response
{
"nextPagingToken": null,
"shippingMethods": [
{
"description": "{description}",
"displayName": "{displayName}",
"id": "{id}",
"imageUrl": "{imageUrl}",
"name": "{name}",
"price": {
"amount": "{amount}",
"currency": "{currency}"
}
},
{
"description": "{description}",
"displayName": "{displayName}",
"id": "{id}",
"imageUrl": "{imageUrl}",
"name": "{name}",
"price": {
"amount": "{amount}",
"currency": "{currency}"
}
},
{
"description": "{description}",
"displayName": "{displayName}",
"id": "{id}",
"imageUrl": "{imageUrl}",
"name": "{name}",
"price": {
"amount": "{amount}",
"currency": "{currency}"
}
}
]
}
Error Handling
Error
Description
BadRequest (400)
No shipping methods are found for the given price group or country.
Unauthorized (401)
The token is expired.
Forbidden (403)
The token does not have access to this endpoint.
Error Response Example
{
"errors":
[
{
"error-description": "Shipping methods not found on the given context.",
"error": "BadRequest"
}
]
}
Related Articles
Last updated
Was this helpful?