API reference · Credit Limit

Create Credit Limit Type

POSThttps://api.sandbox.cws.digital/creditLimit/saveTypeCreditLimit

Description

Creates a credit limit type of your store, which is later associated with the customers in Set or Update Credit Limit for Customer.

The type represents your store's credit modality — for example, À Vista, Boleto 30 dias or Crédito Especial.

Request body

Content-Typeapplication/jsonRequired
Edit the body with
FieldTypeRequiredDescriptionValue
namestringYes

Name of the type, as it appears to the operations team. Up to 50 characters.

codestringYes

Code of the type, unique in your store, with up to 18 characters. It is the value you send in credit_code when setting a customer's limit.

Business rules

A repeated code updates the name

Resending a code that already exists in your store updates the type's name and responds 200 with the type. The date_created stays the one of the creation.

The type belongs to your store

The code is unique in your store. Another store can use the same code without affecting your type.

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/creditLimit/saveTypeCreditLimit' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Crédito Padrão",
  "code": "CREDITO-PADRAO"
}'

Response

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