Matt Bradley
-
Posts
37 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Events
Articles
Downloads
Gallery
Posts posted by Matt Bradley
-
-
When I send the the following to create a ledger account:
{ ledger_account_type_id: 'expenses' , included_in_chart: true , name: 'Example' , display_name: 'Example' , nominal_code: '20001' }
or
{ ledger_account_type_id: 'other_purchases' , included_in_chart: true , name: 'Example' , display_name: 'Example' , nominal_code: '20001' }
The API give the following error:
"Couldn't find record."
Whereas, if I send:
{ ledger_account_type_id: 'sales' , included_in_chart: true , name: 'Example' , display_name: 'Example' , nominal_code: '20001' }
This creates a new ledger account.
Obviously, the problem is with the ledger_account_type_id, but the error is rather cryptic. Any suggestions welcome!
-
Thanks Mark!
I suspected this was the case. I as expecting to see a node for cheque entity ids in the API spec, and was surprised when there didn't appear to be one. -
-
Thanks Mark. What's the meaning of cheque_amount if it cannot be different to cash_amount per the above, please? I had assumed that the two different fields would mean that I could transfer an amount of cash and an amount of cheques (which would imply they could be different values).
Our use case is:
- Our client takes cash and cheques at the counter to settle invoices
- We would then record these via the API as a customer_payment to the CASH_IN_HAND account
- The client then carries out a separate "lodgement" operation, whereby they deposit the cash and cheques with the bank.
- We would record this lodgement as a bank_deposit to from CASH_IN_HAND to the CHECKING account.
So: for example: front desk takes takes in 10 cheques totalling £10,000, and 5 payments totalling £5,000 in cash. These are recorded as 15 payments to CASH_IN_HAND. We then want to carry out a bank_deposit from CASH_IN_HAND to CHECKING totally £10,000 in cheques and £5,000 in cash.
Is this possible? The above response suggests not?
Note: My original plan had been to record the cheques customer_payments straight into the CHECKING account, but our client apparently doesn't want them on the bank balance until they are actually deposited, so has asked for the above approach. -
Sending the following:
[reference] => 798 [from_bank_account_id] => 82c245dbfef049229734f5aeb289cd3e [to_bank_account_id] => 237dbe9738914ebc85a2d4e6d280f342 [date] => 2022-03-23T00:00:00+00:00 [cash_amount] => 1000 [cheque_amount] => 2000 [total_amount] => 3000
The API merrily ignores the cheque amount, and the total_amount, and lodges a bank_deposit for £1000 in cash!
-
I am trying to lodge some cheque bank_deposits as per the documentation at https://developer.sage.com/accounting/reference/banking/#operation/postBankDeposits as follows:
{ "bank_deposit":{ "reference":"797", "from_bank_account_id":"82c245dbfef049229734f5aeb289cd3e", "to_bank_account_id":"237dbe9738914ebc85a2d4e6d280f342", "date":"2022-03-23T00:00:00+00:00", "cash_amount":0, "cheque_amount":5000, "total_amount":5000 } }
I am getting the following error:
( [$severity] => error [$dataCode] => RecordInvalid [$message] => must be greater than 0 [$source] => total_amount [friendlyErrorMessage] => must be greater than 0 (total_amount) )
I've run a few tests now, and the "cheque_amount" / "total_amount" values both seem to be ignored in all circumstances.
-
Interestingly, if I try to send the above as a 'OTHER_RECEIPT_REFUND' then the API actually responds with a 500 error!
-
Ok. So changing the above to "allocated_artefacts" gets me a different error: "Couldn't find Sales Payable Artefact."
How do I "withdraw" funds from a customer overpayment? -
Solved. Node should be allocated_artefacts rather than allocated_artifacts!
- 1
-
I have a customer with a balance on account from previous overpayments using CUSTOMER_PAYMENT payments via the API.
When I attempt to issue a partial return of money using a CUSTOMER_REFUND, the payment fails with the error "There must be at least one item allocated."
I have also tried allocating the CUSTOMER_REFUND against the previous CUSTOMER_PAYMENT as follows:
( [transaction_type_id] => CUSTOMER_REFUND [contact_id] => 6dfe12a7f87142819ec192df13e8b834 [bank_account_id] => 82c245dbfef049229734f5aeb289cd3e [date] => 2022-03-22T00:00:00+00:00 [total_amount] => 500 [reference] => DA29460 [paymentmethod_id] => CASH [allocated_artifacts] => Array ( [0] => Array ( [artefact_id] => 9f211ddf8b4e409dacaa3a7b2b85560c <-- ID of the previous CUSTOMER_PAYMENT [amount] => 500.00 ) ) )
This also fails with the error "There must be at least one item allocated."
Is there something wrong with the "allocated_artifacts" node on the API? Whatever I try, this data appears to be ignored!
All suggestions welcome! -
I am attempting to pay and invoice using the API as follows:
{ "contact_payment":{ "transaction_type_id":"CUSTOMER_RECEIPT", "contact_id":"697a6d2bbcae4807a69c08391bb1bd7e", "bank_account_id":"237dbe9738914ebc85a2d4e6d280f342", "date":"2022-03-22T00:00:00+00:00", "total_amount":12570, "reference":"DA29443", "allocated_artifacts":[ { "artefact_id":"e82317dfc46c41f3b9bb1f43ce380ecb", "amount":"12570.00" } ] } }
The payment is logged, but it is not allocated against the invoice. See attached screegrabs.
Any suggestions?
504 Gateway timeout
in General
Posted · Edited by Matt Bradley
We've just gone live with a SBC API integration, and almost immediately we've hit a problem.
The system tried to post in a purchase invoice with 808 line items, and the API responded with a 504 gateway timeout:
"The backend has not responded within 28s while proxying this..."
Any suggestions, please?