Hi
I would like to show delivery dates in the checkout page, calculated using items in the cart, shipping address and shipping rate, I tried to make an app in the checkout extension ui but it is too limited impossible to do what I want, I tried using the “carrier service” api:
my server is made with nodejs/express
I make a carrier service like this (my server has a localtunnel url so i can send requests)
const response = await restClient.post({
path: 'carrier_services.json',
data: {
'carrier_service': {
'name': 'test_carrier_service',
'active': true,
'callback_url': 'https://small-beers-invite.loca.lt/testCarrier',
'service_discovery': true,
},
},
});
server side I have this
router.post('/testCarrier', (req, res) => {
console.dir(req.body, { depth: null });
res.status(200).send({ 'service_name': 'test service', 'description': '', 'service_code': 'test_service', 'currency': 'EUR', 'min_delivery_date': '2024-01-13', 'max_delivery_date': '2024-01-16', 'total_price': 0, 'phone_required': false });
});
It logs correctly but in the checkout page I have nothing
in admin side I have this
in the checkout the address is in France and the item is in the listed items of the shipping profile
I think I didn’t understand how to use it, can someone explain please?
And if it is not meant to show custom delivery dates, is there a way to do it?
The perfect solution for me would be something similar, when customer gets to shipping page, shopify sends to my api shipping address, available shipping rates and items in the cart, my api responds with delivery dates for each shipping rates and shopify shows them under available shipping rates.
something like:
shopify:
- sends {{address1:“”, address2:“”, city:“”…}, lines:[{title:“item1”, sku:000…}, {…], shippingRates:[{, title:“”}, {…]}
my api:
- {shippingRate1:{date_min:“”, date_max:“”}, shippingRate2…}
if this doesn’t exist is there a way to show to the customer custom calculated delivery dates?

