Skip to main content
Get a purchase order import

Authorizations

Authorization
string
header
required

Personal API key sent as a bearer token, together with X-Organization-Id. The key must have at least the access level the endpoint requires (read, write or admin).

Headers

X-Organization-Id
string

The organization to act in. Required for personal API keys; list the organizations you can access with GET /v1/organizations.

Path Parameters

id
string<uuid>
required

Query Parameters

fields
string[]

Return only these fields; use dots for nested fields, such as missing.field. id is always returned. Fields: id, status, origin, outcome, purchase_order_id, intent, missing, not_order_reason, text, sources, workflow_run_id, workflow_run_item_id, failure, created_at, updated_at.

Response

The import.

id
string<uuid>
required
status
enum<string>
required

completed, failed and cancelled are final.

Available options:
queued,
running,
completed,
failed,
cancelled
origin
enum<string>
required

email: forwarded to the organization's order address by the member who owns it. supplier_reply: a supplier's reply to an order's reply address, read against that order; nobody owns it.

Available options:
upload,
api,
email,
supplier_reply
outcome
enum<string> | null
required

created: a new order, a draft unless submitted. duplicate: the order already exists (same file, or the same supplier and sales order reference); the sources were attached to it. not_order: the sources hold no order. Null until completed.

Available options:
created,
duplicate,
not_order,
null
purchase_order_id
string<uuid> | null
required

The order created, or the existing order for a duplicate. Null when not visible.

intent
enum<string> | null
required

new: terms agreed but not ordered yet. placed: already ordered or confirmed; with nothing missing, the new order is submitted unless the submit is refused, which leaves it a draft.

Available options:
new,
placed,
null
missing
object[]
required

What the created order still needs, as it stands now; empty for a duplicate or not_order.

not_order_reason
string | null
required
text
boolean
required

Whether pasted text was submitted.

sources
object[]
required
workflow_run_id
string<uuid>
required
workflow_run_item_id
string<uuid>
required
failure
object | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required