-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostman_collection.json
More file actions
81 lines (81 loc) · 2.8 KB
/
Copy pathpostman_collection.json
File metadata and controls
81 lines (81 loc) · 2.8 KB
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
{
"info": {
"name": "Enterprise E-Commerce API",
"description": "Starter collection. Import openapi.json for the complete generated collection.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"variable": [
{"key": "base_url", "value": "http://127.0.0.1:8000/api/v1"},
{"key": "access_token", "value": ""},
{"key": "refresh_token", "value": ""},
{"key": "address_id", "value": "1"},
{"key": "variant_id", "value": "1"},
{"key": "order_id", "value": "1"}
],
"item": [
{
"name": "System",
"item": [
{"name": "Health", "request": {"method": "GET", "url": "{{base_url}}/health"}},
{"name": "Ready", "request": {"method": "GET", "url": "{{base_url}}/ready"}}
]
},
{
"name": "Authentication",
"item": [
{
"name": "Register",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {"mode": "raw", "raw": "{\n \"email\": \"new.customer@example.com\",\n \"full_name\": \"New Customer\",\n \"password\": \"Password123\"\n}"},
"url": "{{base_url}}/auth/register"
}
},
{
"name": "Login",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {"mode": "raw", "raw": "{\n \"email\": \"customer@commerce.example.com\",\n \"password\": \"Password@123\"\n}"},
"url": "{{base_url}}/auth/login"
}
}
]
},
{
"name": "Commerce",
"item": [
{
"name": "List Products",
"request": {"method": "GET", "url": "{{base_url}}/catalog/products"}
},
{
"name": "Add Cart Item",
"request": {
"method": "POST",
"header": [
{"key": "Authorization", "value": "Bearer {{access_token}}"},
{"key": "Content-Type", "value": "application/json"}
],
"body": {"mode": "raw", "raw": "{\n \"variant_id\": {{variant_id}},\n \"quantity\": 1\n}"},
"url": "{{base_url}}/cart/items"
}
},
{
"name": "Checkout",
"request": {
"method": "POST",
"header": [
{"key": "Authorization", "value": "Bearer {{access_token}}"},
{"key": "Content-Type", "value": "application/json"},
{"key": "Idempotency-Key", "value": "postman-checkout-0001"}
],
"body": {"mode": "raw", "raw": "{\n \"address_id\": {{address_id}},\n \"payment_method\": \"card\",\n \"coupon_code\": \"WELCOME10\"\n}"},
"url": "{{base_url}}/orders/checkout"
}
}
]
}
]
}