Skip to main content
PATCH
/
v1
/
invoices
/
{id}
Update an Invoice
curl --request PATCH \
  --url https://api.bookeeping.ai/public-api/v1/invoices/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "purchaseOrderId": "<string>",
  "discount": {},
  "invoiceDate": "2023-11-07T05:31:56Z",
  "dueDate": "2023-11-07T05:31:56Z",
  "lineItems": [
    {}
  ],
  "payViaStripeAccountConnectionId": "<string>",
  "note": "<string>",
  "counterParty": "<string>",
  "invoiceId": "<string>",
  "currency": "<string>"
}
'
{
  "message": "<string>",
  "metaData": {
    "warnings": [
      "<string>"
    ]
  },
  "data": {
    "_id": "<string>",
    "projectId": "<string>",
    "status": "DRAFT",
    "invoiceId": "<string>",
    "discount": {},
    "amount": 123,
    "invoiceDate": "2023-11-07T05:31:56Z",
    "dueDate": "2023-11-07T05:31:56Z",
    "currency": "<string>",
    "lineItems": [
      {}
    ],
    "note": "<string>",
    "calculated": {
      "grandTotal": 123,
      "tax": 123,
      "discount": 123,
      "subTotal": 123
    },
    "attachments": [
      "<string>"
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "purchaseOrderId": "<string>",
    "counterParty": {
      "_id": "<string>",
      "accountName": "<string>",
      "accountNumber": "<string>",
      "email": "jsmith@example.com",
      "phone": "<string>",
      "type": "customer",
      "otherEmails": [
        "jsmith@example.com"
      ],
      "address": {}
    },
    "convertedAmount": 123,
    "convertedCurrency": "<string>",
    "sendDate": "2023-11-07T05:31:56Z",
    "sendBy": "<string>",
    "cancellationReason": "<string>",
    "cancellationDate": "2023-11-07T05:31:56Z",
    "cancellationBy": "<string>",
    "paidMarkedBy": "<string>",
    "paidMarkedDate": "2023-11-07T05:31:56Z",
    "attachedTransactionId": "<string>",
    "payViaStripeAccountConnectionId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API key for authentication. Get your key from the Dashboard > Settings > API Access.

Path Parameters

id
string
required

The id of the invoice. Expected to be a valid object id like 666666666666666666666666

Body

application/json
purchaseOrderId
string | null
discount
object

Global discount, after applying the line item discounts

invoiceDate
string<date-time>

The date of the invoice

dueDate
string<date-time>

The date of the due date

lineItems
object[]

The line items of the invoice

payViaStripeAccountConnectionId
string | null

The id of the pay via stripe account connection. Expected to be a valid object id like 666666666666666666666666

note
string

The notes of the invoice

counterParty
string

The id of the counterparty. Expected to be a valid object id like 666666666666666666666666

invoiceId

The id of the invoice or 'INCREMENTAL' to auto generate the invoice id

currency
string

Response

Update an Invoice executed successfully

message
string

Success message

metaData
object
data
object