AP Invoice Entry, Create
Creates a new AP Invoice Entry transaction using the supplied data and returns the details of the transaction.
URL
/api/ap-invoice-entry-create
Request Method
POST
Expandable Program
AP Invoice/Memo Entry (APTIE)
Required Fields
HEADER:
INVOICE_TYPE (must be IP, IN, CP or CN)
PO_ID (when INVOICE_TYPE is IP or CP)
PAY_TO_VENDOR (when INVOICE_TYPE is IN or CN)
INVOICE_ID
INVOICE_DATE
INVOICE_AMT
AUTH_TOKEN
LINES:
LINE_NUMBER (when INVOICE_TYPE is IP or CP and referring to a PO Line)
QUANTITY (when INVOICE_TYPE is IP or CP and referring to a PO Line)
AMOUNT
INVOICE_TYPE (must be IP, IN, CP or CN)
PO_ID (when INVOICE_TYPE is IP or CP)
PAY_TO_VENDOR (when INVOICE_TYPE is IN or CN)
INVOICE_ID
INVOICE_DATE
INVOICE_AMT
AUTH_TOKEN
LINES:
LINE_NUMBER (when INVOICE_TYPE is IP or CP and referring to a PO Line)
QUANTITY (when INVOICE_TYPE is IP or CP and referring to a PO Line)
AMOUNT
Auth Token
This API call requires an Authentication Token ("Auth Token") for the required field AUTH_TOKEN. Auth Tokens are obtained from Auth Token, Get.
Example Request JSON
{
"INVOICE_TYPE": "IP",
"PO_ID": "100443",
"INVOICE_ID": "00007324",
"INVOICE_DATE": "2021-08-06",
"INVOICE_AMT": "968.49",
"REFERENCE": "Production",
"LINES": [
{
"LINE_NUMBER": "1",
"QUANTITY": "100",
"AMOUNT": "795.00"
},
{
"LINE_NUMBER": "2",
"QUANTITY": "8",
"AMOUNT": "59.92"
},
{
"COMPANY_ID": "00",
"DEPARTMENT": "0",
"ACCOUNT": "130",
"AMOUNT": "23.98"
}
],
"AUTH_TOKEN": ""
}
{
"INVOICE_TYPE": "IN",
"PAY_TO_VENDOR": "XYZCORP",
"INVOICE_ID": "00007323",
"INVOICE_DATE": "2014-09-01",
"INVOICE_AMT": "993.46",
"REFERENCE": "Vendor Expense",
"LINES": [
{
"COMPANY_ID": "00",
"DEPARTMENT": "0",
"ACCOUNT": "100",
"AMOUNT": "742.80"
},
{
"COMPANY_ID": "00",
"DEPARTMENT": "0",
"ACCOUNT": "130",
"AMOUNT": "158.76"
}
],
"AUTH_TOKEN": ""
}
Full Request JSON
{
"AP_COMPANY_ID": "",
"GL_MONTH": "",
"GL_YEAR": "",
"ACTION_DATE": "",
"INVOICE_TYPE": "",
"BATCH_NUMBER": "",
"PO_ID": "",
"PAY_TO_VENDOR": "",
"EXCLUDE_1099": "",
"INVOICE_ID": "",
"INVOICE_DATE": "",
"INVOICE_AMT": "",
"INV_PREV_PER": "",
"FREIGHT_CODE": "",
"INVOICE_FRT_AMT": "",
"TAX_CODE": "",
"INVOICE_TAX_AMT": "",
"INVOICE_TAX_2": "",
"INVOICE_TAX_3": "",
"INVOICE_TAX_4": "",
"INVOICE_TAX_5": "",
"INVOICE_TAX_6": "",
"INVOICE_TAX_7": "",
"INVOICE_TAX_8": "",
"INVOICE_TAX_9": "",
"INVOICE_TAX_10": "",
"VAT_CODE": "",
"INVOICE_VAT": "",
"TERMS_CODE": "",
"DISCOUNT_PCT": "",
"DISCOUNT_AMT": "",
"DISCOUNT_DATE": "",
"DUE_DATE": "",
"PAY_CODE": "",
"BANK_CODE": "",
"REFERENCE": "",
"CURR_RATE": "",
"APFVO_USER_1": "",
"APFVO_USER_2": "",
"APFVO_USER_3": "",
"APFVO_USER_4": "",
"APFVO_USER_5": "",
"LINES": [
{
"LINE_NUMBER": "",
"QUANTITY": "",
"COMPANY_ID": "",
"DEPARTMENT": "",
"ACCOUNT": "",
"AMOUNT": "",
"JOB_ID": "",
"OPER_CODE": "",
"REFERENCE": "",
"APFVT_USER_1": "",
"APFVT_USER_2": "",
"APFVT_USER_3": "",
"APFVT_USER_4": "",
"APFVT_USER_5": ""
}
],
"AUTH_TOKEN": ""
}
Batch Numbers
This transaction uses Batch Numbers.
Batch Numbers are specified in the BATCH_NUMBER field.
Normally a new Batch Number is assigned automatically by the transaction every time it is called and this Batch Number is returned by the transaction.
It is also possible use the same Batch Number across multiple transactions. This is done by passing the Batch Number that is returned from the first call into subsequent calls. This has the advantage of relating multiple transactions to each other, and consuming less Batch Numbers in the system. The scope of what constitutes a "Batch" is up to the API client application developer. In Expandable, the scope of a "Batch" is considered to include all transactions entered by a single operator before closing the transaction window.
It is also possible use the same Batch Number across multiple transactions. This is done by passing the Batch Number that is returned from the first call into subsequent calls. This has the advantage of relating multiple transactions to each other, and consuming less Batch Numbers in the system. The scope of what constitutes a "Batch" is up to the API client application developer. In Expandable, the scope of a "Batch" is considered to include all transactions entered by a single operator before closing the transaction window.
Success Response
Returned HTTP status indicates success:
200/OK
Returned JSON contains the details of the successful transaction:
200/OK
Returned JSON contains the details of the successful transaction:
{
"VOUCHER_ID": "",
"VENDOR_ID": "",
"INVOICE_ID": "",
"INVOICE_TYPE": "",
"INVOICE_DATE": "",
"REFERENCE": "",
"PO_ID": "",
"PO_TYPE": "",
"PO_VENDOR": "",
"BUYER_ID": "",
"FREIGHT_CODE": "",
"TAX_CODE": "",
"VAT_CODE": "",
"INVOICE_AMT": "",
"INVOICE_FRT_AMT": "",
"INVOICE_TAX_AMT": "",
"INVOICE_TAX_2": "",
"INVOICE_TAX_3": "",
"INVOICE_TAX_4": "",
"INVOICE_TAX_5": "",
"INVOICE_TAX_6": "",
"INVOICE_TAX_7": "",
"INVOICE_TAX_8": "",
"INVOICE_TAX_9": "",
"INVOICE_TAX_10": "",
"INVOICE_VAT": "",
"BANK_CODE": "",
"PAYMENT_TYPE": "",
"TERMS_CODE": "",
"DISCOUNT_AMT": "",
"DISCOUNT_DATE": "",
"DUE_DATE": "",
"ORDER_DISC_PCT": "",
"NEXT_PAY_DATE": "",
"NEXT_PAY_AMT": "",
"NEXT_PAY_DISC": "",
"PAY_CODE": "",
"LAST_CHECK_NO": "",
"DATE_LAST_CHECK": "",
"TOTAL_AMT_PAID": "",
"TOTAL_DISC_USED": "",
"TOTAL_DISC_LOST": "",
"CURRENT_BALANCE": "",
"INVOICE_STATUS": "",
"CURR_CODE": "",
"CURR_RATE": "",
"BC_RATE": "",
"INVOICE_LC_AMT": "",
"LC_AMT_PAID": "",
"LC_DISC_USED": "",
"LC_DISC_LOST": "",
"LC_CURRENT_BAL": "",
"GL_YEAR": "",
"GL_MONTH": "",
"EXCLUDE_1099": "",
"APFVO_USER_1": "",
"APFVO_USER_2": "",
"APFVO_USER_3": "",
"APFVO_USER_4": "",
"APFVO_USER_5": "",
"INV_PREV_PER": "",
"PREV_PER_PSTD": "",
"CREATED_BY": "",
"DATE_CREATED": "",
"MODIFIED_BY": "",
"DATE_MODIFIED": "",
"TIME_LAST_UPDT": "",
"DATE_LAST_UPDT": "",
"LINES": [
{
"SEQ_NUMBER": "",
"COMPANY_ID": "",
"DEPARTMENT": "",
"ACCOUNT": "",
"JOB_ID": "",
"OPER_CODE": "",
"GL_YEAR": "",
"GL_MONTH": "",
"ACTION_DATE": "",
"ACTION_TYPE": "",
"BATCH_NUMBER": "",
"REFERENCE": "",
"DIST_TYPE": "",
"VENDOR_ID": "",
"INVOICE_ID": "",
"PO_ID": "",
"LINE_NUMBER": "",
"PART_ID": "",
"PO_UM": "",
"PART_UM": "",
"QUANTITY": "",
"INV_QUANTITY": "",
"AMOUNT": "",
"PROGRAM_ID": "",
"REPORT_FLAG": "",
"GL_FLAG": "",
"COMMENT_9": "",
"CURR_CODE": "",
"CURR_RATE": "",
"FC_AMOUNT": "",
"BC_RATE": "",
"BC_AMOUNT": "",
"APFVT_USER_1": "",
"APFVT_USER_2": "",
"APFVT_USER_3": "",
"APFVT_USER_4": "",
"APFVT_USER_5": "",
"OPERATOR_ID": "",
"CREATED_BY": "",
"DATE_CREATED": "",
"MODIFIED_BY": "",
"DATE_MODIFIED": "",
"TIME_LAST_UPDT": "",
"DATE_LAST_UPDT": ""
}
]
}
Failure Response
Returned HTTP status indicates failure:
400/Request JSON is invalid.
400/Request has no Lines.
400/Request has no INVOICE_TYPE.
400/INVOICE_TYPE must be IP, IN, CP or CN.
401/Auth Token was not provided.
401/Auth Token is malformed.
401/Auth Token login failure.
405/Request method must be POST.
500/(Error Message)
Returned JSON contains error information for the failed transaction:
400/Request JSON is invalid.
400/Request has no Lines.
400/Request has no INVOICE_TYPE.
400/INVOICE_TYPE must be IP, IN, CP or CN.
401/Auth Token was not provided.
401/Auth Token is malformed.
401/Auth Token login failure.
405/Request method must be POST.
500/(Error Message)
Returned JSON contains error information for the failed transaction:
{
"MESSAGE": "",
"MESSAGE_CODE": ""
}
