Skip to main content

List and Search Orders

List your own orders, newest first, and optionally narrow them down by business name or by the partner-defined correlation values you sent at order creation (custom_field_1, custom_field_2, custom_field_3 — see Create order). Useful for reconciling Swyft orders against your own internal records, or for checking whether an order already exists before retrying a create call.

GET {baseUrl}/orders/search
Authorization: Bearer {token}

Query parameters: all optional.

FieldTypeDescription
custom_field_1stringExact match against the custom_field_1 value stored on the order.
custom_field_2stringExact match against the custom_field_2 value stored on the order.
custom_field_3stringExact match against the custom_field_3 value stored on the order.
business_namestring, min 2 charactersOrders whose business name (business_data.name) starts with this value, ignoring case. %, _ and \ are treated as literal characters, not wildcards.
pageinteger, min 1Page to return. Defaults to 1.
per_pageinteger, 1–200Orders per page. Defaults to 100.

Only your own orders are returned (scoped to your partner account). With no filters, every order on your account is listed. If you send more than one filter, an order must match all of them (AND, not OR). For example, combine your own customer ID stored in custom_field_2 with a business name:

GET {baseUrl}/orders/search?custom_field_2=cust-98765&business_name=Acme
Authorization: Bearer {token}

business_name=Acm matches "Acme Holdings LLC" and "acme co", but not "The Acme Company".

Response — 200 OK

data is the list of orders on the requested page, sorted newest first. Each order is shaped exactly like Get order information. pagination sits next to data and describes the full result set.

{
"success": true,
"data": [
{
"id": 1,
"uuid": "99ff4d16-4e61-499d-8e97-769de1bcca6b",
"service": "incorporation-package",
"status": "In Progress",
"business_data": {
"name": "Acme Holdings LLC",
"type": "LLC",
"formation_state": "DE"
},
"custom_field_1": "PO-12345",
"custom_field_2": "cust-98765",
"custom_field_3": null
}
],
"pagination": {
"current_page": 1,
"per_page": 100,
"total": 1,
"last_page": 1
}
}
pagination fieldDescription
current_pageThe page returned.
per_pageOrders per page.
totalTotal orders matching your filters across all pages.
last_pageThe last available page.

To fetch every matching order, keep requesting the next page until current_page equals last_page.

An empty data array is returned when nothing matches. This is not an error:

{
"success": true,
"data": [],
"pagination": {
"current_page": 1,
"per_page": 100,
"total": 0,
"last_page": 1
}
}

Response — 422 Unprocessable Entity

Returned when business_name is shorter than 2 characters, page is less than 1, or per_page is outside 1–200.

Idempotent order creation​

You can optionally designate one of custom_field_1/2/3 as your idempotency key. Once configured for your account (contact your Swyft representative to enable this), submitting Create order again with the same value in that slot, for the same service and business_data.formation_state, is rejected with 422 instead of creating a duplicate order — see the "Duplicate order" example on that page. This makes it safe to retry a create call after a timeout without checking first.

Idempotency is off by default — until a slot is designated for your account, repeated custom_field_1/2/3 values do not block order creation, they are simply stored and searchable as described above.