Visão geral
Ingestão de dados
Consulta de dados
Criar produto
Cria um novo produto.
curl --request POST \
--url https://api.base39.io/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"slug": "consignado",
"status": "active",
"name": "Empréstimo consignado",
"description": "<string>",
"image": "<string>",
"settings": {
"steps": {},
"loans": {
"concurrency": [
{
"quantityAllowed": 123,
"status": [
"open"
]
}
],
"conditions": [
{
"title": "<string>",
"content": "<string>"
}
],
"refin": {
"minDays": 123
},
"maxAge": 65,
"minAge": 18,
"minimumWage": 2500
},
"invoices": {
"payOff": {
"fine": {
"amount": 0.02,
"daysToStart": 1
},
"interest": {
"amount": 0.01,
"daysToStart": 1
},
"allowOverduePayment": true,
"daysUntilDue": {
"type": "absolute",
"amount": 1
},
"updateInvoiceItemOnInsert": true
}
},
"products": {
"eligibility": {
"type": "static",
"options": {
"url": "<string>",
"headers": {},
"metadata": {}
}
},
"offer": {
"type": "online",
"options": {
"monthlyFee": 1.99,
"numberOfInstallments": [
12,
24
],
"daysUntilDisbursement": 7,
"monthsUntilFirstDueDate": 1,
"creditOperationType": "CCB",
"rebates": [
{
"feeType": "first_loan",
"amountType": "percentage",
"amount": 0.2,
"description": "Tarifa de cadastro",
"minAmount": 200,
"maxAmount": 2000
}
],
"insurance": {
"amount": 0,
"fee": 1.73,
"type": "required",
"number": "123456",
"insurer": "Cia de Seguros"
}
}
},
"documents": {
"toCreate": [
{
"purpose": "account_requirement",
"method": "google",
"methodData": {
"template": "<string>"
}
}
],
"toRequest": [
{
"purpose": "account_requirement",
"name": "crédito consignado",
"owner": "customer",
"expireInDays": 30
}
]
},
"disbursement": "custom"
}
},
"metadata": {}
}'
{
"id": "prod_5f92f01728e009f403d8502e",
"slug": "consignado",
"status": "active",
"name": "Empréstimo consignado",
"description": "<string>",
"image": "<string>",
"settings": {
"steps": {},
"loans": {
"concurrency": [
{
"quantityAllowed": 123,
"status": [
"open"
]
}
],
"conditions": [
{
"title": "<string>",
"content": "<string>"
}
],
"refin": {
"minDays": 123
},
"maxAge": 65,
"minAge": 18,
"minimumWage": 2500
},
"invoices": {
"payOff": {
"fine": {
"amount": 0.02,
"daysToStart": 1
},
"interest": {
"amount": 0.01,
"daysToStart": 1
},
"allowOverduePayment": true,
"daysUntilDue": {
"type": "absolute",
"amount": 1
},
"updateInvoiceItemOnInsert": true
}
},
"products": {
"eligibility": {
"type": "static",
"options": {
"url": "<string>",
"headers": {},
"metadata": {}
}
},
"offer": {
"type": "online",
"options": {
"monthlyFee": 1.99,
"numberOfInstallments": [
12,
24
],
"daysUntilDisbursement": 7,
"monthsUntilFirstDueDate": 1,
"creditOperationType": "CCB",
"rebates": [
{
"feeType": "first_loan",
"amountType": "percentage",
"amount": 0.2,
"description": "Tarifa de cadastro",
"minAmount": 200,
"maxAmount": 2000
}
],
"insurance": {
"amount": 0,
"fee": 1.73,
"type": "required",
"number": "123456",
"insurer": "Cia de Seguros"
}
}
},
"documents": {
"toCreate": [
{
"purpose": "account_requirement",
"method": "google",
"methodData": {
"template": "<string>"
}
}
],
"toRequest": [
{
"purpose": "account_requirement",
"name": "crédito consignado",
"owner": "customer",
"expireInDays": 30
}
]
},
"disbursement": "custom"
}
},
"metadata": {},
"createdAt": "2023-08-25T22:38:41.134Z",
"updatedAt": "2023-08-25T22:38:41.134Z",
"deleted": false,
"createdBy": {
"clientId": "client_identifier",
"externalClientId": "<string>",
"app": "backoffice"
},
"updatedBy": {
"clientId": "client_identifier",
"externalClientId": "<string>",
"app": "backoffice"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Chave única de idempotência para evitar duplicação de requisições.
Chave de identificação do cliente externo. Utilizada para identificar o cliente que está realizando a requisição.
Query Parameters
Expande as referências.
Pode ser um valor único ou uma lista separada por vírgula (csv) de referências retornadas neste endpoint.
Permite especificar quais campos devem ser incluídos ou excluídos na resposta. Utilize o nome do campo para incluí-lo, ou prefixe o nome com um sinal de menos (-) para excluí-lo. Pode ser um valor único ou uma lista separada por vírgula(csv). Funciona para campos expandidos.
Esteja ciente de que especificar um campo para inclusão, terá o efeito que nenhum dos campos padrão seja retornado na resposta, a menos que seja explicitamente especificado.
Importante: Não é permitido combinar inclusões e exclusões na mesma requisição. Uma tentativa de fazê-lo resultará em um erro.
Body
Criar um produto
Response
Retorna o objeto Product
se a criação for bem-sucedida. Retorna um erro se os parâmetros de criação forem inválidos.
Este objeto representa um produto.
curl --request POST \
--url https://api.base39.io/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"slug": "consignado",
"status": "active",
"name": "Empréstimo consignado",
"description": "<string>",
"image": "<string>",
"settings": {
"steps": {},
"loans": {
"concurrency": [
{
"quantityAllowed": 123,
"status": [
"open"
]
}
],
"conditions": [
{
"title": "<string>",
"content": "<string>"
}
],
"refin": {
"minDays": 123
},
"maxAge": 65,
"minAge": 18,
"minimumWage": 2500
},
"invoices": {
"payOff": {
"fine": {
"amount": 0.02,
"daysToStart": 1
},
"interest": {
"amount": 0.01,
"daysToStart": 1
},
"allowOverduePayment": true,
"daysUntilDue": {
"type": "absolute",
"amount": 1
},
"updateInvoiceItemOnInsert": true
}
},
"products": {
"eligibility": {
"type": "static",
"options": {
"url": "<string>",
"headers": {},
"metadata": {}
}
},
"offer": {
"type": "online",
"options": {
"monthlyFee": 1.99,
"numberOfInstallments": [
12,
24
],
"daysUntilDisbursement": 7,
"monthsUntilFirstDueDate": 1,
"creditOperationType": "CCB",
"rebates": [
{
"feeType": "first_loan",
"amountType": "percentage",
"amount": 0.2,
"description": "Tarifa de cadastro",
"minAmount": 200,
"maxAmount": 2000
}
],
"insurance": {
"amount": 0,
"fee": 1.73,
"type": "required",
"number": "123456",
"insurer": "Cia de Seguros"
}
}
},
"documents": {
"toCreate": [
{
"purpose": "account_requirement",
"method": "google",
"methodData": {
"template": "<string>"
}
}
],
"toRequest": [
{
"purpose": "account_requirement",
"name": "crédito consignado",
"owner": "customer",
"expireInDays": 30
}
]
},
"disbursement": "custom"
}
},
"metadata": {}
}'
{
"id": "prod_5f92f01728e009f403d8502e",
"slug": "consignado",
"status": "active",
"name": "Empréstimo consignado",
"description": "<string>",
"image": "<string>",
"settings": {
"steps": {},
"loans": {
"concurrency": [
{
"quantityAllowed": 123,
"status": [
"open"
]
}
],
"conditions": [
{
"title": "<string>",
"content": "<string>"
}
],
"refin": {
"minDays": 123
},
"maxAge": 65,
"minAge": 18,
"minimumWage": 2500
},
"invoices": {
"payOff": {
"fine": {
"amount": 0.02,
"daysToStart": 1
},
"interest": {
"amount": 0.01,
"daysToStart": 1
},
"allowOverduePayment": true,
"daysUntilDue": {
"type": "absolute",
"amount": 1
},
"updateInvoiceItemOnInsert": true
}
},
"products": {
"eligibility": {
"type": "static",
"options": {
"url": "<string>",
"headers": {},
"metadata": {}
}
},
"offer": {
"type": "online",
"options": {
"monthlyFee": 1.99,
"numberOfInstallments": [
12,
24
],
"daysUntilDisbursement": 7,
"monthsUntilFirstDueDate": 1,
"creditOperationType": "CCB",
"rebates": [
{
"feeType": "first_loan",
"amountType": "percentage",
"amount": 0.2,
"description": "Tarifa de cadastro",
"minAmount": 200,
"maxAmount": 2000
}
],
"insurance": {
"amount": 0,
"fee": 1.73,
"type": "required",
"number": "123456",
"insurer": "Cia de Seguros"
}
}
},
"documents": {
"toCreate": [
{
"purpose": "account_requirement",
"method": "google",
"methodData": {
"template": "<string>"
}
}
],
"toRequest": [
{
"purpose": "account_requirement",
"name": "crédito consignado",
"owner": "customer",
"expireInDays": 30
}
]
},
"disbursement": "custom"
}
},
"metadata": {},
"createdAt": "2023-08-25T22:38:41.134Z",
"updatedAt": "2023-08-25T22:38:41.134Z",
"deleted": false,
"createdBy": {
"clientId": "client_identifier",
"externalClientId": "<string>",
"app": "backoffice"
},
"updatedBy": {
"clientId": "client_identifier",
"externalClientId": "<string>",
"app": "backoffice"
}
}