Skip to main content
POST
/
bills
/
{id}
/
reclassify
Re-classify a bill
const options = {method: 'POST'};

fetch('https://api.dolfinai.co/bills/{id}/reclassify', 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,
  "amountCredited": 123,
  "outstanding": 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>",
  "voidedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "voidedAt": "2023-11-07T05:31:56Z",
  "voidReason": "<string>",
  "appliedApprovalPolicyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "appliedApprovalPolicyName": "<string>",
  "approvalReasoning": "<string>",
  "resolvedApproverUserIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "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>"
    },
    "bankDetailsVerified": true,
    "bankDetailsVerifiedAt": "2023-11-07T05:31:56Z",
    "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,
      "unit": "<string>",
      "unitPrice": 123,
      "taxRate": 123,
      "taxAmount": 123,
      "subTotal": 123,
      "sortOrder": 123,
      "category": "<string>",
      "tags": [
        "<string>"
      ],
      "categoryConfirmed": true,
      "spendClassConfirmed": true,
      "suggestedCategory": "<string>",
      "categoryConfidence": 123,
      "spendClassConfidence": 123
    }
  ],
  "tags": [
    "<string>"
  ]
}

Path Parameters

id
string<uuid>
required

Response

OK

id
string<uuid>
organisationId
string<uuid>
state
enum<string>
Available options:
Created,
OcrProcessing,
PendingReview,
NeedsApproval,
Approved,
Rejected,
Scheduled,
Paid,
OcrFailed,
PaymentInProgress,
PaymentFailed,
Voided
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
amountCredited

Supplier credit netted against this bill.

outstanding

What's left to pay after supplier credit (TotalAmount − AmountCredited). This is what the payment flow charges.

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
voidedBy
null | string<uuid>

Set when Voided. A null VoidedBy with a non-null VoidedAt ⇒ policy auto-void.

voidedAt
null | string<date-time>
voidReason
null | string
appliedApprovalPolicyId
null | string<uuid>

The approval policy applied at submit-review, if any (UI badge).

appliedApprovalPolicyName
null | string
approvalReasoning
null | string

Deterministic explanation of the approval decision.

resolvedApproverUserIds
string<uuid>[]

Users this bill was routed to for approval — the pending reviewers while in NeedsApproval.

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
null | object
lineItems
object[]
tags
string[]

Distinct union of the line items' tags, baked at submit-review — for bill-level filtering.