Create and Update Invoices

/api/v1_1/invoices/

post
Invoices

https://{domain}.customersuccessbox.com/api/v1_1/invoices
POST Invoices allow you to create and/or update a batch of Invoices in a single request. Our recommendation for batch size is to limit each batch to a maximum of 200 records.
Request
Response
Request
Headers
Authorization
required
string
Bearer {api_key}
Content-Type
required
string
application/json
Body Parameters
invoice_id
required
string
Unique identifier for invoice
subscription_id
required
string
Unique identifier for subscription
account_id
optional
string
Unique identifier for account. Set this only if Invoice cannot be attributed to a subscription.
Response
200: OK
{
"success": true
}

Body example

Refer to available fields in Invoice Resource for attributes that can be set and updated for an invoice using this call.

Only those fields are allowed which aren't marked as Read-only.

[{
"invoice_id": "inv-dgs3344",
"subscriptin_id": "sub-dsg3344"
},
{
"invoice_id": "inv-dgs3374",
"subscription_id": "sub-fsg3564"
},
{
"invoice_id": "inv-dgs4394",
"subscription_id": "sub-fsg2654"
}]

CURL request example

curl --location --request POST "https://{domain}.customersuccessbox.com/api/v1_1/users" \
--header "Authorization: Bearer {api_key}" \
--header "Content-Type: application/json" \
--data "[{
\"invoice_id\": \"inv-dgs3344\",
\"subscription_id\": \"sub-dsg3344\"
},
{
\"invoice_id\": \"inv-dgs3374\",
\"subscription_id\": \"sub-fsg3564\"
},
{
\"invoice_id\": \"inv-dgs4394\",
\"subscription_id\": \"sub-fsg2654\"
}]"