These are explicit permissions: they must be checked one by one in External integrations; existing integrations do not receive them automatically.
Pending documents
Includes non-deleted purchases with an outstanding balance, from the business environment.
Sorted from the oldest to the most recent document. Errors:
404 Branch not found; 422 validation.
Document currency. The amounts in the list (
total_amount, amount_paid, pending_amount, total_pending) and the collections/payments are always in the base currency. The fields currency_code, base_currency_code, exchange_rate, foreign_total and foreign_balance are a reference added per row: for a document issued in a foreign currency (for example GTQ with a rate of 0.128) they show how much the document was and how much remains in its currency. For documents in the base currency, exchange_rate, foreign_total and foreign_balance are null. Foreign-currency documents are issued with the API v2; this route remains on v1.0.128, total 1,130.00 GTQ = 144.64 USD, no partial payments):
Current / overdue summary
current adds up the documents with days_overdue = 0; overdue, the overdue ones. branch_id is required: without it (or from another business) it responds 404 Branch not found.
Payment history
status other than applied). Errors: 404 Bill not found (nonexistent or from another business).
Register payment
- By document (allocations)
- Automatic by supplier
You specify each purchase and the amount to apply to it.
Rules
- All or nothing: payments are applied in a single transaction. If one document fails, none is applied.
- The amount for each document cannot exceed its pending balance; when it is fully covered it becomes
payed, otherwisepartial. - The bank, petty cash fund and checkbook, if sent, must belong to the business. The petty cash rules (funds) and checkbook rules are validated the same way as on the web; if they fail, it responds
422with the corresponding message. cost_center_idis stored on each payment for reports. When posted to the books, it only passes to the lines of income statement accounts (for example, exchange differences); the bank, cash and supplier lines are left without a center. A nonexistent, inactive center or one with sub-centers responds422and no payment is applied.- We recommend sending
Idempotency-Keyso you don’t duplicate the payment if you retry. - Registered payments are ready to be posted in Process documents (type Pagos a proveedores, supplier payments).
201
Reverse payment
payables.payments permission. The payment_id is the one returned when registering the payment or the id from the history.
200
- The payment is left with
status: "reversed"and no longer counts toward the balance; the purchase’spayment_statusis recalculated (pending,partialorpayed). - The effect on the bank, petty cash fund or checkbook that generated the payment is offset.
accountingindicates what happened to the payment’s journal entry (see Payment reversal and its journal entry):none(not yet posted;journal_entry_id,entry_codeandstatusarenull),deleted(the entry was in Draft and was markedELIMINADA) orreversed(a mirror entry was created with referencepayment_made_reversal, dated today;statusaccording to the corresponding Status when processing setting).- Without
reason,reversal_reasonisPayment reversed. - We recommend sending
Idempotency-Key.