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.eyJzdWIiOiI0MTQiLCJzY3AiOiJ1c2VyIiwiYXVkIjpudWxsLCJpYXQiOjE3NDg1MTY1MDMsImV4cCI6MTc1MTEwODUwMywianRpIjoiYjQzOGI1YjQtNDgyZi00ZmNlLWJhNjItMGU5MGVjMDI2ZjNlIn0.54EOmgfwIMdgxHrpm_RSeaMiXQxZbUajbQ78zKzbWsE
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: c5d79409-1f17-4654-aa4a-751d94922f6d
x-runtime: 0.004078
content-length: 39

Body

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