diff --git a/v2/README.md b/v2/README.md new file mode 100644 index 0000000..224f828 --- /dev/null +++ b/v2/README.md @@ -0,0 +1,100 @@ +# CatalogAPI v2 — Examples + +Everything here targets the **CatalogAPI v2** JSON/REST API and the **sandbox** +environment, so you can explore and place test orders without touching +production. The canonical contract is the OpenAPI spec +([`openapi.json`](openapi.json)); the Postman collection and the examples below +are generated from it. + +> Looking for the legacy v1 (XML) interface packages? Those live in the +> language folders at the repo root (`perl/`, `php/`, `java/`, `dotnet/`). + +## Quick start (Postman) + +1. **Import two files** into Postman: + - `postman/catalogapi.postman_collection.json` — the full API, in folders by area + - `postman/catalogapi.sandbox.postman_environment.json` — the **CatalogAPI Sandbox** environment +2. **Select** the *CatalogAPI Sandbox* environment (top-right in Postman). +3. **Fill in two values** in that environment: + - `apiKey` — your sandbox API key (see [Authentication](#authentication)) + - `socket_id` — the catalog socket you want to browse/sell from +4. Open **Quickstart — Order Lifecycle** and **Run** the folder. + +That's it — the Quickstart walks an item from search all the way to a tracked +order, carrying the IDs forward for you at each step. + +### No Postman? Use newman (CLI) + +```bash +# Smoke test — no key required (health check is public) +npx newman run postman/catalogapi.postman_collection.json --folder Health + +# Run the full lifecycle against sandbox +npx newman run postman/catalogapi.postman_collection.json \ + -e postman/catalogapi.sandbox.postman_environment.json \ + --folder "Quickstart — Order Lifecycle" \ + --env-var apiKey=YOUR_SANDBOX_KEY \ + --env-var socket_id=YOUR_SOCKET_ID +``` + +## Authentication + +Every request (except the public `/ping` health check) authenticates with a +single bearer token: + +``` +Authorization: Bearer +``` + +Treat the key as **opaque** — it's an account credential the server decodes; its +internal format is not something your client should parse or construct. Paste it +into the environment's `apiKey` field and the collection applies it to every +request. + +## What's in the collection + +| Folder | Contents | +|--------|----------| +| **Quickstart — Order Lifecycle** | A single runnable sequence: search → add to cart → set address → validate & lock → place order → track. Each step captures the IDs the next one needs. | +| **Catalog** | Browse and search: sockets, items, item details, categories, brands, tags, stock, marketing. | +| **Cart** | Cart lifecycle: add/update/remove line items, address, metadata, validate, place order. | +| **Order** | Order tracking and history. | +| **Health** | Public `/ping` health check (no auth). | + +Carts are scoped per socket and keyed by an `external_user_id` you choose (the +environment ships with a sample `demo-user-1`) — it's how you address a specific +shopper's cart. + +## Environments + +The repo ships **sandbox only** — there is intentionally no production +environment file here. + +| Variable | Purpose | +|----------|---------| +| `baseUrl` | `https://api.catalogapi.com/sandbox/api/v2` (preset) | +| `apiKey` | Your sandbox API key (you provide) | +| `socket_id` | Catalog socket to use (you provide) | +| `external_user_id` | Cart owner id of your choosing (sample: `demo-user-1`) | + +## Regenerating + +The collection is produced from the spec, so don't hand-edit it — change the +inputs and re-run: + +```bash +scripts/generate.sh # fetch the latest spec, then convert + polish + weld +scripts/generate.sh --no-fetch # rebuild from the committed openapi.json +``` + +The pipeline: + +1. **fetch** the spec → `openapi.json` +2. **convert** it to a Postman collection (`openapi-to-postmanv2`) +3. **polish** (`scripts/polish-postman.js`) — force the sandbox host, drop auth + from public endpoints, and expose the credential as `{{apiKey}}` +4. **weld** (`scripts/weld-lifecycle.js`) — insert the hand-authored Quickstart + lifecycle (`scripts/build-lifecycle.js`) as the top folder + +The Quickstart steps are the only hand-authored part; everything else comes +straight from the spec. Requires Node 18+ (`npx` for the converter/newman). diff --git a/v2/openapi.json b/v2/openapi.json new file mode 100644 index 0000000..c301325 --- /dev/null +++ b/v2/openapi.json @@ -0,0 +1,12165 @@ +{ + "components": { + "examples": {}, + "headers": { + "X-Correlation-ID": { + "description": "Echoed correlation ID from request", + "schema": { + "type": "string" + }, + "style": "simple" + }, + "X-Request-ID": { + "description": "Server-generated unique request identifier", + "schema": { + "type": "string" + }, + "style": "simple" + }, + "X-Session-ID": { + "description": "Echoed session ID from request", + "schema": { + "type": "string" + }, + "style": "simple" + }, + "X-Trace-ID": { + "description": "Echoed trace ID from request", + "schema": { + "type": "string" + }, + "style": "simple" + }, + "X-User-ID": { + "description": "Echoed user ID from request", + "schema": { + "type": "string" + }, + "style": "simple" + } + }, + "parameters": { + "X-Correlation-ID": { + "description": "Client-provided correlation identifier for linking related requests", + "in": "header", + "name": "X-Correlation-ID", + "required": false, + "schema": { + "type": "string" + } + }, + "X-Session-ID": { + "description": "Optional session identifier for analytics tracking", + "in": "header", + "name": "X-Session-ID", + "required": false, + "schema": { + "type": "string" + } + }, + "X-Trace-ID": { + "description": "Unique identifier for tracing requests across distributed systems", + "in": "header", + "name": "X-Trace-ID", + "required": false, + "schema": { + "type": "string" + } + }, + "X-User-ID": { + "description": "Optional external user identifier for analytics tracking", + "in": "header", + "name": "X-User-ID", + "required": false, + "schema": { + "type": "string" + } + } + }, + "requestBodies": {}, + "responses": {}, + "schemas": { + "ErrorResponse": { + "description": "Standard error response format", + "example": { + "error_code": "ERROR", + "message": "Search service unavailable", + "success": false, + "timestamp": "2025-08-02T14:28:41.605Z" + }, + "properties": { + "error_code": { + "description": "Machine-readable error code", + "example": "ERROR", + "type": "string" + }, + "message": { + "description": "Human-readable error message", + "example": "Search service unavailable", + "type": "string" + }, + "success": { + "description": "Always false for error responses", + "example": false, + "type": "boolean" + }, + "timestamp": { + "description": "When the error occurred", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "message", + "timestamp", + "error_code" + ], + "title": "ErrorResponse", + "type": "object" + }, + "Brand": { + "description": "Catalog brand with item count information", + "example": { + "brand_id": 44453, + "display_name": "GiftCard Express", + "num_items": 9 + }, + "properties": { + "brand_id": { + "description": "Unique identifier for this brand", + "example": 44453, + "type": "integer" + }, + "display_name": { + "description": "Brand name", + "example": "GiftCard Express", + "type": "string" + }, + "num_items": { + "description": "Number of items from this brand", + "example": 9, + "type": "integer" + } + }, + "required": [ + "brand_id", + "display_name", + "num_items" + ], + "title": "Brand", + "type": "object" + }, + "SocketListResponse": { + "description": "List of catalog sockets available to the authenticated customer", + "example": { + "sockets": [ + { + "currency": "USD", + "features": { + "test_only": true + }, + "language": "en", + "point_to_currency_ratio": "100.00", + "region": "US", + "socket_id": 999, + "socket_name": "For Great Testing" + }, + { + "currency": "USD", + "features": { + "production": true + }, + "language": "en", + "point_to_currency_ratio": "100.00", + "region": "US", + "socket_id": 1000, + "socket_name": "Production Catalog" + } + ], + "success": true, + "timestamp": "2025-08-02T14:28:41.605Z", + "total_sockets": 2 + }, + "properties": { + "sockets": { + "description": "Array of catalog sockets", + "items": { + "$ref": "#/components/schemas/Socket" + }, + "type": "array" + }, + "success": { + "description": "Indicates successful retrieval", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this data was retrieved", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + }, + "total_sockets": { + "description": "Total number of sockets available", + "example": 2, + "type": "integer" + } + }, + "required": [ + "success", + "timestamp", + "total_sockets", + "sockets" + ], + "title": "SocketListResponse", + "type": "object" + }, + "PlaceOrderRequest": { + "description": "Request body for placing an order from a cart", + "example": { + "cart_version": "550e8400-e29b-41d4-a716-446655440000", + "external_order_id": "ORDER-2024-001", + "line_item_payments": [ + { + "line_item_id": "550e8400-e29b-41d4-a716-446655440001", + "points_paid": 500, + "price_paid": "24.99" + }, + { + "line_item_id": "550e8400-e29b-41d4-a716-446655440002", + "price_paid": "19.99" + } + ], + "metadata": { + "budget_code": "MKT-Q1-2024", + "department": "Marketing", + "purchase_order": "PO-2024-002", + "session_id": "sess_xyz789" + } + }, + "properties": { + "cart_version": { + "description": "Cart version UUID to ensure cart hasn't changed", + "format": "uuid", + "type": "string" + }, + "external_order_id": { + "description": "External order ID for tracking", + "type": "string" + }, + "line_item_payments": { + "description": "Payment information for each line item in the cart", + "items": { + "$ref": "#/components/schemas/LineItemPayment" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "New metadata for the cart (replaces existing)", + "type": "object" + } + }, + "required": [ + "cart_version", + "line_item_payments", + "external_order_id" + ], + "title": "PlaceOrderRequest", + "type": "object" + }, + "GtOperator": { + "description": "Greater than comparison. Numeric fields only.", + "properties": { + "gt": { + "description": "Specify exactly one numeric field with its value", + "example": { + "price": 100 + }, + "properties": { + "points": { + "description": "Compare by points", + "type": "integer" + }, + "price": { + "description": "Compare by price", + "type": "number" + } + }, + "type": "object" + } + }, + "required": [ + "gt" + ], + "title": "GtOperator", + "type": "object" + }, + "TagBreakdownResponse": { + "description": "Complete list of all promotional and marketing tags in the catalog with item counts", + "example": { + "success": true, + "tags": [ + { + "discount_percent": "5.00", + "display_name": "5% Off!", + "num_items": 120, + "tag_id": 35 + }, + { + "discount_percent": null, + "display_name": "Limited Time", + "num_items": 45, + "tag_id": 78 + }, + { + "discount_percent": null, + "display_name": "Free Shipping", + "num_items": 89, + "tag_id": 92 + } + ], + "timestamp": "2025-08-02T14:28:41.605Z", + "total_tags": 3 + }, + "properties": { + "success": { + "description": "Indicates whether the tag breakdown was successfully retrieved", + "example": true, + "type": "boolean" + }, + "tags": { + "description": "Array of all promotional tags with their associated item counts", + "items": { + "$ref": "#/components/schemas/Tag" + }, + "type": "array" + }, + "timestamp": { + "description": "When this tag breakdown was generated", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + }, + "total_tags": { + "description": "Total number of unique promotional tags available in the catalog", + "example": 1, + "type": "integer" + } + }, + "required": [ + "success", + "timestamp", + "total_tags", + "tags" + ], + "title": "TagBreakdownResponse", + "type": "object" + }, + "AndOperator": { + "description": "Logical AND - all conditions must match. Requires at least 2 conditions. Can be nested up to 5 levels deep.", + "properties": { + "and": { + "description": "Array of filter conditions (all must match)", + "items": { + "$ref": "#/components/schemas/Filter" + }, + "minItems": 2, + "type": "array" + } + }, + "required": [ + "and" + ], + "title": "AndOperator", + "type": "object" + }, + "ItemsSearchResponse": { + "description": "Search results for catalog items with pagination", + "example": { + "facets": [ + { + "count": 45, + "id": "567", + "name": "AudioTech", + "type": "brand" + }, + { + "count": 120, + "id": "35", + "name": "5% Off!", + "type": "tag" + } + ], + "items": [ + { + "availability": "In stock", + "brand": "AudioTech", + "brand_id": 567, + "catalog_item_id": 12345, + "category_ids": [ + 10, + 25, + 45 + ], + "description": "Premium noise-canceling wireless headphones", + "fulfillment_type": "physical", + "images": [ + { + "alt": "Wireless Headphones", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12345.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/12345.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/12345.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/12345.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/12345.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/12345.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/12345.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/12345.jpg" + } + } + ], + "is_available": true, + "is_explicit": false, + "is_limited_stock": false, + "is_primary": false, + "is_taxable": true, + "item_type_id": 200, + "model": "AT-WH500", + "name": "Wireless Bluetooth Headphones", + "original_points": 2000, + "original_price": "199.99", + "points": 1500, + "price": "149.99", + "product_id": "prod-567-890", + "product_options": {}, + "rank": 295, + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "retail_price": "249.99", + "shipping_estimate": "9.99", + "supplier_id": 2001, + "supplier_reference_id": "SUP-AT-WH500", + "tag_ids": [ + 35, + 78 + ] + }, + { + "availability": "Limited stock", + "brand": "SoundWave", + "brand_id": 890, + "catalog_item_id": 12346, + "category_ids": [ + 10, + 28 + ], + "description": "Waterproof portable speaker with 12-hour battery", + "fulfillment_type": "physical", + "images": [ + { + "alt": "Portable Speaker", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12346.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/12346.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/12346.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/12346.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/12346.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/12346.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/12346.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/12346.jpg" + } + } + ], + "is_available": true, + "is_explicit": false, + "is_limited_stock": true, + "is_primary": false, + "is_taxable": true, + "item_type_id": 201, + "model": "SW-P120", + "name": "Portable Bluetooth Speaker", + "original_points": 900, + "original_price": "89.99", + "points": 800, + "price": "79.99", + "product_id": "prod-890-123", + "product_options": {}, + "rank": 150, + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "retail_price": "119.99", + "shipping_estimate": "6.99", + "supplier_id": 2002, + "supplier_reference_id": "SUP-SW-P120", + "tag_ids": [ + 35 + ] + } + ], + "matched_entities": [ + { + "discount_percent": null, + "id": 567, + "name": "AudioTech", + "type": "brand" + }, + { + "discount_percent": null, + "id": 890, + "name": "SoundWave", + "type": "brand" + }, + { + "discount_percent": null, + "id": 10, + "name": "Electronics", + "type": "category" + }, + { + "discount_percent": null, + "id": 25, + "name": "Audio", + "type": "category" + }, + { + "discount_percent": null, + "id": 28, + "name": "Speakers", + "type": "category" + }, + { + "discount_percent": null, + "id": 45, + "name": "Headphones", + "type": "category" + }, + { + "discount_percent": "5.00", + "id": 35, + "name": "Best Sellers", + "type": "tag" + }, + { + "discount_percent": null, + "id": 78, + "name": "Premium Audio", + "type": "tag" + } + ], + "page": 1, + "per_page": 25, + "search_keys": { + "brand": [ + "AudioTech" + ], + "category": "Electronics" + }, + "searched_entities": [ + { + "discount_percent": null, + "id": 567, + "name": "AudioTech", + "type": "brand" + }, + { + "discount_percent": null, + "id": 10, + "name": "Electronics", + "type": "category" + } + ], + "success": true, + "timestamp": "2025-08-02T14:28:41.605Z", + "total_count": 150 + }, + "properties": { + "facets": { + "description": "Facets for refining search results", + "items": { + "properties": { + "count": { + "description": "Number of items with this facet", + "type": "integer" + }, + "id": { + "description": "The tag or brand ID", + "type": "string" + }, + "name": { + "description": "Name of the tag or brand", + "type": "string" + }, + "type": { + "description": "The facet type", + "enum": [ + "tag", + "brand" + ], + "type": "string" + } + }, + "required": [ + "id", + "type", + "count" + ], + "type": "object" + }, + "type": "array" + }, + "items": { + "description": "Array of catalog items for this page", + "items": { + "$ref": "#/components/schemas/CatalogItem" + }, + "type": "array" + }, + "matched_entities": { + "description": "Maps of IDs to names in search results, used for the current page as display only", + "items": { + "properties": { + "discount_percent": { + "description": "Discount percentage if this is a tag", + "example": "5.00", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The ID of the matched entity", + "type": "integer" + }, + "name": { + "description": "Name of the entity", + "type": "string" + }, + "type": { + "description": "The entity type", + "enum": [ + "tag", + "brand", + "category" + ], + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "page": { + "description": "Current page number (1-based)", + "example": 1, + "type": "integer" + }, + "per_page": { + "description": "Number of items per page", + "example": 25, + "type": "integer" + }, + "search_keys": { + "description": "Names of entities used in search filters (brand, category, tag)", + "properties": { + "brand": { + "description": "Brand names if brand_id or brand_ids was in search", + "items": { + "nullable": true, + "type": "string" + }, + "type": "array" + }, + "category": { + "description": "Category name if category_id was in search", + "nullable": true, + "type": "string" + }, + "tag": { + "description": "Tag name if tag_id was in search", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "searched_entities": { + "description": "Full details for entities that were used as search filters (from brand_id, brand_ids, category_id, tag_id parameters)", + "items": { + "properties": { + "discount_percent": { + "description": "Discount percentage if this is a tag", + "example": "5.00", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The ID of the searched entity", + "type": "integer" + }, + "name": { + "description": "Name of the entity", + "type": "string" + }, + "type": { + "description": "The entity type", + "enum": [ + "tag", + "brand", + "category" + ], + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "success": { + "description": "Indicates successful search", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this search was performed", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + }, + "total_count": { + "description": "Total number of items matching the search", + "example": 150, + "type": "integer" + } + }, + "required": [ + "success", + "timestamp", + "total_count", + "page", + "per_page", + "items" + ], + "title": "ItemsSearchResponse", + "type": "object" + }, + "NotFoundErrorResponse": { + "description": "Error response when requested resource is not found", + "example": { + "error_code": "NOT_FOUND", + "message": "The requested resource was not found.", + "success": false, + "timestamp": "2025-08-02T14:28:41.605Z" + }, + "properties": { + "error_code": { + "description": "Machine-readable error code", + "example": "NOT_FOUND", + "type": "string" + }, + "message": { + "description": "Human-readable error message", + "example": "The requested resource was not found.", + "type": "string" + }, + "success": { + "description": "Always false for error responses", + "example": false, + "type": "boolean" + }, + "timestamp": { + "description": "When the error occurred", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "message", + "timestamp", + "error_code" + ], + "title": "NotFoundErrorResponse", + "type": "object" + }, + "EqOperator": { + "description": "Equal to comparison. Specify one field and its value.", + "properties": { + "eq": { + "description": "Specify exactly one field with its value", + "example": { + "brand_id": 5984 + }, + "properties": { + "brand_id": { + "description": "Filter by brand ID", + "type": "integer" + }, + "catalog_item_id": { + "description": "Filter by catalog item ID", + "type": "integer" + }, + "category_id": { + "description": "Filter by category ID", + "type": "integer" + }, + "fulfillment_type": { + "description": "Filter by fulfillment type", + "enum": [ + "physical", + "digital" + ], + "type": "string" + }, + "item_type_id": { + "description": "Filter by item type ID (200 = gift cards)", + "type": "integer" + }, + "points": { + "description": "Filter by points", + "type": "integer" + }, + "price": { + "description": "Filter by price", + "type": "number" + }, + "tag_id": { + "description": "Filter by tag ID", + "type": "integer" + } + }, + "type": "object" + } + }, + "required": [ + "eq" + ], + "title": "EqOperator", + "type": "object" + }, + "OrderLineItem": { + "description": "Line item within an order", + "example": { + "points": 100, + "brand": "Example Brand", + "required_fields": { + "address_1": false, + "address_2": false, + "address_3": false, + "address_4": false, + "city": false, + "country": false, + "email": true, + "given_name": true, + "phone_number": false, + "postal_code": false, + "state_or_region": false, + "surname": true + }, + "model": "GC-100", + "availability": "In stock", + "rank": 100, + "is_limited_stock": false, + "status": "new", + "fulfillment_type": "digital", + "item_type_id": 200, + "shipping_paid": "0.00", + "brand_id": 123, + "retail_price": "15.00", + "original_points": 120, + "updated_at": "2025-01-15T14:15:22Z", + "created_at": "2025-01-15T14:15:22Z", + "is_primary": false, + "tax_paid": "0.00", + "tag_ids": [], + "line_item_id": "22687a62-27f9-4b60-9a8c-af394729d423", + "is_taxable": false, + "supplier_reference_id": "SUP-GC-100", + "catalog_item_id": 23456, + "original_price": "12.00", + "shipping_estimate": "0.00", + "price": "10.00", + "supplier_id": 1001, + "options": [], + "product_id": "prod-456", + "is_stock_reserved": false, + "images": [ + { + "alt": "Gift Card", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/23456.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/23456.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/23456.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/23456.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/23456.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/23456.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/23456.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/23456.jpg" + } + } + ], + "stock_reserved_until": null, + "points_paid": 100, + "description": "Digital gift card", + "metadata": { + "gift_message": "Happy Birthday!" + }, + "is_explicit": false, + "is_available": true, + "price_paid": "10.00", + "errors": [], + "product_options": {}, + "category_ids": [ + 5, + 10 + ], + "name": "Gift Card" + }, + "properties": { + "points": { + "description": "Points value", + "nullable": true, + "type": "integer" + }, + "brand": { + "description": "Brand name", + "nullable": true, + "type": "string" + }, + "required_fields": { + "additionalProperties": { + "type": "boolean" + }, + "description": "Required fields for ordering", + "nullable": true, + "type": "object" + }, + "model": { + "description": "Model/SKU", + "nullable": true, + "type": "string" + }, + "availability": { + "description": "Availability status", + "nullable": true, + "type": "string" + }, + "rank": { + "description": "Display rank", + "nullable": true, + "type": "integer" + }, + "is_limited_stock": { + "description": "Limited stock flag", + "nullable": true, + "type": "boolean" + }, + "status": { + "description": "Item fulfillment status", + "enum": [ + "new", + "pending", + "exported", + "fulfilled", + "cancelled", + "backordered", + "rejected" + ], + "type": "string" + }, + "fulfillment_type": { + "description": "Fulfillment type", + "nullable": true, + "type": "string" + }, + "item_type_id": { + "description": "Item type ID", + "nullable": true, + "type": "integer" + }, + "shipping_paid": { + "description": "Shipping paid", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "brand_id": { + "description": "Brand ID", + "nullable": true, + "type": "integer" + }, + "retail_price": { + "description": "Retail price", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "original_points": { + "description": "Original points", + "nullable": true, + "type": "integer" + }, + "updated_at": { + "description": "Last update time", + "format": "date-time", + "type": "string" + }, + "created_at": { + "description": "Creation time", + "format": "date-time", + "type": "string" + }, + "is_primary": { + "description": "Is primary item", + "nullable": true, + "type": "boolean" + }, + "tax_paid": { + "description": "Tax paid", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "tag_ids": { + "description": "Tag IDs", + "items": { + "type": "integer" + }, + "nullable": true, + "type": "array" + }, + "line_item_id": { + "description": "Line item ID", + "format": "uuid", + "type": "string" + }, + "is_taxable": { + "description": "Is taxable", + "nullable": true, + "type": "boolean" + }, + "supplier_reference_id": { + "description": "Supplier reference", + "nullable": true, + "type": "string" + }, + "catalog_item_id": { + "description": "Catalog item ID", + "type": "integer" + }, + "original_price": { + "description": "Original price", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "shipping_estimate": { + "description": "Shipping estimate", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "price": { + "description": "Item price", + "format": "decimal", + "type": "string" + }, + "supplier_id": { + "description": "Supplier ID", + "nullable": true, + "type": "integer" + }, + "options": { + "description": "Selected product options with translations", + "items": { + "properties": { + "order": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "translations": { + "items": { + "properties": { + "language": { + "type": "string" + }, + "option_name": { + "type": "string" + }, + "value_name": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "nullable": true, + "type": "array" + }, + "product_id": { + "description": "Product ID", + "nullable": true, + "type": "string" + }, + "is_stock_reserved": { + "description": "Whether stock is reserved for this item", + "nullable": true, + "type": "boolean" + }, + "images": { + "description": "Product images", + "items": { + "properties": { + "alt": { + "type": "string" + }, + "is_primary": { + "type": "boolean" + }, + "order": { + "type": "integer" + }, + "urls": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + }, + "nullable": true, + "type": "array" + }, + "stock_reserved_until": { + "description": "When the stock reservation expires", + "format": "datetime", + "nullable": true, + "type": "string" + }, + "points_paid": { + "description": "Points paid", + "nullable": true, + "type": "integer" + }, + "description": { + "description": "Item description", + "nullable": true, + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional metadata", + "nullable": true, + "type": "object" + }, + "is_explicit": { + "description": "Has explicit content", + "nullable": true, + "type": "boolean" + }, + "is_available": { + "description": "Is available", + "nullable": true, + "type": "boolean" + }, + "price_paid": { + "description": "Amount paid", + "format": "decimal", + "type": "string" + }, + "errors": { + "description": "Any errors for this line item", + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "product_options": { + "additionalProperties": true, + "description": "Available product options", + "nullable": true, + "type": "object" + }, + "category_ids": { + "description": "Category IDs", + "items": { + "type": "integer" + }, + "nullable": true, + "type": "array" + }, + "name": { + "description": "Item name", + "nullable": true, + "type": "string" + } + }, + "required": [ + "line_item_id", + "metadata", + "errors", + "stock_reserved_until", + "is_stock_reserved", + "options", + "catalog_item_id", + "product_id", + "name", + "description", + "brand", + "brand_id", + "model", + "category_ids", + "tag_ids", + "item_type_id", + "supplier_id", + "supplier_reference_id", + "availability", + "is_available", + "is_primary", + "is_limited_stock", + "is_taxable", + "is_explicit", + "fulfillment_type", + "price", + "original_price", + "points", + "original_points", + "retail_price", + "shipping_estimate", + "rank", + "images", + "product_options", + "required_fields", + "price_paid", + "points_paid", + "tax_paid", + "shipping_paid", + "status", + "created_at", + "updated_at" + ], + "title": "OrderLineItem", + "type": "object" + }, + "UpdateCartMetadataRequest": { + "description": "Request body for updating cart metadata", + "example": { + "metadata": { + "budget_code": "MKT-Q1-2024", + "department": "Marketing", + "purchase_order": "PO-2024-002", + "session_id": "sess_xyz789" + } + }, + "properties": { + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "New metadata for the cart (replaces existing)", + "type": "object" + } + }, + "required": [ + "metadata" + ], + "title": "UpdateCartMetadataRequest", + "type": "object" + }, + "SetAddressRequest": { + "description": "Request body for setting shipping address on cart.\n\nAll fields are optional. Email addresses are validated if provided - they must \ncontain an @ sign with no spaces. Invalid email formats will return a 422 error.\nEmpty string values are allowed for all fields.\n", + "example": { + "address_1": "123 Main Street", + "address_2": "Apt 4B", + "city": "New York", + "country": "US", + "email": "john.doe@example.com", + "given_name": "John", + "phone_number": "+1-555-123-4567", + "postal_code": "10001", + "state_or_region": "NY", + "surname": "Doe" + }, + "properties": { + "address_1": { + "description": "Street address line 1", + "type": "string" + }, + "address_2": { + "description": "Street address line 2", + "type": "string" + }, + "address_3": { + "description": "Street address line 3", + "type": "string" + }, + "address_4": { + "description": "Street address line 4", + "type": "string" + }, + "city": { + "description": "City", + "type": "string" + }, + "country": { + "description": "Country code (e.g., 'US', 'GB', 'CA')", + "type": "string" + }, + "email": { + "description": "Contact email. If provided and not empty, must be a valid email format with @ sign and no spaces. Returns 422 if invalid. Empty string is allowed.", + "format": "email", + "type": "string" + }, + "given_name": { + "description": "Recipient's first name", + "type": "string" + }, + "phone_number": { + "description": "Contact phone", + "type": "string" + }, + "postal_code": { + "description": "ZIP/Postal code", + "type": "string" + }, + "state_or_region": { + "description": "State/Province/Region", + "type": "string" + }, + "surname": { + "description": "Recipient's last name", + "type": "string" + } + }, + "title": "SetAddressRequest", + "type": "object" + }, + "ItemTypesResponse": { + "description": "List of catalog item types with counts", + "example": { + "item_types": [ + { + "item_count": 35, + "item_type_id": 200, + "name": "Apparel" + }, + { + "item_count": 142, + "item_type_id": 201, + "name": "Electronics" + }, + { + "item_count": 78, + "item_type_id": 202, + "name": "Home & Garden" + } + ], + "success": true, + "timestamp": "2025-08-02T14:28:41.605Z", + "total_item_types": 5 + }, + "properties": { + "item_types": { + "description": "Array of catalog item types", + "items": { + "$ref": "#/components/schemas/ItemType" + }, + "type": "array" + }, + "success": { + "description": "Indicates successful retrieval", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this data was retrieved", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + }, + "total_item_types": { + "description": "Total number of item types", + "example": 5, + "type": "integer" + } + }, + "required": [ + "success", + "timestamp", + "total_item_types", + "item_types" + ], + "title": "ItemTypesResponse", + "type": "object" + }, + "DirectOrderItem": { + "description": "Single item to order directly with payment information.\n\nEach item must include the catalog_item_id and payment details. The price_paid\nshould reflect what the end-user has paid. Must be greater than or equal to the catalog price.\nPoints, tax, and shipping are optional depending on your business logic.\n", + "example": { + "catalog_item_id": 12345, + "metadata": { + "gift_message": "Happy Birthday!", + "gift_wrap": "true" + }, + "points_paid": 500, + "price_paid": "24.99", + "shipping_paid": "5.99", + "tax_paid": "2.25" + }, + "properties": { + "catalog_item_id": { + "description": "Catalog item ID to order", + "type": "integer" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata for this line item (flat map with string values only)", + "type": "object" + }, + "points_paid": { + "default": 0, + "description": "Points paid for this item (optional)", + "nullable": true, + "type": "integer" + }, + "price_paid": { + "description": "Price paid for this item (e.g., '24.99')", + "format": "decimal", + "type": "string" + }, + "shipping_paid": { + "description": "Shipping paid for this item (optional)", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "tax_paid": { + "description": "Tax paid for this item (optional)", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "required": [ + "catalog_item_id", + "price_paid" + ], + "title": "DirectOrderItem", + "type": "object" + }, + "CatalogItemImage": { + "description": "Product image with multiple size variations", + "example": { + "alt": "Primary product image", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_150_3_2": "https://cdn.example.com/img/150c/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_300_1_1": "https://cdn.example.com/img/300/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_300_3_2": "https://cdn.example.com/img/300c/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_500_1_1": "https://cdn.example.com/img/500/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_500_3_2": "https://cdn.example.com/img/500c/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_75_1_1": "https://cdn.example.com/img/75/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_75_3_2": "https://cdn.example.com/img/75c/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72" + } + }, + "properties": { + "alt": { + "description": "Alt text for accessibility", + "example": "Primary product image", + "type": "string" + }, + "is_primary": { + "description": "Whether this is the primary image for the product", + "example": true, + "type": "boolean" + }, + "order": { + "description": "Display order for this image", + "example": 1, + "type": "integer" + }, + "urls": { + "description": "URLs for different image sizes and ratios", + "example": { + "image_150_1_1": "https://cdn.example.com/img/150/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_150_3_2": "https://cdn.example.com/img/150c/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_300_1_1": "https://cdn.example.com/img/300/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_300_3_2": "https://cdn.example.com/img/300c/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_500_1_1": "https://cdn.example.com/img/500/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_500_3_2": "https://cdn.example.com/img/500c/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_75_1_1": "https://cdn.example.com/img/75/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "image_75_3_2": "https://cdn.example.com/img/75c/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72" + }, + "properties": { + "image_150_1_1": { + "description": "150px square (1:1 ratio)", + "example": "https://cdn.example.com/img/150/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "type": "string" + }, + "image_150_3_2": { + "description": "150px width (3:2 ratio)", + "example": "https://cdn.example.com/img/150c/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "type": "string" + }, + "image_300_1_1": { + "description": "300px square (1:1 ratio)", + "example": "https://cdn.example.com/img/300/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "type": "string" + }, + "image_300_3_2": { + "description": "300px width (3:2 ratio)", + "example": "https://cdn.example.com/img/300c/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "type": "string" + }, + "image_500_1_1": { + "description": "500px square (1:1 ratio)", + "example": "https://cdn.example.com/img/500/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "type": "string" + }, + "image_500_3_2": { + "description": "500px width (3:2 ratio)", + "example": "https://cdn.example.com/img/500c/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "type": "string" + }, + "image_75_1_1": { + "description": "75px square (1:1 ratio)", + "example": "https://cdn.example.com/img/75/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "type": "string" + }, + "image_75_3_2": { + "description": "75px width (3:2 ratio)", + "example": "https://cdn.example.com/img/75c/10000013/b8718ad7-c202-4a91-90fc-6fe61a016b72", + "type": "string" + } + }, + "required": [ + "image_75_1_1", + "image_150_1_1", + "image_300_1_1", + "image_500_1_1", + "image_75_3_2", + "image_150_3_2", + "image_300_3_2", + "image_500_3_2" + ], + "type": "object" + } + }, + "required": [ + "is_primary", + "order", + "alt", + "urls" + ], + "title": "CatalogItemImage", + "type": "object" + }, + "CartRevalidationErrorResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResponse" + }, + { + "properties": { + "available_quantity": { + "description": "Available units for insufficient stock errors (null when not applicable)", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "error_code": { + "description": "Specific cart revalidation error code", + "enum": [ + "INSUFFICIENT_STOCK", + "ITEM_NOT_IN_CART", + "RESERVATION_NOT_EXPIRED" + ], + "type": "string" + } + }, + "required": [ + "error_code", + "available_quantity" + ], + "type": "object" + } + ], + "description": "Error response for cart revalidation failures", + "example": { + "available_quantity": null, + "error_code": "ITEM_NOT_IN_CART", + "message": "Item not found in cart", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "title": "CartRevalidationErrorResponse", + "type": "object" + }, + "StockRevalidationResponse": { + "description": "Response after revalidating stock for a line item", + "example": { + "line_item_id": "22687a62-27f9-4b60-9a8c-af394729d423", + "reservation_expires_at": "2025-08-05T15:30:00Z", + "stock_reserved": true, + "success": true, + "token": "550e8400-e29b-41d4-a716-446655440000" + }, + "properties": { + "line_item_id": { + "description": "UUID of the line item", + "format": "uuid", + "type": "string" + }, + "reservation_expires_at": { + "description": "When the stock reservation expires", + "format": "date-time", + "type": "string" + }, + "stock_reserved": { + "description": "Whether stock has been reserved", + "type": "boolean" + }, + "success": { + "description": "Whether the operation was successful", + "type": "boolean" + }, + "token": { + "description": "Stock reservation token", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "success", + "line_item_id", + "stock_reserved", + "token", + "reservation_expires_at" + ], + "title": "StockRevalidationResponse", + "type": "object" + }, + "ItemDetailsResponse": { + "description": "Detailed information for a specific catalog item", + "example": { + "catalog_item": { + "availability": "In stock", + "brand": "AudioTech", + "brand_id": 567, + "catalog_item_id": 12345, + "category_ids": [ + 10, + 25, + 45 + ], + "description": "Premium noise-canceling wireless headphones with 30-hour battery life", + "fulfillment_type": "physical", + "images": [ + { + "alt": "AudioTech Wireless Headphones - Black", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12345/at-wh500.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/12345/at-wh500.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/12345/at-wh500.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/12345/at-wh500.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/12345/at-wh500.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/12345/at-wh500.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/12345/at-wh500.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/12345/at-wh500.jpg" + } + } + ], + "is_available": true, + "is_explicit": false, + "is_limited_stock": false, + "is_primary": false, + "is_taxable": true, + "item_type_id": 200, + "model": "AT-WH500", + "name": "Wireless Bluetooth Headphones", + "original_points": 2000, + "original_price": "199.99", + "points": 1500, + "price": "149.99", + "product_id": "prod-567-890", + "product_name": "Wireless Bluetooth Headphones", + "product_options": { + "12345": [ + { + "order": "1", + "slug": "color", + "translations": [ + { + "language": "en-US", + "option_name": "Color", + "value_name": "Black" + } + ], + "value": "black" + } + ] + }, + "rank": 295, + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "retail_price": "249.99", + "shipping_estimate": "9.99", + "supplier_id": 2001, + "supplier_reference_id": "SUP-AT-WH500", + "tag_ids": [ + 35, + 78 + ] + }, + "success": true, + "timestamp": "2025-08-02T14:28:41.605Z" + }, + "properties": { + "catalog_item": { + "$ref": "#/components/schemas/CatalogItem" + }, + "matched_entities": { + "description": "Details for categories, tags, and brands referenced by this item's IDs. Only included when matched_entities=true query parameter is passed.", + "items": { + "properties": { + "discount_percent": { + "description": "Discount percentage if this is a tag", + "example": "5.00", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The ID of the entity", + "type": "integer" + }, + "name": { + "description": "Name of the entity", + "type": "string" + }, + "type": { + "description": "The entity type", + "enum": [ + "tag", + "brand", + "category" + ], + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "success": { + "description": "Indicates successful retrieval", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this data was retrieved", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "timestamp", + "catalog_item" + ], + "title": "ItemDetailsResponse", + "type": "object" + }, + "ValidateCartRequest": { + "description": "Request body for validating a cart before checkout.\n\nThe validation process will check that all items are still available,\nverify pricing, and ensure all required fields are present.\n\nIf lock is set to true, the cart will be locked after successful validation,\npreventing any further modifications until it's explicitly unlocked or the order is placed.\n", + "example": { + "lock": true + }, + "properties": { + "lock": { + "default": false, + "description": "Whether to lock the cart after successful validation.\n\nSet to true when you are about to place an order and want to make\nsure no edits can be made.\n", + "type": "boolean" + } + }, + "title": "ValidateCartRequest", + "type": "object" + }, + "CartViewResponse": { + "description": "Response containing the current state of a user's cart", + "example": { + "cart": { + "address_1": "123 Main Street", + "address_2": "Apt 4B", + "address_3": null, + "address_4": null, + "cart_version": "acf1a4ae-3786-4bb3-b0d0-1c49bf77a2e7", + "city": "New York", + "country": "US", + "currency": "USD", + "email": "john.doe@example.com", + "given_name": "John", + "is_locked": false, + "line_items": [ + { + "points": 2299, + "brand": "ExampleBrand", + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "EX-001", + "availability": "In stock", + "rank": 100, + "is_limited_stock": false, + "fulfillment_type": "physical", + "item_type_id": 200, + "brand_id": 123, + "retail_price": "39.99", + "original_points": 2999, + "is_primary": false, + "tag_ids": [ + 35 + ], + "line_item_id": "550e8400-e29b-41d4-a716-446655440000", + "is_taxable": true, + "supplier_reference_id": "SUP-EX-001", + "catalog_item_id": 12345, + "original_price": "29.99", + "shipping_estimate": "3.99", + "price": "22.99", + "supplier_id": 1001, + "options": [], + "product_id": "prod-123-456", + "is_stock_reserved": false, + "images": [ + { + "alt": "Example Product", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12345.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/12345.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/12345.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/12345.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/12345.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/12345.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/12345.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/12345.jpg" + } + } + ], + "stock_reserved_until": null, + "description": "High quality example product", + "metadata": { + "gift_wrap": "true" + }, + "is_explicit": false, + "is_available": true, + "errors": [], + "product_options": {}, + "category_ids": [ + 5, + 10 + ], + "name": "Example Product" + } + ], + "metadata": { + "order_type": "standard" + }, + "phone_number": "555-123-4567", + "postal_code": "10001", + "state_or_region": "NY", + "success": true, + "surname": "Doe", + "total": "25.99", + "total_line_items": 1, + "total_points": 2299, + "unique_item_count": 1 + }, + "errors": [], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "properties": { + "cart": { + "$ref": "#/components/schemas/Cart" + }, + "errors": { + "description": "Any errors encountered during cart operations", + "example": [], + "items": { + "type": "string" + }, + "type": "array" + }, + "matched_entities": { + "description": "Details for categories, tags, and brands referenced by items in the cart. Only included when matched_entities=true query parameter is passed.", + "items": { + "properties": { + "discount_percent": { + "description": "Discount percentage if this is a tag", + "example": "5.00", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The ID of the entity", + "type": "integer" + }, + "name": { + "description": "Name of the entity", + "type": "string" + }, + "type": { + "description": "The entity type", + "enum": [ + "tag", + "brand", + "category" + ], + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "success": { + "description": "Indicates successful operation", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this response was generated", + "example": "2023-12-01T15:30:45.123Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "timestamp", + "cart" + ], + "title": "CartViewResponse", + "type": "object" + }, + "LteOperator": { + "description": "Less than or equal comparison. Numeric fields only.", + "properties": { + "lte": { + "description": "Specify exactly one numeric field with its value", + "example": { + "price": 100 + }, + "properties": { + "points": { + "description": "Compare by points", + "type": "integer" + }, + "price": { + "description": "Compare by price", + "type": "number" + } + }, + "type": "object" + } + }, + "required": [ + "lte" + ], + "title": "LteOperator", + "type": "object" + }, + "CategoriesResponse": { + "description": "Hierarchical list of catalog categories", + "example": { + "categories": [ + { + "categories": [ + { + "categories": [], + "category_id": 101, + "display_name": "Men's Clothing", + "is_root": false, + "num_items": 75, + "parent_id": 100 + }, + { + "categories": [], + "category_id": 102, + "display_name": "Women's Clothing", + "is_root": false, + "num_items": 75, + "parent_id": 100 + } + ], + "category_id": 100, + "display_name": "Apparel", + "is_root": true, + "num_items": 150, + "parent_id": null + }, + { + "categories": [], + "category_id": 200, + "display_name": "Electronics", + "is_root": true, + "num_items": 320, + "parent_id": null + }, + { + "categories": [], + "category_id": 300, + "display_name": "Gift Cards", + "is_root": true, + "num_items": 45, + "parent_id": null + } + ], + "success": true, + "timestamp": "2025-08-02T14:28:41.605Z", + "total_categories": 3 + }, + "properties": { + "categories": { + "description": "Array of catalog categories", + "items": { + "$ref": "#/components/schemas/Category" + }, + "type": "array" + }, + "success": { + "description": "Indicates successful retrieval", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this data was retrieved", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + }, + "total_categories": { + "description": "Total number of categories", + "example": 8, + "type": "integer" + } + }, + "required": [ + "success", + "timestamp", + "total_categories", + "categories" + ], + "title": "CategoriesResponse", + "type": "object" + }, + "OrderFulfillment": { + "description": "Fulfillment information for order line items", + "example": { + "created_at": "2025-01-15T14:15:30Z", + "delivered_date": null, + "fulfillment_id": "ful-123456", + "fulfillment_instructions": null, + "fulfillment_type": "physical", + "line_item_ids": [ + "22687a62-27f9-4b60-9a8c-af394729d423" + ], + "shipped_date": "2025-01-16T10:00:00Z", + "shipper": "UPS", + "tracking_number": "1Z999AA10123456784", + "updated_at": "2025-01-16T10:00:00Z", + "virtual_code_link": null, + "virtual_code_pin": null + }, + "properties": { + "created_at": { + "description": "Creation time", + "format": "date-time", + "type": "string" + }, + "fulfillment_id": { + "description": "Fulfillment ID", + "type": "string" + }, + "fulfillment_instructions": { + "description": "Special instructions", + "nullable": true, + "type": "string" + }, + "fulfillment_type": { + "description": "Type of fulfillment", + "enum": [ + "physical", + "digital" + ], + "type": "string" + }, + "line_item_ids": { + "description": "Associated line item IDs (UUIDs)", + "items": { + "description": "UUID of the line item", + "example": "22687a62-27f9-4b60-9a8c-af394729d423", + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "shipper": { + "description": "Shipping carrier", + "nullable": true, + "type": "string" + }, + "tracking_number": { + "description": "Tracking number", + "nullable": true, + "type": "string" + }, + "updated_at": { + "description": "Last update time", + "format": "date-time", + "type": "string" + }, + "virtual_code_link": { + "description": "Link for virtual codes", + "nullable": true, + "type": "string" + }, + "virtual_code_pin": { + "description": "PIN for virtual codes", + "nullable": true, + "type": "string" + } + }, + "required": [ + "fulfillment_id", + "line_item_ids", + "fulfillment_type", + "shipper", + "tracking_number", + "fulfillment_instructions", + "virtual_code_link", + "virtual_code_pin", + "created_at", + "updated_at" + ], + "title": "OrderFulfillment", + "type": "object" + }, + "NotLimitedStockErrorResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResponse" + }, + { + "properties": { + "error_code": { + "description": "Specific error code for non-limited stock items", + "enum": [ + "NOT_LIMITED_STOCK_ITEM" + ], + "type": "string" + } + }, + "required": [ + "error_code" + ], + "type": "object" + } + ], + "description": "Error response when trying to check stock for non-limited stock items", + "example": { + "error_code": "NOT_LIMITED_STOCK_ITEM", + "message": "This item does not have limited stock", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "title": "NotLimitedStockErrorResponse", + "type": "object" + }, + "CatalogItem": { + "description": "A single catalog item with all its details", + "example": { + "points": 26158, + "brand": "OutdoorGear Plus", + "points_low": 26158, + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "OGP-JACKET-001-L-NAVY", + "availability": "Available for immediate shipping worldwide", + "rank": 295, + "is_limited_stock": false, + "face_value": null, + "fulfillment_type": "physical", + "item_type_id": 100, + "product_name": "All-Weather Outdoor Jacket", + "brand_id": 44452, + "retail_price": "229.99", + "original_points": 26158, + "is_primary": false, + "tag_ids": [], + "is_taxable": true, + "supplier_reference_id": "OGP-JACKET-001-L-NAVY", + "catalog_item_id": 10000007, + "original_price": "261.58", + "shipping_estimate": "11.99", + "price": "261.58", + "supplier_id": 1001, + "product_id": "3ddd1114-1114-1114-1114-111411141114", + "images": [ + { + "alt": "Primary product image", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_150_3_2": "https://cdn.example.com/img/150c/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_300_1_1": "https://cdn.example.com/img/300/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_300_3_2": "https://cdn.example.com/img/300c/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_500_1_1": "https://cdn.example.com/img/500/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_500_3_2": "https://cdn.example.com/img/500c/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_75_1_1": "https://cdn.example.com/img/75/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_75_3_2": "https://cdn.example.com/img/75c/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a" + } + } + ], + "price_high": "261.58", + "face_currency": null, + "description": "High quality all-weather outdoor jacket from OutdoorGear Plus. Perfect for professional and personal use.", + "is_explicit": false, + "is_available": true, + "price_low": "261.58", + "product_options": { + "10000007": [ + { + "order": "3", + "slug": "size", + "translations": [ + { + "language": "en-US", + "option_name": "Size", + "value_name": "Large" + }, + { + "language": "fr-FR", + "option_name": "Taille", + "value_name": "Grand" + }, + { + "language": "es-ES", + "option_name": "Tamaño", + "value_name": "Grande" + } + ], + "value": "large" + }, + { + "order": "2", + "slug": "color", + "translations": [ + { + "language": "en-US", + "option_name": "Color", + "value_name": "Blue" + }, + { + "language": "fr-FR", + "option_name": "Couleur", + "value_name": "Bleu" + }, + { + "language": "es-ES", + "option_name": "Color", + "value_name": "Azul" + } + ], + "value": "blue" + } + ] + }, + "category_ids": [ + 2716, + 2714 + ], + "points_high": 26158, + "name": "All-Weather Outdoor Jacket - Large/Blue" + }, + "properties": { + "points": { + "description": "Current points value for this item", + "example": 26158, + "type": "integer" + }, + "brand": { + "description": "Brand name", + "example": "OutdoorGear Plus", + "type": "string" + }, + "points_low": { + "description": "Lowest points value across all variations of this product", + "example": 10000, + "nullable": true, + "type": "integer" + }, + "required_fields": { + "description": "Fields required for ordering this item (loaded from the index during cart verify)", + "example": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "properties": { + "address_1": { + "description": "Whether address line 1 is required", + "type": "boolean" + }, + "address_2": { + "description": "Whether address line 2 is required", + "type": "boolean" + }, + "address_3": { + "description": "Whether address line 3 is required", + "type": "boolean" + }, + "address_4": { + "description": "Whether address line 4 is required", + "type": "boolean" + }, + "city": { + "description": "Whether city is required", + "type": "boolean" + }, + "country": { + "description": "Whether country is required", + "type": "boolean" + }, + "email": { + "description": "Whether email is required", + "type": "boolean" + }, + "given_name": { + "description": "Whether given name is required", + "type": "boolean" + }, + "phone_number": { + "description": "Whether phone number is required", + "type": "boolean" + }, + "postal_code": { + "description": "Whether postal code is required", + "type": "boolean" + }, + "state_or_region": { + "description": "Whether state/region is required", + "type": "boolean" + }, + "surname": { + "description": "Whether surname is required", + "type": "boolean" + } + }, + "type": "object" + }, + "model": { + "description": "Model number", + "example": "OGP-JACKET-001-M-NAVY", + "type": "string" + }, + "availability": { + "description": "Availability status description", + "example": "Available for immediate shipping worldwide", + "type": "string" + }, + "rank": { + "description": "Display rank/order", + "example": 295, + "type": "integer" + }, + "is_limited_stock": { + "description": "Whether the item has limited stock", + "example": false, + "type": "boolean" + }, + "face_value": { + "description": "Face value of the item (e.g., gift card value)", + "example": "50.00", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "fulfillment_type": { + "description": "How this item is fulfilled", + "example": "physical", + "type": "string" + }, + "item_type_id": { + "description": "Item type identifier", + "example": 100, + "type": "integer" + }, + "product_name": { + "description": "An alternate name describing an item that is a variation", + "example": "All-Weather Outdoor Jacket", + "nullable": true, + "type": "string" + }, + "brand_id": { + "description": "Brand identifier", + "example": 44452, + "type": "integer" + }, + "retail_price": { + "description": "Retail price", + "example": "229.99", + "format": "decimal", + "type": "string" + }, + "original_points": { + "description": "Original points value before discounts", + "example": 26158, + "type": "integer" + }, + "is_primary": { + "description": "Whether this is a primary item", + "example": false, + "type": "boolean" + }, + "tag_ids": { + "description": "Array of tag IDs associated with this item", + "example": [], + "items": { + "type": "integer" + }, + "type": "array" + }, + "is_taxable": { + "description": "Whether the item is taxable", + "example": true, + "type": "boolean" + }, + "supplier_reference_id": { + "description": "Supplier's reference ID", + "example": "OGP-JACKET-001-M-NAVY", + "type": "string" + }, + "catalog_item_id": { + "description": "Unique identifier for this catalog item", + "example": 10000013, + "type": "integer" + }, + "original_price": { + "description": "Original item price before discounts", + "example": "261.58", + "format": "decimal", + "type": "string" + }, + "shipping_estimate": { + "description": "Estimated shipping cost", + "example": "11.99", + "format": "decimal", + "type": "string" + }, + "price": { + "description": "Current item price", + "example": "261.58", + "format": "decimal", + "type": "string" + }, + "supplier_id": { + "description": "Supplier identifier", + "example": 1001, + "type": "integer" + }, + "product_id": { + "description": "Product identifier UUID", + "example": "3ddd1114-1114-1114-1114-111411141114", + "nullable": true, + "type": "string" + }, + "images": { + "description": "Array of product images", + "items": { + "$ref": "#/components/schemas/CatalogItemImage" + }, + "type": "array" + }, + "price_high": { + "description": "Highest price across all variations of this product", + "example": "400.00", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "face_currency": { + "description": "Currency of the face value", + "example": "USD", + "nullable": true, + "type": "string" + }, + "description": { + "description": "Detailed description of the item", + "example": "High quality all-weather outdoor jacket from OutdoorGear Plus. Perfect for professional and personal use.", + "type": "string" + }, + "is_explicit": { + "description": "Whether the item contains explicit content", + "example": false, + "type": "boolean" + }, + "is_available": { + "description": "Whether the item is available", + "example": true, + "type": "boolean" + }, + "price_low": { + "description": "Lowest price across all variations of this product", + "example": "100.00", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "product_options": { + "additionalProperties": { + "items": { + "properties": { + "order": { + "description": "Display order for this option", + "type": "string" + }, + "slug": { + "description": "Option identifier (e.g., 'color', 'size')", + "type": "string" + }, + "translations": { + "description": "Translations for option name and value", + "items": { + "properties": { + "language": { + "example": "en-US", + "type": "string" + }, + "option_name": { + "example": "Color", + "type": "string" + }, + "value_name": { + "example": "Blue", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "value": { + "description": "Option value (e.g., 'blue', 'large')", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "description": "Available options for all variations of this product, keyed by catalog_item_id", + "example": { + "10000007": [ + { + "order": "3", + "slug": "size", + "translations": [ + { + "language": "en-US", + "option_name": "Size", + "value_name": "Large" + }, + { + "language": "fr-FR", + "option_name": "Taille", + "value_name": "Grand" + }, + { + "language": "es-ES", + "option_name": "Tamaño", + "value_name": "Grande" + } + ], + "value": "large" + }, + { + "order": "2", + "slug": "color", + "translations": [ + { + "language": "en-US", + "option_name": "Color", + "value_name": "Blue" + }, + { + "language": "fr-FR", + "option_name": "Couleur", + "value_name": "Bleu" + }, + { + "language": "es-ES", + "option_name": "Color", + "value_name": "Azul" + } + ], + "value": "blue" + } + ] + }, + "type": "object" + }, + "category_ids": { + "description": "Array of category IDs this item belongs to", + "example": [ + 2716, + 2714 + ], + "items": { + "type": "integer" + }, + "type": "array" + }, + "points_high": { + "description": "Highest points value across all variations of this product", + "example": 40000, + "nullable": true, + "type": "integer" + }, + "name": { + "description": "Display name of the item", + "example": "All-Weather Outdoor Jacket - Large/Green", + "type": "string" + } + }, + "required": [ + "catalog_item_id", + "product_id", + "name", + "description", + "brand", + "brand_id", + "model", + "category_ids", + "tag_ids", + "item_type_id", + "supplier_id", + "supplier_reference_id", + "availability", + "is_available", + "is_primary", + "is_limited_stock", + "is_taxable", + "is_explicit", + "fulfillment_type", + "price", + "points", + "original_price", + "original_points", + "retail_price", + "shipping_estimate", + "images", + "product_options", + "rank", + "required_fields" + ], + "title": "CatalogItem", + "type": "object" + }, + "CartMetadataResponse": { + "description": "Response containing cart metadata and version", + "example": { + "cart_version": "fa955a57-3b8c-49c2-9dbe-f62f5de82c8f", + "metadata": { + "budget_code": "ENG-Q1-2024", + "department": "Engineering", + "purchase_order": "PO-2024-001" + } + }, + "properties": { + "cart_version": { + "description": "Current cart version", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Cart metadata", + "type": "object" + } + }, + "required": [ + "metadata", + "cart_version" + ], + "title": "CartMetadataResponse", + "type": "object" + }, + "StockResponse": { + "description": "Stock information for a specific catalog item", + "example": { + "stock": { + "available": true, + "catalog_item_id": "ITEM-12345", + "estimated_ship_date": null, + "last_updated": "2025-08-02T14:28:41.605Z", + "quantity_available": 100 + }, + "success": true, + "timestamp": "2025-08-02T14:28:41.605Z" + }, + "properties": { + "stock": { + "$ref": "#/components/schemas/StockInfo" + }, + "success": { + "description": "Indicates successful retrieval", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this data was retrieved", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "timestamp", + "stock" + ], + "title": "StockResponse", + "type": "object" + }, + "CatalogMarketingResponse": { + "description": "Marketing content blocks and preload items", + "example": { + "blocks": [ + { + "copy": "Holiday Sale - Up to 50% Off!", + "image": "https://cdn.example.com/banners/holiday-sale-2023.jpg", + "type": "banner", + "uri": "/search?tag=holiday-sale" + }, + { + "carousel": "1", + "items": [ + 12345, + 12346, + 12347, + 12348 + ], + "limit": 4, + "title": "Featured Products", + "type": "item_list" + } + ], + "load_items": [ + 12345, + 12346, + 12347, + 12348 + ], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "properties": { + "blocks": { + "description": "Array of marketing content blocks", + "items": { + "$ref": "#/components/schemas/MarketingBlock" + }, + "type": "array" + }, + "load_items": { + "description": "Array of catalog item IDs to preload", + "items": { + "type": "integer" + }, + "type": "array" + }, + "success": { + "description": "Indicates successful retrieval", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this data was retrieved", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "timestamp", + "blocks", + "load_items" + ], + "title": "CatalogMarketingResponse", + "type": "object" + }, + "BrandsResponse": { + "description": "List of catalog brands with item counts", + "example": { + "brands": [ + { + "brand_id": 44453, + "display_name": "GiftCard Express", + "num_items": 9 + }, + { + "brand_id": 38291, + "display_name": "Nike", + "num_items": 45 + } + ], + "success": true, + "timestamp": "2025-08-02T14:28:41.605Z", + "total_brands": 2 + }, + "properties": { + "brands": { + "description": "Array of catalog brands", + "items": { + "$ref": "#/components/schemas/Brand" + }, + "type": "array" + }, + "success": { + "description": "Indicates successful retrieval", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this data was retrieved", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + }, + "total_brands": { + "description": "Total number of brands", + "example": 15, + "type": "integer" + } + }, + "required": [ + "success", + "timestamp", + "total_brands", + "brands" + ], + "title": "BrandsResponse", + "type": "object" + }, + "BetweenOperator": { + "description": "Between comparison (inclusive). Specify one numeric field with [min, max] range.", + "properties": { + "between": { + "description": "Specify exactly one numeric field with [min, max] range", + "example": { + "price": [ + 50, + 200 + ] + }, + "properties": { + "points": { + "description": "Points range as [min, max]", + "items": { + "type": "integer" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "price": { + "description": "Price range as [min, max]", + "items": { + "type": "number" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "type": "object" + } + }, + "required": [ + "between" + ], + "title": "BetweenOperator", + "type": "object" + }, + "UnprocessableEntityErrorResponse": { + "description": "Error response when entity cannot be processed", + "example": { + "error_code": "UNPROCESSABLE_ENTITY", + "message": "Cart is locked and cannot be modified.", + "success": false, + "timestamp": "2025-08-02T14:28:41.605Z" + }, + "properties": { + "error_code": { + "description": "Machine-readable error code", + "example": "UNPROCESSABLE_ENTITY", + "type": "string" + }, + "message": { + "description": "Human-readable error message", + "example": "Cart is locked and cannot be modified.", + "type": "string" + }, + "success": { + "description": "Always false for error responses", + "example": false, + "type": "boolean" + }, + "timestamp": { + "description": "When the error occurred", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "message", + "timestamp", + "error_code" + ], + "title": "UnprocessableEntityErrorResponse", + "type": "object" + }, + "OrderPlacementErrorResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResponse" + }, + { + "properties": { + "error_code": { + "description": "Specific order placement error code", + "enum": [ + "STOCK_RESERVATIONS_EXPIRED", + "INSUFFICIENT_STOCK", + "ITEMS_UNAVAILABLE", + "CART_VALIDATION_FAILED", + "REQUIRED_FIELDS_MISSING", + "CART_NOT_LOCKED", + "CART_VERSION_MISMATCH", + "PAYMENT_VALIDATION_FAILED", + "MISSING_LINE_ITEM_PAYMENTS" + ], + "type": "string" + } + }, + "required": [ + "error_code" + ], + "type": "object" + } + ], + "description": "Error response for order placement failures", + "example": { + "error_code": "CART_NOT_LOCKED", + "message": "Cart must be locked before placing order", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "title": "OrderPlacementErrorResponse", + "type": "object" + }, + "UpdateLineItemRequest": { + "description": "Request body for updating line item metadata", + "example": { + "metadata": { + "cost_center": "WEf333-001", + "manager_id": "2938749823670" + } + }, + "properties": { + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata for the line item (flat map with string values only)", + "type": "object" + } + }, + "required": [ + "metadata" + ], + "title": "UpdateLineItemRequest", + "type": "object" + }, + "Order": { + "description": "Order with line items and fulfillment information", + "example": { + "address_1": "123 Main St", + "address_2": null, + "address_3": null, + "address_4": null, + "city": "Anytown", + "country": "US", + "created": "2025-01-15T14:15:22Z", + "email": "john@example.com", + "external_order_id": "your-order-123", + "external_user_id": "user-456", + "fulfillments": [ + { + "created_at": "2025-01-15T14:15:30Z", + "delivered_date": "2025-01-15T14:16:00Z", + "fulfillment_id": "ful-123456", + "fulfillment_instructions": null, + "fulfillment_type": "digital", + "line_item_ids": [ + "22687a62-27f9-4b60-9a8c-af394729d423" + ], + "shipped_date": null, + "shipper": null, + "tracking_number": null, + "updated_at": "2025-01-15T14:16:00Z", + "virtual_code_link": "https://example.com/redeem/ABC123", + "virtual_code_pin": "1234" + } + ], + "given_name": "John", + "is_test": false, + "line_items": [ + { + "points": 100, + "brand": "Example Brand", + "required_fields": { + "address_1": false, + "address_2": false, + "address_3": false, + "address_4": false, + "city": false, + "country": false, + "email": true, + "given_name": true, + "phone_number": false, + "postal_code": false, + "state_or_region": false, + "surname": true + }, + "model": "GC-100", + "availability": "In stock", + "rank": 100, + "is_limited_stock": false, + "status": "fulfilled", + "fulfillment_type": "digital", + "item_type_id": 200, + "shipping_paid": "0.00", + "brand_id": 123, + "retail_price": "15.00", + "original_points": 120, + "updated_at": "2025-01-15T14:15:22Z", + "created_at": "2025-01-15T14:15:22Z", + "is_primary": false, + "tax_paid": "0.00", + "tag_ids": [], + "line_item_id": "22687a62-27f9-4b60-9a8c-af394729d423", + "is_taxable": false, + "supplier_reference_id": "SUP-GC-100", + "catalog_item_id": 23456, + "original_price": "12.00", + "shipping_estimate": "0.00", + "price": "10.00", + "supplier_id": 1001, + "options": [], + "product_id": "prod-456", + "is_stock_reserved": false, + "images": [ + { + "alt": "Gift Card", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/23456.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/23456.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/23456.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/23456.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/23456.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/23456.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/23456.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/23456.jpg" + } + } + ], + "stock_reserved_until": null, + "points_paid": 100, + "description": "Digital gift card", + "metadata": { + "gift_message": "Happy Birthday!" + }, + "is_explicit": false, + "is_available": true, + "price_paid": "10.00", + "errors": [], + "product_options": {}, + "category_ids": [ + 5, + 10 + ], + "name": "Gift Card" + } + ], + "order_number": "C234-56789-ABCDE-0001", + "phone_number": "555-1234", + "postal_code": "12345", + "socket_id": 100, + "state_or_region": "CA", + "surname": "Doe", + "updated": "2025-01-15T14:30:00Z" + }, + "properties": { + "address_1": { + "description": "Address line 1", + "type": "string" + }, + "address_2": { + "description": "Address line 2", + "nullable": true, + "type": "string" + }, + "address_3": { + "description": "Address line 3", + "nullable": true, + "type": "string" + }, + "address_4": { + "description": "Address line 4", + "nullable": true, + "type": "string" + }, + "city": { + "description": "City", + "type": "string" + }, + "country": { + "description": "Country code", + "type": "string" + }, + "created": { + "description": "Order creation time", + "format": "date-time", + "type": "string" + }, + "email": { + "description": "Recipient email", + "type": "string" + }, + "external_order_id": { + "description": "Your order reference", + "type": "string" + }, + "external_user_id": { + "description": "User reference", + "type": "string" + }, + "fulfillments": { + "description": "Fulfillment information", + "items": { + "$ref": "#/components/schemas/OrderFulfillment" + }, + "type": "array" + }, + "given_name": { + "description": "Recipient's first name", + "type": "string" + }, + "is_test": { + "description": "Test order flag", + "type": "boolean" + }, + "line_items": { + "description": "Order line items", + "items": { + "$ref": "#/components/schemas/OrderLineItem" + }, + "type": "array" + }, + "order_number": { + "description": "Internal order number", + "type": "string" + }, + "phone_number": { + "description": "Recipient phone", + "type": "string" + }, + "postal_code": { + "description": "Postal/zip code", + "type": "string" + }, + "socket_id": { + "description": "Socket/catalog ID", + "type": "integer" + }, + "state_or_region": { + "description": "State or region", + "type": "string" + }, + "surname": { + "description": "Recipient's last name", + "type": "string" + }, + "updated": { + "description": "Last update time", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "order_number", + "external_order_id", + "socket_id", + "external_user_id", + "created", + "updated", + "given_name", + "surname", + "address_1", + "address_2", + "address_3", + "address_4", + "city", + "state_or_region", + "postal_code", + "country", + "email", + "phone_number", + "is_test", + "line_items", + "fulfillments" + ], + "title": "Order", + "type": "object" + }, + "GetOrdersResponse": { + "description": "Response containing a paginated list of orders for the user", + "example": { + "orders": [ + { + "address_1": "123 Main St", + "address_2": null, + "address_3": null, + "address_4": null, + "city": "Anytown", + "country": "US", + "created": "2025-01-15T10:00:00Z", + "email": "john@example.com", + "external_order_id": "ORDER-2024-001", + "external_user_id": "user-456", + "fulfillments": [], + "given_name": "John", + "is_test": false, + "line_items": [], + "order_number": "C234-56789-ABCDE-0001", + "phone_number": "555-1234", + "postal_code": "12345", + "socket_id": 100, + "state_or_region": "CA", + "surname": "Doe", + "updated": "2025-01-15T14:30:00Z" + } + ], + "pagination": { + "page": 1, + "per_page": 25, + "total_count": 47, + "total_pages": 2 + }, + "success": true, + "timestamp": "2025-01-15T14:30:00Z" + }, + "properties": { + "orders": { + "description": "Array of orders for the user", + "items": { + "$ref": "#/components/schemas/Order" + }, + "type": "array" + }, + "pagination": { + "description": "Pagination metadata", + "properties": { + "page": { + "description": "Current page number", + "type": "integer" + }, + "per_page": { + "description": "Number of items per page", + "type": "integer" + }, + "total_count": { + "description": "Total number of orders", + "type": "integer" + }, + "total_pages": { + "description": "Total number of pages", + "type": "integer" + } + }, + "required": [ + "page", + "per_page", + "total_count", + "total_pages" + ], + "type": "object" + }, + "success": { + "description": "Indicates if request was successful", + "type": "boolean" + }, + "timestamp": { + "description": "ISO 8601 timestamp of the response", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "success", + "timestamp", + "orders", + "pagination" + ], + "title": "GetOrdersResponse", + "type": "object" + }, + "InOperator": { + "description": "Matches any value in the list. Specify one field with an array of values.", + "properties": { + "in": { + "description": "Specify exactly one field with an array of values", + "example": { + "brand_id": [ + 5984, + 114, + 225 + ] + }, + "properties": { + "brand_id": { + "description": "Filter by brand IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "catalog_item_id": { + "description": "Filter by catalog item IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "category_id": { + "description": "Filter by category IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "fulfillment_type": { + "description": "Filter by fulfillment types", + "items": { + "enum": [ + "physical", + "digital" + ], + "type": "string" + }, + "type": "array" + }, + "item_type_id": { + "description": "Filter by item type IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "points": { + "description": "Filter by points", + "items": { + "type": "integer" + }, + "type": "array" + }, + "price": { + "description": "Filter by prices", + "items": { + "type": "number" + }, + "type": "array" + }, + "tag_id": { + "description": "Filter by tag IDs", + "items": { + "type": "integer" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "required": [ + "in" + ], + "title": "InOperator", + "type": "object" + }, + "LineItemPayment": { + "description": "Payment information for a single line item", + "example": { + "line_item_id": "550e8400-e29b-41d4-a716-446655440001", + "metadata": { + "cost_center": "WEf333-001", + "manager_id": "2938749823670" + }, + "points_paid": 500, + "price_paid": "24.99", + "shipping_paid": "5.99", + "tax_paid": "2.25" + }, + "properties": { + "line_item_id": { + "description": "The line item this payment applies to", + "format": "uuid", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "New metadata for the line item (replaces existing)", + "type": "object" + }, + "points_paid": { + "description": "Points paid for this line item (optional)", + "nullable": true, + "type": "integer" + }, + "price_paid": { + "description": "Price paid for this line item", + "format": "decimal", + "type": "string" + }, + "shipping_paid": { + "description": "Shipping paid for this line item (optional)", + "format": "decimal", + "nullable": true, + "type": "string" + }, + "tax_paid": { + "description": "Tax paid for this line item (optional)", + "format": "decimal", + "nullable": true, + "type": "string" + } + }, + "required": [ + "line_item_id", + "price_paid" + ], + "title": "LineItemPayment", + "type": "object" + }, + "Tag": { + "description": "Tag information with product counts for promotional and marketing classification", + "example": { + "discount_percent": "5.00", + "display_name": "5% Off!", + "num_items": 2, + "tag_id": 35 + }, + "properties": { + "discount_percent": { + "description": "Discount percentage associated with this tag", + "example": "5.00", + "nullable": true, + "type": "string" + }, + "display_name": { + "description": "Human-readable display name for the tag", + "example": "5% Off!", + "type": "string" + }, + "num_items": { + "description": "Current count of catalog items with this tag", + "example": 2, + "type": "integer" + }, + "tag_id": { + "description": "Unique identifier for this tag", + "example": 35, + "type": "integer" + } + }, + "required": [ + "discount_percent", + "display_name", + "num_items", + "tag_id" + ], + "title": "Tag", + "type": "object" + }, + "SocketResponse": { + "description": "Single catalog socket details", + "example": { + "socket": { + "currency": "USD", + "features": { + "test_only": true + }, + "language": "en", + "point_to_currency_ratio": "100.00", + "region": "US", + "socket_id": 999, + "socket_name": "For Great Testing" + }, + "success": true, + "timestamp": "2025-08-02T14:28:41.605Z" + }, + "properties": { + "socket": { + "$ref": "#/components/schemas/Socket" + }, + "success": { + "description": "Indicates successful retrieval", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this data was retrieved", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "timestamp", + "socket" + ], + "title": "SocketResponse", + "type": "object" + }, + "NotInOperator": { + "description": "Excludes all values in the list. Specify one field with an array of values.", + "properties": { + "not_in": { + "description": "Specify exactly one field with an array of values", + "example": { + "brand_id": [ + 5984, + 114, + 225 + ] + }, + "properties": { + "brand_id": { + "description": "Filter by brand IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "catalog_item_id": { + "description": "Filter by catalog item IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "category_id": { + "description": "Filter by category IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "fulfillment_type": { + "description": "Filter by fulfillment types", + "items": { + "enum": [ + "physical", + "digital" + ], + "type": "string" + }, + "type": "array" + }, + "item_type_id": { + "description": "Filter by item type IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "points": { + "description": "Filter by points", + "items": { + "type": "integer" + }, + "type": "array" + }, + "price": { + "description": "Filter by prices", + "items": { + "type": "number" + }, + "type": "array" + }, + "tag_id": { + "description": "Filter by tag IDs", + "items": { + "type": "integer" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "required": [ + "not_in" + ], + "title": "NotInOperator", + "type": "object" + }, + "MarketingBlock": { + "additionalProperties": true, + "description": "Dynamic content block for marketing pages", + "example": { + "copy": "Summer Sale - Up to 50% Off!", + "image": "https://cdn.example.com/banners/summer-sale.jpg", + "type": "banner", + "uri": "https://example.com/summer-sale" + }, + "properties": { + "type": { + "description": "Block type", + "enum": [ + "banner", + "item_list", + "link_container", + "related_items" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "MarketingBlock", + "type": "object" + }, + "ItemsSearchRequest": { + "description": "Request body for POST /items/search endpoint.\n\nUse this endpoint for complex filtering with the Filter DSL. The `filter` field is optional\nand accepts nested boolean logic. All fields are optional and work alongside the filter.\n\n## Request Body Fields\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `filter` | object | No | Filter DSL object for complex queries (see Filter schema) |\n| `search` | string | No | Full-text search query for item names and descriptions |\n| `brand` | string | No | Filter by brand name (exact match) |\n| `is_primary` | boolean | No | When true, returns only primary items |\n| `page` | integer | No | Page number for pagination (default: 1) |\n| `per_page` | integer | No | Results per page, 1-100 (default: 25) |\n| `sort` | string | No | Sort order (default: \"rank asc\") |\n| `brand_faceting` | string | No | Include brand facets: \"top\" or \"full\" |\n| `tag_faceting` | string | No | Include tag facets: \"top\" or \"full\" |\n\n## Sort Options\n- `rank asc` / `rank desc` - Sort by relevance rank\n- `price asc` / `price desc` - Sort by price\n- `points asc` / `points desc` - Sort by points\n- `name asc` / `name desc` - Sort alphabetically by name\n", + "example": { + "brand_faceting": "top", + "filter": { + "and": [ + { + "eq": { + "fulfillment_type": "physical" + } + }, + { + "between": { + "price": [ + 50, + 200 + ] + } + }, + { + "or": [ + { + "eq": { + "brand_id": 5984 + } + }, + { + "eq": { + "brand_id": 114 + } + } + ] + } + ] + }, + "is_primary": true, + "page": 1, + "per_page": 25, + "search": "headphones", + "sort": "price asc", + "tag_faceting": "top" + }, + "properties": { + "brand": { + "description": "Filter by brand name (exact match). Use this for brand name search; use filter.eq.brand_id for ID-based filtering.", + "example": "Sony", + "type": "string" + }, + "brand_faceting": { + "description": "Include brand facets in response. 'top' returns top brands, 'full' returns all brands with counts.", + "enum": [ + "top", + "full" + ], + "example": "top", + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + }, + "is_primary": { + "description": "When true, returns only primary items (excludes variant items). Default: returns all items.", + "example": true, + "type": "boolean" + }, + "page": { + "default": 1, + "description": "Page number for pagination. First page is 1.", + "example": 1, + "minimum": 1, + "type": "integer" + }, + "per_page": { + "default": 25, + "description": "Number of items per page. Minimum: 1, Maximum: 100, Default: 25.", + "example": 25, + "maximum": 100, + "minimum": 1, + "type": "integer" + }, + "search": { + "description": "Full-text search query. Searches item names and descriptions. Combined with filter using AND logic.", + "example": "wireless headphones", + "type": "string" + }, + "sort": { + "default": "rank asc", + "description": "Sort order for results. Format: 'field direction' where direction is 'asc' or 'desc'.", + "enum": [ + "rank asc", + "rank desc", + "price asc", + "price desc", + "points asc", + "points desc", + "name asc", + "name desc" + ], + "example": "price asc", + "type": "string" + }, + "tag_faceting": { + "description": "Include tag facets in response. 'top' returns top tags, 'full' returns all tags with counts.", + "enum": [ + "top", + "full" + ], + "example": "top", + "type": "string" + } + }, + "title": "ItemsSearchRequest", + "type": "object" + }, + "RedemptionActiveResponse": { + "description": "Status of redemption on the account", + "example": { + "is_redemption_active": true, + "success": true, + "timestamp": "2025-08-02T14:28:41.605Z" + }, + "properties": { + "is_redemption_active": { + "description": "Orders on the account will be processed", + "example": true, + "type": "boolean" + }, + "success": { + "description": "Indicates successful retrieval", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this data was retrieved", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "timestamp", + "is_redemption_active" + ], + "title": "RedemptionActiveResponse", + "type": "object" + }, + "NeOperator": { + "description": "Not equal to comparison. Specify one field and its value.", + "properties": { + "ne": { + "description": "Specify exactly one field with its value", + "example": { + "brand_id": 5984 + }, + "properties": { + "brand_id": { + "description": "Filter by brand ID", + "type": "integer" + }, + "catalog_item_id": { + "description": "Filter by catalog item ID", + "type": "integer" + }, + "category_id": { + "description": "Filter by category ID", + "type": "integer" + }, + "fulfillment_type": { + "description": "Filter by fulfillment type", + "enum": [ + "physical", + "digital" + ], + "type": "string" + }, + "item_type_id": { + "description": "Filter by item type ID (200 = gift cards)", + "type": "integer" + }, + "points": { + "description": "Filter by points", + "type": "integer" + }, + "price": { + "description": "Filter by price", + "type": "number" + }, + "tag_id": { + "description": "Filter by tag ID", + "type": "integer" + } + }, + "type": "object" + } + }, + "required": [ + "ne" + ], + "title": "NeOperator", + "type": "object" + }, + "Category": { + "description": "Catalog category with hierarchical information", + "example": { + "categories": [ + { + "categories": [], + "category_id": 101, + "display_name": "Men's Clothing", + "is_root": false, + "num_items": 75, + "parent_id": 100 + }, + { + "categories": [], + "category_id": 102, + "display_name": "Women's Clothing", + "is_root": false, + "num_items": 75, + "parent_id": 100 + } + ], + "category_id": 100, + "display_name": "Apparel", + "is_root": true, + "num_items": 150, + "parent_id": null + }, + "properties": { + "categories": { + "description": "Array of child catalog categories", + "items": { + "$ref": "#/components/schemas/Category" + }, + "type": "array" + }, + "category_id": { + "description": "Unique identifier for this category", + "example": 456, + "type": "integer" + }, + "display_name": { + "description": "Human-readable category name", + "example": "Men's Clothing", + "type": "string" + }, + "is_root": { + "description": "Whether this is a root-level category", + "example": true, + "type": "boolean" + }, + "num_items": { + "description": "Number of items in this category", + "example": 25, + "type": "integer" + }, + "parent_id": { + "description": "Parent category ID for hierarchical structure", + "example": 100, + "nullable": true, + "type": "integer" + } + }, + "required": [ + "category_id", + "display_name", + "num_items", + "is_root", + "parent_id", + "categories" + ], + "title": "Category", + "type": "object" + }, + "AddCartItem": { + "description": "Single item to add to cart", + "example": { + "catalog_item_id": 12345, + "line_item_id": "custom-id-123", + "metadata": { + "gift_message": "Happy Birthday!", + "gift_wrap": "true" + } + }, + "properties": { + "catalog_item_id": { + "description": "Catalog item ID", + "type": "integer" + }, + "line_item_id": { + "description": "Optional custom line item ID", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata for the line item (flat map with string values only)", + "type": "object" + } + }, + "required": [ + "catalog_item_id" + ], + "title": "AddCartItem", + "type": "object" + }, + "BadRequestErrorResponse": { + "description": "Error response for invalid requests", + "example": { + "error_code": "BAD_REQUEST", + "message": "Invalid request format or parameters.", + "success": false, + "timestamp": "2025-08-02T14:28:41.605Z" + }, + "properties": { + "error_code": { + "description": "Machine-readable error code", + "example": "BAD_REQUEST", + "type": "string" + }, + "message": { + "description": "Human-readable error message", + "example": "Invalid request format or parameters.", + "type": "string" + }, + "success": { + "description": "Always false for error responses", + "example": false, + "type": "boolean" + }, + "timestamp": { + "description": "When the error occurred", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "message", + "timestamp", + "error_code" + ], + "title": "BadRequestErrorResponse", + "type": "object" + }, + "OrOperator": { + "description": "Logical OR - any condition must match. Requires at least 2 conditions. Can be nested up to 5 levels deep.", + "properties": { + "or": { + "description": "Array of filter conditions (any must match)", + "items": { + "$ref": "#/components/schemas/Filter" + }, + "minItems": 2, + "type": "array" + } + }, + "required": [ + "or" + ], + "title": "OrOperator", + "type": "object" + }, + "StockInfo": { + "description": "Stock availability information for a catalog item", + "example": { + "available": true, + "catalog_item_id": "ITEM-12345", + "estimated_ship_date": null, + "last_updated": "2025-08-02T14:28:41.605Z", + "quantity_available": 100 + }, + "properties": { + "available": { + "description": "Whether the item is currently available", + "example": true, + "type": "boolean" + }, + "catalog_item_id": { + "description": "Item identifier", + "example": "ITEM-12345", + "type": "string" + }, + "estimated_ship_date": { + "description": "Estimated shipping date if not in stock", + "example": "2025-08-15", + "format": "date", + "nullable": true, + "type": "string" + }, + "last_updated": { + "description": "When stock information was last updated", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + }, + "quantity_available": { + "description": "Number of units available", + "example": 100, + "nullable": true, + "type": "integer" + } + }, + "required": [ + "catalog_item_id", + "available", + "last_updated" + ], + "title": "StockInfo", + "type": "object" + }, + "MarketingResponse": { + "description": "Marketing content blocks and preload items", + "example": { + "blocks": [ + { + "copy": "Holiday Sale - Up to 50% Off!", + "image": "https://cdn.example.com/banners/holiday-sale-2023.jpg", + "type": "banner", + "uri": "/search?tag=holiday-sale" + }, + { + "carousel": "1", + "items": [ + 12345, + 12346, + 12347, + 12348 + ], + "limit": 4, + "title": "Featured Products", + "type": "item_list" + } + ], + "load_items": [ + 12345, + 12346, + 12347, + 12348 + ], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "properties": { + "blocks": { + "description": "Array of marketing content blocks", + "items": { + "$ref": "#/components/schemas/MarketingBlock" + }, + "type": "array" + }, + "load_items": { + "description": "Array of catalog item IDs to preload", + "items": { + "type": "integer" + }, + "type": "array" + }, + "success": { + "description": "Indicates successful retrieval", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this data was retrieved", + "example": "2025-08-02T14:28:41.605Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "timestamp", + "blocks", + "load_items" + ], + "title": "CatalogMarketingResponse", + "type": "object" + }, + "AddItemsRequest": { + "description": "Request body for adding items to cart", + "example": { + "items": [ + { + "catalog_item_id": 12345, + "line_item_id": "custom-id-123", + "metadata": { + "cost_center": "WEf333-001", + "manager_id": "2938749823670" + } + } + ] + }, + "properties": { + "items": { + "description": "Array of items to add to cart", + "items": { + "$ref": "#/components/schemas/AddCartItem" + }, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "items" + ], + "title": "AddItemsRequest", + "type": "object" + }, + "PingResponse": { + "description": "Health check response with optional authentication info", + "example": { + "authenticated": false, + "customer": null, + "status": "ok", + "timestamp": "2025-08-01T12:00:00Z", + "version": "2.0.0" + }, + "properties": { + "authenticated": { + "description": "Whether the request was authenticated", + "example": false, + "type": "boolean" + }, + "customer": { + "description": "Customer information if authenticated", + "nullable": true, + "properties": { + "id": { + "format": "uuid", + "type": "string" + }, + "name": { + "type": "string" + }, + "subdomain": { + "type": "string" + } + }, + "type": "object" + }, + "status": { + "description": "Service status", + "example": "ok", + "type": "string" + }, + "timestamp": { + "description": "Current server timestamp", + "example": "2025-08-01T12:00:00Z", + "format": "date-time", + "type": "string" + }, + "version": { + "description": "API version", + "example": "2.0.0", + "type": "string" + } + }, + "required": [ + "status", + "timestamp", + "version", + "authenticated" + ], + "title": "PingResponse", + "type": "object" + }, + "StockErrorResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResponse" + }, + { + "properties": { + "available_quantity": { + "description": "Maximum units available for limited stock items", + "minimum": 0, + "type": "integer" + }, + "error_code": { + "description": "Specific stock error code", + "enum": [ + "INSUFFICIENT_STOCK", + "STOCK_RESERVATION_FAILED", + "ITEM_UNAVAILABLE" + ], + "type": "string" + } + }, + "required": [ + "error_code", + "available_quantity" + ], + "type": "object" + } + ], + "description": "Error response for stock-related operations", + "example": { + "available_quantity": 5, + "error_code": "INSUFFICIENT_STOCK", + "message": "Insufficient stock available", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "title": "StockErrorResponse", + "type": "object" + }, + "ValidationErrorResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResponse" + }, + { + "properties": { + "cart": { + "$ref": "#/components/schemas/Cart" + }, + "error_code": { + "description": "Specific validation error code", + "enum": [ + "STOCK_RESERVATIONS_EXPIRED", + "INSUFFICIENT_STOCK", + "ITEMS_UNAVAILABLE", + "CART_VALIDATION_FAILED" + ], + "type": "string" + }, + "errors": { + "description": "List of validation error messages", + "example": [ + "Item 'Premium Headphones' is no longer available" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "failed_items": { + "additionalProperties": { + "description": "Array of error codes for this line item", + "items": { + "description": "System-readable error code", + "enum": [ + "ITEM_UNAVAILABLE", + "RESERVATION_EXPIRED", + "PRICE_CHANGED", + "POINTS_CHANGED", + "MISSING_REQUIRED_ADDRESS_FIELDS" + ], + "type": "string" + }, + "type": "array" + }, + "description": "Map of line item IDs to their validation error codes", + "type": "object" + } + }, + "required": [ + "error_code", + "failed_items" + ], + "type": "object" + } + ], + "description": "Error response for cart validation failures", + "example": { + "error_code": "ITEMS_UNAVAILABLE", + "failed_items": { + "550e8400-e29b-41d4-a716-446655440000": [ + "ITEM_UNAVAILABLE", + "PRICE_CHANGED", + "POINTS_CHANGED" + ], + "6ba7b810-9dad-11d1-80b4-00c04fd430c8": [ + "RESERVATION_EXPIRED" + ] + }, + "message": "Cart validation failed", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "title": "ValidationErrorResponse", + "type": "object" + }, + "Filter": { + "description": "A Filter DSL object for complex boolean queries.\n\n## Comparison Operators\n- `eq`: Equal to a single value - `{\"eq\": {\"brand_id\": 5984}}`\n- `ne`: Not equal to a single value - `{\"ne\": {\"item_type_id\": 200}}`\n- `in`: Matches any value in a list - `{\"in\": {\"brand_id\": [5984, 114, 225]}}`\n- `not_in`: Excludes all values in a list - `{\"not_in\": {\"item_type_id\": [200, 100]}}`\n- `gt`: Greater than (numeric fields only) - `{\"gt\": {\"price\": 100}}`\n- `gte`: Greater than or equal (numeric fields only) - `{\"gte\": {\"points\": 1000}}`\n- `lt`: Less than (numeric fields only) - `{\"lt\": {\"price\": 500}}`\n- `lte`: Less than or equal (numeric fields only) - `{\"lte\": {\"points\": 5000}}`\n- `between`: Between two values inclusive (numeric fields only) - `{\"between\": {\"price\": [50, 200]}}`\n\n## Boolean Operators\n- `and`: All conditions must match (requires 2+ conditions)\n- `or`: Any condition must match (requires 2+ conditions)\n\n## Allowed Filter Fields\n| Field | Type | Description |\n|-------|------|-------------|\n| `brand_id` | integer | Filter by brand ID |\n| `category_id` | integer | Filter by category ID |\n| `tag_id` | integer | Filter by tag ID |\n| `item_type_id` | integer | Filter by item type ID (200 = gift cards) |\n| `catalog_item_id` | integer | Filter by specific catalog item ID |\n| `fulfillment_type` | string | Filter by fulfillment type (\"physical\" or \"digital\") |\n| `price` | number | Filter by price (supports gt, gte, lt, lte, between) |\n| `points` | integer | Filter by points (supports gt, gte, lt, lte, between) |\n\n## Limits\n- Maximum nesting depth: 5 levels\n- Maximum total clauses: 50\n- Maximum values in `in`/`not_in`: 100\n\n## Examples\n\nSimple equality:\n```json\n{\"eq\": {\"brand_id\": 5984}}\n```\n\nMultiple values:\n```json\n{\"in\": {\"brand_id\": [5984, 114, 225]}}\n```\n\nPrice range:\n```json\n{\"between\": {\"price\": [50, 200]}}\n```\n\nComplex nested query (physical items that are gift cards OR priced $50-$200):\n```json\n{\n \"and\": [\n {\"eq\": {\"fulfillment_type\": \"physical\"}},\n {\"or\": [\n {\"eq\": {\"item_type_id\": 200}},\n {\"between\": {\"price\": [50, 200]}}\n ]}\n ]\n}\n```\n", + "example": { + "and": [ + { + "eq": { + "category_id": 10493 + } + }, + { + "or": [ + { + "eq": { + "brand_id": 5984 + } + }, + { + "eq": { + "brand_id": 114 + } + } + ] + } + ] + }, + "oneOf": [ + { + "description": "Logical AND - all conditions must match. Requires at least 2 conditions. Can be nested up to 5 levels deep.", + "properties": { + "and": { + "description": "Array of filter conditions (all must match)", + "items": { + "$ref": "#/components/schemas/Filter" + }, + "minItems": 2, + "type": "array" + } + }, + "required": [ + "and" + ], + "title": "AndOperator", + "type": "object" + }, + { + "description": "Logical OR - any condition must match. Requires at least 2 conditions. Can be nested up to 5 levels deep.", + "properties": { + "or": { + "description": "Array of filter conditions (any must match)", + "items": { + "$ref": "#/components/schemas/Filter" + }, + "minItems": 2, + "type": "array" + } + }, + "required": [ + "or" + ], + "title": "OrOperator", + "type": "object" + }, + { + "description": "Equal to comparison. Specify one field and its value.", + "properties": { + "eq": { + "description": "Specify exactly one field with its value", + "example": { + "brand_id": 5984 + }, + "properties": { + "brand_id": { + "description": "Filter by brand ID", + "type": "integer" + }, + "catalog_item_id": { + "description": "Filter by catalog item ID", + "type": "integer" + }, + "category_id": { + "description": "Filter by category ID", + "type": "integer" + }, + "fulfillment_type": { + "description": "Filter by fulfillment type", + "enum": [ + "physical", + "digital" + ], + "type": "string" + }, + "item_type_id": { + "description": "Filter by item type ID (200 = gift cards)", + "type": "integer" + }, + "points": { + "description": "Filter by points", + "type": "integer" + }, + "price": { + "description": "Filter by price", + "type": "number" + }, + "tag_id": { + "description": "Filter by tag ID", + "type": "integer" + } + }, + "type": "object" + } + }, + "required": [ + "eq" + ], + "title": "EqOperator", + "type": "object" + }, + { + "description": "Not equal to comparison. Specify one field and its value.", + "properties": { + "ne": { + "description": "Specify exactly one field with its value", + "example": { + "brand_id": 5984 + }, + "properties": { + "brand_id": { + "description": "Filter by brand ID", + "type": "integer" + }, + "catalog_item_id": { + "description": "Filter by catalog item ID", + "type": "integer" + }, + "category_id": { + "description": "Filter by category ID", + "type": "integer" + }, + "fulfillment_type": { + "description": "Filter by fulfillment type", + "enum": [ + "physical", + "digital" + ], + "type": "string" + }, + "item_type_id": { + "description": "Filter by item type ID (200 = gift cards)", + "type": "integer" + }, + "points": { + "description": "Filter by points", + "type": "integer" + }, + "price": { + "description": "Filter by price", + "type": "number" + }, + "tag_id": { + "description": "Filter by tag ID", + "type": "integer" + } + }, + "type": "object" + } + }, + "required": [ + "ne" + ], + "title": "NeOperator", + "type": "object" + }, + { + "description": "Greater than comparison. Numeric fields only.", + "properties": { + "gt": { + "description": "Specify exactly one numeric field with its value", + "example": { + "price": 100 + }, + "properties": { + "points": { + "description": "Compare by points", + "type": "integer" + }, + "price": { + "description": "Compare by price", + "type": "number" + } + }, + "type": "object" + } + }, + "required": [ + "gt" + ], + "title": "GtOperator", + "type": "object" + }, + { + "description": "Greater than or equal comparison. Numeric fields only.", + "properties": { + "gte": { + "description": "Specify exactly one numeric field with its value", + "example": { + "price": 100 + }, + "properties": { + "points": { + "description": "Compare by points", + "type": "integer" + }, + "price": { + "description": "Compare by price", + "type": "number" + } + }, + "type": "object" + } + }, + "required": [ + "gte" + ], + "title": "GteOperator", + "type": "object" + }, + { + "description": "Less than comparison. Numeric fields only.", + "properties": { + "lt": { + "description": "Specify exactly one numeric field with its value", + "example": { + "price": 100 + }, + "properties": { + "points": { + "description": "Compare by points", + "type": "integer" + }, + "price": { + "description": "Compare by price", + "type": "number" + } + }, + "type": "object" + } + }, + "required": [ + "lt" + ], + "title": "LtOperator", + "type": "object" + }, + { + "description": "Less than or equal comparison. Numeric fields only.", + "properties": { + "lte": { + "description": "Specify exactly one numeric field with its value", + "example": { + "price": 100 + }, + "properties": { + "points": { + "description": "Compare by points", + "type": "integer" + }, + "price": { + "description": "Compare by price", + "type": "number" + } + }, + "type": "object" + } + }, + "required": [ + "lte" + ], + "title": "LteOperator", + "type": "object" + }, + { + "description": "Matches any value in the list. Specify one field with an array of values.", + "properties": { + "in": { + "description": "Specify exactly one field with an array of values", + "example": { + "brand_id": [ + 5984, + 114, + 225 + ] + }, + "properties": { + "brand_id": { + "description": "Filter by brand IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "catalog_item_id": { + "description": "Filter by catalog item IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "category_id": { + "description": "Filter by category IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "fulfillment_type": { + "description": "Filter by fulfillment types", + "items": { + "enum": [ + "physical", + "digital" + ], + "type": "string" + }, + "type": "array" + }, + "item_type_id": { + "description": "Filter by item type IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "points": { + "description": "Filter by points", + "items": { + "type": "integer" + }, + "type": "array" + }, + "price": { + "description": "Filter by prices", + "items": { + "type": "number" + }, + "type": "array" + }, + "tag_id": { + "description": "Filter by tag IDs", + "items": { + "type": "integer" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "required": [ + "in" + ], + "title": "InOperator", + "type": "object" + }, + { + "description": "Excludes all values in the list. Specify one field with an array of values.", + "properties": { + "not_in": { + "description": "Specify exactly one field with an array of values", + "example": { + "brand_id": [ + 5984, + 114, + 225 + ] + }, + "properties": { + "brand_id": { + "description": "Filter by brand IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "catalog_item_id": { + "description": "Filter by catalog item IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "category_id": { + "description": "Filter by category IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "fulfillment_type": { + "description": "Filter by fulfillment types", + "items": { + "enum": [ + "physical", + "digital" + ], + "type": "string" + }, + "type": "array" + }, + "item_type_id": { + "description": "Filter by item type IDs", + "items": { + "type": "integer" + }, + "type": "array" + }, + "points": { + "description": "Filter by points", + "items": { + "type": "integer" + }, + "type": "array" + }, + "price": { + "description": "Filter by prices", + "items": { + "type": "number" + }, + "type": "array" + }, + "tag_id": { + "description": "Filter by tag IDs", + "items": { + "type": "integer" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "required": [ + "not_in" + ], + "title": "NotInOperator", + "type": "object" + }, + { + "description": "Between comparison (inclusive). Specify one numeric field with [min, max] range.", + "properties": { + "between": { + "description": "Specify exactly one numeric field with [min, max] range", + "example": { + "price": [ + 50, + 200 + ] + }, + "properties": { + "points": { + "description": "Points range as [min, max]", + "items": { + "type": "integer" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "price": { + "description": "Price range as [min, max]", + "items": { + "type": "number" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "type": "object" + } + }, + "required": [ + "between" + ], + "title": "BetweenOperator", + "type": "object" + } + ], + "title": "Filter", + "type": "object" + }, + "ItemNotFoundErrorResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorResponse" + }, + { + "properties": { + "error_code": { + "description": "Specific not found error code", + "enum": [ + "ITEM_NOT_FOUND" + ], + "type": "string" + } + }, + "required": [ + "error_code" + ], + "type": "object" + } + ], + "description": "Error response when item is not found", + "example": { + "error_code": "ITEM_NOT_FOUND", + "message": "Item not found in catalog", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "title": "ItemNotFoundErrorResponse", + "type": "object" + }, + "DirectOrderRequest": { + "description": "Request body for placing an order directly without managing cart state.\n\nThis endpoint allows you to submit an entire order in a single API call,\nincluding items, shipping address, and payment details. The order is validated\nand placed immediately without creating or maintaining a cart session.\n\nAll items must be available and valid at the time of order placement.\nFor physical items, a complete shipping address is required.\n", + "example": { + "external_order_id": "ORDER-2025-001", + "external_user_id": "user-456", + "items": [ + { + "catalog_item_id": 12345, + "metadata": { + "cost_center": "163-HR" + }, + "points_paid": 4999, + "price_paid": "49.99", + "shipping_paid": "9.99", + "tax_paid": "4.50" + } + ], + "metadata": { + "budget_code": "MKT-Q1-2025", + "department": "Marketing", + "purchase_order": "PO-2025-002" + }, + "shipping_address": { + "address_1": "123 Main Street", + "address_2": "Apt 4B", + "city": "New York", + "country": "US", + "email": "john.doe@example.com", + "given_name": "John", + "phone_number": "+1-555-123-4567", + "postal_code": "10001", + "state_or_region": "NY", + "surname": "Doe" + } + }, + "examples": { + "digital_product": { + "summary": "Digital product (gift card) requiring minimal address info", + "value": { + "external_order_id": "ORDER-2025-002", + "external_user_id": "user-789", + "items": [ + { + "catalog_item_id": 23456, + "points_paid": 10000, + "price_paid": "100.00", + "shipping_paid": "0.00", + "tax_paid": "0.00" + } + ], + "metadata": { + "campaign_id": "HOLIDAY2025" + }, + "shipping_address": { + "email": "jane.smith@example.com", + "given_name": "Jane", + "surname": "Smith" + } + } + }, + "multiple_items": { + "summary": "Order with multiple items", + "value": { + "external_order_id": "ORDER-2025-004", + "external_user_id": "user-999", + "items": [ + { + "catalog_item_id": 12345, + "points_paid": 2499, + "price_paid": "24.99", + "shipping_paid": "5.00", + "tax_paid": "2.25" + }, + { + "catalog_item_id": 12346, + "points_paid": 3499, + "price_paid": "34.99", + "shipping_paid": "5.00", + "tax_paid": "3.15" + }, + { + "catalog_item_id": 23456, + "points_paid": 5000, + "price_paid": "50.00", + "shipping_paid": "0.00", + "tax_paid": "0.00" + } + ], + "metadata": { + "discount_code": "BULK10", + "sales_rep": "SR-12345" + }, + "shipping_address": { + "address_1": "456 Oak Avenue", + "address_2": "Suite 200", + "city": "Los Angeles", + "country": "US", + "email": "bob.w@example.com", + "given_name": "Bob", + "phone_number": "+1-555-999-8888", + "postal_code": "90001", + "state_or_region": "CA", + "surname": "Williams" + } + } + }, + "physical_product": { + "summary": "Physical product order requiring full shipping address", + "value": { + "external_order_id": "ORDER-2025-001", + "external_user_id": "user-456", + "items": [ + { + "catalog_item_id": 12345, + "metadata": { + "cost_center": "163-HR" + }, + "points_paid": 4999, + "price_paid": "49.99", + "shipping_paid": "9.99", + "tax_paid": "4.50" + } + ], + "metadata": { + "budget_code": "MKT-Q1-2025", + "department": "Marketing", + "purchase_order": "PO-2025-002" + }, + "shipping_address": { + "address_1": "123 Main Street", + "address_2": "Apt 4B", + "city": "New York", + "country": "US", + "email": "john.doe@example.com", + "given_name": "John", + "phone_number": "+1-555-123-4567", + "postal_code": "10001", + "state_or_region": "NY", + "surname": "Doe" + } + } + } + }, + "properties": { + "external_order_id": { + "description": "Your unique order identifier. Must be unique per customer. Used for order tracking and idempotency.", + "type": "string" + }, + "external_user_id": { + "description": "Your user identifier for this order", + "type": "string" + }, + "items": { + "description": "Array of items to order with payment information", + "items": { + "$ref": "#/components/schemas/DirectOrderItem" + }, + "minItems": 1, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Order-level metadata (flat map with string values only). Can include PO numbers, department codes, etc.", + "type": "object" + }, + "shipping_address": { + "description": "Shipping address information. Required fields depend on the items being ordered.\nPhysical items typically require full address details. Digital items may only require\nemail and name fields.\n", + "properties": { + "address_1": { + "description": "Street address line 1", + "type": "string" + }, + "address_2": { + "description": "Street address line 2", + "type": "string" + }, + "address_3": { + "description": "Street address line 3", + "type": "string" + }, + "address_4": { + "description": "Street address line 4", + "type": "string" + }, + "city": { + "description": "City", + "type": "string" + }, + "country": { + "description": "Country code (e.g., 'US', 'GB', 'CA')", + "type": "string" + }, + "email": { + "description": "Contact email", + "format": "email", + "type": "string" + }, + "given_name": { + "description": "Recipient's first name", + "type": "string" + }, + "phone_number": { + "description": "Contact phone", + "type": "string" + }, + "postal_code": { + "description": "ZIP/Postal code", + "type": "string" + }, + "state_or_region": { + "description": "State/Province/Region", + "type": "string" + }, + "surname": { + "description": "Recipient's last name", + "type": "string" + } + }, + "type": "object" + } + }, + "required": [ + "external_user_id", + "external_order_id", + "items" + ], + "title": "DirectOrderRequest", + "type": "object" + }, + "Cart": { + "description": "Shopping cart with line items and metadata", + "example": { + "address_1": "123 Main Street", + "address_2": "Apt 4B", + "address_3": null, + "address_4": null, + "cart_version": "acf1a4ae-3786-4bb3-b0d0-1c49bf77a2e7", + "city": "New York", + "country": "US", + "currency": "USD", + "email": "john.doe@example.com", + "given_name": "John", + "is_locked": false, + "line_items": [ + { + "points": 4998, + "brand": "AudioTech", + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "AT-WH500", + "availability": "In stock", + "rank": 100, + "is_limited_stock": false, + "fulfillment_type": "physical", + "item_type_id": 200, + "brand_id": 567, + "retail_price": "79.99", + "original_points": 5999, + "is_primary": false, + "tag_ids": [ + 35, + 78 + ], + "line_item_id": "550e8400-e29b-41d4-a716-446655440000", + "is_taxable": true, + "supplier_reference_id": "SUP-AT-WH500", + "catalog_item_id": 12345, + "original_price": "59.99", + "shipping_estimate": "5.99", + "price": "49.98", + "supplier_id": 1001, + "options": [], + "product_id": "prod-123-456", + "is_stock_reserved": false, + "images": [ + { + "alt": "Wireless Headphones", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12345.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/12345.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/12345.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/12345.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/12345.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/12345.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/12345.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/12345.jpg" + } + } + ], + "stock_reserved_until": null, + "description": "Premium noise-canceling wireless headphones", + "metadata": { + "color": "black" + }, + "is_explicit": false, + "is_available": true, + "errors": [], + "product_options": {}, + "category_ids": [ + 10, + 25 + ], + "name": "Wireless Headphones" + } + ], + "metadata": { + "order_type": "standard" + }, + "phone_number": "555-123-4567", + "postal_code": "10001", + "state_or_region": "NY", + "surname": "Doe", + "total": "54.47", + "total_line_items": 1, + "total_points": 4998, + "unique_item_count": 1 + }, + "properties": { + "address_1": { + "description": "Primary address line", + "example": "123 Main Street", + "nullable": true, + "type": "string" + }, + "address_2": { + "description": "Secondary address line (apartment, suite, etc.)", + "example": "Apt 4B", + "nullable": true, + "type": "string" + }, + "address_3": { + "description": "Third address line", + "nullable": true, + "type": "string" + }, + "address_4": { + "description": "Fourth address line", + "nullable": true, + "type": "string" + }, + "cart_version": { + "description": "Version identifier for the cart", + "example": "acf1a4ae-3786-4bb3-b0d0-1c49bf77a2e7", + "format": "uuid", + "type": "string" + }, + "city": { + "description": "City", + "example": "New York", + "nullable": true, + "type": "string" + }, + "country": { + "description": "Country code", + "example": "US", + "nullable": true, + "type": "string" + }, + "currency": { + "description": "ISO currency code", + "example": "USD", + "type": "string" + }, + "email": { + "description": "Email address", + "example": "john.doe@example.com", + "format": "email", + "nullable": true, + "type": "string" + }, + "given_name": { + "description": "First/given name", + "example": "John", + "nullable": true, + "type": "string" + }, + "is_locked": { + "description": "Whether the cart is locked", + "example": false, + "type": "boolean" + }, + "line_items": { + "description": "Array of all line items in the cart", + "items": { + "$ref": "#/components/schemas/CartLineItem" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata for the line item (flat map with string values only)", + "type": "object" + }, + "phone_number": { + "description": "Phone number", + "example": "555-123-4567", + "nullable": true, + "type": "string" + }, + "postal_code": { + "description": "Postal code", + "example": "10001", + "nullable": true, + "type": "string" + }, + "state_or_region": { + "description": "State or region", + "example": "NY", + "nullable": true, + "type": "string" + }, + "surname": { + "description": "Last/family name", + "example": "Doe", + "nullable": true, + "type": "string" + }, + "total": { + "description": "Total amount including tax/shipping", + "example": "54.47", + "type": "string" + }, + "total_line_items": { + "description": "Total number of line items in cart", + "example": 2, + "type": "integer" + }, + "total_points": { + "description": "Total points", + "example": 5447, + "type": "integer" + }, + "unique_item_count": { + "description": "Number of unique catalog items", + "example": 1, + "type": "integer" + } + }, + "required": [ + "total", + "currency", + "cart_version", + "line_items", + "total_line_items", + "unique_item_count", + "metadata", + "given_name", + "surname", + "address_1", + "address_2", + "address_3", + "address_4", + "city", + "state_or_region", + "postal_code", + "country", + "email", + "phone_number", + "is_locked" + ], + "title": "Cart", + "type": "object" + }, + "ConflictErrorResponse": { + "description": "Error response for conflict situations (409 status)", + "example": { + "error_code": "OUT_OF_STOCK", + "message": "Item is out of stock", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "properties": { + "error_code": { + "description": "Machine-readable error code", + "example": "OUT_OF_STOCK", + "type": "string" + }, + "message": { + "description": "Human-readable error message", + "example": "Item is out of stock", + "type": "string" + }, + "success": { + "description": "Always false for error responses", + "example": false, + "type": "boolean" + }, + "timestamp": { + "description": "When this error occurred", + "example": "2023-12-01T15:30:45.123Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "message", + "error_code", + "timestamp" + ], + "title": "ConflictErrorResponse", + "type": "object" + }, + "ItemType": { + "description": "Catalog item type classification", + "example": { + "item_count": 35, + "item_type_id": 200, + "name": "Apparel" + }, + "properties": { + "item_count": { + "description": "Number of items of this type", + "example": 35, + "type": "integer" + }, + "item_type_id": { + "description": "Unique identifier for this item type", + "example": 200, + "type": "integer" + }, + "name": { + "description": "Item type name", + "example": "Apparel", + "type": "string" + } + }, + "required": [ + "item_type_id", + "name", + "item_count" + ], + "title": "ItemType", + "type": "object" + }, + "GteOperator": { + "description": "Greater than or equal comparison. Numeric fields only.", + "properties": { + "gte": { + "description": "Specify exactly one numeric field with its value", + "example": { + "price": 100 + }, + "properties": { + "points": { + "description": "Compare by points", + "type": "integer" + }, + "price": { + "description": "Compare by price", + "type": "number" + } + }, + "type": "object" + } + }, + "required": [ + "gte" + ], + "title": "GteOperator", + "type": "object" + }, + "LtOperator": { + "description": "Less than comparison. Numeric fields only.", + "properties": { + "lt": { + "description": "Specify exactly one numeric field with its value", + "example": { + "price": 100 + }, + "properties": { + "points": { + "description": "Compare by points", + "type": "integer" + }, + "price": { + "description": "Compare by price", + "type": "number" + } + }, + "type": "object" + } + }, + "required": [ + "lt" + ], + "title": "LtOperator", + "type": "object" + }, + "ListAvailableCatalogsResponse": { + "description": "List of catalog sockets available to the authenticated customer", + "example": { + "sockets": [ + { + "currency": "USD", + "features": { + "collect_sales_tax": true + }, + "language": "en", + "point_to_currency_ratio": "100.00", + "region": "US", + "socket_id": 999, + "socket_name": "For Great Testing" + } + ], + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z" + }, + "properties": { + "sockets": { + "description": "Array of catalog sockets", + "items": { + "$ref": "#/components/schemas/Socket" + }, + "type": "array" + }, + "success": { + "description": "Indicates successful retrieval", + "example": true, + "type": "boolean" + }, + "timestamp": { + "description": "When this data was retrieved", + "example": "2023-12-01T15:30:45.123Z", + "format": "datetime", + "type": "string" + } + }, + "required": [ + "success", + "timestamp", + "sockets" + ], + "title": "ListAvailableCatalogsResponse", + "type": "object" + }, + "CartLineItem": { + "allOf": [ + { + "$ref": "#/components/schemas/CatalogItem" + }, + { + "properties": { + "errors": { + "description": "Any errors for this line item", + "example": [], + "items": { + "type": "string" + }, + "type": "array" + }, + "is_stock_reserved": { + "description": "Whether stock is reserved for this item", + "example": false, + "type": "boolean" + }, + "line_item_id": { + "description": "Unique identifier for this line item", + "example": "550e8400-e29b-41d4-a716-446655440000", + "format": "uuid", + "type": "string" + }, + "metadata": { + "description": "Arbitrary key-value pairs for storing custom data specific to this line item", + "example": { + "color": "blue", + "size": "large" + }, + "type": "object" + }, + "options": { + "description": "Selected product options with translations", + "example": [ + { + "order": "3", + "slug": "size", + "translations": [ + { + "language": "en-US", + "option_name": "Size", + "value_name": "Large" + }, + { + "language": "fr-FR", + "option_name": "Taille", + "value_name": "Grand" + }, + { + "language": "es-ES", + "option_name": "Tamaño", + "value_name": "Grande" + } + ], + "value": "large" + }, + { + "order": "2", + "slug": "color", + "translations": [ + { + "language": "en-US", + "option_name": "Color", + "value_name": "Blue" + }, + { + "language": "fr-FR", + "option_name": "Couleur", + "value_name": "Bleu" + }, + { + "language": "es-ES", + "option_name": "Color", + "value_name": "Azul" + } + ], + "value": "blue" + } + ], + "items": { + "properties": { + "order": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "translations": { + "items": { + "properties": { + "language": { + "type": "string" + }, + "option_name": { + "type": "string" + }, + "value_name": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "stock_reserved_until": { + "description": "When the stock reservation expires", + "example": "2023-12-01T16:30:45.123Z", + "format": "datetime", + "nullable": true, + "type": "string" + } + }, + "required": [ + "line_item_id", + "metadata", + "errors", + "stock_reserved_until", + "is_stock_reserved", + "options" + ], + "type": "object" + } + ], + "description": "Cart line item containing full catalog item details plus cart-specific fields", + "example": { + "points": 26158, + "brand": "OutdoorGear Plus", + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "OGP-JACKET-001-M-NAVY", + "availability": "Available for immediate shipping worldwide", + "rank": 295, + "is_limited_stock": false, + "fulfillment_type": "physical", + "item_type_id": 100, + "brand_id": 44452, + "retail_price": "229.99", + "original_points": 26158, + "is_primary": false, + "tag_ids": [], + "line_item_id": "7b70cc74-d6d9-4443-9175-a2a1f484c4fb", + "is_taxable": true, + "supplier_reference_id": "OGP-JACKET-001-M-NAVY", + "catalog_item_id": 10000007, + "original_price": "261.58", + "shipping_estimate": "11.99", + "price": "261.58", + "supplier_id": 1001, + "options": [ + { + "order": "3", + "slug": "size", + "translations": [ + { + "language": "en-US", + "option_name": "Size", + "value_name": "Large" + }, + { + "language": "fr-FR", + "option_name": "Taille", + "value_name": "Grand" + }, + { + "language": "es-ES", + "option_name": "Tamaño", + "value_name": "Grande" + } + ], + "value": "large" + }, + { + "order": "2", + "slug": "color", + "translations": [ + { + "language": "en-US", + "option_name": "Color", + "value_name": "Blue" + }, + { + "language": "fr-FR", + "option_name": "Couleur", + "value_name": "Bleu" + }, + { + "language": "es-ES", + "option_name": "Color", + "value_name": "Azul" + } + ], + "value": "blue" + } + ], + "product_id": "3ddd1114-1114-1114-1114-111411141114", + "is_stock_reserved": false, + "images": [ + { + "alt": "Primary product image", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_150_3_2": "https://cdn.example.com/img/150c/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_300_1_1": "https://cdn.example.com/img/300/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_300_3_2": "https://cdn.example.com/img/300c/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_500_1_1": "https://cdn.example.com/img/500/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_500_3_2": "https://cdn.example.com/img/500c/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_75_1_1": "https://cdn.example.com/img/75/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a", + "image_75_3_2": "https://cdn.example.com/img/75c/10000007/81c2a076-69bf-4eaa-90b1-b24ad8fb979a" + } + } + ], + "stock_reserved_until": null, + "description": "High quality all-weather outdoor jacket from OutdoorGear Plus. Perfect for professional and personal use.", + "metadata": { + "color": "blue", + "size": "large" + }, + "is_explicit": false, + "is_available": true, + "errors": [], + "product_options": { + "10000007": [ + { + "order": "3", + "slug": "size", + "translations": [ + { + "language": "en-US", + "option_name": "Size", + "value_name": "Large" + } + ], + "value": "large" + } + ] + }, + "category_ids": [ + 2716, + 2714 + ], + "name": "All-Weather Outdoor Jacket" + }, + "title": "CartLineItem", + "type": "object" + }, + "Socket": { + "description": "Catalog socket configuration for accessing catalog data", + "example": { + "currency": "USD", + "features": { + "test_only": true + }, + "language": "en", + "point_to_currency_ratio": "100.00", + "region": "US", + "socket_id": 999, + "socket_name": "For Great Testing" + }, + "properties": { + "currency": { + "description": "ISO currency code for this socket", + "example": "USD", + "type": "string" + }, + "download": { + "description": "S3 download URL for catalog SQLite file (only present when include_download=true)", + "example": "https://s3.us-west-2.amazonaws.com/bucket/catalogs/10463.sqlite", + "type": "string" + }, + "features": { + "description": "Catalog features", + "example": { + "test_only": true + }, + "type": "object" + }, + "language": { + "description": "Two-letter language code", + "example": "en", + "type": "string" + }, + "point_to_currency_ratio": { + "description": "Points to currency conversion ratio", + "example": "100.00", + "type": "string" + }, + "region": { + "description": "Two-letter region/country code", + "example": "US", + "type": "string" + }, + "socket_id": { + "description": "Unique identifier for this socket", + "example": 999, + "type": "integer" + }, + "socket_name": { + "description": "Human-readable name for the socket", + "example": "For Great Testing", + "type": "string" + } + }, + "required": [ + "socket_id", + "socket_name", + "currency", + "language", + "region", + "point_to_currency_ratio", + "features" + ], + "title": "Socket", + "type": "object" + }, + "OrderTrackResponse": { + "description": "Response containing order tracking information", + "example": { + "order": { + "address_1": "123 Main St", + "address_2": null, + "address_3": null, + "address_4": null, + "city": "Anytown", + "country": "US", + "created": "2025-01-15T14:15:22Z", + "email": "john@example.com", + "external_order_id": "your-order-123", + "external_user_id": "user-456", + "fulfillments": [], + "given_name": "John", + "is_test": false, + "line_items": [ + { + "points": 100, + "brand": "Example Brand", + "required_fields": { + "address_1": false, + "address_2": false, + "address_3": false, + "address_4": false, + "city": false, + "country": false, + "email": true, + "given_name": true, + "phone_number": false, + "postal_code": false, + "state_or_region": false, + "surname": true + }, + "model": "GC-100", + "availability": "In stock", + "rank": 100, + "is_limited_stock": false, + "status": "fulfilled", + "fulfillment_type": "digital", + "item_type_id": 200, + "shipping_paid": "0.00", + "brand_id": 123, + "retail_price": "15.00", + "original_points": 120, + "updated_at": "2025-01-15T14:15:22Z", + "created_at": "2025-01-15T14:15:22Z", + "is_primary": false, + "tax_paid": "0.00", + "tag_ids": [], + "line_item_id": "22687a62-27f9-4b60-9a8c-af394729d423", + "is_taxable": false, + "supplier_reference_id": "SUP-GC-100", + "catalog_item_id": 23456, + "original_price": "12.00", + "shipping_estimate": "0.00", + "price": "10.00", + "supplier_id": 1001, + "options": [], + "product_id": "prod-456", + "is_stock_reserved": false, + "images": [ + { + "alt": "Gift Card", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/23456.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/23456.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/23456.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/23456.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/23456.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/23456.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/23456.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/23456.jpg" + } + } + ], + "stock_reserved_until": null, + "points_paid": 100, + "description": "Digital gift card", + "metadata": { + "gift_message": "Happy Birthday!" + }, + "is_explicit": false, + "is_available": true, + "price_paid": "10.00", + "errors": [], + "product_options": {}, + "category_ids": [ + 5, + 10 + ], + "name": "Gift Card" + } + ], + "order_number": "C234-56789-ABCDE-0001", + "phone_number": "555-1234", + "postal_code": "12345", + "socket_id": 100, + "state_or_region": "CA", + "surname": "Doe", + "updated": "2025-01-15T14:30:00Z" + }, + "success": true, + "timestamp": "2025-01-15T14:30:00Z" + }, + "properties": { + "order": { + "$ref": "#/components/schemas/Order" + }, + "success": { + "description": "Whether the request was successful", + "type": "boolean" + }, + "timestamp": { + "description": "Response timestamp", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "success", + "timestamp", + "order" + ], + "title": "OrderTrackResponse", + "type": "object" + } + }, + "securitySchemes": { + "bearerAuth": { + "bearerFormat": "Base64 encoded customer_id:secret", + "scheme": "bearer", + "type": "http" + } + } + }, + "info": { + "contact": { + "email": "support@catalogapi.com", + "name": "Catalog API Support", + "url": "https://catalogapi.com" + }, + "description": "Welcome to Catalog API, your gateway to a complete e-commerce experience. This API enables you to browse through extensive product catalogs, search for specific items, and access detailed information about each product including images, pricing, and availability.\n\nBuild and manage shopping carts with ease - add line items with metadata, and prepare orders for checkout. The API handles everything from address validation to stock reservation, ensuring a smooth purchasing experience. Once orders are placed, track their progress through fulfillment and delivery.\n\nBeyond basic commerce functionality, the API delivers dynamic marketing content tailored to different contexts, whether showcasing featured products, category promotions, or personalized recommendations. With comprehensive multi-language support, real-time stock management, and flexible fulfillment options for both digital and physical products, this API provides all the tools needed for a modern e-commerce platform.\n", + "title": "CatalogAPI", + "version": "2.0.0" + }, + "openapi": "3.1.0", + "paths": { + "/external_users/{external_user_id}/orders": { + "get": { + "callbacks": {}, + "description": "Retrieves all orders associated with a specific external user ID.\nReturns orders with pagination support.\n\nThis endpoint allows you to retrieve all orders for a specific user across\nall their transactions. Each order includes full details including line items,\nfulfillments, and current status.\n\n**Pagination:**\n- Default: 25 orders per page\n- Maximum: 100 orders per page\n- Default sort: date_placed desc\n\n**Sorting:**\nSupported sort fields:\n- `date_placed`\n- `order_number`\n- `external_order_id`\n- `last_tracking_update`\n\nSort format: \"field direction\" (e.g., \"date_placed desc\", \"order_number asc\")\n", + "operationId": "CatalogAPIWeb.Api.Controllers.OrderController.get_orders", + "parameters": [ + { + "description": "Page number for pagination", + "in": "query", + "name": "page", + "required": false, + "schema": { + "default": 1, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Number of items per page (max: 100)", + "in": "query", + "name": "per_page", + "required": false, + "schema": { + "default": 25, + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Sort order as 'field direction' (e.g., 'date_placed desc', 'order_number asc')", + "in": "query", + "name": "sort", + "required": false, + "schema": { + "default": "date_placed desc", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOrdersResponse" + } + } + }, + "description": "List of orders for the user" + }, + "401": { + "content": { + "application/json": { + "example": { + "error_code": "AUTHENTICATION_FAILED", + "message": "Invalid or expired API token", + "success": false, + "timestamp": "2025-01-15T14:30:00Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Authentication failed" + } + }, + "summary": "Get all orders for an external user", + "tags": [ + "Order" + ] + }, + "parameters": [ + { + "description": "The external user ID to fetch orders for", + "in": "path", + "name": "external_user_id", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/orders/{external_order_id}": { + "get": { + "callbacks": {}, + "description": "Retrieves detailed tracking information for a specific order including\ncurrent status, shipping details, and fulfillment progress. Uses your\norder number as the primary lookup method.\n\nYou can optionally pass the external user id you passed when creating the\norder. If the order number is valid but was purchased by a different user\nwe will return not found.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.OrderController.track_order", + "parameters": [ + { + "description": "Optional user ID for additional validation", + "in": "query", + "name": "external_user_id", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "physical_order": { + "summary": "Physical product order with shipping", + "value": { + "order": { + "address_1": "123 Main Street", + "address_2": "Apt 4B", + "city": "New York", + "country": "US", + "created": "2025-01-15T10:00:00Z", + "email": "john.doe@example.com", + "external_order_id": "ORDER-2024-001", + "external_user_id": "user-456", + "fulfillments": [ + { + "created_at": "2025-01-15T10:30:00Z", + "fulfillment_id": "FULFILL-001", + "fulfillment_instructions": "Leave at door if not home", + "fulfillment_type": "physical", + "line_item_ids": [ + "550e8400-e29b-41d4-a716-446655440001" + ], + "shipped_date": "2025-01-15T12:00:00Z", + "shipper": "UPS", + "tracking_number": "1Z999AA10123456784", + "updated_at": "2025-01-15T14:30:00Z" + } + ], + "given_name": "John", + "is_test": false, + "line_items": [ + { + "points": 500, + "brand": "AudioTech", + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "WH-1000X", + "availability": "In stock", + "rank": 150, + "is_limited_stock": false, + "status": "fulfilled", + "fulfillment_type": "physical", + "item_type_id": 200, + "shipping_paid": "9.99", + "brand_id": 123, + "retail_price": "79.99", + "original_points": 600, + "updated_at": "2025-01-15T14:30:00Z", + "created_at": "2025-01-15T10:00:00Z", + "is_primary": false, + "tax_paid": "4.99", + "tag_ids": [ + 35 + ], + "line_item_id": "550e8400-e29b-41d4-a716-446655440001", + "is_taxable": true, + "supplier_reference_id": "SUP-AT-WH500", + "catalog_item_id": 12345, + "original_price": "59.99", + "shipping_estimate": "9.99", + "price": "49.99", + "supplier_id": 1001, + "options": [], + "product_id": "PROD-001", + "is_stock_reserved": false, + "images": [ + { + "alt": "Wireless Headphones", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12345.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/12345.jpg" + } + } + ], + "points_paid": 0, + "description": "Premium noise-cancelling wireless headphones", + "metadata": { + "color": "black", + "warranty": "2-year" + }, + "is_explicit": false, + "is_available": true, + "price_paid": "49.99", + "errors": [], + "product_options": {}, + "category_ids": [ + 10, + 25 + ], + "name": "Wireless Headphones" + } + ], + "order_number": "C234-56789-ABCDE-0001", + "phone_number": "+1-555-123-4567", + "postal_code": "10001", + "socket_id": 100, + "state_or_region": "NY", + "surname": "Doe", + "updated": "2025-01-15T14:30:00Z" + }, + "success": true, + "timestamp": "2025-01-15T14:30:00Z" + } + }, + "points_order": { + "summary": "Order placed with points", + "value": { + "order": { + "address_1": "789 Elm Street", + "city": "Chicago", + "country": "US", + "created": "2025-01-15T09:00:00Z", + "email": "alice.j@example.com", + "external_order_id": "ORDER-2024-003", + "external_user_id": "user-321", + "fulfillments": [ + { + "created_at": "2025-01-15T09:30:00Z", + "fulfillment_id": "FULFILL-003", + "fulfillment_type": "physical", + "line_item_ids": [ + "550e8400-e29b-41d4-a716-446655440003" + ], + "updated_at": "2025-01-15T14:00:00Z" + } + ], + "given_name": "Alice", + "is_test": false, + "line_items": [ + { + "points": 2000, + "brand": "PublishCo", + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "ISBN-123456789", + "availability": "In stock", + "rank": 10, + "is_limited_stock": false, + "status": "fulfilled", + "fulfillment_type": "physical", + "item_type_id": 400, + "shipping_paid": "4.99", + "brand_id": 789, + "retail_price": "24.99", + "original_points": 2000, + "updated_at": "2025-01-15T14:00:00Z", + "created_at": "2025-01-15T09:00:00Z", + "is_primary": false, + "tax_paid": "0.00", + "tag_ids": [ + 45 + ], + "line_item_id": "550e8400-e29b-41d4-a716-446655440003", + "is_taxable": false, + "supplier_reference_id": "PC-BOOK-001", + "catalog_item_id": 34567, + "original_price": "19.99", + "shipping_estimate": "4.99", + "price": "19.99", + "supplier_id": 3001, + "options": [], + "product_id": "BOOK-001", + "is_stock_reserved": false, + "images": [ + { + "alt": "Book Cover", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/book.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/book.jpg" + } + } + ], + "points_paid": 2000, + "description": "Award-winning novel", + "metadata": {}, + "is_explicit": false, + "is_available": true, + "price_paid": "0.00", + "errors": [], + "product_options": {}, + "category_ids": [ + 15, + 20 + ], + "name": "Best Seller Book" + } + ], + "order_number": "C234-56789-ABCDE-0003", + "phone_number": "+1-555-555-5555", + "postal_code": "60601", + "socket_id": 100, + "state_or_region": "IL", + "surname": "Johnson", + "updated": "2025-01-15T14:00:00Z" + }, + "success": true, + "timestamp": "2025-01-15T14:30:00Z" + } + }, + "virtual_order": { + "summary": "Virtual product order (gift card/code)", + "value": { + "order": { + "address_1": "456 Oak Avenue", + "city": "Los Angeles", + "country": "US", + "created": "2025-01-15T11:00:00Z", + "email": "jane.smith@example.com", + "external_order_id": "ORDER-2024-002", + "external_user_id": "user-789", + "fulfillments": [ + { + "created_at": "2025-01-15T11:00:00Z", + "delivered_date": "2025-01-15T11:05:00Z", + "fulfillment_id": "FULFILL-002", + "fulfillment_type": "digital", + "line_item_ids": [ + "550e8400-e29b-41d4-a716-446655440002" + ], + "updated_at": "2025-01-15T11:05:00Z", + "virtual_code_link": "https://redeem.example.com/gc/ABC123XYZ", + "virtual_code_pin": "1234" + } + ], + "given_name": "Jane", + "is_test": false, + "line_items": [ + { + "points": 10000, + "brand": "MegaStore", + "required_fields": { + "address_1": false, + "address_2": false, + "address_3": false, + "address_4": false, + "city": false, + "country": false, + "email": true, + "given_name": true, + "phone_number": false, + "postal_code": false, + "state_or_region": false, + "surname": true + }, + "model": "GC-100-DIGITAL", + "availability": "Always available", + "rank": 50, + "is_limited_stock": false, + "status": "fulfilled", + "fulfillment_type": "digital", + "item_type_id": 300, + "shipping_paid": "0.00", + "brand_id": 456, + "retail_price": "100.00", + "original_points": 10000, + "updated_at": "2025-01-15T11:05:00Z", + "created_at": "2025-01-15T11:00:00Z", + "is_primary": false, + "tax_paid": "0.00", + "tag_ids": [], + "line_item_id": "550e8400-e29b-41d4-a716-446655440002", + "is_taxable": false, + "supplier_reference_id": "MS-GC-100", + "catalog_item_id": 23456, + "original_price": "100.00", + "shipping_estimate": "0.00", + "price": "100.00", + "supplier_id": 2001, + "options": [], + "product_id": "GC-100", + "is_stock_reserved": false, + "images": [ + { + "alt": "Gift Card Image", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/gc.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/gc.jpg" + } + } + ], + "points_paid": 0, + "description": "Digital gift card", + "metadata": {}, + "is_explicit": false, + "is_available": true, + "price_paid": "100.00", + "errors": [], + "product_options": {}, + "category_ids": [ + 5, + 10 + ], + "name": "$100 Gift Card" + } + ], + "order_number": "C234-56789-ABCDE-0002", + "phone_number": "+1-555-987-6543", + "postal_code": "90001", + "socket_id": 100, + "state_or_region": "CA", + "surname": "Smith", + "updated": "2025-01-15T11:05:00Z" + }, + "success": true, + "timestamp": "2025-01-15T14:30:00Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/OrderTrackResponse" + } + } + }, + "description": "Order tracking information" + }, + "401": { + "content": { + "application/json": { + "example": { + "error_code": "AUTHENTICATION_FAILED", + "message": "Invalid or expired API token", + "success": false, + "timestamp": "2025-01-15T14:30:00Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Authentication failed" + }, + "404": { + "content": { + "application/json": { + "examples": { + "order_not_found": { + "summary": "Order does not exist", + "value": { + "error_code": "ORDER_NOT_FOUND", + "message": "Order not found", + "success": false, + "timestamp": "2025-01-15T14:30:00Z" + } + }, + "user_mismatch": { + "summary": "Order exists but external_user_id doesn't match", + "value": { + "error_code": "ORDER_NOT_FOUND", + "message": "Order not found", + "success": false, + "timestamp": "2025-01-15T14:30:00Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Order not found" + } + }, + "summary": "Track order status and fulfillment", + "tags": [ + "Order" + ] + }, + "parameters": [ + { + "description": "The external order number to track", + "in": "path", + "name": "external_order_id", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/ping": { + "get": { + "callbacks": {}, + "description": "Check if the API server is running and responsive. Can be called with or without authentication.", + "operationId": "CatalogAPIWeb.Api.Controllers.HealthController.ping", + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "authenticated": { + "description": "When authenticated, returns additional customer information", + "summary": "Valid Bearer token provided", + "value": { + "authenticated": true, + "customer": { + "id": "550e8400-e29b-41d4-a716-446655440000", + "name": "Acme Corporation", + "subdomain": "acme" + }, + "status": "ok", + "timestamp": "2025-08-01T12:00:00Z", + "version": "2.0.0" + } + }, + "no_auth": { + "description": "The endpoint works without authentication and returns basic health status", + "summary": "No Authorization header provided", + "value": { + "authenticated": false, + "customer": null, + "status": "ok", + "timestamp": "2025-08-01T12:00:00Z", + "version": "2.0.0" + } + } + }, + "schema": { + "$ref": "#/components/schemas/PingResponse" + } + } + }, + "description": "Service is healthy" + }, + "401": { + "content": { + "application/json": { + "examples": { + "invalid_token": { + "summary": "Invalid or expired Bearer token", + "value": { + "error_code": "UNAUTHORIZED", + "message": "Invalid Token or Customer", + "success": false, + "timestamp": "2025-08-01T12:00:00Z" + } + }, + "malformed_auth": { + "summary": "Malformed Authorization header", + "value": { + "error_code": "UNAUTHORIZED", + "message": "Authentication required. Please provide a valid Bearer token.", + "success": false, + "timestamp": "2025-08-01T12:00:00Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Invalid authentication token provided" + } + }, + "security": [], + "summary": "Health check endpoint", + "tags": [ + "Health" + ] + } + }, + "/redemption_active": { + "get": { + "callbacks": {}, + "description": "Determines whether the redemption system is currently active and accepting orders\nfor your account. This can be used by frontend applications to enable/disable\ncheckout functionality.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.OrderController.redemption_active", + "parameters": [ + { + "description": "Session identifier", + "in": "header", + "name": "X-Session-ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "User identifier", + "in": "header", + "name": "X-User-ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Trace identifier for distributed tracing", + "in": "header", + "name": "X-Trace-ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Correlation identifier for request tracking", + "in": "header", + "name": "X-Correlation-ID", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RedemptionActiveResponse" + } + } + }, + "description": "Redemption status" + }, + "401": { + "content": { + "application/json": { + "example": { + "error_code": "AUTHENTICATION_FAILED", + "message": "Invalid or expired API token", + "success": false, + "timestamp": "2025-01-15T14:30:00Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Authentication failed" + } + }, + "summary": "Check if redemption is active", + "tags": [ + "Order" + ] + } + }, + "/sockets": { + "get": { + "callbacks": {}, + "description": "Retrieves all available catalog sockets that the authenticated user has access to.\nEach socket represents a different catalog or storefront with its own inventory,\npricing, and localization settings.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.SocketsController.index", + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "empty_list": { + "description": "New customer account with no catalogs set up yet", + "summary": "No catalogs configured", + "value": { + "sockets": [], + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + }, + "multiple_sockets": { + "description": "Enterprise customer with multiple storefronts in different regions", + "summary": "Customer with multiple catalogs", + "value": { + "sockets": [ + { + "currency": "USD", + "features": {}, + "language": "en", + "point_to_currency_ratio": "100.00", + "region": "US", + "socket_id": 1001, + "socket_name": "US Store" + }, + { + "currency": "EUR", + "features": {}, + "language": "en", + "point_to_currency_ratio": "120.00", + "region": "EU", + "socket_id": 1002, + "socket_name": "EU Store" + }, + { + "currency": "GBP", + "features": { + "company_store": true + }, + "language": "en", + "point_to_currency_ratio": "140.00", + "region": "GB", + "socket_id": 1003, + "socket_name": "UK Store" + } + ], + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + }, + "single_socket": { + "description": "Most common scenario - customer has access to one catalog/storefront", + "summary": "Customer with single catalog", + "value": { + "sockets": [ + { + "currency": "USD", + "features": {}, + "language": "en", + "point_to_currency_ratio": "100.00", + "region": "US", + "socket_id": 999, + "socket_name": "Main Catalog" + } + ], + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ListAvailableCatalogsResponse" + } + } + }, + "description": "List of available catalogs" + }, + "401": { + "content": { + "application/json": { + "examples": { + "invalid_token": { + "description": "Token is malformed, expired, or doesn't exist", + "summary": "Invalid Bearer token", + "value": { + "error_code": "UNAUTHORIZED", + "message": "Invalid Token or Customer", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + }, + "no_token": { + "description": "Request made without Bearer token", + "summary": "Missing Authorization header", + "value": { + "error_code": "UNAUTHORIZED", + "message": "Authentication required. Please provide a valid Bearer token.", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Unauthorized access" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "List available catalogs and sockets", + "tags": [ + "Catalog" + ] + } + }, + "/sockets/{socket_id}": { + "get": { + "callbacks": {}, + "description": "Retrieves detailed information for a specific catalog socket\nby its socket_id. Only sockets owned by the authenticated\ncustomer can be accessed.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.SocketsController.show", + "parameters": [ + { + "description": "When true, includes S3 download link for catalog SQLite file", + "in": "query", + "name": "include_download", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "multi_currency_socket": { + "description": "Socket configured for international sales with points disabled", + "summary": "Multi-currency socket", + "value": { + "socket": { + "currency": "EUR", + "features": { + "points_enabled": false + }, + "language": "en", + "point_to_currency_ratio": "1.00", + "region": "EU", + "socket_id": 1002, + "socket_name": "EU Store" + }, + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + }, + "standard_socket": { + "description": "Typical socket configuration for a single storefront", + "summary": "Standard catalog socket", + "value": { + "socket": { + "currency": "USD", + "features": { + "points_enabled": true + }, + "language": "en", + "point_to_currency_ratio": "100.00", + "region": "US", + "socket_id": 999, + "socket_name": "Main Catalog" + }, + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/SocketResponse" + } + } + }, + "description": "Socket details response" + }, + "401": { + "content": { + "application/json": { + "examples": { + "unauthorized": { + "summary": "Missing or invalid authentication", + "value": { + "error_code": "UNAUTHORIZED", + "message": "Authentication required. Please provide a valid Bearer token.", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Unauthorized access" + }, + "404": { + "content": { + "application/json": { + "examples": { + "not_found": { + "summary": "Socket doesn't exist or not accessible", + "value": { + "error_code": "NOT_FOUND", + "message": "The requested resource was not found.", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Socket not found" + }, + "502": { + "content": { + "application/json": { + "examples": { + "bad_gateway": { + "summary": "Unable to retrieve catalog download link", + "value": { + "error_code": "BAD_GATEWAY", + "message": "Unable to retrieve catalog download link", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Manager API unavailable" + }, + "503": { + "content": { + "application/json": { + "examples": { + "service_unavailable": { + "summary": "Catalog download service is not configured", + "value": { + "error_code": "SERVICE_UNAVAILABLE", + "message": "Catalog download service is not configured", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Manager API not configured" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get catalog socket details", + "tags": [ + "Catalog" + ] + }, + "parameters": [ + { + "description": "The socket ID to retrieve", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + } + ] + }, + "/sockets/{socket_id}/brands": { + "get": { + "callbacks": {}, + "description": "Retrieves all brands available in the catalog along with\nthe number of items from each brand. Useful for creating\nbrand-based filtering interfaces.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.SocketsController.brands", + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "empty_brands": { + "description": "Response when catalog has no brands defined", + "summary": "No brands available", + "value": { + "brands": [], + "success": true, + "timestamp": "2025-08-08T10:15:30.123Z", + "total_brands": 0 + } + }, + "few_brands": { + "description": "Response for a specialized catalog with limited brands", + "summary": "Small catalog with few brands", + "value": { + "brands": [ + { + "brand_id": 501, + "display_name": "Premium Brands", + "num_items": 450 + }, + { + "brand_id": 502, + "display_name": "House Brand", + "num_items": 320 + }, + { + "brand_id": 503, + "display_name": "Clearance Items", + "num_items": 89 + } + ], + "success": true, + "timestamp": "2025-08-08T10:15:30.123Z", + "total_brands": 3 + } + }, + "multiple_brands": { + "description": "Typical response showing various brands in the catalog", + "summary": "Multiple brands with varied item counts", + "value": { + "brands": [ + { + "brand_id": 101, + "display_name": "Nike", + "num_items": 145 + }, + { + "brand_id": 102, + "display_name": "Adidas", + "num_items": 98 + }, + { + "brand_id": 103, + "display_name": "Under Armour", + "num_items": 67 + }, + { + "brand_id": 201, + "display_name": "Apple", + "num_items": 42 + }, + { + "brand_id": 202, + "display_name": "Samsung", + "num_items": 89 + }, + { + "brand_id": 301, + "display_name": "Gift Card Express", + "num_items": 25 + }, + { + "brand_id": 302, + "display_name": "Vanilla Gift", + "num_items": 12 + }, + { + "brand_id": 401, + "display_name": "Generic", + "num_items": 234 + } + ], + "success": true, + "timestamp": "2025-08-08T10:15:30.123Z", + "total_brands": 8 + } + } + }, + "schema": { + "$ref": "#/components/schemas/BrandsResponse" + } + } + }, + "description": "Brands retrieved successfully" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "SOCKET_NOT_FOUND", + "message": "Socket with ID 999 not found for this customer", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Socket not found" + }, + "503": { + "content": { + "application/json": { + "example": { + "error_code": "SERVICE_UNAVAILABLE", + "message": "Search service is temporarily unavailable", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Search service unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get catalog brands", + "tags": [ + "Catalog" + ] + }, + "parameters": [ + { + "description": "The catalog socket to query", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + } + ] + }, + "/sockets/{socket_id}/cart/{external_user_id}": { + "get": { + "callbacks": {}, + "description": "Retrieves the current contents of a user's cart.", + "operationId": "CatalogAPIWeb.Api.Controllers.CartController.view_cart", + "parameters": [ + { + "description": "Include matched_entities with category, tag, and brand details for all items in the cart", + "in": "query", + "name": "matched_entities", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "cart": { + "address_1": null, + "address_2": null, + "address_3": null, + "address_4": null, + "cart_version": "550e8400-e29b-41d4-a716-446655440010", + "city": null, + "country": null, + "currency": "USD", + "email": null, + "given_name": null, + "is_locked": false, + "line_items": [ + { + "catalog_item_variant_id": null, + "points": 2616, + "brand": "OutdoorGearPro", + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "JACKET-001", + "availability": "IN_STOCK", + "rank": 1, + "is_limited_stock": false, + "fulfillment_type": "SHIP", + "external_product_id": "3ddd1114-1114-1114-1114-111411141114", + "item_type_id": 1, + "brand_id": 123, + "retail_price": "349.99", + "original_points": 3000, + "sku": "OGP-JACKET-001-M-NAVY", + "is_primary": true, + "tag_ids": [ + 101, + 102, + 103 + ], + "line_item_id": "550e8400-e29b-41d4-a716-446655440001", + "is_taxable": true, + "supplier_reference_id": "OGP-JACKET-001", + "tags": [ + "outdoor", + "jacket", + "weather-resistant" + ], + "catalog_item_id": 10000013, + "original_price": "299.99", + "available": true, + "shipping_estimate": "7.99", + "price": "261.58", + "supplier_id": 789, + "options": [], + "product_id": "PROD-456", + "is_stock_reserved": false, + "images": [ + { + "alt": "All-Weather Outdoor Jacket - Front View", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/jacket-front.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/jacket-front.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/jacket-front.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/jacket-front.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/jacket-front.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/jacket-front.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/jacket-front.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/jacket-front.jpg" + } + } + ], + "stock_reserved_until": null, + "description": "Professional-grade outdoor jacket designed for all weather conditions", + "metadata": { + "cost_center": "WEf333-001", + "manager_id": "2938749823670" + }, + "is_explicit": false, + "is_available": true, + "errors": [], + "product_options": {}, + "category_ids": [ + 201, + 202 + ], + "name": "All-Weather Outdoor Jacket" + } + ], + "metadata": {}, + "phone_number": null, + "postal_code": null, + "state_or_region": null, + "surname": null, + "total": "571.66", + "total_line_items": 2, + "unique_item_count": 1 + }, + "errors": [], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/CartViewResponse" + } + } + }, + "description": "Cart contents retrieved successfully" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "NOT_FOUND", + "message": "The requested resource was not found.", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/NotFoundErrorResponse" + } + } + }, + "description": "Socket or cart not found" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "View cart contents", + "tags": [ + "Cart" + ] + }, + "parameters": [ + { + "description": "Socket identifier", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "External user identifier", + "in": "path", + "name": "external_user_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "callbacks": {}, + "description": "Adds one or more line items to the cart with a unique UUID. Each line item\nrepresents one unit of a product and can have its own metadata for\npersonalization, tracking, and downstream order processing.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.CartController.add_item", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddItemsRequest" + } + } + }, + "description": "Add items request", + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "cart": { + "address_1": "123 Main Street", + "address_2": "Apt 4B", + "address_3": null, + "address_4": null, + "cart_version": "550e8400-e29b-41d4-a716-446655440010", + "city": "Springfield", + "country": "US", + "currency": "USD", + "email": "john.smith@example.com", + "given_name": "John", + "is_locked": false, + "line_items": [ + { + "points": 26158, + "brand": "OutdoorGearPro", + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "JACKET-001", + "availability": "IN_STOCK", + "rank": 1, + "is_limited_stock": false, + "fulfillment_type": "SHIP", + "item_type_id": 1, + "brand_id": 123, + "retail_price": "349.99", + "original_points": 29999, + "is_primary": false, + "tag_ids": [ + 101, + 102, + 103 + ], + "line_item_id": "550e8400-e29b-41d4-a716-446655440001", + "is_taxable": true, + "supplier_reference_id": "OGP-JACKET-001", + "catalog_item_id": 10000013, + "original_price": "299.99", + "shipping_estimate": "7.99", + "price": "261.58", + "supplier_id": 789, + "options": [], + "product_id": "3ddd1114-1114-1114-1114-111411141114", + "is_stock_reserved": false, + "images": [ + { + "alt": "All-Weather Outdoor Jacket - Front View", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/jacket-front.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/jacket-front.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/jacket-front.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/jacket-front.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/jacket-front.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/jacket-front.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/jacket-front.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/jacket-front.jpg" + } + } + ], + "stock_reserved_until": null, + "description": "Professional-grade outdoor jacket designed for all weather conditions", + "metadata": { + "gift_message": "Happy Birthday!", + "personalization": "John Smith" + }, + "is_explicit": false, + "is_available": true, + "errors": [], + "product_options": { + "10000013": [ + { + "order": "1", + "slug": "color", + "translations": [ + { + "language": "en-US", + "option_name": "Color", + "value_name": "Navy" + } + ], + "value": "navy" + }, + { + "order": "2", + "slug": "size", + "translations": [ + { + "language": "en-US", + "option_name": "Size", + "value_name": "Medium" + } + ], + "value": "medium" + } + ] + }, + "category_ids": [ + 201, + 202 + ], + "name": "All-Weather Outdoor Jacket" + } + ], + "metadata": {}, + "phone_number": "555-123-4567", + "postal_code": "62701", + "state_or_region": "IL", + "surname": "Smith", + "total": "269.57", + "total_line_items": 1, + "unique_item_count": 1 + }, + "errors": [], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/CartViewResponse" + } + } + }, + "description": "Items added successfully" + }, + "400": { + "content": { + "application/json": { + "examples": { + "cart_limit_exceeded": { + "summary": "Cart limit exceeded", + "value": { + "error_code": "CART_LIMIT_EXCEEDED", + "message": "Cart cannot exceed 100 items", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "invalid_metadata": { + "summary": "Invalid metadata format", + "value": { + "error_code": "INVALID_METADATA", + "message": "Metadata values must be strings", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "missing_items": { + "summary": "Missing items array", + "value": { + "error_code": "INVALID_REQUEST", + "message": "Request must include 'items' array", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/BadRequestErrorResponse" + } + } + }, + "description": "Invalid request" + }, + "404": { + "content": { + "application/json": { + "examples": { + "items_not_found": { + "summary": "Some items not found", + "value": { + "error_code": "ITEMS_NOT_FOUND", + "items": [ + 12345, + 67890 + ], + "message": "Some items not found", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "socket_not_found": { + "summary": "Socket not found", + "value": { + "error_code": "SOCKET_NOT_FOUND", + "message": "Socket not found", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/NotFoundErrorResponse" + } + } + }, + "description": "Socket or item not found" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Add line items to cart", + "tags": [ + "Cart" + ] + } + }, + "/sockets/{socket_id}/cart/{external_user_id}/empty": { + "parameters": [ + { + "description": "Socket identifier", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "External user identifier", + "in": "path", + "name": "external_user_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "callbacks": {}, + "description": "Removes all items from the user's cart.", + "operationId": "CatalogAPIWeb.Api.Controllers.CartController.empty_cart", + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "cart": { + "cart_version": "550e8400-e29b-41d4-a716-446655440025", + "currency": "USD", + "is_locked": false, + "line_items": [], + "metadata": {}, + "total": "0.00", + "total_line_items": 0, + "unique_item_count": 0 + }, + "errors": [], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/CartViewResponse" + } + } + }, + "description": "Cart emptied successfully" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "NOT_FOUND", + "message": "The requested resource was not found.", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/NotFoundErrorResponse" + } + } + }, + "description": "Socket or cart not found" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Empty cart", + "tags": [ + "Cart" + ] + } + }, + "/sockets/{socket_id}/cart/{external_user_id}/line_items/{line_item_id}": { + "delete": { + "callbacks": {}, + "description": "Removes a specific line item from the user's cart.", + "operationId": "CatalogAPIWeb.Api.Controllers.CartController.remove_line_item", + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "cart": { + "cart_version": "550e8400-e29b-41d4-a716-446655440030", + "currency": "USD", + "is_locked": false, + "line_items": [], + "metadata": {}, + "total": "0.00", + "total_line_items": 0, + "unique_item_count": 0 + }, + "errors": [], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/CartViewResponse" + } + } + }, + "description": "Line item removed successfully" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "NOT_FOUND", + "message": "The requested resource was not found.", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/NotFoundErrorResponse" + } + } + }, + "description": "Socket, cart, or line item not found" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Remove line item from cart", + "tags": [ + "Cart" + ] + }, + "parameters": [ + { + "description": "Socket identifier", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "External user identifier", + "in": "path", + "name": "external_user_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Line item UUID", + "in": "path", + "name": "line_item_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "put": { + "callbacks": {}, + "description": "Updates metadata for a specific line item in the cart. Metadata must be\na flat map with string keys and string values only. Useful for storing\npersonalization data, tracking information, or special instructions.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.CartController.update_line_item", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateLineItemRequest" + } + } + }, + "description": "Update line item request", + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "cart": { + "cart_version": "550e8400-e29b-41d4-a716-446655440035", + "currency": "USD", + "is_locked": false, + "line_items": [ + { + "catalog_item_variant_id": null, + "points": 250, + "brand": "WidgetCorp", + "required_fields": { + "email": true + }, + "model": "WDG-001", + "availability": "IN_STOCK", + "rank": 1, + "is_limited_stock": false, + "fulfillment_type": "SHIP", + "external_product_id": "PROD-123", + "item_type_id": 2, + "brand_id": 456, + "retail_price": "34.99", + "original_points": 300, + "sku": "WDG-001", + "is_primary": true, + "tag_ids": [ + 201, + 202, + 203 + ], + "line_item_id": "550e8400-e29b-41d4-a716-446655440001", + "is_taxable": true, + "supplier_reference_id": "WC-WDG-001", + "tags": [ + "widget", + "premium", + "professional" + ], + "catalog_item_id": 123456, + "original_price": "29.99", + "available": true, + "shipping_estimate": "2.99", + "price": "24.99", + "supplier_id": 111, + "options": null, + "product_id": 789, + "images": [ + { + "alt": "Premium Widget - Front View", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/widget-front.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/widget-front.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/widget-front.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/widget-front.jpg" + } + } + ], + "description": "High-quality widget for professional use", + "metadata": { + "gift_message": "Best wishes!", + "gift_wrap": "true", + "personalization": "Happy Birthday!" + }, + "is_explicit": false, + "is_available": true, + "errors": [], + "product_options": null, + "category_ids": [ + 301, + 302 + ], + "name": "Premium Widget" + } + ], + "metadata": {}, + "total": "27.24", + "total_line_items": 1, + "unique_item_count": 1 + }, + "errors": [], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/CartViewResponse" + } + } + }, + "description": "Line item updated successfully" + }, + "400": { + "content": { + "application/json": { + "example": { + "error_code": "BAD_REQUEST", + "message": "Metadata values must be strings.", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/BadRequestErrorResponse" + } + } + }, + "description": "Invalid metadata format" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "NOT_FOUND", + "message": "The requested resource was not found.", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/NotFoundErrorResponse" + } + } + }, + "description": "Socket, cart, or line item not found" + }, + "422": { + "content": { + "application/json": { + "example": { + "error_code": "UNPROCESSABLE_ENTITY", + "message": "Cart is locked and cannot be modified.", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/UnprocessableEntityErrorResponse" + } + } + }, + "description": "Cart is locked" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Update line item metadata", + "tags": [ + "Cart" + ] + } + }, + "/sockets/{socket_id}/cart/{external_user_id}/line_items/{line_item_id}/revalidate_stock": { + "parameters": [ + { + "description": "Socket identifier for the catalog", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "External user identifier for the cart", + "in": "path", + "name": "external_user_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Line item identifier to revalidate", + "in": "path", + "name": "line_item_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "callbacks": {}, + "description": "Revalidates the stock reservation for a specific line item in the cart that has an expired reservation.\nThis allows users to refresh their stock hold for a single line item without having to remove and re-add it.\n\nIf the line item can be successfully revalidated, a new stock reservation expiration time is set.\nIf the line item can no longer be reserved due to insufficient stock, an error is returned.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.CartController.revalidate_stock", + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "line_item_id": "22687a62-27f9-4b60-9a8c-af394729d423", + "reservation_expires_at": "2025-08-05T15:30:00Z", + "stock_reserved": true, + "success": true, + "token": "550e8400-e29b-41d4-a716-446655440000" + }, + "schema": { + "$ref": "#/components/schemas/StockRevalidationResponse" + } + } + }, + "description": "Stock successfully revalidated" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorResponse" + } + } + }, + "description": "Line item not found" + }, + "409": { + "content": { + "application/json": { + "example": { + "error_code": "OUT_OF_STOCK", + "message": "Item is out of stock", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ConflictErrorResponse" + } + } + }, + "description": "Item out of stock" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Revalidate expired stock reservation for a specific line item", + "tags": [ + "Cart" + ] + } + }, + "/sockets/{socket_id}/cart/{external_user_id}/metadata": { + "get": { + "callbacks": {}, + "description": "Retrieve the custom metadata associated with a cart. Metadata can be used to store\narbitrary key-value pairs for custom business logic or tracking purposes.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.CartController.get_metadata", + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "empty_metadata": { + "summary": "Cart with no metadata", + "value": { + "cart_version": "550e8400-e29b-41d4-a716-446655440010", + "metadata": {} + } + }, + "with_metadata": { + "summary": "Cart with custom metadata", + "value": { + "cart_version": "550e8400-e29b-41d4-a716-446655440010", + "metadata": { + "approval_status": "pending", + "cost_center": "WEf333-001", + "manager_id": "2938749823670", + "project_code": "PROJ-2024-001" + } + } + } + }, + "schema": { + "properties": { + "cart_version": { + "description": "Current cart version for optimistic locking", + "format": "uuid", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Cart metadata as key-value pairs", + "type": "object" + } + }, + "required": [ + "metadata", + "cart_version" + ], + "type": "object" + } + } + }, + "description": "Cart metadata retrieved successfully" + }, + "401": { + "content": { + "application/json": { + "example": { + "error_code": "UNAUTHORIZED", + "message": "Invalid or missing authentication token", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Unauthorized - Invalid or missing authentication" + }, + "403": { + "content": { + "application/json": { + "example": { + "error_code": "FORBIDDEN", + "message": "Access denied", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "examples": { + "cart_not_found": { + "summary": "Cart does not exist", + "value": { + "error_code": "CART_NOT_FOUND", + "message": "Cart not found for the specified user", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "socket_not_found": { + "summary": "Socket not found", + "value": { + "error_code": "NOT_FOUND", + "message": "The requested resource was not found.", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/NotFoundErrorResponse" + } + } + }, + "description": "Socket or cart not found" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get cart metadata", + "tags": [ + "Cart" + ] + }, + "parameters": [ + { + "description": "Socket/catalog identifier", + "example": 10001, + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "External user identifier", + "example": "user-123456", + "in": "path", + "name": "external_user_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "put": { + "callbacks": {}, + "description": "Sets or replaces the metadata for the cart. Creates the cart if it doesn't exist.\nMetadata must be a flat map with string keys and string values only.\nPassing an empty object clears all metadata.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.CartController.update_metadata", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCartMetadataRequest" + } + } + }, + "description": "Update metadata request", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "metadata_cleared": { + "summary": "All metadata cleared", + "value": { + "data": { + "cart_version": "550e8400-e29b-41d4-a716-446655440012", + "currency": "USD", + "external_user_id": "user-123456", + "is_locked": false, + "line_items": [], + "metadata": {}, + "socket_id": 10001, + "total_line_items": 0, + "unique_item_count": 0 + }, + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "metadata_updated": { + "summary": "Metadata successfully updated", + "value": { + "data": { + "cart_version": "550e8400-e29b-41d4-a716-446655440011", + "currency": "USD", + "external_user_id": "user-123456", + "is_locked": false, + "line_items": [], + "metadata": { + "approval_status": "pending", + "cost_center": "WEf333-001", + "manager_id": "2938749823670", + "project_code": "PROJ-2024-001" + }, + "socket_id": 10001, + "total_line_items": 0, + "unique_item_count": 0 + }, + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/CartViewResponse" + } + } + }, + "description": "Metadata updated successfully" + }, + "400": { + "content": { + "application/json": { + "examples": { + "cart_locked": { + "summary": "Cart is locked", + "value": { + "error_code": "CART_LOCKED", + "message": "Cart is locked", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "invalid_keys": { + "summary": "Invalid metadata keys", + "value": { + "error_code": "INVALID_METADATA_KEYS", + "message": "Metadata keys must be strings", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "invalid_type": { + "summary": "Invalid metadata type", + "value": { + "error_code": "INVALID_METADATA", + "message": "Metadata must be a map/object", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "invalid_values": { + "summary": "Invalid metadata values", + "value": { + "error_code": "INVALID_METADATA_VALUES", + "message": "Metadata values must be strings", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/BadRequestErrorResponse" + } + } + }, + "description": "Invalid metadata or cart is locked" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "SOCKET_NOT_FOUND", + "message": "Socket not found", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/NotFoundErrorResponse" + } + } + }, + "description": "Socket not found" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Update cart metadata", + "tags": [ + "Cart" + ] + } + }, + "/sockets/{socket_id}/cart/{external_user_id}/order_place": { + "parameters": [ + { + "description": "Socket identifier", + "example": 10001, + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "External user identifier", + "example": "user-123456", + "in": "path", + "name": "external_user_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "callbacks": {}, + "description": "Converts the user's cart into a confirmed order and initiates fulfillment.\nThe cart must be validated and locked before this operation. Upon success,\nthe cart is cleared and order tracking information is provided.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.CartController.place_order", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlaceOrderRequest" + } + } + }, + "description": "Order placement request", + "required": false + }, + "responses": { + "201": { + "content": { + "application/json": { + "examples": { + "points_order": { + "summary": "Order with points payment", + "value": { + "external_order_id": "PTS-ORDER-2024-002", + "order_number": "CAT-20231201-164530-D4E5F6", + "timestamp": "2023-12-01T16:45:30.567Z" + } + }, + "successful_order": { + "summary": "Order successfully placed", + "value": { + "external_order_id": "ORDER-2024-001", + "order_number": "CAT-20231201-153045-A1B2C3", + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "properties": { + "external_order_id": { + "description": "Client-provided order ID for external system integration", + "type": "string" + }, + "order_number": { + "description": "System-generated unique order ID for tracking", + "type": "string" + }, + "timestamp": { + "description": "ISO 8601 timestamp when order was placed", + "format": "date-time", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Order placed successfully" + }, + "400": { + "content": { + "application/json": { + "examples": { + "cart_not_locked": { + "summary": "Cart not locked", + "value": { + "error_code": "CART_NOT_LOCKED", + "message": "Cart must be validated and locked before placing order", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "cart_version_mismatch": { + "summary": "Cart version mismatch", + "value": { + "error_code": "CART_VERSION_MISMATCH", + "message": "Cart version does not match current cart", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "invalid_decimal_format": { + "summary": "Payment validation failed - invalid decimal format", + "value": { + "error_code": "PAYMENT_VALIDATION_FAILED", + "failed_items": [ + { + "error_reason": "INVALID_DECIMAL_FORMAT", + "field": "price_paid", + "line_item_id": "550e8400-e29b-41d4-a716-446655440001" + } + ], + "message": "Payment validation failed", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "missing_line_item_payments": { + "summary": "Missing payment information", + "value": { + "error_code": "MISSING_LINE_ITEM_PAYMENTS", + "message": "Payment information missing for one or more line items", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "payment_validation_failed": { + "summary": "Payment validation failed - insufficient payment", + "value": { + "error_code": "PAYMENT_VALIDATION_FAILED", + "failed_items": [ + { + "catalog_item_id": 12345, + "error_reason": "INSUFFICIENT_PAYMENT" + } + ], + "message": "Payment validation failed", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "required_fields_missing": { + "summary": "Required address fields missing", + "value": { + "error_code": "REQUIRED_FIELDS_MISSING", + "message": "Required fields missing: email, phone_number", + "missing_fields": [ + "email", + "phone_number" + ], + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/OrderPlacementErrorResponse" + } + } + }, + "description": "Order placement failed" + }, + "404": { + "content": { + "application/json": { + "examples": { + "cart_not_found": { + "summary": "Cart does not exist", + "value": { + "error_code": "CART_VALIDATION_FAILED", + "message": "Cart not found", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/OrderPlacementErrorResponse" + } + } + }, + "description": "Cart not found" + }, + "422": { + "content": { + "application/json": { + "examples": { + "items_unavailable": { + "summary": "Items no longer available", + "value": { + "error_code": "CART_VALIDATION_FAILED", + "failed_items": [ + "550e8400-e29b-41d4-a716-446655440001" + ], + "message": "Cart validation failed. Item validation errors: Item is no longer available in catalog", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "price_increased": { + "summary": "Price has increased", + "value": { + "error_code": "CART_VALIDATION_FAILED", + "failed_items": [ + "550e8400-e29b-41d4-a716-446655440003" + ], + "message": "Cart validation failed. Item validation errors: Price has increased from 249.99 to 299.99", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "stock_expired": { + "summary": "Stock reservation expired", + "value": { + "error_code": "CART_VALIDATION_FAILED", + "failed_items": [ + "550e8400-e29b-41d4-a716-446655440002" + ], + "message": "Cart validation failed. Item validation errors: Stock reservation has expired", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/OrderPlacementErrorResponse" + } + } + }, + "description": "Cart validation issues" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Convert cart to order", + "tags": [ + "Cart" + ] + } + }, + "/sockets/{socket_id}/cart/{external_user_id}/set_address": { + "parameters": [ + { + "description": "Socket identifier", + "example": 10001, + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "External user identifier", + "example": "user-123456", + "in": "path", + "name": "external_user_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "callbacks": {}, + "description": "Sets or updates the shipping address for the cart. The cart will be created\nif it doesn't exist. All address fields are optional but recommended for\naccurate shipping calculations and order fulfillment.\n\nEmail validation: If an email address is provided, it must be in a valid format\n(must contain @ sign with no spaces). Invalid email formats will return a 422 error.\nEmpty email fields or omitted email fields are allowed.\n\nSome items may require specific address fields based on their fulfillment type.\nCheck the item's required_fields to ensure all necessary information is provided.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.CartController.set_address", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetAddressRequest" + } + } + }, + "description": "Shipping address", + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "complete_address": { + "summary": "Complete address with all fields", + "value": { + "cart": { + "address_1": "123 Main Street", + "address_2": "Apt 4B", + "address_3": "Building C", + "address_4": "Floor 2", + "cart_version": "550e8400-e29b-41d4-a716-446655440020", + "city": "New York", + "country": "US", + "currency": "USD", + "email": "john.doe@example.com", + "given_name": "John", + "is_locked": false, + "line_items": [], + "metadata": {}, + "phone_number": "+1-555-123-4567", + "postal_code": "10001", + "state_or_region": "NY", + "surname": "Doe", + "total": "249.99", + "total_line_items": 0, + "unique_item_count": 0 + }, + "errors": [], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "minimal_address": { + "summary": "Minimal address (name and city only)", + "value": { + "cart": { + "cart_version": "550e8400-e29b-41d4-a716-446655440021", + "city": "Los Angeles", + "country": "US", + "currency": "USD", + "given_name": "Jane", + "is_locked": false, + "line_items": [], + "metadata": {}, + "state_or_region": "CA", + "surname": "Smith", + "total": "0.00", + "total_line_items": 0, + "unique_item_count": 0 + }, + "errors": [], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/CartViewResponse" + } + } + }, + "description": "Address set successfully" + }, + "400": { + "content": { + "application/json": { + "example": { + "error_code": "CART_LOCKED", + "message": "Cart is locked", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Cart is locked" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "NOT_FOUND", + "message": "The requested resource was not found.", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/NotFoundErrorResponse" + } + } + }, + "description": "Socket not found" + }, + "422": { + "content": { + "application/json": { + "example": { + "error_code": "UNPROCESSABLE_ENTITY", + "message": "email: must have the @ sign and no spaces", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/UnprocessableEntityErrorResponse" + } + } + }, + "description": "Invalid address data (e.g., invalid email format)" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Set shipping address for cart", + "tags": [ + "Cart" + ] + } + }, + "/sockets/{socket_id}/cart/{external_user_id}/unlock": { + "parameters": [ + { + "description": "Socket identifier", + "example": 10001, + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "External user identifier", + "example": "user-123456", + "in": "path", + "name": "external_user_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "callbacks": {}, + "description": "Unlocks a previously locked cart, allowing modifications again. This is useful\nwhen order placement fails or is cancelled and the cart needs to be edited.\n\nThe cart version will be updated after unlocking.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.CartController.unlock_cart", + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "cart_unlocked": { + "summary": "Cart successfully unlocked", + "value": { + "cart": { + "address_1": "123 Main Street", + "address_2": "Apt 4B", + "address_3": null, + "address_4": null, + "cart_version": "550e8400-e29b-41d4-a716-446655440055", + "city": "New York", + "country": "US", + "currency": "USD", + "email": "john.doe@example.com", + "given_name": "John", + "is_locked": false, + "line_items": [ + { + "catalog_item_variant_id": null, + "points": 2500, + "brand": "AudioTech", + "required_fields": { + "address_1": true, + "city": true, + "country": true, + "email": true, + "given_name": true, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "WH-PREMIUM-001", + "availability": "IN_STOCK", + "rank": 295, + "is_limited_stock": false, + "fulfillment_type": "SHIP", + "external_product_id": "3ddd1114-1114-1114-1114-111411141114", + "item_type_id": 100, + "brand_id": 123, + "retail_price": "349.99", + "original_points": 3000, + "sku": "WH-PREMIUM-001", + "is_primary": false, + "tag_ids": [], + "line_item_id": "22687a62-27f9-4b60-9a8c-af394729d423", + "is_taxable": true, + "supplier_reference_id": "AT-WH-001", + "tags": [ + "electronics", + "audio" + ], + "catalog_item_id": 12345, + "original_price": "299.99", + "available": true, + "shipping_estimate": "11.99", + "price": "249.99", + "supplier_id": 1001, + "options": [], + "product_id": "3ddd1114-1114-1114-1114-111411141114", + "is_stock_reserved": false, + "images": [ + { + "alt": "Premium Wireless Headphones - Front View", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/headphones-front.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/headphones-front.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/headphones-front.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/headphones-front.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/headphones-front.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/headphones-front.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/headphones-front.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/headphones-front.jpg" + } + } + ], + "stock_reserved_until": null, + "description": "High-quality wireless headphones with noise cancellation", + "metadata": { + "gift_message": "Happy Birthday!", + "gift_wrap": "true" + }, + "is_explicit": false, + "is_available": true, + "errors": [], + "product_options": { + "12345": [ + { + "order": "1", + "slug": "color", + "translations": [ + { + "language": "en-US", + "option_name": "Color", + "value_name": "Black" + } + ], + "value": "black" + } + ] + }, + "category_ids": [ + 2716, + 2714 + ], + "name": "Premium Wireless Headphones" + } + ], + "metadata": { + "last_validation": "2023-12-01T15:29:00.000Z", + "order_attempt": "1" + }, + "phone_number": "+1-555-123-4567", + "postal_code": "10001", + "state_or_region": "NY", + "surname": "Doe", + "total": "272.49", + "total_line_items": 1, + "unique_item_count": 1 + }, + "errors": [], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "empty_cart_unlocked": { + "summary": "Empty cart unlocked", + "value": { + "cart": { + "address_1": null, + "address_2": null, + "address_3": null, + "address_4": null, + "cart_version": "550e8400-e29b-41d4-a716-446655440056", + "city": null, + "country": null, + "currency": "USD", + "email": null, + "given_name": null, + "is_locked": false, + "line_items": [], + "metadata": {}, + "phone_number": null, + "postal_code": null, + "state_or_region": null, + "surname": null, + "total": "0.00", + "total_line_items": 0, + "unique_item_count": 0 + }, + "errors": [], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/CartViewResponse" + } + } + }, + "description": "Cart unlocked successfully" + }, + "400": { + "content": { + "application/json": { + "examples": { + "cart_not_locked": { + "summary": "Cart is not locked", + "value": { + "error_code": "CART_NOT_LOCKED", + "message": "Cart is not locked", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Cart is not locked" + }, + "404": { + "content": { + "application/json": { + "examples": { + "cart_not_found": { + "summary": "Cart not found", + "value": { + "error_code": "NOT_FOUND", + "message": "Cart not found", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "socket_not_found": { + "summary": "Socket not found", + "value": { + "error_code": "NOT_FOUND", + "message": "Socket not found", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/NotFoundErrorResponse" + } + } + }, + "description": "Socket or cart not found" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Unlock the cart", + "tags": [ + "Cart" + ] + } + }, + "/sockets/{socket_id}/cart/{external_user_id}/validate": { + "parameters": [ + { + "description": "Socket identifier", + "example": 10001, + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "External user identifier", + "example": "user-123456", + "in": "path", + "name": "external_user_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "callbacks": {}, + "description": "Validates that all items in the cart are still available in the catalog and\nchecks that all required fields are present. This should be called before\nproceeding to order placement.\n\nOptionally locks the cart to prevent further modifications before order placement.\nItems that are no longer available will be flagged with errors but remain in the cart.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.CartController.validate_cart", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateCartRequest" + } + } + }, + "description": "Validate cart request", + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "validated_and_locked": { + "summary": "Cart validated and locked for checkout", + "value": { + "cart": { + "address_1": "123 Main Street", + "address_2": "Apt 5A", + "address_3": null, + "address_4": null, + "cart_version": "550e8400-e29b-41d4-a716-446655440050", + "city": "New York", + "country": "US", + "currency": "USD", + "email": "john.doe@example.com", + "given_name": "John", + "is_locked": true, + "line_items": [ + { + "points": 24999, + "brand": "AudioPro", + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "AP-WH-PREMIUM", + "availability": "IN_STOCK", + "rank": 100, + "is_limited_stock": false, + "fulfillment_type": "SHIP", + "item_type_id": 200, + "brand_id": 456, + "retail_price": "349.99", + "original_points": 29999, + "is_primary": false, + "tag_ids": [ + 35, + 78 + ], + "line_item_id": "22687a62-27f9-4b60-9a8c-af394729d423", + "is_taxable": true, + "supplier_reference_id": "SUP-AP-PREMIUM", + "catalog_item_id": 12345, + "original_price": "299.99", + "available": true, + "shipping_estimate": "7.99", + "price": "249.99", + "supplier_id": 1001, + "options": [], + "product_id": "premium-headphones-001", + "is_stock_reserved": true, + "images": [ + { + "alt": "Premium Wireless Headphones", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12345.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/12345.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/12345.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/12345.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/12345.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/12345.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/12345.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/12345.jpg" + } + } + ], + "stock_reserved_until": "2023-12-01T16:00:45.123Z", + "description": "High-end noise-canceling wireless headphones", + "metadata": {}, + "is_explicit": false, + "is_available": true, + "errors": [], + "product_options": {}, + "category_ids": [ + 10, + 25 + ], + "name": "Premium Wireless Headphones" + } + ], + "metadata": {}, + "phone_number": "555-123-4567", + "postal_code": "10001", + "state_or_region": "NY", + "surname": "Doe", + "total": "272.49", + "total_line_items": 1, + "unique_item_count": 1 + }, + "errors": [], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "validated_not_locked": { + "summary": "Cart validated but not locked", + "value": { + "cart": { + "address_1": "456 Oak Avenue", + "address_2": null, + "address_3": null, + "address_4": null, + "cart_version": "550e8400-e29b-41d4-a716-446655440051", + "city": "Los Angeles", + "country": "US", + "currency": "USD", + "email": "jane.smith@example.com", + "given_name": "Jane", + "is_locked": false, + "line_items": [ + { + "points": 14999, + "brand": "AudioTech", + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "BT-SPEAKER-001", + "availability": "IN_STOCK", + "rank": 200, + "is_limited_stock": false, + "fulfillment_type": "SHIP", + "item_type_id": 200, + "brand_id": 567, + "retail_price": "199.99", + "original_points": 17999, + "is_primary": false, + "tag_ids": [ + 40, + 55 + ], + "line_item_id": "33798b73-38fa-5c71-0b9d-bf405840e534", + "is_taxable": true, + "supplier_reference_id": "SUP-BT-001", + "catalog_item_id": 67890, + "original_price": "179.99", + "available": true, + "shipping_estimate": "7.99", + "price": "149.99", + "supplier_id": 1002, + "options": [], + "product_id": "bluetooth-speaker-001", + "is_stock_reserved": false, + "images": [ + { + "alt": "Bluetooth Speaker", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/67890.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/67890.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/67890.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/67890.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/67890.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/67890.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/67890.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/67890.jpg" + } + } + ], + "stock_reserved_until": null, + "description": "Wireless Bluetooth speaker with excellent sound quality", + "metadata": {}, + "is_explicit": false, + "is_available": true, + "errors": [], + "product_options": {}, + "category_ids": [ + 15, + 20 + ], + "name": "Bluetooth Speaker" + } + ], + "metadata": {}, + "phone_number": "555-987-6543", + "postal_code": "90001", + "state_or_region": "CA", + "surname": "Smith", + "total": "149.99", + "total_line_items": 1, + "unique_item_count": 1 + }, + "errors": [], + "success": true, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/CartViewResponse" + } + } + }, + "description": "Cart validated successfully" + }, + "400": { + "content": { + "application/json": { + "examples": { + "cart_already_locked": { + "summary": "Cart is already locked", + "value": { + "error_code": "CART_VALIDATION_FAILED", + "failed_items": {}, + "message": "Cart is already locked", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "cart_empty": { + "summary": "Cart is empty", + "value": { + "error_code": "CART_VALIDATION_FAILED", + "failed_items": {}, + "message": "Cart is empty", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "items_unavailable": { + "summary": "Some items are no longer available", + "value": { + "cart": { + "address_1": null, + "address_2": null, + "address_3": null, + "address_4": null, + "cart_version": "550e8400-e29b-41d4-a716-446655440052", + "city": null, + "country": null, + "currency": "USD", + "email": null, + "given_name": null, + "is_locked": false, + "line_items": [ + { + "points": 24999, + "brand": "AudioTech", + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "AT-PH100", + "availability": "OUT_OF_STOCK", + "rank": 100, + "is_limited_stock": false, + "fulfillment_type": "SHIP", + "item_type_id": 200, + "brand_id": 123, + "retail_price": "349.99", + "original_points": 29999, + "is_primary": false, + "tag_ids": [ + 35 + ], + "line_item_id": "22687a62-27f9-4b60-9a8c-af394729d423", + "is_taxable": true, + "supplier_reference_id": "SUP-PH-100", + "catalog_item_id": 12345, + "original_price": "299.99", + "available": false, + "shipping_estimate": "7.99", + "price": "249.99", + "supplier_id": 1001, + "options": [], + "product_id": "PROD-12345", + "is_stock_reserved": false, + "images": [ + { + "alt": "Premium Headphones", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12345.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/12345.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/12345.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/12345.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/12345.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/12345.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/12345.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/12345.jpg" + } + } + ], + "stock_reserved_until": null, + "description": "High-quality wireless headphones", + "metadata": {}, + "is_explicit": false, + "is_available": false, + "errors": [ + "Item is no longer available in catalog" + ], + "product_options": {}, + "category_ids": [ + 10, + 25 + ], + "name": "Premium Headphones" + } + ], + "metadata": {}, + "phone_number": null, + "postal_code": null, + "state_or_region": null, + "surname": null, + "total": "249.99", + "total_line_items": 1, + "unique_item_count": 1 + }, + "error_code": "ITEMS_UNAVAILABLE", + "errors": [ + "Item 'Premium Headphones' is no longer available" + ], + "failed_items": { + "22687a62-27f9-4b60-9a8c-af394729d423": [ + "ITEM_UNAVAILABLE" + ] + }, + "message": "Some items in your cart are no longer available", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "missing_required_fields": { + "summary": "Missing required address fields", + "value": { + "cart": { + "address_1": null, + "address_2": null, + "address_3": null, + "address_4": null, + "cart_version": "550e8400-e29b-41d4-a716-446655440053", + "city": null, + "country": null, + "currency": "USD", + "email": null, + "given_name": "John", + "is_locked": false, + "line_items": [ + { + "points": 9999, + "brand": "Store Brand", + "required_fields": { + "address_1": false, + "address_2": false, + "address_3": false, + "address_4": false, + "city": false, + "country": false, + "email": true, + "given_name": true, + "phone_number": true, + "postal_code": false, + "state_or_region": false, + "surname": true + }, + "model": "GC-DIGITAL", + "availability": "IN_STOCK", + "rank": 200, + "is_limited_stock": false, + "fulfillment_type": "DIGITAL", + "item_type_id": 300, + "brand_id": 999, + "retail_price": "99.99", + "original_points": 9999, + "is_primary": false, + "tag_ids": [ + 50 + ], + "line_item_id": "44909c84-49fb-6d82-1cae-cf516951f645", + "is_taxable": false, + "supplier_reference_id": "SUP-GC-001", + "catalog_item_id": 11111, + "original_price": "99.99", + "available": true, + "shipping_estimate": "0.00", + "price": "99.99", + "supplier_id": 2000, + "options": [], + "product_id": "gift-card-001", + "is_stock_reserved": false, + "images": [ + { + "alt": "Gift Card", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/giftcard.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/giftcard.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/giftcard.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/giftcard.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/giftcard.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/giftcard.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/giftcard.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/giftcard.jpg" + } + } + ], + "stock_reserved_until": null, + "description": "Digital gift card for catalog purchases", + "metadata": {}, + "is_explicit": false, + "is_available": true, + "errors": [ + "Missing required address fields: email, phone_number" + ], + "product_options": {}, + "category_ids": [ + 100 + ], + "name": "Gift Card" + } + ], + "metadata": {}, + "phone_number": null, + "postal_code": null, + "state_or_region": null, + "surname": "Doe", + "total": "99.99", + "total_line_items": 1, + "unique_item_count": 1 + }, + "error_code": "CART_VALIDATION_FAILED", + "errors": [ + "Cart validation failed. Missing required address fields: email, phone_number" + ], + "failed_items": { + "44909c84-49fb-6d82-1cae-cf516951f645": [ + "MISSING_REQUIRED_ADDRESS_FIELDS" + ] + }, + "message": "Cart validation failed. Missing required address fields: email, phone_number", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "price_mismatch": { + "summary": "Price has increased since item was added", + "value": { + "cart": { + "address_1": null, + "address_2": null, + "address_3": null, + "address_4": null, + "cart_version": "550e8400-e29b-41d4-a716-446655440052", + "city": null, + "country": null, + "currency": "USD", + "email": null, + "given_name": null, + "is_locked": false, + "line_items": [ + { + "points": 24999, + "brand": "AudioPro", + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "AP-WH-PREMIUM", + "availability": "IN_STOCK", + "rank": 100, + "is_limited_stock": false, + "fulfillment_type": "SHIP", + "item_type_id": 200, + "brand_id": 456, + "retail_price": "349.99", + "original_points": 29999, + "is_primary": false, + "tag_ids": [ + 35, + 78 + ], + "line_item_id": "22687a62-27f9-4b60-9a8c-af394729d423", + "is_taxable": true, + "supplier_reference_id": "SUP-AP-PREMIUM", + "catalog_item_id": 12345, + "original_price": "299.99", + "available": true, + "shipping_estimate": "7.99", + "price": "249.99", + "supplier_id": 1001, + "options": [], + "product_id": "premium-headphones-001", + "is_stock_reserved": false, + "images": [ + { + "alt": "Premium Wireless Headphones", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12345.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/12345.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/12345.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/12345.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/12345.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/12345.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/12345.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/12345.jpg" + } + } + ], + "stock_reserved_until": null, + "description": "High-end noise-canceling wireless headphones", + "metadata": {}, + "is_explicit": false, + "is_available": true, + "errors": [ + "Price has increased from 249.99 to 299.99" + ], + "product_options": {}, + "category_ids": [ + 10, + 25 + ], + "name": "Premium Wireless Headphones" + } + ], + "metadata": {}, + "phone_number": null, + "postal_code": null, + "state_or_region": null, + "surname": null, + "total": "249.99", + "total_line_items": 1, + "unique_item_count": 1 + }, + "error_code": "CART_VALIDATION_FAILED", + "errors": [ + "Cart validation failed. Item validation errors: Price has increased from 249.99 to 299.99" + ], + "failed_items": { + "22687a62-27f9-4b60-9a8c-af394729d423": [ + "PRICE_CHANGED" + ] + }, + "message": "Cart validation failed. Item validation errors: Price has increased from 249.99 to 299.99", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + }, + "stock_reservation_expired": { + "summary": "Stock reservation has expired", + "value": { + "cart": { + "address_1": null, + "address_2": null, + "address_3": null, + "address_4": null, + "cart_version": "550e8400-e29b-41d4-a716-446655440054", + "city": null, + "country": null, + "currency": "USD", + "email": null, + "given_name": null, + "is_locked": false, + "line_items": [ + { + "points": 199999, + "brand": "GameTech", + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "model": "GT-CONSOLE-LE", + "availability": "OUT_OF_STOCK", + "rank": 50, + "is_limited_stock": true, + "fulfillment_type": "SHIP", + "item_type_id": 150, + "brand_id": 777, + "retail_price": "2199.99", + "original_points": 199999, + "is_primary": false, + "tag_ids": [ + 15, + 90 + ], + "line_item_id": "55abc733-28fb-7d91-2dbe-df617062f756", + "is_taxable": true, + "supplier_reference_id": "SUP-GT-CONSOLE", + "catalog_item_id": 88888, + "original_price": "1999.99", + "available": false, + "shipping_estimate": "19.99", + "price": "1999.99", + "supplier_id": 3000, + "options": [], + "product_id": "gaming-console-limited", + "is_stock_reserved": false, + "images": [ + { + "alt": "Limited Edition Gaming Console", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/console.jpg", + "image_150_3_2": "https://cdn.example.com/img/150c/console.jpg", + "image_300_1_1": "https://cdn.example.com/img/300/console.jpg", + "image_300_3_2": "https://cdn.example.com/img/300c/console.jpg", + "image_500_1_1": "https://cdn.example.com/img/500/console.jpg", + "image_500_3_2": "https://cdn.example.com/img/500c/console.jpg", + "image_75_1_1": "https://cdn.example.com/img/75/console.jpg", + "image_75_3_2": "https://cdn.example.com/img/75c/console.jpg" + } + } + ], + "stock_reserved_until": null, + "description": "Limited edition gaming console with exclusive features", + "metadata": {}, + "is_explicit": false, + "is_available": false, + "errors": [ + "Stock reservation has expired" + ], + "product_options": {}, + "category_ids": [ + 50, + 75 + ], + "name": "Limited Edition Gaming Console" + } + ], + "metadata": {}, + "phone_number": null, + "postal_code": null, + "state_or_region": null, + "surname": null, + "total": "1999.99", + "total_line_items": 1, + "unique_item_count": 1 + }, + "error_code": "STOCK_RESERVATIONS_EXPIRED", + "errors": [ + "Cart validation failed. Item validation errors: Stock reservation has expired" + ], + "failed_items": { + "55abc733-28fb-7d91-2dbe-df617062f756": [ + "RESERVATION_EXPIRED" + ] + }, + "message": "Cart validation failed. Item validation errors: Stock reservation has expired", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ValidationErrorResponse" + } + } + }, + "description": "Validation failed" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "NOT_FOUND", + "message": "The requested resource was not found.", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/NotFoundErrorResponse" + } + } + }, + "description": "Socket or cart not found" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Validate cart for checkout", + "tags": [ + "Cart" + ] + } + }, + "/sockets/{socket_id}/categories": { + "get": { + "callbacks": {}, + "description": "Retrieves the complete hierarchical category structure for the catalog\nincluding item counts for each category. Categories are organized\nin a tree structure with parent-child relationships.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.SocketsController.categories", + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "empty_categories": { + "description": "Catalog with no categories configured", + "summary": "No categories", + "value": { + "categories": [], + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z", + "total_categories": 0 + } + }, + "flat_categories": { + "description": "Simple catalog with no subcategories", + "summary": "Single-level categories", + "value": { + "categories": [ + { + "categories": [], + "category_id": 100, + "display_name": "Gift Cards", + "is_root": true, + "num_items": 25, + "parent_id": null + }, + { + "categories": [], + "category_id": 200, + "display_name": "Merchandise", + "is_root": true, + "num_items": 150, + "parent_id": null + }, + { + "categories": [], + "category_id": 300, + "display_name": "Experiences", + "is_root": true, + "num_items": 45, + "parent_id": null + }, + { + "categories": [], + "category_id": 400, + "display_name": "Digital Products", + "is_root": true, + "num_items": 30, + "parent_id": null + } + ], + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z", + "total_categories": 4 + } + }, + "hierarchical_categories": { + "description": "Categories with nested subcategories", + "summary": "Multi-level category tree", + "value": { + "categories": [ + { + "categories": [ + { + "categories": [ + { + "categories": [], + "category_id": 1011, + "display_name": "Shirts", + "is_root": false, + "num_items": 80, + "parent_id": 101 + }, + { + "categories": [], + "category_id": 1012, + "display_name": "Pants", + "is_root": false, + "num_items": 60, + "parent_id": 101 + } + ], + "category_id": 101, + "display_name": "Men's Clothing", + "is_root": false, + "num_items": 200, + "parent_id": 100 + }, + { + "categories": [], + "category_id": 102, + "display_name": "Women's Clothing", + "is_root": false, + "num_items": 250, + "parent_id": 100 + } + ], + "category_id": 100, + "display_name": "Apparel", + "is_root": true, + "num_items": 450, + "parent_id": null + }, + { + "categories": [], + "category_id": 200, + "display_name": "Electronics", + "is_root": true, + "num_items": 320, + "parent_id": null + } + ], + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z", + "total_categories": 8 + } + } + }, + "schema": { + "$ref": "#/components/schemas/CategoriesResponse" + } + } + }, + "description": "Categories retrieved successfully" + }, + "404": { + "content": { + "application/json": { + "examples": { + "not_found": { + "summary": "Socket doesn't exist", + "value": { + "error_code": "NOT_FOUND", + "message": "The requested resource was not found.", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Socket not found" + }, + "503": { + "content": { + "application/json": { + "examples": { + "service_down": { + "summary": "Solr service unavailable", + "value": { + "error_code": "SERVICE_UNAVAILABLE", + "message": "Search service unavailable", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Search service unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get catalog categories", + "tags": [ + "Catalog" + ] + }, + "parameters": [ + { + "description": "The catalog socket to query", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + } + ] + }, + "/sockets/{socket_id}/categories/tag/{tag_id}": { + "get": { + "callbacks": {}, + "description": "Retrieves the hierarchical category structure filtered by a specific tag.\nThis endpoint uses pre-calculated tag trees to show only categories that\ncontain items with the specified tag, maintaining the hierarchical structure.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.SocketsController.categories_by_tag", + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "clearance_tag_categories": { + "description": "Only categories containing clearance items", + "summary": "Categories with Clearance items", + "value": { + "categories": [ + { + "categories": [], + "category_id": 100, + "display_name": "Apparel", + "is_root": true, + "num_items": 12, + "parent_id": null + }, + { + "categories": [], + "category_id": 300, + "display_name": "Home & Garden", + "is_root": true, + "num_items": 8, + "parent_id": null + } + ], + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z", + "total_categories": 2 + } + }, + "no_matching_categories": { + "description": "Tag exists but no categories contain items with this tag", + "summary": "No categories for tag", + "value": { + "categories": [], + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z", + "total_categories": 0 + } + }, + "sale_tag_categories": { + "description": "Categories filtered to show only those containing items with the Sale tag", + "summary": "Categories with Sale items", + "value": { + "categories": [ + { + "categories": [ + { + "categories": [], + "category_id": 101, + "display_name": "Men's Clothing", + "is_root": false, + "num_items": 30, + "parent_id": 100 + } + ], + "category_id": 100, + "display_name": "Apparel", + "is_root": true, + "num_items": 45, + "parent_id": null + }, + { + "categories": [], + "category_id": 200, + "display_name": "Electronics", + "is_root": true, + "num_items": 15, + "parent_id": null + } + ], + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z", + "total_categories": 4 + } + } + }, + "schema": { + "$ref": "#/components/schemas/CategoriesResponse" + } + } + }, + "description": "Tag-filtered categories retrieved successfully" + }, + "404": { + "content": { + "application/json": { + "examples": { + "socket_not_found": { + "summary": "Socket doesn't exist", + "value": { + "error_code": "NOT_FOUND", + "message": "The requested resource was not found.", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + }, + "tag_not_found": { + "summary": "Tag doesn't exist", + "value": { + "error_code": "NOT_FOUND", + "message": "Tag not found or no categories for this tag", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Socket or tag not found" + }, + "503": { + "content": { + "application/json": { + "examples": { + "service_down": { + "summary": "Solr service unavailable", + "value": { + "error_code": "SERVICE_UNAVAILABLE", + "message": "Search service unavailable", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Search service unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get catalog categories filtered by tag", + "tags": [ + "Catalog" + ] + }, + "parameters": [ + { + "description": "The catalog socket to query", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The tag ID to filter categories by", + "in": "path", + "name": "tag_id", + "required": true, + "schema": { + "type": "integer" + } + } + ] + }, + "/sockets/{socket_id}/item_types": { + "get": { + "callbacks": {}, + "description": "Retrieves all item types available in the catalog with\nitem counts. Item types classify products into categories\nlike 'Apparel', 'Electronics', etc.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.SocketsController.item_types", + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "empty_item_types": { + "description": "Response when catalog has no item type classifications", + "summary": "No item types defined", + "value": { + "item_types": [], + "success": true, + "timestamp": "2025-08-08T10:45:20.789Z", + "total_item_types": 0 + } + }, + "merch_only": { + "description": "Catalog without gift cards", + "summary": "Merchandise-only catalog", + "value": { + "item_types": [ + { + "item_count": 123, + "item_type_id": 1, + "name": "Generic" + }, + { + "item_count": 789, + "item_type_id": 100, + "name": "General Merchandise" + } + ], + "success": true, + "timestamp": "2025-08-08T10:45:20.789Z", + "total_item_types": 2 + } + }, + "standard_types": { + "description": "Typical response with general merchandise and gift cards", + "summary": "Standard catalog item types", + "value": { + "item_types": [ + { + "item_count": 234, + "item_type_id": 1, + "name": "Generic" + }, + { + "item_count": 567, + "item_type_id": 100, + "name": "General Merchandise" + }, + { + "item_count": 45, + "item_type_id": 200, + "name": "Gift Card" + } + ], + "success": true, + "timestamp": "2025-08-08T10:45:20.789Z", + "total_item_types": 3 + } + } + }, + "schema": { + "$ref": "#/components/schemas/ItemTypesResponse" + } + } + }, + "description": "Item types retrieved successfully" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "SOCKET_NOT_FOUND", + "message": "Socket with ID 999 not found for this customer", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Socket not found" + }, + "503": { + "content": { + "application/json": { + "example": { + "error_code": "SERVICE_UNAVAILABLE", + "message": "Search service is temporarily unavailable", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Search service unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get catalog item types", + "tags": [ + "Catalog" + ] + }, + "parameters": [ + { + "description": "The catalog socket to query", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + } + ] + }, + "/sockets/{socket_id}/items": { + "get": { + "callbacks": {}, + "description": "Search for catalog items within a specific socket with filtering,\nsorting, and pagination options. Supports full-text search,\ncategory filtering, brand filtering, and price range filtering.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.SocketsController.items", + "parameters": [ + { + "description": "Search query for item names and descriptions", + "in": "query", + "name": "search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Filter by category ID", + "in": "query", + "name": "category_id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Filter by brand name", + "in": "query", + "name": "brand", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Filter by brand ID", + "in": "query", + "name": "brand_id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Filter by multiple brand IDs", + "in": "query", + "name": "brand_ids", + "required": false, + "schema": { + "items": { + "type": "integer" + }, + "type": "array" + } + }, + { + "description": "Filter by multiple item IDs", + "in": "query", + "name": "item_ids", + "required": false, + "schema": { + "items": { + "type": "integer" + }, + "type": "array" + } + }, + { + "description": "Filter by tag ID", + "in": "query", + "name": "tag_id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Filter by item type ID", + "in": "query", + "name": "item_type_id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Filter by fulfillment type", + "in": "query", + "name": "fulfillment_type", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Filter by primary items only", + "in": "query", + "name": "is_primary", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "description": "Minimum price filter", + "in": "query", + "name": "min_price", + "required": false, + "schema": { + "format": "decimal", + "type": "string" + } + }, + { + "description": "Maximum price filter", + "in": "query", + "name": "max_price", + "required": false, + "schema": { + "format": "decimal", + "type": "string" + } + }, + { + "description": "Minimum points filter", + "in": "query", + "name": "min_points", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Maximum points filter", + "in": "query", + "name": "max_points", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Page number for pagination", + "in": "query", + "name": "page", + "required": false, + "schema": { + "default": 1, + "description": "Page number for pagination (1-based)", + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Number of items per page (default: 25, max: 100)", + "in": "query", + "name": "per_page", + "required": false, + "schema": { + "default": 25, + "description": "Number of results per page (1-100)", + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Sort order (default: 'rank asc')", + "in": "query", + "name": "sort", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Include brand facets (top/full)", + "in": "query", + "name": "brand_faceting", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Include tag facets (top/full)", + "in": "query", + "name": "tag_faceting", + "required": false, + "schema": { + "type": "string" + } + }, + { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "description": "Filter DSL for complex queries. Pass as JSON-encoded string.", + "in": "query", + "name": "filter", + "required": false + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "empty_results": { + "description": "Search returned no matching items", + "summary": "No items found", + "value": { + "items": [], + "page": 1, + "per_page": 25, + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z", + "total_count": 0 + } + }, + "search_results": { + "description": "Typical search response with pagination and items", + "summary": "Search results with multiple items", + "value": { + "items": [ + { + "availability": "in_stock", + "brand": "AudioTech", + "brand_id": 101, + "catalog_item_id": 12345, + "category_ids": [ + 5, + 12 + ], + "description": "High-quality noise-canceling headphones with 30-hour battery life", + "fulfillment_type": "direct", + "images": [ + { + "alt": "Premium Wireless Headphones", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12345", + "image_150_3_2": "https://cdn.example.com/img/150c/12345", + "image_300_1_1": "https://cdn.example.com/img/300/12345", + "image_300_3_2": "https://cdn.example.com/img/300c/12345", + "image_500_1_1": "https://cdn.example.com/img/500/12345", + "image_500_3_2": "https://cdn.example.com/img/500c/12345", + "image_75_1_1": "https://cdn.example.com/img/75/12345", + "image_75_3_2": "https://cdn.example.com/img/75c/12345" + } + } + ], + "is_available": true, + "is_explicit": false, + "is_limited_stock": false, + "is_primary": true, + "is_taxable": true, + "item_type_id": 200, + "model": "AT-WH1000", + "name": "Premium Wireless Headphones", + "original_points": 29999, + "original_price": "299.99", + "points": 24999, + "price": "249.99", + "product_id": "PROD-001", + "product_options": {}, + "rank": 300, + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "retail_price": "299.99", + "shipping_estimate": "5.99", + "supplier_id": 2001, + "supplier_reference_id": "SUP-AT-WH1000", + "tag_ids": [ + 1, + 3, + 7 + ], + "upc": "123456789012" + }, + { + "availability": "in_stock", + "brand": "AudioTech", + "brand_id": 101, + "catalog_item_id": 12346, + "category_ids": [ + 5, + 13 + ], + "description": "Portable waterproof speaker with 360-degree sound", + "fulfillment_type": "direct", + "images": [ + { + "alt": "Bluetooth Speaker - Action Image", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12346", + "image_150_3_2": "https://cdn.example.com/img/150c/12346", + "image_300_1_1": "https://cdn.example.com/img/300/12346", + "image_300_3_2": "https://cdn.example.com/img/300c/12346", + "image_500_1_1": "https://cdn.example.com/img/500/12346", + "image_500_3_2": "https://cdn.example.com/img/500c/12346", + "image_75_1_1": "https://cdn.example.com/img/75/12346", + "image_75_3_2": "https://cdn.example.com/img/75c/12346" + } + } + ], + "is_available": true, + "is_explicit": false, + "is_limited_stock": false, + "is_primary": true, + "is_taxable": true, + "item_type_id": 201, + "model": "AT-BS500", + "name": "Bluetooth Speaker", + "original_points": 14999, + "original_price": "149.99", + "points": 11999, + "price": "119.99", + "product_id": "PROD-002", + "product_options": {}, + "rank": 300, + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "retail_price": "149.99", + "shipping_estimate": "3.99", + "supplier_id": 2002, + "supplier_reference_id": "SUP-AT-BS500", + "tag_ids": [ + 1, + 8 + ] + } + ], + "page": 1, + "per_page": 25, + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z", + "total_count": 150 + } + }, + "search_with_facets": { + "description": "Search response including facet data for filtering", + "summary": "Search results with facets", + "value": { + "facets": [ + { + "count": 25, + "id": "101", + "name": "AudioTech", + "type": "brand" + }, + { + "count": 18, + "id": "102", + "name": "TechGear", + "type": "brand" + }, + { + "count": 45, + "id": "1", + "name": "Electronics", + "type": "tag" + }, + { + "count": 30, + "id": "15", + "name": "Gift Cards", + "type": "tag" + } + ], + "items": [ + { + "availability": "in_stock", + "brand": "AudioTech", + "brand_id": 101, + "catalog_item_id": 12345, + "category_ids": [ + 5, + 12 + ], + "description": "High-quality noise-canceling headphones with 30-hour battery life", + "fulfillment_type": "direct", + "images": [ + { + "alt": "Premium Wireless Headphones", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12345", + "image_150_3_2": "https://cdn.example.com/img/150c/12345", + "image_300_1_1": "https://cdn.example.com/img/300/12345", + "image_300_3_2": "https://cdn.example.com/img/300c/12345", + "image_500_1_1": "https://cdn.example.com/img/500/12345", + "image_500_3_2": "https://cdn.example.com/img/500c/12345", + "image_75_1_1": "https://cdn.example.com/img/75/12345", + "image_75_3_2": "https://cdn.example.com/img/75c/12345" + } + } + ], + "is_available": true, + "is_explicit": false, + "is_limited_stock": false, + "is_primary": true, + "is_taxable": true, + "item_type_id": 200, + "model": "AT-WH1000", + "name": "Premium Wireless Headphones", + "original_points": 29999, + "original_price": "299.99", + "points": 24999, + "price": "249.99", + "product_id": "PROD-001", + "product_options": {}, + "rank": 300, + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "retail_price": "299.99", + "shipping_estimate": "5.99", + "supplier_id": 2001, + "supplier_reference_id": "SUP-AT-WH1000", + "tag_ids": [ + 1, + 3, + 7 + ], + "upc": "123456789012" + } + ], + "page": 1, + "per_page": 25, + "success": true, + "timestamp": "2025-08-05T00:44:25.846238Z", + "total_count": 75 + } + } + }, + "schema": { + "$ref": "#/components/schemas/ItemsSearchResponse" + } + } + }, + "description": "Items search response" + }, + "404": { + "content": { + "application/json": { + "examples": { + "not_found": { + "summary": "Socket doesn't exist or not accessible", + "value": { + "error_code": "NOT_FOUND", + "message": "The requested resource was not found.", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Socket not found" + }, + "503": { + "content": { + "application/json": { + "examples": { + "service_unavailable": { + "summary": "Search service is down", + "value": { + "error_code": "SERVICE_UNAVAILABLE", + "message": "Search service unavailable", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Search service unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Search catalog items", + "tags": [ + "Catalog" + ] + }, + "parameters": [ + { + "description": "The catalog socket to search", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + } + ] + }, + "/sockets/{socket_id}/items/search": { + "parameters": [ + { + "description": "The catalog socket to search", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "post": { + "callbacks": {}, + "description": "Search for catalog items using a Filter DSL for complex boolean queries.\nThis endpoint accepts a JSON body with the filter parameter for advanced filtering.\n\n## Filter DSL\n\nThe filter parameter supports:\n- Comparison operators: eq, ne, in, not_in, gt, gte, lt, lte, between\n- Boolean operators: and, or (with nesting up to 5 levels)\n\n## Allowed Fields\n\n- brand_id, category_id, tag_id, item_type_id, catalog_item_id (integers)\n- fulfillment_type (string: \"physical\", \"digital\")\n- price (number), points (integer)\n\n## Example Filter\n\n```json\n{\n \"filter\": {\n \"and\": [\n {\"eq\": {\"category_id\": 10493}},\n {\"or\": [\n {\"eq\": {\"brand_id\": 5984}},\n {\"eq\": {\"brand_id\": 114}}\n ]},\n {\"between\": {\"price\": [50, 200]}}\n ]\n }\n}\n```\n", + "operationId": "CatalogAPIWeb.Api.Controllers.SocketsController.items_search", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ItemsSearchRequest" + } + } + }, + "description": "Items search request", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ItemsSearchResponse" + } + } + }, + "description": "Search results" + }, + "400": { + "content": { + "application/json": { + "examples": { + "invalid_field": { + "summary": "Invalid field in filter", + "value": { + "error_code": "INVALID_FILTER_FIELD", + "message": "Invalid field in filter", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + }, + "invalid_filter": { + "summary": "Invalid filter JSON", + "value": { + "error_code": "INVALID_FILTER_JSON", + "message": "Invalid filter JSON format", + "success": false, + "timestamp": "2025-08-05T00:44:25.846238Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Invalid filter" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Socket not found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Search service unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Search catalog items with Filter DSL", + "tags": [ + "Catalog" + ] + } + }, + "/sockets/{socket_id}/items/{catalog_item_id}": { + "get": { + "callbacks": {}, + "description": "Retrieves detailed information for a specific catalog item\nincluding full specifications, pricing, and availability information.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.SocketsController.item_details", + "parameters": [ + { + "description": "Include matched_entities with category, tag, and brand details for the item's IDs", + "in": "query", + "name": "matched_entities", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "gift_card_item": { + "description": "Digital gift card item details", + "summary": "Gift card item details", + "value": { + "catalog_item": { + "availability": "in_stock", + "brand": "Gift Card Express", + "brand_id": 301, + "catalog_item_id": 99001, + "category_ids": [ + 90 + ], + "description": "Digital gift card delivered via email", + "fulfillment_type": "digital", + "images": [ + { + "alt": "Gift Card", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/gc-100", + "image_150_3_2": "https://cdn.example.com/img/150c/gc-100", + "image_300_1_1": "https://cdn.example.com/img/300/gc-100", + "image_300_3_2": "https://cdn.example.com/img/300c/gc-100", + "image_500_1_1": "https://cdn.example.com/img/500/gc-100", + "image_500_3_2": "https://cdn.example.com/img/500c/gc-100", + "image_75_1_1": "https://cdn.example.com/img/75/gc-100", + "image_75_3_2": "https://cdn.example.com/img/75c/gc-100" + } + } + ], + "is_available": true, + "is_explicit": false, + "is_limited_stock": false, + "is_primary": true, + "is_taxable": false, + "item_type_id": 300, + "model": "GC-100", + "name": "Gift Card - $100", + "original_points": 10000, + "original_price": "100.00", + "points": 10000, + "price": "100.00", + "product_id": "GC-100", + "product_options": {}, + "rank": 100, + "required_fields": { + "address_1": false, + "address_2": false, + "address_3": false, + "address_4": false, + "city": false, + "country": false, + "email": true, + "given_name": true, + "phone_number": false, + "postal_code": false, + "state_or_region": false, + "surname": true + }, + "retail_price": "100.00", + "shipping_estimate": "0.00", + "supplier_id": 3001, + "supplier_reference_id": "GCE-100", + "tag_ids": [ + 15 + ], + "upc": null + }, + "success": true, + "timestamp": "2025-08-08T12:00:00.000Z" + } + }, + "item_details": { + "description": "Detailed information for a catalog item", + "summary": "Standard item details", + "value": { + "catalog_item": { + "availability": "in_stock", + "brand": "AudioTech", + "brand_id": 101, + "catalog_item_id": 12345, + "category_ids": [ + 5, + 12 + ], + "description": "High-quality noise-canceling headphones with 30-hour battery life", + "fulfillment_type": "direct", + "images": [ + { + "alt": "Premium Wireless Headphones", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12345", + "image_150_3_2": "https://cdn.example.com/img/150c/12345", + "image_300_1_1": "https://cdn.example.com/img/300/12345", + "image_300_3_2": "https://cdn.example.com/img/300c/12345", + "image_500_1_1": "https://cdn.example.com/img/500/12345", + "image_500_3_2": "https://cdn.example.com/img/500c/12345", + "image_75_1_1": "https://cdn.example.com/img/75/12345", + "image_75_3_2": "https://cdn.example.com/img/75c/12345" + } + } + ], + "is_available": true, + "is_explicit": false, + "is_limited_stock": false, + "is_primary": true, + "is_taxable": true, + "item_type_id": 200, + "model": "AT-WH1000", + "name": "Premium Wireless Headphones", + "original_points": 29999, + "original_price": "299.99", + "points": 24999, + "price": "249.99", + "product_id": "PROD-001", + "product_options": {}, + "rank": 300, + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "retail_price": "299.99", + "shipping_estimate": "5.99", + "supplier_id": 2001, + "supplier_reference_id": "SUP-AT-WH1000", + "tag_ids": [ + 1, + 3, + 7 + ], + "upc": "123456789012" + }, + "success": true, + "timestamp": "2025-08-08T12:00:00.000Z" + } + }, + "unavailable_item": { + "description": "Item currently unavailable", + "summary": "Out of stock item", + "value": { + "catalog_item": { + "availability": "out_of_stock", + "brand": "AudioTech", + "brand_id": 101, + "catalog_item_id": 12346, + "category_ids": [ + 5, + 13 + ], + "description": "Portable waterproof speaker with 360-degree sound", + "fulfillment_type": "direct", + "images": [ + { + "alt": "Bluetooth Speaker", + "is_primary": true, + "order": 1, + "urls": { + "image_150_1_1": "https://cdn.example.com/img/150/12346", + "image_150_3_2": "https://cdn.example.com/img/150c/12346", + "image_300_1_1": "https://cdn.example.com/img/300/12346", + "image_300_3_2": "https://cdn.example.com/img/300c/12346", + "image_500_1_1": "https://cdn.example.com/img/500/12346", + "image_500_3_2": "https://cdn.example.com/img/500c/12346", + "image_75_1_1": "https://cdn.example.com/img/75/12346", + "image_75_3_2": "https://cdn.example.com/img/75c/12346" + } + } + ], + "is_available": false, + "is_explicit": false, + "is_limited_stock": true, + "is_primary": true, + "is_taxable": true, + "item_type_id": 201, + "model": "AT-BS500", + "name": "Bluetooth Speaker", + "original_points": 14999, + "original_price": "149.99", + "points": 11999, + "price": "119.99", + "product_id": "PROD-002", + "product_options": {}, + "rank": 300, + "required_fields": { + "address_1": true, + "address_2": false, + "address_3": false, + "address_4": false, + "city": true, + "country": true, + "email": false, + "given_name": true, + "phone_number": false, + "postal_code": true, + "state_or_region": true, + "surname": true + }, + "retail_price": "149.99", + "shipping_estimate": "3.99", + "supplier_id": 2002, + "supplier_reference_id": "SUP-AT-BS500", + "tag_ids": [ + 1, + 8 + ] + }, + "success": true, + "timestamp": "2025-08-08T12:00:00.000Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/ItemDetailsResponse" + } + } + }, + "description": "Item details retrieved successfully" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "ITEM_NOT_FOUND", + "message": "Item with ID 99999 not found in socket 1", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Item not found" + }, + "503": { + "content": { + "application/json": { + "example": { + "error_code": "SERVICE_UNAVAILABLE", + "message": "Search service is temporarily unavailable", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Search service unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get catalog item details", + "tags": [ + "Catalog" + ] + }, + "parameters": [ + { + "description": "The catalog socket to query", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The catalog item ID to retrieve", + "in": "path", + "name": "catalog_item_id", + "required": true, + "schema": { + "type": "integer" + } + } + ] + }, + "/sockets/{socket_id}/items/{catalog_item_id}/stock": { + "get": { + "callbacks": {}, + "description": "Retrieves current stock availability information for a specific\ncatalog item. This endpoint requires webhook configuration for\nreal-time stock updates.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.SocketsController.item_stock", + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "in_stock": { + "description": "Item is available with known quantity", + "summary": "Item in stock", + "value": { + "stock": { + "available": true, + "catalog_item_id": "12345", + "estimated_ship_date": null, + "last_updated": "2025-08-08T10:45:00.000Z", + "quantity_available": 157 + }, + "success": true, + "timestamp": "2025-08-08T11:00:00.123Z" + } + }, + "low_stock": { + "description": "Item has limited quantity remaining", + "summary": "Low stock warning", + "value": { + "stock": { + "available": true, + "catalog_item_id": "12346", + "estimated_ship_date": null, + "last_updated": "2025-08-08T10:30:00.000Z", + "quantity_available": 3 + }, + "success": true, + "timestamp": "2025-08-08T11:00:00.123Z" + } + }, + "out_of_stock": { + "description": "Item currently unavailable but may be restocked", + "summary": "Out of stock", + "value": { + "stock": { + "available": false, + "catalog_item_id": "12347", + "estimated_ship_date": "2025-08-15", + "last_updated": "2025-08-08T09:15:00.000Z", + "quantity_available": 0 + }, + "success": true, + "timestamp": "2025-08-08T11:00:00.123Z" + } + }, + "unlimited_stock": { + "description": "Digital or non-limited item always available", + "summary": "Unlimited stock item", + "value": { + "stock": { + "available": true, + "catalog_item_id": "GC-100", + "estimated_ship_date": null, + "last_updated": "2025-08-08T00:00:00.000Z", + "quantity_available": null + }, + "success": true, + "timestamp": "2025-08-08T11:00:00.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/StockResponse" + } + } + }, + "description": "Stock information retrieved successfully" + }, + "400": { + "content": { + "application/json": { + "example": { + "error_code": "INVALID_ITEM_TYPE", + "message": "Stock checks only apply to limited stock items", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Invalid request" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "ITEM_NOT_FOUND", + "message": "Item not found", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Item not found" + }, + "503": { + "content": { + "application/json": { + "example": { + "error_code": "SERVICE_UNAVAILABLE", + "message": "Stock check not available for this item", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Stock service unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get item stock status", + "tags": [ + "Catalog" + ] + }, + "parameters": [ + { + "description": "The catalog socket to query", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The catalog item ID to check", + "in": "path", + "name": "catalog_item_id", + "required": true, + "schema": { + "type": "integer" + } + } + ] + }, + "/sockets/{socket_id}/marketing": { + "get": { + "callbacks": {}, + "description": "Retrieves featured marketing content and promotional items\nfor the catalog. This endpoint returns specially curated\nitems for marketing and promotional purposes.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.SocketsController.marketing", + "parameters": [ + { + "description": "Filter marketing by category ID", + "in": "query", + "name": "category_id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Filter marketing by brand ID", + "in": "query", + "name": "brand_id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Filter marketing by tag ID", + "in": "query", + "name": "tag_id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Get marketing for specific item", + "in": "query", + "name": "item_id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Custom marketing key", + "in": "query", + "name": "key", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "category_marketing": { + "description": "Marketing blocks for a specific category page", + "summary": "Category-specific marketing", + "value": { + "blocks": [ + { + "copy": "Electronics Deals - Limited Time", + "image": "https://cdn.example.com/banners/electronics-deals.jpg", + "type": "banner", + "uri": "/search?category=electronics&tag=sale" + }, + { + "carousel": "1", + "items": [ + 20001, + 20002, + 20003, + 20004 + ], + "limit": 4, + "title": "Top Rated Electronics", + "type": "item_list" + } + ], + "load_items": [ + 20001, + 20002, + 20003, + 20004 + ], + "success": true, + "timestamp": "2025-08-08T11:15:00.000Z" + } + }, + "empty_marketing": { + "description": "Response when no marketing content is configured", + "summary": "No marketing content", + "value": { + "blocks": [], + "load_items": [], + "success": true, + "timestamp": "2025-08-08T11:15:00.000Z" + } + }, + "homepage_marketing": { + "description": "Typical homepage with banners and featured items", + "summary": "Homepage marketing blocks", + "value": { + "blocks": [ + { + "copy": "Summer Sale - Save up to 40%!", + "image": "https://cdn.example.com/banners/summer-sale-2025.jpg", + "type": "banner", + "uri": "/search?tag=summer-sale" + }, + { + "carousel": "1", + "items": [ + 12345, + 12346, + 12347, + 12348, + 12349, + 12350 + ], + "limit": 6, + "title": "Best Sellers", + "type": "item_list" + }, + { + "copy": "New Arrivals - Shop the Latest", + "image": "https://cdn.example.com/banners/new-arrivals.jpg", + "type": "banner", + "uri": "/search?tag=new" + }, + { + "carousel": "0", + "items": [ + 12351, + 12352, + 12353, + 12354 + ], + "limit": 4, + "title": "Trending Now", + "type": "item_list" + } + ], + "load_items": [ + 12345, + 12346, + 12347, + 12348, + 12349, + 12350, + 12351, + 12352, + 12353, + 12354 + ], + "success": true, + "timestamp": "2025-08-08T11:15:00.000Z" + } + }, + "minimal_marketing": { + "description": "Simple marketing with single banner", + "summary": "Minimal marketing content", + "value": { + "blocks": [ + { + "copy": "Welcome to Our Store", + "image": "https://cdn.example.com/banners/welcome.jpg", + "type": "banner", + "uri": "/browse" + } + ], + "load_items": [], + "success": true, + "timestamp": "2025-08-08T11:15:00.000Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/CatalogMarketingResponse" + } + } + }, + "description": "Marketing content retrieved successfully" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "SOCKET_NOT_FOUND", + "message": "Socket with ID 999 not found for this customer", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Socket not found" + }, + "503": { + "content": { + "application/json": { + "example": { + "error_code": "SERVICE_UNAVAILABLE", + "message": "Marketing service is temporarily unavailable", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Marketing service unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get marketing content", + "tags": [ + "Catalog" + ] + }, + "parameters": [ + { + "description": "The catalog socket to query", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + } + ] + }, + "/sockets/{socket_id}/orders/place_direct": { + "parameters": [ + { + "description": "Socket identifier", + "example": 10001, + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "post": { + "callbacks": {}, + "description": "Places an order directly in a single API call without managing cart state.\n\nThis endpoint allows you to submit an entire order including items, shipping\naddress, and payment details. The order is validated and placed immediately\nwithout creating or maintaining a cart session.\n\nInstead of implementing each cart step, the call will: \n\n1. Validate all items are available in the catalog\n2. Validate shipping address requirements\n3. Create and submit the order\n\n**Important notes:**\n- All items must be available at order placement time\n- Physical items require complete shipping address\n- Digital items may only require email and name\n- Returns same response format as cart-based ordering\n", + "operationId": "CatalogAPIWeb.Api.Controllers.OrderController.place_direct_order", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DirectOrderRequest" + } + } + }, + "description": "Direct order request", + "required": false + }, + "responses": { + "201": { + "content": { + "application/json": { + "examples": { + "successful_order": { + "summary": "Order successfully placed", + "value": { + "external_order_id": "ORDER-2025-001", + "order_number": "C234-56789-ABCDE-0001", + "timestamp": "2025-01-15T14:30:45.123Z" + } + } + }, + "schema": { + "properties": { + "external_order_id": { + "description": "Client-provided order ID for external system integration", + "type": "string" + }, + "order_number": { + "description": "System-generated unique order ID for tracking", + "type": "string" + }, + "timestamp": { + "description": "ISO 8601 timestamp when order was placed", + "format": "date-time", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Order placed successfully" + }, + "400": { + "content": { + "application/json": { + "examples": { + "invalid_decimal_format": { + "summary": "Invalid decimal format in payment fields", + "value": { + "error_code": "PAYMENT_VALIDATION_FAILED", + "errors": [ + { + "error_reason": "INVALID_DECIMAL_FORMAT", + "field": "price_paid", + "line_item_id": "550e8400-e29b-41d4-a716-446655440001" + } + ], + "message": "Payment validation failed", + "success": false, + "timestamp": "2025-01-15T14:30:45.123Z" + } + }, + "items_unavailable": { + "summary": "Items no longer available", + "value": { + "error_code": "ITEMS_UNAVAILABLE", + "message": "One or more items are not available", + "success": false, + "timestamp": "2025-01-15T14:30:45.123Z", + "unavailable_items": [ + 12345, + 12346 + ] + } + }, + "missing_payments": { + "summary": "Missing payment information", + "value": { + "error_code": "MISSING_PAYMENTS", + "errors": [ + "All items must have corresponding payment information" + ], + "message": "Payment information required for all items", + "success": false, + "timestamp": "2025-01-15T14:30:45.123Z" + } + }, + "payment_validation_failed": { + "summary": "Payment validation failed", + "value": { + "error_code": "PAYMENT_VALIDATION_FAILED", + "errors": [ + { + "catalog_item_id": 12345, + "error_reason": "INSUFFICIENT_PAYMENT" + } + ], + "message": "Payment validation failed", + "success": false, + "timestamp": "2025-01-15T14:30:45.123Z" + } + }, + "required_fields_missing": { + "summary": "Required address fields missing", + "value": { + "error_code": "REQUIRED_FIELDS_MISSING", + "message": "Required fields missing: address_1, city, postal_code", + "missing_fields": [ + "address_1", + "city", + "postal_code" + ], + "success": false, + "timestamp": "2025-01-15T14:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/OrderPlacementErrorResponse" + } + } + }, + "description": "Order placement failed - validation errors" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "SOCKET_NOT_FOUND", + "message": "Socket not found", + "success": false, + "timestamp": "2025-01-15T14:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Socket not found" + }, + "409": { + "content": { + "application/json": { + "example": { + "error_code": "DUPLICATE_ORDER", + "message": "Order with this external_order_id already exists", + "success": false, + "timestamp": "2025-01-15T14:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ConflictErrorResponse" + } + } + }, + "description": "Duplicate order" + }, + "422": { + "content": { + "application/json": { + "examples": { + "invalid_items": { + "summary": "Invalid catalog items", + "value": { + "error_code": "VALIDATION_FAILED", + "errors": [ + "Catalog item 99999 not found" + ], + "message": "Invalid catalog items", + "success": false, + "timestamp": "2025-01-15T14:30:45.123Z" + } + } + }, + "schema": { + "$ref": "#/components/schemas/UnprocessableEntityErrorResponse" + } + } + }, + "description": "Validation failed" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Place order directly without cart", + "tags": [ + "Order" + ] + } + }, + "/sockets/{socket_id}/tags": { + "get": { + "callbacks": {}, + "description": "Retrieves a complete list of all tags available in the catalog along with\nthe number of items tagged with each tag. Useful for creating tag-based\nfiltering interfaces and tag cloud displays.\n", + "operationId": "CatalogAPIWeb.Api.Controllers.SocketsController.tags", + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "empty_tags": { + "description": "Response when catalog has no tags defined", + "summary": "No tags available", + "value": { + "success": true, + "tags": [], + "timestamp": "2025-08-08T10:30:15.456Z", + "total_tags": 0 + } + }, + "minimal_tags": { + "description": "Simple catalog with minimal tagging", + "summary": "Catalog with few tags", + "value": { + "success": true, + "tags": [ + { + "discount_percent": "0.00", + "display_name": "Featured", + "num_items": 450, + "tag_id": 1 + }, + { + "discount_percent": "5.00", + "display_name": "Special Offer", + "num_items": 125, + "tag_id": 2 + } + ], + "timestamp": "2025-08-08T10:30:15.456Z", + "total_tags": 2 + } + }, + "promotional_tags": { + "description": "Typical response with various discount and promotional tags", + "summary": "Multiple promotional tags", + "value": { + "success": true, + "tags": [ + { + "discount_percent": "0.00", + "display_name": "Sale", + "num_items": 245, + "tag_id": 1 + }, + { + "discount_percent": "0.00", + "display_name": "Clearance", + "num_items": 89, + "tag_id": 2 + }, + { + "discount_percent": "0.00", + "display_name": "New Arrival", + "num_items": 67, + "tag_id": 3 + }, + { + "discount_percent": "10.00", + "display_name": "10% Off", + "num_items": 125, + "tag_id": 10 + }, + { + "discount_percent": "20.00", + "display_name": "20% Off", + "num_items": 78, + "tag_id": 20 + }, + { + "discount_percent": "25.00", + "display_name": "25% Off - Limited Time", + "num_items": 45, + "tag_id": 25 + }, + { + "discount_percent": "0.00", + "display_name": "Best Seller", + "num_items": 34, + "tag_id": 100 + } + ], + "timestamp": "2025-08-08T10:30:15.456Z", + "total_tags": 7 + } + }, + "seasonal_tags": { + "description": "Tags for seasonal promotions and special events", + "summary": "Seasonal and event tags", + "value": { + "success": true, + "tags": [ + { + "discount_percent": "30.00", + "display_name": "Summer Sale", + "num_items": 156, + "tag_id": 201 + }, + { + "discount_percent": "15.00", + "display_name": "Back to School", + "num_items": 98, + "tag_id": 202 + }, + { + "discount_percent": "40.00", + "display_name": "Holiday Special", + "num_items": 234, + "tag_id": 203 + }, + { + "discount_percent": "50.00", + "display_name": "Black Friday Deal", + "num_items": 456, + "tag_id": 204 + }, + { + "discount_percent": "35.00", + "display_name": "Flash Sale", + "num_items": 67, + "tag_id": 205 + } + ], + "timestamp": "2025-08-08T10:30:15.456Z", + "total_tags": 5 + } + } + }, + "schema": { + "$ref": "#/components/schemas/TagBreakdownResponse" + } + } + }, + "description": "Tags retrieved successfully" + }, + "404": { + "content": { + "application/json": { + "example": { + "error_code": "SOCKET_NOT_FOUND", + "message": "Socket with ID 999 not found for this customer", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Socket not found" + }, + "503": { + "content": { + "application/json": { + "example": { + "error_code": "SERVICE_UNAVAILABLE", + "message": "Search service is temporarily unavailable", + "success": false, + "timestamp": "2023-12-01T15:30:45.123Z" + }, + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Search service unavailable" + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get all tags with item counts", + "tags": [ + "Catalog" + ] + }, + "parameters": [ + { + "description": "The catalog socket to query", + "in": "path", + "name": "socket_id", + "required": true, + "schema": { + "type": "integer" + } + } + ] + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "servers": [ + { + "description": "Production API - Live environment for production use", + "url": "https://api.catalogapi.com/api/v2", + "variables": {} + }, + { + "description": "Sandbox API - Test environment for development and testing", + "url": "https://api.catalogapi.com/sandbox/api/v2", + "variables": {} + } + ], + "tags": [ + { + "description": "Cart management operations", + "name": "Cart" + }, + { + "description": "Catalog browsing and search operations", + "name": "Catalog" + }, + { + "description": "Server checks", + "name": "Health" + }, + { + "description": "Order management operations", + "name": "Order" + } + ] +} \ No newline at end of file diff --git a/v2/postman/catalogapi.postman_collection.json b/v2/postman/catalogapi.postman_collection.json new file mode 100644 index 0000000..df7a621 --- /dev/null +++ b/v2/postman/catalogapi.postman_collection.json @@ -0,0 +1,9556 @@ +{ + "item": [ + { + "name": "Quickstart — Order Lifecycle", + "description": "End-to-end sandbox walkthrough: search -> add to cart -> set address -> validate -> place order -> track. Set `apiKey` and `socket_id` in the CatalogAPI Sandbox environment, then run the steps in order. Each step captures the IDs the next one needs.", + "item": [ + { + "name": "1. Search items", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const res = pm.response.json();", + "pm.test('search returned items', () => pm.expect(res.items.length).to.be.above(0));", + "const item = res.items[0];", + "pm.collectionVariables.set('catalog_item_id', item.catalog_item_id);", + "console.log('picked item', item.catalog_item_id, '-', item.name);" + ] + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"per_page\": 5\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/sockets/{{socket_id}}/items/search", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sockets", + "{{socket_id}}", + "items", + "search" + ] + } + } + }, + { + "name": "2. Add item to cart", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const cartObj = pm.response.json().cart;", + "pm.test('item is in the cart', () => pm.expect(cartObj.line_items.length).to.be.above(0));", + "const li = cartObj.line_items[0];", + "pm.collectionVariables.set('cart_version', cartObj.cart_version);", + "pm.collectionVariables.set('line_item_id', li.line_item_id);", + "pm.collectionVariables.set('line_item_price', li.price);", + "console.log('line_item', li.line_item_id, 'price', li.price, 'cart_version', cartObj.cart_version);" + ] + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"items\": [\n { \"catalog_item_id\": {{catalog_item_id}} }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/sockets/{{socket_id}}/cart/{{external_user_id}}", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sockets", + "{{socket_id}}", + "cart", + "{{external_user_id}}" + ] + } + } + }, + { + "name": "3. Set shipping address", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const cartObj = pm.response.json().cart;", + "pm.collectionVariables.set('cart_version', cartObj.cart_version);" + ] + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"given_name\": \"Ada\",\n \"surname\": \"Lovelace\",\n \"address_1\": \"1 Demo Street\",\n \"city\": \"Austin\",\n \"state_or_region\": \"TX\",\n \"postal_code\": \"78701\",\n \"country\": \"US\",\n \"email\": \"ada@example.com\",\n \"phone_number\": \"+15125550100\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/sockets/{{socket_id}}/cart/{{external_user_id}}/set_address", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sockets", + "{{socket_id}}", + "cart", + "{{external_user_id}}", + "set_address" + ] + } + } + }, + { + "name": "4. Validate & lock cart", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const cartObj = pm.response.json().cart;", + "pm.collectionVariables.set('cart_version', cartObj.cart_version);", + "pm.test('cart is locked for checkout', () => pm.expect(cartObj.is_locked).to.eql(true));" + ] + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"lock\": true\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/sockets/{{socket_id}}/cart/{{external_user_id}}/validate", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sockets", + "{{socket_id}}", + "cart", + "{{external_user_id}}", + "validate" + ] + } + } + }, + { + "name": "5. Place order", + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "pm.collectionVariables.set('external_order_id', 'qs-' + Date.now());" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test('order placed (201)', () => pm.response.to.have.status(201));", + "const res = pm.response.json();", + "pm.collectionVariables.set('external_order_id', res.external_order_id);", + "console.log('order', res.external_order_id, 'order_number', res.order_number);" + ] + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"cart_version\": \"{{cart_version}}\",\n \"external_order_id\": \"{{external_order_id}}\",\n \"line_item_payments\": [\n {\n \"line_item_id\": \"{{line_item_id}}\",\n \"price_paid\": \"{{line_item_price}}\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/sockets/{{socket_id}}/cart/{{external_user_id}}/order_place", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sockets", + "{{socket_id}}", + "cart", + "{{external_user_id}}", + "order_place" + ] + } + } + }, + { + "name": "6. Track order", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test('order is retrievable', () => pm.response.to.have.status(200));", + "const order = pm.response.json().order;", + "console.log('tracked order', JSON.stringify(order));" + ] + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/orders/{{external_order_id}}", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "orders", + "{{external_order_id}}" + ] + } + } + } + ] + }, + { + "name": "Cart", + "description": "Cart management operations", + "item": [ + { + "id": "e818e481-3390-45a5-b405-6b660e2ca192", + "name": "View cart contents", + "request": { + "name": "View cart contents", + "description": { + "content": "Retrieves the current contents of a user's cart.", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Include matched_entities with category, tag, and brand details for all items in the cart", + "type": "text/plain" + }, + "key": "matched_entities", + "value": "" + } + ], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "8fa383df-9f9e-4b43-9b87-9e54aa02b492", + "name": "Cart contents retrieved successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Include matched_entities with category, tag, and brand details for all items in the cart", + "type": "text/plain" + }, + "key": "matched_entities", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"cart\": {\n \"total\": \"\",\n \"currency\": \"\",\n \"cart_version\": \"\",\n \"line_items\": [\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n }\n ],\n \"total_line_items\": \"\",\n \"unique_item_count\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_locked\": \"\",\n \"total_points\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"matched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"tag\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "30b4bfb3-c5e7-4569-911e-b08d761386a3", + "name": "Socket or cart not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Include matched_entities with category, tag, and brand details for all items in the cart", + "type": "text/plain" + }, + "key": "matched_entities", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "cdda424c-21d0-44c9-b7a2-80a8b5db124d", + "name": "Add line items to cart", + "request": { + "name": "Add line items to cart", + "description": { + "content": "Adds one or more line items to the cart with a unique UUID. Each line item\nrepresents one unit of a product and can have its own metadata for\npersonalization, tracking, and downstream order processing.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"items\": [\n {\n \"catalog_item_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n }\n }\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "80bd52dd-1b78-42a3-b4b1-72ad6deb28b9", + "name": "Items added successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"items\": [\n {\n \"catalog_item_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n }\n }\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"cart\": {\n \"total\": \"\",\n \"currency\": \"\",\n \"cart_version\": \"\",\n \"line_items\": [\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n }\n ],\n \"total_line_items\": \"\",\n \"unique_item_count\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_locked\": \"\",\n \"total_points\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"matched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"tag\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "2ed45d7a-d539-40a8-aa0b-d2234c4393ba", + "name": "Invalid request", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"items\": [\n {\n \"catalog_item_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n }\n }\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Bad Request", + "code": 400, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "c3119b78-6b21-4732-9f01-b96408cc26d6", + "name": "Socket or item not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"items\": [\n {\n \"catalog_item_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n }\n }\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "b687ac8f-50f3-4cff-b71d-46762c80cbba", + "name": "Empty cart", + "request": { + "name": "Empty cart", + "description": { + "content": "Removes all items from the user's cart.", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "empty" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "1ea9ac3b-8299-4f8a-a59f-801fd9cbd320", + "name": "Cart emptied successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "empty" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"cart\": {\n \"total\": \"\",\n \"currency\": \"\",\n \"cart_version\": \"\",\n \"line_items\": [\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n }\n ],\n \"total_line_items\": \"\",\n \"unique_item_count\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_locked\": \"\",\n \"total_points\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"matched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"tag\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "5de755ad-05a7-436b-a6b1-6ed1f92a14f4", + "name": "Socket or cart not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "empty" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "59dafa27-5f99-460e-9ff7-44a0cf1a6fb0", + "name": "Remove line item from cart", + "request": { + "name": "Remove line item from cart", + "description": { + "content": "Removes a specific line item from the user's cart.", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "line_items", + ":line_item_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "line_item_id", + "disabled": false, + "description": { + "content": "(Required) Line item UUID", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "DELETE", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "ed190688-3acb-4ff9-9606-fabf469cd254", + "name": "Line item removed successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "line_items", + ":line_item_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) Line item UUID", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "line_item_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "DELETE", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"cart\": {\n \"total\": \"\",\n \"currency\": \"\",\n \"cart_version\": \"\",\n \"line_items\": [\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n }\n ],\n \"total_line_items\": \"\",\n \"unique_item_count\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_locked\": \"\",\n \"total_points\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"matched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"tag\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "7676f1d0-47d9-4d7c-8f89-a163621af0a7", + "name": "Socket, cart, or line item not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "line_items", + ":line_item_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) Line item UUID", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "line_item_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "DELETE", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "f0fb0a51-3ce9-4b5f-a44f-3ac6ed404af5", + "name": "Update line item metadata", + "request": { + "name": "Update line item metadata", + "description": { + "content": "Updates metadata for a specific line item in the cart. Metadata must be\na flat map with string keys and string values only. Useful for storing\npersonalization data, tracking information, or special instructions.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "line_items", + ":line_item_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "line_item_id", + "disabled": false, + "description": { + "content": "(Required) Line item UUID", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "bea78364-dd6d-4f7e-8b8b-30d8f776c58a", + "name": "Line item updated successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "line_items", + ":line_item_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) Line item UUID", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "line_item_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"cart\": {\n \"total\": \"\",\n \"currency\": \"\",\n \"cart_version\": \"\",\n \"line_items\": [\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n }\n ],\n \"total_line_items\": \"\",\n \"unique_item_count\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_locked\": \"\",\n \"total_points\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"matched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"tag\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "2cf4fec0-ec5c-471e-9a6b-71888487c8f2", + "name": "Invalid metadata format", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "line_items", + ":line_item_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) Line item UUID", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "line_item_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Bad Request", + "code": 400, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "fd19ef46-8589-42ff-8242-642a4ae25974", + "name": "Socket, cart, or line item not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "line_items", + ":line_item_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) Line item UUID", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "line_item_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "a4965baa-28df-47db-830d-14ca71666c63", + "name": "Cart is locked", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "line_items", + ":line_item_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) Line item UUID", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "line_item_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "9c900917-6f8c-4137-a0b5-3a2409e26f43", + "name": "Revalidate expired stock reservation for a specific line item", + "request": { + "name": "Revalidate expired stock reservation for a specific line item", + "description": { + "content": "Revalidates the stock reservation for a specific line item in the cart that has an expired reservation.\nThis allows users to refresh their stock hold for a single line item without having to remove and re-add it.\n\nIf the line item can be successfully revalidated, a new stock reservation expiration time is set.\nIf the line item can no longer be reserved due to insufficient stock, an error is returned.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "line_items", + ":line_item_id", + "revalidate_stock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket identifier for the catalog", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) External user identifier for the cart", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "line_item_id", + "disabled": false, + "description": { + "content": "(Required) Line item identifier to revalidate", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "f8a14fcc-7a7f-4728-9570-b0cc92428169", + "name": "Stock successfully revalidated", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "line_items", + ":line_item_id", + "revalidate_stock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier for the catalog", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier for the cart", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) Line item identifier to revalidate", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "line_item_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"line_item_id\": \"\",\n \"stock_reserved\": \"\",\n \"token\": \"\",\n \"reservation_expires_at\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "8be8041e-473f-4329-838c-1c273b6596c5", + "name": "Line item not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "line_items", + ":line_item_id", + "revalidate_stock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier for the catalog", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier for the cart", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) Line item identifier to revalidate", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "line_item_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "4a55f12d-14cb-443d-84c7-64209a5c2463", + "name": "Item out of stock", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "line_items", + ":line_item_id", + "revalidate_stock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier for the catalog", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier for the cart", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) Line item identifier to revalidate", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "line_item_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": {} + }, + "status": "Conflict", + "code": 409, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"error_code\": \"\",\n \"timestamp\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "af040f2d-f9a2-47c2-9f39-062383484899", + "name": "Get cart metadata", + "request": { + "name": "Get cart metadata", + "description": { + "content": "Retrieve the custom metadata associated with a cart. Metadata can be used to store\narbitrary key-value pairs for custom business logic or tracking purposes.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "metadata" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket/catalog identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "6480ab6a-105f-4f69-bd7b-bd74c2341764", + "name": "Cart metadata retrieved successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "metadata" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket/catalog identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"cart_version\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "94d196c3-392f-4a0f-af29-6e8c80b24154", + "name": "Unauthorized - Invalid or missing authentication", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "metadata" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket/catalog identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "75582129-0a27-4970-9ef6-91d1d33ef219", + "name": "Forbidden", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "metadata" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket/catalog identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "7a59dd57-a821-4394-90df-db5a521cb4e8", + "name": "Socket or cart not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "metadata" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket/catalog identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "5642671b-56c4-4b4b-a757-0f9ec3a6dc1c", + "name": "Update cart metadata", + "request": { + "name": "Update cart metadata", + "description": { + "content": "Sets or replaces the metadata for the cart. Creates the cart if it doesn't exist.\nMetadata must be a flat map with string keys and string values only.\nPassing an empty object clears all metadata.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "metadata" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket/catalog identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\",\n \"key_3\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "d3d0b356-a67f-4c46-a905-b4665e4a4be1", + "name": "Metadata updated successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "metadata" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket/catalog identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\",\n \"key_3\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"cart\": {\n \"total\": \"\",\n \"currency\": \"\",\n \"cart_version\": \"\",\n \"line_items\": [\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n }\n ],\n \"total_line_items\": \"\",\n \"unique_item_count\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_locked\": \"\",\n \"total_points\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"matched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"tag\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "06758a7f-3e91-4012-9e85-5b9a25627b46", + "name": "Invalid metadata or cart is locked", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "metadata" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket/catalog identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\",\n \"key_3\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Bad Request", + "code": 400, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "392f395f-b756-4039-9305-f402590f18ca", + "name": "Socket not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "metadata" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket/catalog identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\",\n \"key_3\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "691fb53f-ce89-418d-be41-7a8aae60c007", + "name": "Convert cart to order", + "request": { + "name": "Convert cart to order", + "description": { + "content": "Converts the user's cart into a confirmed order and initiates fulfillment.\nThe cart must be validated and locked before this operation. Upon success,\nthe cart is cleared and order tracking information is provided.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "order_place" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"cart_version\": \"\",\n \"line_item_payments\": [\n {\n \"line_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"points_paid\": \"\",\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n },\n {\n \"line_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\",\n \"key_3\": \"\"\n },\n \"points_paid\": \"\",\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n }\n ],\n \"external_order_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "f0b502bc-1a93-4496-977c-c572c0cab334", + "name": "Order placed successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "order_place" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"cart_version\": \"\",\n \"line_item_payments\": [\n {\n \"line_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"points_paid\": \"\",\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n },\n {\n \"line_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\",\n \"key_3\": \"\"\n },\n \"points_paid\": \"\",\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n }\n ],\n \"external_order_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Created", + "code": 201, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"external_order_id\": \"\",\n \"order_number\": \"\",\n \"timestamp\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "8eb9d626-4510-46a6-808f-1c7db4fa7983", + "name": "Order placement failed", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "order_place" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"cart_version\": \"\",\n \"line_item_payments\": [\n {\n \"line_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"points_paid\": \"\",\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n },\n {\n \"line_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\",\n \"key_3\": \"\"\n },\n \"points_paid\": \"\",\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n }\n ],\n \"external_order_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Bad Request", + "code": 400, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error_code\": \"\",\n \"message\": \"\",\n \"success\": \"\",\n \"timestamp\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "4eea7139-2524-417c-b2fe-d9efc5ef4060", + "name": "Cart not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "order_place" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"cart_version\": \"\",\n \"line_item_payments\": [\n {\n \"line_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"points_paid\": \"\",\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n },\n {\n \"line_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\",\n \"key_3\": \"\"\n },\n \"points_paid\": \"\",\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n }\n ],\n \"external_order_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error_code\": \"\",\n \"message\": \"\",\n \"success\": \"\",\n \"timestamp\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "e15445cc-28c4-456a-b02c-f7ca80cf3f55", + "name": "Cart validation issues", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "order_place" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"cart_version\": \"\",\n \"line_item_payments\": [\n {\n \"line_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"points_paid\": \"\",\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n },\n {\n \"line_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\",\n \"key_3\": \"\"\n },\n \"points_paid\": \"\",\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n }\n ],\n \"external_order_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error_code\": \"\",\n \"message\": \"\",\n \"success\": \"\",\n \"timestamp\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "2d630c1e-33bb-4c3c-be83-5496c981fe18", + "name": "Set shipping address for cart", + "request": { + "name": "Set shipping address for cart", + "description": { + "content": "Sets or updates the shipping address for the cart. The cart will be created\nif it doesn't exist. All address fields are optional but recommended for\naccurate shipping calculations and order fulfillment.\n\nEmail validation: If an email address is provided, it must be in a valid format\n(must contain @ sign with no spaces). Invalid email formats will return a 422 error.\nEmpty email fields or omitted email fields are allowed.\n\nSome items may require specific address fields based on their fulfillment type.\nCheck the item's required_fields to ensure all necessary information is provided.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "set_address" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "c09e1fbd-e283-4590-8f35-c028748ad78c", + "name": "Address set successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "set_address" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"cart\": {\n \"total\": \"\",\n \"currency\": \"\",\n \"cart_version\": \"\",\n \"line_items\": [\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n }\n ],\n \"total_line_items\": \"\",\n \"unique_item_count\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_locked\": \"\",\n \"total_points\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"matched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"tag\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "7ae6c213-e795-4591-832c-80a73efec604", + "name": "Cart is locked", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "set_address" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Bad Request", + "code": 400, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "8d463007-f1e4-4531-88f5-bb7b583b031f", + "name": "Socket not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "set_address" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "fed9a2aa-d8cd-4103-b586-6ef5fa5ce375", + "name": "Invalid address data (e.g., invalid email format)", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "set_address" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "ee071b8d-82c1-4a1d-8b74-fe84c9c8b5cc", + "name": "Unlock the cart", + "request": { + "name": "Unlock the cart", + "description": { + "content": "Unlocks a previously locked cart, allowing modifications again. This is useful\nwhen order placement fails or is cancelled and the cart needs to be edited.\n\nThe cart version will be updated after unlocking.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "unlock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "5a06d2da-df59-43c8-94fa-dce0e538ba04", + "name": "Cart unlocked successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "unlock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"cart\": {\n \"total\": \"\",\n \"currency\": \"\",\n \"cart_version\": \"\",\n \"line_items\": [\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n }\n ],\n \"total_line_items\": \"\",\n \"unique_item_count\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_locked\": \"\",\n \"total_points\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"matched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"tag\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "c93b2772-af84-45e0-ab4a-3a3a446d85ac", + "name": "Cart is not locked", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "unlock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": {} + }, + "status": "Bad Request", + "code": 400, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "4509310f-aae6-440a-8095-68b9f421f9c3", + "name": "Socket or cart not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "unlock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "ed07ecdb-0193-4fe4-b881-0775cc19327c", + "name": "Validate cart for checkout", + "request": { + "name": "Validate cart for checkout", + "description": { + "content": "Validates that all items in the cart are still available in the catalog and\nchecks that all required fields are present. This should be called before\nproceeding to order placement.\n\nOptionally locks the cart to prevent further modifications before order placement.\nItems that are no longer available will be flagged with errors but remain in the cart.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "validate" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"lock\": false\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "f2566c9a-9766-426f-9fbc-ca7d4b3ead87", + "name": "Cart validated successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "validate" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"lock\": false\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"cart\": {\n \"total\": \"\",\n \"currency\": \"\",\n \"cart_version\": \"\",\n \"line_items\": [\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n }\n ],\n \"total_line_items\": \"\",\n \"unique_item_count\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_locked\": \"\",\n \"total_points\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"matched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"tag\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "7a814886-5eb1-4471-936e-e1bf4da5f163", + "name": "Validation failed", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "validate" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"lock\": false\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Bad Request", + "code": 400, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error_code\": \"\",\n \"failed_items\": {\n \"key_0\": [\n \"POINTS_CHANGED\",\n \"PRICE_CHANGED\"\n ],\n \"key_1\": [\n \"POINTS_CHANGED\",\n \"POINTS_CHANGED\"\n ]\n },\n \"message\": \"\",\n \"success\": \"\",\n \"timestamp\": \"\",\n \"cart\": {\n \"total\": \"\",\n \"currency\": \"\",\n \"cart_version\": \"\",\n \"line_items\": [\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n {\n \"availability\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"catalog_item_id\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"description\": \"\",\n \"errors\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"is_available\": \"\",\n \"is_explicit\": \"\",\n \"is_limited_stock\": \"\",\n \"is_primary\": \"\",\n \"is_stock_reserved\": \"\",\n \"is_taxable\": \"\",\n \"item_type_id\": \"\",\n \"line_item_id\": \"\",\n \"metadata\": {},\n \"model\": \"\",\n \"name\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"original_points\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"price\": \"\",\n \"product_id\": \"\",\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"stock_reserved_until\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n }\n ],\n \"total_line_items\": \"\",\n \"unique_item_count\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_locked\": \"\",\n \"total_points\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "33ec5511-6ee9-4296-98d7-f533bce1162a", + "name": "Socket or cart not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "cart", + ":external_user_id", + "validate" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) External user identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"lock\": false\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ] + }, + { + "name": "Catalog", + "description": "Catalog browsing and search operations", + "item": [ + { + "id": "02118a73-b277-4c82-9c18-337546bb8152", + "name": "List available catalogs and sockets", + "request": { + "name": "List available catalogs and sockets", + "description": { + "content": "Retrieves all available catalog sockets that the authenticated user has access to.\nEach socket represents a different catalog or storefront with its own inventory,\npricing, and localization settings.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "a76d9b34-cbda-45cb-a886-2b36b19842d9", + "name": "List of available catalogs", + "originalRequest": { + "url": { + "path": [ + "sockets" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"sockets\": [\n {\n \"socket_id\": \"\",\n \"socket_name\": \"\",\n \"currency\": \"\",\n \"language\": \"\",\n \"region\": \"\",\n \"point_to_currency_ratio\": \"\",\n \"features\": {},\n \"download\": \"\"\n },\n {\n \"socket_id\": \"\",\n \"socket_name\": \"\",\n \"currency\": \"\",\n \"language\": \"\",\n \"region\": \"\",\n \"point_to_currency_ratio\": \"\",\n \"features\": {},\n \"download\": \"\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "2727b20b-3cef-4644-840b-46b0986fb67c", + "name": "Unauthorized access", + "originalRequest": { + "url": { + "path": [ + "sockets" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "56c5d9df-cbed-4cae-a506-8272480af93c", + "name": "Get catalog socket details", + "request": { + "name": "Get catalog socket details", + "description": { + "content": "Retrieves detailed information for a specific catalog socket\nby its socket_id. Only sockets owned by the authenticated\ncustomer can be accessed.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "When true, includes S3 download link for catalog SQLite file", + "type": "text/plain" + }, + "key": "include_download", + "value": "" + } + ], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) The socket ID to retrieve", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "9424972e-a976-42a9-bdc2-bd33b680955f", + "name": "Socket details response", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "When true, includes S3 download link for catalog SQLite file", + "type": "text/plain" + }, + "key": "include_download", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The socket ID to retrieve", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"socket\": {\n \"socket_id\": \"\",\n \"socket_name\": \"\",\n \"currency\": \"\",\n \"language\": \"\",\n \"region\": \"\",\n \"point_to_currency_ratio\": \"\",\n \"features\": {},\n \"download\": \"\"\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "907dab2e-d2e9-4734-98b4-6591c15d36db", + "name": "Unauthorized access", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "When true, includes S3 download link for catalog SQLite file", + "type": "text/plain" + }, + "key": "include_download", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The socket ID to retrieve", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "072f9c0c-4ecb-45a2-b46f-7ed3b77a7abd", + "name": "Socket not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "When true, includes S3 download link for catalog SQLite file", + "type": "text/plain" + }, + "key": "include_download", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The socket ID to retrieve", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "db77dcc1-3ef1-45ab-886f-5fcc69fb4a3b", + "name": "Manager API unavailable", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "When true, includes S3 download link for catalog SQLite file", + "type": "text/plain" + }, + "key": "include_download", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The socket ID to retrieve", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Bad Gateway", + "code": 502, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "c21c40f8-c08f-4bee-bccd-aacc6cc6261b", + "name": "Manager API not configured", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "When true, includes S3 download link for catalog SQLite file", + "type": "text/plain" + }, + "key": "include_download", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The socket ID to retrieve", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Service Unavailable", + "code": 503, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "db141aa2-43f0-4ecb-b564-2880c12d6fa6", + "name": "Get catalog brands", + "request": { + "name": "Get catalog brands", + "description": { + "content": "Retrieves all brands available in the catalog along with\nthe number of items from each brand. Useful for creating\nbrand-based filtering interfaces.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "brands" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "5546eec5-5793-4c2f-bd21-55962d38e737", + "name": "Brands retrieved successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "brands" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"total_brands\": \"\",\n \"brands\": [\n {\n \"brand_id\": \"\",\n \"display_name\": \"\",\n \"num_items\": \"\"\n },\n {\n \"brand_id\": \"\",\n \"display_name\": \"\",\n \"num_items\": \"\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "fd79281f-a2ed-411a-ad76-a01a6c5b68ca", + "name": "Socket not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "brands" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "514a7d2e-753e-4039-9e3a-d2da93813e27", + "name": "Search service unavailable", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "brands" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Service Unavailable", + "code": 503, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "1599c938-4405-4456-a01f-8a0952c6a2c2", + "name": "Get catalog categories", + "request": { + "name": "Get catalog categories", + "description": { + "content": "Retrieves the complete hierarchical category structure for the catalog\nincluding item counts for each category. Categories are organized\nin a tree structure with parent-child relationships.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "categories" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "c6404a7f-bb0c-41ff-ad37-7a84a0049e1b", + "name": "Categories retrieved successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "categories" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"total_categories\": \"\",\n \"categories\": [\n {\n \"category_id\": \"\",\n \"display_name\": \"\",\n \"num_items\": \"\",\n \"is_root\": \"\",\n \"parent_id\": \"\",\n \"categories\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ]\n },\n {\n \"category_id\": \"\",\n \"display_name\": \"\",\n \"num_items\": \"\",\n \"is_root\": \"\",\n \"parent_id\": \"\",\n \"categories\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ]\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "d071f0a5-9b7b-4b9f-abb6-6abe96888477", + "name": "Socket not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "categories" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "7e1403d4-e3e7-4b02-9e44-493a71c4224d", + "name": "Search service unavailable", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "categories" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Service Unavailable", + "code": 503, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "6ab6779a-c829-448f-a433-ec1ed5a080e3", + "name": "Get catalog categories filtered by tag", + "request": { + "name": "Get catalog categories filtered by tag", + "description": { + "content": "Retrieves the hierarchical category structure filtered by a specific tag.\nThis endpoint uses pre-calculated tag trees to show only categories that\ncontain items with the specified tag, maintaining the hierarchical structure.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "categories", + "tag", + ":tag_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "tag_id", + "disabled": false, + "description": { + "content": "(Required) The tag ID to filter categories by", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "6391ceac-f539-441d-a75a-0bab41c87de0", + "name": "Tag-filtered categories retrieved successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "categories", + "tag", + ":tag_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) The tag ID to filter categories by", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "tag_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"total_categories\": \"\",\n \"categories\": [\n {\n \"category_id\": \"\",\n \"display_name\": \"\",\n \"num_items\": \"\",\n \"is_root\": \"\",\n \"parent_id\": \"\",\n \"categories\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ]\n },\n {\n \"category_id\": \"\",\n \"display_name\": \"\",\n \"num_items\": \"\",\n \"is_root\": \"\",\n \"parent_id\": \"\",\n \"categories\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ]\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "1dab5561-964b-4f09-baf5-dd51531f673a", + "name": "Socket or tag not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "categories", + "tag", + ":tag_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) The tag ID to filter categories by", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "tag_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "a23a5b95-d22a-4e9c-b571-e629605cac21", + "name": "Search service unavailable", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "categories", + "tag", + ":tag_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) The tag ID to filter categories by", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "tag_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Service Unavailable", + "code": 503, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "0f301c7d-e317-4aa5-896e-9f6c44614046", + "name": "Get catalog item types", + "request": { + "name": "Get catalog item types", + "description": { + "content": "Retrieves all item types available in the catalog with\nitem counts. Item types classify products into categories\nlike 'Apparel', 'Electronics', etc.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "item_types" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "061adea1-42ce-420b-a33b-7b121e836c09", + "name": "Item types retrieved successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "item_types" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"total_item_types\": \"\",\n \"item_types\": [\n {\n \"item_type_id\": \"\",\n \"name\": \"\",\n \"item_count\": \"\"\n },\n {\n \"item_type_id\": \"\",\n \"name\": \"\",\n \"item_count\": \"\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "11f88c6c-b176-4c97-8492-e88dcb6e7310", + "name": "Socket not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "item_types" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "16e91f5c-c957-4294-ad0b-03adfaa75150", + "name": "Search service unavailable", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "item_types" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Service Unavailable", + "code": 503, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "7183cd85-09e2-4a65-88f5-7bcd5a34a5d8", + "name": "Search catalog items", + "request": { + "name": "Search catalog items", + "description": { + "content": "Search for catalog items within a specific socket with filtering,\nsorting, and pagination options. Supports full-text search,\ncategory filtering, brand filtering, and price range filtering.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "items" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Search query for item names and descriptions", + "type": "text/plain" + }, + "key": "search", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by category ID", + "type": "text/plain" + }, + "key": "category_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by brand name", + "type": "text/plain" + }, + "key": "brand", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by brand ID", + "type": "text/plain" + }, + "key": "brand_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by multiple brand IDs", + "type": "text/plain" + }, + "key": "brand_ids", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by multiple brand IDs", + "type": "text/plain" + }, + "key": "brand_ids", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by multiple item IDs", + "type": "text/plain" + }, + "key": "item_ids", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by multiple item IDs", + "type": "text/plain" + }, + "key": "item_ids", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by tag ID", + "type": "text/plain" + }, + "key": "tag_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by item type ID", + "type": "text/plain" + }, + "key": "item_type_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by fulfillment type", + "type": "text/plain" + }, + "key": "fulfillment_type", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by primary items only", + "type": "text/plain" + }, + "key": "is_primary", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Minimum price filter", + "type": "text/plain" + }, + "key": "min_price", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Maximum price filter", + "type": "text/plain" + }, + "key": "max_price", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Minimum points filter", + "type": "text/plain" + }, + "key": "min_points", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Maximum points filter", + "type": "text/plain" + }, + "key": "max_points", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Page number for pagination", + "type": "text/plain" + }, + "key": "page", + "value": "1" + }, + { + "disabled": false, + "description": { + "content": "Number of items per page (default: 25, max: 100)", + "type": "text/plain" + }, + "key": "per_page", + "value": "25" + }, + { + "disabled": false, + "description": { + "content": "Sort order (default: 'rank asc')", + "type": "text/plain" + }, + "key": "sort", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Include brand facets (top/full)", + "type": "text/plain" + }, + "key": "brand_faceting", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Include tag facets (top/full)", + "type": "text/plain" + }, + "key": "tag_faceting", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter DSL for complex queries. Pass as JSON-encoded string.", + "type": "text/plain" + }, + "key": "filter", + "value": "" + } + ], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) The catalog socket to search", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "6aa84347-c91a-44fe-ae9e-100ea38bf3fc", + "name": "Items search response", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Search query for item names and descriptions", + "type": "text/plain" + }, + "key": "search", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by category ID", + "type": "text/plain" + }, + "key": "category_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by brand name", + "type": "text/plain" + }, + "key": "brand", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by brand ID", + "type": "text/plain" + }, + "key": "brand_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by multiple brand IDs", + "type": "text/plain" + }, + "key": "brand_ids", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by multiple item IDs", + "type": "text/plain" + }, + "key": "item_ids", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by tag ID", + "type": "text/plain" + }, + "key": "tag_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by item type ID", + "type": "text/plain" + }, + "key": "item_type_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by fulfillment type", + "type": "text/plain" + }, + "key": "fulfillment_type", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by primary items only", + "type": "text/plain" + }, + "key": "is_primary", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Minimum price filter", + "type": "text/plain" + }, + "key": "min_price", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Maximum price filter", + "type": "text/plain" + }, + "key": "max_price", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Minimum points filter", + "type": "text/plain" + }, + "key": "min_points", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Maximum points filter", + "type": "text/plain" + }, + "key": "max_points", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Page number for pagination", + "type": "text/plain" + }, + "key": "page", + "value": "1" + }, + { + "disabled": false, + "description": { + "content": "Number of items per page (default: 25, max: 100)", + "type": "text/plain" + }, + "key": "per_page", + "value": "25" + }, + { + "disabled": false, + "description": { + "content": "Sort order (default: 'rank asc')", + "type": "text/plain" + }, + "key": "sort", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Include brand facets (top/full)", + "type": "text/plain" + }, + "key": "brand_faceting", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Include tag facets (top/full)", + "type": "text/plain" + }, + "key": "tag_faceting", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter DSL for complex queries. Pass as JSON-encoded string.", + "type": "text/plain" + }, + "key": "filter", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to search", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"total_count\": \"\",\n \"page\": \"\",\n \"per_page\": \"\",\n \"items\": [\n {\n \"catalog_item_id\": \"\",\n \"product_id\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"model\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"item_type_id\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"availability\": \"\",\n \"is_available\": \"\",\n \"is_primary\": \"\",\n \"is_limited_stock\": \"\",\n \"is_taxable\": \"\",\n \"is_explicit\": \"\",\n \"fulfillment_type\": \"\",\n \"price\": \"\",\n \"points\": \"\",\n \"original_price\": \"\",\n \"original_points\": \"\",\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n {\n \"catalog_item_id\": \"\",\n \"product_id\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"model\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"item_type_id\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"availability\": \"\",\n \"is_available\": \"\",\n \"is_primary\": \"\",\n \"is_limited_stock\": \"\",\n \"is_taxable\": \"\",\n \"is_explicit\": \"\",\n \"fulfillment_type\": \"\",\n \"price\": \"\",\n \"points\": \"\",\n \"original_price\": \"\",\n \"original_points\": \"\",\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_3\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n }\n ],\n \"facets\": [\n {\n \"id\": \"\",\n \"type\": \"tag\",\n \"count\": \"\",\n \"name\": \"\"\n },\n {\n \"id\": \"\",\n \"type\": \"brand\",\n \"count\": \"\",\n \"name\": \"\"\n }\n ],\n \"matched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"tag\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ],\n \"search_keys\": {\n \"brand\": [\n \"\",\n \"\"\n ],\n \"category\": \"\",\n \"tag\": \"\"\n },\n \"searched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"category\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "5f2cd24c-b22e-4357-a555-405112b95682", + "name": "Socket not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Search query for item names and descriptions", + "type": "text/plain" + }, + "key": "search", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by category ID", + "type": "text/plain" + }, + "key": "category_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by brand name", + "type": "text/plain" + }, + "key": "brand", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by brand ID", + "type": "text/plain" + }, + "key": "brand_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by multiple brand IDs", + "type": "text/plain" + }, + "key": "brand_ids", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by multiple item IDs", + "type": "text/plain" + }, + "key": "item_ids", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by tag ID", + "type": "text/plain" + }, + "key": "tag_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by item type ID", + "type": "text/plain" + }, + "key": "item_type_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by fulfillment type", + "type": "text/plain" + }, + "key": "fulfillment_type", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by primary items only", + "type": "text/plain" + }, + "key": "is_primary", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Minimum price filter", + "type": "text/plain" + }, + "key": "min_price", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Maximum price filter", + "type": "text/plain" + }, + "key": "max_price", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Minimum points filter", + "type": "text/plain" + }, + "key": "min_points", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Maximum points filter", + "type": "text/plain" + }, + "key": "max_points", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Page number for pagination", + "type": "text/plain" + }, + "key": "page", + "value": "1" + }, + { + "disabled": false, + "description": { + "content": "Number of items per page (default: 25, max: 100)", + "type": "text/plain" + }, + "key": "per_page", + "value": "25" + }, + { + "disabled": false, + "description": { + "content": "Sort order (default: 'rank asc')", + "type": "text/plain" + }, + "key": "sort", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Include brand facets (top/full)", + "type": "text/plain" + }, + "key": "brand_faceting", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Include tag facets (top/full)", + "type": "text/plain" + }, + "key": "tag_faceting", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter DSL for complex queries. Pass as JSON-encoded string.", + "type": "text/plain" + }, + "key": "filter", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to search", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "e443254c-aa8c-4573-80b1-52ff93b9ad56", + "name": "Search service unavailable", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Search query for item names and descriptions", + "type": "text/plain" + }, + "key": "search", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by category ID", + "type": "text/plain" + }, + "key": "category_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by brand name", + "type": "text/plain" + }, + "key": "brand", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by brand ID", + "type": "text/plain" + }, + "key": "brand_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by multiple brand IDs", + "type": "text/plain" + }, + "key": "brand_ids", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by multiple item IDs", + "type": "text/plain" + }, + "key": "item_ids", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by tag ID", + "type": "text/plain" + }, + "key": "tag_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by item type ID", + "type": "text/plain" + }, + "key": "item_type_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by fulfillment type", + "type": "text/plain" + }, + "key": "fulfillment_type", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter by primary items only", + "type": "text/plain" + }, + "key": "is_primary", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Minimum price filter", + "type": "text/plain" + }, + "key": "min_price", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Maximum price filter", + "type": "text/plain" + }, + "key": "max_price", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Minimum points filter", + "type": "text/plain" + }, + "key": "min_points", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Maximum points filter", + "type": "text/plain" + }, + "key": "max_points", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Page number for pagination", + "type": "text/plain" + }, + "key": "page", + "value": "1" + }, + { + "disabled": false, + "description": { + "content": "Number of items per page (default: 25, max: 100)", + "type": "text/plain" + }, + "key": "per_page", + "value": "25" + }, + { + "disabled": false, + "description": { + "content": "Sort order (default: 'rank asc')", + "type": "text/plain" + }, + "key": "sort", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Include brand facets (top/full)", + "type": "text/plain" + }, + "key": "brand_faceting", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Include tag facets (top/full)", + "type": "text/plain" + }, + "key": "tag_faceting", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter DSL for complex queries. Pass as JSON-encoded string.", + "type": "text/plain" + }, + "key": "filter", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to search", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Service Unavailable", + "code": 503, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "da9a1e2d-42ce-4796-9b6d-fea8c524c861", + "name": "Search catalog items with Filter DSL", + "request": { + "name": "Search catalog items with Filter DSL", + "description": { + "content": "Search for catalog items using a Filter DSL for complex boolean queries.\nThis endpoint accepts a JSON body with the filter parameter for advanced filtering.\n\n## Filter DSL\n\nThe filter parameter supports:\n- Comparison operators: eq, ne, in, not_in, gt, gte, lt, lte, between\n- Boolean operators: and, or (with nesting up to 5 levels)\n\n## Allowed Fields\n\n- brand_id, category_id, tag_id, item_type_id, catalog_item_id (integers)\n- fulfillment_type (string: \"physical\", \"digital\")\n- price (number), points (integer)\n\n## Example Filter\n\n```json\n{\n \"filter\": {\n \"and\": [\n {\"eq\": {\"category_id\": 10493}},\n {\"or\": [\n {\"eq\": {\"brand_id\": 5984}},\n {\"eq\": {\"brand_id\": 114}}\n ]},\n {\"between\": {\"price\": [50, 200]}}\n ]\n }\n}\n```\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + "search" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) The catalog socket to search", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"brand\": \"\",\n \"brand_faceting\": \"full\",\n \"filter\": {\n \"and\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ]\n },\n \"is_primary\": \"\",\n \"page\": 1,\n \"per_page\": 25,\n \"search\": \"\",\n \"sort\": \"rank asc\",\n \"tag_faceting\": \"full\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "908f3814-2103-4180-b30f-dd974ecda563", + "name": "Search results", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + "search" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to search", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"brand\": \"\",\n \"brand_faceting\": \"full\",\n \"filter\": {\n \"and\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ]\n },\n \"is_primary\": \"\",\n \"page\": 1,\n \"per_page\": 25,\n \"search\": \"\",\n \"sort\": \"rank asc\",\n \"tag_faceting\": \"full\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"total_count\": \"\",\n \"page\": \"\",\n \"per_page\": \"\",\n \"items\": [\n {\n \"catalog_item_id\": \"\",\n \"product_id\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"model\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"item_type_id\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"availability\": \"\",\n \"is_available\": \"\",\n \"is_primary\": \"\",\n \"is_limited_stock\": \"\",\n \"is_taxable\": \"\",\n \"is_explicit\": \"\",\n \"fulfillment_type\": \"\",\n \"price\": \"\",\n \"points\": \"\",\n \"original_price\": \"\",\n \"original_points\": \"\",\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n {\n \"catalog_item_id\": \"\",\n \"product_id\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"model\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"item_type_id\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"availability\": \"\",\n \"is_available\": \"\",\n \"is_primary\": \"\",\n \"is_limited_stock\": \"\",\n \"is_taxable\": \"\",\n \"is_explicit\": \"\",\n \"fulfillment_type\": \"\",\n \"price\": \"\",\n \"points\": \"\",\n \"original_price\": \"\",\n \"original_points\": \"\",\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_1\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_2\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"key_3\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n }\n ],\n \"facets\": [\n {\n \"id\": \"\",\n \"type\": \"tag\",\n \"count\": \"\",\n \"name\": \"\"\n },\n {\n \"id\": \"\",\n \"type\": \"brand\",\n \"count\": \"\",\n \"name\": \"\"\n }\n ],\n \"matched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"tag\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ],\n \"search_keys\": {\n \"brand\": [\n \"\",\n \"\"\n ],\n \"category\": \"\",\n \"tag\": \"\"\n },\n \"searched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"category\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"brand\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "ecefacd1-e2ce-471a-999f-17c7711e9393", + "name": "Invalid filter", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + "search" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to search", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"brand\": \"\",\n \"brand_faceting\": \"full\",\n \"filter\": {\n \"and\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ]\n },\n \"is_primary\": \"\",\n \"page\": 1,\n \"per_page\": 25,\n \"search\": \"\",\n \"sort\": \"rank asc\",\n \"tag_faceting\": \"full\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Bad Request", + "code": 400, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "2a29e6a6-eedd-47d1-b908-6af235ef64c4", + "name": "Socket not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + "search" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to search", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"brand\": \"\",\n \"brand_faceting\": \"full\",\n \"filter\": {\n \"and\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ]\n },\n \"is_primary\": \"\",\n \"page\": 1,\n \"per_page\": 25,\n \"search\": \"\",\n \"sort\": \"rank asc\",\n \"tag_faceting\": \"full\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "a8ec8029-0610-443e-bbd0-70eec66263f8", + "name": "Search service unavailable", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + "search" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to search", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"brand\": \"\",\n \"brand_faceting\": \"full\",\n \"filter\": {\n \"and\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ]\n },\n \"is_primary\": \"\",\n \"page\": 1,\n \"per_page\": 25,\n \"search\": \"\",\n \"sort\": \"rank asc\",\n \"tag_faceting\": \"full\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Service Unavailable", + "code": 503, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "cd887f06-096d-40d0-9eac-afd1d143740e", + "name": "Get catalog item details", + "request": { + "name": "Get catalog item details", + "description": { + "content": "Retrieves detailed information for a specific catalog item\nincluding full specifications, pricing, and availability information.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + ":catalog_item_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Include matched_entities with category, tag, and brand details for the item's IDs", + "type": "text/plain" + }, + "key": "matched_entities", + "value": "" + } + ], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "catalog_item_id", + "disabled": false, + "description": { + "content": "(Required) The catalog item ID to retrieve", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "786094df-0f64-4497-8413-c1a604960211", + "name": "Item details retrieved successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + ":catalog_item_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Include matched_entities with category, tag, and brand details for the item's IDs", + "type": "text/plain" + }, + "key": "matched_entities", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) The catalog item ID to retrieve", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "catalog_item_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"catalog_item\": {\n \"catalog_item_id\": \"\",\n \"product_id\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"model\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"item_type_id\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"availability\": \"\",\n \"is_available\": \"\",\n \"is_primary\": \"\",\n \"is_limited_stock\": \"\",\n \"is_taxable\": \"\",\n \"is_explicit\": \"\",\n \"fulfillment_type\": \"\",\n \"price\": \"\",\n \"points\": \"\",\n \"original_price\": \"\",\n \"original_points\": \"\",\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"images\": [\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n },\n {\n \"is_primary\": \"\",\n \"order\": \"\",\n \"alt\": \"\",\n \"urls\": {\n \"image_75_1_1\": \"\",\n \"image_150_1_1\": \"\",\n \"image_300_1_1\": \"\",\n \"image_500_1_1\": \"\",\n \"image_75_3_2\": \"\",\n \"image_150_3_2\": \"\",\n \"image_300_3_2\": \"\",\n \"image_500_3_2\": \"\"\n }\n }\n ],\n \"product_options\": {\n \"key_0\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ]\n },\n \"rank\": \"\",\n \"required_fields\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n },\n \"points_low\": \"\",\n \"face_value\": \"\",\n \"product_name\": \"\",\n \"price_high\": \"\",\n \"face_currency\": \"\",\n \"price_low\": \"\",\n \"points_high\": \"\"\n },\n \"matched_entities\": [\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"category\"\n },\n {\n \"discount_percent\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"category\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "26b16374-3238-4d5f-9f0c-ac006883e8d5", + "name": "Item not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + ":catalog_item_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Include matched_entities with category, tag, and brand details for the item's IDs", + "type": "text/plain" + }, + "key": "matched_entities", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) The catalog item ID to retrieve", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "catalog_item_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "a80dc54e-be23-471e-b987-41c1a7951d67", + "name": "Search service unavailable", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + ":catalog_item_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Include matched_entities with category, tag, and brand details for the item's IDs", + "type": "text/plain" + }, + "key": "matched_entities", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) The catalog item ID to retrieve", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "catalog_item_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Service Unavailable", + "code": 503, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "cab441ea-3c62-4d98-9b43-a225e6319db6", + "name": "Get item stock status", + "request": { + "name": "Get item stock status", + "description": { + "content": "Retrieves current stock availability information for a specific\ncatalog item. This endpoint requires webhook configuration for\nreal-time stock updates.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + ":catalog_item_id", + "stock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + } + }, + { + "type": "any", + "value": "", + "key": "catalog_item_id", + "disabled": false, + "description": { + "content": "(Required) The catalog item ID to check", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "c00df165-0fa5-476f-8917-cc50b19db1c8", + "name": "Stock information retrieved successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + ":catalog_item_id", + "stock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) The catalog item ID to check", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "catalog_item_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"stock\": {\n \"catalog_item_id\": \"\",\n \"available\": \"\",\n \"last_updated\": \"\",\n \"estimated_ship_date\": \"\",\n \"quantity_available\": \"\"\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "fc219e75-b019-446c-b61b-eacdbf6f8889", + "name": "Invalid request", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + ":catalog_item_id", + "stock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) The catalog item ID to check", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "catalog_item_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Bad Request", + "code": 400, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "92d2ed32-d733-453a-a22e-cf608cac5119", + "name": "Item not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + ":catalog_item_id", + "stock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) The catalog item ID to check", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "catalog_item_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "58a7ecef-1787-451b-b8be-25aebe4b3c71", + "name": "Stock service unavailable", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "items", + ":catalog_item_id", + "stock" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + }, + { + "disabled": false, + "description": { + "content": "(Required) The catalog item ID to check", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "catalog_item_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Service Unavailable", + "code": 503, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "803cbc1e-b534-4dc0-b3ae-a8d45a32ba39", + "name": "Get marketing content", + "request": { + "name": "Get marketing content", + "description": { + "content": "Retrieves featured marketing content and promotional items\nfor the catalog. This endpoint returns specially curated\nitems for marketing and promotional purposes.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "marketing" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Filter marketing by category ID", + "type": "text/plain" + }, + "key": "category_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter marketing by brand ID", + "type": "text/plain" + }, + "key": "brand_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter marketing by tag ID", + "type": "text/plain" + }, + "key": "tag_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Get marketing for specific item", + "type": "text/plain" + }, + "key": "item_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Custom marketing key", + "type": "text/plain" + }, + "key": "key", + "value": "" + } + ], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "a65fe5c8-149e-455c-9efe-29915251ca21", + "name": "Marketing content retrieved successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "marketing" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Filter marketing by category ID", + "type": "text/plain" + }, + "key": "category_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter marketing by brand ID", + "type": "text/plain" + }, + "key": "brand_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter marketing by tag ID", + "type": "text/plain" + }, + "key": "tag_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Get marketing for specific item", + "type": "text/plain" + }, + "key": "item_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Custom marketing key", + "type": "text/plain" + }, + "key": "key", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"blocks\": [\n {\n \"type\": \"banner\"\n },\n {\n \"type\": \"item_list\"\n }\n ],\n \"load_items\": [\n \"\",\n \"\"\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "d37d6486-3d65-4288-9604-af25d898152d", + "name": "Socket not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "marketing" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Filter marketing by category ID", + "type": "text/plain" + }, + "key": "category_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter marketing by brand ID", + "type": "text/plain" + }, + "key": "brand_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter marketing by tag ID", + "type": "text/plain" + }, + "key": "tag_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Get marketing for specific item", + "type": "text/plain" + }, + "key": "item_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Custom marketing key", + "type": "text/plain" + }, + "key": "key", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "1df7c88f-0f8c-4485-809b-ac170b49c7f7", + "name": "Marketing service unavailable", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "marketing" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Filter marketing by category ID", + "type": "text/plain" + }, + "key": "category_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter marketing by brand ID", + "type": "text/plain" + }, + "key": "brand_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Filter marketing by tag ID", + "type": "text/plain" + }, + "key": "tag_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Get marketing for specific item", + "type": "text/plain" + }, + "key": "item_id", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Custom marketing key", + "type": "text/plain" + }, + "key": "key", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Service Unavailable", + "code": 503, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "b7235980-ae43-4236-927e-2c0e5b2ef7ac", + "name": "Get all tags with item counts", + "request": { + "name": "Get all tags with item counts", + "description": { + "content": "Retrieves a complete list of all tags available in the catalog along with\nthe number of items tagged with each tag. Useful for creating tag-based\nfiltering interfaces and tag cloud displays.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "tags" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "1726940c-c121-4b34-abb4-8457ba82e9dd", + "name": "Tags retrieved successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "tags" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"total_tags\": \"\",\n \"tags\": [\n {\n \"discount_percent\": \"\",\n \"display_name\": \"\",\n \"num_items\": \"\",\n \"tag_id\": \"\"\n },\n {\n \"discount_percent\": \"\",\n \"display_name\": \"\",\n \"num_items\": \"\",\n \"tag_id\": \"\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "cea24abb-bb05-4c49-abde-6d83f3bbac02", + "name": "Socket not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "tags" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "8cf48af9-a436-434f-bfeb-452e37ef8353", + "name": "Search service unavailable", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "tags" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The catalog socket to query", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Service Unavailable", + "code": 503, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ] + }, + { + "name": "Health", + "description": "Server checks", + "item": [ + { + "id": "bac8f329-03a4-4645-86f0-b4f23e4d8563", + "name": "Health check endpoint", + "request": { + "name": "Health check endpoint", + "description": { + "content": "Check if the API server is running and responsive. Can be called with or without authentication.", + "type": "text/plain" + }, + "url": { + "path": [ + "ping" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": { + "type": "noauth" + } + }, + "response": [ + { + "id": "fe4615f9-4be3-46d5-a161-6d06e2a53ea8", + "name": "Service is healthy", + "originalRequest": { + "url": { + "path": [ + "ping" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"status\": \"\",\n \"timestamp\": \"\",\n \"version\": \"\",\n \"authenticated\": \"\",\n \"customer\": {\n \"id\": \"\",\n \"name\": \"\",\n \"subdomain\": \"\"\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "4b4d0db0-30f1-47cf-8c62-0774a367fe9b", + "name": "Invalid authentication token provided", + "originalRequest": { + "url": { + "path": [ + "ping" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ] + }, + { + "name": "Order", + "description": "Order management operations", + "item": [ + { + "id": "c34a21a3-867b-4633-9389-b73f862d0b0e", + "name": "Get all orders for an external user", + "request": { + "name": "Get all orders for an external user", + "description": { + "content": "Retrieves all orders associated with a specific external user ID.\nReturns orders with pagination support.\n\nThis endpoint allows you to retrieve all orders for a specific user across\nall their transactions. Each order includes full details including line items,\nfulfillments, and current status.\n\n**Pagination:**\n- Default: 25 orders per page\n- Maximum: 100 orders per page\n- Default sort: date_placed desc\n\n**Sorting:**\nSupported sort fields:\n- `date_placed`\n- `order_number`\n- `external_order_id`\n- `last_tracking_update`\n\nSort format: \"field direction\" (e.g., \"date_placed desc\", \"order_number asc\")\n", + "type": "text/plain" + }, + "url": { + "path": [ + "external_users", + ":external_user_id", + "orders" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Page number for pagination", + "type": "text/plain" + }, + "key": "page", + "value": "1" + }, + { + "disabled": false, + "description": { + "content": "Number of items per page (max: 100)", + "type": "text/plain" + }, + "key": "per_page", + "value": "25" + }, + { + "disabled": false, + "description": { + "content": "Sort order as 'field direction' (e.g., 'date_placed desc', 'order_number asc')", + "type": "text/plain" + }, + "key": "sort", + "value": "date_placed desc" + } + ], + "variable": [ + { + "type": "any", + "value": "", + "key": "external_user_id", + "disabled": false, + "description": { + "content": "(Required) The external user ID to fetch orders for", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": null + }, + "response": [ + { + "id": "19be0a3d-7d3d-40d3-a7d1-12744ee7fb49", + "name": "List of orders for the user", + "originalRequest": { + "url": { + "path": [ + "external_users", + ":external_user_id", + "orders" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Page number for pagination", + "type": "text/plain" + }, + "key": "page", + "value": "1" + }, + { + "disabled": false, + "description": { + "content": "Number of items per page (max: 100)", + "type": "text/plain" + }, + "key": "per_page", + "value": "25" + }, + { + "disabled": false, + "description": { + "content": "Sort order as 'field direction' (e.g., 'date_placed desc', 'order_number asc')", + "type": "text/plain" + }, + "key": "sort", + "value": "date_placed desc" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The external user ID to fetch orders for", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"orders\": [\n {\n \"order_number\": \"\",\n \"external_order_id\": \"\",\n \"socket_id\": \"\",\n \"external_user_id\": \"\",\n \"created\": \"\",\n \"updated\": \"\",\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_test\": \"\",\n \"line_items\": [\n {\n \"line_item_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"stock_reserved_until\": \"\",\n \"is_stock_reserved\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"catalog_item_id\": \"\",\n \"product_id\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"model\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"item_type_id\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"availability\": \"\",\n \"is_available\": \"\",\n \"is_primary\": \"\",\n \"is_limited_stock\": \"\",\n \"is_taxable\": \"\",\n \"is_explicit\": \"\",\n \"fulfillment_type\": \"\",\n \"price\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"original_points\": \"\",\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"rank\": \"\",\n \"images\": [\n {\n \"alt\": \"\",\n \"is_primary\": \"\",\n \"order\": \"\",\n \"urls\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n }\n },\n {\n \"alt\": \"\",\n \"is_primary\": \"\",\n \"order\": \"\",\n \"urls\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\"\n }\n }\n ],\n \"product_options\": {\n \"key_0\": 1362.8119147301654\n },\n \"required_fields\": {\n \"key_0\": \"\"\n },\n \"price_paid\": \"\",\n \"points_paid\": \"\",\n \"tax_paid\": \"\",\n \"shipping_paid\": \"\",\n \"status\": \"cancelled\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n },\n {\n \"line_item_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"stock_reserved_until\": \"\",\n \"is_stock_reserved\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"catalog_item_id\": \"\",\n \"product_id\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"model\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"item_type_id\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"availability\": \"\",\n \"is_available\": \"\",\n \"is_primary\": \"\",\n \"is_limited_stock\": \"\",\n \"is_taxable\": \"\",\n \"is_explicit\": \"\",\n \"fulfillment_type\": \"\",\n \"price\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"original_points\": \"\",\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"rank\": \"\",\n \"images\": [\n {\n \"alt\": \"\",\n \"is_primary\": \"\",\n \"order\": \"\",\n \"urls\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\"\n }\n },\n {\n \"alt\": \"\",\n \"is_primary\": \"\",\n \"order\": \"\",\n \"urls\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\"\n }\n }\n ],\n \"product_options\": {\n \"key_0\": 7063.431491387176,\n \"key_1\": 8702.456505530248,\n \"key_2\": 3115\n },\n \"required_fields\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"price_paid\": \"\",\n \"points_paid\": \"\",\n \"tax_paid\": \"\",\n \"shipping_paid\": \"\",\n \"status\": \"backordered\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"fulfillments\": [\n {\n \"fulfillment_id\": \"\",\n \"line_item_ids\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"physical\",\n \"shipper\": \"\",\n \"tracking_number\": \"\",\n \"fulfillment_instructions\": \"\",\n \"virtual_code_link\": \"\",\n \"virtual_code_pin\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n },\n {\n \"fulfillment_id\": \"\",\n \"line_item_ids\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"physical\",\n \"shipper\": \"\",\n \"tracking_number\": \"\",\n \"fulfillment_instructions\": \"\",\n \"virtual_code_link\": \"\",\n \"virtual_code_pin\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n }\n ]\n },\n {\n \"order_number\": \"\",\n \"external_order_id\": \"\",\n \"socket_id\": \"\",\n \"external_user_id\": \"\",\n \"created\": \"\",\n \"updated\": \"\",\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_test\": \"\",\n \"line_items\": [\n {\n \"line_item_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"stock_reserved_until\": \"\",\n \"is_stock_reserved\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"catalog_item_id\": \"\",\n \"product_id\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"model\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"item_type_id\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"availability\": \"\",\n \"is_available\": \"\",\n \"is_primary\": \"\",\n \"is_limited_stock\": \"\",\n \"is_taxable\": \"\",\n \"is_explicit\": \"\",\n \"fulfillment_type\": \"\",\n \"price\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"original_points\": \"\",\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"rank\": \"\",\n \"images\": [\n {\n \"alt\": \"\",\n \"is_primary\": \"\",\n \"order\": \"\",\n \"urls\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\",\n \"key_3\": \"\"\n }\n },\n {\n \"alt\": \"\",\n \"is_primary\": \"\",\n \"order\": \"\",\n \"urls\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n }\n }\n ],\n \"product_options\": {\n \"key_0\": true,\n \"key_1\": false\n },\n \"required_fields\": {\n \"key_0\": \"\"\n },\n \"price_paid\": \"\",\n \"points_paid\": \"\",\n \"tax_paid\": \"\",\n \"shipping_paid\": \"\",\n \"status\": \"exported\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n },\n {\n \"line_item_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"stock_reserved_until\": \"\",\n \"is_stock_reserved\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"catalog_item_id\": \"\",\n \"product_id\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"model\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"item_type_id\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"availability\": \"\",\n \"is_available\": \"\",\n \"is_primary\": \"\",\n \"is_limited_stock\": \"\",\n \"is_taxable\": \"\",\n \"is_explicit\": \"\",\n \"fulfillment_type\": \"\",\n \"price\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"original_points\": \"\",\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"rank\": \"\",\n \"images\": [\n {\n \"alt\": \"\",\n \"is_primary\": \"\",\n \"order\": \"\",\n \"urls\": {\n \"key_0\": \"\"\n }\n },\n {\n \"alt\": \"\",\n \"is_primary\": \"\",\n \"order\": \"\",\n \"urls\": {\n \"key_0\": \"\"\n }\n }\n ],\n \"product_options\": {\n \"key_0\": true,\n \"key_1\": true\n },\n \"required_fields\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\"\n },\n \"price_paid\": \"\",\n \"points_paid\": \"\",\n \"tax_paid\": \"\",\n \"shipping_paid\": \"\",\n \"status\": \"fulfilled\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"fulfillments\": [\n {\n \"fulfillment_id\": \"\",\n \"line_item_ids\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"physical\",\n \"shipper\": \"\",\n \"tracking_number\": \"\",\n \"fulfillment_instructions\": \"\",\n \"virtual_code_link\": \"\",\n \"virtual_code_pin\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n },\n {\n \"fulfillment_id\": \"\",\n \"line_item_ids\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"digital\",\n \"shipper\": \"\",\n \"tracking_number\": \"\",\n \"fulfillment_instructions\": \"\",\n \"virtual_code_link\": \"\",\n \"virtual_code_pin\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n }\n ]\n }\n ],\n \"pagination\": {\n \"page\": \"\",\n \"per_page\": \"\",\n \"total_count\": \"\",\n \"total_pages\": \"\"\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "ffb5937d-345e-42d0-9e15-41e5ac7ba897", + "name": "Authentication failed", + "originalRequest": { + "url": { + "path": [ + "external_users", + ":external_user_id", + "orders" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Page number for pagination", + "type": "text/plain" + }, + "key": "page", + "value": "1" + }, + { + "disabled": false, + "description": { + "content": "Number of items per page (max: 100)", + "type": "text/plain" + }, + "key": "per_page", + "value": "25" + }, + { + "disabled": false, + "description": { + "content": "Sort order as 'field direction' (e.g., 'date_placed desc', 'order_number asc')", + "type": "text/plain" + }, + "key": "sort", + "value": "date_placed desc" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The external user ID to fetch orders for", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_user_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "960f86ae-ec4b-4820-9692-e32cfac25568", + "name": "Track order status and fulfillment", + "request": { + "name": "Track order status and fulfillment", + "description": { + "content": "Retrieves detailed tracking information for a specific order including\ncurrent status, shipping details, and fulfillment progress. Uses your\norder number as the primary lookup method.\n\nYou can optionally pass the external user id you passed when creating the\norder. If the order number is valid but was purchased by a different user\nwe will return not found.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "orders", + ":external_order_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Optional user ID for additional validation", + "type": "text/plain" + }, + "key": "external_user_id", + "value": "" + } + ], + "variable": [ + { + "type": "any", + "value": "", + "key": "external_order_id", + "disabled": false, + "description": { + "content": "(Required) The external order number to track", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": null + }, + "response": [ + { + "id": "f2e14d87-8dc0-46ef-ad08-658897d5122a", + "name": "Order tracking information", + "originalRequest": { + "url": { + "path": [ + "orders", + ":external_order_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Optional user ID for additional validation", + "type": "text/plain" + }, + "key": "external_user_id", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The external order number to track", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_order_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"order\": {\n \"order_number\": \"\",\n \"external_order_id\": \"\",\n \"socket_id\": \"\",\n \"external_user_id\": \"\",\n \"created\": \"\",\n \"updated\": \"\",\n \"given_name\": \"\",\n \"surname\": \"\",\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"state_or_region\": \"\",\n \"postal_code\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"phone_number\": \"\",\n \"is_test\": \"\",\n \"line_items\": [\n {\n \"line_item_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"stock_reserved_until\": \"\",\n \"is_stock_reserved\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"catalog_item_id\": \"\",\n \"product_id\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"model\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"item_type_id\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"availability\": \"\",\n \"is_available\": \"\",\n \"is_primary\": \"\",\n \"is_limited_stock\": \"\",\n \"is_taxable\": \"\",\n \"is_explicit\": \"\",\n \"fulfillment_type\": \"\",\n \"price\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"original_points\": \"\",\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"rank\": \"\",\n \"images\": [\n {\n \"alt\": \"\",\n \"is_primary\": \"\",\n \"order\": \"\",\n \"urls\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\",\n \"key_3\": \"\",\n \"key_4\": \"\"\n }\n },\n {\n \"alt\": \"\",\n \"is_primary\": \"\",\n \"order\": \"\",\n \"urls\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\"\n }\n }\n ],\n \"product_options\": {\n \"key_0\": 1392\n },\n \"required_fields\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"price_paid\": \"\",\n \"points_paid\": \"\",\n \"tax_paid\": \"\",\n \"shipping_paid\": \"\",\n \"status\": \"new\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n },\n {\n \"line_item_id\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\",\n \"key_2\": \"\"\n },\n \"errors\": [\n \"\",\n \"\"\n ],\n \"stock_reserved_until\": \"\",\n \"is_stock_reserved\": \"\",\n \"options\": [\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n },\n {\n \"order\": \"\",\n \"slug\": \"\",\n \"translations\": [\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n },\n {\n \"language\": \"\",\n \"option_name\": \"\",\n \"value_name\": \"\"\n }\n ],\n \"value\": \"\"\n }\n ],\n \"catalog_item_id\": \"\",\n \"product_id\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"brand\": \"\",\n \"brand_id\": \"\",\n \"model\": \"\",\n \"category_ids\": [\n \"\",\n \"\"\n ],\n \"tag_ids\": [\n \"\",\n \"\"\n ],\n \"item_type_id\": \"\",\n \"supplier_id\": \"\",\n \"supplier_reference_id\": \"\",\n \"availability\": \"\",\n \"is_available\": \"\",\n \"is_primary\": \"\",\n \"is_limited_stock\": \"\",\n \"is_taxable\": \"\",\n \"is_explicit\": \"\",\n \"fulfillment_type\": \"\",\n \"price\": \"\",\n \"original_price\": \"\",\n \"points\": \"\",\n \"original_points\": \"\",\n \"retail_price\": \"\",\n \"shipping_estimate\": \"\",\n \"rank\": \"\",\n \"images\": [\n {\n \"alt\": \"\",\n \"is_primary\": \"\",\n \"order\": \"\",\n \"urls\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n }\n },\n {\n \"alt\": \"\",\n \"is_primary\": \"\",\n \"order\": \"\",\n \"urls\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n }\n }\n ],\n \"product_options\": {\n \"key_0\": false,\n \"key_1\": false,\n \"key_2\": \"string\"\n },\n \"required_fields\": {\n \"key_0\": \"\"\n },\n \"price_paid\": \"\",\n \"points_paid\": \"\",\n \"tax_paid\": \"\",\n \"shipping_paid\": \"\",\n \"status\": \"pending\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n }\n ],\n \"fulfillments\": [\n {\n \"fulfillment_id\": \"\",\n \"line_item_ids\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"physical\",\n \"shipper\": \"\",\n \"tracking_number\": \"\",\n \"fulfillment_instructions\": \"\",\n \"virtual_code_link\": \"\",\n \"virtual_code_pin\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n },\n {\n \"fulfillment_id\": \"\",\n \"line_item_ids\": [\n \"\",\n \"\"\n ],\n \"fulfillment_type\": \"physical\",\n \"shipper\": \"\",\n \"tracking_number\": \"\",\n \"fulfillment_instructions\": \"\",\n \"virtual_code_link\": \"\",\n \"virtual_code_pin\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n }\n ]\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "214594b3-3be1-40ef-ae1d-983f1a61c887", + "name": "Authentication failed", + "originalRequest": { + "url": { + "path": [ + "orders", + ":external_order_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Optional user ID for additional validation", + "type": "text/plain" + }, + "key": "external_user_id", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The external order number to track", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_order_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "d095f276-b8b1-4c20-93e8-e50f147d7a0a", + "name": "Order not found", + "originalRequest": { + "url": { + "path": [ + "orders", + ":external_order_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Optional user ID for additional validation", + "type": "text/plain" + }, + "key": "external_user_id", + "value": "" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The external order number to track", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "external_order_id" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "e16d2dd7-7c9a-47e3-aa6c-d01bc2c72efe", + "name": "Check if redemption is active", + "request": { + "name": "Check if redemption is active", + "description": { + "content": "Determines whether the redemption system is currently active and accepting orders\nfor your account. This can be used by frontend applications to enable/disable\ncheckout functionality.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "redemption_active" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "disabled": false, + "description": { + "content": "Session identifier", + "type": "text/plain" + }, + "key": "X-Session-ID", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "User identifier", + "type": "text/plain" + }, + "key": "X-User-ID", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Trace identifier for distributed tracing", + "type": "text/plain" + }, + "key": "X-Trace-ID", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Correlation identifier for request tracking", + "type": "text/plain" + }, + "key": "X-Correlation-ID", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {}, + "auth": null + }, + "response": [ + { + "id": "1dff8325-d98e-48a9-81bf-7d71bc6c6cdc", + "name": "Redemption status", + "originalRequest": { + "url": { + "path": [ + "redemption_active" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "disabled": false, + "description": { + "content": "Session identifier", + "type": "text/plain" + }, + "key": "X-Session-ID", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "User identifier", + "type": "text/plain" + }, + "key": "X-User-ID", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Trace identifier for distributed tracing", + "type": "text/plain" + }, + "key": "X-Trace-ID", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Correlation identifier for request tracking", + "type": "text/plain" + }, + "key": "X-Correlation-ID", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"timestamp\": \"\",\n \"is_redemption_active\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "81f1265e-1014-4681-b217-3ca2ce86e539", + "name": "Authentication failed", + "originalRequest": { + "url": { + "path": [ + "redemption_active" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "disabled": false, + "description": { + "content": "Session identifier", + "type": "text/plain" + }, + "key": "X-Session-ID", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "User identifier", + "type": "text/plain" + }, + "key": "X-User-ID", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Trace identifier for distributed tracing", + "type": "text/plain" + }, + "key": "X-Trace-ID", + "value": "" + }, + { + "disabled": false, + "description": { + "content": "Correlation identifier for request tracking", + "type": "text/plain" + }, + "key": "X-Correlation-ID", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "bfa553b4-0d2b-41f5-8c62-3d1d6292eca6", + "name": "Place order directly without cart", + "request": { + "name": "Place order directly without cart", + "description": { + "content": "Places an order directly in a single API call without managing cart state.\n\nThis endpoint allows you to submit an entire order including items, shipping\naddress, and payment details. The order is validated and placed immediately\nwithout creating or maintaining a cart session.\n\nInstead of implementing each cart step, the call will: \n\n1. Validate all items are available in the catalog\n2. Validate shipping address requirements\n3. Create and submit the order\n\n**Important notes:**\n- All items must be available at order placement time\n- Physical items require complete shipping address\n- Digital items may only require email and name\n- Returns same response format as cart-based ordering\n", + "type": "text/plain" + }, + "url": { + "path": [ + "sockets", + ":socket_id", + "orders", + "place_direct" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "type": "any", + "value": "", + "key": "socket_id", + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + } + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"external_user_id\": \"\",\n \"external_order_id\": \"\",\n \"items\": [\n {\n \"catalog_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"points_paid\": 0,\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n }\n ],\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"shipping_address\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{apiKey}}" + } + ] + } + }, + "response": [ + { + "id": "e2466e61-748c-4b6d-aaf3-f495d6b0ac44", + "name": "Order placed successfully", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "orders", + "place_direct" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"external_user_id\": \"\",\n \"external_order_id\": \"\",\n \"items\": [\n {\n \"catalog_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"points_paid\": 0,\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n }\n ],\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"shipping_address\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Created", + "code": 201, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"external_order_id\": \"\",\n \"order_number\": \"\",\n \"timestamp\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "9e4c4e6a-4620-4532-baa0-1486540718ed", + "name": "Order placement failed - validation errors", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "orders", + "place_direct" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"external_user_id\": \"\",\n \"external_order_id\": \"\",\n \"items\": [\n {\n \"catalog_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"points_paid\": 0,\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n }\n ],\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"shipping_address\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Bad Request", + "code": 400, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error_code\": \"\",\n \"message\": \"\",\n \"success\": \"\",\n \"timestamp\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "ec4ed12e-80f9-4534-8125-affa2755a9c1", + "name": "Socket not found", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "orders", + "place_direct" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"external_user_id\": \"\",\n \"external_order_id\": \"\",\n \"items\": [\n {\n \"catalog_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"points_paid\": 0,\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n }\n ],\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"shipping_address\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "303b468e-52ac-4da3-a326-64e59f7fed65", + "name": "Duplicate order", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "orders", + "place_direct" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"external_user_id\": \"\",\n \"external_order_id\": \"\",\n \"items\": [\n {\n \"catalog_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"points_paid\": 0,\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n }\n ],\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"shipping_address\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Conflict", + "code": 409, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"error_code\": \"\",\n \"timestamp\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "68b0e121-678a-44cf-bdb5-7c542394a1cf", + "name": "Validation failed", + "originalRequest": { + "url": { + "path": [ + "sockets", + ":socket_id", + "orders", + "place_direct" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Socket identifier", + "type": "text/plain" + }, + "type": "any", + "value": "", + "key": "socket_id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: bearer", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Bearer " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"external_user_id\": \"\",\n \"external_order_id\": \"\",\n \"items\": [\n {\n \"catalog_item_id\": \"\",\n \"price_paid\": \"\",\n \"metadata\": {\n \"key_0\": \"\",\n \"key_1\": \"\"\n },\n \"points_paid\": 0,\n \"shipping_paid\": \"\",\n \"tax_paid\": \"\"\n }\n ],\n \"metadata\": {\n \"key_0\": \"\"\n },\n \"shipping_address\": {\n \"address_1\": \"\",\n \"address_2\": \"\",\n \"address_3\": \"\",\n \"address_4\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"given_name\": \"\",\n \"phone_number\": \"\",\n \"postal_code\": \"\",\n \"state_or_region\": \"\",\n \"surname\": \"\"\n }\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"success\": \"\",\n \"message\": \"\",\n \"timestamp\": \"\",\n \"error_code\": \"\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ] + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "type": "any", + "value": "{{apiKey}}", + "key": "token" + } + ] + }, + "event": [], + "variable": [ + { + "key": "baseUrl", + "value": "https://api.catalogapi.com/sandbox/api/v2" + }, + { + "key": "catalog_item_id", + "value": "" + }, + { + "key": "cart_version", + "value": "" + }, + { + "key": "line_item_id", + "value": "" + }, + { + "key": "line_item_price", + "value": "" + }, + { + "key": "external_order_id", + "value": "" + } + ], + "info": { + "_postman_id": "d9e082f4-25b8-40cc-b536-7372c6861677", + "name": "CatalogAPI", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "description": { + "content": "Welcome to Catalog API, your gateway to a complete e-commerce experience. This API enables you to browse through extensive product catalogs, search for specific items, and access detailed information about each product including images, pricing, and availability.\n\nBuild and manage shopping carts with ease - add line items with metadata, and prepare orders for checkout. The API handles everything from address validation to stock reservation, ensuring a smooth purchasing experience. Once orders are placed, track their progress through fulfillment and delivery.\n\nBeyond basic commerce functionality, the API delivers dynamic marketing content tailored to different contexts, whether showcasing featured products, category promotions, or personalized recommendations. With comprehensive multi-language support, real-time stock management, and flexible fulfillment options for both digital and physical products, this API provides all the tools needed for a modern e-commerce platform.\n\n\nContact Support:\n Name: Catalog API Support\n Email: support@catalogapi.com", + "type": "text/plain" + } + } +} diff --git a/v2/postman/catalogapi.sandbox.postman_environment.json b/v2/postman/catalogapi.sandbox.postman_environment.json new file mode 100644 index 0000000..d35a9a4 --- /dev/null +++ b/v2/postman/catalogapi.sandbox.postman_environment.json @@ -0,0 +1,32 @@ +{ + "id": "b1d3f6a2-9c4e-4a1b-8e7d-catalogapi-sbx", + "name": "CatalogAPI Sandbox", + "values": [ + { + "key": "baseUrl", + "value": "https://api.catalogapi.com/sandbox/api/v2", + "type": "default", + "enabled": true + }, + { + "key": "apiKey", + "value": "", + "type": "secret", + "enabled": true + }, + { + "key": "socket_id", + "value": "", + "type": "default", + "enabled": true + }, + { + "key": "external_user_id", + "value": "demo-user-1", + "type": "default", + "enabled": true + } + ], + "_postman_variable_scope": "environment", + "_postman_exported_using": "CatalogAPI generate.sh" +} diff --git a/v2/scripts/build-lifecycle.js b/v2/scripts/build-lifecycle.js new file mode 100644 index 0000000..d5854a1 --- /dev/null +++ b/v2/scripts/build-lifecycle.js @@ -0,0 +1,190 @@ +#!/usr/bin/env node +// The "Order Lifecycle" quickstart: a single runnable sequence that takes a +// developer straight from search to a tracked order. Each step's test script +// captures the IDs the next step needs (catalog_item_id -> line_item_id + +// cart_version -> external_order_id), so the whole flow runs with just `apiKey` +// and `socket_id` set in the environment. +// +// This is hand-authored (not derived from the spec). It is welded into the +// generated reference collection as a folder by weld-lifecycle.js, so regen +// never clobbers it. Required as a module for its `items`/`runtimeVars`; run +// directly to emit a standalone collection. +// +// node build-lifecycle.js # optional standalone build + +const fs = require("fs"); + +const FOLDER_NAME = "Quickstart — Order Lifecycle"; +const RUNTIME_VARS = ["catalog_item_id", "cart_version", "line_item_id", "line_item_price", "external_order_id"]; +const HEADERS = [{ key: "Content-Type", value: "application/json" }]; +const url = (...segs) => ({ raw: ["{{baseUrl}}", ...segs].join("/"), host: ["{{baseUrl}}"], path: segs }); +const body = (raw) => ({ mode: "raw", raw, options: { raw: { language: "json" } } }); +const test = (exec) => ({ listen: "test", script: { type: "text/javascript", exec } }); +const prerequest = (exec) => ({ listen: "prerequest", script: { type: "text/javascript", exec } }); + +const cart = (...segs) => url("sockets", "{{socket_id}}", "cart", "{{external_user_id}}", ...segs); + +const items = [ + { + name: "1. Search items", + event: [ + test([ + "const res = pm.response.json();", + "pm.test('search returned items', () => pm.expect(res.items.length).to.be.above(0));", + "const item = res.items[0];", + "pm.collectionVariables.set('catalog_item_id', item.catalog_item_id);", + "console.log('picked item', item.catalog_item_id, '-', item.name);", + ]), + ], + request: { + method: "POST", + header: HEADERS, + body: body('{\n "per_page": 5\n}'), + url: url("sockets", "{{socket_id}}", "items", "search"), + }, + }, + { + name: "2. Add item to cart", + event: [ + test([ + "const cartObj = pm.response.json().cart;", + "pm.test('item is in the cart', () => pm.expect(cartObj.line_items.length).to.be.above(0));", + "const li = cartObj.line_items[0];", + "pm.collectionVariables.set('cart_version', cartObj.cart_version);", + "pm.collectionVariables.set('line_item_id', li.line_item_id);", + "pm.collectionVariables.set('line_item_price', li.price);", + "console.log('line_item', li.line_item_id, 'price', li.price, 'cart_version', cartObj.cart_version);", + ]), + ], + request: { + method: "POST", + header: HEADERS, + body: body('{\n "items": [\n { "catalog_item_id": {{catalog_item_id}} }\n ]\n}'), + url: cart(), + }, + }, + { + name: "3. Set shipping address", + event: [ + test([ + "const cartObj = pm.response.json().cart;", + "pm.collectionVariables.set('cart_version', cartObj.cart_version);", + ]), + ], + request: { + method: "POST", + header: HEADERS, + body: body( + [ + "{", + ' "given_name": "Ada",', + ' "surname": "Lovelace",', + ' "address_1": "1 Demo Street",', + ' "city": "Austin",', + ' "state_or_region": "TX",', + ' "postal_code": "78701",', + ' "country": "US",', + ' "email": "ada@example.com",', + ' "phone_number": "+15125550100"', + "}", + ].join("\n") + ), + url: cart("set_address"), + }, + }, + { + name: "4. Validate & lock cart", + event: [ + test([ + "const cartObj = pm.response.json().cart;", + "pm.collectionVariables.set('cart_version', cartObj.cart_version);", + "pm.test('cart is locked for checkout', () => pm.expect(cartObj.is_locked).to.eql(true));", + ]), + ], + request: { + method: "POST", + header: HEADERS, + body: body('{\n "lock": true\n}'), + url: cart("validate"), + }, + }, + { + name: "5. Place order", + event: [ + prerequest(["pm.collectionVariables.set('external_order_id', 'qs-' + Date.now());"]), + test([ + "pm.test('order placed (201)', () => pm.response.to.have.status(201));", + "const res = pm.response.json();", + "pm.collectionVariables.set('external_order_id', res.external_order_id);", + "console.log('order', res.external_order_id, 'order_number', res.order_number);", + ]), + ], + request: { + method: "POST", + header: HEADERS, + body: body( + [ + "{", + ' "cart_version": "{{cart_version}}",', + ' "external_order_id": "{{external_order_id}}",', + ' "line_item_payments": [', + " {", + ' "line_item_id": "{{line_item_id}}",', + ' "price_paid": "{{line_item_price}}"', + " }", + " ]", + "}", + ].join("\n") + ), + url: cart("order_place"), + }, + }, + { + name: "6. Track order", + event: [ + test([ + "pm.test('order is retrievable', () => pm.response.to.have.status(200));", + "const order = pm.response.json().order;", + "console.log('tracked order', JSON.stringify(order));", + ]), + ], + request: { + method: "GET", + header: [], + url: url("orders", "{{external_order_id}}"), + }, + }, +]; + +const DESCRIPTION = + "End-to-end sandbox walkthrough: search -> add to cart -> set address -> " + + "validate -> place order -> track. Set `apiKey` and `socket_id` in the " + + "CatalogAPI Sandbox environment, then run the steps in order. Each step " + + "captures the IDs the next one needs."; + +// Welded into the reference collection by weld-lifecycle.js. +const folder = () => ({ name: FOLDER_NAME, description: DESCRIPTION, item: items }); + +module.exports = { FOLDER_NAME, RUNTIME_VARS, items, folder }; + +// Run directly -> emit a standalone collection (optional; the welded folder is +// the shipped form). +if (require.main === module) { + const out = process.argv[2]; + if (!out) { + console.error("usage: build-lifecycle.js "); + process.exit(1); + } + const collection = { + info: { + name: "CatalogAPI Quickstart — Order Lifecycle", + description: DESCRIPTION, + schema: "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + }, + auth: { type: "bearer", bearer: [{ key: "token", value: "{{apiKey}}", type: "string" }] }, + variable: RUNTIME_VARS.map((key) => ({ key, value: "" })), + item: items, + }; + fs.writeFileSync(out, JSON.stringify(collection, null, 2) + "\n"); + console.log(`wrote ${out} (${items.length} chained steps)`); +} diff --git a/v2/scripts/generate.sh b/v2/scripts/generate.sh new file mode 100755 index 0000000..97bae3e --- /dev/null +++ b/v2/scripts/generate.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# Regenerate the sandbox Postman collection from the CatalogAPI OpenAPI spec. +# +# Pins a local copy of the spec, converts it to a Postman collection (one folder +# per tag), then forces the sandbox host and strips auth from public endpoints. +# Re-run whenever the API spec changes. +# +# scripts/generate.sh # fetch the latest spec, then convert + polish +# scripts/generate.sh --no-fetch # convert + polish from the pinned openapi.json +# +# Run from anywhere; outputs land in the v2/ root. Requires node/npx on PATH +# (mise provides it in this repo). +set -euo pipefail + +HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # scripts/ +ROOT="$(dirname "$HERE")" # v2/ +SPEC_URL="https://api.catalogapi.com/api/v2/openapi-clean" +SANDBOX_URL="https://api.catalogapi.com/sandbox/api/v2" +SPEC="$ROOT/openapi.json" +COLLECTION="$ROOT/postman/catalogapi.postman_collection.json" + +mkdir -p "$ROOT/postman" + +# 1. Pin the spec locally (skip with --no-fetch to reuse the committed copy). +if [[ "${1:-}" != "--no-fetch" ]]; then + echo "Fetching spec -> $SPEC" + curl -fsSL "$SPEC_URL" -o "$SPEC" +fi + +# 2. Convert OpenAPI -> Postman collection, grouped into folders by tag. +echo "Converting spec -> Postman collection" +npx -y openapi-to-postmanv2 -s "$SPEC" -o "$COLLECTION" -p \ + -O folderStrategy=Tags,includeAuthInfoInExample=true + +# 3. Make it sandbox-only and strip auth from public operations (e.g. /ping). +echo "Polishing collection" +node "$HERE/polish-postman.js" "$SPEC" "$COLLECTION" "$SANDBOX_URL" + +# 4. Weld the hand-authored Order Lifecycle into the collection as a folder. +echo "Welding quickstart lifecycle folder" +node "$HERE/weld-lifecycle.js" "$COLLECTION" + +echo "Done -> $COLLECTION" diff --git a/v2/scripts/polish-postman.js b/v2/scripts/polish-postman.js new file mode 100755 index 0000000..142e181 --- /dev/null +++ b/v2/scripts/polish-postman.js @@ -0,0 +1,76 @@ +#!/usr/bin/env node +// Post-process the generated Postman collection so it is safe and runnable: +// 1. Force the baseUrl variable to the sandbox host (never production). +// 2. Strip auth from operations the spec marks public (security: []), so a +// placeholder bearer token doesn't turn an unauthenticated call (e.g. +// /ping) into a 401. +// 3. Belt-and-braces: rewrite any literal production host left in the file. +// +// Usage: node polish-postman.js + +const fs = require("fs"); + +const [, , specPath, collectionPath, sandboxUrl] = process.argv; +if (!specPath || !collectionPath || !sandboxUrl) { + console.error("usage: polish-postman.js "); + process.exit(1); +} + +const spec = JSON.parse(fs.readFileSync(specPath, "utf8")); +const collection = JSON.parse(fs.readFileSync(collectionPath, "utf8")); + +// Build the set of public operations as "METHOD /normalized/path". +// The spec uses {param}; Postman uses :param, so normalize to match. +const toPostmanPath = (p) => p.replace(/\{(\w+)\}/g, ":$1"); +const publicOps = new Set(); +for (const [path, methods] of Object.entries(spec.paths)) { + for (const [method, op] of Object.entries(methods)) { + if (!/^(get|post|put|patch|delete)$/.test(method)) continue; + if (Array.isArray(op.security) && op.security.length === 0) { + publicOps.add(`${method.toUpperCase()} ${toPostmanPath(path)}`); + } + } +} + +// 1. Sandbox-only base URL. +collection.variable = (collection.variable || []).map((v) => + v.key === "baseUrl" ? { ...v, value: sandboxUrl } : v +); + +// 1b. The bearer token is an opaque API key the server decodes (its format has +// changed over time, so the client must not parse it). Present a single key and +// do no client-side credential building. Strip any pre-request helper we may +// have added on a previous run. +collection.event = (collection.event || []).filter((e) => e.listen !== "prerequest"); + +// 2. Drop auth on public operations. +let stripped = 0; +const visit = (items) => { + for (const item of items || []) { + if (item.item) { + visit(item.item); + continue; + } + if (!item.request) continue; + const path = "/" + ((item.request.url && item.request.url.path) || []).join("/"); + if (publicOps.has(`${item.request.method} ${path}`)) { + item.request.auth = { type: "noauth" }; + stripped++; + } + } +}; +visit(collection.item); + +// 3. Scrub any literal production host, and present auth as a single opaque +// {{apiKey}} variable rather than the converter's default {{bearerToken}}. +const prodHost = sandboxUrl.replace("/sandbox/", "/"); +const json = JSON.stringify(collection, null, 2) + .split(prodHost) + .join(sandboxUrl) + .split("{{bearerToken}}") + .join("{{apiKey}}"); + +fs.writeFileSync(collectionPath, json); +console.log( + `polished: baseUrl -> sandbox, auth stripped from ${stripped} public request(s)` +); diff --git a/v2/scripts/weld-lifecycle.js b/v2/scripts/weld-lifecycle.js new file mode 100644 index 0000000..1169fe4 --- /dev/null +++ b/v2/scripts/weld-lifecycle.js @@ -0,0 +1,34 @@ +#!/usr/bin/env node +// Weld the hand-authored Order Lifecycle into the generated reference +// collection as a top-level folder, and register the runtime variables it +// chains through. Idempotent: re-running replaces any previously welded folder +// rather than duplicating it, so it is safe inside generate.sh. +// +// The folder carries no auth of its own, so it inherits the collection's +// {{apiKey}} bearer. +// +// Usage: node weld-lifecycle.js + +const fs = require("fs"); +const { FOLDER_NAME, RUNTIME_VARS, folder } = require("./build-lifecycle.js"); + +const collectionPath = process.argv[2]; +if (!collectionPath) { + console.error("usage: weld-lifecycle.js "); + process.exit(1); +} + +const collection = JSON.parse(fs.readFileSync(collectionPath, "utf8")); + +// Quickstart folder on top, with any prior copy removed first (idempotent). +collection.item = [folder(), ...(collection.item || []).filter((it) => it.name !== FOLDER_NAME)]; + +// Register the runtime variables the chain writes to (skip any already present). +const have = new Set((collection.variable || []).map((v) => v.key)); +collection.variable = [ + ...(collection.variable || []), + ...RUNTIME_VARS.filter((k) => !have.has(k)).map((key) => ({ key, value: "" })), +]; + +fs.writeFileSync(collectionPath, JSON.stringify(collection, null, 2) + "\n"); +console.log(`welded "${FOLDER_NAME}" (${folder().item.length} steps) into ${collectionPath}`);