API reference · Contracts
Remove Customers from the Branch Contract
https://api.sandbox.cws.digital/pricing/contract/{contractId}/customers/store/{partnerId}Description
Allows a parent account to remove customers from a contract of one of its branches, by each one's document. The customers stop receiving the contract prices.
The body and the response are identical to those of the removal in your own store — the difference is the branch that owns the contract, which comes in the route and is validated against the links of your parent account.
Parameters
Path parameters
| Field | Type | Required | Description | Value |
|---|---|---|---|---|
| contractId | integer | Yes | Contract id, returned in | |
| partnerId | integer | Yes | Id of the branch that owns the contract. It must be linked to the token's parent account. |
Request body
application/jsonRequired| Field | Type | Required | Description | Value |
|---|---|---|---|---|
| customers | array of string | Yes | Documents of the customers to remove, as strings with the mask (CPF | Separate values with commas or line breaks. |
Business rules
A document outside the contract comes back in notFound
A document that is not linked to the contract does not interrupt the request: it comes back in notFound.customers and the others are removed. The response is 200 even when no document was removed.
Send the document with the mask, as in the addition: with digits only it comes back in notFound.customers, even if it is in the contract.
To empty the whole list at once, use deleteAllCustomers in Update Branch Contract.
Responses
- 403
Branch not linked to your parent account.