Update a customer unit
Renames, re-types, re-parents or annotates a unit, the root included. externalId cannot change. Re-parenting (parentExternalId) moves the unit with everything under it. Spend already recorded keeps naming the unit it landed on; caps are evaluated on the current tree, so from the move on the unit's spend in the running cap period counts toward its new ancestors' caps and no longer toward the old ones. billable flips the unit's own setting; moving a unit under a non-billable one makes it non-billable in effect (effectiveBillable). 409 for a deleted unit (CUSTOMER_UNIT_DELETED), a draft (CUSTOMER_UNIT_DRAFT), a parent that does not exist or is not ACTIVE, a move of the root (ROOT_UNIT_IMMOVABLE), billable: false on the root (ROOT_UNIT_ALWAYS_BILLABLE), a move under the unit's own subtree, or a tree that would get too deep. 403 FEATURE_NOT_ENABLED for billable: false when non-billable units are not enabled for your organization. Use the value returned as customer.id, for example cus_abc123; if you have your own customer ID, use the /api/v2/customers/external/{externalId}/… twin.
Request
- Base URL: https://api.agentpaid.io/api/v2
- URL: https://api.agentpaid.io/api/v2/customers/{id}/customer-units/{externalCustomerUnitId}
- Auth: HTTP bearer
Path parameters
Paid customer display id
Your own id for the unit (its externalId), unique within this customer.
Request body
Response
200
Changes
No recorded changes to this operation across all 1 revision of this API.