Skip to main content
POST
cURL
Body: {"agreement_id": 77}. Returns 201 with the invoice, or 200 with {"detail": "No unbilled tickets found for this agreement."} when there is nothing to bill.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

payment_status
enum<string>
  • PENDING - Pending
  • SUCCEEDED - Succeeded
  • FAILED - Failed
Available options:
PENDING,
SUCCEEDED,
FAILED

Response

200 - application/json
id
integer
required
read-only
invoice_number
string
required
read-only
agreement
object
required
driver
object
required
fleet
integer
required
read-only
status
enum<string>
required
  • DRAFT - Draft
  • FINALIZED - Finalized
  • VOID - Void
Available options:
DRAFT,
FINALIZED,
VOID
trigger
enum<string>
required
  • PROGRESSIVE - Progressive
  • AGREEMENT_ENDED - Agreement Ended
  • LATE_TICKET - Late Ticket
  • MANUAL - Manual
Available options:
PROGRESSIVE,
AGREEMENT_ENDED,
LATE_TICKET,
MANUAL
plan_snapshot
any
required
read-only

Full snapshot of plan + charges at creation time.

grace_period_ends_at
string<date-time>
required
read-only
created_at
string<date-time>
required
read-only
finalized_at
string<date-time> | null
required
read-only
payment_due_date
string<date-time> | null
required
read-only
is_overdue
boolean
required
read-only
total
string<decimal> | null
required
read-only

Null during DRAFT; computed and locked on finalization.

Pattern: ^-?\d{0,10}(?:\.\d{0,2})?$
draft_total
string<decimal> | null
required
read-only

Materialized running total while in DRAFT; nulled on finalization.

Pattern: ^-?\d{0,10}(?:\.\d{0,2})?$
credited_amount
number<double>
required
read-only
balance
number<double>
required
read-only
pdf_status
required

Null = PDF never requested. Set to PENDING when task is enqueued.

  • PENDING - Pending
  • IN_PROGRESS - In Progress
  • COMPLETE - Complete
Available options:
PENDING,
IN_PROGRESS,
COMPLETE
pdf_file
string<uri> | null
required
read-only
fees
string
required
read-only
fee_adjustments
object[]
required
read-only
tickets
object[]
required
read-only
exchanges
string
required
read-only
payment_status
enum<string>
  • PENDING - Pending
  • SUCCEEDED - Succeeded
  • FAILED - Failed
Available options:
PENDING,
SUCCEEDED,
FAILED