GoSweetSpot: Shipping options

GoSweetSpot: Shipping options

Description

To use Shipping Options API, you may follow the steps to set it up first

GoSweetSpot Shipping Options App

Once you have it ready, you can use the following endpoint to get shipping rates for your website.

PS. This is NOT the same as POST api/rates

Header X-GSS-Hmac-Sha256 is based on your request body and a secret assigned to you.

To automatically generate the header in postman, you can use Pre-request Script below.


var signBytes = CryptoJS.HmacSHA256(pm.request.body.raw, 'YOUR_SECRET');
var signHex = CryptoJS.enc.Hex.stringify(signBytes);
pm.request.headers.add({
    key: "X-GSS-Hmac-Sha256",
    value: signHex
});

Replace YOUR_SECRET with your real secret.


Requests

Method: POST
Content Type: application/json
URL: https://checkout.gosweetspot.com/CustomApi/Rates/{{your shipping options app ID}}


Headers

X-GSS-Hmac-Sha256 : hash-based message authentication code, generate by your request body and secret assigned to you.


Parameters

AttributeTypeDescription
weightdecimalTotal weight of the shipping cart in kg.
cartvaluedecimalTotal cart value of the shipping cart.
destinationobjectShipping Options Address Model.

Return format

A JSON array of objects.


Response

The response is a JSON array of object with the following fields.

AttributeTypeDescription
descriptionstringDescription of the shipping rate.
shortcodestringA short code is associated with the shipping rate.
ratedecimalTotal price of the shipping rate.
    • Related Articles

    • GoSweetSpot: How to set up Shipping options

      What are GoSweetSpot Shipping Options? Define rules based on shopping cart value, and weight of products in the cart, or simply mark up your current rates. Apply surcharges for residential or outer area (rural) deliveries as validated by us based on ...
    • GoSweetSpot: WooCommerce Installation

      Prerequisite This article is an extension of the GoSweetSpot Shipping Options App article. Please ensure you have read that before continuing. Linking GoSweetSpot and WooCommerce Plugin After finding the GoSweetSpot Shipping Options plugin on ...
    • GoSweetSpot: Shopify Installation

      Prerequisites Ensure you have read the shipping options article before continuing. Your Shopify plan may not allow Carrier Calculated Shipping by default. If you cannot add the GoSweetSpot Carrier Rate, you may need to contact Shopify (this is not a ...
    • GoSweetSpot: Site Settings

      Site Settings can be found under Administration. The Site Settings page allows you to customise your GoSweetSpot page. Click to Zoom The Site Settings tab will take you to the Site Preferences & Settings screen. Click to Zoom Description of Site ...
    • GoSweetSpot: Enabling Harmonised Code & additional documents

      If you're planning to send internationally through GoSweetSpot, you may need to input a Harmonised Code and upload additional documents. If you're not seeing the fields for Harmonised Code or the option for additional documents on your shipping page, ...