Setting up pricing and shipping

How does product pricing & shipping work with the API.

You can use our API endpoints to get the pricing information. 

The GET shippriceestimate endpoint is used to get shipping price estimate for a product.
The GET shippriceestimate takes these arguments:

  • productId - required - ID of the Product for which the shipping prices are to be returned

  • countryCode - required - the 2 character (ISO 3166-1 alpha-2) country code that the user is interested in shipping to

  • currencyCode - optional, defaults to “USD” - the currency in which the prices will be represented

The POST priceestimate endpoint is used to estimate cost of the order, including any coupon discounts.

The POST data should be JSON object with following properties:

  • ShipToAddress object, with following properties:

    • FirstName - required - first name of the user

    • LastName - required - last name of the user

    • Line1 - required - shipping address line 1

    • Line2 - optional - shipping address line 2

    • City - required - shipping city

    • State - optional - shipping state (if applicable)

    • PostalCode - required - shipping postal code

    • CountryCode - required - shipping 2-letter country code

    • Email - required - user’s email

    • Phone - required - user’s phone

  • Items array of objects containing the following properties:

    • SKU - required - SKU of product variant

    • ShipCarrierMethodId - required - ID of shipping carrier method

    • Quantity - required - quantity of items with this SKU

    • Images - required - list of images, each containing Index of image and ManipCommand

  • Payment object, with following properties:

    • CurrencyCode - required - currency code

  • CouponCode - optional - a JSON Array of Strings (example: [“coupon_code_1”, “coupon_code_2”])

It’s important to note that shipping prices can change based off of how much data you give us. For example, if you give us a full address that is in the US, you may get a different price than if you only passed in the country code. Thus, make sure to pass in the entire address as often as possible.

For example codes and more information, check out the articles here and here.