See available sales discounts and rates promotions.
The Promotions feature allows users to apply discounts to shipment rates. The SHiiP sales team can create unique promo codes tailored to specific shipment types, date ranges, weight limits, or geographical restrictions (such as countries and states).
To determine if any discounts are available for your customers or to apply them via an endpoint before booking a shipment, follow these three steps:
Retrieve Promotions: Use the get-all-promotions endpoint to fetch all available promo codes.
Apply a Promo Code: Select the desired discount code and call the apply endpoint to activate it for your shipment.
Attach Discount Payload: Include a sample discount payload in the bookShipment endpoint request to ensure the discount is successfully applied on our end.
Get All Promotions
This is used to get all available promotions that could be used.
{"status":false,"message":"Secret Key not found","status_code":401}
{"data": [ {"code":"CASTWINTER","description":"Use this code for 10% discount for all local shipments from 5th November to 15th November 2024." } ],"message":"Promotions retrieved","status_code":200}
Apply Discount
Select a promotion code and apply a discount.
Payload Validation
Field
Type
Required
Validation Rules
Description
code
String
Yes
A unique code representing a promotion
amount
Integer
Yes
Must be a positive integer.
The shipment rate selected
fromCountryCode
String
Yes
Must be a valid string and a valid country_code
Country the shipment originates from
toCountryCode
String
Yes
Must be a valid string and a valid country_code
Country the shipment is being sent to
shipmentType
String
Yes
Must be a string
Type of shipment, e.g., interstate, international.
{"status":false,"message":"The code field is required., The amount field is required., The from country code field is required., The to country code field is required., The shipment type field is required., The weight field is required., The courier field is required."}
{"message":"Promotion is expired","status_code":403}
{"message":"Promotion is applied successfully","status_code":200,"data": {"total_amount":10000,"discounted_amount":8500,"promotion_code":"JAY10","promotion_name":"Special promotion for festive customers!","promotion_criteria":"shipment_type","percentage_off":15 }}
Attach Payload
After successfully applying the discount code, use the payload below when calling the bookShipment endpoint. This ensures the discount is properly applied when the shipment is processed by our system.