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.

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

NameTypeDescription
sellerIdIDFilter the refund requests down to 1 Seller.
filtersShippingOptionFiltersFilter on whether the rules were updated up to or after a given point in time
afterStringPagination cursor for moving through result set - more on pagination here
beforeStringNot in use - backwards pagination not supported
firstIntPagination page size - more on pagination here
lastIntNot in use - backwards pagination not supported

Response

Returns ShippingOptionsConnection


Error Responses

HTTP ErrorError MessageMeaning
401UnauthorizedYou don’t have access to the endpoint, likely Basic Authentication credentials are missing
401API Token has expiredYou 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

Further Reading