Documentação da API Porto Shop

Guia completo das rotas, autenticação, exemplos e padrões de resposta.

Autenticação

API Key

Todas as requisições à API obrigatoriamente precisam incluir uma API Key no header X-API-KEY.

API_KEY=sua-chave-api-aqui
Token de Autenticação (Bearer Token)

Rotas protegidas requerem um Bearer Token enviado no header Authorization.

Authorization: Bearer {seu-token-aqui}

Headers Obrigatórios

Todos os requests devem incluir:

-H "X-API-KEY: {sua-api-key}"
-H "Authorization: Bearer {token}"
-H "Content-Type: application/json"

Códigos de Status HTTP

Código Significado
200 OK - Requisição bem-sucedida
201 Created - Recurso criado com sucesso
400 Bad Request - Dados inválidos
401 Unauthorized - API Key ou Token inválido/não fornecido
403 Forbidden - Sem permissão para acessar
404 Not Found - Recurso não encontrado
422 Unprocessable Entity - Validação falhou
500 Internal Server Error - Erro no servidor

Rotas Públicas (Auth)

🔐 Login POST /api/auth/login

Autentica um usuário e retorna um token de acesso (Bearer Token).

Request Body (JSON)
{
    "email": "usuario@exemplo.com",
    "password": "sua-senha"
}
Exemplo em Bash (curl)
curl -X POST http://localhost:8001/api/auth/login \
    -H "X-API-KEY: {sua-api-key}" \
    -H "Content-Type: application/json" \
    -d '{
        "email": "usuario@exemplo.com",
        "password": "sua-senha"
    }'

📝 Registrar Usuário POST /api/user/register

Cria um novo usuário. O payload pode incluir campos adicionais do formulário (ex.: documento, data de nascimento, telefone, endereço).

Exemplo (JSON)
{
    "name": "Nome Completo",
    "email": "usuario@exemplo.com",
    "document": "00000000000",
    "birth_date": "YYYY-MM-DD",
    "phone": "(xx) xxxx-xxxx",
    "address": "Endereço completo",
    "password": "senha-segura",
    "password_confirmation": "senha-segura"
}
Exemplo em Bash (form-data)
curl --location "http://localhost:8001/api/user/register" \
  --header "X-API-KEY: {sua-api-key}" \
  --form "name=Nome Completo" \
  --form "email=usuario@exemplo.com" \
  --form "document=00000000000" \
  --form "birth_date=YYYY-MM-DD" \
  --form "phone=(xx) xxxx-xxxx" \
  --form "address=Endereço" \
  --form "password=senha-segura" \
  --form "password_confirmation=senha-segura"

✅ Verificar Email POST /api/user/verify

Verifica o email do usuário usando o código enviado por e-mail. Use valores de placeholder — não exponha tokens reais.

Payload (JSON)
{
    "user_id": 56,
    "email": "usuario@exemplo.com",
    "verification_code": "123456"
}
Exemplo em Bash (form-data)
curl --location "http://localhost:8001/api/user/verify" \
  --header "X-API-KEY: {sua-api-key}" \
  --header "Authorization: Bearer {seu-token}" \
  --form "user_id=56" \
  --form "email=usuario@exemplo.com" \
  --form "verification_code=123456"

📧 Reenviar Email de Verificação POST /api/user/resend-verify-email

Reenvia o email de verificação. Parâmetros comuns: user_id e email.

Payload (JSON)
{
    "user_id": 56,
    "email": "usuario@exemplo.com"
}
Exemplo em Bash (form-data)
curl --location "http://localhost:8001/api/user/resend-verify-email" \
  --header "X-API-KEY: {sua-api-key}" \
  --header "Authorization: Bearer {seu-token}" \
  --form "user_id=56" \
  --form "email=usuario@exemplo.com"

Rotas Protegidas

⚠️ Todas as rotas abaixo requerem autenticação com Token Bearer além da API Key.

👥 Listar Usuários com Filtro GET /api/user/get-users-by-filter

Query parameters: id, name, email, profile_id, is_active, data_de, data_ate, page, page_size

Exemplo de URL
http://localhost:8001/api/user/get-users-by-filter?id=&name=&email=&profile_id=&is_active=&data_de=&data_ate=&page=1&page_size=10
Exemplo em Bash
curl --location --request GET "http://localhost:8001/api/user/get-users-by-filter?id=&name=&email=&profile_id=&is_active=&data_de=&data_ate=&page=1&page_size=10" \
    -H "X-API-KEY: {sua-api-key}" \
    -H "Authorization: Bearer {seu-token}"
Resposta (exemplo)
{
    "success": true,
    "data": [
        {
            "id": 1,
            "email": "admin@portoshop.com",
            "owner": { "id": 1, "name": "ARMANDO THIEL" },
            "isActive": true,
            "createdAt": "2025-12-31T22:22:48.000000Z"
        }
    ],
    "message": "Usuários filtrados com sucesso."
}

➕ Criar Usuário POST /api/user/create
Payload (JSON)
{
    "profile_id": 1,
    "name": "Nome Completo",
    "email": "usuario@exemplo.com",
    "document": "00000000000",
    "birth_date": "YYYY-MM-DD",
    "phone": "(xx) xxxx-xxxx",
    "address": "Endereço completo",
    "password": "senha-segura",
    "password_confirmation": "senha-segura"
}
Exemplo em Bash (form-data)
curl --location "http://localhost:8001/api/user/create" \
    --header "X-API-KEY: {sua-api-key}" \
    --header "Authorization: Bearer {seu-token}" \
    --form "profile_id=1" \
    --form "name=Mae Zulauf" \
    --form "email=Emelia_Osinski@example.net" \
    --form "document=24215507855" \
    --form "birth_date=1946-02-21" \
    --form "phone=758-233-9349" \
    --form "address=565 Schamberger Place" \
    --form "password=admin@321" \
    --form "password_confirmation=admin@321"
Resposta (exemplo)
{
    "success": true,
    "data": {
        "id": 58,
        "email": "usuario@exemplo.com",
        "profileId": 1,
        "isActive": true,
        "verificationCode": "XXXXXX",
        "verificationExpiresAt": "2026-01-14T14:58:59.437080Z"
    },
    "message": "Usuário criado com sucesso"
}

📝 Atualizar Usuário PUT /api/user/{id}
Payload (JSON)
{
    "profile_id": 1,
    "name": "Nome Atualizado",
    "email": "usuario@exemplo.com",
    "document": "00000000000",
    "birth_date": "YYYY-MM-DD",
    "phone": "(xx) xxxx-xxxx",
    "address": "Endereço completo",
    "password": "nova-senha",
    "password_confirmation": "nova-senha"
}
Exemplo em Bash (form-data com _method)
curl --location "http://localhost:8001/api/user/56" \
  --header "X-API-KEY: {sua-api-key}" \
  --header "Authorization: Bearer {seu-token}" \
  --form "profile_id=1" \
  --form "name=Clarence Nader" \
  --form "email=Rudolph_Pouros@example.com" \
  --form "document=43616685664" \
  --form "birth_date=1985-05-10" \
  --form "phone=272-819-1280" \
  --form "address=85311 Darren Light" \
  --form "password=admin@321" \
  --form "password_confirmation=admin@321" \
  --form "_method=PUT"
Resposta (exemplo)
{
    "success": true,
    "data": {
        "id": 56,
        "email": "usuario@exemplo.com",
        "profileId": 1,
        "isActive": true
    },
    "message": "Usuário atualizado com sucesso."
}

🗑️ Deletar Usuário DELETE /api/user/{id}
Exemplo em Bash
curl --location --request DELETE "http://localhost:8001/api/user/59" \
    -H "X-API-KEY: {sua-api-key}" \
    -H "Authorization: Bearer {seu-token}"
Resposta (exemplo)
{
    "success": true,
    "data": null,
    "message": "Usuário excluído com sucesso."
}

📦 Listar Produtos com Filtro GET /api/product/get-products-by-filter

Query parameters: id, name, category_id, unit_id, barcode, is_active, user_id_created, date_de, date_ate, page, page_size

Exemplo de URL
http://localhost:8001/api/product/get-products-by-filter?id=20&name=null&category_id=null&unit_id=null&barcode=null&is_active=null&user_id_created=null&date_de=null&date_ate=null&page=1&page_size=10
Exemplo em Bash
curl --location --request GET "http://localhost:8001/api/product/get-products-by-filter?id=20&name=null&category_id=null&unit_id=null&barcode=null&is_active=null&user_id_created=null&date_de=null&date_ate=null&page=1&page_size=10" \
    -H "X-API-KEY: {sua-api-key}" \
    -H "Authorization: Bearer {seu-token}"
Resposta (exemplo)
{
    "success": true,
    "data": [
        {
            "id": 20,
            "name": "AUDREY OBERBRUNNER",
            "description": null,
            "images": [
                {
                    "id": 28,
                    "product_id": 20,
                    "image": "products/Ii0JFfMR2tCeSsvulbj5t8y16jC6uKExtALg434u.png",
                    "created_at": "2026-01-13 10:44:48",
                    "updated_at": "2026-01-13 10:44:48"
                }
            ],
            "category": { "id": 1, "name": "TECNOLOGIAS" },
            "unit": { "id": 1, "name": "LENA MEDHURST", "abbreviation": "SCSI", "format": "1" },
            "barcode": "GB65RFAZ04098873426923",
            "isActive": true,
            "price": 998,
            "costPrice": 799,
            "stockQuantity": 801,
            "minQuantity": 905,
            "owner": { "id": 1, "name": "ARMANDO THIEL" },
            "userCreated": { "id": 1, "name": "ARMANDO THIEL" },
            "userUpdated": { "id": 1, "name": "ARMANDO THIEL" },
            "userDeleted": null,
            "createdAt": "2026-01-13T07:44:48.000000Z",
            "updatedAt": "2026-01-14T12:30:58.000000Z",
            "deletedAt": null
        }
    ],
    "message": "Produto Filtrado com sucesso."
}

➕ Criar Produto POST /api/product/create
Payload (form-data)
name=Maida
unit_id=1
category_id=1
is_active=1
description=Ray
barcode=MC590930507740VV58028753384
price=98
cost_price=268
stock_quantity=105
min_quantity=838
images[]=@/caminho/imagem1.png
images[]=@/caminho/imagem2.png
Exemplo em Bash
curl --location "http://localhost:8001/api/product/create" \
    --header "X-API-KEY: {sua-api-key}" \
    --header "Authorization: Bearer {seu-token}" \
    --form "name=Maida" \
    --form "unit_id=1" \
    --form "category_id=1" \
    --form "is_active=1" \
    --form "images[]=@imagem1.png" \
    --form "images[]=@imagem2.png" \
    --form "description=Ray" \
    --form "barcode=MC590930507740VV58028753384" \
    --form "price=98" \
    --form "cost_price=268" \
    --form "stock_quantity=105" \
    --form "min_quantity=838"
Resposta (exemplo)
{
    "success": true,
    "data": {
        "id": 24,
        "name": "COLEMAN",
        "description": null,
        "categoryId": 1,
        "unitId": 1,
        "barcode": "ME48004609680580469012",
        "isActive": true,
        "price": 164,
        "costPrice": 388,
        "stockQuantity": 746,
        "minQuantity": 967,
        "images": [
            {
                "product_id": 24,
                "image": "products/kw7ZQREVpMYBBVlxnakrdx6L5PGsmQ2TO5vRH0Ur.png",
                "updated_at": "2026-01-14T15:30:27.000000Z",
                "created_at": "2026-01-14T15:30:27.000000Z",
                "id": 36
            }
        ],
        "userIdCreated": 1,
        "createdAt": "2026-01-14T15:30:26.000000Z",
        "updatedAt": "2026-01-14T15:30:26.000000Z",
        "deletedAt": null
    },
    "message": "Produto criado com sucesso."
}

📝 Atualizar Produto PUT /api/product/{id}
Payload (form-data)
name=Pam Monahan
unit_id=1
category_id=1
is_active=1
description=Legros, Goldner and Kohler
barcode=SK4402375108127003090045
price=487
cost_price=135
stock_quantity=299
min_quantity=193
images[]=@/caminho/imagem.png
_method=PUT
Exemplo em Bash
curl --location "http://localhost:8001/api/product/20" \
    --header "X-API-KEY: {sua-api-key}" \
    --header "Authorization: Bearer {seu-token}" \
    --form "name=Pam Monahan" \
    --form "unit_id=1" \
    --form "category_id=1" \
    --form "is_active=1" \
    --form "images[]=@imagem.png" \
    --form "description=Legros, Goldner and Kohler" \
    --form "barcode=SK4402375108127003090045" \
    --form "price=487" \
    --form "cost_price=135" \
    --form "stock_quantity=299" \
    --form "min_quantity=193" \
    --form "_method=PUT"
Resposta (exemplo)
{
    "success": true,
    "data": {
        "id": 20,
        "name": "AUDREY OBERBRUNNER",
        "description": null,
        "categoryId": 1,
        "unitId": 1,
        "barcode": "GB65RFAZ04098873426923",
        "isActive": true,
        "price": 998,
        "costPrice": 799,
        "stockQuantity": 801,
        "minQuantity": 905,
        "ownerId": 1,
        "images": null,
        "userIdCreated": 1,
        "userIdUpdated": 1,
        "userIdDeleted": null,
        "createdAt": "2026-01-13T10:44:48.000000Z",
        "updatedAt": "2026-01-14T15:30:58.000000Z",
        "deletedAt": null
    },
    "message": "Produto atualizado com sucesso."
}

🗑️ Deletar Produto DELETE /api/product/{id}
Exemplo em Bash
curl --location --request DELETE "http://localhost:8001/api/product/25" \
    -H "X-API-KEY: {sua-api-key}" \
    -H "Authorization: Bearer {seu-token}"
Resposta (exemplo)
{
    "success": true,
    "data": null,
    "message": "Produto excluído com sucesso."
}

📂 Listar Categorias com Filtro GET /api/category/get-categories-by-filter

Query parameters: id, name, page, pageSize

Exemplo de URL
http://localhost:8001/api/category/get-categories-by-filter?id=&name=null&page=1&pageSize=10
Exemplo em Bash
curl --location --request GET "http://localhost:8001/api/category/get-categories-by-filter?id=&name=null&page=1&pageSize=10" \
    -H "X-API-KEY: {sua-api-key}" \
    -H "Authorization: Bearer {seu-token}"
Resposta (exemplo)
{
    "success": true,
    "data": [
        {
            "id": 1,
            "owner": { "id": 1, "name": "ARMANDO THIEL" },
            "name": "TECNOLOGIAS TECNOLOGIAS TECNOLOGIAS TECNOLOGIAS TE",
            "description": "itens tecnologicos",
            "userCreated": { "id": 1, "name": "ARMANDO THIEL" },
            "userUpdated": { "id": 1, "name": "ARMANDO THIEL" },
            "userDeleted": null,
            "createdAt": "2025-12-31T22:24:31.000000Z",
            "updatedAt": "2026-01-09T19:09:25.000000Z",
            "deletedAt": null
        }
    ],
    "message": "Categorias filtradas com sucesso."
}

➕ Criar Categoria POST /api/category/create
Payload (form-data)
name=Alberta Gerlach PhD
description=voluptatem
Exemplo em Bash
curl --location "http://localhost:8001/api/category/create" \
    --header "X-API-KEY: {sua-api-key}" \
    --header "Authorization: Bearer {seu-token}" \
    --form "name=Alberta Gerlach PhD" \
    --form "description=voluptatem"
Resposta (exemplo)
{
    "success": true,
    "data": {
        "id": 12,
        "ownerId": 1,
        "name": "MARCELLA MURAZIK",
        "description": "molestiae",
        "userIdCreated": 1,
        "userIdUpdated": null,
        "userIdDeleted": null,
        "createdAt": "2026-01-14T15:40:14.000000Z",
        "updatedAt": "2026-01-14T15:40:14.000000Z",
        "deletedAt": null
    },
    "message": "Categoria criada com sucesso."
}

📝 Atualizar Categoria PUT /api/category/{id}
Payload (form-data)
name=Julio Frami
description=Ratione quas debitis asperiores...
_method=PUT
Exemplo em Bash
curl --location "http://localhost:8001/api/category/10" \
    --header "X-API-KEY: {sua-api-key}" \
    --header "Authorization: Bearer {seu-token}" \
    --form "_method=PUT" \
    --form "name=Julio Frami" \
    --form "description=Ratione quas debitis asperiores..."

🗑️ Deletar Categoria DELETE /api/category/{id}
Exemplo em Bash
curl --location --request DELETE "http://localhost:8001/api/category/13" \
    -H "X-API-KEY: {sua-api-key}" \
    -H "Authorization: Bearer {seu-token}"
Resposta (exemplo)
{
    "success": true,
    "data": null,
    "message": "Categoria excluída com sucesso."
}

📏 Listar Unidades com Filtro GET /api/unit/get-units-by-filter

Query parameters: name, abbreviation, format, page, page_size

Exemplo de URL
http://localhost:8001/api/unit/get-units-by-filter?name=null&abbreviation=null&format=null&page=1&page_size=10
Exemplo em Bash
curl --location "http://localhost:8001/api/unit/get-units-by-filter?name=null&abbreviation=null&format=null&page=1&page_size=10" \
    -H "X-API-KEY: {sua-api-key}" \
    -H "Authorization: Bearer {seu-token}"
Resposta (exemplo)
{
    "success": true,
    "data": [
        {
            "id": 1,
            "owner": { "id": 1, "name": "ARMANDO THIEL" },
            "name": "LENA MEDHURST",
            "abbreviation": "SCSI",
            "format": 1,
            "userCreated": { "id": 1, "name": "ARMANDO THIEL" },
            "userUpdated": { "id": 1, "name": "ARMANDO THIEL" },
            "userDeleted": null,
            "createdAt": "2025-12-31T22:25:52.000000Z",
            "updatedAt": "2026-01-05T15:11:00.000000Z",
            "deletedAt": null
        }
    ],
    "message": "Unidades filtradas com sucesso."
}

➕ Criar Unidade POST /api/unit/create
Payload (form-data)
name=Harvey Crona
abbreviation=PCI
format=1
Exemplo em Bash
curl --location "http://localhost:8001/api/unit/create" \
    --header "X-API-KEY: {sua-api-key}" \
    --header "Authorization: Bearer {seu-token}" \
    --form "name=Harvey Crona" \
    --form "abbreviation=PCI" \
    --form "format=1"
Resposta (exemplo)
{
    "success": true,
    "data": {
        "id": 16,
        "ownerId": 1,
        "name": "ERIK SAWAYN III",
        "abbreviation": "COM",
        "format": 1,
        "userIdCreated": 1,
        "userIdUpdated": null,
        "userIdDeleted": null,
        "createdAt": "2026-01-14T15:45:20.000000Z",
        "updatedAt": "2026-01-14T15:45:20.000000Z",
        "deletedAt": null
    },
    "message": "Unidade criada com sucesso."
}

📝 Atualizar Unidade PUT /api/unit/{id}
Payload (form-data)
name=Victoria Dietrich III
abbreviation=COM
format=1
_method=PUT
Exemplo em Bash
curl --location "http://localhost:8001/api/unit/5" \
    --header "X-API-KEY: {sua-api-key}" \
    --header "Authorization: Bearer {seu-token}" \
    --form "_method=PUT" \
    --form "name=Victoria Dietrich III" \
    --form "abbreviation=COM" \
    --form "format=1"
Resposta (exemplo)
{
    "success": true,
    "data": {
        "id": 5,
        "ownerId": 1,
        "name": "BEATRICE LITTEL",
        "abbreviation": "RAM",
        "format": 1,
        "userIdCreated": 1,
        "userIdUpdated": 1,
        "userIdDeleted": null,
        "createdAt": "2026-01-05T01:59:00.000000Z",
        "updatedAt": "2026-01-14T15:47:11.000000Z",
        "deletedAt": null
    },
    "message": "Unidade atualizada com sucesso."
}

🗑️ Deletar Unidade DELETE /api/unit/{id}
Exemplo em Bash
curl --location --request DELETE "http://localhost:8001/api/unit/17" \
    -H "X-API-KEY: {sua-api-key}" \
    -H "Authorization: Bearer {seu-token}"
Resposta (exemplo)
{
    "success": true,
    "data": null,
    "message": "Unidade excluída com sucesso."
}

👤 Listar Perfis com Filtro GET /api/profile/get-profiles-by-filter

Query parameters: id, name, page, page_size

Exemplo de URL
http://localhost:8001/api/profile/get-profiles-by-filter?id=null&name=null&page=1&page_size=10
Exemplo em Bash
curl --location "http://localhost:8001/api/profile/get-profiles-by-filter?id=null&name=null&page=1&page_size=10" \
    -H "X-API-KEY: {sua-api-key}" \
    -H "Authorization: Bearer {seu-token}"
Resposta (exemplo)
{
    "success": true,
    "data": [
        {
            "id": 1,
            "owner": { "id": 1, "name": "ARMANDO THIEL" },
            "name": "VENDEDOR",
            "description": "Criar produtos e gerenciar",
            "permission": "dashboardcontroller@index,productcontroller@index,productcontroller@show,productcontroller@store,productcontroller@update,productcontroller@destroy,userprofilecontroller@edit,userprofilecontroller@update",
            "userCreated": { "id": 1, "name": "ARMANDO THIEL" },
            "userUpdated": { "id": 1, "name": "ARMANDO THIEL" },
            "userDeleted": null,
            "createdAt": "2025-12-31T22:24:09.000000Z",
            "updatedAt": "2025-12-31T23:07:25.000000Z",
            "deletedAt": null
        }
    ],
    "message": "Perfis filtrados com sucesso."
}

➕ Criar Perfil POST /api/profile/create
Payload (form-data)
name=Robin Mante
description=Brazilian Real
permissions=["unitcontroller@index","productcontroller@update",
  "categorycontroller@destroy","categorycontroller@store",
  "userprofilecontroller@update"]
Exemplo em Bash
curl --location "http://localhost:8001/api/profile/create" \
    --header "X-API-KEY: {sua-api-key}" \
    --header "Authorization: Bearer {seu-token}" \
    --form "name=Robin Mante" \
    --form "description=Brazilian Real" \
    --form "permissions=[\"unitcontroller@index\",\"productcontroller@update\"]"
Resposta (exemplo)
{
    "success": true,
    "data": {
        "id": 9,
        "ownerId": 1,
        "name": "MR. KELLY DICKENS",
        "description": "Vatu",
        "permission": "unitcontroller@store,productcontroller@index,userprofilecontroller@update,productcontroller@update,categorycontroller@update",
        "userIdCreated": 1,
        "userIdUpdated": null,
        "userIdDeleted": null,
        "createdAt": "2026-01-14T15:52:09.000000Z",
        "updatedAt": "2026-01-14T15:52:09.000000Z",
        "deletedAt": null
    },
    "message": "Perfil criado com sucesso."
}

📝 Atualizar Perfil PUT /api/profile/{id}
Payload (form-data)
name=Ricky Corwin
description=Kroon
permissions=["usercontroller@update","usercontroller@index",
  "productcontroller@update","productcontroller@show",
  "profilecontroller@update"]
_method=PUT
Exemplo em Bash
curl --location "http://localhost:8001/api/profile/5" \
    --header "X-API-KEY: {sua-api-key}" \
    --header "Authorization: Bearer {seu-token}" \
    --form "name=Ricky Corwin" \
    --form "description=Kroon" \
    --form "permissions=[\"usercontroller@update\",\"usercontroller@index\"]" \
    --form "_method=PUT"
Resposta (exemplo)
{
    "success": true,
    "data": {
        "id": 5,
        "ownerId": 1,
        "name": "lynn champlin",
        "description": "Paanga",
        "permission": "profilecontroller@store,categorycontroller@update,profilecontroller@index,productcontroller@update,userprofilecontroller@update",
        "userIdCreated": 1,
        "userIdUpdated": 1,
        "userIdDeleted": null,
        "createdAt": "2026-01-13T19:35:35.000000Z",
        "updatedAt": "2026-01-14T15:52:31.000000Z",
        "deletedAt": "2026-01-14T15:52:31.000000Z"
    },
    "message": "Perfil atualizado com sucesso."
}

🗑️ Deletar Perfil DELETE /api/profile/{id}
Exemplo em Bash
curl --location --request DELETE "http://localhost:8001/api/profile/10" \
    -H "X-API-KEY: {sua-api-key}" \
    -H "Authorization: Bearer {seu-token}"
Resposta (exemplo)
{
    "success": true,
    "data": null,
    "message": "Perfil excluído com sucesso."
}

👤 Listar Empresas com Filtro GET /api/company/get-companies-by-filter

Query parameters: id, fantasyName, page, page_size

Exemplo de URL
http://localhost:8001/api/company/get-companies-by-filter?id=null&fantasyName=null&page=1&page_size=10
Exemplo em Bash
curl --location "http://localhost:8001/api/company/get-companies-by-filter?id=null&fantasyName=null&page=1&page_size=10" \
    -H "X-API-KEY: {sua-api-key}" \
    -H "Authorization: Bearer {seu-token}"
Resposta (exemplo)
{
    "success": true,
    "data": [
        {
            "id": "019c15d6-db91-73f4-b410-2ff477ec8745",
            "owner": {
                "id": 1,
                "name": "MS. ARNOLD HARTMANN"
            },
            "fantasyName": "Shawna Abernathy",
            "description": "Praesentium deleniti quos laudantium ea ab corrupti magni voluptatem.",
            "legalName": "Laura Durgan",
            "document": "23141882339",
            "email": "Nils31@hotmail.com",
            "phone": "7274644227",
            "image": "companies/yJr3xAVd105mJ5Z6Yo546lPsVnRg718VmYmaaKZv.png",
            "primaryColor": "#405109",
            "secondaryColor": "#3f6e3b",
            "domain": "jamie.info",
            "zipCode": "848",
            "state": "LY",
            "city": "Powlowskiberg",
            "neighborhood": "Jedidiah Cliffs",
            "street": "Aracely Centers",
            "number": "768",
            "complement": "Reiciendis quis assumenda omnis dolor temporibus ex dolorem omnis.\nId nihil qui amet aperiam atque tempore.\nIure qui placeat voluptas pariatur.",
            "isActive": true,
            "userCreated": {
                "id": 1,
                "name": "MS. ARNOLD HARTMANN"
            },
            "userUpdated": null,
            "userDeleted": null,
            "createdAt": "2026-01-31T17:55:28.000000Z",
            "updatedAt": "2026-01-31T17:55:28.000000Z",
            "deletedAt": null
        }
    ],
    "message": "Empresas filtradas com sucesso."
}

➕ Criar Company POST /api/company/create
Payload (form-data)
fantasy_name="Nichole Wehner DDS",
description="Sed eum dolorum qui magnam ut.",
legal_name="Max Nikolaus",
document="23141882339",
email="Fidel_Kohler77@gmail.com",
phone="283-701-9012",
image=@"/caminho/da/imagem.png",
primary_color="#2d271a",
secondary_color="#32574f",
domain="kelley.biz",
zip_code="133",
state="EE",
city="Armandoton",
neighborhood="Velva Prairie",
street="Jeanette Flats",
number="280",
complement="nisi asperiores",
is_active="true"
Exemplo em Bash
curl --location 'http://localhost:8001/api/company/create' \
--header 'X-API-KEY: shop_api_123' \
--header 'Authorization: Bearer 6|GXYEjjoXJ8siyDwtI3yKbW9XHRnOfGdnX4puUZlm1e9a7a00' \
--form 'fantasy_name="Lynette Schuppe"' \
--form 'description="Corrupti aut ad est facilis qui est consequatur sapiente."' \
--form 'legal_name="Glenn Kshlerin"' \
--form 'document="23141882339"' \
--form 'email="Norma_Kuhn64@gmail.com"' \
--form 'phone="414-766-3196"' \
--form 'image=@"postman-cloud:///1f0eae9a-5776-4430-b07f-b649a6156af6"' \
--form 'primary_color="\#5b2e76"' \
--form 'secondary_color="\#7b5471"' \
--form 'domain="dorris.info"' \
--form 'zip_code="777"' \
--form 'state="NO"' \
--form 'city="Port Riverstad"' \
--form 'neighborhood="Ernser Radial"' \
--form 'street="Greenfelder Circle"' \
--form 'number="998"' \
--form 'complement="Non nobis earum sapiente ut tempora. Blanditiis consequuntur repellat dolorum. Qui illum magni. Nobis amet nemo cupiditate sapiente ad."' \
--form 'is_active="true"'
Resposta (exemplo)
{
    "success": true,
    "data": {
        "id": "019c15dd-4c0f-707e-8322-dd45e7f52411",
        "ownerId": 6,
        "fantasyName": "Gregory Paucek",
        "description": "vel",
        "legalName": "Ruth Lindgren III",
        "document": "23141882339",
        "email": "Holden9@gmail.com",
        "image": "companies/2eJXPDvbgP3wt8j3POrFN2nR74A3wNMwhYOrudcf.png",
        "primaryColor": "#547f17",
        "secondaryColor": "#464f7d",
        "domain": "shaniya.net",
        "zipCode": "969",
        "state": "TN",
        "city": "Lincoln",
        "neighborhood": "Clemens Causeway",
        "street": "Marks Trail",
        "number": "657",
        "complement": "Enim voluptatem quibusdam minima ut et sint et.\nNobis nesciunt molestiae totam ut amet doloremque placeat.\nLaborum ut vel natus dolorem.",
        "isActive": true,
        "userIdCreated": 6,
        "userIdUpdated": null,
        "userIdDeleted": null
    },
    "message": "Empresa criada com sucesso."
}

📝 Atualizar Empresa PUT /api/company/{id}
Payload (form-data)
fantasy_name="Nichole Wehner DDS",
description="Sed eum dolorum qui magnam ut.",
legal_name="Max Nikolaus",
document="23141882339",
email="Fidel_Kohler77@gmail.com",
phone="283-701-9012",
image=@"/caminho/da/imagem.png",
primary_color="#2d271a",
secondary_color="#32574f",
domain="kelley.biz",
zip_code="133",
state="EE",
city="Armandoton",
neighborhood="Velva Prairie",
street="Jeanette Flats",
number="280",
complement="nisi asperiores",
is_active="true"
Exemplo em Bash
curl --location 'http://localhost:8001/api/company/019c157f-162f-7064-956c-261e3613ad80' \
--header 'X-API-KEY: shop_api_123' \
--header 'Authorization: Bearer 6|GXYEjjoXJ8siyDwtI3yKbW9XHRnOfGdnX4puUZlm1e9a7a00' \
--form 'fantasy_name="Margarita Waelchi"' \
--form 'description="Sint id sunt corporis suscipit officiis veritatis. Vitae id maxime quidem similique exercitationem velit sapiente laboriosam."' \
--form 'legal_name="Roland Schroeder"' \
--form 'document="23141882339"' \
--form 'email="Jesse_Zemlak3@yahoo.com"' \
--form 'phone="345-522-8749"' \
--form 'image=@"postman-cloud:///1f0eae9a-5776-4430-b07f-b649a6156af6"' \
--form 'primary_color="\#69173b"' \
--form 'secondary_color="\#78414b"' \
--form 'domain="graham.info"' \
--form 'zip_code="757"' \
--form 'state="IO"' \
--form 'city="Morgan Hill"' \
--form 'neighborhood="Volkman Ports"' \
--form 'street="Crist Points"' \
--form 'number="756"' \
--form 'complement="Quaerat et qui et et neque cum. Labore et et expedita. At qui pariatur dolores ut ipsam ratione qui dolor voluptatum. Et sed enim et."' \
--form 'is_active="true"' \
--form '_method="PUT"'
Resposta (exemplo)
{
    "success": true,
    "data": {
        "id": "019c15dd-4c0f-707e-8322-dd45e7f52411",
        "ownerId": 6,
        "fantasyName": "Kevin Kohler",
        "description": "Dicta beatae aperiam aliquam commodi voluptates molestiae et id rerum.\nFugit dolorem illum fugiat velit velit voluptatem neque ea.\nNisi quod assumenda culpa quam voluptate tempore quia et.\nOccaecati qui facere quibusdam.\nQuam sunt laboriosam nihil.",
        "legalName": "Rhonda Rohan MD",
        "document": "23141882339",
        "email": "Torey.Beer@hotmail.com",
        "image": "companies/9aNun5exznmI6Kt0R0sDHwis5McMg73oN5KDOtMH.png",
        "primaryColor": "#382a28",
        "secondaryColor": "#62650c",
        "domain": "giovanny.org",
        "zipCode": "949",
        "state": "MM",
        "city": "Littelville",
        "neighborhood": "Samara Prairie",
        "street": "Cullen Points",
        "number": "883",
        "complement": "Magnam enim reprehenderit inventore earum.",
        "isActive": true,
        "userIdCreated": 6,
        "userIdUpdated": 6,
        "userIdDeleted": null
    },
    "message": "Empresa atualizada com sucesso."
}

🗑️ Deletar Empresa DELETE /api/company/{id}
Exemplo em Bash
curl --location --request DELETE 'http://localhost:8001/api/company/019c15dd-4c0f-707e-8322-dd45e7f52411' \
--header 'X-API-KEY: shop_api_123' \
--header 'Authorization: Bearer 6|GXYEjjoXJ8siyDwtI3yKbW9XHRnOfGdnX4puUZlm1e9a7a00'"
Resposta (exemplo)
{
    "success": true,
    "data": null,
    "message": "Empresa excluída com sucesso."
}