Standards
To facilitate integration and ensure information integrity, several 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 representing 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 ISO 8601. In this case, the timezone is placed immediately after the time and must represent the timezone of the location where that data will be valid.
The mask used for validation 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 ISO 8601. Data that is independent of timezone must be sent with a Z at the end, indicating UTC. The following format will be validated:
YYYY-MM-ddThh:mm:ss.sssZ
Date
Some examples:
2019-10-15
2019-01-01
2017-03-20
In the case of fields that receive only the date, without any time, it must be sent in the following format:
YYYY-MM-dd
Documents
Since document numbers are quite varied and many of them contain characters that do not qualify as numeric, all document numbers are defined as strings. Another good reason to define them as strings is to prevent leading zeros from disappearing. Documents provided on this page have a well-defined mask and will be subject to validation. The remaining documents, such as RG (General Registration), given their lack of standardization, will not be validated.
CPF
Examples of valid CPFs against the defined mask:
123.456.789-12
321.987.543-23
111.283.333-00
Examples of invalid CPFs against the defined mask:
8.577.477-8
08.104.627/0001-23
123.456.789-1
23.456.789-01
The CPF is always defined as a string and will be validated against the mask:
###.###.###-##
CNPJ
Examples of valid CNPJs against the defined mask:
08.104.627/0001-02
01.079.210/0114-67
32.402.502/0001-35
Examples of invalid CNPJs against 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
The CNPJ is always defined as a string and will be validated against the mask:
##.###.###/####-##
IP
Examples of valid IPs against 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; leading zeros may or may not be sent, respecting the following mask:
###.###.###.###