curl --request POST \
--url https://app.useqx.com/api/v1/collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pack_id": "pck_12",
"contact_id": "com_12"
}
'{
"id": "col_40",
"protocol": "DOC-2026-00123",
"state": "assembling",
"discarded": false,
"contact": {
"id": "com_12",
"type": "company",
"name": "Importadora Exemplo Ltda"
},
"recipient": null,
"packs": [
{
"id": "pck_12",
"name": "Importação marítima"
}
],
"numbers": [],
"created_at": "2026-09-25T10:31:12.000-03:00",
"ready_at": null,
"documents": [
{
"id": "doc_310",
"document_type": {
"id": "dtp_31",
"name": "Fatura Comercial (Commercial Invoice)"
},
"status": "pending",
"has_content": false
},
{
"id": "doc_311",
"document_type": {
"id": "dtp_32",
"name": "Bill of Lading (B/L)"
},
"status": "pending",
"has_content": false
},
{
"id": "doc_312",
"document_type": {
"id": "dtp_33",
"name": "Romaneio de Carga (Packing List)"
},
"status": "pending",
"has_content": false
}
]
}Create a collection
Creates a collection with a pack. With a contact, the API creates the collection with the slots of the pack requirements. Without a contact, the API creates the collection for a recipient and sends the invitation to the email of the recipient. QX creates the slots after the recipient identifies themselves on the portal. The creation counts toward the paid write limit of the key.
curl --request POST \
--url https://app.useqx.com/api/v1/collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pack_id": "pck_12",
"contact_id": "com_12"
}
'{
"id": "col_40",
"protocol": "DOC-2026-00123",
"state": "assembling",
"discarded": false,
"contact": {
"id": "com_12",
"type": "company",
"name": "Importadora Exemplo Ltda"
},
"recipient": null,
"packs": [
{
"id": "pck_12",
"name": "Importação marítima"
}
],
"numbers": [],
"created_at": "2026-09-25T10:31:12.000-03:00",
"ready_at": null,
"documents": [
{
"id": "doc_310",
"document_type": {
"id": "dtp_31",
"name": "Fatura Comercial (Commercial Invoice)"
},
"status": "pending",
"has_content": false
},
{
"id": "doc_311",
"document_type": {
"id": "dtp_32",
"name": "Bill of Lading (B/L)"
},
"status": "pending",
"has_content": false
},
{
"id": "doc_312",
"document_type": {
"id": "dtp_33",
"name": "Romaneio de Carga (Packing List)"
},
"status": "pending",
"has_content": false
}
]
}Authorizations
Headers
Body
Response
The new collection, with the documents.
A collection, with the list of documents.
The protocol of the collection. When the pack has a protocol rule, QX composes the protocol from the fields of the documents of the collection. Without a rule or without values, the protocol is the generated protocol. The protocol changes when the documents of the collection change, in every state of the collection. The id is the stable key of the collection.
"ACME TRADING MXA188-UXA837"
"DOC-2026-00123"
The state of the collection. assembling: the collection is in assembly and waits for the documents. reviewing: the operator reviews the documents. ready_to_dispatch: every required document arrived, and no validation blocks the collection. awaiting_partner: the operator sent the collection to the partner. cancelled: the operator canceled the collection.
assembling, reviewing, ready_to_dispatch, awaiting_partner, cancelled The operation numbers, as the collection screen shows them. The list includes the numbers printed on the documents of the identifier requirements of the pack. Without these numbers, the list includes the numbers printed on the other documents of the collection. On a collection without an operation pack, the list is empty.
["INV-81244/2026"]