Ir al contenido

Submit a document for asynchronous issuance

POST
/companies/{companyId}/documents
curl --request POST \
--url https://acme.gravitastec.com/api/v1/companies/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: example' \
--data '{ "ecfType": 31, "issueDate": "2026-04-15", "lines": [ {} ] }'
companyId
required
string format: uuid
Idempotency-Key
required
string
<= 64 characters

Canonical document model (R4 contracts/document-model.md). The full schema is generated from that model; unknown properties are rejected with 422 by the server.

object
ecfType
required
integer
Allowed values: 31 32 33 34 41 43 44 45 46 47
issueDate
required
string format: date
lines
required
Array<object>
>= 1 items
object
key
additional properties
any

Repeated idempotency key with the same payload; original result

Media typeapplication/json
object
documentId
required
string format: uuid
status
required
string
statusUrl
required
string

Example generated

{
"documentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"status": "example",
"statusUrl": "example"
}

Accepted for processing

Media typeapplication/json
object
documentId
required
string format: uuid
status
required
string
statusUrl
required
string

Example generated

{
"documentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"status": "example",
"statusUrl": "example"
}
Location
string

Production_not_enabled, quota denied (trial limit)

Not found or outside the credential scope

Media typeapplication/problem+json
object
type
string
title
string
status
integer
code
string
errors
Array<object>
object
path
string
message
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"code": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}

Idempotency_conflict (same key

Payload too large

All validation errors with field paths; the document is not numbered

Media typeapplication/problem+json
object
type
string
title
string
status
integer
code
string
errors
Array<object>
object
path
string
message
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"code": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}

Rate limit exceeded

Retry-After
integer