API documentation

Start here

What you need to get started: sandbox credentials, authentication, URLs by environment, pagination, errors and limits, token scope and support.

Credentials

Get Access Token authenticates with the e-mail and password of your user on the CWS platform.

To request your sandbox credentials, use the contact form on the CWS Platform website.

Authentication

Every API call requires an access token.

  • The access_token is valid for 12 hours (expires_in arrives as 43199, in seconds). When it expires, authenticate again.
  • In the other calls, send the Authorization: Bearer <access_token> header, with the Bearer prefix: without it, the request is rejected with 401.
  • In the Try it panel, the token generated on the Get Access Token page is saved in the browser tab and filled in on the other endpoints.

URLs by environment

This portal uses the sandbox environment, at the URL below.

The production URL is provided after homologation.

Sandboxhttps://api.sandbox.cws.digital

Pagination, errors and limits

Pagination

Each endpoint that paginates documents its own pagination parameters, in the Parameters section of its page.

Errors

Each endpoint documents the errors it can return in the Responses section of its page: each code has a summary and, when opened, the cause and what to do. The body of each error appears in the response examples.

Every authenticated call can return 401, when the token is missing, malformed or expired. In that case, authenticate again and retry the call.

Limits

In production, the API limit is 1,000 requests per minute.

Maximum size and other limits come on each endpoint page.

If your integration needs an exception to the limit, arrange it with the technical team during development.

Token scope

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

Support material and questions

Support material

Access the guides and support material to start your integration.

Questions channel

Our support team is available through the e-mail suporte-api@cws.digital.

Note: when you contact us, you will receive an automatic reply from our ticketing tool (Jira), sent by the sender jira@cwsdigital.atlassian.net.