API reference · Seller Module

Manage Portfolio in Batch

POSThttps://api.sandbox.cws.digital/sellerModule/manageBulkWallet/{attendantInfo}

Description

Builds a seller's portfolio in batch: links, unlinks or replaces the customer list in a single call, instead of one request per customer.

Do not send attendantId or storeId: both are resolved by the backend, from the path and from your token.

Parameters

Path parameters

FieldTypeRequiredDescriptionValue
attendantInfostringYes

Identifies the seller in three ways: the seller UUID, the CPF/CNPJ of their account holder, or the login e-mail. The route recognizes which one you sent.

Request body

Content-Typeapplication/jsonRequired
Edit the body with
FieldTypeRequiredDescriptionValue
actionstringYes

BIND adds the customers to the portfolio, UNBIND removes them, REPLACE swaps the whole portfolio for the list sent.

Allowed values:BINDUNBINDREPLACE
usersarray of objectYes

Customers of the operation. Cannot be an empty list.

Fields in users[]

Items of users[]
users[]
FieldTypeRequiredDescriptionValue
usernamestringConditional

Customer's login e-mail. Required if document is not sent.

documentstringConditional

Customer's CPF or CNPJ. Required if username is not sent.

Business rules

Processing is asynchronous

The 200 response confirms that CWS received the list, not that the links were created.

Processing happens in the background and there is no route to check the result — check the portfolio afterwards with GET /sellerModule/listCustomers/:id.

REPLACE removes what is not in the list

With REPLACE, the portfolio becomes exactly the list sent: whoever was linked and does not appear in users is unlinked.

Responses

  • 401

    Missing, malformed or expired token.

Try it

Sandbox

Language

Credentials

Access token: saved in this tab and used on every endpoint.

Each token only reaches the partner's own data and that of the branches with an authorized link.

Don't have sandbox credentials yet? See how to request them

Request

cURL
curl --request POST \
  --url 'https://api.sandbox.cws.digital/sellerModule/manageBulkWallet/{attendantInfo}' \
  --globoff \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "action": "BIND",
  "users": [
    {
      "document": "57.578.030/0001-05"
    },
    {
      "username": "contato@lojaexemplo.com.br"
    }
  ]
}'

Response

Click Try it to see the real response here, or pick a documented example: