Criar Revendedor
curl --request POST \
--url https://api.revenda.nexus/users \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"password": "<string>",
"is_master": 123,
"credits": "<string>",
"whatsapp": "<string>",
"telegram": "<string>",
"language": "<string>",
"country": "<string>",
"email": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.revenda.nexus/users"
payload = {
"username": "<string>",
"password": "<string>",
"is_master": 123,
"credits": "<string>",
"whatsapp": "<string>",
"telegram": "<string>",
"language": "<string>",
"country": "<string>",
"email": "<string>",
"notes": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
username: '<string>',
password: '<string>',
is_master: 123,
credits: '<string>',
whatsapp: '<string>',
telegram: '<string>',
language: '<string>',
country: '<string>',
email: '<string>',
notes: '<string>'
})
};
fetch('https://api.revenda.nexus/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.revenda.nexus/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'username' => '<string>',
'password' => '<string>',
'is_master' => 123,
'credits' => '<string>',
'whatsapp' => '<string>',
'telegram' => '<string>',
'language' => '<string>',
'country' => '<string>',
'email' => '<string>',
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.revenda.nexus/users"
payload := strings.NewReader("{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"is_master\": 123,\n \"credits\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"telegram\": \"<string>\",\n \"language\": \"<string>\",\n \"country\": \"<string>\",\n \"email\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.revenda.nexus/users")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"is_master\": 123,\n \"credits\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"telegram\": \"<string>\",\n \"language\": \"<string>\",\n \"country\": \"<string>\",\n \"email\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenda.nexus/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"is_master\": 123,\n \"credits\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"telegram\": \"<string>\",\n \"language\": \"<string>\",\n \"country\": \"<string>\",\n \"email\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 136,
"username": "",
"password": "",
"is_master": 0,
"credits": "10",
"country": "Brasil",
"whatsapp": "12312312312",
"telegram": null,
"master": 80,
"recharge": "1/16/2025, 12:32:13 PM",
"status": 1,
"is_admin": 0,
"language": "pt",
"createdAt": "2025-01-16T15:32:13.611Z",
"updatedAt": "2025-01-16T15:32:13.611Z",
"token": null,
"notes": null,
"trash": 0,
"active_tree": 0,
"block_reseller": 0
}
Revendedores
Criar Revendedor
Este endpoint permite criar um novo revendedor na plataforma Nexus.
POST
/
users
Criar Revendedor
curl --request POST \
--url https://api.revenda.nexus/users \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"password": "<string>",
"is_master": 123,
"credits": "<string>",
"whatsapp": "<string>",
"telegram": "<string>",
"language": "<string>",
"country": "<string>",
"email": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.revenda.nexus/users"
payload = {
"username": "<string>",
"password": "<string>",
"is_master": 123,
"credits": "<string>",
"whatsapp": "<string>",
"telegram": "<string>",
"language": "<string>",
"country": "<string>",
"email": "<string>",
"notes": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
username: '<string>',
password: '<string>',
is_master: 123,
credits: '<string>',
whatsapp: '<string>',
telegram: '<string>',
language: '<string>',
country: '<string>',
email: '<string>',
notes: '<string>'
})
};
fetch('https://api.revenda.nexus/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.revenda.nexus/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'username' => '<string>',
'password' => '<string>',
'is_master' => 123,
'credits' => '<string>',
'whatsapp' => '<string>',
'telegram' => '<string>',
'language' => '<string>',
'country' => '<string>',
'email' => '<string>',
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.revenda.nexus/users"
payload := strings.NewReader("{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"is_master\": 123,\n \"credits\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"telegram\": \"<string>\",\n \"language\": \"<string>\",\n \"country\": \"<string>\",\n \"email\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.revenda.nexus/users")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"is_master\": 123,\n \"credits\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"telegram\": \"<string>\",\n \"language\": \"<string>\",\n \"country\": \"<string>\",\n \"email\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenda.nexus/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"is_master\": 123,\n \"credits\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"telegram\": \"<string>\",\n \"language\": \"<string>\",\n \"country\": \"<string>\",\n \"email\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 136,
"username": "",
"password": "",
"is_master": 0,
"credits": "10",
"country": "Brasil",
"whatsapp": "12312312312",
"telegram": null,
"master": 80,
"recharge": "1/16/2025, 12:32:13 PM",
"status": 1,
"is_admin": 0,
"language": "pt",
"createdAt": "2025-01-16T15:32:13.611Z",
"updatedAt": "2025-01-16T15:32:13.611Z",
"token": null,
"notes": null,
"trash": 0,
"active_tree": 0,
"block_reseller": 0
}
Como utilizar este endpoint?
Esse endpoint permite criar um novo revendedor, definindo suas permissões e dados de acesso.Headers obrigatórios
string
required
O token de autenticação no formato Bearer é obrigatório para acessar este endpoint.
Parâmetros do corpo da requisição (Payload)
string
required
Nome de usuário do revendedor.
string
required
Senha do revendedor.
number
required
Define se o revendedor será master (1) ou não (0).
string
required
Quantidade de créditos disponíveis para o revendedor.
string
Número de WhatsApp do revendedor. Campo opcional.
string
Usuário do Telegram do revendedor. Campo opcional.
string
Idioma do revendedor (ex.: pt, en).
string
required
País de origem do revendedor.
string
E-mail do revendedor. Campo opcional.
string
Observações adicionais. Campo opcional.
Exemplo de Requisição
POST https://api.revenda.nexus/users
Headers:
{
"Authorization": "Bearer seu_token_aqui",
"Content-Type": "application/json"
}
Payload:
{
"username": "username-definido",
"password": "password-definido",
"is_master": 1,
"credits": "12312",
"whatsapp": "12312312312",
"telegram": "zeca",
"language": "pt",
"country": "Brasil",
"email": "[email protected]",
"notes": ""
}
Resposta
number
Indica o código HTTP da resposta. Esperado: 201 (Created).
object
Conteúdo da resposta.
Show Mostrar objeto
Show Mostrar objeto
number
Identificador único do revendedor.
string
Nome de usuário do revendedor.
string
Senha do revendedor.
number
Define se o revendedor é master (1) ou não (0).
string
Créditos disponíveis para o revendedor.
string
País de origem do revendedor.
string
Número de WhatsApp associado.
string
Data da última recarga.
number
Status da conta (1 para ativo).
string
Idioma configurado para o revendedor.
Exemplo de Resposta
{
"id": 136,
"username": "",
"password": "",
"is_master": 0,
"credits": "10",
"country": "Brasil",
"whatsapp": "12312312312",
"telegram": null,
"master": 80,
"recharge": "1/16/2025, 12:32:13 PM",
"status": 1,
"is_admin": 0,
"language": "pt",
"createdAt": "2025-01-16T15:32:13.611Z",
"updatedAt": "2025-01-16T15:32:13.611Z",
"token": null,
"notes": null,
"trash": 0,
"active_tree": 0,
"block_reseller": 0
}
⌘I

