API referenceEngagements
Set a period's quantity
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.
PATCH
Sets the committed quantity of one period by hand; later changes to the engagement's quantity no longer overwrite it. 409 period_invoiced when the period has an advance invoice. Safe to retry.
bearerAuthheader
AuthorizationBearer <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
quantity*|The committed quantity of this period, above 0 up to 1000000, up to 3 decimals.
OK
application/json- response
data*A period measured against today, with the invoices made from it.
curl -X PATCH 'https://app.helvetly.com/api/v1/engagements/string/periods/string' \ -H 'Content-Type: application/json' \ -d '{ "quantity": "12"}'Example Response
{ "data": { "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" } ] }}