Standards
To simplify integration and ensure data integrity, some standards have been defined and are followed throughout the API.
Monetary Values
Examples:
10000
12345
98741
1223
1
0
The APIs assume that all monetary values sent are in Brazilian Reais. Values must be sent as integers in cents.
Date and Time with Timezone
Some examples:
2019-10-15T22:35:12.232-03:00
2018-05-01T13:32:11.297+00:00
2019-05-01T00:00:00.000+00:00
It is represented according to the ISO 8601 standard. In this case, the timezone is placed immediately after the time and should represent the timezone of the location where that data will be valid.
The validation mask is as follows:
YYYY-MM-ddThh:mm:ss.sss±hh:mm
Date and Time without Timezone
Some examples:
2019-10-15T22:35:12
2018-05-01T13:32:11
2019-05-01T00:00:00
It is represented according to the ISO 8601 standard. Data that is independent of timezones should be sent without one, always in UTC, using the letter Z to indicate that the data is in UTC. Therefore, the following format will be validated:
YYYY-MM-ddThh:mm:ss.sssZ
Date
Some examples:
2019-10-15
2019-01-01
2017-03-20
For fields that only receive a date—such as a birthdate—only the date, without any time, should be sent in the following format:
YYYY-MM-dd
Documents
Since document numbers vary widely and many include non-numeric characters, all document numbers are defined as strings. Another important reason to treat them as strings is to preserve leading zeros. Documents mentioned on this page follow a strict mask and will be validated accordingly. Other documents, like RG, due to their lack of standardization, will not be validated.
CPF
Examples of valid CPFs based on the defined mask:
123.456.789-12
321.987.543-23
111.283.333-00
Examples of invalid CPFs based on the defined mask:
8.577.477-8
08.104.627/0001-23
123.456.789-1
23.456.789-01
CPF is always defined as a string and will be validated against the following mask:
###.###.###-##
CNPJ
Examples of valid CNPJs based on the defined mask:
08.104.627/0001-02
01.079.210/0114-67
32.402.502/0001-35
Examples of invalid CNPJs based on the defined mask:
8.577.477-8
123.456.789-12
321.987.543-23
32.402.502/0001-3
032.402.502/0001-3
CNPJ is always defined as a string and will be validated against the following mask:
##.###.###/####-##
IP
Examples of valid IPs based on the defined mask:
201.81.161.86
201.081.161.86
201.81.161.086
201.81.0.1
Examples of invalid IPs:
201.81..86
358.81.161.86
201.81.161
IPs must always be sent in IPv4 format. Leading zeros are optional, as long as the following mask is respected:
###.###.###.###