Once the verification codes have been sent and duly checked, your application can now send the customer's information to request account creation.
curl --request POST \
--url https://whitelabel-sandbox.delbank.dev.br/v1/customers \
--header 'Content-Type: application/json-patch+json' \
--header 'x-delbank-partner-key: c4ca4238a0b923820dcc509a6f75849b' \
--data '{
"document": "012.874.010-82",
"name": "Josevaldo Peixoto",
"email": {
"value": "[email protected]",
"codeVerification": "9999"
},
"phone": {
"ddd": "79",
"number": "90000000",
"codeVerification": "9999"
},
"fatherName": "string",
"motherName": "string",
"monthlyInvoicing": 0,
"birthDate": "2023-06-21T19:40:08.300Z",
"educationLevel": "UNDEFINED",
"maritalStatus": "UNDEFINED",
"gender": "UNINFORMED",
"address": {
"publicPlace": "string",
"number": "string",
"zipCode": "49052260",
"neighborhood": "string",
"complement": "string",
"isConfirmed": true,
"type": "COMMERCIAL",
"cityId": 1,
"cityName": "Aracaju"
},
"password": "string",
"securityPassword": "secr",
"tokenNotification": "string"
}'
const axios = require('axios');
const data = {
document: '012.874.010-82',
name: 'Josevaldo Peixoto',
email: {
value: '[email protected]',
codeVerification: '9999'
},
phone: {
ddd: '79',
number: '90000000',
codeVerification: '9999'
},
fatherName: 'string',
motherName: 'string',
monthlyInvoicing: 0,
birthDate: '2023-06-21T19:40:08.300Z',
educationLevel: 'UNDEFINED',
maritalStatus: 'UNDEFINED',
gender: 'UNINFORMED',
address: {
publicPlace: 'string',
number: 'string',
zipCode: '49052260',
neighborhood: 'string',
complement: 'string',
isConfirmed: true,
type: 'COMMERCIAL',
cityId: 1,
cityName: 'Aracaju'
},
password: 'string',
securityPassword: 'secr'
};
const headers = {
'Content-Type': 'application/json-patch+json',
'x-delbank-partner-key': 'c4ca4238a0b923820dcc509a6f75849b'
};
axios.post('https://whitelabel-sandbox.delbank.dev.br/v1/customers', data, { headers })
.then(response => {
console.log('Response:', response.data);
})
.catch(error => {
console.error('Error:', error.response.data);
});
Enum | Accepted Values |
---|---|
educationLevel | Undefined: Undefined value. Illiterate: Represents an illiterate person. Elementary1To4Year: Represents the educational level corresponding to years 1 to 4 of elementary school. Elementary5Year: Represents the educational level corresponding to the 5th year of elementary school. Elementary6To4Year: Represents the educational level corresponding to years 6 to 9 of elementary school. CompleteElementary: Represents a person who has completed elementary school. IncompleteHighSchool: Represents a person with incomplete secondary education. CompleteHighSchool: Represents a person who has completed high school.. IncompleteHigher: Represents a person with incomplete higher education. CompleteHigher: Represents a person who has completed higher education. Postgraduate: Represents a person with a postgraduate level of education. MastersDegree:Represents a person with a master's degree. DoctorateDegree: Represents a person with a doctoral degree. |
maritalStatus | Undefined: Undefined value. Single: Represents a single person. Married: Represents a married person. LegallySeparated: Represents a legally separated person. Description: "Legally Separated" Divorced: Represents a divorced person. StableUnion: Represents a person in a stable union. Detached: Represents an detached or separated person Widower: Represents a widowed person. Others: Represents another marital status. |
gender | Uninformed: Value of information not provided. Male: Represents the male gender. Female: Represents the female gender. |
Pay attention to the fields:
password: login/access password. 6 digits.
securityPassword: transaction authorization password. 4 digits.
Usage recipe
Here you can see a practical example of how to use the method described above: https://github.com/DelbankDev/publico-api/tree/main/receitas/criacao-conta-pf-whitelabel/customers