InvoiceWarrantyDetail
The InvoiceWarrantyDetail object represents the model associated with an extended warranty in an invoice.
POST /invoicing/invoice/warranty/add
This endpoint adds an extended warranty product to an open invoice. Extended warranties can’t be added to EPASS without an existing open invoice to add them to.
The following Invoice conditions must be satisfied in order to add any InvoiceWarranty record.
| Condition | Value |
|---|---|
| Invoice Status | Invoice Status must be Open or Committed. |
| Branch Code | Must be a valid Branch Code. If not provided it will use the branch supplied during the login process, and if that is empty it uses the constant value DEFAULT. |
| Invoice JobStatus | Any Job Status cascading that is configured in EPASS will be enforced through the API. |
| Bill To Customer | BillToCustomer must be allowed to charge if the invoice is not estimate and the payment type is AR. Credit Limits will be enforced in the following situation: - The invoice is not an estimate - Credit Limit is enabled for the Customer - The Invoice Payment Type is AR - Require Credit Approval is disabled - Either the Job Status is dispatchable or Dispatching is disabled completely |
The following fields are the absolute minimum fields that should be required to create an invoice.
| Field | Type | Value |
|---|---|---|
InvoiceCode |
string | Must be a valid Invoice Code. |
Qty |
integer | If not provided, default to 1. |
extWarrantyCode |
string | Must be a valid Code that is not Obsolete. |
UserCreated |
string | Must be a valid User Code that is not Obsolete. If not provided it will use the Login User. |
extWarrantyCode
If a valid extWarrrantyCode is provided then the following values will be defaulted from the extWarranty. You can override any of the values that would come from the extWarranty simply by providing your own value.
| Key | Value |
|---|---|
extWarrantyDesc |
ExtWarranty-> Description |
GLRevenue |
ExtWarranty-> GLRevenue |
GLCostCr |
ExtWarranty-> GLCostCr |
GLCostDb |
ExtWarranty-> GLCostDb |
Tax1 |
ExtWarranty-> Tax1 |
Tax2 |
ExtWarrantyisc -> Tax2 |
Tax3 |
ExtWarranty-> Tax3 |
Commission |
ExtWarranty-> Commission |
UnitCost |
ExtWarranty-> Cost |
StartDate |
Use the schedule date or the finish date of the invoice whichever is later, and if both are empty, use today’s date. |
EndDate |
StartDate + ExtWarrantyisc -> NoOfMonths |
These fields may be required depending on your EPASS configuration, or there is unique behavior that needs to be mentioned.
| Field | Type | Value |
|---|---|---|
SellingPrice |
integer | If the extWarranty option Do Not Allow Price Reduction is True and the BillTo customer has a valid project code, then the SellingPrice cannot be less than the project price.If the ExtWarranty option Do Not Allow Price Change is True and the BillTo customer has a valid project code, then the SellingPrice must be the project price.If the ExtWarranty option Do Not Allow Price Reduction is True, then the SellingPrice cannot be less than the list price.If the ExtWarranty option Do Not Allow Price Change is True, then the SellingPrice must be the list price. |
addRelatedLines
The adding of related detail lines can be controlled using the addRelatedLines object. If not provided then no related detail lines will be added.
| Key | Value | Description |
|---|---|---|
Comment |
Boolean | Determines if related Comment lines are added |
These fields are optional and not required in the payload.
| Field | Type | Description |
|---|---|---|
checkException |
Boolean | This is the Allow Models not on Invoice setting in EPASS. This setting allows you to link the warranty to any available model in the database, not just the models that are currently on the invoice. Unless set to FALSE in the request, this field is always set to True. |
POST /invoicing/invoice/warranty/add
{
"orgModSelPrice": null,
"userVerified": null,
"dateVerified": null,
"timeVerified": null,
"commissionCode": null,
"branchCode": null,
"checkException": null,
"commission": null,
"contractNumber": "",
"endDate": null,
"extWarrantyCode": "6387",
"extWarrantyDesc": "4Yr Elec Ext Wty 800 to 999.993",
"invoiceCode": "S03724659",
"sellingPrice": 432,
"startDate": null,
"tax1": null,
"tax2": null,
"tax3": null,
"unitCost": null,
"InvoiceWarrantyDetail": [
{
"model": "HAFCU1"
}
]
} {
"success": true,
"warning": false,
"httpStatusCode": 201,
"generalMessage": null,
"exceptionMessage": null,
"keys": [
{
"table": "InvoiceWarranty",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 12345
}
]
}
]
},
{
"table": "InvoiceAddress",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 12345
}
]
}
]
},
{
"table": "InvoiceAudit",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 123456
}
]
}
]
}
],
"messages": [],
"warnings": []
}{
"success": false,
"message": "One or more of the fields has an invalid or missing value.",
"lastException": null,
"recordId": 0,
"code": null,
"httpStatusCode": 422,
"messageDetails": [
"WarrantyCode does not exist."
]
}The InvoiceWarrantyDetail object represents the model associated with an extended warranty in an invoice.
Was this page helpful?
Thank you! Have additional feedback? We would love to hear from you!
Sorry to hear that. Please tell us how we can improve.