Shipment metafields

We provide a metafields array for the Shipment which should be used for carriers which require additional information for shipment label creation.

Including metafields for the shipment

We have removed all other fields in the mutation for brevity purposes.

{
  "input": {
    "carriers": ["CLICOH"],
    "origin": {
      ...
    },
    "destination": {
      ...
    },
    "parcel":{
      ...
    },
    "metafields": [
      {
        "key": "CLICOH_ITEMS",
        "value": "[{ \"variant_id\": 84712, \"quantity\": 2 }]",
        "valueType": "JSON_STRING"
      }
    ]
  }
}

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

Clicoh reference

Field

Type

​Description

CLICOH_ITEMS

JSON_STRING

Array of JSON objects with variant_id & quantity fields that represent the CLICOH variants to use and their quantity for label purchase.

{
  "input": {
    "carriers": ["CLICOH"],
    "origin": {
      ...
    },
    "destination": {
      ...
    },
    "parcel":{
      ...
    },
    "metafields": [
      {
        "key": "CLICOH_ITEMS",
        "value": "[{ \"variant_id\": 84712, \"quantity\": 2 }]",
        "valueType": "JSON_STRING"
      }
    ]
  }
}

Last updated

Was this helpful?