MENU navbar-image

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"
    }
]
 

Request      

GET api/clients

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

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"
}
 

Request      

POST api/clients

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

O campo value não deve conter mais de 255 caracteres. Example: vmqeopfuudtdsufvyvddq

cpf   string     

O campo value deve conter 11 caracteres. Example: amniihfqcoy

email   string     

O campo value não contém um endereço de e-mail válido. Example: agustin98@example.com

phone   string     

O campo value não deve conter mais de 20 caracteres. Example: hdtqtqxbajwbpilpm

cep   string     

O campo value deve conter 8 caracteres. Example: ufinllwl

street   string     

O campo value não deve conter mais de 255 caracteres. Example: oauydlsmsjuryvojcybzv

neighborhood   string     

O campo value não deve conter mais de 255 caracteres. Example: rbyickznkygloigmkwxph

number   string     

O campo value não deve conter mais de 10 caracteres. Example: lvazjrcnf

complement   string  optional    

O campo value não deve conter mais de 255 caracteres. Example: baqywuxhgjjmzuxjubqou

city   string     

O campo value não deve conter mais de 255 caracteres. Example: zswiwxtrkimfcatbxspzm

state   string     

O campo value deve conter 2 caracteres. Example: ra

status   string     

Example: ativo

Must be one of:
  • ativo
  • inativo

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"
}
 

Request      

GET api/clients/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the client. Example: 17

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
 

Request      

DELETE api/clients/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the client. Example: 17