This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapi.http
87 lines (64 loc) · 2.06 KB
/
api.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
### Healthcheck
GET http://localhost:3002/health
##################################################
### Listar clientes
GET http://localhost:3002/cliente
### Buscar cliente pelo CPF (Login)
GET http://localhost:3002/cliente/cpf/44470640735
### Criar cliente (Cadastro)
POST http://localhost:3002/cliente
Content-Type: application/json
{
"cpf": "44470640735",
"nome": "Fulano da Silva Santos",
"email": "[email protected]"
}
### Editar cliente
PUT http://localhost:3002/cliente/6a9d3e75-06e2-4066-aa4a-9c2a5f44ba3f
Content-Type: application/json
{
"cpf": "44470640735",
"nome": "Fulano da Silva Santos",
"email": "[email protected]"
}
### Remover cliente
DELETE http://localhost:3002/cliente/96a9d3e75-06e2-4066-aa4a-9c2a5f44ba3f
##################################################
### Listar categorias
GET http://localhost:3002/categoria
### Detalhes de uma categoria
GET http://localhost:3002/categoria/43a7f9e1-632b-4cb6-b7d7-38e1004f2a9c
##################################################
### Listar produtos
GET http://localhost:3002/produto
### Listar produtos por categoria
GET http://localhost:3002/produto/categoria/43a7f9e1-632b-4cb6-b7d7-38e1004f2a9c
### Detalhes de um produto
GET http://localhost:3002/produto/6a1f1007-b48a-458b-8009-9f2701eae8f3
##################################################
### Fila de pedidos (com o status "Recebido")
GET http://localhost:3002/pedido/fila
### Listar pedidos (com o status "Pronto" ou "Em preparação")
GET http://localhost:3002/pedido
### Detalhes de um pedido
GET http://localhost:3002/pedido/ffb5ea00-5e1c-40d1-b9b9-bce8b4baf3dc
### Criar pedido
POST http://localhost:3002/pedido
Content-Type: application/json
Authorization: Bearer ???
{
"itensPedido": [
{
"produto": "4511aa20-90b2-45ae-bbf8-3ab05ec85983",
"quantidade": 1
}
]
}
### Editar pedido (atualizar status)
PUT http://localhost:3002/pedido/10cc2240-cc07-4a02-bb75-e292faef49e3
Content-Type: application/json
{
"statusPagamento": "pago",
"statusPedido": "em_preparacao",
"qrCode": ""
}