Create a Standard Invoice
For an API request to create a Standard Invoice, the following parameters are either always required or can be required if the subscriber specifies so.
Parameter | Required | Note |
---|---|---|
InvoiceNumber | Required | |
WoIdentifier | Required | |
InvoiceText | Optional/Required | Required when Require Resolution Text is enabled in the invoice settings. See Gather Invoice Requirements. |
InvoiceTaxesDetails | Optional/Required | Required for all countries, except USA and Canada. |
See Invoice Parameters for a detailed description of each parameter.
Important: The default value of monetary amounts is 0 (zero).
USA or Canada
When a subscriber’s location is in the USA or Canada, send the following request to create a Standard Invoice:
POST /invoices
Header | Value |
---|---|
Content-Type | application/json |
Parameter | Parameter type | Example value |
---|---|---|
request | Body | See below |
POST https://sb2api.servicechannel.com/v3/invoices HTTP/1.1
Authorization: Bearer {access_token}
Content-Type: application/json
{
"InvoiceNumber": "N-123456789",
"WoIdentifier": "88708117",
"InvoiceTax": 15,
"InvoiceTotal": 680,
"InvoiceText": "Cut grass, cleared weeds in flower bed and trimmed shrubs",
"InvoiceAmountsDetails": {
"LaborAmount": 100,
"MaterialAmount": 300,
"TravelAmount": 200,
"FreightAmount": 50,
"OtherAmount": 10,
"OtherDescription": "Rental fee"
},
"Tax2Details": {
"Tax2Amount": 5,
"Tax2Name": "PST"
}
}
Example response:
{
"Id": 42224721
}
Response code: HTTP/1.1 201 Created
Note: Add Tax2Details
only for Canada.
This is how the information that you pass in this API call is displayed in the UI:
Other Countries
For countries other than USA and Canada, create an International Standard Invoice:
POST /invoices
Header | Value |
---|---|
Content-Type | application/json |
Parameter | Parameter type | Example value |
---|---|---|
request | Body | See below |
POST https://sb2api.servicechannel.com/v3/invoices HTTP/1.1
Authorization: Bearer {access_token}
Content-Type: application/json
{
"InvoiceNumber": "inv11111115",
"WoIdentifier": "88708118",
"InvoiceTax": 131.025,
"InvoiceTotal": 791.025,
"InvoiceText": "Cut grass, cleared weeds in flower bed and trimmed shrubs",
"InvoiceAmountsDetails": {
"LaborAmount": 100,
"MaterialAmount": 300,
"TravelAmount": 200,
"FreightAmount": 50,
"OtherAmount": 10,
"OtherDescription": "Rental fee"
},
"InvoiceTaxesDetails": {
"LaborTax": 20,
"MaterialTax": 30,
"TravelTax": 40,
"FreightTax": 30,
"OtherTax": 11.025
},
"Labors": [
{
"LaborType": "1",
"NumOfTech": "1",
"HourlyRate": 10,
"Hours": 10,
"Amount": 100
}
]
}
Example response:
{
"Id": 42224722
}
Response code: HTTP/1.1 201 Created
When a subscriber or provider views the created invoice in the UI, they see the following information: