Skip to main content
POST
/
v1
/
platform
/
businesses
/
{business_id}
/
bills
Create bill
curl --request POST \
  --url https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/bills/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "external_id": "<string>",
  "line_items": [
    {
      "quantity": 123,
      "unit_price": 123,
      "description": "<string>",
      "account_identifier": "<unknown>",
      "product": "<string>",
      "sales_taxes": [
        {}
      ]
    }
  ],
  "vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "vendor_external_id": "<string>",
  "bill_number": "<string>",
  "vendor_bill_number": "<string>",
  "purchase_order_number": "<string>",
  "memo": "<string>",
  "reference_numbers": [
    "<string>"
  ],
  "attachment_urls": [
    "<string>"
  ],
  "bill_date": "2023-12-25",
  "received_at": "2023-11-07T05:31:56Z",
  "due_at": "2023-11-07T05:31:56Z",
  "approved_at": "2023-11-07T05:31:56Z",
  "currency": "EUR",
  "document": {
    "file": "<string>",
    "document_type": "purchase_invoice",
    "upload_source": "<string>",
    "metadata": "<unknown>",
    "tags": "<unknown>"
  }
}
'
{
  "type": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>",
  "terms": "<string>",
  "issue_date": "2023-12-25",
  "received_at": "2023-11-07T05:31:56Z",
  "due_at": "2023-11-07T05:31:56Z",
  "paid_at": "2023-11-07T05:31:56Z",
  "voided_at": "2023-11-07T05:31:56Z",
  "is_overdue": false,
  "currency": "<string>",
  "vendor": {
    "type": "<string>",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "mobile_phone": "<string>",
    "office_phone": "<string>",
    "address_string": "<string>",
    "memo": "<string>",
    "status": "<string>",
    "transaction_tags": [
      "<unknown>"
    ],
    "documents": [
      {
        "url": "<string>",
        "expires_in": 123,
        "document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "file_name": "<string>",
        "file_size": 123,
        "mime_type": "<string>"
      }
    ],
    "external_id": "<string>",
    "individual_name": "<string>",
    "company_name": "<string>",
    "email": "[email protected]"
  },
  "line_items": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "account_identifier": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "type": "AccountId"
      },
      "currency": "<string>",
      "unit_price": 123,
      "quantity": 123,
      "subtotal": 123,
      "sales_taxes_total": 123,
      "total_amount": 123,
      "tax_rate": 123,
      "description": "<string>",
      "product": "<string>"
    }
  ],
  "bill_payment_allocations": [
    {
      "amount_cents": 123,
      "payment_date": "2023-12-25",
      "payment_method": "<string>",
      "bill_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "vendor_credit_allocations": [
    {
      "amount_cents": 123,
      "applied_at": "2023-11-07T05:31:56Z",
      "vendor_credit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "vendor_credit_number": "<string>"
    }
  ],
  "vendor_refund_allocations": [
    {
      "vendor_refund_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amount_cents": 123,
      "allocated_at": "2023-11-07T05:31:56Z",
      "reference_number": "<string>"
    }
  ],
  "additional_sales_taxes": [
    {
      "amount": 123,
      "tax_account": "<unknown>",
      "rate": "<string>",
      "name": "<string>"
    }
  ],
  "additional_sales_taxes_total": 123,
  "subtotal": 123,
  "total_amount": 123,
  "outstanding_balance": 123,
  "paid_by_bank_payments": 123,
  "paid_by_credits": 123,
  "needs_reconciliation": true,
  "document": {
    "url": "<string>",
    "expires_in": 123,
    "document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "file_name": "<string>",
    "file_size": 123,
    "mime_type": "<string>"
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "external_id": "<string>",
  "bill_number": "<string>",
  "vendor_bill_number": "<string>",
  "purchase_order_number": "<string>",
  "memo": "<string>",
  "reference_numbers": "<unknown>",
  "attachment_urls": "<unknown>",
  "metadata": "<unknown>"
}

Authorizations

Authorization
string
header
required

Partner-level JWT token (unscoped). Token payload includes partner_id. Business access is validated via partner ownership. Format: Bearer <your-jwt-token>

Use this for: Multi-business operations where the business_id is specified in the URL and partner has access to multiple businesses.

Path Parameters

business_id
string
required

Body

Bill creation serializer. Creates a Bill with line items.

external_id
string
required

Your unique identifier for this bill (used for idempotency)

Minimum string length: 1
line_items
object[]
required

Array of line items for this bill (at least one required)

vendor_id
string<uuid> | null

UUID of existing vendor (use this OR vendor_external_id, not both)

vendor_external_id
string

External vendor ID - will auto-create vendor if not found

bill_number
string

Your internal bill tracking number

vendor_bill_number
string

Vendor's invoice/bill number from their system

purchase_order_number
string

Purchase order number if applicable

memo
string

Description or notes for this bill

reference_numbers
string[]

Array of additional reference numbers for tracking

Minimum string length: 1
attachment_urls
string[]

Array of URLs to bill documents/PDFs

Minimum string length: 1
bill_date
string<date>

Date bill was issued by vendor (ISO date: YYYY-MM-DD)

received_at
string<date-time>

Date/time bill was received (ISO 8601 format)

due_at
string<date-time>

Payment due date/time (ISO 8601 format)

approved_at
string<date-time> | null

Date/time bill was approved (triggers journal entry creation)

currency
enum<string>

Bill currency (e.g., GBP, EUR, USD)

  • EUR - Euro
  • GBP - British Pound
  • USD - US Dollar
  • SEK - Swedish Krona
  • NOK - Norwegian Krone
  • DKK - Danish Krone
  • ISK - Icelandic Króna
  • MYR - Malaysian Ringgit
  • SGD - Singapore Dollar
Available options:
EUR,
GBP,
USD,
SEK,
NOK,
DKK,
ISK,
MYR,
SGD,
document
object

Optional document upload

Response

Main bill serializer for list/fetch responses, aligned with existing API style

type
string
required

Always 'BillData' for type discrimination

id
string<uuid>
required
business_id
string<uuid>
required
status
string
required

Bill status: received, partially_paid, paid, voided

terms
string
required

Payment terms (NET_30, NET_60, DUE_ON_RECEIPT, etc.)

issue_date
string<date>
required

Date the bill was issued by vendor (from bill_date)

received_at
string<date-time>
required

Date/time bill was received

due_at
string<date-time>
required

Payment due date/time

paid_at
string<date-time>
required

Full payment completion date/time

voided_at
string<date-time>
required

Void action timestamp

is_overdue
boolean
required

True if bill is past due date and has outstanding balance

Example:

false

currency
string
required
vendor
object
required

Serializer for vendor objects returned by the vendors list endpoint

line_items
object[]
required
bill_payment_allocations
object[]
required

Payment allocations for this bill

vendor_credit_allocations
object[]
required

Vendor credit note allocations for this bill

vendor_refund_allocations
object[]
required

Vendor refund allocations for this bill

additional_sales_taxes
object[]
required

Additional tax entries not included in line items

additional_sales_taxes_total
integer
required

Total additional sales taxes in cents

subtotal
integer
required

Subtotal amount in cents before taxes

total_amount
integer
required

Total bill amount in cents including taxes

outstanding_balance
integer
required

Outstanding balance in cents

paid_by_bank_payments
integer
required

Amount paid via bank payments in cents (completed only)

paid_by_credits
integer
required

Amount paid via vendor credit notes in cents

needs_reconciliation
boolean
required

True if has unreconciled bank payments

document
object
required

Latest document with presigned URL

created_at
string<date-time>
required
updated_at
string<date-time>
required
external_id
string
bill_number
string
vendor_bill_number
string
purchase_order_number
string
memo
string
reference_numbers
any
attachment_urls
any
metadata
any