Create a Purchase Register Entry
Creates a document in the purchase register. Use entry_type PURCHASE or PURCHASE_ADJUSTMENT and document_type INVOICE or CREDIT_NOTE. Include org_id when your API requires it. A valid bearer token is required.
Path parameter
POST /api/document-registers/{profile_id}
Authorization: Bearer {jwt_token}Supplier and customer from profile
For purchase and purchase adjustments:
Use the same request body structure for all purchase scenarios; only entry_type and document_type change.
Request body
Send a JSON object with the fields described in the Document register object. Typical combinations:
Include org_id when your API requires it.
Response
Status code: 201 Created
Response body:
Returns the created register entry with request data and system‑generated fields (id, uuid, source_type, line ids, created_at, updated_at). When provided, org_id is included in the response.
Error responses
400 Bad Request
Invalid request body or validation failed. The response returns an errors object with field names as keys and error messages as values.
401 Unauthorized
Authentication required or invalid token.
500 Internal Server Error
An error occurred while processing the request.
