Occupations

Create Extend-Occupation Draft Invoices

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
curl -X POST 'https://api.tillor.eu/orgs/string/occupations/extend-draft-invoices' \  -H 'Content-Type: application/json' \  -d '{  "occupationIds": [    "string"  ]}'
{  "extendInvoiceId": "string",  "includeConsumptionRequested": true,  "consumptionLinesAdded": true}