Invoice
Categories:
The Invoice Object
ViewCreate an Invoice Header
POST /invoicing/invoice/add
This endpoint creates an invoice header. You need to create the invoice header first before you can add items to the invoice, such as a model or payment.
Tip
When creating the invoice header, you can send a single-transaction request and add additional objects to the invoice at the same time (such as a model or payment).Payload
Required Fields
The following are the absolute minimum fields required to create an invoice header.
Field | Type | Description |
---|---|---|
BillToCode |
string | Must be a valid Customer Code.Do Not Service must not be True for the customer.If Financed is True the customer must be a Finance Company. If the Payment option AR is true, then the BillTo Customer must allow charge. |
Code |
string | If not provided it will generated a Code using either the Invoice Type number or system numbering series. |
InvTypeCode |
string | Must be a valid Invoice Type Code that is not Obsolete. |
PaymentTypeCode |
string | Must be a valid Payment Type Code that is not Obsolete. |
SoldToCode |
string | Must be a valid Customer Code. Do Not Service must not be True for the customer. |
Tax2Code |
string | Must be a valid Tax Code. If not provided the Tax Code from the Bill To Customer will be used. Note: Tax2Perentage should be provided as well. If not provided then the Tax Percentage from the Tax Code (either the provided code or from the Customer) will be used. |
UserCreated |
string | Must be a valid User Code that is not Obsolete. If not provided it will use the Login User. |
Potentially Required Fields
These fields may be required depending on your EPASS configuration, or there is unique behavior that needs to be mentioned.
Field | Type | Value |
---|---|---|
BranchCode |
string | 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”. If a valid Invoice Type is provided and the Invoice Type option “Always Use This Branch” is True then the Branch from the Invoice Type will be used. |
Department |
string | This is a required field. If provided then it must be a valid Department for the Invoice Type that was provided. If not provided then the Default Department from the Invoice Type will be used (as long as the Invoice Type Default Department from Terminal is not checked).Otherwise it will be set to ALL . |
DispatchUnits |
integer | If a value is not provided and Dispatching is turned on for the Invoice Type, this value will default from Dispatching Variables - Default Call Units.NoteAccumulate Points For Call Units is not supported/calculated at this time.
|
Field1 |
string | If the Invoice Variables option Field1Mandatory is True, then Field1 is required. |
Field2 |
string | If the Invoice Variables option Field2Mandatory is True, then Field2 is required. |
Field3 |
string | If the Invoice Variables option Field3Mandatory is True, then Field3 is required. |
Field4 |
string | If the Invoice Variables option Field4Mandatory is True, then Field4 is required. |
Field5 |
string | If the Invoice Variables option Field5Mandatory is True, then Field5 is required. |
JobStatusCode |
string | If the Invoice Type option JobStatusRequired is True, then the JobStatusCode field must have a valid value.Must be allowed for the provided Department. Dispatchable Job Statuses are currently not allowed, as Routing is not yet supported. |
MapZoneCode |
string | If the Invoice Type option MapZoneRequired is True, then the MapZoneCode field must have a valid value.Must be allowed for the provided Department. |
Priorities |
array (string) | If the Invoice Type option RequirePriorities is True, then the Priorities field must have at least one valid value. |
Qualifications |
array (string) | If the Invoice Type option RequireQualifications is True, then the Qualifications field must have at least one valid value. |
Reference |
string | If the Invoice Type option RequireReference is True, then the “Reference” field must have a valid value. |
RequestedDate |
string | Format: YYYY-MM-DDThh:mm:ss.sssZ If the Invoice Type options RequestedDateRequired is True and NotShowRequestedDate is False, then the RequestedDate field must have a valid value. |
SaleReferralCode |
string | If the Invoice Type option SaleReferralRequired is True, then the SaleReferralCode field must have a valid value. |
Salesperson1Code |
string | If the Invoice Type option RequireSalesperson is True then it is required.Must be a valid Salesperson Code that is not Obsolete. Must be allowed for the provided Department. |
ScheduleDate and PickUpDate |
string | Format: YYYY-MM-DDThh:mm:ss.sssZ If the Invoice Type option LinkTaxesToDeliveryPickup is True then either ScheduleDate or PickupDate will be required (you are not allowed to provide both dates).If the Invoice Type option ScheduleOrPickupRequired is True then either ScheduleDate or PickupDate will be required.If the Invoice Type option SchedAndPickupDtAllowed is True then you will be allowed to provide both a ScheduleDate and a PickupDate (unless LinkTaxesToDeliveryPickup is also True), otherwise you are only allowed to provide one of these dates. |
ServiceTime |
integer | This is the Units for the invoice multiplied by Minutes Per Unit (from Dispatching variables). Note: If Accumulate Points for Call Units is turned ON it will always return 0. |
ShipViaCode |
string | If the Invoice Type option RequireShipVia is True, then the ShipViaCode field must have a valid value. |
SoldToAddress1 |
string | If the Invoice Type option UseTTRTax is True AND PickUpDate is empty, then SoldToAddress is required. |
SoldToCity |
string | If the Invoice Type option UseTTRTax is True AND PickUpDate is empty, then SoldToCity is required. |
SoldToDirections |
string | If the VarAR option RequireDirections is True, then SoldToDirections is required. |
SoldToEmail |
string | If the VarAR option RequireEmail is True or the Invoice Type option RequireEmailDuringAddInvoice is True, then SoldToEmail is required. |
SoldToState |
string | If the Invoice Type option UseTTRTax is True AND PickUpDate is empty, then SoldToState is required. |
SoldToZipCode |
string | If the Invoice Type option UseTTRTax is True AND PickUpDate is empty, then SoldToZipCode is required. |
SvcBrandCode |
string | If the Invoice Type option RequireServiceBrand is True, then the SvcBrandCode field must have a valid value. |
SvcComplaintDesc |
string | If the Invoice Type option RequireServiceComplaint is True, then the SvcComplaintDesc field must have a value. |
SvcDatePurchased |
string | Format: YYYY-MM-DDThh:mm:ss.sssZ If the Invoice Type option RequireServicePurchaseDate is True then SvcDatePurchased is required. |
SvcDealerCode |
string | If the Invoice Type option RequireServiceDealer is True, then the SvcDealerCode field must have a valid value. |
SvcFollowUpDate |
string | Format: YYYY-MM-DDThh:mm:ss.sssZ If a value is not provide and if the Invoice Type option Enable Follow Up date is True then this will be set to Today + the Default Follow Up Days from the Invoice Type. |
SvcModel |
string | If the Invoice Type option RequireServiceModel is True, then the SvcModel field must have a valid value. |
SvcProduct |
string | If the Invoice Type option RequireServiceProduct is True, then the SvcProduct field must have a valid value. |
SvcSerial |
string | If the Invoice Type option RequireServiceSerial is True, then the SvcSerial field must have a valid value. |
SvcSpecAuthNumber |
string | If SvcBrandCode has RequiresSpecialAuth set to True, SvcSpecAuthNumber is required. |
Table1 |
string | If the Invoice Type option Table1Mandatory is True, then the Table1 field must have at least one valid value. |
Table2 |
string | If the Invoice Type option Table2Mandatory is True, then the Table2 field must have at least one valid value. |
TripChargeCode |
string | If the Invoice Type option RequireTripCharge is True, then the TripChargeCode field must have a valid value. |
Sold to Customer
If a valid SoldToCode is provided then the following values will be defaulted from the Customer. You can override any of the values that would come from the Customer simply by providing your own value, or a “blank” value if you do not want to use the Customer.
Key | Value |
---|---|
PONumber |
Customer -> PONumber ** Unless Customer PO Number has expired. |
SoldToAddress1 |
Customer -> Address1 |
SoldToAddress2 |
Customer -> Address2 |
SoldToBusinessPhone |
Customer -> BusinessPhone |
SoldToBusinessPhoneTextEnabled |
Customer -> BusinessPhoneTextEnabled |
SoldToCity |
Customer -> City |
SoldToDeclineEmail |
Customer -> DeclineEmail |
SoldToDirections |
Customer -> Directions |
SoldToEmail |
Customer -> Email |
SoldToFax |
Customer -> Fax |
SoldToFaxTextEnabled |
Customer -> FaxTextEnabled |
SoldToFirstName |
Customer -> FirstName |
SoldToLastName |
Customer -> LastName |
SoldToLatitude |
Customer -> Latitude |
SoldToLongitude |
Customer -> Longitude |
SoldToPhone1 |
Customer -> Phone1 |
SoldToPhone1TextEnabled |
Customer -> Phone1TextEnabled |
SoldToPhone2 |
Customer -> Phone2 |
SoldToPhone2TextEnabled |
Customer -> Phone2TextEnabled |
SoldToPreferredContact |
Customer -> PreferredContact |
SoldToState |
Customer -> State |
SoldToSuite |
Customer -> Suite |
SoldToZipCode |
Customer -> ZipCode |
updateSoldToCustomerOnFile |
If you would like to update the Customer record with the provided Sold To values then you can specify True for this value. |
BillToCustomer
If a valid BillToCode is provided then the following values will be defaulted from the Customer. You can override any of the values that would come from the Customer simply by providing your own value, or a “blank” value if you do not want to use the Customer.
Key | Value |
---|---|
BillToAddress1 |
Customer -> Address1 |
BillToAddress2 |
Customer -> Address2 |
BillToBusinessPhone |
Customer -> BusinessPhone |
BillToBusinessPhoneTextEnabled |
Customer -> BusinessPhoneTextEnabled |
BillToCity |
Customer -> City |
BillToEmail |
Customer -> Email |
BillToFax |
Customer -> Fax |
BillToFaxTextEnabled |
Customer -> FaxTextEnabled |
BillToFirstName |
Customer -> FirstName |
BillToLastName |
Customer -> LastName |
BillToPhone1 |
Customer -> Phone1 |
BillToPhone1TextEnabled |
Customer -> Phone1TextEnabled |
BillToPhone2 |
Customer -> Phone2 |
BillToPhone2TextEnabled |
Customer -> Phone2TextEnabled |
BillToPreferredContact |
Customer -> PreferredContact |
BillToState |
Customer -> State |
BillToSuite |
Customer -> Suite |
BillToZipCode |
Customer -> ZipCode |
ItemListPriceCode |
Customer -> ItemListPriceCode |
LaborRate |
Customer -> LaborRate |
OtherListPriceCode |
Customer -> OtherListPriceCode |
SerialListPriceCode |
Customer -> SerialListPriceCode |
updateBillToCustomerOnFile |
If you would like to update the Customer record with the provided Bill To values then you can specify True for this value. |
Sample: Adding an Invoice
POST /invoicing/invoice/add {
"shipViaCode": "ABC Delivery",
"billToCode": "11111",
"branchCode": "01",
"invTypeCode": "RE",
"jobStatusCode": "UNCONFIRMED",
"mapZoneCode": "ON",
"saleReferralCode": "Online",
"salesperson1Code": "99999",
"scheduleDate": "2021-11-10",
"soldToCode": "123456",
"tax2Code": "ABC",
"userCreated": "1138",
"updateSoldToCustomerOnFile": false,
"updateBillToCustomerOnFile": false,
"priorities": ["PM", "3MAN"],
"qualifications": ["GS"],
"inFulfillment": true,
"relatedInvoiceCodes": [
{
"relatedInvoiceCode": "123456789",
"relation": "LINKED"
}
]
}
{
"success": true,
"warning": false,
"httpStatusCode": 201,
"generalMessage": null,
"exceptionMessage": null,
"keys": [
{
"table": "Invoice",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 123456
}
]
},
{
"key": "PrimaryKey",
"fields": [
{
"fieldName": "Code",
"fieldValue": " 123456789"
}
]
}
]
},
{
"table": "InvoiceRelations",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 123456
}
]
}
]
}
],
"messages": [],
"warnings": []
}
{
"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-010041",
"message": "SoldToCode is required."
}
],
"warnings": []
}
Search for Invoices
There are three endpoints you can use when searching for an invoice.
Endpoint | Description |
---|---|
/invoicing/invoice/search | Used to create customized searches using a wide-range of search parameters. |
/invoicing/invoice/search/code | Used to search for a single invoice by it’s ID code. |
/invoicing /invoice/search/modified | Used to search for invoices that have been modified within a date range. |
Customized Invoice Search
POST /invoicing/invoice/search/
This endpoint searches and returns an invoice based on one or more search parameters. You can search for an invoice by any of it’s attributes.
Note
See Searching, Paging, and Extended Info for instructions on building search queries.Sample: Searching for an Invoice
POST /invoicing/invoice/search
{
"query": {
"fieldName": "SoldToFirstName",
"eval": "equal",
"value": "Doris"
},
"subquery" : [
{
"logic": "AND",
"query": {
"fieldName": "SoldToLastName",
"eval": "equal",
"value": "Gaby"
}
}
]
}
POST /invoicing/invoice/search
{
"paging": {
"pageSize": 10,
"pageStartId": 0
},
"query": {
"fieldName": "Status",
"eval": "equal",
"value": "Open"
},
"subquery":[
{
"logic": "AND",
"query": {
"fieldName": "MapZoneCode",
"eval": "equal",
"value": "A"
}
}
],
"extendedInfo": {
"Salesperson1": [
"ID",
"Code",
"Description",
"SalesGroup",
"Obsolete",
"BranchCode",
"Email",
"CurrentSales"
],
"Salesperson2": [],
"Branch": [
"ID",
"Code",
"Description"
]
}
}
Search by Code
POST /invoicing/invoice/search/code
This endpoint searches and returns an invoice by it’s unique ID code.
Payload
Name | Type | Description |
---|---|---|
query .invoicecode |
string | The invoice’s unique ID code. |
Sample: Searching by Invoice Code
POST /invoicing/invoice/search/code
{
"query": {
"invoicecode": "5827"
}
}
{
"Results": {
"Success": true,
"Warning": false,
"HttpStatusCode": 200,
"GeneralMessage": "Returned 1 record",
"ExceptionMessage": null,
"Keys": [],
"Messages": [],
"Warnings": []
},
"Paging": {
"PageSize": 100,
"LargestID": 0,
"PagesRemaining": false
},
"Query": {
"InvoiceCode": "5827"
},
"SubQuery": [],
"Invoice": [
{
"Fields": {
"ID": 4015,
"Code": " 5827",
"BillToAddress1": "1233 E. 168TH ST.",
"BillToAddress2": "",
"BillToBusinessPhone": "",
"BillToBusinessPhoneTextEnabled": false,
"BillToCity": "SO. HOLLAND",
"BillToCode": "3390070",
"BillToEmail": "",
"BillToFax": "",
"BillToFaxTextEnabled": false,
"BillToFirstName": "DAVID",
"BillToLastName": "MURPHY",
"BillToPhone1": "339-0070",
"BillToPhone1TextEnabled": false,
"BillToPhone2": "",
"BillToPhone2TextEnabled": true,
"BillToPreferredContact": "",
"BillToState": "IL",
"BillToSuite": "",
"BillToZipCode": "60473",
"BranchCode": "Default",
"CarrierCode": "",
"CommittedPaymentTotal": 0.0,
"CreditApprovedDateStamp": null,
"CreditApprovedTimeStamp": "",
"CreditApprovedUserCode": "",
"CreditStatusCode": "APPROVED",
"DateCreated": "2022-08-18T00:00:00",
"DateFinished": null,
"DateModified": "2022-08-18T00:00:00",
"DatePosted": null,
"Estimate": "Neither",
"Field1": "",
"Field2": "",
"Field3": "",
"Field4": "",
"Field5": "",
"InvoiceTotal": 459.99,
"InvFinishDate": "2022-08-18T00:00:00",
"InvStartDate": "2022-08-18T00:00:00",
"InvTypeCode": "SA",
"ItemTotal": 0.0,
"JobStatusCode": "SCHED",
"LaborTotal": 0.0,
"MapZoneCode": "DELA",
"MiscTotal": 0.0,
"OpenPaymentTotal": 459.99,
"PaymentTypeCode": "COD",
"PickUpDate": "2022-08-19T00:00:00",
"PodiumOptOut": false,
"PONumber": "",
"Reference": "",
"RequestedDate": "2022-08-19T00:00:00",
"SaleReferralCode": "",
"Salesperson1Code": "NF",
"Salesperson2Code": "",
"Salesperson2Percentage": 0.0,
"ScheduleDate": null,
"SerialTotal": 459.99,
"ShipMethod": "Complete Ship",
"ShipViaCode": "",
"SoldToAddress1": "1233 E. 168TH ST.",
"SoldToAddress2": "",
"SoldToBusinessPhone": "",
"SoldToBusinessPhoneTextEnabled": false,
"SoldToCity": "SO. HOLLAND",
"SoldToCityCode": "",
"SoldToCode": "3390070",
"SoldToDeclineEmail": false,
"SoldToDirections": "",
"SoldToEmail": "",
"SoldToFax": "",
"SoldToFaxTextEnabled": false,
"SoldToFirstName": "DAVID",
"SoldToLastName": "MURPHY",
"SoldToLatitude": 0.0,
"SoldToLongitude": 0.0,
"SoldToPhone1": "339-0070",
"SoldToPhone1TextEnabled": false,
"SoldToPhone2": "",
"SoldToPhone2TextEnabled": true,
"SoldToPreferredContact": "",
"SoldToState": "IL",
"SoldToSuite": "",
"SoldToZipCode": "60473",
"Status": "Open",
"Tax1Exempt": "",
"Tax1Total": 0.0,
"Tax2Code": "MAD",
"Tax2Exempt": "",
"Tax2MaxAmount": 88.0,
"Tax2Percentage": 2.75,
"Tax2Total": 0.0,
"Tax3Exempt": "",
"Tax3Percentage": 7.0,
"Tax3Total": 0.0,
"TimeCreated": "10:33",
"TimeFinished": "",
"TimeModified": "10:35",
"TimePosted": "",
"UserCreated": "C",
"UserFinished": "",
"UserModified": "C",
"UserPosted": "",
"WebOrderID": "",
"WtyTotal": 0.0,
"sysCreated": "2022-08-18T10:34:00",
"sysModified": "2022-08-18T10:35:55",
"Financed": false,
"Void": false,
"Qualification": "",
"Priority": "",
"SvcRepairCode1": "",
"SvcRepairCode2": "",
"SvcRepairCode3": "",
"SvcRepairCode4": "",
"ContractCode": "",
"SvcContract": "",
"UpdateHistoryWarranty": false,
"DispatchUnits": 3,
"EDIDateStamp": null,
"EDITimeStamp": "",
"PrintMethod": "Invoice",
"DispatchStartTime": "07:00",
"TripChargeCode": "",
"TripChargeAmount": 0.0,
"Locked": false,
"MobileTechInvoiceCode": "",
"ServiceRequestID": "",
"JobStatusUpdate": false,
"DispatchEmail": false,
"LastDateSaved": null,
"LastTimeSaved": "",
"Terms": "",
"SvcEquipmentNumber": "",
"Department": "DELIVERY",
"EDIMaroline": false,
"SvcCSRInvoice": "",
"SvcSoldList": 0.0,
"SvcSoldSTDCost": 0.0,
"SvcFollowUpDate": "2022-08-20T00:00:00",
"SvcScheduleDate": null,
"EDIWhirlpool": false,
"MinDepositPercent": 50.0,
"UnitModifier": 0,
"TTRTaxCalculated": false,
"PickUpBranchCode": "",
"SignCustmizedFields": "",
"AVBSaleDateSent": null,
"AVBSaleTimeSent": "",
"TTRJurisdictionCode": "",
"COGSPosted": false,
"CallSequence": 0,
"DispatchPriority": "",
"DispatchRequestedRouteCode": "",
"DispatchSpecRequest": "",
"DispatchTime": "00:00",
"DispatchTimeAM": " ",
"ItemListPriceCode": "L1",
"JobLocation": "",
"JobNumber": "",
"LaborRate": "Rate 1",
"MapReference": "",
"OtherListPriceCode": "L1",
"SerialListPriceCode": "L1",
"SvcAgreementExpDate": null,
"SvcAgreementNumber": "",
"SvcBrandCode": "",
"SvcCenter": "",
"SvcCenterNumber": "",
"SvcComplaintCode": "",
"SvcComplaintDesc": "",
"SvcDatePurchased": null,
"SvcDealerCode": "",
"SvcDealerDesc": "",
"SvcDistributorNumber": "",
"SvcInWarranty": "No Warranty",
"SvcMfgCodeEiaNumber": "",
"SvcMicroLeak": "",
"SvcMiles": 0.0,
"SvcMilesRate": 0.0,
"SvcMilesTotal": 0.0,
"SvcModel": "",
"SvcMotorNewNumber": "",
"SvcMotorOldNumber": "",
"SvcPerformedCode": "",
"SvcPerformedDesc": "",
"SvcProduct": "Other",
"SvcProductCode": "",
"SvcRepairCatMinorMajor": "Major",
"SvcRepairCategory": "Home service",
"SvcRepairCode": "",
"SvcRunNumber": "",
"SvcSerial": "",
"SvcSpecAuthNumber": "",
"SvcStockMerchandise": false,
"SvcTimeCompleted1": "",
"SvcTimeCompleted2": "",
"SvcTimeOnJob1": "",
"SvcTimeOnJob2": "",
"SvcTimeStarted1": "",
"SvcTimeStarted2": "",
"Warranty": "Neither",
"WarrantyField1": "",
"WarrantyField2": "",
"WarrantyField3": "",
"WarrantyField4": "",
"WarrantyField5": "",
"InFulfillment": false,
"ServiceTime": 45.0
},
"InvoiceNote": [
{
"Fields": {
"ID": 3369,
"Code": " 5827",
"CreateDate": "2022-08-18T00:00:00",
"CreateTime": "10:34:45",
"Note": "User C Reserved Model:DDE8500RFMWH Serial:674696.",
"SystemGenerated": true,
"UserName": "C",
"sysCreated": "2022-08-18T10:34:45",
"sysModified": null,
"SentToSvcReqProvider": false
}
},
{
"Fields": {
"ID": 3370,
"Code": " 5827",
"CreateDate": "2022-08-18T00:00:00",
"CreateTime": "10:33:55",
"Note": "Edit Dispatching Call - Schedule Date from 8/19/2022 to 00/00/00.PickUp Date from 00/00/00 to 8/19/2022.",
"SystemGenerated": true,
"UserName": "C",
"sysCreated": "2022-08-18T10:35:55",
"sysModified": null,
"SentToSvcReqProvider": false
}
}
],
"InvoiceAddress": [
{
"Fields": {
"ID": 100869,
"InvoiceCode": " 5827",
"DateStamp": "2022-08-18T00:00:00",
"LineTimeStamp": "10:33:13:748",
"Amount": 459.99,
"Code": "C",
"Description": "1234",
"InPackage": "",
"LineNo": 2,
"LineType": "Payment",
"LocationCode": "",
"ParentDateStamp": null,
"ParentLineTimeStamp": "",
"Qty": 0,
"Status": "Open",
"Tax1": false,
"Tax2": false,
"Tax3": false,
"TripNo": 1,
"sysCreated": "2022-08-18T10:35:14",
"sysModified": null
}
},
{
"Fields": {
"ID": 100868,
"InvoiceCode": " 5827",
"DateStamp": "2022-08-18T00:00:00",
"LineTimeStamp": "10:32:32:750",
"Amount": 459.99,
"Code": "DDE8500RFMWH",
"Description": "Extra Large Dryer",
"InPackage": "No",
"LineNo": 1,
"LineType": "Model",
"LocationCode": "AR",
"ParentDateStamp": null,
"ParentLineTimeStamp": "",
"Qty": 1,
"Status": "Committed",
"Tax1": false,
"Tax2": false,
"Tax3": false,
"TripNo": 1,
"sysCreated": "2022-08-18T10:34:33",
"sysModified": "2022-08-18T10:34:34"
}
}
],
"InvoiceMisc": [],
"InvoiceComment": [],
"InvoiceLabor": [],
"InvoiceItem": [],
"InvoiceModel": [
{
"Fields": {
"ID": 4594,
"InvoiceCode": " 5827",
"DateStamp": "2022-08-18T00:00:00",
"LineTimeStamp": "10:32:32:750",
"BranchCode": "Default",
"Color": "",
"DateVerified": null,
"DateCreated": "2022-08-18T00:00:00",
"DateModified": null,
"InPackage": false,
"LocationCode": "AR",
"ModelCode": "DDE8500RFMWH",
"ModelDesc": "Extra Large Dryer",
"POCode": " ",
"PODateStamp": null,
"POLineTimeStamp": "",
"QtyOrdered": 1,
"QtyReserved": 1,
"QtyShipped": 0,
"Reference": "",
"SellingPrice": 459.99,
"Tax1": false,
"Tax2": false,
"Tax3": false,
"TripNo": 1,
"Total": 459.99,
"UserCreated": "C",
"UserModified": "",
"UserVerified": "",
"sysCreated": "2022-08-18T10:34:32",
"sysModified": "2022-08-18T10:34:34",
"TakenStatus": "",
"TakenDate": null,
"AverageCost": 293.0,
"StandardCost": 0.0,
"LastCost": 293.0,
"SpecialOrderDate": null,
"LandedCost": 0.0,
"AutoBackorder": true,
"ManufacturersWarranty": 0,
"ReplacementCost": 3.0,
"TimeVerified": "",
"OriginalCost": 0.0,
"ReserveExclusive": false,
"CommissionCode": "",
"EDIFormat": "",
"FeaturesCode": "",
"Features": "",
"NewUsed": "New",
"Spiff": 0.0,
"Status": "Committed",
"Tax1CostList": "Cost",
"Tax1Included": false,
"Tax1Percentage": 0.0,
"ServiceTime": 0.0,
"Points": 0.0,
"Cube": 0.0
},
"InvoiceSerial": []
}
],
"InvoiceTax": [],
"InvoicePayment": [
{
"Fields": {
"ID": 1496,
"InvoiceCode": " 5827",
"DateStamp": "2022-08-18T00:00:00",
"LineTimeStamp": "10:33:13:748",
"Amount": 459.99,
"BranchCode": "Default",
"TerminalCode": "Default",
"DateCreated": "2022-08-18T00:00:00",
"DateModified": null,
"Description": "1234",
"PaymentTypeCode": "C",
"Status": "Open",
"TripNo": 1,
"UserCreated": "C",
"UserModified": "",
"sysCreated": "2022-08-18T10:35:13",
"sysModified": null,
"AuthCode": "",
"CashedOut": false,
"CashOutUser": "",
"CashOutDateStamp": null,
"CashOutTimeStamp": "",
"BillToLastName": "MURPHY",
"BillToFirstName": "DAVID",
"BillToEmail": "",
"BillToAddress1": "1233 E. 168TH ST.",
"BillToAddress2": "",
"BillToCity": "SO. HOLLAND",
"BillToState": "IL",
"BillToZipCode": "60473",
"BillToPhone1": "339-0070",
"BillToPhone2": "",
"PayerIdentifier": "",
"SPAN": "",
"PayerDataManagedUntilDate": "",
"CardBrand": "",
"EntryMethod": "Form Keyed",
"InvoicePaymentRef": "",
"BillToAddrToUse": 1,
"PayerIdType": "",
"BankTransactionID": "",
"AuthStatus": "",
"BillToCode": "3390070",
"CardNumber": "",
"ExpiryDate": "",
"PostDate": null,
"RespBankText": "",
"RespBatchNo": 0,
"RespDate": "",
"RespItemNo": 0,
"RespRefNo": "",
"RespSettlementAmount": 0.0,
"RespTime": ""
}
}
],
"InvoiceWarranty": [],
"InvoicePackage": [],
"InvoiceTable1": [],
"InvoiceTable2": [],
"DispRoute": []
}
]
}
{
"Results": {
"Success": false,
"Warning": false,
"HttpStatusCode": 0,
"GeneralMessage": null,
"ExceptionMessage": "Error. Empty Invoice Code",
"Keys": [],
"Messages": [],
"Warnings": []
},
"Paging": {
"PageSize": 100,
"LargestID": 0,
"PagesRemaining": false
},
"Query": {
"InvoiceCode": null
},
"SubQuery": [],
"Invoice": []
}
Search for Modified Invoices
POST /invoicing/invoice/search/modified
This endpoint searches and returns invoices that have had any changes made within the specified date range. This includes changes to the invoice header, detail lines, added notes or comments.
Payload
Name | Type | Description |
---|---|---|
query .modifiedStartDateTime query .modifiedEndDateTime |
String | Format: YYYY-MM-DDThh:mm:ss.sssZ The endpoint retrieves invoices that were modified within this date range. |
Sample: Searching for Modified Invoices
POST /invoicing/invoice/search/modified
{
"query": {
"modifiedStartDateTime": "2022-06-22T00:00:00",
"modifiedEndDateTime": "2022-06-24T00:00:00"
}
}
POST /invoicing/invoice/search/modified
{
"paging": {
"pageSize": 2,
"pageStartId": 0
},
"query": {
"invoiceStatus": [],
"invTypeCode": [],
"jobStatusCode": [],
"paymentTypeCode": [],
"saleReferralCode": [],
"modifiedStartDateTime": "2022-06-22T00:00:00",
"modifiedEndDateTime": "2022-06-24T00:00:00"
},
"extendedInfo": {
"Salesperson1": [
"ID",
"Code",
"Description",
"SalesGroup",
"Obsolete",
"BranchCode",
"Email",
"CurrentSales"
],
"Salesperson2": [],
"Branch": [
"ID",
"Code",
"Description"
]
}
}
Change the Schedule Date or Requested Date
POST /invoicing/invoice/edit
This endpoint can reschedules an invoice’s scheduled delivery date, change the requested date, or reset the requested date to a null value.
Invoice Conditions
An invoice must meet this list of conditions before you can change the schedule date or requested date.
Condition | Value |
---|---|
Invoice Status | Invoice must be Open or Commited |
ScheduleDate | A valid schedue date is required. |
Changing the Schedule Date
Note
To change the schedule date on an invoice, the invoice must already have a schedule date. This endpoint won’t add a schedule date to an invoice.Payload
Required Fields
The following are the absolute minimum fields required to reschedule an invoice.
Field | Type | Description |
---|---|---|
InvoiceCode |
string | Must be a valid Invoice Code. |
ScheduleDate |
string | Format: YYYY-MM-DDThh:hh:ss.sssZ The rescheduled delivery date. |
Sample: Rescheduling a Delivery Date
POST /invoicing/invoice/edit
{
"userModified": null,
"invoiceCode": "1234567",
"scheduleDate": "2021-10-18"
}
{
"success": true,
"warning": false,
"httpStatusCode": 201,
"generalMessage": null,
"exceptionMessage": null,
"keys": [
{
"table": "Invoice",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 12345
}
]
}
]
},
{
"table": "InvoiceNote",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 123456
}
]
}
]
}
],
"messages": [],
"warnings": []
}
{
"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-010073",
"message": "You cannot select a Schedule Date that is in the past."
}
],
"warnings": []
}
Change the Requested Date
Payload
Required Fields
The following are the absolute minimum fields required to change the requested date on an invoice.
Field | Type | Description |
---|---|---|
InvoiceCode |
string | Must be a valid Invoice Code. |
RequestedDate |
string | Format: YYYY-MM-DDThh:hh:ss.sssZ The requested delivery date. |
Sample: Changing the Requested Date
POST /invoicing/invoice/edit
{
"userModified": null,
"invoiceCode": "5797",
"RequestedDate": "2022-10-19"
}
{
"Success": true,
"Warning": false,
"HttpStatusCode": 201,
"GeneralMessage": null,
"ExceptionMessage": null,
"Keys": [
{
"Table": "Invoice",
"Keys": [
{
"Key": "ID",
"Fields": [
{
"FieldName": "ID",
"FieldValue": 3643
}
]
}
]
}
],
"Messages": [],
"Warnings": []
}
{
"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-010104",
"Message": "cannot edit a Finished Invoice."
}
],
"Warnings": []
}
Resetting the Requested Date to a Null Value
Sending a request to the endpoint with this payload will reset an invoice’s current requested date to a null value.
Required Fields
The following are the absolute minimum fields required to reset the requested date to a null value.
Field | Type | Description |
---|---|---|
InvoiceCode |
string | Must be a valid Invoice Code. |
RequestedDate |
string | Format: YYYY-MM-DDThh:hh:ss.sssZ The requested delivery date. |
isRequestedDateSet |
boolean | This boolean field needs to be true . |
POST /invoicing/invoice/edit
{
"userModified": null,
"invoiceCode": "5501",
"RequestedDate": null,
"isRequestedDateSet": true
}
{
"Success": true,
"Warning": false,
"HttpStatusCode": 201,
"GeneralMessage": null,
"ExceptionMessage": null,
"Keys": [
{
"Table": "Invoice",
"Keys": [
{
"Key": "ID",
"Fields": [
{
"FieldName": "ID",
"FieldValue": 3643
}
]
}
]
},
{
"Table": "InvoiceNote",
"Keys": [
{
"Key": "ID",
"Fields": [
{
"FieldName": "ID",
"FieldValue": 3418
}
]
}
]
}
],
"Messages": [],
"Warnings": []
}
{
"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-010104",
"Message": "cannot edit a Finished Invoice."
}
],
"Warnings": []
}
Feedback
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.