Webador / sendcloud

Provides a PHP client to interact with the SendCloud API in an object-oriented way.
MIT License
16 stars 14 forks source link

Add extra API functionality for order_status, payment_status & total_order_value #36

Open Web10-Joris opened 1 month ago

Web10-Joris commented 1 month ago

Currently it is not possible to add order_status, payment_status & total_order_value per Parcel right? Is it possible to built this in?

https://api.sendcloud.dev/docs/sendcloud-public-api/integrations/operations/create-a-integration-shipment

villermen commented 3 weeks ago

@Web10-Joris The documentation you're referring to is of the integrations API. This client supports the shipping and service points APIs right now. I've checked and there is no option to work with these properties there. It's unlikely I will be available to implement a full new API anytime soon without a PR by someone else.

I'm happy to think with you about an alternative solution for your use case though.

Web10-Joris commented 3 weeks ago

@villermen Thanks for your response! I see that the Shipments API also provides order_status & total_order_value as possible input options. https://api.sendcloud.dev/docs/sendcloud-public-api/parcels/operations/create-a-parcel

This is part of the Shipping API right? Then only the payment_status wouldn't be possible, but adding the other two will significantly improve the usage, since it is then possible to set insurances based on the order value and to sync the shipments with the webshop based on their order_status.

villermen commented 3 weeks ago

@Web10-Joris For parcel creation it appears only total_order_value+total_order_value_currency are possible because they are linked to delivery (cach on delivery). I'm not seeing the other properties in these calls/the parcel model.

An alternative route could be to send insured_value with the request (currently also not possible) and update it when the order status changes.