POST
https://api.myidvirtual.com
/
resale
Criar Revenda
curl --request POST \
  --url https://api.myidvirtual.com/resale \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "email": "<string>",
  "phone": "<string>",
  "commission": 123
}
'
{
  "resale": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Revenda Premium",
    "email": "[email protected]",
    "phone": "+5511999999999",
    "commission": 15,
    "createdAt": "2024-01-15T10:30:00.000Z"
  },
  "message": "Resale cadastrado com sucesso"
}

Criar Revenda

Endpoint para criação de novas revendas.

Autenticação

Authorization
string
required
Bearer token JWT do usuário autenticado

Autorização

Request Body

name
string
required
Nome da revenda
email
string
required
Email do revendedor
phone
string
Telefone de contato
commission
number
Percentual de comissão

Responses

{
  "resale": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Revenda Premium",
    "email": "[email protected]",
    "phone": "+5511999999999",
    "commission": 15,
    "createdAt": "2024-01-15T10:30:00.000Z"
  },
  "message": "Resale cadastrado com sucesso"
}

Exemplo de Requisição

curl --location --request POST 'http://localhost:3333/resale' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "Revenda Premium",
  "email": "[email protected]",
  "phone": "+5511999999999",
  "commission": 15
}'