const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
currency: '<string>',
dueDate: '2023-11-07T05:31:56Z',
memo: '<string>',
lineItems: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
productId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity: 123,
taxRateId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://api.dolfinai.co/invoices/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documentNumber": "<string>",
"issueDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"subTotal": 123,
"taxAmount": 123,
"totalAmount": 123,
"memo": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentUrl": "<string>",
"customer": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"phone": "<string>",
"taxNumber": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"lineItems": [
{
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"unitPrice": 123,
"taxAmount": 123,
"subTotal": 123
}
]
}Partially update an invoice’s fields or line items.
const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
currency: '<string>',
dueDate: '2023-11-07T05:31:56Z',
memo: '<string>',
lineItems: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
productId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity: 123,
taxRateId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://api.dolfinai.co/invoices/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documentNumber": "<string>",
"issueDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"subTotal": 123,
"taxAmount": 123,
"totalAmount": 123,
"memo": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentUrl": "<string>",
"customer": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"phone": "<string>",
"taxNumber": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"lineItems": [
{
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"unitPrice": 123,
"taxAmount": 123,
"subTotal": 123
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.dolfinai.co/llms.txt
Use this file to discover all available pages before exploring further.
OK
ISO 4217 currency code (e.g. GBP, USD, EUR)
Draft, Sent, Paid, Void, PartiallyPaid Show child attributes
Show child attributes