Introduction
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
This API is not authenticated.
Endpoints
Listar clientes.
Retorna a lista completa de clientes cadastrados.
Example request:
curl --request GET \
--get "https://satcompany-client-management.soukiweb.com.br/api/clients" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://satcompany-client-management.soukiweb.com.br/api/clients"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"name": "João da Silva",
"email": "joao@email.com"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cadastrar cliente.
Cria um novo cliente com os dados validados.
Example request:
curl --request POST \
"https://satcompany-client-management.soukiweb.com.br/api/clients" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"vmqeopfuudtdsufvyvddq\",
\"cpf\": \"amniihfqcoy\",
\"email\": \"agustin98@example.com\",
\"phone\": \"hdtqtqxbajwbpilpm\",
\"cep\": \"ufinllwl\",
\"street\": \"oauydlsmsjuryvojcybzv\",
\"neighborhood\": \"rbyickznkygloigmkwxph\",
\"number\": \"lvazjrcnf\",
\"complement\": \"baqywuxhgjjmzuxjubqou\",
\"city\": \"zswiwxtrkimfcatbxspzm\",
\"state\": \"ra\",
\"status\": \"ativo\"
}"
const url = new URL(
"https://satcompany-client-management.soukiweb.com.br/api/clients"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "vmqeopfuudtdsufvyvddq",
"cpf": "amniihfqcoy",
"email": "agustin98@example.com",
"phone": "hdtqtqxbajwbpilpm",
"cep": "ufinllwl",
"street": "oauydlsmsjuryvojcybzv",
"neighborhood": "rbyickznkygloigmkwxph",
"number": "lvazjrcnf",
"complement": "baqywuxhgjjmzuxjubqou",
"city": "zswiwxtrkimfcatbxspzm",
"state": "ra",
"status": "ativo"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"name": "João da Silva",
"email": "joao@email.com"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Exibir cliente.
Retorna os dados de um cliente específico.
Example request:
curl --request GET \
--get "https://satcompany-client-management.soukiweb.com.br/api/clients/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://satcompany-client-management.soukiweb.com.br/api/clients/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "João da Silva",
"email": "joao@email.com"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remover cliente.
Remove o cliente do sistema.
Example request:
curl --request DELETE \
"https://satcompany-client-management.soukiweb.com.br/api/clients/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://satcompany-client-management.soukiweb.com.br/api/clients/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.