1000 lines
76 KiB
JSON
1000 lines
76 KiB
JSON
{
|
|
"info": {
|
|
"name": "Oudelaa Marketplace — Flutter",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
|
|
"description": "Captured HTTP responses using real controllers, services and a private MongoDB replica set. Test authentication guard; synthetic fixtures. No response envelope.\nCaptured at 2026-11-14T11:16:04.458Z. See MARKETPLACE-FLUTTER.md. Set baseUrl, accessToken, shopId and listingId. Saved examples use synthetic IDs. Only cash_on_delivery is supported. Online payments are deferred. One shop/currency per checkout. Page limits must be integers; home section limits 1..20, listing/repair limits 1..200. Search q maximum 120 characters. Home onlyActive=false includes active and inactive rows."
|
|
},
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "{{accessToken}}",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"variable": [
|
|
{
|
|
"key": "baseUrl",
|
|
"value": "http://localhost:4000/api/v1",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "accessToken",
|
|
"value": "",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "shopId",
|
|
"value": "",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "listingId",
|
|
"value": "",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "cartItemId",
|
|
"value": "",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "orderId",
|
|
"value": "",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"item": [
|
|
{
|
|
"name": "Product details",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/listings/{{listingId}}",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"auth": {
|
|
"type": "noauth"
|
|
}
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(200));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "200 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/listings/{{listingId}}",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"auth": {
|
|
"type": "noauth"
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"_id\": \"6af842f2f7bde43310e861a7\",\n \"ownerAdminId\": {\n \"avatar\": \"\",\n \"shopLogoUrl\": \"\",\n \"shopCoverUrl\": \"\",\n \"_id\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Test Store Owner\",\n \"username\": \"test_store\",\n \"isDisabled\": false,\n \"shopName\": \"Oudelaa Test Store\",\n \"shopDescription\": \"Musical instruments and accessories\",\n \"shopImageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"shopLocation\": \"Riyadh, Test Street\",\n \"shopLatitude\": 24.7136,\n \"shopLongitude\": 46.6753,\n \"shopPhone\": \"+966500000000\",\n \"isVerified\": true,\n \"shopDeliveryAvailable\": true,\n \"shopDeliveryFee\": 25,\n \"shopTrialPolicy\": \"Trial in store\",\n \"shopReturnPolicy\": \"Returns within 7 days\",\n \"shopPolicies\": \"Contact the store before returns\"\n },\n \"title\": \"Professional Oud\",\n \"description\": \"Test instrument\",\n \"price\": 1250.25,\n \"currency\": \"SAR\",\n \"quantity\": 10,\n \"imageUrls\": [\n \"https://example.com/oud-front.jpg\",\n \"https://example.com/oud-back.jpg\"\n ],\n \"isActive\": true,\n \"condition\": \"new\",\n \"instrumentType\": \"Oud\",\n \"listingCategory\": \"musical_instrument\",\n \"createdAt\": \"2026-11-14T11:16:03.244Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.244Z\",\n \"images\": [\n \"https://example.com/oud-front.jpg\",\n \"https://example.com/oud-back.jpg\"\n ],\n \"id\": \"6af842f2f7bde43310e861a7\",\n \"name\": \"Professional Oud\",\n \"itemType\": \"musical_instrument\",\n \"stockQuantity\": 10,\n \"isInStock\": true,\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"shop\": {\n \"adminId\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Oudelaa Test Store\",\n \"username\": \"test_store\",\n \"avatar\": \"\",\n \"id\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"description\": \"Musical instruments and accessories\",\n \"logoUrl\": \"https://example.com/shop-logo.jpg\",\n \"coverUrl\": \"https://example.com/shop-cover.jpg\",\n \"coverImageUrl\": \"https://example.com/shop-cover.jpg\",\n \"imageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"images\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"phone\": \"+966500000000\",\n \"address\": \"Riyadh, Test Street\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"isVerified\": true,\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"policies\": \"Contact the store before returns\"\n },\n \"storeName\": \"Oudelaa Test Store\"\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Marketplace home",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/home?listingsLimit=5&instrumentsLimit=5&repairShopsLimit=5",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"auth": {
|
|
"type": "noauth"
|
|
}
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(200));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "200 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/home?listingsLimit=5&instrumentsLimit=5&repairShopsLimit=5",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"auth": {
|
|
"type": "noauth"
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"categories\": [\n {\n \"key\": \"listings\",\n \"title\": \"Marketplace\",\n \"endpoint\": \"/marketplace/listings\"\n },\n {\n \"key\": \"musical_instruments\",\n \"title\": \"Musical instruments\",\n \"endpoint\": \"/marketplace/instruments\"\n },\n {\n \"key\": \"repair_shops\",\n \"title\": \"Repair shops\",\n \"endpoint\": \"/marketplace/repair-shops\"\n }\n ],\n \"summary\": {\n \"activeListings\": 2,\n \"activeMusicalInstruments\": 2,\n \"activeRepairShops\": 0\n },\n \"filters\": {\n \"listingCategories\": [\n {\n \"key\": \"all\",\n \"count\": 2\n },\n {\n \"key\": \"musical_instrument\",\n \"count\": 2\n },\n {\n \"key\": \"accessory\",\n \"count\": 0\n },\n {\n \"key\": \"audio_gear\",\n \"count\": 0\n },\n {\n \"key\": \"sheet_music\",\n \"count\": 0\n },\n {\n \"key\": \"other\",\n \"count\": 0\n }\n ]\n },\n \"featuredShops\": [\n {\n \"adminId\": \"6af842f2f7bde43310e861a6\",\n \"id\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Oudelaa Test Store\",\n \"description\": \"Musical instruments and accessories\",\n \"logoUrl\": \"https://example.com/shop-logo.jpg\",\n \"coverUrl\": \"https://example.com/shop-cover.jpg\",\n \"coverImageUrl\": \"https://example.com/shop-cover.jpg\",\n \"imageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"images\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"phone\": \"+966500000000\",\n \"address\": \"Riyadh, Test Street\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"isVerified\": true,\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"policies\": \"Contact the store before returns\",\n \"adminName\": \"Test Store Owner\",\n \"adminUsername\": \"test_store\",\n \"adminEmail\": \"store@example.com\",\n \"shopName\": \"Oudelaa Test Store\",\n \"shopDescription\": \"Musical instruments and accessories\",\n \"shopImageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"shopLocation\": \"Riyadh, Test Street\",\n \"shopLatitude\": 24.7136,\n \"shopLongitude\": 46.6753,\n \"isDisabled\": false\n }\n ],\n \"sections\": {\n \"listings\": {\n \"title\": \"Marketplace\",\n \"endpoint\": \"/marketplace/listings\",\n \"items\": [\n {\n \"_id\": \"6af842f2f7bde43310e861a8\",\n \"ownerAdminId\": {\n \"_id\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Test Store Owner\",\n \"username\": \"test_store\",\n \"isVerified\": true,\n \"shopName\": \"Oudelaa Test Store\",\n \"shopDescription\": \"Musical instruments and accessories\",\n \"shopImageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"shopLocation\": \"Riyadh, Test Street\",\n \"shopLatitude\": 24.7136,\n \"shopLongitude\": 46.6753,\n \"shopPhone\": \"+966500000000\",\n \"shopDeliveryAvailable\": true,\n \"shopDeliveryFee\": 25,\n \"shopTrialPolicy\": \"Trial in store\",\n \"shopReturnPolicy\": \"Returns within 7 days\",\n \"shopPolicies\": \"Contact the store before returns\",\n \"email\": \"store@example.com\"\n },\n \"title\": \"Strings\",\n \"description\": \"\",\n \"price\": 20,\n \"currency\": \"SAR\",\n \"quantity\": 3,\n \"imageUrls\": [],\n \"isActive\": true,\n \"condition\": \"used\",\n \"instrumentType\": \"\",\n \"listingCategory\": \"musical_instrument\",\n \"createdAt\": \"2026-11-14T11:16:03.245Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.245Z\",\n \"images\": [],\n \"id\": \"6af842f2f7bde43310e861a8\",\n \"name\": \"Strings\",\n \"itemType\": \"musical_instrument\",\n \"stockQuantity\": 3,\n \"isInStock\": true,\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"shop\": {\n \"adminId\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Oudelaa Test Store\",\n \"username\": \"test_store\",\n \"avatar\": \"\",\n \"id\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"description\": \"Musical instruments and accessories\",\n \"logoUrl\": \"https://example.com/shop-logo.jpg\",\n \"coverUrl\": \"https://example.com/shop-cover.jpg\",\n \"coverImageUrl\": \"https://example.com/shop-cover.jpg\",\n \"imageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"images\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"phone\": \"+966500000000\",\n \"address\": \"Riyadh, Test Street\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"isVerified\": true,\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"policies\": \"Contact the store before returns\"\n },\n \"storeName\": \"Oudelaa Test Store\"\n },\n {\n \"_id\": \"6af842f2f7bde43310e861a7\",\n \"ownerAdminId\": {\n \"_id\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Test Store Owner\",\n \"username\": \"test_store\",\n \"isVerified\": true,\n \"shopName\": \"Oudelaa Test Store\",\n \"shopDescription\": \"Musical instruments and accessories\",\n \"shopImageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"shopLocation\": \"Riyadh, Test Street\",\n \"shopLatitude\": 24.7136,\n \"shopLongitude\": 46.6753,\n \"shopPhone\": \"+966500000000\",\n \"shopDeliveryAvailable\": true,\n \"shopDeliveryFee\": 25,\n \"shopTrialPolicy\": \"Trial in store\",\n \"shopReturnPolicy\": \"Returns within 7 days\",\n \"shopPolicies\": \"Contact the store before returns\",\n \"email\": \"store@example.com\"\n },\n \"title\": \"Professional Oud\",\n \"description\": \"Test instrument\",\n \"price\": 1250.25,\n \"currency\": \"SAR\",\n \"quantity\": 10,\n \"imageUrls\": [\n \"https://example.com/oud-front.jpg\",\n \"https://example.com/oud-back.jpg\"\n ],\n \"isActive\": true,\n \"condition\": \"new\",\n \"instrumentType\": \"Oud\",\n \"listingCategory\": \"musical_instrument\",\n \"createdAt\": \"2026-11-14T11:16:03.244Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.244Z\",\n \"images\": [\n \"https://example.com/oud-front.jpg\",\n \"https://example.com/oud-back.jpg\"\n ],\n \"id\": \"6af842f2f7bde43310e861a7\",\n \"name\": \"Professional Oud\",\n \"itemType\": \"musical_instrument\",\n \"stockQuantity\": 10,\n \"isInStock\": true,\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"shop\": {\n \"adminId\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Oudelaa Test Store\",\n \"username\": \"test_store\",\n \"avatar\": \"\",\n \"id\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"description\": \"Musical instruments and accessories\",\n \"logoUrl\": \"https://example.com/shop-logo.jpg\",\n \"coverUrl\": \"https://example.com/shop-cover.jpg\",\n \"coverImageUrl\": \"https://example.com/shop-cover.jpg\",\n \"imageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"images\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"phone\": \"+966500000000\",\n \"address\": \"Riyadh, Test Street\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"isVerified\": true,\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"policies\": \"Contact the store before returns\"\n },\n \"storeName\": \"Oudelaa Test Store\"\n }\n ],\n \"count\": 2,\n \"page\": 1,\n \"limit\": 5,\n \"total\": 2,\n \"totalPages\": 1,\n \"nextCursor\": null,\n \"pagination\": {\n \"mode\": \"offset\",\n \"page\": 1,\n \"limit\": 5,\n \"count\": 2,\n \"total\": 2,\n \"totalPages\": 1,\n \"hasNextPage\": false,\n \"hasPreviousPage\": false,\n \"nextPage\": null,\n \"previousPage\": null,\n \"currentCursor\": null,\n \"nextCursor\": null\n }\n },\n \"musicalInstruments\": {\n \"title\": \"Musical instruments\",\n \"endpoint\": \"/marketplace/instruments\",\n \"items\": [\n {\n \"_id\": \"6af842f2f7bde43310e861a8\",\n \"ownerAdminId\": {\n \"_id\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Test Store Owner\",\n \"username\": \"test_store\",\n \"isVerified\": true,\n \"shopName\": \"Oudelaa Test Store\",\n \"shopDescription\": \"Musical instruments and accessories\",\n \"shopImageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"shopLocation\": \"Riyadh, Test Street\",\n \"shopLatitude\": 24.7136,\n \"shopLongitude\": 46.6753,\n \"shopPhone\": \"+966500000000\",\n \"shopDeliveryAvailable\": true,\n \"shopDeliveryFee\": 25,\n \"shopTrialPolicy\": \"Trial in store\",\n \"shopReturnPolicy\": \"Returns within 7 days\",\n \"shopPolicies\": \"Contact the store before returns\",\n \"email\": \"store@example.com\"\n },\n \"title\": \"Strings\",\n \"description\": \"\",\n \"price\": 20,\n \"currency\": \"SAR\",\n \"quantity\": 3,\n \"imageUrls\": [],\n \"isActive\": true,\n \"condition\": \"used\",\n \"instrumentType\": \"\",\n \"listingCategory\": \"musical_instrument\",\n \"createdAt\": \"2026-11-14T11:16:03.245Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.245Z\",\n \"images\": [],\n \"id\": \"6af842f2f7bde43310e861a8\",\n \"name\": \"Strings\",\n \"itemType\": \"musical_instrument\",\n \"stockQuantity\": 3,\n \"isInStock\": true,\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"shop\": {\n \"adminId\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Oudelaa Test Store\",\n \"username\": \"test_store\",\n \"avatar\": \"\",\n \"id\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"description\": \"Musical instruments and accessories\",\n \"logoUrl\": \"https://example.com/shop-logo.jpg\",\n \"coverUrl\": \"https://example.com/shop-cover.jpg\",\n \"coverImageUrl\": \"https://example.com/shop-cover.jpg\",\n \"imageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"images\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"phone\": \"+966500000000\",\n \"address\": \"Riyadh, Test Street\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"isVerified\": true,\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"policies\": \"Contact the store before returns\"\n },\n \"storeName\": \"Oudelaa Test Store\"\n },\n {\n \"_id\": \"6af842f2f7bde43310e861a7\",\n \"ownerAdminId\": {\n \"_id\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Test Store Owner\",\n \"username\": \"test_store\",\n \"isVerified\": true,\n \"shopName\": \"Oudelaa Test Store\",\n \"shopDescription\": \"Musical instruments and accessories\",\n \"shopImageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"shopLocation\": \"Riyadh, Test Street\",\n \"shopLatitude\": 24.7136,\n \"shopLongitude\": 46.6753,\n \"shopPhone\": \"+966500000000\",\n \"shopDeliveryAvailable\": true,\n \"shopDeliveryFee\": 25,\n \"shopTrialPolicy\": \"Trial in store\",\n \"shopReturnPolicy\": \"Returns within 7 days\",\n \"shopPolicies\": \"Contact the store before returns\",\n \"email\": \"store@example.com\"\n },\n \"title\": \"Professional Oud\",\n \"description\": \"Test instrument\",\n \"price\": 1250.25,\n \"currency\": \"SAR\",\n \"quantity\": 10,\n \"imageUrls\": [\n \"https://example.com/oud-front.jpg\",\n \"https://example.com/oud-back.jpg\"\n ],\n \"isActive\": true,\n \"condition\": \"new\",\n \"instrumentType\": \"Oud\",\n \"listingCategory\": \"musical_instrument\",\n \"createdAt\": \"2026-11-14T11:16:03.244Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.244Z\",\n \"images\": [\n \"https://example.com/oud-front.jpg\",\n \"https://example.com/oud-back.jpg\"\n ],\n \"id\": \"6af842f2f7bde43310e861a7\",\n \"name\": \"Professional Oud\",\n \"itemType\": \"musical_instrument\",\n \"stockQuantity\": 10,\n \"isInStock\": true,\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"shop\": {\n \"adminId\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Oudelaa Test Store\",\n \"username\": \"test_store\",\n \"avatar\": \"\",\n \"id\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"description\": \"Musical instruments and accessories\",\n \"logoUrl\": \"https://example.com/shop-logo.jpg\",\n \"coverUrl\": \"https://example.com/shop-cover.jpg\",\n \"coverImageUrl\": \"https://example.com/shop-cover.jpg\",\n \"imageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"images\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"phone\": \"+966500000000\",\n \"address\": \"Riyadh, Test Street\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"isVerified\": true,\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"policies\": \"Contact the store before returns\"\n },\n \"storeName\": \"Oudelaa Test Store\"\n }\n ],\n \"count\": 2,\n \"page\": 1,\n \"limit\": 5,\n \"total\": 2,\n \"totalPages\": 1,\n \"nextCursor\": null,\n \"pagination\": {\n \"mode\": \"offset\",\n \"page\": 1,\n \"limit\": 5,\n \"count\": 2,\n \"total\": 2,\n \"totalPages\": 1,\n \"hasNextPage\": false,\n \"hasPreviousPage\": false,\n \"nextPage\": null,\n \"previousPage\": null,\n \"currentCursor\": null,\n \"nextCursor\": null\n }\n },\n \"repairShops\": {\n \"title\": \"Repair shops\",\n \"endpoint\": \"/marketplace/repair-shops\",\n \"items\": [],\n \"count\": 0,\n \"page\": 1,\n \"limit\": 5,\n \"total\": 0,\n \"totalPages\": 1,\n \"nextCursor\": null,\n \"pagination\": {\n \"mode\": \"offset\",\n \"page\": 1,\n \"limit\": 5,\n \"count\": 0,\n \"total\": 0,\n \"totalPages\": 1,\n \"hasNextPage\": false,\n \"hasPreviousPage\": false,\n \"nextPage\": null,\n \"previousPage\": null,\n \"currentCursor\": null,\n \"nextCursor\": null\n }\n }\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Shop details",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/shops/{{shopId}}",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"auth": {
|
|
"type": "noauth"
|
|
}
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(200));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "200 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/shops/{{shopId}}",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"auth": {
|
|
"type": "noauth"
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"adminId\": \"6af842f2f7bde43310e861a6\",\n \"id\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Oudelaa Test Store\",\n \"description\": \"Musical instruments and accessories\",\n \"logoUrl\": \"https://example.com/shop-logo.jpg\",\n \"coverUrl\": \"https://example.com/shop-cover.jpg\",\n \"coverImageUrl\": \"https://example.com/shop-cover.jpg\",\n \"imageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"images\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"phone\": \"+966500000000\",\n \"address\": \"Riyadh, Test Street\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"isVerified\": true,\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"policies\": \"Contact the store before returns\",\n \"adminName\": \"Test Store Owner\",\n \"adminUsername\": \"test_store\",\n \"adminEmail\": \"store@example.com\",\n \"shopName\": \"Oudelaa Test Store\",\n \"shopDescription\": \"Musical instruments and accessories\",\n \"shopImageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"shopLocation\": \"Riyadh, Test Street\",\n \"shopLatitude\": 24.7136,\n \"shopLongitude\": 46.6753,\n \"isDisabled\": false\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Filter listings by shopId",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/listings?shopId={{shopId}}",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"auth": {
|
|
"type": "noauth"
|
|
}
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(200));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "200 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/listings?shopId={{shopId}}",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"auth": {
|
|
"type": "noauth"
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"items\": [\n {\n \"_id\": \"6af842f2f7bde43310e861a8\",\n \"ownerAdminId\": {\n \"_id\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Test Store Owner\",\n \"username\": \"test_store\",\n \"isVerified\": true,\n \"shopName\": \"Oudelaa Test Store\",\n \"shopDescription\": \"Musical instruments and accessories\",\n \"shopImageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"shopLocation\": \"Riyadh, Test Street\",\n \"shopLatitude\": 24.7136,\n \"shopLongitude\": 46.6753,\n \"shopPhone\": \"+966500000000\",\n \"shopDeliveryAvailable\": true,\n \"shopDeliveryFee\": 25,\n \"shopTrialPolicy\": \"Trial in store\",\n \"shopReturnPolicy\": \"Returns within 7 days\",\n \"shopPolicies\": \"Contact the store before returns\",\n \"email\": \"store@example.com\"\n },\n \"title\": \"Strings\",\n \"description\": \"\",\n \"price\": 20,\n \"currency\": \"SAR\",\n \"quantity\": 3,\n \"imageUrls\": [],\n \"isActive\": true,\n \"condition\": \"used\",\n \"instrumentType\": \"\",\n \"listingCategory\": \"musical_instrument\",\n \"createdAt\": \"2026-11-14T11:16:03.245Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.245Z\",\n \"images\": [],\n \"id\": \"6af842f2f7bde43310e861a8\",\n \"name\": \"Strings\",\n \"itemType\": \"musical_instrument\",\n \"stockQuantity\": 3,\n \"isInStock\": true,\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"shop\": {\n \"adminId\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Oudelaa Test Store\",\n \"username\": \"test_store\",\n \"avatar\": \"\",\n \"id\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"description\": \"Musical instruments and accessories\",\n \"logoUrl\": \"https://example.com/shop-logo.jpg\",\n \"coverUrl\": \"https://example.com/shop-cover.jpg\",\n \"coverImageUrl\": \"https://example.com/shop-cover.jpg\",\n \"imageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"images\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"phone\": \"+966500000000\",\n \"address\": \"Riyadh, Test Street\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"isVerified\": true,\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"policies\": \"Contact the store before returns\"\n },\n \"storeName\": \"Oudelaa Test Store\"\n },\n {\n \"_id\": \"6af842f2f7bde43310e861a7\",\n \"ownerAdminId\": {\n \"_id\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Test Store Owner\",\n \"username\": \"test_store\",\n \"isVerified\": true,\n \"shopName\": \"Oudelaa Test Store\",\n \"shopDescription\": \"Musical instruments and accessories\",\n \"shopImageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"shopLocation\": \"Riyadh, Test Street\",\n \"shopLatitude\": 24.7136,\n \"shopLongitude\": 46.6753,\n \"shopPhone\": \"+966500000000\",\n \"shopDeliveryAvailable\": true,\n \"shopDeliveryFee\": 25,\n \"shopTrialPolicy\": \"Trial in store\",\n \"shopReturnPolicy\": \"Returns within 7 days\",\n \"shopPolicies\": \"Contact the store before returns\",\n \"email\": \"store@example.com\"\n },\n \"title\": \"Professional Oud\",\n \"description\": \"Test instrument\",\n \"price\": 1250.25,\n \"currency\": \"SAR\",\n \"quantity\": 10,\n \"imageUrls\": [\n \"https://example.com/oud-front.jpg\",\n \"https://example.com/oud-back.jpg\"\n ],\n \"isActive\": true,\n \"condition\": \"new\",\n \"instrumentType\": \"Oud\",\n \"listingCategory\": \"musical_instrument\",\n \"createdAt\": \"2026-11-14T11:16:03.244Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.244Z\",\n \"images\": [\n \"https://example.com/oud-front.jpg\",\n \"https://example.com/oud-back.jpg\"\n ],\n \"id\": \"6af842f2f7bde43310e861a7\",\n \"name\": \"Professional Oud\",\n \"itemType\": \"musical_instrument\",\n \"stockQuantity\": 10,\n \"isInStock\": true,\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"shop\": {\n \"adminId\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Oudelaa Test Store\",\n \"username\": \"test_store\",\n \"avatar\": \"\",\n \"id\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"description\": \"Musical instruments and accessories\",\n \"logoUrl\": \"https://example.com/shop-logo.jpg\",\n \"coverUrl\": \"https://example.com/shop-cover.jpg\",\n \"coverImageUrl\": \"https://example.com/shop-cover.jpg\",\n \"imageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"images\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"phone\": \"+966500000000\",\n \"address\": \"Riyadh, Test Street\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"isVerified\": true,\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"policies\": \"Contact the store before returns\"\n },\n \"storeName\": \"Oudelaa Test Store\"\n }\n ],\n \"count\": 2,\n \"page\": 1,\n \"limit\": 20,\n \"total\": 2,\n \"totalPages\": 1,\n \"nextCursor\": null,\n \"pagination\": {\n \"mode\": \"offset\",\n \"page\": 1,\n \"limit\": 20,\n \"count\": 2,\n \"total\": 2,\n \"totalPages\": 1,\n \"hasNextPage\": false,\n \"hasPreviousPage\": false,\n \"nextPage\": null,\n \"previousPage\": null,\n \"currentCursor\": null,\n \"nextCursor\": null\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Shop listings",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/shops/{{shopId}}/listings",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"auth": {
|
|
"type": "noauth"
|
|
}
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(200));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "200 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/shops/{{shopId}}/listings",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"auth": {
|
|
"type": "noauth"
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"items\": [\n {\n \"_id\": \"6af842f2f7bde43310e861a8\",\n \"ownerAdminId\": {\n \"_id\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Test Store Owner\",\n \"username\": \"test_store\",\n \"isVerified\": true,\n \"shopName\": \"Oudelaa Test Store\",\n \"shopDescription\": \"Musical instruments and accessories\",\n \"shopImageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"shopLocation\": \"Riyadh, Test Street\",\n \"shopLatitude\": 24.7136,\n \"shopLongitude\": 46.6753,\n \"shopPhone\": \"+966500000000\",\n \"shopDeliveryAvailable\": true,\n \"shopDeliveryFee\": 25,\n \"shopTrialPolicy\": \"Trial in store\",\n \"shopReturnPolicy\": \"Returns within 7 days\",\n \"shopPolicies\": \"Contact the store before returns\",\n \"email\": \"store@example.com\"\n },\n \"title\": \"Strings\",\n \"description\": \"\",\n \"price\": 20,\n \"currency\": \"SAR\",\n \"quantity\": 3,\n \"imageUrls\": [],\n \"isActive\": true,\n \"condition\": \"used\",\n \"instrumentType\": \"\",\n \"listingCategory\": \"musical_instrument\",\n \"createdAt\": \"2026-11-14T11:16:03.245Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.245Z\",\n \"images\": [],\n \"id\": \"6af842f2f7bde43310e861a8\",\n \"name\": \"Strings\",\n \"itemType\": \"musical_instrument\",\n \"stockQuantity\": 3,\n \"isInStock\": true,\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"shop\": {\n \"adminId\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Oudelaa Test Store\",\n \"username\": \"test_store\",\n \"avatar\": \"\",\n \"id\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"description\": \"Musical instruments and accessories\",\n \"logoUrl\": \"https://example.com/shop-logo.jpg\",\n \"coverUrl\": \"https://example.com/shop-cover.jpg\",\n \"coverImageUrl\": \"https://example.com/shop-cover.jpg\",\n \"imageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"images\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"phone\": \"+966500000000\",\n \"address\": \"Riyadh, Test Street\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"isVerified\": true,\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"policies\": \"Contact the store before returns\"\n },\n \"storeName\": \"Oudelaa Test Store\"\n },\n {\n \"_id\": \"6af842f2f7bde43310e861a7\",\n \"ownerAdminId\": {\n \"_id\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Test Store Owner\",\n \"username\": \"test_store\",\n \"isVerified\": true,\n \"shopName\": \"Oudelaa Test Store\",\n \"shopDescription\": \"Musical instruments and accessories\",\n \"shopImageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"shopLocation\": \"Riyadh, Test Street\",\n \"shopLatitude\": 24.7136,\n \"shopLongitude\": 46.6753,\n \"shopPhone\": \"+966500000000\",\n \"shopDeliveryAvailable\": true,\n \"shopDeliveryFee\": 25,\n \"shopTrialPolicy\": \"Trial in store\",\n \"shopReturnPolicy\": \"Returns within 7 days\",\n \"shopPolicies\": \"Contact the store before returns\",\n \"email\": \"store@example.com\"\n },\n \"title\": \"Professional Oud\",\n \"description\": \"Test instrument\",\n \"price\": 1250.25,\n \"currency\": \"SAR\",\n \"quantity\": 10,\n \"imageUrls\": [\n \"https://example.com/oud-front.jpg\",\n \"https://example.com/oud-back.jpg\"\n ],\n \"isActive\": true,\n \"condition\": \"new\",\n \"instrumentType\": \"Oud\",\n \"listingCategory\": \"musical_instrument\",\n \"createdAt\": \"2026-11-14T11:16:03.244Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.244Z\",\n \"images\": [\n \"https://example.com/oud-front.jpg\",\n \"https://example.com/oud-back.jpg\"\n ],\n \"id\": \"6af842f2f7bde43310e861a7\",\n \"name\": \"Professional Oud\",\n \"itemType\": \"musical_instrument\",\n \"stockQuantity\": 10,\n \"isInStock\": true,\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"shop\": {\n \"adminId\": \"6af842f2f7bde43310e861a6\",\n \"name\": \"Oudelaa Test Store\",\n \"username\": \"test_store\",\n \"avatar\": \"\",\n \"id\": \"6af842f2f7bde43310e861a6\",\n \"adminUserId\": \"6af842f2f7bde43310e861a6\",\n \"ownerId\": \"6af842f2f7bde43310e861a6\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"description\": \"Musical instruments and accessories\",\n \"logoUrl\": \"https://example.com/shop-logo.jpg\",\n \"coverUrl\": \"https://example.com/shop-cover.jpg\",\n \"coverImageUrl\": \"https://example.com/shop-cover.jpg\",\n \"imageUrls\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"images\": [\n \"https://example.com/shop-logo.jpg\",\n \"https://example.com/shop-cover.jpg\"\n ],\n \"phone\": \"+966500000000\",\n \"address\": \"Riyadh, Test Street\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"isVerified\": true,\n \"deliveryAvailable\": true,\n \"deliveryFee\": 25,\n \"trialPolicy\": \"Trial in store\",\n \"returnPolicy\": \"Returns within 7 days\",\n \"policies\": \"Contact the store before returns\"\n },\n \"storeName\": \"Oudelaa Test Store\"\n }\n ],\n \"count\": 2,\n \"page\": 1,\n \"limit\": 20,\n \"total\": 2,\n \"totalPages\": 1,\n \"nextCursor\": null,\n \"pagination\": {\n \"mode\": \"offset\",\n \"page\": 1,\n \"limit\": 20,\n \"count\": 2,\n \"total\": 2,\n \"totalPages\": 1,\n \"hasNextPage\": false,\n \"hasPreviousPage\": false,\n \"nextPage\": null,\n \"previousPage\": null,\n \"currentCursor\": null,\n \"nextCursor\": null\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Empty cart",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/cart",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md."
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(200));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "200 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/cart",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md."
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"items\": [],\n \"itemCount\": 0,\n \"quantity\": 0\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Set cart item quantity",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"url": "{{baseUrl}}/marketplace/cart/items",
|
|
"description": "Sets the absolute quantity, including for an existing listing. Does not increment on retries.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"listingId\": \"{{listingId}}\",\n \"quantity\": 2\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(201));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;",
|
|
"if (body.items?.length) pm.collectionVariables.set(\"cartItemId\", body.items[0].id);"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "201 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"url": "{{baseUrl}}/marketplace/cart/items",
|
|
"description": "Sets the absolute quantity, including for an existing listing. Does not increment on retries.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"listingId\": \"{{listingId}}\",\n \"quantity\": 2\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"status": "Created",
|
|
"code": 201,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"items\": [\n {\n \"id\": \"6af842f3fa94fdf9aed04894\",\n \"listingId\": \"6af842f2f7bde43310e861a7\",\n \"quantity\": 2,\n \"name\": \"Professional Oud\",\n \"imageUrl\": \"https://example.com/oud-front.jpg\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"unitPrice\": 1250.25,\n \"currency\": \"SAR\",\n \"total\": 2500.5,\n \"stockQuantity\": 10,\n \"isInStock\": true,\n \"isAvailable\": true\n }\n ],\n \"itemCount\": 1,\n \"quantity\": 2\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Get cart",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/cart",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md."
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(200));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "200 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/cart",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md."
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"items\": [\n {\n \"id\": \"6af842f3fa94fdf9aed04894\",\n \"listingId\": \"6af842f2f7bde43310e861a7\",\n \"quantity\": 2,\n \"name\": \"Professional Oud\",\n \"imageUrl\": \"https://example.com/oud-front.jpg\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"unitPrice\": 1250.25,\n \"currency\": \"SAR\",\n \"total\": 2500.5,\n \"stockQuantity\": 10,\n \"isInStock\": true,\n \"isAvailable\": true\n }\n ],\n \"itemCount\": 1,\n \"quantity\": 2\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Update cart item quantity",
|
|
"request": {
|
|
"method": "PATCH",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"url": "{{baseUrl}}/marketplace/cart/items/{{cartItemId}}",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"quantity\": 3\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(200));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "200 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "PATCH",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"url": "{{baseUrl}}/marketplace/cart/items/{{cartItemId}}",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"quantity\": 3\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"items\": [\n {\n \"id\": \"6af842f3fa94fdf9aed04894\",\n \"listingId\": \"6af842f2f7bde43310e861a7\",\n \"quantity\": 3,\n \"name\": \"Professional Oud\",\n \"imageUrl\": \"https://example.com/oud-front.jpg\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"unitPrice\": 1250.25,\n \"currency\": \"SAR\",\n \"total\": 3750.75,\n \"stockQuantity\": 10,\n \"isInStock\": true,\n \"isAvailable\": true\n }\n ],\n \"itemCount\": 1,\n \"quantity\": 3\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Remove cart item",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/cart/items/{{cartItemId}}",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md."
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(200));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "200 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/cart/items/{{cartItemId}}",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md."
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"items\": [],\n \"itemCount\": 0,\n \"quantity\": 0\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Clear cart",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/cart",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md."
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(200));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "200 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/cart",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md."
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"items\": [],\n \"itemCount\": 0,\n \"quantity\": 0\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Checkout preview",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"url": "{{baseUrl}}/marketplace/checkout/preview",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"items\": [\n {\n \"listingId\": \"{{listingId}}\",\n \"quantity\": 2\n }\n ],\n \"fulfillmentMethod\": \"delivery\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(201));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "201 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"url": "{{baseUrl}}/marketplace/checkout/preview",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"items\": [\n {\n \"listingId\": \"{{listingId}}\",\n \"quantity\": 2\n }\n ],\n \"fulfillmentMethod\": \"delivery\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"status": "Created",
|
|
"code": 201,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"items\": [\n {\n \"listingId\": \"6af842f2f7bde43310e861a7\",\n \"title\": \"Professional Oud\",\n \"quantity\": 2,\n \"unitPrice\": 1250.25,\n \"total\": 2500.5,\n \"imageUrl\": \"https://example.com/oud-front.jpg\",\n \"stockQuantity\": 10,\n \"isInStock\": true\n }\n ],\n \"subtotal\": 2500.5,\n \"deliveryFee\": 25,\n \"discount\": 0,\n \"total\": 2525.5,\n \"currency\": \"SAR\",\n \"fulfillmentMethod\": \"delivery\",\n \"isValid\": true,\n \"stockIssues\": []\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Create order",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"url": "{{baseUrl}}/marketplace/orders",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"items\": [\n {\n \"listingId\": \"{{listingId}}\",\n \"quantity\": 2\n }\n ],\n \"fulfillmentMethod\": \"delivery\",\n \"customerName\": \"Flutter Test Customer\",\n \"customerPhone\": \"+966500000000\",\n \"city\": \"Riyadh\",\n \"address\": \"Test street 10\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"paymentMethod\": \"cash_on_delivery\",\n \"notes\": \"Call before arrival\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(201));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;",
|
|
"if (body.id) pm.collectionVariables.set(\"orderId\", body.id);"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "201 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"url": "{{baseUrl}}/marketplace/orders",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"items\": [\n {\n \"listingId\": \"{{listingId}}\",\n \"quantity\": 2\n }\n ],\n \"fulfillmentMethod\": \"delivery\",\n \"customerName\": \"Flutter Test Customer\",\n \"customerPhone\": \"+966500000000\",\n \"city\": \"Riyadh\",\n \"address\": \"Test street 10\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"paymentMethod\": \"cash_on_delivery\",\n \"notes\": \"Call before arrival\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"status": "Created",
|
|
"code": 201,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"id\": \"6af842f3f7bde43310e86202\",\n \"orderNumber\": \"OD-1794654963647-9790E03D30\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"items\": [\n {\n \"listingId\": \"6af842f2f7bde43310e861a7\",\n \"title\": \"Professional Oud\",\n \"quantity\": 2,\n \"unitPrice\": 1250.25,\n \"total\": 2500.5,\n \"imageUrl\": \"https://example.com/oud-front.jpg\"\n }\n ],\n \"subtotal\": 2500.5,\n \"deliveryFee\": 25,\n \"discount\": 0,\n \"total\": 2525.5,\n \"currency\": \"SAR\",\n \"customerName\": \"Flutter Test Customer\",\n \"customerPhone\": \"+966500000000\",\n \"fulfillmentMethod\": \"delivery\",\n \"city\": \"Riyadh\",\n \"address\": \"Test street 10\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"paymentMethod\": \"cash_on_delivery\",\n \"paymentStatus\": \"unpaid\",\n \"notes\": \"Call before arrival\",\n \"status\": \"pending\",\n \"cancellationReason\": \"\",\n \"statusHistory\": [\n {\n \"status\": \"pending\",\n \"at\": \"2026-11-14T11:16:03.647Z\",\n \"note\": \"Order created\"\n }\n ],\n \"createdAt\": \"2026-11-14T11:16:03.657Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.657Z\"\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "List my orders",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/orders",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md."
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(200));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "200 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/orders",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md."
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"items\": [\n {\n \"id\": \"6af842f3f7bde43310e86202\",\n \"orderNumber\": \"OD-1794654963647-9790E03D30\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"items\": [\n {\n \"listingId\": \"6af842f2f7bde43310e861a7\",\n \"title\": \"Professional Oud\",\n \"quantity\": 2,\n \"unitPrice\": 1250.25,\n \"total\": 2500.5,\n \"imageUrl\": \"https://example.com/oud-front.jpg\"\n }\n ],\n \"subtotal\": 2500.5,\n \"deliveryFee\": 25,\n \"discount\": 0,\n \"total\": 2525.5,\n \"currency\": \"SAR\",\n \"customerName\": \"Flutter Test Customer\",\n \"customerPhone\": \"+966500000000\",\n \"fulfillmentMethod\": \"delivery\",\n \"city\": \"Riyadh\",\n \"address\": \"Test street 10\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"paymentMethod\": \"cash_on_delivery\",\n \"paymentStatus\": \"unpaid\",\n \"notes\": \"Call before arrival\",\n \"status\": \"pending\",\n \"cancellationReason\": \"\",\n \"statusHistory\": [\n {\n \"status\": \"pending\",\n \"at\": \"2026-11-14T11:16:03.647Z\",\n \"note\": \"Order created\"\n }\n ],\n \"createdAt\": \"2026-11-14T11:16:03.657Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.657Z\"\n }\n ],\n \"count\": 1,\n \"page\": 1,\n \"limit\": 20,\n \"total\": 1,\n \"totalPages\": 1,\n \"nextCursor\": null,\n \"pagination\": {\n \"mode\": \"offset\",\n \"page\": 1,\n \"limit\": 20,\n \"count\": 1,\n \"total\": 1,\n \"totalPages\": 1,\n \"hasNextPage\": false,\n \"hasPreviousPage\": false,\n \"nextPage\": null,\n \"previousPage\": null,\n \"currentCursor\": null,\n \"nextCursor\": null\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Get order",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/orders/{{orderId}}",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md."
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(200));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "200 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": "{{baseUrl}}/marketplace/orders/{{orderId}}",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md."
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"id\": \"6af842f3f7bde43310e86202\",\n \"orderNumber\": \"OD-1794654963647-9790E03D30\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"items\": [\n {\n \"listingId\": \"6af842f2f7bde43310e861a7\",\n \"title\": \"Professional Oud\",\n \"quantity\": 2,\n \"unitPrice\": 1250.25,\n \"total\": 2500.5,\n \"imageUrl\": \"https://example.com/oud-front.jpg\"\n }\n ],\n \"subtotal\": 2500.5,\n \"deliveryFee\": 25,\n \"discount\": 0,\n \"total\": 2525.5,\n \"currency\": \"SAR\",\n \"customerName\": \"Flutter Test Customer\",\n \"customerPhone\": \"+966500000000\",\n \"fulfillmentMethod\": \"delivery\",\n \"city\": \"Riyadh\",\n \"address\": \"Test street 10\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"paymentMethod\": \"cash_on_delivery\",\n \"paymentStatus\": \"unpaid\",\n \"notes\": \"Call before arrival\",\n \"status\": \"pending\",\n \"cancellationReason\": \"\",\n \"statusHistory\": [\n {\n \"status\": \"pending\",\n \"at\": \"2026-11-14T11:16:03.647Z\",\n \"note\": \"Order created\"\n }\n ],\n \"createdAt\": \"2026-11-14T11:16:03.657Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.657Z\"\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Cancel order",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"url": "{{baseUrl}}/marketplace/orders/{{orderId}}/cancel",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"reason\": \"Changed my mind\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(201));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "201 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"url": "{{baseUrl}}/marketplace/orders/{{orderId}}/cancel",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"reason\": \"Changed my mind\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"status": "Created",
|
|
"code": 201,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"id\": \"6af842f3f7bde43310e86202\",\n \"orderNumber\": \"OD-1794654963647-9790E03D30\",\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"items\": [\n {\n \"listingId\": \"6af842f2f7bde43310e861a7\",\n \"title\": \"Professional Oud\",\n \"quantity\": 2,\n \"unitPrice\": 1250.25,\n \"total\": 2500.5,\n \"imageUrl\": \"https://example.com/oud-front.jpg\"\n }\n ],\n \"subtotal\": 2500.5,\n \"deliveryFee\": 25,\n \"discount\": 0,\n \"total\": 2525.5,\n \"currency\": \"SAR\",\n \"customerName\": \"Flutter Test Customer\",\n \"customerPhone\": \"+966500000000\",\n \"fulfillmentMethod\": \"delivery\",\n \"city\": \"Riyadh\",\n \"address\": \"Test street 10\",\n \"latitude\": 24.7136,\n \"longitude\": 46.6753,\n \"paymentMethod\": \"cash_on_delivery\",\n \"paymentStatus\": \"unpaid\",\n \"notes\": \"Call before arrival\",\n \"status\": \"cancelled\",\n \"cancellationReason\": \"Changed my mind\",\n \"statusHistory\": [\n {\n \"status\": \"pending\",\n \"at\": \"2026-11-14T11:16:03.647Z\",\n \"note\": \"Order created\"\n },\n {\n \"status\": \"cancelled\",\n \"at\": \"2026-11-14T11:16:03.701Z\",\n \"note\": \"Changed my mind\"\n }\n ],\n \"createdAt\": \"2026-11-14T11:16:03.657Z\",\n \"updatedAt\": \"2026-11-14T11:16:03.702Z\"\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Preview insufficient stock",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"url": "{{baseUrl}}/marketplace/checkout/preview",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"items\": [\n {\n \"listingId\": \"{{listingId}}\",\n \"quantity\": 100\n }\n ],\n \"fulfillmentMethod\": \"delivery\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test('Expected HTTP status', () => pm.response.to.have.status(201));",
|
|
"const json = pm.response.json();",
|
|
"const body = json.data ?? json;"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"response": [
|
|
{
|
|
"name": "201 — captured integration response",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"url": "{{baseUrl}}/marketplace/checkout/preview",
|
|
"description": "See the saved response example and MARKETPLACE-FLUTTER.md.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"items\": [\n {\n \"listingId\": \"{{listingId}}\",\n \"quantity\": 100\n }\n ],\n \"fulfillmentMethod\": \"delivery\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"status": "Created",
|
|
"code": 201,
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json; charset=utf-8"
|
|
}
|
|
],
|
|
"_postman_previewlanguage": "json",
|
|
"cookie": [],
|
|
"body": "{\n \"shopId\": \"6af842f2f7bde43310e861a6\",\n \"items\": [\n {\n \"listingId\": \"6af842f2f7bde43310e861a7\",\n \"title\": \"Professional Oud\",\n \"quantity\": 100,\n \"unitPrice\": 1250.25,\n \"total\": 125025,\n \"imageUrl\": \"https://example.com/oud-front.jpg\",\n \"stockQuantity\": 10,\n \"isInStock\": false\n }\n ],\n \"subtotal\": 125025,\n \"deliveryFee\": 25,\n \"discount\": 0,\n \"total\": 125050,\n \"currency\": \"SAR\",\n \"fulfillmentMethod\": \"delivery\",\n \"isValid\": false,\n \"stockIssues\": [\n {\n \"listingId\": \"6af842f2f7bde43310e861a7\",\n \"requestedQuantity\": 100,\n \"stockQuantity\": 10\n }\n ]\n}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|