cURL
curl --request POST \ --url https://api.myidvirtual.com/customer \ --header 'Content-Type: application/json' \ --data ' { "email": "<string>", "name": "<string>", "language": "<string>", "password": "<string>", "passwordConfirmation": "<string>", "cellphone": "<string>", "nickname": "<string>", "gender": "<string>", "birthday": "<string>", "credits": 123, "isTrial": true, "creatorId": "<string>", "mac_address": "<string>", "latitude": 123, "longitude": 123, "notes": "<string>" } '
{ "customer": { "id": "cust_123e4567-e89b-12d3-a456-426614174000", "isTrial": true, "exp_date": "2024-01-22T10:30:00.000Z", "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T10:30:00.000Z", "user": { "id": "user_123e4567-e89b-12d3-a456-426614174000", "email": "[email protected]", "name": "João Cliente", "nickname": "joao", "role": "CUSTOMER", "language": "pt-BR", "cellphone": "+5511999999999", "credits": 50, "status": true, "gender": "MASCULINO", "birthday": "1990-01-15T00:00:00.000Z", "mac_address": "00:1B:44:11:3A:B7", "latitude": -23.5505199, "longitude": -46.6333094, "notes": "Cliente premium", "first_recharge": false, "isAppManager": false, "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T10:30:00.000Z" } }, "credentials": { "email": "[email protected]", "password": "auto_generated_password_123", "login_url": "https://app.myidvirtual.com/login" }, "message": "Cliente criado com sucesso" }
Cria um novo cliente VPN no sistema
curl --location --request POST 'http://localhost:3333/customer' \ --header 'Content-Type: application/json' \ --data-raw '{ "email": "[email protected]", "name": "João Cliente", "language": "pt-BR", "nickname": "joao", "cellphone": "+5511999999999", "gender": "MASCULINO", "birthday": "1990-01-15", "credits": 50, "isTrial": true, "notes": "Cliente premium" }'
{ "owner": "id_do_criador", "creatorId": "id_do_revendedor" }