Index

api/v1/accounts/debtors/addpayment

Path: api/v1/accounts/debtors/addpayment

Method:POST

Summary:Adds a new debtors payment

Description:This call has a fair chance of failing if not submitted via the queue - eg if a user is editing the debtor for which the payment is to be added, this call will fail.

Query Parameters:

QueueOptionalSet to true, 1, or t to queue the request via the Jim2 eBusiness Queue. If specified the response will be 202 Accepted and the B2B request number will be returned.
Leave out, or set to false, 0, or f to process the request immediately.
SubmitRefIdOptionalA unique reference ID for the request. This is used to prevent duplicate requests when the Queue parameter is also passed. If a SubmitRefId is passed via this query parameter and within the request content (see submitRefId in JSON content) then the two values must be the same. A check for duplication due to re-processing on the B2B queue is NOT performed unless the SubmitRefId is included in the request body (ie not passing the SubmitRefId in the message body allows an item on the B2B queue to be reprocessed and potentially creating a duplicate object).
The Queue parameter must also be specified if SubmitRefId is specified.
Note that the SubmitRefId must be unique to Jim2, so if multiple systems are making calls care must be taken to avoid clashes in SubmitRefIds between systems.

Request content:

{
The CardFile Card Code for the debtor
"debtorCardCode":string
The company number. Only relevant for multi company databases.
If ommitted defaults to the debtors company if the debtor cardfile is for a particular company, otherwise defaults to 1 (the database default company).

optional
"companyNo":integer
A valid payment type for debtors per Jim2 setup (ie this sets the Payment By as shown in debtors)
"paymentBy":string
The date the payment was received. If omitted the current date will be used. Must be in ISO date format - eg "2023-01-31"
optional
"paymentDate":string
the account into which funds are to be received, this will be unbanked funds if omitted.
optional
"glaccount":string
The payment amount.
"amount":number
The comment for the payment.
optional
"comment":string
The currency code for the payment. If omitted this is the database home currency is assumed.
optional
"currencyCode":string
The invoices that the payment should be applied to (if any). The payment will be applied to these invoices in order untill the payment amount is used up, or there are no more invoices (in which case any balance will be left on the payment)
optional
"invoices": [integer]
}

Response content:

{
"tranNo":integer
"payNo":integer
}