NAV
shell python javascript

Introduction

Learn how to use the Flow Finance REST API, which allows platforms to quickly and programmatically issue loans to their users.

We've strived to make our API easy to use and hope you find it so.

If you have any suggestions on how we can make it even easier, feel free to get in touch with us.

Follow the steps below to get started:

Since a Flow Account is transparent to your platform users, you are in charge of all interactions with your users and for gathering all the information needed to verify the account. It's also up to you to build the onboarding processes, UIs, and reporting functionalities.

Overview

A brief, high-level technical overview of how to use the API.

Getting started

Platform Onboarding Steps

There are roughly 6 steps in the integration process.

1. Transactional Data Samples

In this step, you provide us with platform transactional data samples, which will be used by our data science team to train our algorithms.

2. Real Transactional Data

We will also need your platform API endpoint that will be used for retrieving transactional data. It must be capable of being queried by business id (cnpj/cpf). This allows us to perform real-time credit decisions.

We understand that providing an external API endpoint may not be an option for your platform, so we also provide 2 alternatives: * You can attach the relevant data on every request where transactional data is needed * You can send us your transactional data and we will process everything offline.

3. API Walkthrough

With the samples processed and an accessible API endpoint, we will schedule an API walkthrough where your assigned engineer will give you an overview of the Flow API, tailored to your platform, and explain relevant API calls and the suggested order in which to use them.

4. Sandbox Credentials

A sandbox environment that replicates the production API will be configured for you within 3 business days. An email with your credentials will be sent. Note that in this environment events such as loan processing and account registration might appear faster than in production to make it easier to test your integration.

5. Integration

This is the phase where we will describe KYC compliance requirements, security best practices, and general guidelines.

We urge you to thoroughly examine all of the API endpoints in your sandbox environment since it replicates our real production platform. This is also the time to bring us any suggestions or customizations that would make our product better for your use case. Be sure to let us know of any problems you may encounter.

6. Testing and Review

During the final phase, we will work with you to make sure your integration is ready for live release, performing security checks and manual tests.

Once we've performed these checks, a set of production credentials will be generated for the live environment.

Additional Infomation

KYC

The collection of Know Your Customer (KYC) documentation from your users is an important step in the onboarding process. This not only helps facilitate compliance with regulators but also helps prevent fraudulent user activity.

The documents collected for both businesses and individuals help us understand who our customers are and the nature of their relationship with us.

There are two steps to these requirements: * Gathering information about the platform user (business) and associated individuals (persons); * Verifying the information is current and accurate.

Different platforms and limits will have different KYC requirements because the underlying risks can vary greatly. We encourage you to collect more KYC than our minimum requirements.

Types of Information

There are two types of information we need to collect: business information (name, cnpj, address, etc) and information about the owners.

How We Validate

Submitted user information is validated through public and private databases and partner APIs. Physical documents, such as government IDs, are validated through automated software, which incorporates:

Physical Documents

Physical documents must be encoded to Base64 before being submitted to our API. You can submit these documents separately or (preferably) all at once in one API call.

User Onboarding Process

Dashboard

A dashboard is provided at /dashboard to which you can log in with your credentials and perform the following operations: - Reset your client_id - Browse all accounts registered on your platform, their approval status and line of credit - Browse all loans issued on your platform and their statuses

Glossary

Here are some of the terms we use throughout our documentation, for ease of reference.

Pre-qualify

Pre-qualification is an optional step that you can take advantadge of by calling the specific endpoint. This endpoint will perform an analysis using publicly available data to decide whether the business qualifies for an account. This allows you to choose not to offer loans to users that will not qualify, making you UX better.

Platform Tokens

Two types of JWT tokens can be generated: client and account.

Client Tokens

Client tokens refer to your platform tokens; they have full permissions on every API endpoint, being able to perform account creation/deletion and operations on behalf of any account. You should keep these tokens in your backend only and never share with mobile nor web devices.

Account Tokens

Account tokens have account-specific permissions; they cannot create/delete accounts and can only operate within the bounds of the account for which they were created. They must always be paired with an account-id header parameters.

Documents

Physical Documents

Physical documents are the image scans or photos of a physical document.

All physical documents have a value and a type. type is the document type (ie: driver's license, passport, etc) and value is a base64 encoded string of the actual document. Note: don't use a mime type header; we automatically detect the file format.

Virtual Documents

Virtual documents are personally identifiable document besides business id and government id number that might be required. A virtual document has a value (business id number, for example), a type (passport, drivers license id), expiration date and issuer.

OAuth

We use OAuth2, Grant Type "Refresh Token" for authentication.

Two types of JWT tokens can be generated: client and account.

Client tokens refer to your platform tokens; they have full permissions on every API endpoint, being able to perform account creation/deletion and operations on behalf of any account.

Account tokens have account-specific permissions; they cannot create/delete accounts and can only operate within the bounds of the account for which they were created.

Perform Login

Code samples

# You can also use wget
curl -X POST /api/v1/oauth/login \
  -H 'Accept: application/json' \
  -H 'authorization: string' \
  -H 'account-id: 0'

import requests
headers = {
  'Accept': 'application/json',
  'authorization': 'string',
  'account-id': '0'
}

r = requests.post('/api/v1/oauth/login', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'authorization':'string',
  'account-id':'0'
};

fetch('/api/v1/oauth/login',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /api/v1/oauth/login

Generate token pair given username and password in the 'Authorization' header.

Authorization header expects 'Basic client_id:client_secret' where the string client_id:client_secret is your client_id and your client_secret base64 encoded.

Parameters

Name In Type Required
authorization header string true
account-id header integer(int32) false

Example responses

200 Response

{
  "data": {
    "access_token": "string",
    "token_type": "string",
    "expires_in": 0,
    "refresh_token": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data object true none none
»» access_token string true none none
»» token_type string true none none
»» expires_in integer(int32) true none none
»» refresh_token string true none none

Refresh an Access Token

POST /api/v1/oauth/token

Refresh access-token given a refresh-token.

Refresh an expired access-token with a refresh-token.

Body parameter

{
  "refresh_token": "string"
}

Parameters

Name In Type Required Description
account-id header integer(int32) false none
body body object true none
» refresh_token body string true none

Example responses

200 Response

{
  "data": {
    "access_token": "string",
    "token_type": "string",
    "expires_in": 0,
    "refresh_token": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data object true none none
»» access_token string true none none
»» token_type string true none none
»» expires_in integer(int32) true none none
»» refresh_token string true none none

Pre-qualify

Eligibility for a line of credit

Code samples

# You can also use wget
curl -X POST /api/v1/pre-qualify \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.post('/api/v1/pre-qualify', headers = headers)

print(r.json())

const inputBody = '{
  "cnpj": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/pre-qualify',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /api/v1/pre-qualify

This endpoint returns whether a business entity is eligible for applying for an account.

Body parameter

{
  "cnpj": "string"
}

Parameters

Name In Type Required Description
authorization header string true none
body body object true none
» cnpj body string true none

Example responses

200 Response

{
  "data": {
    "cnpj": "string",
    "eligible": true
  }
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data object true none none
»» cnpj string true none none
»» eligible boolean true none none

Accounts

List all connected accounts

Code samples

# You can also use wget
curl -X GET /api/v1/accounts \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.get('/api/v1/accounts', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/accounts',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /api/v1/accounts

Retrieve all connected accounts.

Parameters

Name In Type Required Description
authorization header string true none
page query integer(int32) false none
limit query integer(int32) false none

Example responses

200 Response

{
  "page": 0,
  "total": 0,
  "data": [
    {
      "id": 0,
      "status": "pending",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "line_of_credit": 0,
      "available_credit": 0,
      "business": {
        "legal_name": "string",
        "name": "string",
        "updated_at": "2019-08-24T14:15:22Z",
        "address": {
          "street_name": "string",
          "street_number": "string",
          "postal_code": "string",
          "district": "string",
          "city": "string",
          "state_code": "string",
          "country": "string",
          "extra_address_info": "string"
        },
        "documents": {
          "virtual": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "value": "string",
              "timestamp": "2019-08-24T14:15:22Z",
              "type": "string",
              "exp": "string",
              "issuer": "string"
            }
          ],
          "physical": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "timestamp": "2019-08-24T14:15:22Z",
              "type": "string",
              "extension": "string"
            }
          ]
        },
        "contact_info": {
          "email": "string",
          "phone_number": "string"
        },
        "created_at": "2019-08-24T14:15:22Z",
        "account_id": 0,
        "business_id": "string"
      },
      "tos_acceptance": {
        "date": "2019-08-24T14:15:22Z",
        "ip": "string",
        "user_agent": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» page integer(int32) true none none
» total integer(int32) true none none
» data [object] true none none
»» id integer(int32) true none none
»» status string true none none
»» created_at string(date-time) true none none
»» updated_at string(date-time) true none none
»» line_of_credit number(double)¦null true none none
»» available_credit number(double)¦null true none none
»» business object¦null true none none
»»» legal_name string true none none
»»» name string true none none
»»» updated_at string(date-time) true none none
»»» address object true none none
»»»» street_name string true none none
»»»» street_number string true none none
»»»» postal_code string true none none
»»»» district string true none none
»»»» city string true none none
»»»» state_code string true none none
»»»» country string true none none
»»»» extra_address_info string false none none
»»» documents object true none none
»»»» virtual [object] false none none
»»»»» flow-app.schemas.models/VirtualDocument object false none none
»»»»»» id string(uuid) true none none
»»»»»» value string true none none
»»»»»» timestamp string(date-time) true none none
»»»»»» type string true none none
»»»»»» exp string false none none
»»»»»» issuer string false none none
»»»» physical [object] false none none
»»»»» flow.schema/PhysicalDocumentRes object false none none
»»»»»» id string(uuid) true none none
»»»»»» timestamp string(date-time) true none none
»»»»»» type string true none none
»»»»»» extension string¦null false none none
»»» contact_info object true none none
»»»» email string true none none
»»»» phone_number string true none none
»»» created_at string(date-time) true none none
»»» account_id integer(int32) true none none
»»» business_id string true none none
»» tos_acceptance object¦null true none none
»»» date string(date-time) true none none
»»» ip string true none none
»»» user_agent string true none none

Enumerated Values

Property Value
status pending
status approved
status under-review

Create an account

Code samples

# You can also use wget
curl -X POST /api/v1/accounts \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.post('/api/v1/accounts', headers = headers)

print(r.json())

const inputBody = '{
  "business": {
    "business_id": "string",
    "name": "string",
    "legal_name": "string",
    "address": {
      "street_name": "string",
      "street_number": "string",
      "postal_code": "string",
      "district": "string",
      "city": "string",
      "state_code": "string",
      "country": "string",
      "extra_address_info": "string"
    },
    "contact_info": {
      "email": "string",
      "phone_number": "string"
    },
    "documents": {
      "physical": [
        {
          "value": "string",
          "type": "CONTRATO-SOCIAL"
        }
      ]
    }
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/accounts',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /api/v1/accounts

Create a new account.

Body parameter

{
  "business": {
    "business_id": "string",
    "name": "string",
    "legal_name": "string",
    "address": {
      "street_name": "string",
      "street_number": "string",
      "postal_code": "string",
      "district": "string",
      "city": "string",
      "state_code": "string",
      "country": "string",
      "extra_address_info": "string"
    },
    "contact_info": {
      "email": "string",
      "phone_number": "string"
    },
    "documents": {
      "physical": [
        {
          "value": "string",
          "type": "CONTRATO-SOCIAL"
        }
      ]
    }
  }
}

Parameters

Name In Type Required Description
authorization header string true none
body body object true none
» business body object false none
»» business_id body string true none
»» name body string true none
»» legal_name body string true none
»» address body object true none
»»» street_name body string true none
»»» street_number body string true none
»»» postal_code body string true none
»»» district body string true none
»»» city body string true none
»»» state_code body string true none
»»» country body string true none
»»» extra_address_info body string false none
»» contact_info body object true none
»»» email body string true none
»»» phone_number body string true none
»» documents body object true none
»»» physical body [object] true none
»»»» flow.schema/BusinessPhysicalDocumentCreate body object false none
»»»»» value body string true none
»»»»» type body string true none

Enumerated Values

Parameter Value
»»»»» type CONTRATO-SOCIAL

Example responses

200 Response

{
  "data": {
    "id": 0,
    "status": "pending",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "line_of_credit": 0,
    "available_credit": 0,
    "business": {
      "legal_name": "string",
      "name": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "address": {
        "street_name": "string",
        "street_number": "string",
        "postal_code": "string",
        "district": "string",
        "city": "string",
        "state_code": "string",
        "country": "string",
        "extra_address_info": "string"
      },
      "documents": {
        "virtual": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "value": "string",
            "timestamp": "2019-08-24T14:15:22Z",
            "type": "string",
            "exp": "string",
            "issuer": "string"
          }
        ],
        "physical": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "timestamp": "2019-08-24T14:15:22Z",
            "type": "string",
            "extension": "string"
          }
        ]
      },
      "contact_info": {
        "email": "string",
        "phone_number": "string"
      },
      "created_at": "2019-08-24T14:15:22Z",
      "account_id": 0,
      "business_id": "string"
    },
    "tos_acceptance": {
      "date": "2019-08-24T14:15:22Z",
      "ip": "string",
      "user_agent": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data object true none none
»» id integer(int32) true none none
»» status string true none none
»» created_at string(date-time) true none none
»» updated_at string(date-time) true none none
»» line_of_credit number(double)¦null true none none
»» available_credit number(double)¦null true none none
»» business object¦null false none none
»»» legal_name string true none none
»»» name string true none none
»»» updated_at string(date-time) true none none
»»» address object true none none
»»»» street_name string true none none
»»»» street_number string true none none
»»»» postal_code string true none none
»»»» district string true none none
»»»» city string true none none
»»»» state_code string true none none
»»»» country string true none none
»»»» extra_address_info string false none none
»»» documents object true none none
»»»» virtual [object] false none none
»»»»» flow-app.schemas.models/VirtualDocument object false none none
»»»»»» id string(uuid) true none none
»»»»»» value string true none none
»»»»»» timestamp string(date-time) true none none
»»»»»» type string true none none
»»»»»» exp string false none none
»»»»»» issuer string false none none
»»»» physical [object] false none none
»»»»» flow.schema/PhysicalDocumentRes object false none none
»»»»»» id string(uuid) true none none
»»»»»» timestamp string(date-time) true none none
»»»»»» type string true none none
»»»»»» extension string¦null false none none
»»» contact_info object true none none
»»»» email string true none none
»»»» phone_number string true none none
»»» created_at string(date-time) true none none
»»» account_id integer(int32) true none none
»»» business_id string true none none
»» tos_acceptance object¦null true none none
»»» date string(date-time) true none none
»»» ip string true none none
»»» user_agent string true none none

Enumerated Values

Property Value
status pending
status approved
status under-review

Retrieve an account by id

Code samples

# You can also use wget
curl -X GET /api/v1/accounts/{account-id} \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.get('/api/v1/accounts/{account-id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/accounts/{account-id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /api/v1/accounts/{account-id}

Retrieve the details of an existing account by account id.

Parameters

Name In Type Required Description
authorization header string true none
account-id path integer(int32) true none

Example responses

200 Response

{
  "data": {
    "id": 0,
    "status": "pending",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "line_of_credit": 0,
    "available_credit": 0,
    "business": {
      "legal_name": "string",
      "name": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "address": {
        "street_name": "string",
        "street_number": "string",
        "postal_code": "string",
        "district": "string",
        "city": "string",
        "state_code": "string",
        "country": "string",
        "extra_address_info": "string"
      },
      "documents": {
        "virtual": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "value": "string",
            "timestamp": "2019-08-24T14:15:22Z",
            "type": "string",
            "exp": "string",
            "issuer": "string"
          }
        ],
        "physical": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "timestamp": "2019-08-24T14:15:22Z",
            "type": "string",
            "extension": "string"
          }
        ]
      },
      "contact_info": {
        "email": "string",
        "phone_number": "string"
      },
      "created_at": "2019-08-24T14:15:22Z",
      "account_id": 0,
      "business_id": "string"
    },
    "tos_acceptance": {
      "date": "2019-08-24T14:15:22Z",
      "ip": "string",
      "user_agent": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data object true none none
»» id integer(int32) true none none
»» status string true none none
»» created_at string(date-time) true none none
»» updated_at string(date-time) true none none
»» line_of_credit number(double)¦null true none none
»» available_credit number(double)¦null true none none
»» business object¦null false none none
»»» legal_name string true none none
»»» name string true none none
»»» updated_at string(date-time) true none none
»»» address object true none none
»»»» street_name string true none none
»»»» street_number string true none none
»»»» postal_code string true none none
»»»» district string true none none
»»»» city string true none none
»»»» state_code string true none none
»»»» country string true none none
»»»» extra_address_info string false none none
»»» documents object true none none
»»»» virtual [object] false none none
»»»»» flow-app.schemas.models/VirtualDocument object false none none
»»»»»» id string(uuid) true none none
»»»»»» value string true none none
»»»»»» timestamp string(date-time) true none none
»»»»»» type string true none none
»»»»»» exp string false none none
»»»»»» issuer string false none none
»»»» physical [object] false none none
»»»»» flow.schema/PhysicalDocumentRes object false none none
»»»»»» id string(uuid) true none none
»»»»»» timestamp string(date-time) true none none
»»»»»» type string true none none
»»»»»» extension string¦null false none none
»»» contact_info object true none none
»»»» email string true none none
»»»» phone_number string true none none
»»» created_at string(date-time) true none none
»»» account_id integer(int32) true none none
»»» business_id string true none none
»» tos_acceptance object¦null true none none
»»» date string(date-time) true none none
»»» ip string true none none
»»» user_agent string true none none

Enumerated Values

Property Value
status pending
status approved
status under-review

Delete an account

Code samples

# You can also use wget
curl -X DELETE /api/v1/accounts/{account-id} \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.delete('/api/v1/accounts/{account-id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/accounts/{account-id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /api/v1/accounts/{account-id}

Delete an account by id.

Parameters

Name In Type Required Description
authorization header string true none
account-id path integer(int32) true none

Example responses

204 Response

"string"

Responses

Status Meaning Description Schema
204 No Content none string

Update an account

Code samples

# You can also use wget
curl -X PATCH /api/v1/accounts/{account-id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.patch('/api/v1/accounts/{account-id}', headers = headers)

print(r.json())

const inputBody = '{
  "business": {
    "business_id": "string",
    "name": "string",
    "legal_name": "string",
    "address": {
      "street_name": "string",
      "street_number": "string",
      "postal_code": "string",
      "district": "string",
      "city": "string",
      "state_code": "string",
      "country": "string",
      "extra_address_info": "string"
    },
    "contact_info": {
      "email": "string",
      "phone_number": "string"
    },
    "documents": {
      "physical": [
        {
          "value": "string",
          "type": "CONTRATO-SOCIAL"
        }
      ]
    }
  },
  "tos_acceptance": {
    "date": "2019-08-24T14:15:22Z",
    "ip": "string",
    "user_agent": "string"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/accounts/{account-id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /api/v1/accounts/{account-id}

Update one or many fields of an existing account.

Body parameter

{
  "business": {
    "business_id": "string",
    "name": "string",
    "legal_name": "string",
    "address": {
      "street_name": "string",
      "street_number": "string",
      "postal_code": "string",
      "district": "string",
      "city": "string",
      "state_code": "string",
      "country": "string",
      "extra_address_info": "string"
    },
    "contact_info": {
      "email": "string",
      "phone_number": "string"
    },
    "documents": {
      "physical": [
        {
          "value": "string",
          "type": "CONTRATO-SOCIAL"
        }
      ]
    }
  },
  "tos_acceptance": {
    "date": "2019-08-24T14:15:22Z",
    "ip": "string",
    "user_agent": "string"
  }
}

Parameters

Name In Type Required Description
authorization header string true none
account-id path integer(int32) true none
body body object true none
» business body object false none
»» business_id body string true none
»» name body string true none
»» legal_name body string true none
»» address body object true none
»»» street_name body string true none
»»» street_number body string true none
»»» postal_code body string true none
»»» district body string true none
»»» city body string true none
»»» state_code body string true none
»»» country body string true none
»»» extra_address_info body string false none
»» contact_info body object true none
»»» email body string true none
»»» phone_number body string true none
»» documents body object true none
»»» physical body [object] true none
»»»» flow.schema/BusinessPhysicalDocumentCreate body object false none
»»»»» value body string true none
»»»»» type body string true none
» tos_acceptance body object false none
»» date body string(date-time) true none
»» ip body string true none
»» user_agent body string true none

Enumerated Values

Parameter Value
»»»»» type CONTRATO-SOCIAL

Example responses

204 Response

"string"

Responses

Status Meaning Description Schema
204 No Content none string

List all persons

Code samples

# You can also use wget
curl -X GET /api/v1/accounts/{account-id}/persons \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.get('/api/v1/accounts/{account-id}/persons', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/accounts/{account-id}/persons',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /api/v1/accounts/{account-id}/persons

Retrieve all persons associated with the account.

Parameters

Name In Type Required Description
authorization header string true none
account-id path integer(int32) true none

Example responses

200 Response

{
  "data": [
    {
      "id_number": "string",
      "marital_status": "married",
      "pep": true,
      "id": 0,
      "updated_at": "2019-08-24T14:15:22Z",
      "address": {
        "street_name": "string",
        "street_number": "string",
        "postal_code": "string",
        "district": "string",
        "city": "string",
        "state_code": "string",
        "country": "string",
        "extra_address_info": "string"
      },
      "last_name": "string",
      "first_name": "string",
      "documents": {
        "virtual": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "value": "string",
            "timestamp": "2019-08-24T14:15:22Z",
            "type": "string",
            "exp": "string",
            "issuer": "string"
          }
        ],
        "physical": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "timestamp": "2019-08-24T14:15:22Z",
            "type": "string",
            "extension": "string"
          }
        ]
      },
      "contact_info": {
        "email": "string",
        "phone_number": "string"
      },
      "created_at": "2019-08-24T14:15:22Z",
      "account_opener": true,
      "account_id": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data [object] true none none
»» id_number string true none none
»» marital_status string true none none
»» pep boolean true none none
»» id integer(int32) true none none
»» updated_at string(date-time) true none none
»» address object true none none
»»» street_name string true none none
»»» street_number string true none none
»»» postal_code string true none none
»»» district string true none none
»»» city string true none none
»»» state_code string true none none
»»» country string true none none
»»» extra_address_info string false none none
»» last_name string true none none
»» first_name string true none none
»» documents object true none none
»»» virtual [object] false none none
»»»» flow-app.schemas.models/VirtualDocument object false none none
»»»»» id string(uuid) true none none
»»»»» value string true none none
»»»»» timestamp string(date-time) true none none
»»»»» type string true none none
»»»»» exp string false none none
»»»»» issuer string false none none
»»» physical [object] false none none
»»»» flow.schema/PhysicalDocumentRes object false none none
»»»»» id string(uuid) true none none
»»»»» timestamp string(date-time) true none none
»»»»» type string true none none
»»»»» extension string¦null false none none
»» contact_info object true none none
»»» email string true none none
»»» phone_number string true none none
»» created_at string(date-time) true none none
»» account_opener boolean false none none
»» account_id integer(int32) true none none

Enumerated Values

Property Value
marital_status married
marital_status legally-separated
marital_status single
marital_status other
marital_status divorced
marital_status widowed

Create a person

Code samples

# You can also use wget
curl -X POST /api/v1/accounts/{account-id}/persons \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.post('/api/v1/accounts/{account-id}/persons', headers = headers)

print(r.json())

const inputBody = '{
  "id_number": "string",
  "marital_status": "married",
  "pep": true,
  "address": {
    "street_name": "string",
    "street_number": "string",
    "postal_code": "string",
    "district": "string",
    "city": "string",
    "state_code": "string",
    "country": "string",
    "extra_address_info": "string"
  },
  "last_name": "string",
  "first_name": "string",
  "documents": {
    "physical": [
      {
        "value": "string",
        "type": "CNH"
      }
    ],
    "virtual": [
      {
        "value": "string",
        "exp": "string",
        "issuer": "string",
        "type": "CNH"
      }
    ]
  },
  "contact_info": {
    "email": "string",
    "phone_number": "string"
  },
  "account_opener": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/accounts/{account-id}/persons',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /api/v1/accounts/{account-id}/persons

Create a new person.

Body parameter

{
  "id_number": "string",
  "marital_status": "married",
  "pep": true,
  "address": {
    "street_name": "string",
    "street_number": "string",
    "postal_code": "string",
    "district": "string",
    "city": "string",
    "state_code": "string",
    "country": "string",
    "extra_address_info": "string"
  },
  "last_name": "string",
  "first_name": "string",
  "documents": {
    "physical": [
      {
        "value": "string",
        "type": "CNH"
      }
    ],
    "virtual": [
      {
        "value": "string",
        "exp": "string",
        "issuer": "string",
        "type": "CNH"
      }
    ]
  },
  "contact_info": {
    "email": "string",
    "phone_number": "string"
  },
  "account_opener": true
}

Parameters

Name In Type Required Description
authorization header string true none
account-id path integer(int32) true none
body body object true none
» id_number body string true none
» marital_status body string true none
» pep body boolean true none
» address body object true none
»» street_name body string true none
»» street_number body string true none
»» postal_code body string true none
»» district body string true none
»» city body string true none
»» state_code body string true none
»» country body string true none
»» extra_address_info body string false none
» last_name body string true none
» first_name body string true none
» documents body object true none
»» physical body [object] true none
»»» flow.schema/PersonPhysicalDocumentCreate body object false none
»»»» value body string true none
»»»» type body string true none
»» virtual body [object] false none
»»» value body string true none
»»» exp body string false none
»»» issuer body string false none
»»» type body string true none
» contact_info body object true none
»» email body string true none
»» phone_number body string true none
» account_opener body boolean false none

Enumerated Values

Parameter Value
» marital_status married
» marital_status legally-separated
» marital_status single
» marital_status other
» marital_status divorced
» marital_status widowed
»»»» type CNH
»»»» type RG
»»» type CNH
»»» type RG

Example responses

200 Response

{
  "data": {
    "id_number": "string",
    "marital_status": "married",
    "pep": true,
    "id": 0,
    "updated_at": "2019-08-24T14:15:22Z",
    "address": {
      "street_name": "string",
      "street_number": "string",
      "postal_code": "string",
      "district": "string",
      "city": "string",
      "state_code": "string",
      "country": "string",
      "extra_address_info": "string"
    },
    "last_name": "string",
    "first_name": "string",
    "documents": {
      "virtual": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "value": "string",
          "timestamp": "2019-08-24T14:15:22Z",
          "type": "string",
          "exp": "string",
          "issuer": "string"
        }
      ],
      "physical": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "timestamp": "2019-08-24T14:15:22Z",
          "type": "string",
          "extension": "string"
        }
      ]
    },
    "contact_info": {
      "email": "string",
      "phone_number": "string"
    },
    "created_at": "2019-08-24T14:15:22Z",
    "account_opener": true,
    "account_id": 0
  }
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data object true none none
»» id_number string true none none
»» marital_status string true none none
»» pep boolean true none none
»» id integer(int32) true none none
»» updated_at string(date-time) true none none
»» address object true none none
»»» street_name string true none none
»»» street_number string true none none
»»» postal_code string true none none
»»» district string true none none
»»» city string true none none
»»» state_code string true none none
»»» country string true none none
»»» extra_address_info string false none none
»» last_name string true none none
»» first_name string true none none
»» documents object true none none
»»» virtual [object] false none none
»»»» flow-app.schemas.models/VirtualDocument object false none none
»»»»» id string(uuid) true none none
»»»»» value string true none none
»»»»» timestamp string(date-time) true none none
»»»»» type string true none none
»»»»» exp string false none none
»»»»» issuer string false none none
»»» physical [object] false none none
»»»» flow.schema/PhysicalDocumentRes object false none none
»»»»» id string(uuid) true none none
»»»»» timestamp string(date-time) true none none
»»»»» type string true none none
»»»»» extension string¦null false none none
»» contact_info object true none none
»»» email string true none none
»»» phone_number string true none none
»» created_at string(date-time) true none none
»» account_opener boolean false none none
»» account_id integer(int32) true none none

Enumerated Values

Property Value
marital_status married
marital_status legally-separated
marital_status single
marital_status other
marital_status divorced
marital_status widowed

Retrieve a person

Code samples

# You can also use wget
curl -X GET /api/v1/accounts/{account-id}/persons/{person-id} \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.get('/api/v1/accounts/{account-id}/persons/{person-id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/accounts/{account-id}/persons/{person-id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /api/v1/accounts/{account-id}/persons/{person-id}

Retrieve a person by id.

Parameters

Name In Type Required Description
authorization header string true none
account-id path integer(int32) true none
person-id path integer(int32) true none

Example responses

200 Response

{
  "data": {
    "id_number": "string",
    "marital_status": "married",
    "pep": true,
    "id": 0,
    "updated_at": "2019-08-24T14:15:22Z",
    "address": {
      "street_name": "string",
      "street_number": "string",
      "postal_code": "string",
      "district": "string",
      "city": "string",
      "state_code": "string",
      "country": "string",
      "extra_address_info": "string"
    },
    "last_name": "string",
    "first_name": "string",
    "documents": {
      "virtual": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "value": "string",
          "timestamp": "2019-08-24T14:15:22Z",
          "type": "string",
          "exp": "string",
          "issuer": "string"
        }
      ],
      "physical": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "timestamp": "2019-08-24T14:15:22Z",
          "type": "string",
          "extension": "string"
        }
      ]
    },
    "contact_info": {
      "email": "string",
      "phone_number": "string"
    },
    "created_at": "2019-08-24T14:15:22Z",
    "account_opener": true,
    "account_id": 0
  }
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data object true none none
»» id_number string true none none
»» marital_status string true none none
»» pep boolean true none none
»» id integer(int32) true none none
»» updated_at string(date-time) true none none
»» address object true none none
»»» street_name string true none none
»»» street_number string true none none
»»» postal_code string true none none
»»» district string true none none
»»» city string true none none
»»» state_code string true none none
»»» country string true none none
»»» extra_address_info string false none none
»» last_name string true none none
»» first_name string true none none
»» documents object true none none
»»» virtual [object] false none none
»»»» flow-app.schemas.models/VirtualDocument object false none none
»»»»» id string(uuid) true none none
»»»»» value string true none none
»»»»» timestamp string(date-time) true none none
»»»»» type string true none none
»»»»» exp string false none none
»»»»» issuer string false none none
»»» physical [object] false none none
»»»» flow.schema/PhysicalDocumentRes object false none none
»»»»» id string(uuid) true none none
»»»»» timestamp string(date-time) true none none
»»»»» type string true none none
»»»»» extension string¦null false none none
»» contact_info object true none none
»»» email string true none none
»»» phone_number string true none none
»» created_at string(date-time) true none none
»» account_opener boolean false none none
»» account_id integer(int32) true none none

Enumerated Values

Property Value
marital_status married
marital_status legally-separated
marital_status single
marital_status other
marital_status divorced
marital_status widowed

Delete a person

Code samples

# You can also use wget
curl -X DELETE /api/v1/accounts/{account-id}/persons/{person-id} \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.delete('/api/v1/accounts/{account-id}/persons/{person-id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/accounts/{account-id}/persons/{person-id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /api/v1/accounts/{account-id}/persons/{person-id}

Delete a person.

Parameters

Name In Type Required Description
authorization header string true none
account-id path integer(int32) true none
person-id path integer(int32) true none

Example responses

204 Response

"string"

Responses

Status Meaning Description Schema
204 No Content none string

Update a person

Code samples

# You can also use wget
curl -X PATCH /api/v1/accounts/{account-id}/persons/{person-id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.patch('/api/v1/accounts/{account-id}/persons/{person-id}', headers = headers)

print(r.json())

const inputBody = '{
  "id_number": "string",
  "marital_status": "married",
  "pep": true,
  "address": {
    "street_name": "string",
    "street_number": "string",
    "postal_code": "string",
    "district": "string",
    "city": "string",
    "state_code": "string",
    "country": "string",
    "extra_address_info": "string"
  },
  "last_name": "string",
  "first_name": "string",
  "documents": {
    "physical": [
      {
        "value": "string",
        "type": "CNH"
      }
    ],
    "virtual": [
      {
        "value": "string",
        "exp": "string",
        "issuer": "string",
        "type": "CNH"
      }
    ]
  },
  "contact_info": {
    "email": "string",
    "phone_number": "string"
  },
  "account_opener": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/accounts/{account-id}/persons/{person-id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /api/v1/accounts/{account-id}/persons/{person-id}

Update one or many fields of an existing person.

Body parameter

{
  "id_number": "string",
  "marital_status": "married",
  "pep": true,
  "address": {
    "street_name": "string",
    "street_number": "string",
    "postal_code": "string",
    "district": "string",
    "city": "string",
    "state_code": "string",
    "country": "string",
    "extra_address_info": "string"
  },
  "last_name": "string",
  "first_name": "string",
  "documents": {
    "physical": [
      {
        "value": "string",
        "type": "CNH"
      }
    ],
    "virtual": [
      {
        "value": "string",
        "exp": "string",
        "issuer": "string",
        "type": "CNH"
      }
    ]
  },
  "contact_info": {
    "email": "string",
    "phone_number": "string"
  },
  "account_opener": true
}

Parameters

Name In Type Required Description
authorization header string true none
account-id path integer(int32) true none
person-id path integer(int32) true none
body body object true none
» id_number body string false none
» marital_status body string false none
» pep body boolean false none
» address body object false none
»» street_name body string true none
»» street_number body string true none
»» postal_code body string true none
»» district body string true none
»» city body string true none
»» state_code body string true none
»» country body string true none
»» extra_address_info body string false none
» last_name body string false none
» first_name body string false none
» documents body object false none
»» physical body [object] true none
»»» flow.schema/PersonPhysicalDocumentCreate body object false none
»»»» value body string true none
»»»» type body string true none
»» virtual body [object] false none
»»» value body string true none
»»» exp body string false none
»»» issuer body string false none
»»» type body string true none
» contact_info body object false none
»» email body string true none
»» phone_number body string true none
» account_opener body boolean false none

Enumerated Values

Parameter Value
» marital_status married
» marital_status legally-separated
» marital_status single
» marital_status other
» marital_status divorced
» marital_status widowed
»»»» type CNH
»»»» type RG
»»» type CNH
»»» type RG

Example responses

204 Response

"string"

Responses

Status Meaning Description Schema
204 No Content none string

Loan Preview

Preview loan offers

Code samples

# You can also use wget
curl -X POST /api/v1/loan-preview \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'authorization: string' \
  -H 'account-id: 0' \
  -H 'beneficiary-id: string'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'authorization': 'string',
  'account-id': '0',
  'beneficiary-id': 'string'
}

r = requests.post('/api/v1/loan-preview', headers = headers)

print(r.json())

const inputBody = '{
  "amount": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'authorization':'string',
  'account-id':'0',
  'beneficiary-id':'string'
};

fetch('/api/v1/loan-preview',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /api/v1/loan-preview

Prior to submitting the loan application, submit the prospective loan to a preview API call.

Body parameter

{
  "amount": 0
}

Parameters

Name In Type Required Description
authorization header string true none
account-id header integer(int32) true none
beneficiary-id header string false none
body body object true none
» amount body number(double) true none

Example responses

200 Response

{
  "data": [
    {
      "amount": 0,
      "interest_rate": 0,
      "term": 0,
      "total_debt": 0,
      "installment_amount": 0,
      "offer_token": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data [object] true none none
»» amount number(double) true none none
»» interest_rate number(double) true none none
»» term integer(int32) true none none
»» total_debt number(double) true none none
»» installment_amount number(double) true none none
»» offer_token string true none none

Loans

Retrieve all loans by Account

Code samples

# You can also use wget
curl -X GET /api/v1/loans \
  -H 'Accept: application/json' \
  -H 'authorization: string' \
  -H 'account-id: 0'

import requests
headers = {
  'Accept': 'application/json',
  'authorization': 'string',
  'account-id': '0'
}

r = requests.get('/api/v1/loans', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'authorization':'string',
  'account-id':'0'
};

fetch('/api/v1/loans',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /api/v1/loans

Retrieve all loans associated with the account-id.

Parameters

Name In Type Required Description
authorization header string true none
account-id header integer(int32) true none
page query integer(int32) false none
limit query integer(int32) false none

Example responses

200 Response

{
  "page": 0,
  "total": 0,
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "offer_token": "string",
      "account_id": 0,
      "ccb_url": "string",
      "balance": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "details": {
        "pt_br": {
          "vlr_financiado": 0,
          "qtde_parcelas": 0,
          "perc_juros_mensal": 0,
          "perc_cet_mensal": 0,
          "vlr_parcela": 0,
          "vlr_total_divida": 0
        }
      },
      "signature": {
        "date": "2019-08-24T14:15:22Z",
        "ip": "string",
        "user_agent": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» page integer(int32) true none none
» total integer(int32) true none none
» data [object] true none none
»» id string(uuid) true none none
»» offer_token string true none none
»» account_id integer(int32) true none none
»» ccb_url string true none none
»» balance number(double) false none none
»» created_at string(date-time) true none none
»» details object true none none
»»» pt_br object true none none
»»»» vlr_financiado number(double) true none none
»»»» qtde_parcelas integer(int32) true none none
»»»» perc_juros_mensal number(double) true none none
»»»» perc_cet_mensal number(double) true none none
»»»» vlr_parcela number(double) true none none
»»»» vlr_total_divida number(double) true none none
»» signature object¦null true none none
»»» date string(date-time) true none none
»»» ip string true none none
»»» user_agent string true none none

Create a loan

Code samples

# You can also use wget
curl -X POST /api/v1/loans \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'authorization: string' \
  -H 'account-id: 0'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'authorization': 'string',
  'account-id': '0'
}

r = requests.post('/api/v1/loans', headers = headers)

print(r.json())

const inputBody = '{
  "offer_token": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'authorization':'string',
  'account-id':'0'
};

fetch('/api/v1/loans',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /api/v1/loans

Create a loan

Body parameter

{
  "offer_token": "string"
}

Parameters

Name In Type Required Description
authorization header string true none
account-id header integer(int32) true none
body body object true none
» offer_token body string true none

Example responses

200 Response

{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "offer_token": "string",
    "account_id": 0,
    "ccb_url": "string",
    "balance": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "details": {
      "pt_br": {
        "vlr_financiado": 0,
        "qtde_parcelas": 0,
        "perc_juros_mensal": 0,
        "perc_cet_mensal": 0,
        "vlr_parcela": 0,
        "vlr_total_divida": 0
      }
    },
    "signature": {
      "date": "2019-08-24T14:15:22Z",
      "ip": "string",
      "user_agent": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data object true none none
»» id string(uuid) true none none
»» offer_token string true none none
»» account_id integer(int32) true none none
»» ccb_url string true none none
»» balance number(double) false none none
»» created_at string(date-time) true none none
»» details object true none none
»»» pt_br object true none none
»»»» vlr_financiado number(double) true none none
»»»» qtde_parcelas integer(int32) true none none
»»»» perc_juros_mensal number(double) true none none
»»»» perc_cet_mensal number(double) true none none
»»»» vlr_parcela number(double) true none none
»»»» vlr_total_divida number(double) true none none
»» signature object¦null true none none
»»» date string(date-time) true none none
»»» ip string true none none
»»» user_agent string true none none

Retrieve a loan by id

Code samples

# You can also use wget
curl -X GET /api/v1/loans/{id} \
  -H 'Accept: application/json' \
  -H 'authorization: string' \
  -H 'account-id: 0'

import requests
headers = {
  'Accept': 'application/json',
  'authorization': 'string',
  'account-id': '0'
}

r = requests.get('/api/v1/loans/{id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'authorization':'string',
  'account-id':'0'
};

fetch('/api/v1/loans/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /api/v1/loans/{id}

Retrieve the details of an existing loan by id.

Parameters

Name In Type Required Description
authorization header string true none
account-id header integer(int32) true none
id path string(uuid) true none

Example responses

200 Response

{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "offer_token": "string",
    "account_id": 0,
    "ccb_url": "string",
    "balance": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "details": {
      "pt_br": {
        "vlr_financiado": 0,
        "qtde_parcelas": 0,
        "perc_juros_mensal": 0,
        "perc_cet_mensal": 0,
        "vlr_parcela": 0,
        "vlr_total_divida": 0
      }
    },
    "signature": {
      "date": "2019-08-24T14:15:22Z",
      "ip": "string",
      "user_agent": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data object true none none
»» id string(uuid) true none none
»» offer_token string true none none
»» account_id integer(int32) true none none
»» ccb_url string true none none
»» balance number(double) false none none
»» created_at string(date-time) true none none
»» details object true none none
»»» pt_br object true none none
»»»» vlr_financiado number(double) true none none
»»»» qtde_parcelas integer(int32) true none none
»»»» perc_juros_mensal number(double) true none none
»»»» perc_cet_mensal number(double) true none none
»»»» vlr_parcela number(double) true none none
»»»» vlr_total_divida number(double) true none none
»» signature object¦null true none none
»»» date string(date-time) true none none
»»» ip string true none none
»»» user_agent string true none none

Update a Loan

Code samples

# You can also use wget
curl -X PATCH /api/v1/loans/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'authorization: string' \
  -H 'account-id: 0'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'authorization': 'string',
  'account-id': '0'
}

r = requests.patch('/api/v1/loans/{id}', headers = headers)

print(r.json())

const inputBody = '{
  "signature": {
    "date": "2019-08-24T14:15:22Z",
    "ip": "string",
    "user-agent": "string"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'authorization':'string',
  'account-id':'0'
};

fetch('/api/v1/loans/{id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /api/v1/loans/{id}

Update (and sign) loan

Body parameter

{
  "signature": {
    "date": "2019-08-24T14:15:22Z",
    "ip": "string",
    "user-agent": "string"
  }
}

Parameters

Name In Type Required Description
authorization header string true none
account-id header integer(int32) true none
id path string(uuid) true none
body body object true none
» signature body object¦null true none
»» date body string(date-time) true none
»» ip body string true none
»» user-agent body string true none

Example responses

204 Response

"string"

Responses

Status Meaning Description Schema
204 No Content none string

Webhook Endpoints

List all webhook endpoints

Code samples

# You can also use wget
curl -X GET /api/v1/webhook-endpoints \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.get('/api/v1/webhook-endpoints', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/webhook-endpoints',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /api/v1/webhook-endpoints

Retrieve all your webhook endpoints.

Parameters

Name In Type Required Description
authorization header string true none

Example responses

200 Response

{
  "data": [
    {
      "id": 0,
      "url": "string",
      "status": "disabled",
      "events": [
        "account.created"
      ],
      "created": "2019-08-24T14:15:22Z",
      "updated": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data [object] true none none
»» flow.schema/Webhook object false none none
»»» id integer(int32) true none none
»»» url string true none none
»»» status string true none none
»»» events [string] true none none
»»» created string(date-time) true none none
»»» updated string(date-time) true none none

Enumerated Values

Property Value
status disabled
status enabled

Create webhook endpoints

Code samples

# You can also use wget
curl -X POST /api/v1/webhook-endpoints \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.post('/api/v1/webhook-endpoints', headers = headers)

print(r.json())

const inputBody = '{
  "url": "string",
  "events": [
    "account.created"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/webhook-endpoints',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /api/v1/webhook-endpoints

Create a new webhook endpoint.

Body parameter

{
  "url": "string",
  "events": [
    "account.created"
  ]
}

Parameters

Name In Type Required Description
authorization header string true none
body body object true none
» url body string true none
» events body [string] true none

Enumerated Values

Parameter Value
» events account.created
» events person.updated
» events account.updated
» events loan.updated
» events loan.created
» events person.created

Example responses

200 Response

{
  "data": {
    "id": 0,
    "url": "string",
    "status": "disabled",
    "events": [
      "account.created"
    ],
    "created": "2019-08-24T14:15:22Z",
    "updated": "2019-08-24T14:15:22Z"
  }
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data object true none none
»» id integer(int32) true none none
»» url string true none none
»» status string true none none
»» events [string] true none none
»» created string(date-time) true none none
»» updated string(date-time) true none none

Enumerated Values

Property Value
status disabled
status enabled

Retrieve a webhook endpoint by id

Code samples

# You can also use wget
curl -X GET /api/v1/webhook-endpoints/{webhook-id} \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.get('/api/v1/webhook-endpoints/{webhook-id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/webhook-endpoints/{webhook-id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /api/v1/webhook-endpoints/{webhook-id}

Retrieve the details of an existing webhook endpoint by webhook id.

Parameters

Name In Type Required Description
authorization header string true none
webhook-id path integer(int32) true none

Example responses

200 Response

{
  "data": {
    "id": 0,
    "url": "string",
    "status": "disabled",
    "events": [
      "account.created"
    ],
    "created": "2019-08-24T14:15:22Z",
    "updated": "2019-08-24T14:15:22Z"
  }
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data object true none none
»» id integer(int32) true none none
»» url string true none none
»» status string true none none
»» events [string] true none none
»» created string(date-time) true none none
»» updated string(date-time) true none none

Enumerated Values

Property Value
status disabled
status enabled

Delete webhook endpoint

Code samples

# You can also use wget
curl -X DELETE /api/v1/webhook-endpoints/{webhook-id} \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.delete('/api/v1/webhook-endpoints/{webhook-id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/webhook-endpoints/{webhook-id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /api/v1/webhook-endpoints/{webhook-id}

Delete a webhook endpoint by id.

Parameters

Name In Type Required Description
authorization header string true none
webhook-id path integer(int32) true none

Example responses

204 Response

"string"

Responses

Status Meaning Description Schema
204 No Content none string

Update a webhook endpoint

Code samples

# You can also use wget
curl -X PATCH /api/v1/webhook-endpoints/{webhook-id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'authorization: string'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'authorization': 'string'
}

r = requests.patch('/api/v1/webhook-endpoints/{webhook-id}', headers = headers)

print(r.json())

const inputBody = '{
  "url": "string",
  "status": "disabled",
  "events": [
    "account.created"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'authorization':'string'
};

fetch('/api/v1/webhook-endpoints/{webhook-id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /api/v1/webhook-endpoints/{webhook-id}

Update one or many fields of an existing webhook endpoint.

Body parameter

{
  "url": "string",
  "status": "disabled",
  "events": [
    "account.created"
  ]
}

Parameters

Name In Type Required Description
authorization header string true none
webhook-id path integer(int32) true none
body body object true none
» url body string false none
» status body string false none
» events body [string] false none

Enumerated Values

Parameter Value
» status disabled
» status enabled
» events account.created
» events person.updated
» events account.updated
» events loan.updated
» events loan.created
» events person.created

Example responses

200 Response

{
  "data": {
    "updated": true
  }
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» data object true none none
»» updated boolean true none none