Skip to main content

Eligible Pipelines

List the pipelines whose Spec compares orders with a filed declaration reference table, newest first, to choose the pipeline_id the other customs routes take.

GET /v1/customs-declaration/pipelines returns the pipelines of the workspace that the customs comparison can run on, newest first. A pipeline qualifies through its Spec: the Spec has a validation stage whose ground-truth comparison is enabled and names a reference table. The id of a pipeline from this list is what pipeline_id names on the declarations and issues routes.

Each entry identifies the pipeline (id, name, status, created_at) and the stage that supplies the comparison: stage_id and stage_name of the validation stage, and reference_data_id and reference_name of the reference table holding the filed declarations. reference_name is null when the table is no longer found. The route takes no parameters and returns { "data": [...] }.

status is the pipeline's own status string. When the other routes are called without pipeline_id, they choose the newest pipeline in this list whose status is completed, and the newest one when none has completed, so reading this list first is how a client sees which pipeline an omitted pipeline_id will select.

GET/v1/customs-declaration/pipelines

Response fields (data[])

iduuidThe pipeline; use it as pipeline_id on the other routes.
namestringThe pipeline name.
statusstringThe pipeline's status, for example completed.
created_atstring (date-time)When the pipeline was created. The list is newest first.
stage_iduuidThe Spec's validation stage that compares with the reference table.
stage_namestringThe name of that stage.
reference_data_iduuidThe reference table holding the filed declarations.
reference_namestring | nullThe reference table's name.

cURL: List eligible pipelines

curl "https://api.talonic.com/v1/customs-declaration/pipelines" \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Response: Eligible pipelines

{
  "data": [
    {
      "id": "9c4e7a12-6d03-4b58-b1f7-3e8a0d5c2f46",
      "name": "October consignments",
      "status": "completed",
      "created_at": "2026-10-19T07:42:11.000Z",
      "stage_id": "4a1d8e60-2c97-4f35-a0b6-e7d3c9f15b82",
      "stage_name": "Compare with filed declarations",
      "reference_data_id": "d5b02c7e-18a4-4e69-93f1-6a0e4c8b7d25",
      "reference_name": "Filed declarations"
    }
  ]
}
An empty data list means no Spec in the workspace has a validation stage that compares with a reference table. Add one to the Spec the customs pipeline runs, and the pipeline appears here once it exists.

Frequently asked questions

Why is my customs pipeline missing from the list?+
Its Spec has no validation stage that compares with a reference table, or that stage has ground-truth comparison switched off. Only pipelines whose Spec has an enabled comparison stage are eligible.
Which pipeline is used when I omit pipeline_id?+
The newest eligible pipeline whose status is completed, and the newest eligible pipeline when none has completed. The order of this list is newest first, so it is the first completed entry, or the first entry.
Does the list include pipelines of other workspaces?+
No. The list is scoped to the workspace of the authenticated key.