Hand in a purchase document (a scan, a photo or a Peppol e-invoice) for the purchase register. Books nothing.
Changed onAnswers 201 with document_id, and for a Peppol e-invoice or credit note (Universal Business Language 2.1) also invoice_id, the deterministic check (check_status, findings: net plus tax equals gross, rate times base equals tax per line) and the validator's fatal_count. An e-invoice is read from its elements; a field it does not carry stays unreadable, never derived. The file travels as content_base64 (at most 3 megabytes) with its mime_type, and an Idempotency-Key header (8 to 200 characters): a retry with the same key and the same file answers the first result; the same key with another file is refused with idempotency_conflict. The same file under a new key answers the document already held. 403 while the entity's owner has not switched the purchase register on. Nothing is booked or paid: a person registers the entry in Books.
Request
- Base URLhttps://app.magistry.io
- Auth
- HTTP bearer
- or OAuth 2Authorization codehttps://app.magistry.io/api/oauth/authorizeToken URLhttps://app.magistry.io/api/oauth/tokenScopesfinance:write
Headers
Required, here or as idempotency_key in the body. A unique string you choose for this request; send the SAME key when retrying and the first answer is returned instead of writing twice (idempotent-replayed: true). The same key with other arguments is 409 idempotency_conflict. If the header and idempotency_key are both sent they must be equal.
Request body
The entity, one of those this app was granted (GET /api/v1/finance/entities lists them). In a GET query string entity is accepted too.
The file, base64-encoded (at most 3 megabytes decoded).
The file's type; application/xml or text/xml for an e-invoice.
The original file name (kept to 300 characters).
Your own reference for this document (kept to 200 characters).
Same as the Idempotency-Key header; give one of the two.
Response
Result
Changes
- warning
added the new
method_not_allowedenum value to theerrorresponse property for the response status - warning
added the new
method_not_allowedenum value to theerrorresponse property for the response status - warning
added the new
method_not_allowedenum value to theerrorresponse property for the response status
11 more changes in this revision
- warning