ShipmentRate metafields
We provide a metafields
array for ShipmentRate which includes additional information about a rate given to us by the carrier. For these fields we can't provide a standardized interface, but provide them through this array.
Querying the metafields
mutation createShipment($input: ShipmentCreateInput!) {
shipmentCreate(input: $input) {
shipment {
rates {
metafields {
key
value
valueType
}
}
}
}
}
Data reference
Metafield reference
Field
Type
Description
key
String
The key name for a metafield.
value
String
The value of the metafield.
valueType
MetaFieldValue
Represents the metafield value type.
MetafieldValue reference values
Value
Description
INTEGER
An integer.
JSON_STRING
A JSON string.
STRING
A string.
Carrier references
99minutos reference
Field
Type
Description
packageSize
String
Size of the package that will be used and billed, can be: xs, s, m, l, xl
{
"data": {
"shipmentCreate": {
"shipment": {
"id": "gid://kublau/Shipment/a48eb71c-e430-4a92-a538-9bb6ff121e5e",
"rates": [
{
"id": "gid://kublau/ShipmentRate/388703c5-3fd6-4ee1-9ea9-788b9b3aa356",
"amount": 48,
"carrier": "MINUTOS99",
"currency": "MXN",
"serviceLevel": "NextDay",
"deliveryDays": 1,
"deliveryEstimateAt": null,
"deliveryEstimateGuaranteed": false,
"metafields": [
{
"key": "packageSize",
"value": "s",
"valueType": "STRING"
}
]
},
{
"id": "gid://kublau/ShipmentRate/923e97b6-3ded-4632-bd07-cb23eeac7ba0",
"amount": 48,
"carrier": "MINUTOS99",
"currency": "MXN",
"serviceLevel": "CO2 Free",
"deliveryDays": 1,
"deliveryEstimateAt": null,
"deliveryEstimateGuaranteed": false,
"metafields": [
{
"key": "packageSize",
"value": "s",
"valueType": "STRING"
}
]
}
],
"suggestedRates": {
"fastest": {
"id": "gid://kublau/ShipmentRate/388703c5-3fd6-4ee1-9ea9-788b9b3aa356"
},
"cheapest": {
"id": "gid://kublau/ShipmentRate/388703c5-3fd6-4ee1-9ea9-788b9b3aa356"
}
}
},
"shipmentUserErrors": []
}
}
}
Last updated
Was this helpful?