The idea is to allow users with loyalty coins to redeem their loyalty coins and purchase at discounted rate.
Nector Shiprocket Checkout APIs.postman_collection.json
Assuming “shopify” for below examples
webhook_id
part of the endpoint is specific to each merchant, which can be accessed from the nector dashboard or can be provided by the nector team as well.<aside> ⚠️ Don’t call this API from frontend
</aside>
Request
POST - platform.nector.io/api/open/integrations/shiprocketwebhook/:webhook_id
{
customer_id: "this needs to be shopify prefixed customer id (Ex. shopify-458737453897), one of customer_id or mobile is required",
mobile: "this is 10 digit mobile number, one of customer_id or mobile is required",
action: "list, perform, revert, perform_unsafe, revert_unsafe",
amount: "this is final cart amount based on which the discount will be calculated"
}
Response
{
meta: {
... other props
}
data: {
... other props
}
}
**before placing the order, call this API with action=“list” with standard timeout of whatever seconds is applicable, (30 sec should be max), if this api does not respond or if it responds with the below error response, kindly do not call this api again with action = ‘perform’ or action = ‘revert’ to avoid order placing issue at Shiprocket
calling this api with action=“list” works like heartbeat, if there is no heartbeat please don’t proceed with remaining apis**
Error Response
{
meta: {
code: 422 (a non 200 response code)
... other props
}
data: {
... other props
}
}