shippingOptions
Shipping Rules allow you to provide flexible (yet structured) Shipping Options to your end consumers. This query allows you to return the entire Shipping Option result set to your Connected Integration.
2 minute read
Key Information
Use-Case
Shipping Rules allow you to determine the rate you charge for a purchased item based on where you are going to send it (Shipping Zone) and an applicable Shipping Profile (e.g. Weight, size, delivery time slot etc.). The Rate, Zone and Profile together form Shipping Options (aka Rules). The use case for this query is when Shipping Options have been defined in Marketplacer and you want to consume those (rules) into your Connected Integration domain for further use, e.g. to calculate shipping at checkout
Further Points of Note
- Shipping Rules can be defined globally for the marketplacer, or at the Seller level, for more information on Shipping Rules, refer to this article.
Availability
- Operator API: Yes
- Seller API: Yes
Example
query returnShippingOptions{
shippingOptions (first: 10, after: null){
totalCount
pageInfo {
endCursor
hasNextPage
}
nodes {
name
shippingRates (first: 10, after: null){
nodes{
id
name
rateCents
}
}
shippingProfiles (first: 10, after: null){
nodes{
id
name
}
}
shippingZones (first: 10, after: null)
{
nodes{
id
name
}
}
id
seller {
id
businessName
}
}
}
}
Arguments
Name | Type | Description |
---|---|---|
sellerId | ID | Filter the refund requests down to 1 Seller. |
filters | ShippingOptionFilters | Filter on whether the rules were updated up to or after a given point in time |
after | String | Pagination cursor for moving through result set - more on pagination here |
before | String | Not in use - backwards pagination not supported |
first | Int | Pagination page size - more on pagination here |
last | Int | Not in use - backwards pagination not supported |
Response
Returns ShippingOptionsConnection
Error Responses
HTTP Error | Error Message | Meaning |
---|---|---|
401 | Unauthorized | You don’t have access to the endpoint, likely Basic Authentication credentials are missing |
401 | API Token has expired | You don’t have access to the endpoint, likely that you are either not supplying an API Key, or the key you are supplying is invalid |