Start a new topic

Adding a new AP Transaction Record

The Spire API can be used to create new AP Transaction records from data collected in an external application.


A new AP Transaction record can be created by sending a POST request to the Spire AP Transaction API endpoint: 

https://[spire_host_name]:10880/api/v2/companies/[company_name]/ap/transactions


*Note: Replace both spire_host_name and company_name with the appropriate values for your Spire instance.*


When creating a new resource such as a AP Transaction via the API only a minimum amount of information is required. However, most of the fields that are returned for a GET request to the ap/transactions endpoint can be optionally included with this POST request to set the AP Transaction properties as appropriate. 


If any fields in the examples do not make sense or apply in your scenario, please omit them in your request and default values will be applied


If the request is successful the server will return an HTTP response code of 201 with no content. The HTTP Location header of the response will then contain a link to the newly created resource which will contain the resource's id value.


{
    "vendor":{
        "code":"ACME-1"
    },
    "date":"2015-03-30",
    "transType":"I",
    "transNo":"0000000240",
    "referenceNo":"23345565",
    "purchaseNo":"0000700001",
    "debitAmt":"0",
    "creditAmt":"25289.4",
    "termsCode":"",
    "freight":null
}



json
(283 Bytes)
Login or Signup to post a comment