Carrier service rate requests now include a locale parameter
API
Effective July 20, 2017
As of Thursday, July 20th, 2017, a new parameter will be added to Carrier Service rate requests sent by Shopify – a locale
parameter that represents the language of the customer browsing the storefront.
Here is example of a payload that will be sent:
{ "rate": {
"items": [
{
"price": "10.00",
"name": "Draft - 151cm",
"title": "Draft",
"requires_shipping": true,
"quantity": 1,
"product_id": 108828309,
"properties": [],
"id": 510711879,
"grams": 1500,
"sku": "draft-151",
"taxable": true,
"vendor": null,
"variant_title": "151cm",
"fulfillment_status": null,
"gift_card": false,
"fulfillment_service": "manual",
"fulfillable_quantity": 1,
"variant_id": 43729076,
"variant_inventory_management": "shipwire",
"product_exists": true,
"tax_lines": [
{
"price": "1.34",
"rate": 0.06,
"title": "GST"
}
],
"total_discount": "0.00"
}
],
"destination": {
"address1": "123 Amoebobacterieae St",
"name": "Bob Bobsen",
"city": "Ottawa",
"address2": "",
"address3": null,
"company_name": "",
"country": "CA",
"postal_code": "K2P0V6",
"phone": "(555)555-5555",
"fax": null,
"address_type": null,
"province": "ON"
},
"origin": {
"address1": "190 MacLaren Street",
"name": null,
"city": "Ottawa",
"address2": null,
"address3": null,
"company_name": "Cadetgear",
"country": "CA",
"postal_code": "K2P 0L6",
"phone": null,
"fax": null,
"address_type": null,
"province": "ON"
},
"currency": "USD",
"locale": "en"
}
}
Carrier services can use this information to serve rate titles in the customer's native language.