Finance > Invoices

Mark as paid/pending

PATCH update state

Endpoint

PATCH /api/v1/finance/invoices/bulk_update

Parameters

Name Description In
invoice[invoice_ids] required Array of timesheet ids
invoice[state] required State to update ["pending", "paid"]

Request

Route

PATCH /api/v1/finance/invoices/bulk_update

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIzOTUiLCJzY3AiOiJ1c2VyIiwiYXVkIjpudWxsLCJpYXQiOjE3Mzc1NTE1NTksImV4cCI6MTc0MDE0MzU1OSwianRpIjoiMzU3NDkxZjgtZDRkZC00Y2U2LWE5YmEtMjg5NWY3YzMyYzYxIn0.eiNgltuKogr8YGUvTgzpOGshEjDpk3eAV2CgIbHFa-8
Host: example.org
Cookie: 

Body

{
  "invoice": {
    "invoice_ids": [
      20,
      21,
      22
    ],
    "state": "paid"
  }
}

Response

Simulated Response

Status

400

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
cache-control: no-cache
x-request-id: c056f653-8d50-467a-8a48-7adf5fe55698
x-runtime: 0.004387
content-length: 39

Body

{
  "errors": {
    "passcode": [
      "is required"
    ]
  }
}