Create a bill
Changed onCreate a bill as a draft. Only the line items are required.
post/v2/bills
Request
- Base URLhttps://api.slash.com
- URLhttps://api.slash.com/v2/bills
- AuthAPI key in header X-API-Key
Headers
X-Idempotency-Keystring required
Unique caller-generated key for one create request. Once an authenticated, schema-valid request reaches the operation, the key is permanently consumed for that operation and legal entity whether the operation succeeds or fails. Reusing it in that scope returns 409 and never replays a response, unlike API v1, which replays the original response for a matching key.
Request body
Example request
{
"recipientId": "le_c_2rj4l7hmrrrcv",
"destinationId": "le_contact_destination_2rj4l7hmrrrcv",
"ownerUserId": "u_2rj4l7hmrrrcv",
"invoiceNumber": "INV-4471",
"invoiceDate": "2026-09-01",
"dueDate": "2026-10-01",
"lineItems": [
{
"name": "Hosting",
"quantity": 1
}
],
"tax": {
"amount": 800,
"currency": "USD"
},
"discount": {
"amount": 500,
"currency": "USD"
},
"documentIds": [
"st_2rj4l7hmrrrcv"
]
}Response
The created bill.
Example response
{
"id": "bill_2rj4l7hmrrrcv",
"recipientId": "le_c_2rj4l7hmrrrcv",
"destinationId": "le_contact_destination_2rj4l7hmrrrcv",
"ownerUserId": "u_2rj4l7hmrrrcv",
"invoiceNumber": "INV-4471",
"invoiceDate": "2026-09-01",
"dueDate": "2026-10-01",
"currency": "USD",
"lineItems": [
{
"id": "bill_line_item_2rj4l7hmrrrcv",
"name": "Hosting",
"quantity": 1
}
],
"documentIds": [
"st_2rj4l7hmrrrcv"
],
"payments": [
{
"id": "bill_payment_2rj4l7hmrrrcv",
"transferId": "transfer_intent_2rj4l7hmrrrcv",
"transactionId": "agg_tx_2rj4l7hmrrrcv"
}
]
}Changes
- info
endpoint added
- info