| Home | Escopo | Processo | Design/Mockups | Gerência | Estudos | Arquitetura | Contratos | BD | Qualidade | Configuração | Instalação | Instruções | Utilização | Analytics | Infraestrutura | Dicas | 
|---|
Stock Locations - locais de estoque
fields:
id: number;
description: string;
active: boolean;
endpoints:
FindAll
GET http://localhost:3000/stock-locations/
response:
[
  {
    "id": 1,
    "description": "Câmara Fria A",
    "active": true,
    "created_at": "18/10/2024 00:09:25",
    "updated_at": "18/10/2024 00:09:25"
  },
  {
    "id": 2,
    "description": "Depósito",
    "active": true,
    "created_at": "18/10/2024 00:09:25",
    "updated_at": "18/10/2024 00:09:25"
  },
  {
    "id": 3,
    "description": "Pátio",
    "active": true,
    "created_at": "18/10/2024 00:09:25",
    "updated_at": "18/10/2024 00:09:25"
  },
  {
    "id": 4,
    "description": "Câmara Fria B",
    "active": true,
    "created_at": "18/10/2024 00:09:25",
    "updated_at": "18/10/2024 00:09:25"
  }
]
FindById
GET http://localhost:3000/stock-locations/3
response:
{
  "id": 3,
  "description": "Pátio",
  "active": true,
  "created_at": "18/10/2024 00:09:25",
  "updated_at": "18/10/2024 00:09:25"
}
Create
POST http://localhost:3000/stock-locations/
request:
{
  "description": "CAMINHÃO FRIGORIFICO"
}
response:
{
  "id": 5,
  "description": "CAMINHÃO FRIGORIFICO",
  "active": true,
  "created_at": "19/10/2024 03:12:44",
  "updated_at": "19/10/2024 03:12:44"
}
Update
PATCH http://localhost:3000/stock-locations/5
response:
{
  "id": 5,
  "description": "meu deposito favorito",
  "active": true,
  "created_at": "19/10/2024 03:12:44",
  "updated_at": "19/10/2024 03:14:07"
}
Delete (inactivate)
DELETE http://localhost:3000/stock-locations/5
response:
{
  "message": "Stock Location with ID 5 deleted successfully"
}
Reactivate
POST http://localhost:3000/stock-locations/activate/5
response:
{
  "message": "Stock Location with ID 5 activated successfully"
}
