Fix Postman collection request bodies and add missing auth endpoints

Added missing authentication endpoints:
- POST /api/v1/auth/me/avatar (Upload Avatar)
- GET /api/v1/auth/me/avatar (Get Avatar)
- DELETE /api/v1/auth/me/avatar (Delete Avatar)
- POST /api/v1/auth/logout (Logout)

Fixed request body DTOs to match backend:
- ProductSupplier: Use 'cost' field, composite key bulk delete structure
- Appointment: Remove storeId/notes, add appointmentStatus and petIds
- Adoption: Add adoptionStatus field
- Refund: Remove amount field (only saleId and reason)
- Customer: Remove address field
- Store: Use address/phone/email (not storeAddress/storePhone)
- Inventory: Use prodId (not productId)
- Supplier: Split contact into supContactFirstName and supContactLastName

All 107 requests verified against backend controllers and DTOs.
JSON validation passed. Collection is production-ready.

Phase 3B
This commit is contained in:
2026-03-09 01:24:23 -06:00
parent dec0986830
commit 64e6019d40

View File

@@ -203,6 +203,84 @@
"raw": "{\n \"fullName\": \"Updated Name\",\n \"email\": \"updated@example.com\"\n}" "raw": "{\n \"fullName\": \"Updated Name\",\n \"email\": \"updated@example.com\"\n}"
} }
} }
},
{
"name": "Upload Avatar",
"request": {
"method": "POST",
"url": "{{baseUrl}}/api/v1/auth/me/avatar",
"header": [
{
"key": "Authorization",
"value": "Bearer {{customerToken}}",
"type": "text"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "avatar",
"type": "file",
"src": []
}
]
}
}
},
{
"name": "Get Avatar",
"request": {
"method": "GET",
"url": "{{baseUrl}}/api/v1/auth/me/avatar",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{customerToken}}",
"type": "text"
}
]
}
},
{
"name": "Delete Avatar",
"request": {
"method": "DELETE",
"url": "{{baseUrl}}/api/v1/auth/me/avatar",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{customerToken}}",
"type": "text"
}
]
}
},
{
"name": "Logout",
"request": {
"method": "POST",
"url": "{{baseUrl}}/api/v1/auth/logout",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{customerToken}}",
"type": "text"
}
]
}
} }
] ]
}, },
@@ -841,7 +919,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"customerId\": 1,\n \"storeId\": 1,\n \"serviceId\": 1,\n \"appointmentDate\": \"2026-03-15\",\n \"appointmentTime\": \"10:00:00\",\n \"notes\": \"Test\"\n}" "raw": "{\n \"customerId\": 1,\n \"serviceId\": 1,\n \"appointmentDate\": \"2026-03-15\",\n \"appointmentTime\": \"10:30:00\",\n \"appointmentStatus\": \"Booked\",\n \"petIds\": [1, 2]\n}"
} }
} }
}, },
@@ -863,7 +941,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"customerId\": 1,\n \"storeId\": 1,\n \"serviceId\": 1,\n \"appointmentDate\": \"2026-03-15\",\n \"appointmentTime\": \"14:00:00\",\n \"notes\": \"Updated\"\n}" "raw": "{\n \"customerId\": 1,\n \"serviceId\": 2,\n \"appointmentDate\": \"2026-03-20\",\n \"appointmentTime\": \"14:00:00\",\n \"appointmentStatus\": \"Completed\",\n \"petIds\": [1]\n}"
} }
} }
}, },
@@ -966,7 +1044,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"petId\": 1,\n \"customerId\": 1,\n \"adoptionDate\": \"2026-03-10\"\n}" "raw": "{\n \"petId\": 1,\n \"customerId\": 1,\n \"adoptionDate\": \"2026-03-10\",\n \"adoptionStatus\": \"Pending\"\n}"
} }
} }
}, },
@@ -988,7 +1066,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"petId\": 1,\n \"customerId\": 1,\n \"adoptionDate\": \"2026-03-11\"\n}" "raw": "{\n \"petId\": 1,\n \"customerId\": 1,\n \"adoptionDate\": \"2026-03-10\",\n \"adoptionStatus\": \"Completed\"\n}"
} }
} }
}, },
@@ -1055,7 +1133,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"saleId\": 1,\n \"reason\": \"Defective\",\n \"amount\": 50.0\n}" "raw": "{\n \"saleId\": 1,\n \"reason\": \"Defective product\"\n}"
} }
} }
}, },
@@ -1310,7 +1388,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"555-0100\",\n \"address\": \"123 Main St\"\n}" "raw": "{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"555-123-4567\"\n}"
} }
} }
}, },
@@ -1332,7 +1410,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"555-0100\",\n \"address\": \"123 Main St\"\n}" "raw": "{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"555-987-6543\"\n}"
} }
} }
}, },
@@ -1573,7 +1651,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"storeName\": \"New Branch\",\n \"storeAddress\": \"456 Oak St\",\n \"storePhone\": \"555-0200\"\n}" "raw": "{\n \"storeName\": \"New Pet Shop\",\n \"address\": \"123 Main Street\",\n \"phone\": \"555-111-2222\",\n \"email\": \"newstore@petshop.com\"\n}"
} }
} }
}, },
@@ -1595,7 +1673,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"storeName\": \"Updated Branch\",\n \"storeAddress\": \"456 Oak St\",\n \"storePhone\": \"555-0200\"\n}" "raw": "{\n \"storeName\": \"Updated Pet Shop\",\n \"address\": \"456 Oak Avenue\",\n \"phone\": \"555-333-4444\",\n \"email\": \"updated@petshop.com\"\n}"
} }
} }
}, },
@@ -1698,7 +1776,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"productId\": 1,\n \"storeId\": 1,\n \"quantity\": 100\n}" "raw": "{\n \"prodId\": 1,\n \"quantity\": 100\n}"
} }
} }
}, },
@@ -1720,7 +1798,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"quantity\": 150\n}" "raw": "{\n \"prodId\": 1,\n \"quantity\": 150\n}"
} }
} }
}, },
@@ -1823,7 +1901,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"supCompany\": \"ACME Corp\",\n \"supContact\": \"John Smith\",\n \"supPhone\": \"555-0300\",\n \"supEmail\": \"john@acme.com\"\n}" "raw": "{\n \"supCompany\": \"New Supplier Inc\",\n \"supContactFirstName\": \"John\",\n \"supContactLastName\": \"Smith\",\n \"supEmail\": \"john@newsupplier.com\",\n \"supPhone\": \"555-555-5555\"\n}"
} }
} }
}, },
@@ -1845,7 +1923,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"supCompany\": \"ACME Corp\",\n \"supContact\": \"Jane Smith\",\n \"supPhone\": \"555-0300\",\n \"supEmail\": \"jane@acme.com\"\n}" "raw": "{\n \"supCompany\": \"Updated Supplier Co\",\n \"supContactFirstName\": \"Jane\",\n \"supContactLastName\": \"Doe\",\n \"supEmail\": \"jane@updatedsupplier.com\",\n \"supPhone\": \"555-666-7777\"\n}"
} }
} }
}, },
@@ -2007,7 +2085,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"productId\": 1,\n \"supplierId\": 1,\n \"price\": 25.0\n}" "raw": "{\n \"productId\": 1,\n \"supplierId\": 2,\n \"cost\": 35.00\n}"
} }
} }
}, },
@@ -2029,7 +2107,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"price\": 30.0\n}" "raw": "{\n \"productId\": 1,\n \"supplierId\": 2,\n \"cost\": 40.00\n}"
} }
} }
}, },
@@ -2069,7 +2147,7 @@
], ],
"body": { "body": {
"mode": "raw", "mode": "raw",
"raw": "{\n \"ids\": []\n}" "raw": "{\n \"keys\": [\n {\"productId\": 1, \"supplierId\": 2},\n {\"productId\": 3, \"supplierId\": 4}\n ]\n}"
} }
} }
} }