Create an invoice
curl --request POST \
--url https://www.presolve.com/api/v1/cases/{caseId}/invoices \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"invoiceNumber": "<string>",
"lineItems": [
{
"description": "<string>",
"quantity": 123,
"rateCents": 0,
"amountCents": 0,
"linkedId": "<string>"
}
],
"fromUnbilled": true,
"dueDate": "<string>",
"billToContactId": "<string>",
"vendorContactId": "<string>",
"description": "<string>",
"terms": "<string>"
}
'const options = {
method: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
invoiceNumber: '<string>',
lineItems: [
{
description: '<string>',
quantity: 123,
rateCents: 0,
amountCents: 0,
linkedId: '<string>'
}
],
fromUnbilled: true,
dueDate: '<string>',
billToContactId: '<string>',
vendorContactId: '<string>',
description: '<string>',
terms: '<string>'
})
};
fetch('https://www.presolve.com/api/v1/cases/{caseId}/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.presolve.com/api/v1/cases/{caseId}/invoices"
payload = {
"invoiceNumber": "<string>",
"lineItems": [
{
"description": "<string>",
"quantity": 123,
"rateCents": 0,
"amountCents": 0,
"linkedId": "<string>"
}
],
"fromUnbilled": True,
"dueDate": "<string>",
"billToContactId": "<string>",
"vendorContactId": "<string>",
"description": "<string>",
"terms": "<string>"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}Billing
Create an invoice
Bidirectional: outbound (firm bills client) or inbound (vendor bills firm). Outbound supports fromUnbilled: true to pull unbilled time entries and uninvoiced reimbursable expenses atomically.
Requires the billing:write scope. Mutations require an X-Idempotency-Key header (responses are stored for replay; reusing a key with a different request returns 409 IDEMPOTENCY_CONFLICT). Rate tier: write.
POST
/
api
/
v1
/
cases
/
{caseId}
/
invoices
Create an invoice
curl --request POST \
--url https://www.presolve.com/api/v1/cases/{caseId}/invoices \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"invoiceNumber": "<string>",
"lineItems": [
{
"description": "<string>",
"quantity": 123,
"rateCents": 0,
"amountCents": 0,
"linkedId": "<string>"
}
],
"fromUnbilled": true,
"dueDate": "<string>",
"billToContactId": "<string>",
"vendorContactId": "<string>",
"description": "<string>",
"terms": "<string>"
}
'const options = {
method: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
invoiceNumber: '<string>',
lineItems: [
{
description: '<string>',
quantity: 123,
rateCents: 0,
amountCents: 0,
linkedId: '<string>'
}
],
fromUnbilled: true,
dueDate: '<string>',
billToContactId: '<string>',
vendorContactId: '<string>',
description: '<string>',
terms: '<string>'
})
};
fetch('https://www.presolve.com/api/v1/cases/{caseId}/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.presolve.com/api/v1/cases/{caseId}/invoices"
payload = {
"invoiceNumber": "<string>",
"lineItems": [
{
"description": "<string>",
"quantity": 123,
"rateCents": 0,
"amountCents": 0,
"linkedId": "<string>"
}
],
"fromUnbilled": True,
"dueDate": "<string>",
"billToContactId": "<string>",
"vendorContactId": "<string>",
"description": "<string>",
"terms": "<string>"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}Authorizations
Org-issued integration API key (service account credential). The plaintext secret is shown once at creation.
Headers
Stable caller-chosen key (max 200 chars) making the mutation safely retryable.
Maximum string length:
200Path Parameters
Case id
Body
application/json
Available options:
inbound, outbound Required string length:
1 - 100Required array length:
1 - 500 elementsShow child attributes
Show child attributes
Required string length:
1 - 200Required string length:
1 - 200Maximum string length:
2000Maximum string length:
200