InvoicePackage

The InvoicePackage object contains details of a ‘“package”’ (a collection of models, items, warranties, or charges sold at a single price).

Add a Package to an Invoice

POST /v1/invoicing/invoice/package/add

This endpoint adds a package to an existing invoice. Packages can’t be added to ePASS without an existing invoice to add them to.

Invoice Conditions

The following Invoice conditions must be satisfied to add an InvoicePackage record.

Condition Value
Invoice Status Invoice Status must be Open or Committed.
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

Required Fields

The following fields are the absolute minimum fields that should be required to add a package to an invoice.

Field Value
InvoiceCode Must be a valid Invoice Code.
Qty If not provide, default to 1.
PackageCode Must be a valid Package Code.
UserCreated Must be a valid User Code that is not Obsolete. If not provided it will use the Login User.

PackageCode

If a valid PackageCode is provided then the following values will be defaulted from the Package. You can override any of the values that would come from the simply by providing your own value.

Key Value
PackageDes Package -> Description
Tax1Included Package -> Tax1Included
Tax2Included Package -> Tax2Included
Tax3Included Package -> Tax3Included
Tax1 Package -> Tax1
Tax2 Package -> Tax2
Tax3 Package -> Tax3

Potentially Required Fields

These fields may be required depending on your ePASS configuration, or there is unique behavior that needs to be mentioned.

Fields Value
Amount Must be greater than zero. If the Package has a valid sale price, then the Selling Price cannot be less than the sale price.

Sample: Add a Package to an Invoice

 {
    "tripNo": 1,
    "qty": 2,
    "amount": 75,
    "invoiceCode":"S03253934",
    "packageCode": "ECO SMART PACK2",
    "packageDesc": null,
    "status": null,
    "tax1": null,
    "tax1Included": null,
    "tax2": null,
    "tax2Included": null,
    "tax3": null,
    "tax3Included": null,
    "userCreated": "03030",
    "userModified": null,
    "locationcode": "190"
}

{
    "success": true,
    "message": null,
    "lastException": null,
    "recordId": 1745,
    "code": null,
    "httpStatusCode": 201,
    "messageDetails": []
}

{
    "success": false,
    "warning": false,
    "httpStatusCode": 422,
    "generalMessage": "One or more of the fields has an invalid or missing value.",
    "exceptionMessage": null,
    "keys": [],
    "messages": [
        {
            "code": "INV-010008",
            "message": "Packages are not allowed on Finished Invoices."
        }
    ],
    "warnings": []
}