Hi Shopify Community,
Im working with an app that will provide shipping rates for Shopify shops, but i ran into a problem i hope you can help me with.
The problem is that, we define shipping rules on our platform regarding to the Shopify order data from the Carrier Service, but i need to know if a discount was added or some promocode, but i can’t see that in the Carrier Service request. Below is an example of this request:
{
"rate": {
"origin": {
"country": "DK",
"postal_code": "9400",
"province": null,
"city": "N\u00f8rresundby",
"name": null,
"address1": "Stigsborgvej 60",
"address2": null,
"address3": null,
"phone": null,
"fax": null,
"email": null,
"address_type": null,
"company_name": "coolsc"
},
"destination": {
"country": "DK",
"postal_code": "9400",
"province": null,
"city": "N\u00f8rresundby",
"name": "Kevin Test",
"address1": "Testvej 31",
"address2": "ST 3",
"address3": null,
"phone": null,
"fax": null,
"email": null,
"address_type": null,
"company_name": null
},
"items": [
{
"name": "Test produkt",
"sku": "test100",
"quantity": 1,
"grams": 1200,
"price": 10000,
"vendor": "CoolSC",
"requires_shipping": true,
"taxable": true,
"fulfillment_service": "manual",
"properties": null,
"product_id": 5714741231771,
"variant_id": 36401958027419
}
],
"currency": "DKK",
"locale": "da"
}
}
As you can see im not able to see that an discount was added in this checkout. I noticed i have to get the Checkout object to know this, but my question is “How do i know the Checkout ID/Token, so i can find the checkout?”
Hope you guys can help me out here.