Why doesn’t Shopify save metadata from CarrierService response?
Summary
When returning shipping rates from a Carrier Service endpoint, the metadata field in the response is not persisted to the order’s shipping line, making it impossible to access critical shipping information needed for downstream order processing.
The Problem
According to the Carrier Service API documentation, the rate response supports a metadata object for “additional information about the rate”. However, when an order is placed with a carrier service rate, this metadata is completely discarded and not available anywhere on the order.
Our Use Case
Currently, we return rates like this:
json
{
"rates": [
{
"service_name": "UPS Worldwide Expedited DDP",
"service_code": "ups.worldwide_expedited_DDP",
"total_price": "20578",
"currency": "USD",
"description": "Duties & Taxes Included",
"metadata": {
"zonos_quote_id": "quote_abc123",
"duties_amount": "9680",
"taxes_amount": "10380",
"fees_amount": "518"
}
}
]
}
But when we query the order’s shipping line after checkout, the metadata is nowhere to be found - not on the shipping line, not in metafields, not anywhere.
Questions
-
Why is the metadata field documented if it’s not persisted? What is its intended purpose?
-
Is there any way to retrieve this data after an order is placed? Even if it’s stored temporarily somewhere?
-
What is the recommended approach for passing carrier-calculated data through to orders?
-
Are there plans to support metadata persistence in the future?
Current Workaround
We’re forced to make additional API calls during order processing to recalculate or re-fetch shipping information that we already calculated during checkout. This creates:
-
Additional latency in order processing
-
Potential for rate discrepancies if shipping costs change between checkout and fulfillment
-
Unnecessary load on our systems
-
Risk of errors if the original quote expires
Request
It would be extremely valuable if Shopify could either:
-
Persist the
metadatafield to the shipping line (as metafields or a dedicated field) -
Provide clear documentation about what the metadata field actually does
-
Offer an alternative mechanism for carrier services to pass data through to orders
This would enable carrier service apps to provide a much better experience for merchants who need detailed shipping and customs information for international orders.