Add New Customers - Venddor API Documentation

Add New Customers

This endpoint allows you to register new customers in the platform. It's designed to efficiently onboard new retailers who will purchase from your e-commerce platform.

Endpoint URL: /api/users/
POST /api/users/

Registers a new customer (retailer) in the system and links them to your vendor account.

Note: Only one customer can be registered per request. If the customer is already registered in the e-commerce platform, a new record won't be created to avoid duplication. However, the existing customer will be linked to your vendor account.

Authentication

Use Basic Authentication with your vendor credentials:

Authorization: Basic {base64_encoded_credentials}

Request Parameters

Basic Information

Parameter Type Required Description
email* string Yes Customer's email address
CNPJ* string Yes Customer's CNPJ (Brazilian company registration number) - numbers only
name* string Yes Customer's trade name (Nome Fantasia)
company* string Yes Customer's registered company name (Razão Social)
phone* string Yes Customer's phone number (preferably mobile)
responsavel* string Yes Name of the contact person at the customer's company

Business Classification

Parameter Type Required Description
segmento* integer Yes Customer's business segment ID. Options:
4 - Newsstands, Printing and Stationery
5 - Bars, Restaurants, Snack Bars and Bakeries
6 - Home and Construction
7 - Pharmacies, Medical Clinics and Perfumeries
8 - IT, Games and Electronics
9 - Markets and Grocery Stores
10 - Auto Repair Shops and Technical Assistance
11 - Service Providers
12 - Clothing, Footwear and Accessories
13 - Beauty Salons, Aesthetic Clinics and Spas
14 - Veterinary Clinics and Pet Shops
15 - Other
cnae_principal* string Yes Customer's main CNAE (Economic Activity Code) - numbers only

Tax Information

Parameter Type Required Description
inscricaoestadual* string Yes Customer's state registration number - numbers only
contribuinte_icms* integer Yes ICMS contributor status. Options:
1 - ICMS Contributor
2 - ICMS Non-Contributor
3 - Registration Exempt

Address Information

Parameter Type Required Description
s_address* string Yes Customer's street address and number
s_state* string Yes Customer's state
s_city* string Yes Customer's city
s_district* string Yes Customer's neighborhood
s_zipcode* string Yes Customer's ZIP code in the format 99999-999
s_phone string No Customer's phone number for delivery address

Request Example

Request Body
Success Response (201)
Error Response (400)
{
  "email": "email@demonstracao.com", 
  "CNPJ": "27876999000177",
  "name": "Nome Fantasia",
  "company": "Razão Social",
  "segmento": 12,
  "phone": "(11)99421-4743",
  "cnae_principal": "123456",
  "inscricaoestadual": "12345678",
  "contribuinte_icms": 3,
  "responsavel": "Nome da pessoa responsável",
  "s_address": "Nome da Rua, 333",
  "s_state": "São Paulo",
  "s_city": "Campinas",
  "s_district": "Bairro",
  "s_zipcode": "19008-350",
  "s_phone": "(11)3222-8899"
}
{
    "user_id": 17560,
    "profile_id": "17455"
}
{
    "message": "Bad Request: Já existe um outro usuário cadastrado na plataforma com o mesmo CNPJ. O CNPJ ou e-mail que você enviou já existe. Tente outros dados.",
    "status": 400
}

Response Status Codes

Status Code Description
201 Created Customer successfully registered
400 Bad Request Invalid request format or missing required fields
401 Unauthorized Missing or invalid authentication credentials

Response Fields

Field Type Description
user_id integer The unique identifier of the created customer
profile_id string The profile identifier of the created customer
Important: Only one customer can be added per request. If you need to register multiple customers, you must make separate API calls for each one.