Skip to content

DR76 - Issue the accounting documents and trigger the generation of their associated file(s)

Request

Description

Which document to generate depends on the configuration.

For now this only works for per-order purchase invoices (LOGISTIC_PURCHASE_ORDER) when the cXML feature is enabled.

A maximum of 100 requests can be issued simultaneously.

Security
Shop-API-Key(Required scopes: ROLE_SHOP_ADMIN
ROLE_PARTNER_CUSTOMER_ACCOUNTING...
)
Query
shop_idinteger, (int64)

Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

Bodyapplication/json
requestsArray of objects, [ 1 .. 100 ] itemsrequired

The details of the purchase invoices to issue.

curl -i -X POST \
  'https://your-instance.mirakl.net/api/document-request/documents/generate?shop_id=0' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "requests": [
      {
        "due_date": "2023-03-28T09:34:42Z",
        "issue_date": "2023-03-28T09:34:42Z",
        "request_id": "string",
        "total_amount_excluding_taxes": 0,
        "total_tax_amount": 0
      }
    ]
  }'

Responses

OK

Bodyapplication/json
requestsArray of objectsrequired

Details of the purchase invoices for each request as they were sent

Response
{ "requests": [ { … } ] }