Skerry/ Reference/ Suppliers and bills
Suppliers and bills26
Who a customer pays and what it owes. A supplier is a payee with a profile: contacts, the domains and addresses its bills come from, default terms (net 30, eom, on_receipt, with an early-payment discount such as 2/10 net 30), tax id and category. A bill has an issue date, a due date worked out from the terms, a discount deadline, line items, where it came from and a state. GET /to-pay totals what is pending by due week, currency and supplier. Paying a bill is a payout, so spend policies, the new-payee hold and approvals apply unchanged. A supplier whose payment details change after it has been paid is held for 72 hours until a person confirms the new details with a contact they knew: the usual invoice-fraud route. Details in docs/payables.md.
- Suppliers, newest first. `?customer_id=&q=&archived=true`get/suppliers
- Add a supplierpost/suppliers
- Suppliers getget/suppliers/{id}
- Change a supplier's profilepatch/suppliers/{id}
- Archive a supplier. Its bills stay; no new bill can be addeddelete/suppliers/{id}
- Link the payee a supplier is paid throughpost/suppliers/{id}/payee
- Suppliers verifypost/suppliers/{id}/verify
- Bills, newest first. `?customer_id=&supplier_id=&state=&due_before=&due_after=`get/bills
- Record a bill to paypost/bills
- One bill with its dates, terms, discount, line items, source and `state`get/bills/{id}
- Pay a billpost/bills/{id}/pay
- Schedule payment of a bill for a later daypost/bills/{id}/schedule
- Confirm the fields read from a bill that was `to_review`; it becomes `to_pay`post/bills/{id}/confirm
- Hold a bill: not to be paid until releasedpost/bills/{id}/hold
- Release a held, disputed or scheduled bill back to `to_pay`post/bills/{id}/release
- Mark a bill disputed with the supplier. It leaves the To pay listpost/bills/{id}/dispute
- Void a bill (a duplicate or a mistake)post/bills/{id}/void
- Record that a bill was paid elsewhere. Skerry moves no moneypost/bills/{id}/mark-paid
- A customer's agent rules. `?customer_id=` requiredget/agent-rules
- Set how far an agent may pay bills for a customerpost/agent-rules
- One agent ruleget/agent-rules/{id}
- Change a rule's level, limits or conditions, or `enabled: false`patch/agent-rules/{id}
- Remove a ruledelete/agent-rules/{id}
- What agents decided about bills, each with its reasons in plain wordsget/agent-decisions
- Let an agent handle a bill under the customer's rulepost/bills/{id}/agent-decision
- What is pendingget/to-pay