Skip to Content
Occupations

Create Extend-Occupation Draft Invoices

Toegang

Lid van de organisatie met dit recht:

  • invoices:write

Een API-sleutel met scopes heeft het recht ook in zijn scopes nodig.

POST
/orgs/{organizationId}/occupations/extend-draft-invoices

Creates one draft invoice for the customer with the first Extend occupation period product (sorted by name) and one anchor line per occupation id (same order as the request). Invoice-bundle children are resolved server-side per anchor. When requested, appends billable meter consumption for all meters on those occupations' terrains to the same draft. All occupation ids must belong to the same customer.

Authorization

ApiKeyAuth
headerx-api-key<token>

API key for authentication

Path Parameters

organizationId*string

The ID or slug of the organization

Request Body

application/json
  1. body
occupationIds*array<string>
Items1 <= items
includeConsumption?boolean
Defaultfalse

Response Body

OK

application/json
  1. response
extendInvoiceId*string
includeConsumptionRequested*boolean
consumptionLinesAdded*boolean
invoice*not (unknown)
Example Request
curl -X POST 'https://api.tillor.eu/orgs//occupations/extend-draft-invoices' \  -H 'Content-Type: application/json' \  -d '{  "occupationIds": [    "string"  ]}'
Example Response
{  "extendInvoiceId": "string",  "includeConsumptionRequested": true,  "consumptionLinesAdded": true,  "invoice": null}