Occupations
Create Extend-Occupation Draft Invoices
Acesso
Membro da organização com esta permissão:
invoices:write
Uma chave de API com scopes também precisa da permissão nos seus scopes.
POST
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.
ApiKeyAuthheader
x-api-key<token>API key for authentication
organizationId*stringThe ID or slug of the organization
application/json- body
occupationIds*array<string>Items
1 <= itemsincludeConsumption?booleanDefault
falseOK
application/json- response
extendInvoiceId*stringincludeConsumptionRequested*booleanconsumptionLinesAdded*booleaninvoice*not (unknown)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}