Customer Payable Line Items
Reference for the customer_payable_line_items resource. Requests follow the conventions in
Requests and Responses; fields you
receive and may write are filtered by your user's permissions, so responses can
contain a subset of the fields below.
Operations
| Operation | Request |
|---|---|
| List | GET /{profile}/user/v4/customer_payable_line_items |
| Fetch | GET /{profile}/user/v4/customer_payable_line_items/{id} |
| Update | PATCH /{profile}/user/v4/customer_payable_line_items/{id} |
| Delete | DELETE /{profile}/user/v4/customer_payable_line_items/{id} |
Not available as a standard REST operation for this resource: create —
such requests return 402 feature_not_enabled or 403 permission_denied.
How it works
customer_payable_line_items are the breakdown lines of a payable (a customer_payables
record). Each line maps to a payroll column (payroll_column_id) and carries an amount. Gated by
Customer Payables at the customer's location.
The payable's total is the sum of its line items — you never set the payable's
amountdirectly. Editing or deleting a line item recomputes the payable's total automatically.
Line items are generated by the payroll engine (which assigns each line's payroll_column_id),
so there is no create endpoint — lines are created when a payable is generated. You edit a line's
amount and labels (PATCH) or remove one (DELETE).
curl -X PATCH "https://portal.securitytrax.com/acme/user/v4/customer_payable_line_items/88" \
-H "Authorization: Bearer stx_acme_..." \
-H "Content-Type: application/json" \
-d '{"data":{"attributes":{"amount":"150.00","about":"Install bonus"}}}'
| Field | Editable? | Notes |
|---|---|---|
amount |
Yes | Numeric. Editing it recomputes the payable's total. |
about |
Yes | Free-text label for the line. |
is_taxable |
Yes | true / false. |
status |
No | Read-only — remove a line with DELETE, not by writing status. |
payroll_column_id |
No | Engine-assigned, immutable. |
Reading a payable's line items
GET /customer_payable_line_items?payroll_to_customer_id={payableId} lists a payable's lines
(filters: payroll_to_customer_id, payroll_column_id, created_at range; sort: id,
payroll_to_customer_id, amount, created_at; ?count_only=true for the total).
Fields
Fields are grouped by the permission that gates them. A group you may not view
is absent from responses; a group you may not write is rejected with 422 when
sent in a write.
Payable Column
View: customers — Customer Payables Info at the record's location; leads — Customer Lead Payables Info. Update: customers — Customer Payables Info at the record's location; leads — all of: the standard canModifyLead rules; Customer Lead Payables Info.
| Field | Type | Writable | Validation |
|---|---|---|---|
payroll_to_customer_id |
integer (nullable) | Read-only | min 0 |
payroll_column_id |
integer (nullable) | Read-only | min 0 |
amount |
string (nullable) | Update only | — |
about |
string (nullable) | Update only | — |
is_taxable |
boolean (nullable) | Update only | — |
status |
string (nullable) | Read-only | one of: pending, active, deleted |
created_at |
string (nullable) | Read-only | — |
created_by |
integer (nullable) | Read-only | — |
updated_at |
string (nullable) | Read-only | — |
updated_by |
integer (nullable) | Read-only | — |
Pagination
The list endpoint uses client-controlled offset pagination: ?page= (1-based) and
?per_page= (default 25, max 100). The response mirrors
meta.pagination (page, per_page, total, last_page) and sends an RFC5988
Link header; follow rel="next" to walk pages. See
Pagination.
Filters
The list endpoint accepts these query-param filters: payroll_to_customer_id, payroll_column_id, created_at_from, created_at_to.
An unsupported filter parameter returns 422. See
Filtering collections
for matching semantics.
Sorting
GET .../customer_payable_line_items?sort= orders the list by: id, payroll_to_customer_id, amount, created_at.
Prefix a field with - for descending; comma-separate for tie-breakers. An
unsupported field returns 422. See
Sorting collections.
Related
- Requests and Responses — envelope, errors, pagination, and rate limits.
- Authentication — tokens and the
Authorizationheader.