Skip to Content
HelvetlyDocs
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
/api/v1/engagements/{id}/periods/{period_id}

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.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token, hvt_…, with scopes such as read:* or write:invoices

Path Parameters

id*string

The engagement's id.

period_id*string

The period's id, from list_engagement_periods.

Request Body

application/json
  1. body
quantity*|

The committed quantity of this period, above 0 up to 1000000, up to 3 decimals.

Response Body

OK

application/json
  1. response
data*

A period measured against today, with the invoices made from it.

Example Request
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"      }    ]  }}