AP Invoice Batch
This API creates/appends AP Invoice batches in the system.
- This upload only adds invoices to a batch, it does not post any transactions
- It's not possible to edit or delete existing invoices
- Fieldnames are case-sensitive
- Fields are optional unless specified otherwise; optional fields to be included if applicable
User security: (one of the following) Accounts Payable > Processing > Setup/Edit A/P Batches System Administration > Jonas Template Uploads > Accounts Payable > Upload A/P Batch
WebMethod
GJZJ4J– required
Option
- scan – error scan only
- update – create/append an AP Batch
- Template – Get upload template
CompanyCode
- required
APSubledgerCode
- required
errorsFound
- result (read-only)
AP_BatchInvoiceHeader_tbl
| Field | Description |
|---|---|
BatchNumber | • add invoices to a specific batch #; batch is created if it doesn't exist • leave blank to automatically create next batch available o Batch# will be returned |
CreatedDate | DateOfRecord• defaults to current system date • Required if no BatchNumber is specified |
RevisedByLast | UserID;• normally leave blank |
AP_APBatchInvoiceRecord_tbl
| Field | Description |
|---|---|
SupplierCode | required |
InvoiceNumber | 10 chars max (required) |
SupplierInvoice | 30 chars max (optional) |
InvoiceDate | • defaults to CreatedDate from Header• Must be in the same period as the DateOfRecord (unless overrided in the A/P profile setup) |
DateDue | defaults to InvoiceDate |
PurchaseOrderNumber
| Field | Description |
|---|---|
ReferenceNumber | • Reference/Job# field • Must be a valid Job# if specifying SubContractNumber |
SubContractNumber | • only applicable if a Job# is filled in ReferenceNumber (optional) |
PurchaseAmount | |
SalesTaxAmount | |
DiscountEarned | |
HoldbackAmount | |
FederalTax | |
FreightAmount | |
AmountToPay | normally omit this for the system to calculate |
PurchaseCategoryCode | depends on A/P Profile setup |
TermsCode | |
CCSupplier | Payment Account (optional) |
CCTransactionNumber | Payment Account memo |
CCInvoiceDueDate | Payment Account Due Date |
CCInvoicePurchaseCategory | Payment Account Purchase Category; depends on A/P Profile setting |
OriginID | internal use only (leave blank), included here for completeness only |
AP_StickyNotesHeader_tbl (optional)
| Field | Description |
|---|---|
ActionDate | optional |
Notes | Up to 3000 chars |
InvoiceAttachment (optional) attach scanned invoice to the Invoice—to be saved in JonasDocuments
| Field | Description |
|---|---|
name | filename |
content | base64 encoded file (up to 10MB) |
AP_GLDistributionRecord_tbl (required)
| Field | Description |
|---|---|
DistributionType | RequiredG/L | J/C | W/O | E/Q |
CompanyCode3 | Required Distribution/Allocation Company Code |
GLJobNumberWOEquipment | Required Distribution/Allocation #1 (according to DistributionType)• G/L – AccountNumber • J/C – JobNumber • W/O – WorkOrderNumber • E/Q – Equipment code |
DepartmentDivisionCostItemCompany | Required Distribution/Allocation #2 (according to DistributionType)• G/L – Department/Division • J/C – CostItem • W/O – CostType* • E/Q – CostType* |
SubAccountCostType | Required* Distribution/Allocation #3 (according to DistributionType)• G/L – SubAccount • J/C – CostType • W/O – N/A • E/Q – ComponentCode (*optional; depends on E/Q Profile) |
Reference | |
Description | |
Amount | Required |
Units | |
TempSpaces | – Required for PO Invoices internal P.O. LineNumber reference (not ItemNumber) |
template
{
"WebMethod":"GJZJ4J",
"Option":"template",
"CompanyCode":"",
"APSubledgerCode":"",
"AP_BatchInvoiceHeader_tbl":[{
"BatchNumber":"",
"CreatedDate":"1970-01-01T00:00:00Z",
"RevisedByLast":"",
"AP_APBatchInvoiceRecord_tbl":[{
"SupplierCode":"",
"InvoiceNumber":"",
"SupplierInvoice":"",
"InvoiceDate":"1970-01-01T00:00:00Z",
"DateDue":"1970-01-01T00:00:00Z",
"PurchaseOrderNumber":"",
"ReferenceNumber":"",
"SubContractNumber":"",
"PurchaseAmount":0,
"SalesTaxAmount":0,
"DiscountEarned":0,
"HoldbackAmount":0,
"FederalTax":0,
"FreightAmount":0,
"AmountToPay":0,
"PurchaseCategoryCode":"",
"TermsCode":"",
"CCSupplier":"",
"CCTransactionNumber":"",
"CCInvoiceDueDate":"1970-01-01T00:00:00Z",
"CCInvoicePurchaseCategory":"",
"OriginID":"",
"AP_StickyNotesHeader_tbl": {
"ActionDate": "1970-01-01T00:00:00Z",
"Notes": ""
},
"InvoiceAttachment":{
"name":"",
"content":""
},
"AP_GLDistributionRecord_tbl":[{
"DistributionType":"G/L",
"CompanyCode3":"",
"GLJobNumberWOEquipment":"",
"DepartmentDivisionCostItemCompany":"",
"SubAccountCostType":"",
"Reference":"",
"Description":"",
"Amount":0,
"Units":0,
"TempSpaces":""
}]
}]
}]
}example
{
"WebMethod":"GJZJ4J",
"Option":"update",
"CompanyCode":"ZX",
"APSubledgerCode":"AP ",
"AP_BatchInvoiceHeader_tbl":[
{
"BatchNumber":"00019",
"AP_APBatchInvoiceRecord_tbl":[
{
"SupplierCode":"9806",
"InvoiceNumber":"CON24661B",
"InvoiceDate":"2017-08-11T00:00:00Z",
"PurchaseOrderNumber":"096809",
"DateDue":"2017-09-07T00:00:00Z",
"PurchaseAmount":75.00,
"PurchaseCategoryCode":"PURCH",
"TermsCode":"",
"InvoiceAttachment":{
"name":"InvoiceCON24661.pdf",
"content":"JVBERi0xLjQNCjEgMCBvYmoNCjw8DQov...(base64 encoded file)"
},
"AP_GLDistributionRecord_tbl":[
{
"CompanyCode3":"ZX",
"GLJobNumberWOEquipment":"3157C",
"DepartmentDivisionCostItemCompany":"000110",
"SubAccountCostType":"T",
"Reference":"Rick",
"Description":"9806 9.4.17 Report",
"Amount":75.00,
"DistributionType":"J/C",
"Units":1.00,
"TempSpaces":"01"
}
]
}
]
}
]
}