CarrierService API custom JSON payload

Highlighted
New Member
7 0 0

Hi Guys,

We are planning to upgrade our shopify plan to advanced and use the carrier service API to get a custom shipping rate.
We already have a calculation and parameters for this, however is there a way to customize the payload the shopify will send to our endpoint?

0 Likes
Highlighted
New Member
7 0 0

Not related to the above, but also noticed that the carrierService  is being called before the shipping part.
Instead of being called when on the shipping part of the Checkout, it is being called on the the information part?

This might be the reason why the rates we are passing through the API isn't showing on the shipping part.
Does anyone also experience this?? I am sure the API call was called just on check out and not on shipping part, it logged the post on our database.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
55 6 9

Hi @JohnBenVicCo,

I don't believe the request payload that Shopify sends to the CarrierService can be customized from what is listed here.

Regarding your other question, it's possible that Shopify prefetches before proceeding to checkout to improve the user experience, in the case where the external CarrierService may fail to respond by the time the customer reaches checkout.

Callum | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
7 0 0

Thank you for answering the first question.

For the second one... if the shopify prefetches, won't the values be null, because the user hasn't input any information yet? have been logging the values being posted by shopify but the destination is always null. Also have hardcoded a simple return yet it is still not showing, have tried using postman and it's getting a result there.

see screenshot below

JohnBenVicCo_0-1596384357454.png

 

0 Likes
Highlighted
New Member
7 0 0

HI @CalD ,

 

Can you help us with the follow up question above?

0 Likes