Skip to main content
PATCH
/
v1
/
accounts-receivable
/
{id}
Update accounts receivable invoice
curl --request PATCH \
  --url http://localhost:3001/v1/accounts-receivable/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "counterpartyId": "ff952e53-30fa-4da6-9a0d-0078f56b71da",
  "invoiceNumber": "INV-42613",
  "type": "INVOICE",
  "date": "20.09.2024",
  "dueDate": "26.09.2024",
  "billingPeriodStart": "2 weeks",
  "billingPeriodEnd": "2 weeks",
  "totalAmount": "30.20",
  "taxRate": 123,
  "currency": "EUR",
  "skontoRate": "20",
  "skontoAmount": "35.90",
  "skontoDate": "26.09.2024",
  "alreadyPaid": true,
  "alreadyPaidDate": "20.09.2024",
  "notes": "Lorem ipsum dolor sit amet."
}'
{
  "id": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "originalFileName": "<string>",
  "filename": "<string>",
  "counterpartyName": "<string>",
  "counterpartyIban": "<string>",
  "counterpartyVat": "<string>",
  "counterparty": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "email": "<string>",
    "markedTrusted": true,
    "markedTrustedDate": "2023-11-07T05:31:56Z",
    "markedTrustedUser": {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "email": "<string>",
      "name": "<string>",
      "authId": "<string>",
      "role": "<string>",
      "hasPushNotification": true
    },
    "description": "<string>",
    "vat": "<string>",
    "accountsPayableNumber": "22 0391919",
    "paymentTermsDays": 123,
    "skontoPercentage": 123,
    "skontoDays": 123,
    "bankAccount": {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "iban": "<string>",
      "bic": "<string>",
      "countryCode": "<string>",
      "address": "<string>"
    }
  },
  "invoiceNumber": "<string>",
  "purchaseOrder": "<string>",
  "date": "<string>",
  "billingPeriodStart": "<string>",
  "billingPeriodEnd": "<string>",
  "dueDate": "<string>",
  "totalAmount": 123,
  "taxRate": 123,
  "skontoDate": "<string>",
  "skontoAmount": 123,
  "skontoRate": 123,
  "currency": "EUR",
  "type": "INVOICE",
  "category": "GOODS",
  "paymentTerms": "<string>",
  "notes": "<string>",
  "alreadyPaid": true,
  "alreadyPaidDate": "<string>",
  "archived": true,
  "archivedDate": "<string>",
  "archivedByUser": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "email": "<string>",
    "name": "<string>",
    "authId": "<string>",
    "role": "<string>",
    "hasPushNotification": true
  },
  "organization": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "slug": "<string>",
    "logoFileName": "<string>",
    "country": "<string>",
    "vatNumber": "<string>",
    "featureFlags": [
      {
        "id": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "featureName": "<string>",
        "isEnabled": true
      }
    ]
  },
  "status": "OUTSTANDING",
  "paymentMethodType": "BANK_TRANSFER",
  "transactionMatches": [
    {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "bankTransaction": {
        "id": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "transactionId": "<string>",
        "amount": 123,
        "currency": "EUR",
        "bookingDate": "2023-11-07T05:31:56Z",
        "remittanceInformation": "<string>",
        "additionalInformation": "<string>",
        "counterPartyName": "<string>",
        "counterPartyIban": "<string>",
        "transactionType": "incoming",
        "endToEndId": "<string>",
        "matchedInvoicesSum": 123,
        "matchingStatus": "NOT_MATCHED"
      },
      "matchedAmount": 123,
      "matchType": "MANUAL",
      "matchConfidence": "HIGH",
      "matchedBy": {
        "id": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "email": "<string>",
        "name": "<string>",
        "authId": "<string>",
        "role": "<string>",
        "hasPushNotification": true
      },
      "notes": "<string>",
      "metadata": {},
      "matchedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "manuallyMarkedPaid": true,
  "manuallyMarkedPaidAt": "<string>",
  "manuallyMarkedPaidBy": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "email": "<string>",
    "name": "<string>",
    "authId": "<string>",
    "role": "<string>",
    "hasPushNotification": true
  },
  "matchedTransactionsSum": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

AR Invoice ID

Body

application/json
counterpartyId
string
required

The id of the matched / created counterparty of the invoice.

Example:

"ff952e53-30fa-4da6-9a0d-0078f56b71da"

invoiceNumber
string
required

The invoice number is a unique identifier for the invoice. It is usually a combination of letters and numbers.

Example:

"INV-42613"

type
string
required

The type of the invoice.

Example:

"INVOICE"

date
string<date-time>
required

The date when the invoice was issued.

Example:

"20.09.2024"

dueDate
string<date-time>
required

The date when the invoice is due to payment.

Example:

"26.09.2024"

billingPeriodStart
string<date-time>
required

The start date of the billing period.

Example:

"2 weeks"

billingPeriodEnd
string<date-time>
required

The end of the billing period.

Example:

"2 weeks"

totalAmount
number
required

The total amount of the invoice.

Example:

"30.20"

taxRate
number
required

The tax rate of the invoice.

currency
string
required

The currency in which the invoice is issued.

Example:

"EUR"

skontoRate
number
required

The skonto rate of the invoice in percent.

Example:

"20"

skontoAmount
number
required

The skonto amount of the invoice.

Example:

"35.90"

skontoDate
string<date-time>
required

The skonto due date.

Example:

"26.09.2024"

alreadyPaid
boolean
required

Whether the invoice has already been paid or not.

alreadyPaidDate
string<date-time>
required

The date when the invoice was paid.

Example:

"20.09.2024"

notes
string
required

Additional notes.

Example:

"Lorem ipsum dolor sit amet."

Response

200 - application/json
currency
enum<string>
default:EUR
required

Currency of the invoice amount.

Available options:
EUR,
USD,
GBP,
JPY,
AUD,
CAD,
CHF,
CNY,
HKD,
NZD,
SEK,
KRW,
SGD,
NOK,
MXN,
INR,
BRL,
RUB,
ZAR,
TRY,
AED,
THB,
DKK,
PLN,
TWD,
SAR,
MYR,
IDR
type
enum<string>
default:INVOICE
required

Type of the invoice (e.g., Invoice, Credit Note).

Available options:
INVOICE,
CREDIT_NOTE,
REMINDER
alreadyPaid
boolean
required

Whether the invoice has been marked as already paid.

archived
boolean
required

Whether the invoice has been archived.

organization
object
required

Organization associated with the invoice.

status
enum<string>
default:OUTSTANDING
required

Current status of the AR invoice (e.g., Outstanding, Paid, Canceled).

Available options:
OUTSTANDING,
PARTIALLY_PAID,
PAID,
CANCELED
manuallyMarkedPaid
boolean
required

Whether the invoice was manually marked as paid.

id
string

The unique identifier of the entity.

createdAt
string<date-time>

The date and time the entity was created.

updatedAt
string<date-time>

The date and time the entity was last updated.

originalFileName
string

Original name of the uploaded invoice file.

filename
string

Stored filename of the invoice document.

counterpartyName
string

Name of the counterparty extracted from OCR scan.

counterpartyIban
string

IBAN of the counterparty extracted from OCR scan.

counterpartyVat
string

VAT number of the counterparty extracted from OCR scan.

counterparty
object

Details of the selected or detected invoice counterparty.

invoiceNumber
string

Unique identifier or number of the invoice.

purchaseOrder
string

Purchase order number associated with the invoice.

date
string

Issuance date of the invoice.

billingPeriodStart
string

Start date of the billing period.

billingPeriodEnd
string

End date of the billing period.

dueDate
string

Due date for invoice payment.

totalAmount
number

Total invoice amount excluding taxes.

taxRate
number

Tax rate applied to the invoice.

skontoDate
string

Date when early payment discount is applicable until.

skontoAmount
number

Early payment discount amount.

skontoRate
number

Early payment discount rate as a percentage.

category
enum<string>

Category of the invoice (GOODS or SERVICES).

Available options:
GOODS,
SERVICES
paymentTerms
string

Payment terms for the invoice.

notes
string

Additional notes or comments for the invoice.

alreadyPaidDate
string

Date when the invoice was marked as already paid.

archivedDate
string

Date when the invoice was archived.

archivedByUser
object

User who archived the invoice.

paymentMethodType
enum<string>

Payment method type for the invoice.

Available options:
BANK_TRANSFER,
DIRECT_DEBIT,
CARD,
OTHER
transactionMatches
object[]

Bank transaction matches for payment tracking.

manuallyMarkedPaidAt
string

Date when the invoice was manually marked as paid.

manuallyMarkedPaidBy
object

User who manually marked the invoice as paid.

matchedTransactionsSum
number

Sum of all matched transaction amounts for partial payments.