v2
latestOpenAPI 3.0.12026-07-263104131.9 MBBilling
Creates an invoice
Creates a new invoice for the specified agreement.
The invoice will be created with status PENDING unless the agreement has auto-approve enabled. If invoice number settings are enabled, a number will be automatically assigned.
post/v2/billing/invoices
Response
Invoice successfully created
Example response
{
"id": 123,
"invoiceNumber": "INV-2024-001",
"client": {
"id": 789,
"name": "Acme Corporation"
},
"status": "APPROVED",
"billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
"billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
"invoiceDate": "2024-02-01T00:00:00.000Z",
"dueDate": "2024-02-15T00:00:00.000Z",
"subTotal": 1000,
"discount": 50,
"subTotalWithDiscount": 950,
"taxRate": 0.1,
"totalTax": 95,
"total": 1045,
"currency": "USD",
"invoiceNote": "Additional invoice information",
"interval": "MONTHLY",
"errorDescription": "Failed to export to Xero",
"createTime": "2024-01-15T10:30:00.000Z",
"updateTime": "2024-01-20T14:45:00.000Z",
"invoiceGenerationType": "MANUAL",
"billContent": {
"issuerName": "ACME Corp",
"issuerAddress": "123 Main St, City, State 12345",
"issuerWebPage": "https://acme.com",
"issuerPhone": "+1-555-0123",
"billName": "Client Company",
"billAddress": "456 Oak Ave, City, State 67890",
"billEmail": "billing@client.com",
"billPhone": "+1-555-9876"
},
"appUserName": "john.doe@company.com",
"agreement": {
"id": 456,
"name": "Annual Support Agreement"
},
"failureReason": "Integration sync failed",
"allowOnlineCreditCardPayments": true,
"products": [
{
"id": 1,
"productId": 10,
"name": "Managed Services",
"description": "Monthly managed services for 50 devices",
"price": 10,
"cost": 5,
"quantity": 50,
"subTotal": 500,
"discount": 25,
"subTotalWithDiscount": 475,
"taxRate": 0.1,
"totalTax": 47.5,
"total": 522.5,
"taxable": true,
"billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
"billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
"accountId": 5,
"quantityType": "DEVICE_COUNTS",
"createTime": "2024-01-15T10:30:00.000Z",
"updateTime": "2024-01-20T14:45:00.000Z",
"agreementProductId": 123,
"ticketProductId": 456,
"integrationSettings": {
"inheritTaxRateFromAgreement": true,
"taxRate": "INPUT"
},
"tax": {
"name": "Sales Tax",
"taxRates": [
{
"name": "State Tax",
"rate": 0.08
}
]
}
}
],
"agreementProducts": [
{
"id": 1,
"productId": 10,
"name": "Managed Services",
"description": "Monthly managed services for 50 devices",
"price": 10,
"cost": 5,
"quantity": 50,
"subTotal": 500,
"discount": 25,
"subTotalWithDiscount": 475,
"taxRate": 0.1,
"totalTax": 47.5,
"total": 522.5,
"taxable": true,
"billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
"billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
"accountId": 5,
"quantityType": "DEVICE_COUNTS",
"createTime": "2024-01-15T10:30:00.000Z",
"updateTime": "2024-01-20T14:45:00.000Z",
"agreementProductId": 123,
"ticketProductId": 456,
"integrationSettings": {
"inheritTaxRateFromAgreement": true,
"taxRate": "INPUT"
},
"tax": {
"name": "Sales Tax",
"taxRates": [
{
"name": "State Tax",
"rate": 0.08
}
]
}
}
],
"ticketProducts": [
{
"id": 1,
"productId": 10,
"name": "Managed Services",
"description": "Monthly managed services for 50 devices",
"price": 10,
"cost": 5,
"quantity": 50,
"subTotal": 500,
"discount": 25,
"subTotalWithDiscount": 475,
"taxRate": 0.1,
"totalTax": 47.5,
"total": 522.5,
"taxable": true,
"billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
"billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
"accountId": 5,
"quantityType": "DEVICE_COUNTS",
"createTime": "2024-01-15T10:30:00.000Z",
"updateTime": "2024-01-20T14:45:00.000Z",
"agreementProductId": 123,
"ticketProductId": 456,
"integrationSettings": {
"inheritTaxRateFromAgreement": true,
"taxRate": "INPUT"
},
"tax": {
"name": "Sales Tax",
"taxRates": [
{
"name": "State Tax",
"rate": 0.08
}
]
}
}
],
"tax": {
"name": "Sales Tax",
"taxRates": [
{
"name": "State Tax",
"rate": 0.08
}
]
}
}