Skip to main content
POST
/
invoices
/
{id}
/
send
Send invoice
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    subject: '<string>',
    previewText: '<string>',
    greetingLine: '<string>',
    openingBodyMarkdown: '<string>',
    reminders: []
  })
};

fetch('https://api.dolfinai.co/invoices/{id}/send', 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,
  "amountPaid": 123,
  "amountCredited": 123,
  "outstanding": 123,
  "recurringScheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "recurringOccurrenceNumber": 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",
      "productName": "<string>",
      "taxRateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "taxRateSnapshot": {
        "code": "<string>",
        "name": "<string>",
        "source": "<string>",
        "rate": 123,
        "sourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "snapshottedAt": "2023-11-07T05:31:56Z"
      },
      "quantity": 123,
      "unitPrice": 123,
      "taxAmount": 123,
      "subTotal": 123
    }
  ]
}

Path Parameters

id
string<uuid>
required

Body

application/json
tone
null | enum<string>

Resolves the catalogue with this tone instead of the organisation's default for this send only. When null, the organisation's DefaultInvoiceMessageTone is used.

Available options:
Friendly,
Direct,
Formal
subject
null | string

Overrides the catalogue-resolved email Subject. When null, catalogue resolves.

previewText
null | string

Overrides the catalogue-resolved inbox preview text (the line that previews next to the subject in most clients). When null, catalogue resolves.

greetingLine
null | string

Overrides the catalogue-resolved greeting line (e.g. "Hi Acme,"). When null, catalogue resolves.

openingBodyMarkdown
null | string

Overrides the catalogue-resolved opening body. Markdown; rendered to HTML at send time. When null, catalogue resolves.

reminders
null | enum<string>[]

Override the organisation's DefaultReminderOffsets for this send. null (or field omitted): use the organisation's default list. []: schedule no reminders for this send. Populated: schedule exactly these offsets, overriding the organisation default. Each offset is resolved relative to the invoice's DueDate; offsets that would resolve to a past time are skipped silently.

Available options:
OneWeekBefore,
TwoDaysBefore,
OnDueDate,
TwoDaysAfter,
OneWeekAfter

Response

OK

currency
string
required

ISO 4217 currency code (e.g. GBP, USD, EUR)

id
string<uuid>
organisationId
string<uuid>
customerId
string<uuid>
documentNumber
null | string
issueDate
string<date-time>
dueDate
null | string<date-time>
status
enum<string>
Available options:
Draft,
Sent,
Paid,
Void,
PartiallyPaid,
Credited
subTotal
taxAmount
totalAmount
amountPaid

Total payments received against this invoice.

amountCredited

Total of issued credit notes applied to this invoice.

outstanding

Remaining balance: TotalAmount - payments received - issued credit notes.

recurringScheduleId
null | string<uuid>

Set when this invoice was generated from a recurring schedule; null for hand-made invoices.

recurringOccurrenceNumber
memo
null | string
createdAt
string<date-time>
createdBy
null | string<uuid>
updatedAt
string<date-time>
updatedBy
null | string<uuid>
paymentUrl
null | string
customer
null | object
lineItems
object[]