Metadata is a collection of “key-value” pairs that you can provide for certain operations, such as “Create Shipment”.

Each metadata entry has a key and a value property. Each key must be unique within a single metadata collection.

The following JSON would result in a duplicate_metadata_key error code, because the key “sample” appears twice:

  {
  "metadata": [
    {
      "key": "sample",
      "value": "db8e7404-93ed-43c2-a71f-224b95d6d989"
    },
    {
      "key": "sample",
      "value": "ae0fefdc-ed29-423c-a721-c859cd1e5d6c"
    }
  ]
}