Metadata

Certain resource objects (like Shipments and Containers) have a metadata attribute in their response payloads. Metadata attributes are known as Tags on the user-facing side of the application. Metadata is useful for storing information on a resource that is not already captured in a Flexport-defined field.

There are two types of metadata formats supported.

The default metadata format is a key-value hash format where the keys are strings, and the values are an array of strings.

metadata: {color: ["red", "blue"]}

An alternate supported format is an array of key defined hashes where the keys are "name" and "value".

metadata: [{name: "color", value: ["red", "blue"]}

The response payload for metadata will always display the default metadata hash format. To display the metadata array format, a URL parameter will need to provided called use_name_value_metadata_format=true. By default, this is false.