✨ Add service.zone_code_to to Shipment specification#290
Conversation
| "service": { | ||
| "required": [ | ||
| "code" | ||
| ] | ||
| }, |
There was a problem hiding this comment.
Had a little discussion with @M4tini about this on Slack. I asked why the service and service.code properties were only required for /get-multi-colli-service-rates and not also for /get-service-rates.
He explained that initially, the endpoint was built to support a request for rates for multiple services, which made it impossible for this field to be required. However, in practice, we only ever request a rate for a single service at a time through our API and we also assume that the first result in the response (which is an array) will contain the correct rate.
Therefore, it is not a problem and more accurately reflects how we retrieve dynamic service rates to make these properties required in the schema
Related issue
https://myparcelcombv.atlassian.net/browse/MP-7853