Skip to main content
POST
/
bills
/
{id}
/
schedule-payment
Schedule bill payment
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({paymentDate: '2023-11-07T05:31:56Z', paymentMethod: '<string>'})
};

fetch('https://api.dolfinai.co/bills/{id}/schedule-payment', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organisationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "fileName": "<string>",
  "rawFileType": "<string>",
  "supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "suggestedMatchedSupplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "supplierName": "<string>",
  "supplierEmail": "<string>",
  "supplierPhone": "<string>",
  "supplierAddress": "<string>",
  "supplierTaxId": "<string>",
  "supplierWebsite": "<string>",
  "supplierRegistrationNumber": "<string>",
  "invoiceNumber": "<string>",
  "invoiceDate": "2023-11-07T05:31:56Z",
  "dueDate": "2023-11-07T05:31:56Z",
  "currency": "<string>",
  "subTotal": 123,
  "taxAmount": 123,
  "totalAmount": 123,
  "paymentTerms": "<string>",
  "paymentRef": "<string>",
  "bankDetails": {
    "accountHolderName": "<string>",
    "accountNumber": "<string>",
    "sortCode": "<string>",
    "routingNumber": "<string>",
    "iban": "<string>",
    "bicSwift": "<string>",
    "country": "<string>",
    "currency": "<string>"
  },
  "ocrConfidence": 123,
  "approvedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "approvedAt": "2023-11-07T05:31:56Z",
  "rejectedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "rejectedAt": "2023-11-07T05:31:56Z",
  "rejectionReason": "<string>",
  "paymentDate": "2023-11-07T05:31:56Z",
  "paymentMethod": "<string>",
  "paidAt": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updatedAt": "2023-11-07T05:31:56Z",
  "updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "supplier": {
    "name": "<string>",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "organisationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "email": "<string>",
    "phone": "<string>",
    "website": "<string>",
    "taxNumber": "<string>",
    "registrationNumber": "<string>",
    "address": {
      "line1": "<string>",
      "line2": "<string>",
      "city": "<string>",
      "postalCode": "<string>",
      "country": "<string>"
    },
    "bankDetails": {
      "accountHolderName": "<string>",
      "accountNumber": "<string>",
      "sortCode": "<string>",
      "routingNumber": "<string>",
      "iban": "<string>",
      "bicSwift": "<string>",
      "country": "<string>",
      "currency": "<string>"
    },
    "paymentTermsDefault": "<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",
      "quantity": 123,
      "unitPrice": 123,
      "taxRate": 123,
      "taxAmount": 123,
      "subTotal": 123,
      "sortOrder": 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.

Path Parameters

id
string<uuid>
required

Body

application/json
paymentDate
null | string<date-time>
paymentMethod
null | string

Response

OK

id
string<uuid>
organisationId
string<uuid>
state
enum<string>
Available options:
Created,
OcrProcessing,
PendingReview,
NeedsApproval,
Approved,
Rejected,
Scheduled,
Paid,
OcrFailed
source
enum<string>
Available options:
Upload,
Email,
Webhook
fileName
null | string
rawFileType
null | string
supplierId
null | string<uuid>
suggestedMatchedSupplierId
null | string<uuid>

Will be used as the Supplier if the Supplier is not set

supplierName
null | string
supplierEmail
null | string
supplierPhone
null | string
supplierAddress
null | string
supplierTaxId
null | string
supplierWebsite
null | string
supplierRegistrationNumber
null | string
invoiceNumber
null | string
invoiceDate
null | string<date-time>
dueDate
null | string<date-time>
currency
string

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

subTotal
taxAmount
totalAmount
paymentTerms
null | string
paymentRef
null | string
bankDetails
object
ocrConfidence
approvedBy
null | string<uuid>
approvedAt
null | string<date-time>
rejectedBy
null | string<uuid>
rejectedAt
null | string<date-time>
rejectionReason
null | string
paymentDate
null | string<date-time>
paymentMethod
null | string
paidAt
null | string<date-time>
createdAt
string<date-time>
createdBy
null | string<uuid>
updatedAt
string<date-time>
updatedBy
null | string<uuid>
supplier
object
lineItems
object[]