---
updatedAt: 2026-09-23T01:39:16.000Z
agentTools:
  projectIndex: https://docs.vizionapi.com/llms.txt
---

# Get a performance metric for a location

Returns one performance metric for one location over a date range, scoped to your organization.

Supported namespaces are `unlocode`, `country`, `continent`, `region`, and `smdg`. Supported metrics are `import_dwell`, `export_dwell`, `berth_time`, `arrival_to_berth`, `import_teu`, `export_teu`, and `average_delay`; `unit` in the response is `teu` for the two TEU metrics and `days` for the rest.

Each row pairs your figure with the industry's — the same metric across every Vizion-tracked shipment — so a location you have no shipments through still returns data, with `value: null`, `shipment_count: 0` and the `industry_*` fields populated. An empty `data[]` means neither you nor the industry had a measurement for this location and metric in the requested window — it is **not** an error. Coverage reflects locations with observed activity in the requested window and is not a fixed list.

Terminal locations (the `smdg` namespace) are not supported and return a `422` with `code: "unsupported_location_type"`. Depot and rail locations are not addressable through this endpoint at all.

A `403` is returned when Performance is not enabled for your organization. A `404` is returned for an unknown namespace (`code: "unknown_namespace"`) or an unknown location code (`code: "unknown_location"`). A `422` is returned for an unknown metric (`code: "unknown_metric"`), an unsupported location type (`code: "unsupported_location_type"`), an unknown `grain` (`code: "unknown_grain"`), an unknown `compare` (`code: "unknown_comparison"`), the `prior_year` + `grain` pairing (`code: "unsupported_comparison_combination"`), or a query parameter that fails validation. Switch on `code` rather than on the message text — the two `404` cases are distinguishable only by it.

`start` and `end` are both required and there is no cap on how far apart they may be. Without `grain`, a very wide window does not return more rows — it returns the same single row over a longer period — but it does take longer to compute, and may time out.

Rows in `data[]` are ordered by `period_start` ascending, then by `value` descending, and paginated with `page` and `limit` — 25 per page by default. Pass `include_metadata=true` for the `metadata` envelope carrying `item_count`, the total across all pages.

`is_partial` on a row means the period had not fully elapsed when the figure was computed, so it rests on fewer days than the period length. With `grain` it can only be the **last** row of a series: the leading bucket is not returned at all, so a series always begins with a whole period. Without `grain` it is always `false`.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Endpoints",
    "description": "Real-Time Container Tracking API",
    "version": "1.12.20",
    "contact": {
      "name": "API Support",
      "email": "support@vizionapi.com"
    }
  },
  "servers": [
    {
      "url": "https://demo.vizionapi.com",
      "description": "Vizion API Demo API"
    },
    {
      "url": "https://prod.vizionapi.com",
      "description": "Vizion API Production API"
    }
  ],
  "components": {
    "securitySchemes": {
      "apikeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Account API Key"
      }
    }
  },
  "security": [
    {
      "apikeyAuth": []
    }
  ],
  "paths": {
    "/references/{referenceId}/trace": {
      "get": {
        "tags": [
          "References"
        ],
        "summary": "List container trace",
        "description": "> ⚠️ Pro Tier Only\nFor access, please [contact support](https://share.hsforms.com/1B6wNyBBSR6uMotj--8Z_0Q56czk).\n\nReturns an array of vessel movements for a given reference id.\n\nVessel movements are identified using the latest update.",
        "operationId": "reference_trace_list",
        "parameters": [
          {
            "$ref": "#/paths/~1references~1{referenceId}/get/parameters/0"
          },
          {
            "in": "query",
            "name": "include_projected",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "example": true
            },
            "description": "Include projected (forecast) vessel trace points alongside actual ones. Requires the projected trace capability: without it the response is unchanged — actual points only, with no `kind` field. Contact support@vizionapi.com to have it enabled."
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "example": 2
            },
            "description": "Requested paginated page (1-indexed). Pagination is opt-in and driven by `limit`, so `page` has no effect unless `limit` is also provided. See [pagination](ref:pagination)."
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20000,
              "example": 50
            },
            "description": "Requested limit per paginated page. Providing `limit` enables pagination; omit it to receive the full trace in one response."
          },
          {
            "in": "query",
            "name": "include_metadata",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "example": true
            },
            "description": "Include pagination metadata in response. Applies only when `limit` is also provided. See [pagination](ref:pagination)."
          }
        ],
        "responses": {
          "200": {
            "description": "Container trace for a reference",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Container trace",
                  "description": "Envelope for a reference's vessel trace. The `metadata` pagination block is present only when the request opts into pagination with `limit` (and `include_metadata=true`); by default the full `trace` array is returned with no `metadata`.",
                  "allOf": [
                    {
                      "title": "Pagination metadata",
                      "type": "object",
                      "properties": {
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "page": {
                              "type": "number",
                              "description": "Page requested",
                              "example": 1
                            },
                            "page_count": {
                              "type": "number",
                              "description": "Total pages",
                              "example": 100
                            },
                            "per_page": {
                              "type": "number",
                              "description": "Elements requested per page",
                              "example": 25
                            },
                            "item_count": {
                              "type": "number",
                              "description": "Total elements available",
                              "example": 25
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "reference_id": {
                          "description": "Unique identifier of the reference.",
                          "type": "string",
                          "format": "uuid",
                          "example": "6f907cf6-3dd5-489f-8bed-f65370ec6778"
                        },
                        "trace": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "vessel_imo": {
                                "$ref": "#/paths/~1references~1last-known-positions/get/responses/200/content/application~1json/schema/oneOf/1/items/properties/mode_details/properties/vessel_imo",
                                "nullable": false
                              },
                              "timestamp": {
                                "$ref": "#/paths/~1tags/post/responses/201/content/application~1json/schema/properties/tag/properties/created_at",
                                "description": "ISO8601 DateTime of the reported positional data"
                              },
                              "latitude": {
                                "type": "number",
                                "format": "float",
                                "description": "North-south position.",
                                "example": 23.828665
                              },
                              "longitude": {
                                "type": "number",
                                "format": "float",
                                "description": "West-east position.",
                                "example": 122.0337208421651
                              },
                              "vessel_mmsi": {
                                "$ref": "#/paths/~1references/post/callbacks/statusUpdate/{$request.body#~1callback_url}/post/requestBody/content/application~1json/schema/properties/payload/properties/milestones/items/properties/vessel_mmsi",
                                "nullable": true
                              },
                              "vessel_name": {
                                "$ref": "#/paths/~1references~1last-known-positions/get/responses/200/content/application~1json/schema/oneOf/1/items/properties/mode_details/properties/vessel",
                                "nullable": true
                              },
                              "vessel_heading": {
                                "nullable": true,
                                "type": "number",
                                "description": "Direction of the vessel in degrees where 0 (or 360) indicates true north, 90 true east, 180 true south, and 270 true west.",
                                "example": 8
                              },
                              "vessel_speed": {
                                "nullable": true,
                                "type": "number",
                                "description": "Speed of the vessel in knots",
                                "example": 16
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "actual",
                                  "projected"
                                ],
                                "description": "Present only when projected points are enabled (opt-in + feature-flagged). `actual` = observed AIS position; `projected` = forecast path point."
                              }
                            },
                            "required": [
                              "vessel_imo",
                              "timestamp",
                              "latitude",
                              "longitude",
                              "vessel_mmsi",
                              "vessel_name",
                              "vessel_heading",
                              "vessel_speed"
                            ],
                            "example": {
                              "vessel_imo": 9864502,
                              "timestamp": "2023-01-05T16:33:34.000Z",
                              "latitude": 23.828665,
                              "longitude": 119.92941333333333,
                              "vessel_mmsi": 636019892,
                              "vessel_name": "YM CELEBRITY",
                              "vessel_heading": 8,
                              "vessel_speed": 16
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "204": {
            "description": "No update found for the given reference",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "No Update found for the given Reference"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/paths/~1tags/get/responses/4XX"
          }
        }
      }
    },
    "/tags": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "List tags",
        "description": "List all tags.",
        "operationId": "tag_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2000,
              "default": 25,
              "example": 25
            },
            "description": "Requested limit per paginated page"
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "example": 1
            },
            "description": "Requested paginated page"
          }
        ],
        "responses": {
          "200": {
            "description": "List of tags",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/paths/~1tags/post/responses/201/content/application~1json/schema/properties/tag"
                      }
                    },
                    {
                      "title": "Paginated tags response",
                      "allOf": [
                        {
                          "$ref": "#/paths/~1references~1{referenceId}~1trace/get/responses/200/content/application~1json/schema/allOf/0"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "array",
                              "items": {
                                "$ref": "#/paths/~1tags/post/responses/201/content/application~1json/schema/properties/tag"
                              }
                            }
                          }
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "4XX": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Array of validation errors",
                      "type": "object",
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "title": "Array of validation errors",
                            "type": "array",
                            "items": {
                              "title": "Validation error",
                              "type": "object",
                              "properties": {
                                "property": {
                                  "type": "string",
                                  "description": "The parameter which failed validation",
                                  "example": "limit"
                                },
                                "value": {
                                  "description": "The value which failed validation",
                                  "example": "-1",
                                  "nullable": true,
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "array",
                                      "items": {}
                                    },
                                    {
                                      "type": "object"
                                    }
                                  ]
                                },
                                "name": {
                                  "type": "string",
                                  "description": "The name of the failing validation",
                                  "example": "is_positive"
                                },
                                "message": {
                                  "type": "string",
                                  "description": "A human readable description",
                                  "example": "limit must be a positive number"
                                },
                                "detail": {
                                  "type": "string",
                                  "description": "Used to provide additional information to the developer",
                                  "example": "For pagination documentation, see https://docs.vizionapi.com/reference/pagination"
                                }
                              },
                              "required": [
                                "property",
                                "name",
                                "message",
                                "value"
                              ]
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Generic error response",
                      "type": "object",
                      "properties": {
                        "error": {
                          "example": "Limit Exceeded",
                          "type": "string",
                          "description": "A human readable description"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/performance/location/{namespace}/{code}/metric/{metric}": {
      "get": {
        "tags": [
          "Performance"
        ],
        "summary": "Get a performance metric for a location",
        "description": "Returns one performance metric for one location over a date range, scoped to your organization.\n\nSupported namespaces are `unlocode`, `country`, `continent`, `region`, and `smdg`. Supported metrics are `import_dwell`, `export_dwell`, `berth_time`, `arrival_to_berth`, `import_teu`, `export_teu`, and `average_delay`; `unit` in the response is `teu` for the two TEU metrics and `days` for the rest.\n\nEach row pairs your figure with the industry's — the same metric across every Vizion-tracked shipment — so a location you have no shipments through still returns data, with `value: null`, `shipment_count: 0` and the `industry_*` fields populated. An empty `data[]` means neither you nor the industry had a measurement for this location and metric in the requested window — it is **not** an error. Coverage reflects locations with observed activity in the requested window and is not a fixed list.\n\nTerminal locations (the `smdg` namespace) are not supported and return a `422` with `code: \"unsupported_location_type\"`. Depot and rail locations are not addressable through this endpoint at all.\n\nA `403` is returned when Performance is not enabled for your organization. A `404` is returned for an unknown namespace (`code: \"unknown_namespace\"`) or an unknown location code (`code: \"unknown_location\"`). A `422` is returned for an unknown metric (`code: \"unknown_metric\"`), an unsupported location type (`code: \"unsupported_location_type\"`), an unknown `grain` (`code: \"unknown_grain\"`), an unknown `compare` (`code: \"unknown_comparison\"`), the `prior_year` + `grain` pairing (`code: \"unsupported_comparison_combination\"`), or a query parameter that fails validation. Switch on `code` rather than on the message text — the two `404` cases are distinguishable only by it.\n\n`start` and `end` are both required and there is no cap on how far apart they may be. Without `grain`, a very wide window does not return more rows — it returns the same single row over a longer period — but it does take longer to compute, and may time out.\n\nRows in `data[]` are ordered by `period_start` ascending, then by `value` descending, and paginated with `page` and `limit` — 25 per page by default. Pass `include_metadata=true` for the `metadata` envelope carrying `item_count`, the total across all pages.\n\n`is_partial` on a row means the period had not fully elapsed when the figure was computed, so it rests on fewer days than the period length. With `grain` it can only be the **last** row of a series: the leading bucket is not returned at all, so a series always begins with a whole period. Without `grain` it is always `false`.",
        "operationId": "performance_location_metric_get",
        "parameters": [
          {
            "name": "namespace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "unlocode",
                "country",
                "continent",
                "region",
                "smdg"
              ]
            },
            "example": "unlocode"
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "USLAX"
          },
          {
            "name": "metric",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "import_dwell",
                "export_dwell",
                "berth_time",
                "arrival_to_berth",
                "import_teu",
                "export_teu",
                "average_delay"
              ]
            },
            "example": "import_dwell"
          },
          {
            "name": "start",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start of the date range (inclusive).",
            "example": "2026-04-01"
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End of the date range (inclusive).",
            "example": "2026-06-30"
          },
          {
            "name": "grain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "week",
                "month"
              ]
            },
            "description": "Bucket the result into a period series instead of a single figure. Omit for one row spanning the whole range.\n\nBuckets are aligned to calendar weeks and months, so `start` will usually fall partway through one. **The series begins at the first whole period instead** — `start=2026-04-01` with `grain=week` gives a first row of `2026-04-06`, not the `2026-03-30` week that date falls inside. Up to six days at the front (or a month at `grain=month`) are not represented by a row. If your whole window fits inside one such bucket, nothing is left — a three-day window at `grain=week` returns an empty `data[]`. Drop `grain` to get a single figure over exactly the range you asked for.\n\nThe end behaves differently: the final row is returned even when its calendar period runs past `end`, flagged `is_partial: true`. Its label therefore covers more than its `value` does, so clamp that one label to your own `end` if you are plotting a time axis.\n\nThe series is the same length regardless of which other optional parameters you pass.",
            "example": "week"
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "prior_period",
                "prior_year"
              ]
            },
            "description": "Add a `comparison_value` to each row. `prior_period` compares each row to the row before it. `prior_year` compares the whole range to the same range a year earlier.\n\nAdding `compare` does not change which rows come back — a series has the same length and start with or without it, so the two line up row-for-row.\n\n`prior_year` cannot be combined with `grain` — that pairing returns a `422` with `code: \"unsupported_comparison_combination\"`. Use `prior_year` on its own for a single year-over-year figure, or `prior_period` with `grain` for a period-over-period series.",
            "example": "prior_period"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Which page of `data[]` to return. A page past the end returns an empty `data[]` rather than an error.",
            "example": 1
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 25
            },
            "description": "Rows per page. Defaults to 25 and is capped at 500.\n\nNote this applies to `data[]` only. Without `grain` there is a single row, so paging is only meaningful once you bucket the result.",
            "example": 25
          },
          {
            "name": "include_metadata",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Include the pagination envelope in the response. When `false` (the default) `metadata` is omitted entirely. See [pagination](ref:pagination).",
            "example": true
          }
        ],
        "responses": {
          "200": {
            "description": "A performance metric for one location",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Location Metric",
                  "description": "One performance metric for one location over a date range.",
                  "type": "object",
                  "properties": {
                    "location": {
                      "type": "object",
                      "description": "The resolved location the metric was computed for.",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "The code exactly as supplied in the request path.",
                          "example": "USLAX"
                        },
                        "namespace": {
                          "type": "string",
                          "description": "The namespace alias supplied in the request path.",
                          "enum": [
                            "unlocode",
                            "country",
                            "continent",
                            "region",
                            "smdg"
                          ],
                          "example": "unlocode"
                        },
                        "key": {
                          "type": "string",
                          "description": "The fully-qualified location key, echoed for correlation.",
                          "example": "LOC:UNECE:UNLOCODE:USLAX"
                        },
                        "name": {
                          "type": "string",
                          "nullable": true,
                          "description": "Display name of the location, if available upstream. Not every location has one.",
                          "example": "Los Angeles"
                        },
                        "type": {
                          "type": "string",
                          "description": "The resolved location type, lower-cased. A closed set: the service 422s any other type before it queries, so these four are the only values this field can carry.",
                          "enum": [
                            "port",
                            "country",
                            "continent",
                            "unctad_region"
                          ],
                          "example": "port"
                        }
                      },
                      "required": [
                        "code",
                        "namespace",
                        "key",
                        "name",
                        "type"
                      ]
                    },
                    "metric": {
                      "type": "string",
                      "description": "The requested metric id.",
                      "enum": [
                        "import_dwell",
                        "export_dwell",
                        "berth_time",
                        "arrival_to_berth",
                        "import_teu",
                        "export_teu",
                        "average_delay"
                      ],
                      "example": "import_dwell"
                    },
                    "unit": {
                      "type": "string",
                      "description": "The unit of `data[].value`, `data[].industry_value` and the industry percentiles. `teu` for `import_teu` and `export_teu`; `days` for every other metric.",
                      "enum": [
                        "days",
                        "teu"
                      ],
                      "example": "days"
                    },
                    "period": {
                      "type": "object",
                      "description": "The requested date range, echoed back.",
                      "properties": {
                        "start": {
                          "type": "string",
                          "format": "date",
                          "example": "2026-04-01"
                        },
                        "end": {
                          "type": "string",
                          "format": "date",
                          "example": "2026-06-30"
                        }
                      },
                      "required": [
                        "start",
                        "end"
                      ]
                    },
                    "metadata": {
                      "description": "Pagination envelope, present only when `include_metadata=true` was requested. `item_count` is the total number of rows across all pages, not the length of `data[]` on this one.",
                      "allOf": [
                        {
                          "$ref": "#/paths/~1references~1{referenceId}~1trace/get/responses/200/content/application~1json/schema/allOf/0/properties/metadata"
                        }
                      ]
                    },
                    "data": {
                      "type": "array",
                      "description": "Measurements for the requested window. Without `grain` this holds at most one row spanning the whole of `period`. With `grain=week` or `month` it holds one row per whole calendar bucket — a leading bucket that starts before your `start` is not returned, so the series begins at the first period fully inside your window.\n\nEvery row carries two figures side by side: yours (`value`, `shipment_count`) and the industry's (`industry_value` and the `industry_*` fields), measured over every Vizion-tracked shipment. A row is returned when **either** has a measurement, so a location you have no shipments through still returns the industry figure, with `value: null` and `shipment_count: 0`. Where fewer than three organizations contributed, the industry figures are withheld and the row carries `industry_withheld: true`. An empty array means neither you nor the industry had a measurement there in the requested window — it is not an error.\n\nWith a `grain`, an empty array has a second meaning: your window fell entirely inside one calendar bucket that begins before your `start`, so the only row there was got trimmed. A Tuesday-to-Thursday window at `grain=week` comes back empty for that reason even where there is data. Widen the window, or drop `grain` to get one figure spanning exactly the range you asked for.\n\nRows are ordered by `period_start` ascending, then by `value` descending. The second key never comes into play today, because there is exactly one row per period; it is stated now so the ordering does not change meaning when a row can be one of several within the same period.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "period_start": {
                            "type": "string",
                            "format": "date",
                            "nullable": true,
                            "description": "Start of the period this row covers."
                          },
                          "period_end": {
                            "type": "string",
                            "format": "date",
                            "nullable": true,
                            "description": "End of the period this row covers."
                          },
                          "value": {
                            "type": "number",
                            "nullable": true,
                            "description": "The metric value for this period, in `unit`, for your organization.\n\n`null` when you had no shipments in this period but the industry did — the row is returned for `industry_value`. Never `0` for that case: a missing measurement is not a zero one."
                          },
                          "is_partial": {
                            "type": "boolean",
                            "description": "True when the row's value rests on fewer days than its calendar period contains — because the period runs past your `end`, or past today, or both.\n\nIn practice this is the **last** row of a series, whenever its calendar period runs past your `end` — including the current, in-progress period. A partial row never appears at the *start* of a series: a leading bucket that begins before your `start` is not returned at all.\n\nWithout `grain` this field is always `false`, including for a window whose `end` is in the future, because the single row's period is the window itself. Do not read `false` as \"this period has finished\"; to know that, compare `end` against today yourself."
                          },
                          "comparison_value": {
                            "type": "number",
                            "nullable": true,
                            "description": "Present only when `compare` was requested. `null` on the first row of a series, which has no preceding period to compare against — that is structural, not missing data, and is never reported as `0`.\n\nOn a row where `is_partial` is `true`, the comparator is the **full** prior period, so the two are not directly comparable — a part-week value sitting beside a whole-week one will look like a drop that did not happen. Compare like for like before charting the difference.\n\nAlways your own prior period. There is no industry comparator; on a row where `value` is `null` this is `null` too."
                          },
                          "shipment_count": {
                            "type": "integer",
                            "nullable": true,
                            "description": "Your shipments behind `value` in this period. `0` when you had none and the row is returned for the industry figure.",
                            "example": 340
                          },
                          "industry_value": {
                            "type": "number",
                            "nullable": true,
                            "description": "The same metric for this period, in `unit`, across every Vizion-tracked shipment — the industry figure to read `value` against. Computed the same way as `value`, so the two are directly comparable. For the TEU metrics this is the industry's total volume, not an average.",
                            "example": 8.4517
                          },
                          "industry_p10_value": {
                            "type": "number",
                            "nullable": true,
                            "description": "10th percentile of the industry distribution for this period, in `unit`. `null` for metrics without a per-shipment distribution: `berth_time`, `arrival_to_berth`, `import_teu` and `export_teu`.",
                            "example": 2.125
                          },
                          "industry_p50_value": {
                            "type": "number",
                            "nullable": true,
                            "description": "Industry median for this period, in `unit`. `null` for the same metrics as `industry_p10_value`.",
                            "example": 5.9167
                          },
                          "industry_p90_value": {
                            "type": "number",
                            "nullable": true,
                            "description": "90th percentile of the industry distribution for this period, in `unit`. `null` for the same metrics as `industry_p10_value`.",
                            "example": 17
                          },
                          "industry_shipment_count": {
                            "type": "integer",
                            "nullable": true,
                            "description": "Shipments behind `industry_value` in this period.",
                            "example": 15216
                          },
                          "industry_withheld": {
                            "type": "boolean",
                            "description": "`true` when the industry figures for this period are withheld because fewer than three organizations contributed to them — with fewer, the industry figure would be one or two other customers' own numbers. Every `industry_*` field is then `null`. The row is still returned, so a withheld period is distinguishable from one with no industry shipments at all. Your own `value` and `shipment_count` are never withheld.",
                            "example": false
                          }
                        },
                        "required": [
                          "period_start",
                          "period_end",
                          "value",
                          "is_partial",
                          "shipment_count",
                          "industry_value",
                          "industry_p10_value",
                          "industry_p50_value",
                          "industry_p90_value",
                          "industry_shipment_count",
                          "industry_withheld"
                        ]
                      }
                    }
                  },
                  "required": [
                    "location",
                    "metric",
                    "unit",
                    "period",
                    "data"
                  ]
                },
                "examples": {
                  "WithData": {
                    "summary": "Location with a measurement in the window, requested without `grain`. `data[]` holds a single row spanning the whole requested period; add `grain` for per-period buckets.",
                    "value": {
                      "location": {
                        "code": "USLAX",
                        "namespace": "unlocode",
                        "key": "LOC:UNECE:UNLOCODE:USLAX",
                        "name": "Los Angeles",
                        "type": "port"
                      },
                      "metric": "import_dwell",
                      "unit": "days",
                      "period": {
                        "start": "2026-04-01",
                        "end": "2026-06-30"
                      },
                      "data": [
                        {
                          "period_start": "2026-04-01",
                          "period_end": "2026-06-30",
                          "value": 4.4203,
                          "is_partial": false,
                          "shipment_count": 812,
                          "industry_value": 4.3907,
                          "industry_p10_value": 1,
                          "industry_p50_value": 3.5417,
                          "industry_p90_value": 8.0417,
                          "industry_shipment_count": 52947,
                          "industry_withheld": false
                        }
                      ]
                    }
                  },
                  "WeeklySeriesWithComparison": {
                    "summary": "grain=week with compare=prior_period, for start=2026-04-01 and end=2026-04-19. The series starts at 2026-04-06, the first whole week inside the window — the 2026-03-30 week that start date falls inside is not returned. The same request without `compare` returns these same two rows. The first row's comparison_value is null: it has no preceding row to compare against.",
                    "value": {
                      "location": {
                        "code": "USLAX",
                        "namespace": "unlocode",
                        "key": "LOC:UNECE:UNLOCODE:USLAX",
                        "name": "Los Angeles",
                        "type": "port"
                      },
                      "metric": "import_dwell",
                      "unit": "days",
                      "period": {
                        "start": "2026-04-01",
                        "end": "2026-04-19"
                      },
                      "data": [
                        {
                          "period_start": "2026-04-06",
                          "period_end": "2026-04-12",
                          "value": 5.2428,
                          "is_partial": false,
                          "comparison_value": null,
                          "shipment_count": 41,
                          "industry_value": 3.7233,
                          "industry_p10_value": 1,
                          "industry_p50_value": 2.9583,
                          "industry_p90_value": 6.5417,
                          "industry_shipment_count": 3819,
                          "industry_withheld": false
                        },
                        {
                          "period_start": "2026-04-13",
                          "period_end": "2026-04-19",
                          "value": 4.069,
                          "is_partial": false,
                          "comparison_value": 5.2428,
                          "shipment_count": 37,
                          "industry_value": 4.0138,
                          "industry_p10_value": 0.625,
                          "industry_p50_value": 3.125,
                          "industry_p90_value": 7.1833,
                          "industry_shipment_count": 4762,
                          "industry_withheld": false
                        }
                      ]
                    }
                  },
                  "PagedWithMetadata": {
                    "summary": "grain=week over a longer window with limit=2, page=2 and include_metadata=true. `item_count` is the total across all pages — note it is larger than the two rows in `data`.",
                    "value": {
                      "location": {
                        "code": "USLAX",
                        "namespace": "unlocode",
                        "key": "LOC:UNECE:UNLOCODE:USLAX",
                        "name": "Los Angeles",
                        "type": "port"
                      },
                      "metric": "import_dwell",
                      "unit": "days",
                      "period": {
                        "start": "2026-04-01",
                        "end": "2026-05-15"
                      },
                      "metadata": {
                        "page": 2,
                        "page_count": 3,
                        "per_page": 2,
                        "item_count": 6
                      },
                      "data": [
                        {
                          "period_start": "2026-04-20",
                          "period_end": "2026-04-26",
                          "value": 4.2694,
                          "is_partial": false,
                          "shipment_count": 44,
                          "industry_value": 4.1313,
                          "industry_p10_value": 0.7917,
                          "industry_p50_value": 3,
                          "industry_p90_value": 8.5833,
                          "industry_shipment_count": 4475,
                          "industry_withheld": false
                        },
                        {
                          "period_start": "2026-04-27",
                          "period_end": "2026-05-03",
                          "value": 4.0102,
                          "is_partial": false,
                          "shipment_count": 39,
                          "industry_value": 4.2003,
                          "industry_p10_value": 1,
                          "industry_p50_value": 3.375,
                          "industry_p90_value": 8.125,
                          "industry_shipment_count": 4950,
                          "industry_withheld": false
                        }
                      ]
                    }
                  },
                  "NoShipmentsOfYourOwn": {
                    "summary": "A location you have no shipments through in the window. The row is still returned, carrying the industry figure: `value` is null and `shipment_count` is 0.",
                    "value": {
                      "location": {
                        "code": "MXZLO",
                        "namespace": "unlocode",
                        "key": "LOC:UNECE:UNLOCODE:MXZLO",
                        "name": "Manzanillo",
                        "type": "port"
                      },
                      "metric": "import_dwell",
                      "unit": "days",
                      "period": {
                        "start": "2026-01-01",
                        "end": "2026-10-15"
                      },
                      "data": [
                        {
                          "period_start": "2026-01-01",
                          "period_end": "2026-10-15",
                          "value": null,
                          "is_partial": false,
                          "shipment_count": 0,
                          "industry_value": 8.4517,
                          "industry_p10_value": 2.125,
                          "industry_p50_value": 5.9167,
                          "industry_p90_value": 17,
                          "industry_shipment_count": 15216,
                          "industry_withheld": false
                        }
                      ]
                    }
                  },
                  "NoDataInWindow": {
                    "summary": "Valid, supported location where neither you nor the industry has a measurement in the requested window — not an error.",
                    "value": {
                      "location": {
                        "code": "USLAX",
                        "namespace": "unlocode",
                        "key": "LOC:UNECE:UNLOCODE:USLAX",
                        "name": "Los Angeles",
                        "type": "port"
                      },
                      "metric": "import_dwell",
                      "unit": "days",
                      "period": {
                        "start": "2015-01-01",
                        "end": "2015-01-31"
                      },
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "title": "Array of validation errors",
                      "type": "object",
                      "properties": {
                        "errors": {
                          "type": "array",
                          "items": {
                            "$ref": "#/paths/~1tags/get/responses/4XX/content/application~1json/schema/oneOf/0/properties/errors/items"
                          }
                        }
                      }
                    },
                    {
                      "title": "Generic error response",
                      "type": "object",
                      "properties": {
                        "error": {
                          "example": "Limit Exceeded",
                          "$ref": "#/paths/~1tags/get/responses/4XX/content/application~1json/schema/oneOf/1/properties/error"
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "unknown_namespace",
                            "unknown_metric",
                            "unknown_location",
                            "unsupported_location_type",
                            "unknown_grain",
                            "unknown_comparison",
                            "unsupported_comparison_combination"
                          ],
                          "description": "Machine-readable error code, so a caller can switch on it instead of parsing `error`. `unknown_namespace` (404) — the namespace path segment is not one of the supported set. `unknown_location` (404) — the namespace is valid but the code is not in the location catalogue. Both are 404s, so `code` is the only way to tell them apart. `unknown_metric` (422) — the metric path segment is not one of the supported set. `unsupported_location_type` (422) — the location resolved, but it is a terminal or depot, for which no metric is measured. `unknown_grain` / `unknown_comparison` (422) — the `grain` or `compare` parameter is not one of the supported set. `unsupported_comparison_combination` (422) — `compare=prior_year` was combined with `grain`, which upstream cannot answer; request `prior_year` without a grain, or `prior_period` with one.",
                          "example": "unsupported_location_type"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}
```