Create an invoice draft for a period
Needs a token with the write:engagements scope. Authentication
Try in Playground sends a real request to app.helvetly.com with a token you paste. It stays in this browser tab only (session storage) and goes to no one else.
Makes one invoice draft for the period (it is not issued: use issue_invoice). kind advance bills the committed quantity (advance engagements, once per period: 409 already_invoiced); kind usage bills the uninvoiced entries and marks them invoiced (409 nothing_to_invoice when there are none). Needs both write:engagements and write:invoices. Not idempotent for usage: a second call bills the entries not yet covered.
bearerAuthAuthorizationBearer <token>A personal API token, hvt_…, with scopes such as read:* or write:invoices
id*stringThe engagement's id.
period_id*stringThe period's id, from list_engagement_periods.
application/json- body
kind*stringadvance: the committed quantity (advance engagements only). usage: the uninvoiced entries (for advance engagements only what exceeds the commitment).
"advance""usage"detail?stringDefault: the engagement's invoice_detail.
"summary""per_entry"Created
application/json- response
data*curl -X POST 'https://app.helvetly.com/api/v1/engagements/string/periods/string/invoice' \ -H 'Content-Type: application/json' \ -d '{ "kind": "usage", "detail": "per_entry"}'{ "data": { "invoice_id": "string", "period": { "id": "string", "index": 0, "starts_on": "2019-08-24", "ends_on": "2019-08-24", "natural_ends_on": "2019-08-24", "full_quantity": "string", "quantity_manual": true, "quantity": "string", "unit_price": "1234.50", "overage_unit_price": "1234.50", "used": "string", "invoiced_quantity": "string", "advance_invoice": { "id": "string", "number": "string", "status": "string", "kind": "string" }, "unearned": "string", "carried_in": "string", "available": "string", "remaining": "string", "overage": "string", "expected": "string", "state": "string", "uninvoiced_quantity": "string", "invoices": [ { "id": "string", "number": "string", "status": "string", "kind": "string" } ] } }}