Payable

Update many

Updates many payable

patch/v1/erp/payouts/payables/update_many

Request

  • Base URL
    https://api.cardda.com
  • URL
    https://api.cardda.com/v1/erp/payouts/payables/update_many
  • Auth
    HTTP bearer

Parameters

#/paths/~1v1~1erp~1payouts~1rules/get/parameters/0 (unresolved $ref)
#/paths/~1v1~1erp~1payouts~1rules/get/parameters/1 (unresolved $ref)
#/paths/~1v1~1erp~1payouts~1rules/get/parameters/2 (unresolved $ref)
#/paths/~1v1~1erp~1payouts~1rules/get/parameters/3 (unresolved $ref)
#/paths/~1v1~1erp~1payouts~1rules/get/parameters/4 (unresolved $ref)
#/paths/~1v1~1erp~1payouts~1reviews/get/parameters/5 (unresolved $ref)

Request body

company_idstring uuid required

Required. If missing, the request fails with 412 Precondition Failed.

scope'all' | 'partial' required

Required. If missing, the request fails with 412 Precondition Failed. The scope of the update. If the scope is all, all the payables of the company (filtered by the query parameters) will be updated. Otherwise, only the payables with the ids provided in ids will be updated.

idsstring[]

The ids of the payables to update when the scope is not all.

due_datestring date-time
descriptionstring
payment_datestring date-time

The scheduled/expected payment date to apply to the selected payables.

payment_status'non_paid' | 'partially_paid' | 'paid' | 'overpaid' | 'scheduled' | 'delegated'

Only applied for callers with the erp_tradables_manage permission on every selected payable's company; ignored otherwise.

discardedboolean

Whether the payable has been discarded or not. A discarded payable will not be obtained in the index.

partially_paid_amountinteger

The amount that has been paid for this payable. This amount is not necessarily the same as the total paid amount of the payable.

review_status'pending' | 'approved' | 'declined'

Approval state to apply to the selected payables.

Response

Body of the updated payable.

idstring uuid required
source_typestring
source_idstring
amountinteger required
status'pending' | 'approved' | 'declined' | 'partially_paid' | 'paid' | 'overpaid' | 'scheduled' | 'delegated' required

Derived, read-only. There is no status column: the value is computed from review_status and payment_status on every read.

  • paid or overpaid whenever payment_status is one of those two — the payment outcome wins over the review outcome.
  • otherwise, once the payable is approved and something has been paid or scheduled, the payment_status shows through (partially_paid, scheduled, delegated).
  • otherwise the review_status (pending, approved, declined).

So approved here means "approved and nothing paid yet". Filter and sort on review_status / payment_status if you need the two axes separately.

due_datestring date-time

The date in which the payable is due.

payment_status'non_paid' | 'partially_paid' | 'paid' | 'overpaid' | 'scheduled' | 'delegated'

How much of the payable has been settled. scheduled and delegated mean the payment was handed off (scheduled at the bank, or delegated to a third party) and are not terminal.

company_idstring uuid required
issue_datestring date-time

The date in which the payable was issued.

currencystring required
document_typeinteger required

An integer representing the type of document. Refer to the document_types mapping for possible values and their corresponding document types.

sender_idstring uuid
recipient_idstring uuid
counterpart_company_idstring uuid required

The id of the counterpart company. This is the company that will receive the payment.

descriptionstring
discardedboolean

Whether the payable has been discarded or not. A discarded payable will not be obtained in the index.

partially_paid_amountinteger
paid_amountinteger

The amount that has been paid for this payable. This amount is calculated using the partially_paid_amount param, the amount of the bank transactions related to the payable and the amount of the credit notes related.

created_atstring date-time
updated_atstring date-time

Changes

No recorded changes to this operation across all 1 revision of this API.