Score de Crédito com objetivo de analisar o potencial e capacidade de cada comprador para usufruir dos serviços prestados pela sua instituição.
Todas as requisições submetidas à nossa API devem ser realizadas através de um token de 2048 caracteres.
O token é gerado através de um usuário e senha que devem ser fornecidos pela ClearSale.
Entre em contato com o seu consultor de vendas para maiores informações.
Na autenticação, além do token retornamos seu tempo de expiração. É necessário que contemple no seu desenvolvimento o gerenciamento da vida útil do token com base nesse tempo de expiração.
Para o recebimento desse dado é necessário que reserve um espaço de 2048 caracteres. Só gere um novo token após a expiração do seu token atual.
POST https://productsapi.clearsale.com.br/v1/authentication/ HTTP/1.1
Content-Type: application/json
{
"Username": "{Seu Usuário}",
"Password": "{Sua Senha}"
}
POST https://hmlproductsapi.clearsale.com.br/v1/authentication/ HTTP/1.1
Content-Type: application/json
{
"Username": "{Seu Usuário}",
"Password": "{Sua Senha}"
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"Token": "{Valor do Token}",
"ExpiresInSeconds": "{Tempo de Expiração do Token}"
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
"errors": {
"ExampleProperty": [
"error description."
],
},
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "error title.",
"status": 400,
"traceId": "automatically generate id"
}
HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
{
"message": "Username or Password is incorrect"
}
Este método é utilizado para fazer o envio de uma transação no Credit Risk.
POST https://productsapi.clearsale.com.br/v1/creditrisk/ HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
"Document": "12345678912", (obrigatório),
"ReferenceDate": "2021-04-30T00:00:00", (opcional)
"OrderId": "1452291" (opcional)
}
POST https://hmlproductsapi.clearsale.com.br/v1/creditrisk/ HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
"Document": "12345678912", (obrigatório),
"ReferenceDate": "2021-04-30T00:00:00", (opcional)
"OrderId": "1452291" (opcional)
}
HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8
{
"Id": 30,
"OrderId": "1452291",
"ReferenceDate": "2021-04-30T00:00:00",
"Document": "12345678912",
"Score": 402,
"CreationDate": "2021-04-30T15:50:42.3553027-03:00",
"Digital": true,
"GoodFor": "g",
"VarietyIndex": 511,
"BehaviourIndex": 404,
"ProfileIndex": 376,
"StatusIndex": 460,
"PostalIndex": 369,
"RapportIndex": 385
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
"errors": {
"ExampleProperty": [
"error description."
],
},
"title": "error title.",
"status": 400,
"traceId": "automatically generate id"
}
HTTP/1.1 204 No Content
HTTP/1.1 401 Unauthorized
HTTP/1.1 403 Forbidden
Este método é utilizado para buscar informações de uma transação no Credit Risk.
GET https://productsapi.clearsale.com.br/v1/creditrisk/{transactionId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://hmlproductsapi.clearsale.com.br/v1/creditrisk/{transactionId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8
{
"Id": 30,
"OrderId": "1452291",
"ReferenceDate": "2021-04-30T00:00:00",
"Document": "12345678912",
"Score": 402,
"CreationDate": "2021-04-30T15:50:42.3553027-03:00",
"Digital": true,
"Goodfor": "g",
"VarietyIndex": 511,
"BehaviourIndex": 404,
"ProfileIndex": 376,
"StatusIndex": 460,
"PostalIndex": 369,
"RapportIndex": 385
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
"errors": {
"ExampleProperty": [
"error description."
],
},
"title": "error title.",
"status": 400,
"traceId": "automatically generate id"
}
HTTP/1.1 401 Unauthorized
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Nome | Descrição | Tipo | Tamanho | Obrigatório |
---|---|---|---|---|
Document | CPF para consulta | String | 11 | Sim |
OrderId | Código do pedido inserido pelo cliente para controle | String | 30 | Não |
ReferenceDate | Data de referência para realizar consulta | DateTime | - | Não |
Nome | Descrição | Tipo | Tamanho |
---|---|---|---|
Id | Código da transação | Int | - |
OrderId | Código do pedido inserido pelo cliente para controle | String | 30 |
Document | CPF consultado | String | 11 |
ReferenceDate | Data de referência consultada | DateTime | - |
CreationDate | Data de criação da transação | DateTime | - |
Score | Score geral de crédito | Int | 4 |
Digital | Parâmetro de classificação que indica se o cliente tem ou não presença digital | Boolean | 1 |
GoodFor | Total de compras, tipos de cartões usados e CEPs relacionados ao cliente | String | 1 |
VarietyIndex * | Qualidade e variedade do que o cliente compra | Int | 4 |
BehaviourIndex * | Formas de pagamento utilizadas e frequência de compra do cliente | Int | 4 |
ProfileIndex | Tipo de endereço, tipo de device, categoria do cartão do cliente | Int | 4 |
StatusIndex | Características fixas como data e local de nascimento do cliente | Int | 4 |
PostalIndex | Valor e frequência de compras nos CEPs relacionados ao cliente | Int | 4 |
RapportIndex * | Scores dos CPF relacionados ao cliente | Int | 4 |
Os scores marcados com "*" podem não ser gerados caso o cliente consultado não tenha presença digital.
Para realizar testes e validações por faixa de score principal, utilize os respectivos CPF:
Credit Score in order to analyze the potential and capacity of each buyer to enjoy the services provided by your institution.
All requests submitted to our API must be made using a 2048 character token.
The token is generated through a username and password that must be provided by ClearSale.
Contact your sales consultant for more information.
In authentication, in addition to the token, we return its expiration time. It is necessary to consider in its development the management of the lifetime of the token based on this expiration time.
To receive this data, you must reserve a space of 2048 characters. Only generate a new token after your current token expires.
POST https://productsapi.clearsale.com.br/v1/authentication/ HTTP/1.1
Content-Type: application/json
{
"Username": "{Your User}",
"Password": "{Your password}"
}
POST https://hmlproductsapi.clearsale.com.br/v1/authentication/ HTTP/1.1
Content-Type: application/json
{
"Username": "{Your User}",
"Password": "{Your password}"
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"Token": "{Token Value}",
"ExpiresInSeconds": "{Token Expiration Time}"
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
"errors": {
"ExampleProperty": [
"error description."
],
},
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "error title.",
"status": 400,
"traceId": "automatically generate id"
}
HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
{
"message": "Username or Password is incorrect"
}
This method is used to send a transaction in the Credit Risk.
POST https://productsapi.clearsale.com.br/v1/creditrisk/ HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
"Document": "12345678912", (mandatory),
"ReferenceDate": "2021-04-30T00:00:00", (optional)
"OrderId": "1452291" (optional)
}
POST https://hmlproductsapi.clearsale.com.br/v1/creditrisk/ HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
"Document": "12345678912", (mandatory),
"ReferenceDate": "2021-04-30T00:00:00", (optional)
"OrderId": "1452291" (optional)
}
HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8
{
"Id": 30,
"OrderId": "1452291",
"ReferenceDate": "2021-04-30T00:00:00",
"Document": "12345678912",
"Score": 402,
"CreationDate": "2021-04-30T15:50:42.3553027-03:00",
"Digital": true,
"GoodFor": "g",
"VarietyIndex": 511,
"BehaviourIndex": 404,
"ProfileIndex": 376,
"StatusIndex": 460,
"PostalIndex": 369,
"RapportIndex": 385
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
"errors": {
"ExampleProperty": [
"error description."
],
},
"title": "error title.",
"status": 400,
"traceId": "automatically generate id"
}
HTTP/1.1 204 No Content
HTTP/1.1 401 Unauthorized
HTTP/1.1 403 Forbidden
This method is used to search transaction information from the Credit Risk.
GET https://productsapi.clearsale.com.br/v1/creditrisk/{transactionId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://hmlproductsapi.clearsale.com.br/v1/creditrisk/{transactionId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8
{
"Id": 30,
"OrderId": "1452291",
"ReferenceDate": "2021-04-30T00:00:00",
"Document": "12345678912",
"Score": 402,
"CreationDate": "2021-04-30T15:50:42.3553027-03:00",
"Digital": true,
"Goodfor": "g",
"VarietyIndex": 511,
"BehaviourIndex": 404,
"ProfileIndex": 376,
"StatusIndex": 460,
"PostalIndex": 369,
"RapportIndex": 385
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
"errors": {
"ExampleProperty": [
"error description."
],
},
"title": "error title.",
"status": 400,
"traceId": "automatically generate id"
}
HTTP/1.1 401 Unauthorized
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Name | Description | Type | Size | Mandatory |
---|---|---|---|---|
Document | CPF for consultation | String | 11 | Yes |
OrderId | Order code entered by the customer for control | String | 30 | No |
ReferenceDate | Reference date for consultation | DateTime | - | No |
Name | Description | Type | Size |
---|---|---|---|
Id | Transaction Code | Int | - |
OrderId | Order code entered by the customer for control | String | 30 |
Document | CPF consulted (Is the identification document in Brazil) | String | 11 |
ReferenceDate | Reference date consulted | DateTime | - |
CreationDate | Transaction creation date | DateTime | - |
Score | Overall credit score | Int | 4 |
Digital | Classification parameter that indicates whether or not the customer has a digital presence | Boolean | 1 |
GoodFor | Total purchases, card types used, and customer-related zip codes | String | 1 |
VarietyIndex * | Quality and variety of what the customer buys | Int | 4 |
BehaviourIndex * | Payment methods used and customer purchase frequency | Int | 4 |
ProfileIndex | Address type, device type, customer card category | Int | 4 |
StatusIndex | Fixed characteristics such as customer's date and place of birth | Int | 4 |
PostalIndex | Amount and frequency of purchases in customer-related zip codes | Int | 4 |
RapportIndex * | Customer-related CPF scores | Int | 4 |
Scores marked with "*" may not be generated if the customer consulted does not have a digital presence.
To perform tests and validations by main score range, use the respective CPF: