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.eyJzdWIiOiI0MjQiLCJzY3AiOiJ1c2VyIiwiYXVkIjpudWxsLCJpYXQiOjE3NjM2MjYzNzAsImV4cCI6MTc2NjIxODM3MCwianRpIjoiMmQ5YTVkNDEtMmJlOC00MGU2LWEwZjgtMmZiNDFjNzJjM2ZlIn0.JpRg1-lP7pJ0W9IUZcdWM1y_n1dGGbEZJZghV-dg9xs
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: a45f42d2-ceaa-4529-920e-14cc1b22b6e7
x-runtime: 0.003757
content-length: 39

Body

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