Create and manage bills for vendor payments and expenses.
Overview
Bills represent amounts you owe to vendors. They track expenses, vendor payments, and can be exported for accounting purposes. Bills support draft, finalized, and paid states for workflow management.
How It Works
- Create a bill - Record an expense owed to a vendor
- Review and finalize - Verify details and finalize the bill
- Mark as paid - Record when payment is made to the vendor
- Export for accounting - Download bills for your accounting system
Example: You receive an invoice from a content provider for $5,000. Create a bill in draft, verify the amount matches the invoice, finalize it, and mark as paid when you send payment.
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/core/bills | List all bills |
POST | /api/v1/core/bills | Create a bill |
GET | /api/v1/core/bills/{id} | Get a bill |
PUT | /api/v1/core/bills/{id} | Update a bill |
DELETE | /api/v1/core/bills/{id} | Delete a bill |
POST | /api/v1/core/bills/{id}/finalize | Finalize a draft bill |
POST | /api/v1/core/bills/{id}/mark-as-paid | Mark a bill as paid |
GET | /api/v1/core/bills/export | Export bills |
Bill Workflow
| Status | Description |
|---|---|
draft | Bill is being prepared, can still be edited |
finalized | Bill is locked, ready for payment |
paid | Payment has been made to the vendor |
Bill Object
| Attribute | Type | Description |
|---|---|---|
id | integer | Unique identifier for the bill |
user_id | integer | ID of the vendor (user record) |
number | string | Bill number |
status | string | Bill status: draft, open, or paid |
currency | string | Three-letter ISO currency code |
amount_due | integer | Amount due in cents |
amount_paid | integer | Amount paid in cents |
amount_remaining | integer | Remaining amount in cents |
subtotal | integer | Subtotal before tax in cents |
total | integer | Total amount in cents |
paid | boolean | Whether the bill has been paid |
description | string | Bill description |
footer | string | Additional notes/footer |
purchase_order | string | Purchase order reference number |
period_start | string | Billing period start date (YYYY-MM-DD) |
period_end | string | Billing period end date (YYYY-MM-DD) |
line_items | array | Array of line item objects |
user | object | Vendor details (expandable) |
metadata | object | Key-value pairs for storing additional data |
finalized_at | timestamp | Unix timestamp when finalized |
paid_at | timestamp | Unix timestamp when paid |
created_at | timestamp | Unix timestamp of creation |
updated_at | timestamp | Unix timestamp of last update |
Related Endpoints
- Vendors - Vendors you owe money to
