Create AP Voucher Control

POST {{base_url}}/DataEntry/apControl

NOTE: This applies if you have the Use Files to Group Transactions option set to Yes in Settings » Accounting » Transactions.

Use this endpoint to create a batch for a set of AP vouchers.

Request Body

{"Batch"=>"APIBatch00001", "Description"=>"AP Voucher API Test 1", "Recurring"=>"N", "EndDate"=>"2017-12-31T00:00:00.000", "DefaultCurrencyCode"=>"USD", "Total"=>0, "DefaultLiab"=>"Aconsultan", "DefaultBank"=>"ABOSTON", "DefaultDate"=>"2017-12-11T00:00:00.000", "Selected"=>"N", "Posted"=>"N", "Creator"=>"ADMIN", "Period"=>0, "Company"=>"A0", "apControlDefaultTaxCodes"=>[{"TaxCode"=>"AGS", "Batch"=>"APIBatch00001", "Seq"=>1}, {"TaxCode"=>"NY_TAX", "Batch"=>"APIBatch00001", "Seq"=>2}, {"TaxCode"=>"AMA", "Batch"=>"APIBatch00001", "Seq"=>3}], "apMaster"=>[{"Batch"=>"APIBatch00001", "MasterPKey"=>"551A9F01962E4BB1B4ACF97B4019308C", "Vendor"=>"AGRANDVE.ND", "InvoiceDate"=>"2017-11-22T00:00:00.000", "Invoice"=>"InvTest1", "TransDate"=>"2014-01-22T00:00:00.000", "LiabCode"=>"ARLENE-COD", "BankCode"=>"AATEST", "PayTerms"=>"Next", "PayDate"=>"", "Address"=>"<Default>", "Posted"=>"N", "Seq"=>1, "Voucher"=>"VOUC0001", "CurrencyCode"=>"USD", "CurrencyExchangeOverrideMethod"=>"N", "CurrencyExchangeOverrideDate"=>"", "CurrencyExchangeOverrideRate"=>0, "PaymentExchangeOverrideMethod"=>"N", "PaymentExchangeOverrideDate"=>"", "PaymentExchangeOverrideRate"=>0, "Status"=>"A", "AuthorizedBy"=>"0000A0001", "RejectReason"=>"", "ModUser"=>"ADMIN", "ModDate"=>"2014-01-22T17:44:35.910", "PaymentCurrencyCode"=>"USD", "Diary"=>"IC", "DiaryNo"=>0, "AllowAssetEntries"=>"N"}], "apDetail"=>[{"Batch"=>"APIBatch00001", "MasterPKey"=>"551A9F01962E4BB1B4ACF97B4019308C", "PKey"=>"PAUL1120745868345", "Seq"=>1, "Description"=>"", "WBS1"=>"0B199900.900", "WBS2"=>"B000", "WBS3"=>" ", "Account"=>"52300", "Amount"=>1275, "SuppressBill"=>"N", "NetAmount"=>1200, "CurrencyExchangeOverrideRate"=>0, "PONumber"=>"", "PaymentAmount"=>1275, "PaymentExchangeInfo"=>"", "ExpenseCode"=>"", "OriginatingVendor"=>"", "CreateAsset"=>"N", "AssetType"=>"", "Item"=>"", "EquipmentID"=>""}, {"Batch"=>"APIBatch00001", "MasterPKey"=>"551A9F01962E4BB1B4ACF97B4019308C", "PKey"=>"PAUL1120745905088", "Seq"=>2, "Description"=>"", "WBS1"=>"0B199800.100", "WBS2"=>" ", "WBS3"=>" ", "Account"=>"52500", "Amount"=>12000, "SuppressBill"=>"N", "NetAmount"=>12000, "CurrencyExchangeOverrideRate"=>10, "PONumber"=>"", "PaymentAmount"=>12000, "PaymentExchangeInfo"=>"", "ExpenseCode"=>"", "OriginatingVendor"=>"", "CreateAsset"=>"N", "AssetType"=>"", "Item"=>"", "EquipmentID"=>""}], "apDetailTax"=>[{"Batch"=>"APIBatch00001", "MasterPKey"=>"551A9F01962E4BB1B4ACF97B4019308C", "PKey"=>"PAUL1120745868345", "TaxCode"=>"NY_TAX", "Seq"=>1, "TaxAmount"=>25, "CompoundOnTaxCode"=>""}, {"Batch"=>"APIBatch00001", "MasterPKey"=>"551A9F01962E4BB1B4ACF97B4019308C", "PKey"=>"PAUL1120745868345", "TaxCode"=>"AGS", "Seq"=>2, "TaxAmount"=>50, "CompoundOnTaxCode"=>""}]}

HEADERS

KeyDatatypeRequiredDescription
Content-TypestringRequired.

The type of content supported by the API endpoint. | | Authorization | string | | Required.

The type of authorization supported by the API endpoint. |

RESPONSES

status: Created

[{&quot;Batch&quot;:&quot;APIBatch00001&quot;,&quot;Description&quot;:&quot;AP Voucher API Test 1&quot;,&quot;Recurring&quot;:&quot;N&quot;,&quot;EndDate&quot;:&quot;2017-12-31T00:00:00.000&quot;,&quot;DefaultCurrencyCode&quot;:&quot;USD&quot;,&quot;Total&quot;:0,&quot;SumTotal&quot;:13275,&quot;DiffTotal&quot;:-13275,&quot;DefaultLiab&quot;:&quot;Aconsultan&quot;,&quot;DefaultLiabDescription&quot;:&quot;AP - Consultant&quot;,&quot;DefaultBank&quot;:&quot;ABOSTON&quot;,&quot;DefaultBankDescription&quot;:&quot;Baybank - Boston&quot;,&quot;DefaultDate&quot;:&quot;2017-12-11T00:00:00.000&quot;,&quot;Selected&quot;:&quot;N&quot;,&quot;Posted&quot;:&quot;N&quot;,&quot;Creator&quot;:&quot;ADMIN&quot;,&quot;Period&quot;:0,&quot;Company&quot;:&quot;A0&quot;,&quot;LiabAccountCurrencyCode&quot;:&quot;USD&quot;,&quot;BankAccountCurrencyCode&quot;:&quot;USD&quot;}]