Create (POST) AP Disbursement
Use this API to create an AP disbursement.
To create an AP disbursement:
Execute a POST command on the endpoint
{{url}}/ledger/{{TransType}}, by setting the variable
TransType to CV and specifying the transaction data for that disbursement in the request body.
For example, here is a request submitted using cURL:
curl --request POST \ --url 'https://{{url}}/ledger/CV' \ --header 'authorization: Bearer {{oauth_token}}' \ --header 'content-type: application/json' \ --data '{ "Batch": "PSA-API-CVBatch01", "Recurring": "Y", "Selected": "N", "Posted": "N", "Creator": "ADMIN", "Period": "201305", "EndDate": "2013-05-26T00:00:00.000", "Total": "0", "DefaultLiab": "", "DefaultBank": "", "DefaultDate": "2013-05-26T00:00:00.000", "PostPeriod": "0", "PostSeq": "0", "Company": "0A", "DefaultCurrencyCode": "USD", "cvControlDefaultTaxCodes": [ { "Batch": "PSA-API-CVBatch01", "TaxCode": "Y15", "Seq": "1" }, { "Batch": "PSA-API-CVBatch01", "TaxCode": "AGS", "Seq": "2" }, { "Batch": "PSA-API-CVBatch01", "TaxCode": "AE&", "Seq": "3" }, { "Batch": "PSA-API-CVBatch01", "TaxCode": "PERC10", "Seq": "4" }, { "Batch": "PSA-API-CVBatch01", "TaxCode": "PERC6", "Seq": "5" } ], "cvMaster": [ { "Batch": "PSA-API-CVBatch01", "CheckNo": "000004444111", "TransDate": "2013-05-25T00:00:00.000", "Vendor": "A0000002.01", "InvoiceDate": "2013-05-25T00:00:00.000", "Invoice": "ABC", "BankCode": "ABOSTON", "Address": "Default", "Posted": "N", "LiabCode": "", "Seq": "2", "Voucher": "00000000TEST", "BarCode": "", "CurrencyExchangeOverrideMethod": "N", "CurrencyExchangeOverrideDate": "2013-05-25T00:00:00.000", "CurrencyExchangeOverrideRate": "0", "CurrencyCode": "USD" } ], "cvDetail": [ { "Batch": "PSA-API-CVBatch01", "CheckNo": "000004444111", "PKey": "PSAAPIPKey1", "Seq": "1", "Description": "Description 1", "WBS1": "0A900000.US0", "WBS2": "A000", "WBS3": "", "Account": "51200", "Amount": "560.00", "SuppressBill": "N", "NetAmount": "500.0", "CurrencyExchangeOverrideRate": "0", "PaymentAmount": "560.00", "ExpenseCode": "", "OriginatingVendor": "" }, { "Batch": "PSA-API-CVBatch01", "CheckNo": "000004444111", "PKey": "PSAAPIPKey2", "Seq": "2", "Description": "Description 2", "WBS1": "0A199900.400", "WBS2": "", "WBS3": "", "Account": "52311", "Amount": "1300.12", "SuppressBill": "N", "NetAmount": "1000.0", "CurrencyExchangeOverrideRate": "0", "PaymentAmount": "1300.12", "ExpenseCode": "", "OriginatingVendor": "" } ], "cvDetailTax": [ { "Batch": "PSA-API-CVBatch01", "CheckNo": "000004444111", "PKey": "PSAAPIPKey1", "TaxCode": "LOW3HIGH12", "TaxAmount": "15", "CompoundOnTaxCode": "", "Seq": "1" }, { "Batch": "PSA-API-CVBatch01", "CheckNo": "000004444111", "PKey": "PSAAPIPKey1", "TaxCode": "Y15", "TaxAmount": "15", "CompoundOnTaxCode": "Y11", "Seq": "2" }, { "Batch": "PSA-API-CVBatch01", "CheckNo": "000004444111", "PKey": "PSAAPIPKey1", "TaxCode": "AGS", "TaxAmount": "30", "CompoundOnTaxCode": "AHI", "Seq": "3" }, { "Batch": "PSA-API-CVBatch01", "CheckNo": "000004444111", "PKey": "PSAAPIPKey2", "TaxCode": "Y15", "TaxAmount": "25", "CompoundOnTaxCode": "Y11", "Seq": "1" }, { "Batch": "PSA-API-CVBatch01", "CheckNo": "000004444111", "PKey": "PSAAPIPKey2", "TaxCode": "AE&", "TaxAmount": "75", "CompoundOnTaxCode": "AGS", "Seq": "2" }, { "Batch": "PSA-API-CVBatch01", "CheckNo": "000004444111", "PKey": "PSAAPIPKey2", "TaxCode": "LOW4HIGH11", "TaxAmount": "100", "CompoundOnTaxCode": "", "Seq": "3" }, { "Batch": "PSA-API-CVBatch01", "CheckNo": "000004444111", "PKey": "PSAAPIPKey2", "TaxCode": "Y11", "TaxAmount": "100.12", "CompoundOnTaxCode": "NY_TAX", "Seq": "4" } ] }'
A successful POST returns the JSON representation of the newly created disbursement.