API reference · Credit Limit
Create Credit Limit Type
- Method
- POST
- Route
-
/creditLimit/saveTypeCreditLimit - Base URL
https://ws.autorei.net- Token
- Requires Bearer token
Opens this request in the public API documentation, the official source of the reference.
Description
Creates a credit limit type, which is then associated with one or more 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 (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Type name, as it appears to the operation. |
code |
string | Yes | Type code, unique in your store. It is the value you send in credit_code when setting a customer's limit. |
Business rules
A 200 does not guarantee creation
The 200 response returns the credit service body as it came back, including when the service rejected the creation — for example with a code that already exists in your store. Check the body: on success it contains code, name and date_created.
Response · 200
| Field | Type | Description |
|---|---|---|
code |
string | Code of the created type. |
name |
string | Name of the created type. |
date_created |
datetime | Creation date and time, in the platform time zone (-03:00). |
Errors
| Code | When |
|---|---|
| 404 | Body missing or empty: {"status":"NOT_FOUND","message":"JSON com formato inválido e/ou não informado"}. |
| 400 | Failure communicating with the credit service. The message echoes the received payload. |
| 401 | Token missing, malformed or expired. |
Example request
curl --request POST 'https://ws.autorei.net/creditLimit/saveTypeCreditLimit' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"name": "Crédito Padrão",
"code": "CREDITO-PADRAO"
}' Example responses
200Success — type created
{
"code": "CREDITO-PADRAO",
"date_created": "2026-09-04T10:12:45.284119-03:00",
"name": "Crédito Padrão"
} Used in
- Use casesEcommerce ERP integration: the typical path through the API
- Use casesB2B customer portal: the typical path through the API
- Use casesB2B procurement and supplies: the typical path through the API
Related endpoints
Generated from the public API collection, published on 2026-09-04: api-docs.cws.digital.