{"info":{"_postman_id":"55048ce0-54f6-4d96-8deb-04c8a444dfb4","name":"MPower APIs v1","description":"<html><head></head><body><p>This collection contains our publicly accessible REST API's.</p>\n<p>By default test orders are not included in responses. To include test orders add the following:</p>\n<p>GET - Include withTestOrders=1 in query paramater.</p>\n<p>POST - Include withTestOrders=1 in body.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"4293453","collectionId":"55048ce0-54f6-4d96-8deb-04c8a444dfb4","publishedId":"UVR7LUM6","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"333745","highlight":"0850C7"},"publishDate":"2025-11-07T20:36:59.000Z"},"item":[{"name":"Orders","item":[{"name":"Get Order","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"order_id\", jsonData._id);  "],"type":"text/javascript","packages":{}}}],"id":"1d2bac9f-9fd3-4a9a-9d91-0c2bf715cc7b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/orders/{{orderId}}/full?withTestOrders=false","description":"<h2 id=\"get-ordersorderidfull---get-complete-order-details\">GET /orders/:orderId/full - Get Complete Order Details</h2>\n<h3 id=\"request-configuration\">Request Configuration</h3>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/orders/{{orderId}}/full</code><br /><strong>Authentication:</strong> Required (JWT Bearer token)</p>\n<hr />\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>orderId</code></td>\n<td>Order ID (numeric)</td>\n<td><strong>Yes</strong></td>\n<td>Number</td>\n<td><code>12345</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note:</strong> This endpoint uses the <strong>numeric</strong> <strong><code>orderId</code></strong>, not the MongoDB <code>_id</code>.</p>\n<hr />\n<h2 id=\"headers\">Headers</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Description</th>\n<th>Required</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td>Bearer JWT token</td>\n<td><strong>Yes</strong></td>\n<td><code>Bearer {{token}}</code></td>\n</tr>\n<tr>\n<td><code>portal</code></td>\n<td>Portal identifier (admin/store)</td>\n<td>No</td>\n<td><code>admin</code></td>\n</tr>\n<tr>\n<td><code>storeid</code></td>\n<td>Store ID for filtering</td>\n<td>No</td>\n<td><code>507f1f77bcf86cd799439011</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"query-parameters\">Query Parameters</h2>\n<p>While this endpoint doesn't have explicit query parameters in the URL, you can pass these internally through the request:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>withTestOrders</code></td>\n<td>Include test orders</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note:</strong> Test orders are automatically excluded unless this flag is set or you're accessing from admin portal.</p>\n<hr />\n<h2 id=\"response-structure\">Response Structure</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<p>Returns a comprehensive order object with all nested data fully populated.</p>\n<h3 id=\"main-order-fields\">Main Order Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>_id</code></td>\n<td>MongoDB ObjectId</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>orderId</code></td>\n<td>Numeric order ID</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>orderStatus</code></td>\n<td>Current order status</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>orderType</code></td>\n<td>Order type</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>initialType</code></td>\n<td>Initial order type</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>orderEmail</code></td>\n<td>Order contact email</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>dueDate</code></td>\n<td>Order due date</td>\n<td>String (M/D/YYYY)</td>\n</tr>\n<tr>\n<td><code>orderDate</code></td>\n<td>Order completion date</td>\n<td>Number (YYYYMMDD)</td>\n</tr>\n<tr>\n<td><code>createdDate</code></td>\n<td>Order creation date</td>\n<td>Date (ISO 8601)</td>\n</tr>\n<tr>\n<td><code>completedDate</code></td>\n<td>Order completed date</td>\n<td>Number (YYYYMMDD)</td>\n</tr>\n<tr>\n<td><code>approvedAt</code></td>\n<td>Approval timestamp</td>\n<td>Date (ISO 8601)</td>\n</tr>\n<tr>\n<td><code>approvedBy</code></td>\n<td>Customer who approved</td>\n<td>ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"financial-fields\">Financial Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>productTotal</code></td>\n<td>Total product price</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>productTotalCost</code></td>\n<td>Total product cost</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>chargeTotal</code></td>\n<td>Total charges</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>chargeTotalCost</code></td>\n<td>Total charges cost</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>taxTotal</code></td>\n<td>Total tax</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>shippingTotal</code></td>\n<td>Total shipping</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>discountTotal</code></td>\n<td>Total discounts</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>orderDiscount</code></td>\n<td>Order-level discount</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>productMargin</code></td>\n<td>Product margin</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>paymentsTotal</code></td>\n<td>Total payments received</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>POPaymentsTotal</code></td>\n<td>Total PO payments</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>balance</code></td>\n<td>Remaining balance</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>fundraisingTotal</code></td>\n<td>Fundraising amount</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>additionalOrderChargesTotal</code></td>\n<td>Additional charges</td>\n<td>Number</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"populated-objects\">Populated Objects</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Populated Data</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>storeId</code></td>\n<td>Store object</td>\n<td>Full store details including settings, emails, distributor</td>\n</tr>\n<tr>\n<td><code>customerId</code></td>\n<td>Customer object</td>\n<td>Customer with company, addresses, phone numbers, documents, notes</td>\n</tr>\n<tr>\n<td><code>distributorId</code></td>\n<td>Distributor object</td>\n<td>Distributor with payment providers, shipping credentials, addresses, logo</td>\n</tr>\n<tr>\n<td><code>salesUserId</code></td>\n<td>Sales user</td>\n<td>User with profile, photo, name</td>\n</tr>\n<tr>\n<td><code>adminUserId</code></td>\n<td>Admin user</td>\n<td>User with profile, photo, name</td>\n</tr>\n<tr>\n<td><code>createdByUserId</code></td>\n<td>Created by user</td>\n<td>User with profile, photo, name</td>\n</tr>\n<tr>\n<td><code>updatedBy</code></td>\n<td>Updated by user</td>\n<td>User details</td>\n</tr>\n<tr>\n<td><code>billingAddress</code></td>\n<td>Billing address</td>\n<td>Complete address object</td>\n</tr>\n<tr>\n<td><code>customerCompany</code></td>\n<td>Company object</td>\n<td>Company with addresses</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"complex-arrays\">Complex Arrays</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Contains</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>PurchaseOrders</code></td>\n<td>Array of purchase orders</td>\n<td>Fully populated PO objects (see PO structure below)</td>\n</tr>\n<tr>\n<td><code>ShipmentArray</code></td>\n<td>Order-level shipments</td>\n<td>Shipment objects with tracking, documents, FOB points</td>\n</tr>\n<tr>\n<td><code>Documents</code></td>\n<td>Order documents</td>\n<td>Upload objects with user who uploaded</td>\n</tr>\n<tr>\n<td><code>Payments</code></td>\n<td>Payment records</td>\n<td>Payment details (only if authenticated as admin)</td>\n</tr>\n<tr>\n<td><code>discountCodes</code></td>\n<td>Discount codes applied</td>\n<td>Discount code ObjectIds</td>\n</tr>\n<tr>\n<td><code>referenceFields</code></td>\n<td>Custom reference fields</td>\n<td>Reference field values</td>\n</tr>\n<tr>\n<td><code>trackingPackages</code></td>\n<td>Tracking packages</td>\n<td>Tracking details with events and status</td>\n</tr>\n<tr>\n<td><code>fullFilmentLogs</code></td>\n<td>Fulfillment logs</td>\n<td>Order fulfillment records</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"additional-data\">Additional Data</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>orderDevice</code></td>\n<td>Device used to create order</td>\n<td>Device details (browser, OS, etc.)</td>\n</tr>\n<tr>\n<td><code>utm</code></td>\n<td>UTM tracking data</td>\n<td>UTM parameters (source, medium, campaign)</td>\n</tr>\n<tr>\n<td><code>updatedUser</code></td>\n<td>Last user to update</td>\n<td>User details</td>\n</tr>\n<tr>\n<td><code>rushOrder</code></td>\n<td>Rush order flag</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>isFlagged</code></td>\n<td>Flagged for attention</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>firmDueDate</code></td>\n<td>Firm due date flag</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>isTest</code></td>\n<td>Test order flag</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>currency</code></td>\n<td>Currency code</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>currencyRate</code></td>\n<td>Exchange rate</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>allowCreditCardPayments</code></td>\n<td>Allow credit cards</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>allowECheckPayments</code></td>\n<td>Allow e-checks</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>allowPOPayments</code></td>\n<td>Allow PO payments</td>\n<td>Boolean</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"purchase-order-structure\">Purchase Order Structure</h2>\n<p>Each item in the <code>PurchaseOrders</code> array contains:</p>\n<h3 id=\"basic-po-fields\">Basic PO Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>friendlyPurchaseOrderDetailId</code></td>\n<td>PO ID number</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>parentPoId</code></td>\n<td>Parent PO ID (if child)</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>PO status</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>PO type</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>productId</code></td>\n<td>Product ID</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>SO</code></td>\n<td>Supplier order number</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>supplierCode</code></td>\n<td>Supplier's product code</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>supplierComments</code></td>\n<td>Comments for supplier</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"po-financial-fields\">PO Financial Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>productTotal</code></td>\n<td>Product total</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>productTotalCost</code></td>\n<td>Product cost</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>chargeTotal</code></td>\n<td>Charges total</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>chargeTotalCost</code></td>\n<td>Charges cost</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>total</code></td>\n<td>PO total</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>margin</code></td>\n<td>PO margin</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>shippingTotal</code></td>\n<td>Shipping total</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>shippingTotalCost</code></td>\n<td>Shipping cost</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>taxTotal</code></td>\n<td>Tax total</td>\n<td>Number</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"po-dates\">PO Dates</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Format</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>dueDate</code></td>\n<td>PO due date</td>\n<td>String (M/D/YYYY)</td>\n</tr>\n<tr>\n<td><code>estimatedProductionDate</code></td>\n<td>Est. production date</td>\n<td>String (M/D/YYYY)</td>\n</tr>\n<tr>\n<td><code>estimatedShipDate</code></td>\n<td>Est. ship date</td>\n<td>String (M/D/YYYY)</td>\n</tr>\n<tr>\n<td><code>estimatedDeliveryDate</code></td>\n<td>Est. delivery date</td>\n<td>String (M/D/YYYY)</td>\n</tr>\n<tr>\n<td><code>receivedDate</code></td>\n<td>Date received</td>\n<td>String (M/D/YYYY)</td>\n</tr>\n<tr>\n<td><code>shippedDate</code></td>\n<td>Date shipped</td>\n<td>String (M/D/YYYY)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"po-populated-objects\">PO Populated Objects</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Populated Data</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>supplier</code></td>\n<td>Supplier object</td>\n<td>Full supplier details with PromoStandards credentials, integrations</td>\n</tr>\n<tr>\n<td><code>machine</code></td>\n<td>Production machine</td>\n<td>Machine details</td>\n</tr>\n<tr>\n<td><code>productionManagerId</code></td>\n<td>Production manager</td>\n<td>User details</td>\n</tr>\n<tr>\n<td><code>orderStatusDetails</code></td>\n<td>Order status details</td>\n<td>Status metadata</td>\n</tr>\n<tr>\n<td><code>shipmentStatusDetails</code></td>\n<td>Shipment status</td>\n<td>Shipment metadata</td>\n</tr>\n<tr>\n<td><code>purchaseOrderEmails</code></td>\n<td>PO emails sent</td>\n<td>Email records with sender/recipient</td>\n</tr>\n<tr>\n<td><code>lastFullfilmentOrderPOStatusLog</code></td>\n<td>Last status log</td>\n<td>Log entry</td>\n</tr>\n<tr>\n<td><code>lastFullfilmentOrderPOShipmentStatusLog</code></td>\n<td>Last shipment log</td>\n<td>Log entry</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"po-complex-arrays\">PO Complex Arrays</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Contains</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>LineItemArray</code></td>\n<td>Line items</td>\n<td>Products with parts, decorations, shipments (see Line Item structure)</td>\n</tr>\n<tr>\n<td><code>ChargeArray</code></td>\n<td>Charges</td>\n<td>Setup fees, art charges, etc.</td>\n</tr>\n<tr>\n<td><code>ShipmentArray</code></td>\n<td>PO shipments</td>\n<td>Shipment addresses with tracking</td>\n</tr>\n<tr>\n<td><code>VirtualProofs</code></td>\n<td>Proof files</td>\n<td>Artwork proofs with approval status</td>\n</tr>\n<tr>\n<td><code>invoices</code></td>\n<td>PO invoices</td>\n<td>Invoice ObjectIds</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"line-item-structure\">Line Item Structure</h2>\n<p>Each item in <code>PurchaseOrders[].LineItemArray</code> contains:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>productId</code></td>\n<td>Product ID</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>quantity</code></td>\n<td>Quantity ordered</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>unitPrice</code></td>\n<td>Unit price</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>unitCost</code></td>\n<td>Unit cost</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>total</code></td>\n<td>Line total</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>totalCost</code></td>\n<td>Line cost</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>description</code></td>\n<td>Item description</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>localProduct</code></td>\n<td>Product object</td>\n<td>Fully populated product with supplier, inventory, restrictions</td>\n</tr>\n<tr>\n<td><code>PartArray</code></td>\n<td>Parts/sizes</td>\n<td>Array of part objects with shipments</td>\n</tr>\n<tr>\n<td><code>DecorationArray</code></td>\n<td>Decorations</td>\n<td>Array of decoration objects</td>\n</tr>\n<tr>\n<td><code>ShipmentArray</code></td>\n<td>Line shipments</td>\n<td>Shipment objects with tracking</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"sample-response-abbreviated\">Sample Response (Abbreviated)</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439050\",\n  \"orderId\": 12345,\n  \"orderStatus\": \"Processing\",\n  \"orderType\": \"Decorated\",\n  \"initialType\": \"New Quote Request\",\n  \"orderEmail\": \"customer@example.com\",\n  \"dueDate\": \"12/31/2025\",\n  \"orderDate\": null,\n  \"createdDate\": \"2025-11-07T10:30:00.000Z\",\n  \"productTotal\": 1250.00,\n  \"productTotalCost\": 812.50,\n  \"chargeTotal\": 125.00,\n  \"chargeTotalCost\": 75.00,\n  \"taxTotal\": 0,\n  \"shippingTotal\": 50.00,\n  \"discountTotal\": 0,\n  \"orderDiscount\": 0,\n  \"productMargin\": 35,\n  \"paymentsTotal\": 500.00,\n  \"balance\": 925.00,\n  \"rushOrder\": true,\n  \"isFlagged\": false,\n  \"firmDueDate\": true,\n  \"currency\": \"USD\",\n  \"currencyRate\": 1,\n  \"allowCreditCardPayments\": true,\n  \"allowECheckPayments\": true,\n  \"storeId\": {\n    \"_id\": \"507f1f77bcf86cd799439011\",\n    \"storeName\": \"Acme Promo Store\",\n    \"storeUrl\": \"acmepromo.com\",\n    \"StoreEmails\": [{\n      \"emailType\": \"Order Confirmation\",\n      \"email\": \"orders@acmepromo.com\"\n    }],\n    \"distributorId\": {\n      \"_id\": \"507f1f77bcf86cd799439010\",\n      \"logo\": \"https://example.com/logo.png\"\n    },\n    \"StoreFulfillment\": []\n  },\n  \"customerId\": {\n    \"_id\": \"507f1f77bcf86cd799439012\",\n    \"userId\": {\n      \"_id\": \"507f1f77bcf86cd799439013\",\n      \"firstName\": \"John\",\n      \"lastName\": \"Doe\",\n      \"email\": \"john@example.com\",\n      \"photo\": \"https://example.com/photo.jpg\"\n    },\n    \"companyId\": {\n      \"_id\": \"507f1f77bcf86cd799439015\",\n      \"companyName\": \"Acme Corporation\",\n      \"CompanyAddresses\": [],\n      \"CompanyBillingAddresses\": []\n    },\n    \"CustomerAddresses\": [],\n    \"CustomerPhoneNumbers\": [],\n    \"Documents\": []\n  },\n  \"distributorId\": {\n    \"_id\": \"507f1f77bcf86cd799439010\",\n    \"paymentProviders\": [],\n    \"allowECheckPayments\": true,\n    \"logo\": \"https://example.com/logo.png\",\n    \"shippingCredentials\": {}\n  },\n  \"salesUserId\": {\n    \"_id\": \"507f1f77bcf86cd799439013\",\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Sales\",\n    \"email\": \"jane@company.com\",\n    \"photo\": \"https://example.com/jane.jpg\"\n  },\n  \"adminUserId\": {\n    \"_id\": \"507f1f77bcf86cd799439014\",\n    \"firstName\": \"Admin\",\n    \"lastName\": \"User\",\n    \"email\": \"admin@company.com\"\n  },\n  \"createdByUserId\": {\n    \"_id\": \"507f1f77bcf86cd799439013\",\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Sales\"\n  },\n  \"PurchaseOrders\": [\n    {\n      \"friendlyPurchaseOrderDetailId\": 1,\n      \"status\": \"Sent to Supplier\",\n      \"type\": \"Standard\",\n      \"productId\": \"PROD-001\",\n      \"SO\": \"SO-2025-001\",\n      \"supplierCode\": \"ABC-12345\",\n      \"productTotal\": 625.00,\n      \"productTotalCost\": 406.25,\n      \"chargeTotal\": 62.50,\n      \"chargeTotalCost\": 37.50,\n      \"total\": 712.50,\n      \"margin\": 218.75,\n      \"dueDate\": \"12/25/2025\",\n      \"estimatedDeliveryDate\": \"12/25/2025\",\n      \"supplier\": {\n        \"_id\": \"507f1f77bcf86cd799439020\",\n        \"name\": \"Supplier ABC\",\n        \"website\": \"https://supplierabc.com\",\n        \"phone\": \"555-1234\",\n        \"isDecorator\": false,\n        \"distSupplier\": {\n          \"_id\": \"507f1f77bcf86cd799439021\",\n          \"Integrations\": []\n        }\n      },\n      \"LineItemArray\": [\n        {\n          \"productId\": \"PROD-001\",\n          \"quantity\": 100,\n          \"unitPrice\": 6.25,\n          \"unitCost\": 4.06,\n          \"total\": 625.00,\n          \"totalCost\": 406.25,\n          \"description\": \"Custom T-Shirt\",\n          \"localProduct\": {\n            \"_id\": \"507f1f77bcf86cd799439030\",\n            \"productName\": \"T-Shirt - Cotton\",\n            \"slug\": \"t-shirt-cotton\",\n            \"productId\": \"PROD-001\",\n            \"supplierCode\": \"ABC-12345\",\n            \"supplierId\": {\n              \"_id\": \"507f1f77bcf86cd799439020\",\n              \"name\": \"Supplier ABC\"\n            },\n            \"restrictions\": []\n          },\n          \"PartArray\": [\n            {\n              \"partId\": \"PART-001\",\n              \"description\": \"Size Large - Navy\",\n              \"quantity\": 50,\n              \"unitPrice\": 6.25,\n              \"unitCost\": 4.06,\n              \"ShipmentArray\": []\n            },\n            {\n              \"partId\": \"PART-002\",\n              \"description\": \"Size XL - Navy\",\n              \"quantity\": 50,\n              \"unitPrice\": 6.25,\n              \"unitCost\": 4.06,\n              \"ShipmentArray\": []\n            }\n          ],\n          \"DecorationArray\": [\n            {\n              \"decorationId\": \"DECO-001\",\n              \"decorationType\": \"Screen Print\",\n              \"location\": \"Front Center\",\n              \"colors\": 2\n            }\n          ],\n          \"ShipmentArray\": []\n        }\n      ],\n      \"ChargeArray\": [\n        {\n          \"chargeName\": \"Setup Fee\",\n          \"chargeType\": \"Setup\",\n          \"price\": 50.00,\n          \"cost\": 30.00,\n          \"quantity\": 1,\n          \"total\": 50.00,\n          \"totalCost\": 30.00\n        }\n      ],\n      \"ShipmentArray\": [\n        {\n          \"shipmentId\": 1,\n          \"companyName\": \"Acme Corp\",\n          \"contactName\": \"John Doe\",\n          \"street1\": \"123 Main St\",\n          \"city\": \"New York\",\n          \"state\": \"NY\",\n          \"postalCode\": \"10001\",\n          \"country\": \"US\",\n          \"email\": \"shipping@acme.com\",\n          \"phone\": \"555-1234\",\n          \"carrier\": \"UPS\",\n          \"carrierService\": \"Ground\",\n          \"shipmentCost\": 15.00,\n          \"shipmentPrice\": 25.00,\n          \"trackingPackages\": []\n        }\n      ],\n      \"VirtualProofs\": [],\n      \"purchaseOrderEmails\": []\n    }\n  ],\n  \"ShipmentArray\": [],\n  \"Documents\": [],\n  \"Payments\": [\n    {\n      \"_id\": \"507f1f77bcf86cd799439060\",\n      \"type\": \"Credit Card\",\n      \"amount\": 500.00,\n      \"currency\": \"USD\",\n      \"createdDate\": \"2025-11-07T10:30:00.000Z\",\n      \"userId\": \"507f1f77bcf86cd799439013\"\n    }\n  ],\n  \"discountCodes\": [],\n  \"referenceFields\": [],\n  \"trackingPackages\": [],\n  \"fullFilmentLogs\": [],\n  \"orderDevice\": {\n    \"browser\": \"Chrome\",\n    \"os\": \"Windows\",\n    \"device\": \"Desktop\"\n  },\n  \"utm\": {\n    \"utmSource\": \"google\",\n    \"utmMedium\": \"cpc\",\n    \"utmCampaign\": \"fall-2025\"\n  },\n  \"createdAt\": \"2025-11-07T10:30:00.000Z\",\n  \"updatedAt\": \"2025-11-07T14:20:00.000Z\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Order not found!\"\n}\n\n</code></pre>\n<p><strong>Causes:</strong></p>\n<ul>\n<li><p>Order doesn't exist</p>\n</li>\n<li><p>Order has been soft deleted</p>\n</li>\n<li><p>User doesn't have access to this order's distributor</p>\n</li>\n<li><p>Test order without proper access</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"authorization--access-control\">Authorization &amp; Access Control</h2>\n<h3 id=\"distributor-filtering\">Distributor Filtering</h3>\n<ul>\n<li><p>Non-admin portal users can only access orders from their own distributor</p>\n</li>\n<li><p>Admin portal users can access orders across distributors</p>\n</li>\n</ul>\n<h3 id=\"test-orders\">Test Orders</h3>\n<ul>\n<li><p>Test orders (<code>isTest: true</code>) are automatically filtered unless:</p>\n<ul>\n<li><p>Request includes <code>portal</code> header</p>\n</li>\n<li><p>Request includes <code>storeid</code> header</p>\n</li>\n<li><p>Query parameter <code>withTestOrders</code> is true</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"supplier-filtering\">Supplier Filtering</h3>\n<ul>\n<li><p>If user has a <code>supplierId</code>, only purchase orders for that supplier are returned</p>\n</li>\n<li><p>Useful for supplier portal access</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"key-features\">Key Features</h2>\n<h3 id=\"comprehensive-data-population\">Comprehensive Data Population</h3>\n<p>This endpoint returns the <strong>most complete</strong> order data available, including:</p>\n<ul>\n<li><p>✅ All nested purchase orders with line items, parts, and decorations</p>\n</li>\n<li><p>✅ Complete customer information with company and addresses</p>\n</li>\n<li><p>✅ Store and distributor details</p>\n</li>\n<li><p>✅ All team members (sales, admin, created by)</p>\n</li>\n<li><p>✅ Product details with supplier information</p>\n</li>\n<li><p>✅ Shipment tracking information</p>\n</li>\n<li><p>✅ Payment records (admin only)</p>\n</li>\n<li><p>✅ Order history and logs</p>\n</li>\n<li><p>✅ Uploaded documents</p>\n</li>\n<li><p>✅ Artwork proofs</p>\n</li>\n<li><p>✅ UTM tracking data</p>\n</li>\n<li><p>✅ Device information</p>\n</li>\n</ul>\n<h3 id=\"sensitive-data-handling\">Sensitive Data Handling</h3>\n<p>When <code>isPrivate: true</code> (which it is for this endpoint):</p>\n<ul>\n<li><p>Payment information is included</p>\n</li>\n<li><p>Sensitive store settings are hidden</p>\n</li>\n<li><p>PromoStandards credentials are excluded</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"use-cases\">Use Cases</h2>\n<ul>\n<li><p><strong>Order detail views</strong> in admin portal</p>\n</li>\n<li><p><strong>Customer order history</strong> detail page</p>\n</li>\n<li><p><strong>Order editing</strong> preparation</p>\n</li>\n<li><p><strong>Invoice generation</strong></p>\n</li>\n<li><p><strong>Fulfillment processing</strong></p>\n</li>\n<li><p><strong>Order reports</strong> with complete data</p>\n</li>\n</ul>\n","urlObject":{"path":["orders","{{orderId}}","full"],"host":["https://api.mpowerpromo.com"],"query":[{"key":"withTestOrders","value":"false"}],"variable":[]}},"response":[],"_postman_id":"1d2bac9f-9fd3-4a9a-9d91-0c2bf715cc7b"},{"name":"Get Orders","event":[{"listen":"test","script":{"id":"284f4f21-4549-4f9e-b6f3-07760a1b7b1e","exec":["var jsonData = JSON.parse(responseBody);","if(jsonData.data[0]){","    postman.setEnvironmentVariable(\"orderId\", jsonData.data[0].orderId);  ","}"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"d2ee4fb5-fda7-4a26-8eb6-1322700455ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\r\n  \"params\": {\r\n    \"filter\": {\r\n      \"orderStatus\": [\r\n        \"New Quote Request\",\r\n        \"Quote In Progress\",\r\n        \"Quote Sent\",\r\n        \"Processing\",\r\n        \"In Production\",\r\n        \"Shipped\"\r\n      ],\r\n      \"orderType\": [\r\n        \"Decorated\",\r\n        \"Blank\",\r\n        \"Sample\"\r\n      ],\r\n      \"poStatus\": [\r\n        \"New\",\r\n        \"Sent to Supplier\",\r\n        \"In Production\",\r\n        \"Shipped\"\r\n      ],\r\n      \"sales\": [\r\n        {\r\n          \"val\": \"507f1f77bcf86cd799439011\"\r\n        },\r\n        {\r\n          \"val\": \"507f1f77bcf86cd799439012\"\r\n        }\r\n      ],\r\n      \"admin\": [\r\n        {\r\n          \"val\": \"507f1f77bcf86cd799439013\"\r\n        }\r\n      ],\r\n      \"customerId\": \"507f1f77bcf86cd799439014\",\r\n      \"storeId\": [\r\n        \"507f1f77bcf86cd799439015\",\r\n        \"507f1f77bcf86cd799439016\"\r\n      ],\r\n      \"distributorId\": [\r\n        {\r\n          \"value\": \"507f1f77bcf86cd799439017\"\r\n        }\r\n      ],\r\n      \"purchaseOrdersSuppliers\": [\r\n        \"507f1f77bcf86cd799439018\",\r\n        \"507f1f77bcf86cd799439019\"\r\n      ],\r\n      \"sourceOrderType\": [\r\n        \"New Quote Request\",\r\n        \"Reorder Request\",\r\n        \"Customer Initiated\"\r\n      ],\r\n      \"initialType\": [\r\n        \"web\",\r\n        \"non-web\"\r\n      ],\r\n      \"firmDueDate\": [\r\n        {\r\n          \"name\": \"Yes\"\r\n        }\r\n      ],\r\n      \"rushOrder\": [\r\n        {\r\n          \"name\": \"Yes\"\r\n        }\r\n      ],\r\n      \"isFlagged\": [\r\n        {\r\n          \"name\": \"No\"\r\n        }\r\n      ],\r\n      \"createdAt\": {\r\n        \"startDate\": \"2025-01-01\",\r\n        \"endDate\": \"2025-12-31\"\r\n      }\r\n    },\r\n    \"query\": \"\",\r\n    \"companyId\": \"\",\r\n    \"orderDateRange\": {\r\n      \"startDate\": \"2025-10-01\",\r\n      \"endDate\": \"2025-10-31\"\r\n    },\r\n    \"createdAtRange\": {\r\n      \"startDate\": \"2025-11-01\",\r\n      \"endDate\": \"2025-11-30\"\r\n    },\r\n    \"excludeTestOrders\": true,\r\n    \"existOrderDate\": false,\r\n    \"deletedOnly\": false,\r\n    \"withTestOrders\": false,\r\n    \"withoutZoho\": false,\r\n    \"viewAllDistributorCustomerOrder\": false,\r\n    \"excludeStatuses\": [\r\n      \"Deleted\",\r\n      \"Canceled\",\r\n      \"Archive\"\r\n    ],\r\n    \"excludeStatus\": [\r\n      \"Canceled\",\r\n      \"Archive\"\r\n    ],\r\n    \"page\": 1,\r\n    \"limit\": 50,\r\n    \"ascending\": 0,\r\n    \"orderBy\": \"createdAt\",\r\n    \"onlyCount\": false,\r\n    \"populate\": [\r\n      {\r\n        \"path\": \"billingAddress\"\r\n      },\r\n      {\r\n        \"path\": \"parent\"\r\n      }\r\n    ],\r\n    \"forcePopulate\": false,\r\n    \"withReferenceFields\": true,\r\n    \"withDistributor\": true,\r\n    \"withSupplier\": true,\r\n    \"withPayments\": true,\r\n    \"withPurchaseOrders\": true,\r\n    \"withDocuments\": true,\r\n    \"withAllowanceCredits\": true,\r\n    \"withProductionPurchaseOrders\": false,\r\n    \"totalStores\": true,\r\n    \"fields\": [\r\n      \"_id\",\r\n      \"orderId\",\r\n      \"orderStatus\",\r\n      \"orderType\",\r\n      \"initialType\",\r\n      \"orderTotal\",\r\n      \"productTotal\",\r\n      \"balance\",\r\n      \"dueDate\",\r\n      \"orderDate\",\r\n      \"rushOrder\",\r\n      \"firmDueDate\",\r\n      \"isFlagged\",\r\n      \"customerId\",\r\n      \"storeId\",\r\n      \"salesUserId\",\r\n      \"adminUserId\",\r\n      \"distributorId\",\r\n      \"createdAt\",\r\n      \"updatedAt\",\r\n      \"createdByUserId\",\r\n      \"PurchaseOrders\",\r\n      \"Payments\",\r\n      \"Documents\",\r\n      \"ShipmentArray\"\r\n    ],\r\n    \"exportFormat\": \"\",\r\n    \"exportFields\": []\r\n  }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/load-orders","description":"<h2 id=\"post-load-orders---get-orders-list\">POST /load-orders - Get Orders List</h2>\n<h3 id=\"request-configuration\">Request Configuration</h3>\n<p><strong>Method:</strong> <code>POST</code> or <code>GET</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/load-orders</code><br /><strong>Authentication:</strong> Required (JWT Bearer token)<br /><strong>API Token Access:</strong> Supported</p>\n<p><strong>Note:</strong> POST method is preferred when sending complex filter parameters in the request body.</p>\n<hr />\n<h2 id=\"headers\">Headers</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Description</th>\n<th>Required</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td>Bearer JWT token</td>\n<td><strong>Yes</strong></td>\n<td><code>Bearer {{token}}</code></td>\n</tr>\n<tr>\n<td><code>Content-Type</code></td>\n<td>Request content type</td>\n<td><strong>Yes</strong> (POST)</td>\n<td><code>application/json</code></td>\n</tr>\n<tr>\n<td><code>portal</code></td>\n<td>Portal identifier (admin/store)</td>\n<td>No</td>\n<td><code>admin</code></td>\n</tr>\n<tr>\n<td><code>storeid</code></td>\n<td>Store ID</td>\n<td>No</td>\n<td><code>507f1f77bcf86cd799439011</code></td>\n</tr>\n<tr>\n<td><code>progress</code></td>\n<td>Check export progress</td>\n<td>No</td>\n<td><code>true</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"request-body-structure\">Request Body Structure</h2>\n<p>The request body should contain a <code>params</code> object with filter, pagination, and population options:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"filter\": {},\n    \"page\": 1,\n    \"limit\": 25,\n    \"ascending\": 0,\n    \"orderBy\": \"createdAt\",\n    \"populate\": [],\n    \"fields\": []\n  }\n}\n\n</code></pre>\n<hr />\n<h2 id=\"request-body-parameters\">Request Body Parameters</h2>\n<h3 id=\"table-1-pagination--sorting\">Table 1: Pagination &amp; Sorting</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Default</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>page</code></td>\n<td>Page number</td>\n<td>Number</td>\n<td><code>1</code></td>\n<td><code>page: 1</code></td>\n</tr>\n<tr>\n<td><code>limit</code></td>\n<td>Results per page (max 100)</td>\n<td>Number</td>\n<td><code>25</code></td>\n<td><code>limit: 50</code></td>\n</tr>\n<tr>\n<td><code>ascending</code></td>\n<td>Sort direction (1=asc, 0=desc)</td>\n<td>Number</td>\n<td><code>0</code></td>\n<td><code>ascending: 1</code></td>\n</tr>\n<tr>\n<td><code>orderBy</code></td>\n<td>Field to sort by</td>\n<td>String</td>\n<td><code>\"createdAt\"</code></td>\n<td><code>\"orderId\"</code></td>\n</tr>\n<tr>\n<td><code>onlyCount</code></td>\n<td>Return only count</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n<td><code>true</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-2-filter-object-parameters\">Table 2: Filter Object Parameters</h3>\n<p>All these go inside the <code>filter</code> object:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>orderStatus</code></td>\n<td>Filter by order status</td>\n<td>Array[String]</td>\n<td><code>[\"Processing\", \"Shipped\"]</code></td>\n</tr>\n<tr>\n<td><code>orderType</code></td>\n<td>Filter by order type</td>\n<td>Array[String]</td>\n<td><code>[\"Decorated\"]</code></td>\n</tr>\n<tr>\n<td><code>poStatus</code></td>\n<td>Filter by PO status</td>\n<td>Array[String]</td>\n<td><code>[\"In Production\"]</code></td>\n</tr>\n<tr>\n<td><code>salesUserId</code></td>\n<td>Filter by sales user</td>\n<td>Array[ObjectId]</td>\n<td><code>[\"507f1f77bcf86cd799439011\"]</code></td>\n</tr>\n<tr>\n<td><code>adminUserId</code></td>\n<td>Filter by admin user</td>\n<td>Array[ObjectId]</td>\n<td><code>[\"507f1f77bcf86cd799439012\"]</code></td>\n</tr>\n<tr>\n<td><code>sales</code></td>\n<td>Sales user filter (alternative)</td>\n<td>Array[Object]</td>\n<td><code>[{\"val\": \"507f...\"}]</code></td>\n</tr>\n<tr>\n<td><code>admin</code></td>\n<td>Admin user filter (alternative)</td>\n<td>Array[Object]</td>\n<td><code>[{\"val\": \"507f...\"}]</code></td>\n</tr>\n<tr>\n<td><code>customerId</code></td>\n<td>Filter by customer</td>\n<td>ObjectId</td>\n<td><code>\"507f1f77bcf86cd799439013\"</code></td>\n</tr>\n<tr>\n<td><code>storeId</code></td>\n<td>Filter by store</td>\n<td>Array or ObjectId</td>\n<td><code>[\"507f1f77bcf86cd799439014\"]</code></td>\n</tr>\n<tr>\n<td><code>distributorId</code></td>\n<td>Filter by distributor</td>\n<td>Array[Object]</td>\n<td><code>[{\"value\": \"507f...\"}]</code></td>\n</tr>\n<tr>\n<td><code>purchaseOrdersSuppliers</code></td>\n<td>Filter by supplier</td>\n<td>Array[ObjectId]</td>\n<td><code>[\"507f1f77bcf86cd799439015\"]</code></td>\n</tr>\n<tr>\n<td><code>sourceOrderType</code></td>\n<td>Filter by initial type</td>\n<td>Array[String]</td>\n<td><code>[\"New Quote Request\"]</code></td>\n</tr>\n<tr>\n<td><code>initialType</code></td>\n<td>Web vs non-web</td>\n<td>Array[String]</td>\n<td><code>[\"web\", \"non-web\"]</code></td>\n</tr>\n<tr>\n<td><code>firmDueDate</code></td>\n<td>Filter by firm due date</td>\n<td>Array[Object]</td>\n<td><code>[{\"name\": \"Yes\"}]</code></td>\n</tr>\n<tr>\n<td><code>rushOrder</code></td>\n<td>Filter by rush order</td>\n<td>Array[Object]</td>\n<td><code>[{\"name\": \"Yes\"}]</code></td>\n</tr>\n<tr>\n<td><code>isFlagged</code></td>\n<td>Filter by flagged</td>\n<td>Array[Object]</td>\n<td><code>[{\"name\": \"Yes\"}]</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-3-date-range-filters\">Table 3: Date Range Filters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>createdAt</code></td>\n<td>Created date range</td>\n<td>Object</td>\n<td><code>{\"startDate\": \"2025-01-01\", \"endDate\": \"2025-12-31\"}</code></td>\n</tr>\n<tr>\n<td><code>orderDateRange</code></td>\n<td>Order date range</td>\n<td>Object</td>\n<td><code>{\"startDate\": \"2025-01-01\", \"endDate\": \"2025-12-31\"}</code></td>\n</tr>\n<tr>\n<td><code>createdAtRange</code></td>\n<td>Alternative created range</td>\n<td>Object</td>\n<td><code>{\"startDate\": \"2025-01-01\", \"endDate\": \"2025-12-31\"}</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-4-search--query\">Table 4: Search &amp; Query</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>query</code></td>\n<td>Search by order ID, total, customer, store, reference fields</td>\n<td>String</td>\n<td><code>\"12345\"</code></td>\n</tr>\n<tr>\n<td><code>companyId</code></td>\n<td>Filter by company</td>\n<td>ObjectId</td>\n<td><code>\"507f1f77bcf86cd799439016\"</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-5-boolean-filters\">Table 5: Boolean Filters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>excludeTestOrders</code></td>\n<td>Exclude test orders</td>\n<td>Boolean</td>\n<td>Varies by context</td>\n</tr>\n<tr>\n<td><code>existOrderDate</code></td>\n<td>Only orders with order date</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>deletedOnly</code></td>\n<td>Show only deleted orders</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>withTestOrders</code></td>\n<td>Include test orders</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>withoutZoho</code></td>\n<td>Exclude Zoho synced orders</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>viewAllDistributorCustomerOrder</code></td>\n<td>View all distributor orders</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-6-data-population-options\">Table 6: Data Population Options</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>populate</code></td>\n<td>Custom population array</td>\n<td>Array[Object/String]</td>\n<td><code>[]</code></td>\n</tr>\n<tr>\n<td><code>forcePopulate</code></td>\n<td>Force specific populate only</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>withReferenceFields</code></td>\n<td>Include reference fields</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>withDistributor</code></td>\n<td>Populate distributor</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>withSupplier</code></td>\n<td>Populate supplier</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>withPayments</code></td>\n<td>Include payment records</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>withPurchaseOrders</code></td>\n<td>Include purchase orders</td>\n<td>Boolean</td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td><code>withDocuments</code></td>\n<td>Include documents</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>withAllowanceCredits</code></td>\n<td>Include allowance credits</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>withProductionPurchaseOrders</code></td>\n<td>Filter production POs by supplier</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-7-special-options\">Table 7: Special Options</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>excludeStatus</code></td>\n<td>Exclude PO statuses</td>\n<td>Array[String]</td>\n</tr>\n<tr>\n<td><code>excludeStatuses</code></td>\n<td>Exclude order statuses</td>\n<td>Array[String]</td>\n</tr>\n<tr>\n<td><code>fields</code></td>\n<td>Specific fields to return</td>\n<td>Array[String]</td>\n</tr>\n<tr>\n<td><code>totalStores</code></td>\n<td>Include store totals</td>\n<td>Boolean</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-8-export-options\">Table 8: Export Options</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>exportFormat</code></td>\n<td>Export format (csv/excel)</td>\n<td>String</td>\n<td><code>\"csv\"</code></td>\n</tr>\n<tr>\n<td><code>exportFields</code></td>\n<td>Fields to export</td>\n<td>Array[String]</td>\n<td><code>[\"orderId\", \"orderTotal\"]</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"sample-request-bodies\">Sample Request Bodies</h2>\n<h3 id=\"1-basic-order-list-default\">1. Basic Order List (Default)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"page\": 1,\n    \"limit\": 25,\n    \"ascending\": 0,\n    \"orderBy\": \"createdAt\"\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"2-filter-by-order-status\">2. Filter by Order Status</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"filter\": {\n      \"orderStatus\": [\"Processing\", \"In Production\", \"Shipped\"]\n    },\n    \"page\": 1,\n    \"limit\": 50,\n    \"ascending\": 0,\n    \"orderBy\": \"updatedAt\"\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"3-filter-by-sales-user\">3. Filter by Sales User</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"filter\": {\n      \"sales\": [\n        {\"val\": \"507f1f77bcf86cd799439011\"}\n      ]\n    },\n    \"page\": 1,\n    \"limit\": 25\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"4-search-by-order-id-or-customer\">4. Search by Order ID or Customer</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"query\": \"12345\",\n    \"page\": 1,\n    \"limit\": 25\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"5-date-range-filter\">5. Date Range Filter</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"filter\": {\n      \"createdAt\": {\n        \"startDate\": \"2025-01-01\",\n        \"endDate\": \"2025-12-31\"\n      }\n    },\n    \"orderDateRange\": {\n      \"startDate\": \"2025-10-01\",\n      \"endDate\": \"2025-10-31\"\n    },\n    \"page\": 1,\n    \"limit\": 50\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"6-rush-orders-with-payments\">6. Rush Orders with Payments</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"filter\": {\n      \"rushOrder\": [{\"name\": \"Yes\"}],\n      \"orderStatus\": [\"Processing\", \"In Production\"]\n    },\n    \"withPayments\": true,\n    \"page\": 1,\n    \"limit\": 25,\n    \"ascending\": 0,\n    \"orderBy\": \"dueDate\"\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"7-filter-by-store-and-supplier\">7. Filter by Store and Supplier</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"filter\": {\n      \"storeId\": [\"507f1f77bcf86cd799439011\"],\n      \"purchaseOrdersSuppliers\": [\"507f1f77bcf86cd799439020\"]\n    },\n    \"withSupplier\": true,\n    \"page\": 1,\n    \"limit\": 25\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"8-advanced-multiple-filters-with-population\">8. Advanced: Multiple Filters with Population</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"filter\": {\n      \"orderStatus\": [\"Processing\", \"Shipped\"],\n      \"orderType\": [\"Decorated\"],\n      \"sales\": [{\"val\": \"507f1f77bcf86cd799439011\"}],\n      \"firmDueDate\": [{\"name\": \"Yes\"}],\n      \"createdAt\": {\n        \"startDate\": \"2025-11-01\",\n        \"endDate\": \"2025-11-30\"\n      }\n    },\n    \"withPayments\": true,\n    \"withSupplier\": true,\n    \"withDistributor\": true,\n    \"withReferenceFields\": true,\n    \"page\": 1,\n    \"limit\": 50,\n    \"ascending\": 1,\n    \"orderBy\": \"orderId\"\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"9-custom-field-selection\">9. Custom Field Selection</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"filter\": {\n      \"orderStatus\": [\"Processing\"]\n    },\n    \"fields\": [\n      \"orderId\",\n      \"orderStatus\",\n      \"orderTotal\",\n      \"customerId\",\n      \"dueDate\",\n      \"createdAt\"\n    ],\n    \"page\": 1,\n    \"limit\": 100\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"10-export-orders-to-csv\">10. Export Orders to CSV</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"filter\": {\n      \"orderStatus\": [\"Completed\"],\n      \"orderDateRange\": {\n        \"startDate\": \"2025-10-01\",\n        \"endDate\": \"2025-10-31\"\n      }\n    },\n    \"exportFormat\": \"csv\",\n    \"exportFields\": [\n      \"orderId\",\n      \"orderStatus\",\n      \"orderTotal\",\n      \"orderDate\",\n      \"customerId.firstName\",\n      \"customerId.lastName\"\n    ]\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"11-get-only-count\">11. Get Only Count</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"filter\": {\n      \"orderStatus\": [\"New Quote Request\"]\n    },\n    \"onlyCount\": true\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"12-exclude-test-orders-and-specific-statuses\">12. Exclude Test Orders and Specific Statuses</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"filter\": {},\n    \"excludeTestOrders\": true,\n    \"excludeStatuses\": [\"Deleted\", \"Canceled\"],\n    \"page\": 1,\n    \"limit\": 25\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"13-complete-example-with-all-options\">13. Complete Example with All Options</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"filter\": {\n      \"orderStatus\": [\"Processing\", \"In Production\"],\n      \"orderType\": [\"Decorated\"],\n      \"sales\": [{\"val\": \"507f1f77bcf86cd799439011\"}],\n      \"admin\": [{\"val\": \"507f1f77bcf86cd799439012\"}],\n      \"storeId\": [\"507f1f77bcf86cd799439014\"],\n      \"rushOrder\": [{\"name\": \"Yes\"}],\n      \"firmDueDate\": [{\"name\": \"Yes\"}],\n      \"createdAt\": {\n        \"startDate\": \"2025-11-01\",\n        \"endDate\": \"2025-11-30\"\n      }\n    },\n    \"excludeTestOrders\": true,\n    \"excludeStatuses\": [\"Deleted\", \"Canceled\", \"Archive\"],\n    \"withPayments\": true,\n    \"withSupplier\": true,\n    \"withDistributor\": true,\n    \"withPurchaseOrders\": true,\n    \"withDocuments\": true,\n    \"withReferenceFields\": true,\n    \"totalStores\": true,\n    \"page\": 1,\n    \"limit\": 50,\n    \"ascending\": 0,\n    \"orderBy\": \"createdAt\"\n  }\n}\n\n</code></pre>\n<hr />\n<h2 id=\"response-structure\">Response Structure</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"_id\": \"507f1f77bcf86cd799439050\",\n      \"orderId\": 12345,\n      \"orderStatus\": \"Processing\",\n      \"orderType\": \"Decorated\",\n      \"initialType\": \"New Quote Request\",\n      \"orderTotal\": 1250.00,\n      \"balance\": 625.00,\n      \"dueDate\": \"12/31/2025\",\n      \"rushOrder\": true,\n      \"firmDueDate\": true,\n      \"isFlagged\": false,\n      \"source\": \"app\",\n      \"customerId\": {\n        \"_id\": \"507f1f77bcf86cd799439012\",\n        \"firstName\": \"John\",\n        \"lastName\": \"Doe\",\n        \"email\": \"john@example.com\"\n      },\n      \"storeId\": {\n        \"_id\": \"507f1f77bcf86cd799439011\",\n        \"storeName\": \"Acme Promo\"\n      },\n      \"salesUserId\": {\n        \"_id\": \"507f1f77bcf86cd799439013\",\n        \"firstName\": \"Jane\",\n        \"lastName\": \"Sales\"\n      },\n      \"adminUserId\": {\n        \"_id\": \"507f1f77bcf86cd799439014\",\n        \"firstName\": \"Admin\",\n        \"lastName\": \"User\"\n      },\n      \"PurchaseOrders\": [],\n      \"createdAt\": \"2025-11-07T10:30:00.000Z\",\n      \"updatedAt\": \"2025-11-07T14:20:00.000Z\"\n    }\n  ],\n  \"count\": 1,\n  \"totalStores\": [\n    {\n      \"_id\": \"507f1f77bcf86cd799439011\",\n      \"count\": 150,\n      \"store\": {\n        \"_id\": \"507f1f77bcf86cd799439011\",\n        \"storeName\": \"Acme Promo\"\n      }\n    }\n  ],\n  \"referenceFields\": []\n}\n\n</code></pre>\n<h3 id=\"count-only-response\">Count Only Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"count\": 150\n}\n\n</code></pre>\n<h3 id=\"export-progress-response\">Export Progress Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"progress\": 0.45\n}\n\n</code></pre>\n<hr />\n<h2 id=\"response-fields\">Response Fields</h2>\n<h3 id=\"main-response-object\">Main Response Object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data</code></td>\n<td>Array of orders</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>count</code></td>\n<td>Total matching orders</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>totalStores</code></td>\n<td>Store breakdown (if requested)</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>referenceFields</code></td>\n<td>Reference fields summary (if requested)</td>\n<td>Array[Object]</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"order-object-fields-default-population\">Order Object Fields (Default Population)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>_id</code></td>\n<td>MongoDB ObjectId</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>orderId</code></td>\n<td>Numeric order ID</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>orderStatus</code></td>\n<td>Order status</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>orderType</code></td>\n<td>Order type</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>initialType</code></td>\n<td>Initial type</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>\"web\" or \"app\"</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>orderTotal</code></td>\n<td>Total amount</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>balance</code></td>\n<td>Remaining balance</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>dueDate</code></td>\n<td>Due date</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>orderDate</code></td>\n<td>Order date</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>rushOrder</code></td>\n<td>Rush flag</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>firmDueDate</code></td>\n<td>Firm due date flag</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>isFlagged</code></td>\n<td>Flagged flag</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>customerId</code></td>\n<td>Customer object (populated)</td>\n<td>Object</td>\n</tr>\n<tr>\n<td><code>storeId</code></td>\n<td>Store object (populated)</td>\n<td>Object</td>\n</tr>\n<tr>\n<td><code>salesUserId</code></td>\n<td>Sales user (populated)</td>\n<td>Object</td>\n</tr>\n<tr>\n<td><code>adminUserId</code></td>\n<td>Admin user (populated)</td>\n<td>Object</td>\n</tr>\n<tr>\n<td><code>PurchaseOrders</code></td>\n<td>Purchase orders (if included)</td>\n<td>Array</td>\n</tr>\n<tr>\n<td><code>Payments</code></td>\n<td>Payment records (if requested)</td>\n<td>Array</td>\n</tr>\n<tr>\n<td><code>Documents</code></td>\n<td>Documents (if requested)</td>\n<td>Array</td>\n</tr>\n<tr>\n<td><code>createdAt</code></td>\n<td>Creation timestamp</td>\n<td>Date</td>\n</tr>\n<tr>\n<td><code>updatedAt</code></td>\n<td>Update timestamp</td>\n<td>Date</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"authorization--access-control\">Authorization &amp; Access Control</h2>\n<h3 id=\"distributor-filtering\">Distributor Filtering</h3>\n<ul>\n<li><p>Users automatically see only orders from their distributor</p>\n</li>\n<li><p>Super admins can use <code>allDistributors</code> filter</p>\n</li>\n<li><p>Use <code>viewAllDistributorCustomerOrder</code> with proper permissions</p>\n</li>\n</ul>\n<h3 id=\"supplier-access\">Supplier Access</h3>\n<ul>\n<li><p>Supplier users only see orders with POs assigned to them</p>\n</li>\n<li><p>Use <code>withProductionPurchaseOrders: true</code> for supplier filtering</p>\n</li>\n</ul>\n<h3 id=\"store-access\">Store Access</h3>\n<ul>\n<li>Store users only see orders from their specific store</li>\n</ul>\n<h3 id=\"test-orders\">Test Orders</h3>\n<ul>\n<li><p>Automatically excluded unless:</p>\n<ul>\n<li><p><code>withTestOrders: true</code> is set</p>\n</li>\n<li><p><code>portal</code> or <code>storeid</code> header is present</p>\n</li>\n</ul>\n</li>\n</ul>\n<hr />\n<h2 id=\"special-features\">Special Features</h2>\n<h3 id=\"smart-search\">Smart Search</h3>\n<p>The <code>query</code> parameter searches across:</p>\n<ul>\n<li><p>Order ID (numeric match)</p>\n</li>\n<li><p>Order total (price match)</p>\n</li>\n<li><p>Customer name, email, company</p>\n</li>\n<li><p>Store name</p>\n</li>\n<li><p>Reference field values</p>\n</li>\n</ul>\n<h3 id=\"date-formats\">Date Formats</h3>\n<ul>\n<li><p><code>createdAt</code> dates: ISO 8601 strings (<code>\"2025-11-07\"</code>)</p>\n</li>\n<li><p><code>orderDateRange</code> dates: ISO 8601 strings (<code>\"2025-11-07\"</code>)</p>\n</li>\n<li><p>Results include both web and server-side formatted dates</p>\n</li>\n</ul>\n<h3 id=\"sorting-options\">Sorting Options</h3>\n<p>Common <code>orderBy</code> values:</p>\n<ul>\n<li><p><code>\"createdAt\"</code> - Creation date (default)</p>\n</li>\n<li><p><code>\"updatedAt\"</code> - Last updated</p>\n</li>\n<li><p><code>\"orderId\"</code> - Order number</p>\n</li>\n<li><p><code>\"dueDate\"</code> - Due date</p>\n</li>\n<li><p><code>\"orderTotal\"</code> - Total amount</p>\n</li>\n<li><p><code>\"customerId.firstName\"</code> - Customer name</p>\n</li>\n<li><p><code>\"salesUserId.firstName\"</code> - Sales rep name</p>\n</li>\n<li><p><code>\"storeId.storeName\"</code> - Store name</p>\n</li>\n</ul>\n<h3 id=\"export-functionality\">Export Functionality</h3>\n<p>When <code>exportFormat</code> is specified:</p>\n<ol>\n<li><p>First request initiates export (returns progress)</p>\n</li>\n<li><p>Subsequent requests check progress</p>\n</li>\n<li><p>Use <code>progress</code> header to check status</p>\n</li>\n<li><p>Export completes when progress reaches 1.0</p>\n</li>\n</ol>\n<hr />\n<h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"200-ok-empty-result\">200 OK (Empty Result)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [],\n  \"count\": 0\n}\n\n</code></pre>\n<p><strong>Causes:</strong></p>\n<ul>\n<li><p>No orders match filters</p>\n</li>\n<li><p>User doesn't have access to any orders</p>\n</li>\n</ul>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<p><strong>Causes:</strong></p>\n<ul>\n<li>Missing or invalid authentication token</li>\n</ul>\n<hr />\n<h2 id=\"use-cases\">Use Cases</h2>\n<ul>\n<li><p><strong>Order list views</strong> in admin portal</p>\n</li>\n<li><p><strong>Customer order history</strong> lists</p>\n</li>\n<li><p><strong>Sales dashboard</strong> filtered by rep</p>\n</li>\n<li><p><strong>Store order reports</strong></p>\n</li>\n<li><p><strong>Production queue</strong> for suppliers</p>\n</li>\n<li><p><strong>Order exports</strong> for accounting</p>\n</li>\n<li><p><strong>Analytics and reporting</strong></p>\n</li>\n</ul>\n<hr />\n<h2 id=\"performance-tips\">Performance Tips</h2>\n<ol>\n<li><p><strong>Use</strong> <strong><code>limit</code></strong> wisely - max is 100</p>\n</li>\n<li><p><strong>Request only needed fields</strong> with <code>fields</code> parameter</p>\n</li>\n<li><p><strong>Avoid unnecessary population</strong> - only set <code>with\\\\\\\\*</code> flags you need</p>\n</li>\n<li><p><strong>Use specific filters</strong> instead of broad searches</p>\n</li>\n<li><p><strong>Cache frequently accessed lists</strong></p>\n</li>\n</ol>\n","urlObject":{"path":["load-orders"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"d2ee4fb5-fda7-4a26-8eb6-1322700455ad"},{"name":"Create Order","event":[{"listen":"test","script":{"id":"284f4f21-4549-4f9e-b6f3-07760a1b7b1e","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"orderId\", jsonData.orderId);  "],"type":"text/javascript","packages":{},"requests":{}}}],"id":"86581b3d-e702-49d0-88ff-9eec3da79507","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\r\n  \"order\": {\r\n    \"storeId\": \"507f1f77bcf86cd799439011\",\r\n    \"customerId\": \"507f1f77bcf86cd799439012\",\r\n    \"customerCompany\": \"507f1f77bcf86cd799439015\",\r\n    \"orderEmail\": \"customer@example.com\",\r\n    \"salesUserId\": \"507f1f77bcf86cd799439013\",\r\n    \"adminUserId\": \"507f1f77bcf86cd799439014\",\r\n    \"productTotal\": 1250.00,\r\n    \"productTotalCost\": 812.50,\r\n    \"chargeTotal\": 125.00,\r\n    \"chargeTotalCost\": 75.00,\r\n    \"taxTotal\": 0,\r\n    \"shippingTotal\": 50.00,\r\n    \"discountTotal\": 0,\r\n    \"orderDiscount\": 0,\r\n    \"productMargin\": 35,\r\n    \"rushOrder\": true,\r\n    \"isFlagged\": false,\r\n    \"firmDueDate\": true,\r\n    \"dueDate\": \"12/31/2025\",\r\n    \"allowCreditCardPayments\": true,\r\n    \"allowECheckPayments\": true,\r\n    \"allowPOPayments\": false,\r\n    \"currency\": \"USD\",\r\n    \"currencyRate\": 1,\r\n    \"initialType\": \"New Quote Request\",\r\n    \"PurchaseOrders\": [\r\n      {\r\n        \"status\": \"New\",\r\n        \"type\": \"Standard\",\r\n        \"supplier\": \"507f1f77bcf86cd799439020\",\r\n        \"supplierCode\": \"ABC-12345\",\r\n        \"productId\": \"PROD-001\",\r\n        \"SO\": \"SO-2025-001\",\r\n        \"productTotal\": 625.00,\r\n        \"productTotalCost\": 406.25,\r\n        \"chargeTotal\": 62.50,\r\n        \"chargeTotalCost\": 37.50,\r\n        \"total\": 712.50,\r\n        \"margin\": 218.75,\r\n        \"shippingTotal\": 25.00,\r\n        \"shippingTotalCost\": 15.00,\r\n        \"taxTotal\": 0,\r\n        \"rush\": true,\r\n        \"taxExempt\": false,\r\n        \"dueDate\": \"12/25/2025\",\r\n        \"estimatedProductionDate\": \"12/10/2025\",\r\n        \"estimatedShipDate\": \"12/20/2025\",\r\n        \"estimatedDeliveryDate\": \"12/25/2025\",\r\n        \"supplierComments\": \"Rush order - please expedite production\",\r\n        \"LineItemArray\": [\r\n          {\r\n            \"productId\": \"PROD-001\",\r\n            \"quantity\": 100,\r\n            \"unitPrice\": 6.25,\r\n            \"unitCost\": 4.06,\r\n            \"total\": 625.00,\r\n            \"totalCost\": 406.25,\r\n            \"description\": \"Custom T-Shirt - Navy Blue\",\r\n            \"PartArray\": [\r\n              {\r\n                \"partId\": \"PART-001\",\r\n                \"description\": \"Size Large\",\r\n                \"quantity\": 50,\r\n                \"unitPrice\": 6.25,\r\n                \"unitCost\": 4.06\r\n              },\r\n              {\r\n                \"partId\": \"PART-002\",\r\n                \"description\": \"Size XL\",\r\n                \"quantity\": 50,\r\n                \"unitPrice\": 6.25,\r\n                \"unitCost\": 4.06\r\n              }\r\n            ],\r\n            \"DecorationArray\": [\r\n              {\r\n                \"decorationId\": \"DECO-001\",\r\n                \"decorationType\": \"Screen Print\",\r\n                \"location\": \"Front Center\",\r\n                \"colors\": 2,\r\n                \"quantity\": 100,\r\n                \"unitPrice\": 0,\r\n                \"unitCost\": 0\r\n              }\r\n            ]\r\n          }\r\n        ],\r\n        \"ChargeArray\": [\r\n          {\r\n            \"chargeName\": \"Setup Fee\",\r\n            \"chargeType\": \"Setup\",\r\n            \"price\": 50.00,\r\n            \"cost\": 30.00,\r\n            \"quantity\": 1,\r\n            \"total\": 50.00,\r\n            \"totalCost\": 30.00,\r\n            \"margin\": 20.00\r\n          },\r\n          {\r\n            \"chargeName\": \"Art Charge\",\r\n            \"chargeType\": \"Art\",\r\n            \"price\": 12.50,\r\n            \"cost\": 7.50,\r\n            \"quantity\": 1,\r\n            \"total\": 12.50,\r\n            \"totalCost\": 7.50,\r\n            \"margin\": 5.00\r\n          }\r\n        ],\r\n        \"ShipmentArray\": [\r\n          {\r\n            \"companyName\": \"Acme Corporation\",\r\n            \"contactName\": \"John Doe\",\r\n            \"street1\": \"123 Business Ave\",\r\n            \"street2\": \"Suite 100\",\r\n            \"city\": \"New York\",\r\n            \"state\": \"NY\",\r\n            \"postalCode\": \"10001\",\r\n            \"country\": \"US\",\r\n            \"email\": \"shipping@acmecorp.com\",\r\n            \"phone\": \"555-123-4567\",\r\n            \"carrier\": \"UPS\",\r\n            \"carrierService\": \"Ground\",\r\n            \"shipmentCost\": 15.00,\r\n            \"shipmentPrice\": 25.00,\r\n            \"access\": \"Customer\",\r\n            \"Quantity\": {\r\n              \"value\": 100,\r\n              \"uom\": \"EA\"\r\n            }\r\n          }\r\n        ],\r\n        \"VirtualProofs\": []\r\n      },\r\n      {\r\n        \"status\": \"New\",\r\n        \"type\": \"Standard\",\r\n        \"supplier\": \"507f1f77bcf86cd799439021\",\r\n        \"supplierCode\": \"XYZ-67890\",\r\n        \"productId\": \"PROD-002\",\r\n        \"SO\": \"SO-2025-002\",\r\n        \"productTotal\": 625.00,\r\n        \"productTotalCost\": 406.25,\r\n        \"chargeTotal\": 62.50,\r\n        \"chargeTotalCost\": 37.50,\r\n        \"total\": 712.50,\r\n        \"margin\": 218.75,\r\n        \"shippingTotal\": 25.00,\r\n        \"shippingTotalCost\": 15.00,\r\n        \"taxTotal\": 0,\r\n        \"rush\": true,\r\n        \"taxExempt\": false,\r\n        \"dueDate\": \"12/25/2025\",\r\n        \"estimatedDeliveryDate\": \"12/25/2025\",\r\n        \"LineItemArray\": [\r\n          {\r\n            \"productId\": \"PROD-002\",\r\n            \"quantity\": 50,\r\n            \"unitPrice\": 12.50,\r\n            \"unitCost\": 8.125,\r\n            \"total\": 625.00,\r\n            \"totalCost\": 406.25,\r\n            \"description\": \"Custom Mug - White\",\r\n            \"PartArray\": [\r\n              {\r\n                \"partId\": \"PART-003\",\r\n                \"description\": \"11oz Ceramic Mug\",\r\n                \"quantity\": 50,\r\n                \"unitPrice\": 12.50,\r\n                \"unitCost\": 8.125\r\n              }\r\n            ],\r\n            \"DecorationArray\": [\r\n              {\r\n                \"decorationId\": \"DECO-002\",\r\n                \"decorationType\": \"Full Color\",\r\n                \"location\": \"Wrap\",\r\n                \"colors\": 4,\r\n                \"quantity\": 50,\r\n                \"unitPrice\": 0,\r\n                \"unitCost\": 0\r\n              }\r\n            ]\r\n          }\r\n        ],\r\n        \"ChargeArray\": [\r\n          {\r\n            \"chargeName\": \"Setup Fee\",\r\n            \"chargeType\": \"Setup\",\r\n            \"price\": 62.50,\r\n            \"cost\": 37.50,\r\n            \"quantity\": 1,\r\n            \"total\": 62.50,\r\n            \"totalCost\": 37.50,\r\n            \"margin\": 25.00\r\n          }\r\n        ],\r\n        \"ShipmentArray\": [\r\n          {\r\n            \"companyName\": \"Acme Corporation\",\r\n            \"contactName\": \"Jane Smith\",\r\n            \"street1\": \"456 Office Blvd\",\r\n            \"city\": \"Los Angeles\",\r\n            \"state\": \"CA\",\r\n            \"postalCode\": \"90001\",\r\n            \"country\": \"US\",\r\n            \"email\": \"jane@acmecorp.com\",\r\n            \"phone\": \"555-987-6543\",\r\n            \"carrier\": \"FedEx\",\r\n            \"carrierService\": \"2Day\",\r\n            \"shipmentCost\": 15.00,\r\n            \"shipmentPrice\": 25.00,\r\n            \"access\": \"Customer\",\r\n            \"Quantity\": {\r\n              \"value\": 50,\r\n              \"uom\": \"EA\"\r\n            }\r\n          }\r\n        ],\r\n        \"VirtualProofs\": []\r\n      }\r\n    ],\r\n    \"ShipmentArray\": [],\r\n    \"discountCodes\": [],\r\n    \"referenceFields\": [\r\n      {\r\n        \"referenceField\": \"507f1f77bcf86cd799439030\",\r\n        \"value\": \"Project Alpha\"\r\n      },\r\n      {\r\n        \"referenceField\": \"507f1f77bcf86cd799439031\",\r\n        \"value\": \"Department Marketing\"\r\n      }\r\n    ],\r\n    \"Documents\": [],\r\n    \"Payments\": []\r\n  },\r\n  \"customer\": {\r\n    \"_id\": \"507f1f77bcf86cd799439012\",\r\n    \"userId\": \"507f1f77bcf86cd799439013\",\r\n    \"adminUserId\": \"507f1f77bcf86cd799439014\"\r\n  },\r\n  \"status\": \"New Quote Request\",\r\n  \"isDuplicate\": false,\r\n  \"followUpDetails\": \"\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/orders","description":"<h2 id=\"post-orders---create-order\">POST /orders - Create Order</h2>\n<h3 id=\"request-configuration\">Request Configuration</h3>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/orders</code><br /><strong>Authentication:</strong> Required (JWT Bearer token)<br /><strong>API Token Access:</strong> Supported</p>\n<hr />\n<h2 id=\"headers\">Headers</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Description</th>\n<th>Required</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td>Bearer JWT token</td>\n<td><strong>Yes</strong></td>\n<td><code>Bearer {{token}}</code></td>\n</tr>\n<tr>\n<td><code>Content-Type</code></td>\n<td>Request content type</td>\n<td><strong>Yes</strong></td>\n<td><code>application/json</code></td>\n</tr>\n<tr>\n<td><code>portal</code></td>\n<td>Portal identifier (app/store)</td>\n<td>No</td>\n<td><code>app</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"request-body---top-level-parameters\">Request Body - Top Level Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>order</code></td>\n<td>Main order object (see Order Object section)</td>\n<td><strong>Yes</strong></td>\n<td>Object</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>customer</code></td>\n<td>Customer object with <code>_id</code>, <code>userId</code>, <code>adminUserId</code></td>\n<td>No</td>\n<td>Object</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>Initial order status</td>\n<td>No</td>\n<td>String</td>\n<td><code>\"New Quote Request\"</code></td>\n</tr>\n<tr>\n<td><code>isDuplicate</code></td>\n<td>Whether this is a duplicate/reorder</td>\n<td>No</td>\n<td>Boolean</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>duplicatedPO</code></td>\n<td>Specific PO ID to duplicate</td>\n<td>No</td>\n<td>Number</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>followUpDetails</code></td>\n<td>Notes for order follow-up</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>recaptchaToken</code></td>\n<td>Recaptcha validation token</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"order-object-parameters\">Order Object Parameters</h2>\n<h3 id=\"table-1-core-order-information\">Table 1: Core Order Information</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>storeId</code></td>\n<td>Store MongoDB ObjectId</td>\n<td><strong>Yes</strong></td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>customerId</code></td>\n<td>Customer MongoDB ObjectId</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>customerCompany</code></td>\n<td>Company MongoDB ObjectId</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>orderEmail</code></td>\n<td>Order contact email</td>\n<td>No</td>\n<td>String (email)</td>\n</tr>\n<tr>\n<td><code>orderStatus</code></td>\n<td>Order status (auto-set from <code>status</code> param)</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>orderType</code></td>\n<td>Type of order</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>initialType</code></td>\n<td>Initial type classification</td>\n<td>No</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-2-sales--team-assignment\">Table 2: Sales &amp; Team Assignment</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>salesUserId</code></td>\n<td>Sales representative ObjectId</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>adminUserId</code></td>\n<td>Admin user ObjectId</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>createdByUserId</code></td>\n<td>Created by user ObjectId (auto-set)</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-3-financial-fields\">Table 3: Financial Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>productTotal</code></td>\n<td>Total product price</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>productTotalCost</code></td>\n<td>Total product cost</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>chargeTotal</code></td>\n<td>Total charges (setup, art, etc.)</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>chargeTotalCost</code></td>\n<td>Total charges cost</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>taxTotal</code></td>\n<td>Total tax amount</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>shippingTotal</code></td>\n<td>Total shipping price</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>discountTotal</code></td>\n<td>Total discounts applied</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>orderDiscount</code></td>\n<td>Order-level discount</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>productMargin</code></td>\n<td>Product margin percentage</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>paymentsTotal</code></td>\n<td>Total payments received</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>balance</code></td>\n<td>Remaining balance</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>fundraisingTotal</code></td>\n<td>Fundraising amount</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>additionalOrderChargesTotal</code></td>\n<td>Additional charges total</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-4-currency--payment-options\">Table 4: Currency &amp; Payment Options</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>currency</code></td>\n<td>Currency code</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>currencyRate</code></td>\n<td>Currency exchange rate</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>allowCreditCardPayments</code></td>\n<td>Allow credit card payments</td>\n<td>No</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>allowECheckPayments</code></td>\n<td>Allow e-check payments</td>\n<td>No</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>allowPOPayments</code></td>\n<td>Allow PO payments</td>\n<td>No</td>\n<td>Boolean</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-5-dates--scheduling\">Table 5: Dates &amp; Scheduling</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Format</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>dueDate</code></td>\n<td>Order due date</td>\n<td>No</td>\n<td>String</td>\n<td><code>M/D/YYYY</code></td>\n</tr>\n<tr>\n<td><code>orderDate</code></td>\n<td>Order completion date</td>\n<td>No</td>\n<td>Number</td>\n<td><code>YYYYMMDD</code></td>\n</tr>\n<tr>\n<td><code>invoiceDate</code></td>\n<td>Invoice date</td>\n<td>No</td>\n<td>Number</td>\n<td><code>YYYYMMDD</code></td>\n</tr>\n<tr>\n<td><code>completedDate</code></td>\n<td>Completion date</td>\n<td>No</td>\n<td>Number</td>\n<td><code>YYYYMMDD</code></td>\n</tr>\n<tr>\n<td><code>approvedAt</code></td>\n<td>Approval timestamp</td>\n<td>No</td>\n<td>Date</td>\n<td>ISO 8601</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-6-flags--options\">Table 6: Flags &amp; Options</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>rushOrder</code></td>\n<td>Mark as rush order</td>\n<td>No</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>isFlagged</code></td>\n<td>Flag for attention</td>\n<td>No</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>firmDueDate</code></td>\n<td>Due date is firm</td>\n<td>No</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>isTest</code></td>\n<td>Test order flag</td>\n<td>No</td>\n<td>Boolean</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-7-integration-fields\">Table 7: Integration Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>invoiceQBId</code></td>\n<td>QuickBooks invoice ID</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>customerQBId</code></td>\n<td>QuickBooks customer ID</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>orderZohoId</code></td>\n<td>Zoho order ID</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>orderHubspotId</code></td>\n<td>HubSpot order ID</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>invoiceXeroId</code></td>\n<td>Xero invoice ID</td>\n<td>No</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"table-8-complex-arrays\">Table 8: Complex Arrays</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>PurchaseOrders</code></td>\n<td>Array of purchase orders</td>\n<td>No</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>ShipmentArray</code></td>\n<td>Array of shipments</td>\n<td>No</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>discountCodes</code></td>\n<td>Array of discount code IDs</td>\n<td>No</td>\n<td>Array[ObjectId]</td>\n</tr>\n<tr>\n<td><code>Payments</code></td>\n<td>Array of payment objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>Documents</code></td>\n<td>Array of document IDs</td>\n<td>No</td>\n<td>Array[ObjectId]</td>\n</tr>\n<tr>\n<td><code>referenceFields</code></td>\n<td>Custom reference fields</td>\n<td>No</td>\n<td>Array[Object]</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"purchase-order-object-structure\">Purchase Order Object Structure</h2>\n<p>Each item in the <code>PurchaseOrders</code> array can contain:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>PO status</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>PO type</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>supplier</code></td>\n<td>Supplier ObjectId</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>productId</code></td>\n<td>Product ID</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>SO</code></td>\n<td>Supplier order number</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>productTotal</code></td>\n<td>Product total price</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>productTotalCost</code></td>\n<td>Product total cost</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>total</code></td>\n<td>PO total</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>LineItemArray</code></td>\n<td>Array of line items</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>ChargeArray</code></td>\n<td>Array of charges</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>ShipmentArray</code></td>\n<td>Array of shipments</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>VirtualProofs</code></td>\n<td>Array of proof files</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>estimatedDeliveryDate</code></td>\n<td>Estimated delivery</td>\n<td>String (M/D/YYYY)</td>\n</tr>\n<tr>\n<td><code>dueDate</code></td>\n<td>PO due date</td>\n<td>String (M/D/YYYY)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"shipment-object-structure\">Shipment Object Structure</h2>\n<p>Each item in the <code>ShipmentArray</code> can contain:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>companyName</code></td>\n<td>Company name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>contactName</code></td>\n<td>Contact name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>street1</code></td>\n<td>Street address line 1</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>street2</code></td>\n<td>Street address line 2</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>City</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>State/Province</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>postalCode</code></td>\n<td>Postal/ZIP code</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>Country</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>Shipping email</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>phone</code></td>\n<td>Shipping phone</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>carrier</code></td>\n<td>Carrier name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>carrierService</code></td>\n<td>Carrier service level</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>shipmentCost</code></td>\n<td>Shipping cost</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>shipmentPrice</code></td>\n<td>Shipping price</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>Quantity</code></td>\n<td>Shipment quantity object</td>\n<td>Object</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"sample-request-bodies\">Sample Request Bodies</h2>\n<h3 id=\"1-minimal-order-new-quote-request\">1. Minimal Order (New Quote Request)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"order\": {\n    \"storeId\": \"507f1f77bcf86cd799439011\",\n    \"customerId\": \"507f1f77bcf86cd799439012\",\n    \"orderEmail\": \"customer@example.com\",\n    \"currency\": \"USD\",\n    \"currencyRate\": 1,\n    \"PurchaseOrders\": []\n  },\n  \"status\": \"New Quote Request\"\n}\n\n</code></pre>\n<hr />\n<h3 id=\"2-order-with-customer-object\">2. Order with Customer Object</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"order\": {\n    \"storeId\": \"507f1f77bcf86cd799439011\",\n    \"orderEmail\": \"customer@example.com\",\n    \"dueDate\": \"12/31/2025\",\n    \"rushOrder\": false,\n    \"firmDueDate\": true,\n    \"allowCreditCardPayments\": true,\n    \"allowECheckPayments\": false,\n    \"currency\": \"USD\",\n    \"currencyRate\": 1,\n    \"PurchaseOrders\": []\n  },\n  \"customer\": {\n    \"_id\": \"507f1f77bcf86cd799439012\",\n    \"userId\": \"507f1f77bcf86cd799439013\",\n    \"adminUserId\": \"507f1f77bcf86cd799439014\"\n  },\n  \"status\": \"Quote In Progress\"\n}\n\n</code></pre>\n<hr />\n<h3 id=\"3-complete-order-with-purchase-order\">3. Complete Order with Purchase Order</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"order\": {\n    \"storeId\": \"507f1f77bcf86cd799439011\",\n    \"customerId\": \"507f1f77bcf86cd799439012\",\n    \"orderEmail\": \"customer@example.com\",\n    \"customerCompany\": \"507f1f77bcf86cd799439015\",\n    \"salesUserId\": \"507f1f77bcf86cd799439013\",\n    \"adminUserId\": \"507f1f77bcf86cd799439014\",\n    \"productTotal\": 500.00,\n    \"productTotalCost\": 325.00,\n    \"chargeTotal\": 50.00,\n    \"chargeTotalCost\": 30.00,\n    \"taxTotal\": 0,\n    \"shippingTotal\": 25.00,\n    \"discountTotal\": 0,\n    \"orderDiscount\": 0,\n    \"productMargin\": 35,\n    \"rushOrder\": false,\n    \"isFlagged\": false,\n    \"firmDueDate\": true,\n    \"dueDate\": \"12/31/2025\",\n    \"allowCreditCardPayments\": true,\n    \"allowECheckPayments\": true,\n    \"currency\": \"USD\",\n    \"currencyRate\": 1,\n    \"PurchaseOrders\": [\n      {\n        \"status\": \"New\",\n        \"type\": \"Standard\",\n        \"supplier\": \"507f1f77bcf86cd799439020\",\n        \"productId\": \"PROD-001\",\n        \"productTotal\": 500.00,\n        \"productTotalCost\": 325.00,\n        \"chargeTotal\": 50.00,\n        \"chargeTotalCost\": 30.00,\n        \"total\": 575.00,\n        \"dueDate\": \"12/31/2025\",\n        \"LineItemArray\": [],\n        \"ChargeArray\": [],\n        \"ShipmentArray\": []\n      }\n    ],\n    \"ShipmentArray\": [\n      {\n        \"companyName\": \"Acme Corp\",\n        \"contactName\": \"John Doe\",\n        \"street1\": \"123 Main St\",\n        \"city\": \"New York\",\n        \"state\": \"NY\",\n        \"postalCode\": \"10001\",\n        \"country\": \"US\",\n        \"email\": \"shipping@example.com\",\n        \"phone\": \"555-1234\",\n        \"carrier\": \"UPS\",\n        \"carrierService\": \"Ground\",\n        \"shipmentCost\": 15.00,\n        \"shipmentPrice\": 25.00\n      }\n    ],\n    \"discountCodes\": [],\n    \"referenceFields\": []\n  },\n  \"status\": \"Quote In Progress\"\n}\n\n</code></pre>\n<hr />\n<h3 id=\"4-duplicate-order-reorder\">4. Duplicate Order (Reorder)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"order\": {\n    \"orderId\": 12345,\n    \"storeId\": \"507f1f77bcf86cd799439011\",\n    \"customerId\": \"507f1f77bcf86cd799439012\",\n    \"PurchaseOrders\": []\n  },\n  \"isDuplicate\": true,\n  \"followUpDetails\": \"Customer requested reorder with same specifications\",\n  \"status\": \"New Quote Request\"\n}\n\n</code></pre>\n<hr />\n<h3 id=\"5-duplicate-specific-purchase-order\">5. Duplicate Specific Purchase Order</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"order\": {\n    \"orderId\": 12345,\n    \"storeId\": \"507f1f77bcf86cd799439011\",\n    \"customerId\": \"507f1f77bcf86cd799439012\",\n    \"PurchaseOrders\": []\n  },\n  \"isDuplicate\": true,\n  \"duplicatedPO\": 1,\n  \"followUpDetails\": \"Customer wants to reorder only PO #1\",\n  \"status\": \"New Quote Request\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<p>Returns the complete created order object with:</p>\n<ul>\n<li><p>Auto-generated <code>orderId</code> (numeric)</p>\n</li>\n<li><p>Auto-assigned <code>salesUserId</code> and <code>adminUserId</code> (if not provided)</p>\n</li>\n<li><p>Created <code>createdDate</code> timestamp</p>\n</li>\n<li><p>Populated <code>PurchaseOrders</code> with <code>friendlyPurchaseOrderDetailId</code> values</p>\n</li>\n<li><p>Auto-calculated totals</p>\n</li>\n<li><p>Created order follow-up record</p>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439050\",\n  \"orderId\": 12346,\n  \"storeId\": \"507f1f77bcf86cd799439011\",\n  \"customerId\": \"507f1f77bcf86cd799439012\",\n  \"orderStatus\": \"New Quote Request\",\n  \"salesUserId\": \"507f1f77bcf86cd799439013\",\n  \"adminUserId\": \"507f1f77bcf86cd799439014\",\n  \"createdByUserId\": \"507f1f77bcf86cd799439013\",\n  \"createdDate\": \"2025-11-07T10:30:00.000Z\",\n  \"productTotal\": 500.00,\n  \"total\": 0,\n  \"PurchaseOrders\": [],\n  \"createdAt\": \"2025-11-07T10:30:00.000Z\",\n  \"updatedAt\": \"2025-11-07T10:30:00.000Z\"\n}\n\n</code></pre>\n<h3 id=\"error-response-400403500\">Error Response (400/403/500)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Error description\"\n}\n\n</code></pre>\n<p><strong>Common Error Messages:</strong></p>\n<ul>\n<li><p><code>\"User is not authorized to create orders for this distributor.\"</code> (403)</p>\n</li>\n<li><p><code>\"Recaptcha token is invalid!\"</code> (400)</p>\n</li>\n<li><p><code>\"Store not found\"</code> (500)</p>\n</li>\n<li><p>Order creation validation errors (500)</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"important-notes\">Important Notes</h2>\n<h3 id=\"automatic-field-handling\">Automatic Field Handling</h3>\n<p><strong>Fields Auto-Set by API (don't include in request):</strong></p>\n<ul>\n<li><p><code>orderId</code> - Auto-generated sequence number</p>\n</li>\n<li><p><code>createdByUserId</code> - Set from authenticated user</p>\n</li>\n<li><p><code>distributorId</code> - Set from authenticated user</p>\n</li>\n<li><p><code>createdBy</code> - Set from authenticated user</p>\n</li>\n<li><p><code>createdDate</code> - Set to current UTC time</p>\n</li>\n<li><p><code>total</code> - Calculated from order items</p>\n</li>\n</ul>\n<p><strong>Fields Removed if Present:</strong></p>\n<ul>\n<li><p><code>orderId</code> (in order object) - Conflicts with auto-generation</p>\n</li>\n<li><p><code>_id</code> - MongoDB handles this</p>\n</li>\n<li><p><code>orderDate</code> - Set when order is completed</p>\n</li>\n</ul>\n<h3 id=\"sales-assignment-logic\">Sales Assignment Logic</h3>\n<p>If not provided, <code>salesUserId</code> and <code>adminUserId</code> are assigned based on:</p>\n<ol>\n<li><p>Store's sales strategy (Round-rolling, etc.)</p>\n</li>\n<li><p>Customer's assigned user IDs</p>\n</li>\n<li><p>Falls back to the creating user</p>\n</li>\n</ol>\n<h3 id=\"order-duplication\">Order Duplication</h3>\n<p>When <code>isDuplicate: true</code>:</p>\n<ul>\n<li><p>Purchase orders are duplicated with new IDs</p>\n</li>\n<li><p>Shipment information is cleared</p>\n</li>\n<li><p>A \"Reorder Request\" follow-up is created</p>\n</li>\n<li><p>Original order ID is logged in changes</p>\n</li>\n</ul>\n<h3 id=\"authorization\">Authorization</h3>\n<ul>\n<li><p>Must have JWT authentication</p>\n</li>\n<li><p>User must belong to the same distributor as the store</p>\n</li>\n<li><p>Super admins can create orders for any distributor</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"status-options\">Status Options</h2>\n<h3 id=\"common-order-statuses\">Common Order Statuses</h3>\n<ul>\n<li><p><code>\"New Quote Request\"</code></p>\n</li>\n<li><p><code>\"Quote In Progress\"</code></p>\n</li>\n<li><p><code>\"Quote Sent\"</code></p>\n</li>\n<li><p><code>\"Pending Payment\"</code></p>\n</li>\n<li><p><code>\"Processing\"</code></p>\n</li>\n<li><p><code>\"Sent to Supplier\"</code></p>\n</li>\n<li><p><code>\"In Production\"</code></p>\n</li>\n<li><p><code>\"Proof Pending Approval\"</code></p>\n</li>\n<li><p><code>\"Shipped\"</code></p>\n</li>\n<li><p><code>\"Delivered\"</code></p>\n</li>\n<li><p><code>\"Completed\"</code></p>\n</li>\n<li><p><code>\"Canceled\"</code></p>\n</li>\n<li><p><code>\"On Hold\"</code></p>\n</li>\n</ul>\n","urlObject":{"path":["orders"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"86581b3d-e702-49d0-88ff-9eec3da79507"},{"name":"Update Order","id":"96fbfeb3-0882-429a-ad59-28755d10b8db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\r\n  \"orderStatus\": \"Sent to Supplier\",\r\n  \"orderType\": \"Decorated\",\r\n  \"orderDate\": 20251028,\r\n  \"invoiceDate\": 20251028,\r\n  \"dueDate\": \"12/15/2025\",\r\n  \"salesUserId\": \"623cf6b7c7d17379aa86761e\",\r\n  \"adminUserId\": \"6074cd3d8e893a101463978e\",\r\n  \"storeId\": \"5c7edfd8208c866f6f7c7fd0\",\r\n  \"productTotal\": 467.1,\r\n  \"productTotalCost\": 298.944,\r\n  \"chargeTotal\": 77.8,\r\n  \"chargeTotalCost\": 66.591,\r\n  \"taxTotal\": 0,\r\n  \"shippingTotal\": 99.5,\r\n  \"discountTotal\": 0,\r\n  \"orderDiscount\": 0,\r\n  \"productMargin\": 36,\r\n  \"rushOrder\": false,\r\n  \"isFlagged\": false,\r\n  \"firmDueDate\": true,\r\n  \"allowECheckPayments\": false,\r\n  \"allowCreditCardPayments\": true,\r\n  \"currency\": \"USD\",\r\n  \"currencyRate\": 1,\r\n  \"discountCodes\": [\"WELCOME10\"],\r\n  \"invoiceQBId\": \"41663\",\r\n  \"orderStatusChecked\": 1730132800000,\r\n  \"orderShipmentStatusChecked\": 1730135400000\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/orders/{{orderId}}/edit","description":"<h2 id=\"put-ordersorderidedit---update-order\">PUT /orders/:orderId/edit - Update Order</h2>\n<h3 id=\"request-configuration\">Request Configuration</h3>\n<p><strong>Method:</strong> <code>PUT</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/orders/{{orderId}}/edit</code><br /><strong>Authentication:</strong> Required (JWT Bearer token)<br /><strong>API Token Access:</strong> Supports API token authentication</p>\n<hr />\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>orderId</code></td>\n<td>Order ID (numeric, not ObjectId)</td>\n<td><strong>Yes</strong></td>\n<td>Number</td>\n<td><code>12345</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Important:</strong> This endpoint uses the <strong>numeric</strong> <strong><code>orderId</code></strong>, not the MongoDB <code>_id</code>.</p>\n<hr />\n<h2 id=\"headers\">Headers</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Description</th>\n<th>Required</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td>Bearer JWT token or API token</td>\n<td><strong>Yes</strong></td>\n<td><code>{{vault:bearer-token}}</code></td>\n</tr>\n<tr>\n<td><code>Content-Type</code></td>\n<td>Content type</td>\n<td><strong>Yes</strong></td>\n<td><code>application/json</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"request-body-parameters\">Request Body Parameters</h2>\n<h3 id=\"basic-order-information\">Basic Order Information</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>orderStatus</code></td>\n<td>Order status</td>\n<td>No</td>\n<td>String</td>\n<td>Enum: Pending, Processing, Shipped, Delivered, Canceled, Deleted, etc.</td>\n</tr>\n<tr>\n<td><code>orderType</code></td>\n<td>Order type</td>\n<td>No</td>\n<td>String</td>\n<td>Enum: Standard, Sample, Quote, etc.</td>\n</tr>\n<tr>\n<td><code>orderDate</code></td>\n<td>Order date</td>\n<td>No</td>\n<td>DateOnly</td>\n<td>Format: YYYY-MM-DD</td>\n</tr>\n<tr>\n<td><code>completedDate</code></td>\n<td>Completion date</td>\n<td>No</td>\n<td>DateOnly</td>\n<td>Format: YYYY-MM-DD</td>\n</tr>\n<tr>\n<td><code>invoiceDate</code></td>\n<td>Invoice date</td>\n<td>No</td>\n<td>DateOnly</td>\n<td>Format: YYYY-MM-DD</td>\n</tr>\n<tr>\n<td><code>dueDate</code></td>\n<td>Due date</td>\n<td>No</td>\n<td>String</td>\n<td>Format: M/D/YYYY</td>\n</tr>\n<tr>\n<td><code>orderEmail</code></td>\n<td>Customer email for order</td>\n<td>No</td>\n<td>String</td>\n<td>Valid email format</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"customer--store-references\">Customer &amp; Store References</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customerId</code></td>\n<td>Customer ObjectId reference</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>customerOriginId</code></td>\n<td>Original customer ID</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>storeId</code></td>\n<td>Store ObjectId reference</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>Required on creation</td>\n</tr>\n<tr>\n<td><code>distributorId</code></td>\n<td>Distributor ObjectId reference</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>customerCompany</code></td>\n<td>Company ObjectId reference</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"user-assignments\">User Assignments</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>salesUserId</code></td>\n<td>Sales user ObjectId</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>adminUserId</code></td>\n<td>Admin user ObjectId</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>createdByUserId</code></td>\n<td>User who created order</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>updatedBy</code></td>\n<td>User who last updated</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>Auto-set</td>\n</tr>\n<tr>\n<td><code>approvedBy</code></td>\n<td>Customer who approved</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>approvedAt</code></td>\n<td>Approval timestamp</td>\n<td>No</td>\n<td>Date</td>\n<td>ISO 8601</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"financial-totals-usually-auto-calculated\">Financial Totals (Usually Auto-Calculated)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>orderTotal</code></td>\n<td>Total order amount</td>\n<td>No</td>\n<td>Number</td>\n<td>Auto-calculated</td>\n</tr>\n<tr>\n<td><code>productTotal</code></td>\n<td>Total product cost</td>\n<td>No</td>\n<td>Number</td>\n<td>Auto-calculated</td>\n</tr>\n<tr>\n<td><code>productTotalCost</code></td>\n<td>Product cost (no markup)</td>\n<td>No</td>\n<td>Number</td>\n<td>Auto-calculated</td>\n</tr>\n<tr>\n<td><code>taxTotal</code></td>\n<td>Total tax amount</td>\n<td>No</td>\n<td>Number</td>\n<td>Can be manually set to 0</td>\n</tr>\n<tr>\n<td><code>shippingTotal</code></td>\n<td>Total shipping cost</td>\n<td>No</td>\n<td>Number</td>\n<td>Auto-calculated</td>\n</tr>\n<tr>\n<td><code>chargeTotal</code></td>\n<td>Total additional charges</td>\n<td>No</td>\n<td>Number</td>\n<td>Auto-calculated</td>\n</tr>\n<tr>\n<td><code>chargeTotalCost</code></td>\n<td>Charge cost (no markup)</td>\n<td>No</td>\n<td>Number</td>\n<td>Auto-calculated</td>\n</tr>\n<tr>\n<td><code>discountTotal</code></td>\n<td>Total discounts</td>\n<td>No</td>\n<td>Number</td>\n<td>Auto-calculated</td>\n</tr>\n<tr>\n<td><code>orderDiscount</code></td>\n<td>Order-level discount</td>\n<td>No</td>\n<td>Number</td>\n<td>Manual discount</td>\n</tr>\n<tr>\n<td><code>paymentsTotal</code></td>\n<td>Total payments received</td>\n<td>No</td>\n<td>Number</td>\n<td>Auto-calculated</td>\n</tr>\n<tr>\n<td><code>balance</code></td>\n<td>Remaining balance</td>\n<td>No</td>\n<td>Number</td>\n<td>Auto-calculated</td>\n</tr>\n<tr>\n<td><code>productMargin</code></td>\n<td>Product profit margin %</td>\n<td>No</td>\n<td>Number</td>\n<td>Auto-calculated</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"external-system-ids\">External System IDs</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>invoiceQBId</code></td>\n<td>QuickBooks invoice ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>customerQBId</code></td>\n<td>QuickBooks customer ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>invoiceXeroId</code></td>\n<td>Xero invoice ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>orderZohoId</code></td>\n<td>Zoho CRM order ID</td>\n<td>No</td>\n<td>String</td>\n<td>Auto-synced</td>\n</tr>\n<tr>\n<td><code>orderHubspotId</code></td>\n<td>HubSpot order ID</td>\n<td>No</td>\n<td>String</td>\n<td>Auto-synced</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"flags--settings\">Flags &amp; Settings</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>isTest</code></td>\n<td>Test order flag</td>\n<td>No</td>\n<td>Boolean</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>rushOrder</code></td>\n<td>Rush order flag</td>\n<td>No</td>\n<td>Boolean</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>isFlagged</code></td>\n<td>Flagged for review</td>\n<td>No</td>\n<td>Boolean</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>firmDueDate</code></td>\n<td>Firm due date required</td>\n<td>No</td>\n<td>Boolean</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>isBatched</code></td>\n<td>Part of batch order</td>\n<td>No</td>\n<td>Boolean</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>initialType</code></td>\n<td>Initial order type</td>\n<td>No</td>\n<td>String</td>\n<td>Enum: Cart, Saved, Quote, etc.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"payment-settings\">Payment Settings</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>allowCreditCardPayments</code></td>\n<td>Allow credit card</td>\n<td>No</td>\n<td>Boolean</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>allowECheckPayments</code></td>\n<td>Allow eCheck</td>\n<td>No</td>\n<td>Boolean</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>allowPOPayments</code></td>\n<td>Allow purchase order</td>\n<td>No</td>\n<td>Boolean</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>currency</code></td>\n<td>Currency code</td>\n<td>No</td>\n<td>String</td>\n<td>USD, CAD, etc.</td>\n</tr>\n<tr>\n<td><code>currencyRate</code></td>\n<td>Exchange rate</td>\n<td>No</td>\n<td>Number</td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"complex-arrays\">Complex Arrays</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>PurchaseOrders</code></td>\n<td>Array of purchase orders</td>\n<td>No</td>\n<td>Array[Object]</td>\n<td>See PO schema below</td>\n</tr>\n<tr>\n<td><code>ShipmentArray</code></td>\n<td>Order-level shipments</td>\n<td>No</td>\n<td>Array[Object]</td>\n<td>Shipping details</td>\n</tr>\n<tr>\n<td><code>Documents</code></td>\n<td>Document ObjectId references</td>\n<td>No</td>\n<td>Array[ObjectId]</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>Payments</code></td>\n<td>Payment records</td>\n<td>No</td>\n<td>Array[Object]</td>\n<td>Payment history</td>\n</tr>\n<tr>\n<td><code>discountCodes</code></td>\n<td>Discount code references</td>\n<td>No</td>\n<td>Array[ObjectId]</td>\n<td>Applied codes</td>\n</tr>\n<tr>\n<td><code>trackingPackages</code></td>\n<td>Tracking package references</td>\n<td>No</td>\n<td>Array[ObjectId]</td>\n<td>Shipment tracking</td>\n</tr>\n<tr>\n<td><code>referenceFields</code></td>\n<td>Custom fields</td>\n<td>No</td>\n<td>Array[Object]</td>\n<td>Store-specific fields</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"date-fields\">Date Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>qbSyncedAt</code></td>\n<td>QuickBooks sync timestamp</td>\n<td>No</td>\n<td>Date</td>\n<td>Auto-set</td>\n</tr>\n<tr>\n<td><code>reconciledAt</code></td>\n<td>Reconciliation timestamp</td>\n<td>No</td>\n<td>Date</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>shippingReconciliationAt</code></td>\n<td>Shipping reconciliation date</td>\n<td>No</td>\n<td>DateOnly</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>supplierReconciliationAt</code></td>\n<td>Supplier reconciliation date</td>\n<td>No</td>\n<td>DateOnly</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>deletedAt</code></td>\n<td>Soft delete timestamp</td>\n<td>No</td>\n<td>Date</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>cancelDeletedAt</code></td>\n<td>Cancel/delete timestamp</td>\n<td>No</td>\n<td>Date</td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"deletion-fields\">Deletion Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>deletedAt</code></td>\n<td>Deletion timestamp</td>\n<td>No</td>\n<td>Date</td>\n<td>Soft delete</td>\n</tr>\n<tr>\n<td><code>deletedReason</code></td>\n<td>Reason for deletion</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>deletedBy</code></td>\n<td>User who deleted</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"excluded-fields-auto-managed\">Excluded Fields (Auto-Managed)</h3>\n<p>These fields are automatically removed or managed:</p>\n<ul>\n<li><p>❌ <code>orderId</code> - Cannot be changed (path parameter)</p>\n</li>\n<li><p>❌ <code>createdBy</code> - Removed from body</p>\n</li>\n<li><p>❌ <code>updatedAt</code> - Auto-updated</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"example-requests\">Example Requests</h2>\n<h3 id=\"1-update-order-status\">1. Update Order Status</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/orders/12345/edit\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"orderStatus\": \"Processing\"\n}\n\n</code></pre>\n<h3 id=\"2-update-sales--admin-users\">2. Update Sales &amp; Admin Users</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/orders/12345/edit\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"salesUserId\": \"507f1f77bcf86cd799439011\",\n  \"adminUserId\": \"507f1f77bcf86cd799439012\"\n}\n\n</code></pre>\n<h3 id=\"3-set-order-date\">3. Set Order Date</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/orders/12345/edit\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"orderDate\": \"2025-10-28\"\n}\n\n</code></pre>\n<h3 id=\"4-update-order-email--due-date\">4. Update Order Email &amp; Due Date</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/orders/12345/edit\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"orderEmail\": \"customer@example.com\",\n  \"dueDate\": \"11/30/2025\"\n}\n\n</code></pre>\n<h3 id=\"5-mark-as-rush-order\">5. Mark as Rush Order</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/orders/12345/edit\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"rushOrder\": true,\n  \"firmDueDate\": true,\n  \"isFlagged\": true\n}\n\n</code></pre>\n<h3 id=\"6-update-external-system-ids\">6. Update External System IDs</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/orders/12345/edit\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"invoiceQBId\": \"QB-INV-12345\",\n  \"customerQBId\": \"QB-CUST-67890\",\n  \"orderZohoId\": \"ZOHO-ORD-11111\"\n}\n\n</code></pre>\n<h3 id=\"7-set-test-order-flag\">7. Set Test Order Flag</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/orders/12345/edit\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"isTest\": true\n}\n\n</code></pre>\n<h3 id=\"8-update-order-discount\">8. Update Order Discount</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/orders/12345/edit\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"orderDiscount\": 50.00\n}\n\n</code></pre>\n<h3 id=\"9-reset-tax-to-zero\">9. Reset Tax to Zero</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/orders/12345/edit\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"taxTotal\": 0\n}\n\n</code></pre>\n<h3 id=\"10-update-multiple-fields\">10. Update Multiple Fields</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/orders/12345/edit\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"orderStatus\": \"Shipped\",\n  \"completedDate\": \"2025-10-28\",\n  \"rushOrder\": false,\n  \"salesUserId\": \"507f1f77bcf86cd799439011\",\n  \"orderEmail\": \"updated@example.com\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200\">Success Response (200)</h3>\n<p>Returns the updated order object:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439999\",\n  \"orderId\": 12345,\n  \"orderStatus\": \"Processing\",\n  \"orderType\": \"Standard\",\n  \"orderDate\": \"2025-10-28\",\n  \"orderTotal\": 1250.50,\n  \"productTotal\": 1000.00,\n  \"taxTotal\": 100.50,\n  \"shippingTotal\": 150.00,\n  \"balance\": 0,\n  \"customerId\": \"507f1f77bcf86cd799439011\",\n  \"storeId\": \"507f1f77bcf86cd799439012\",\n  \"distributorId\": \"507f1f77bcf86cd799439013\",\n  \"salesUserId\": \"507f1f77bcf86cd799439014\",\n  \"admin UserId\": \"507f1f77bcf86cd799439015\",\n  \"isTest\": false,\n  \"rushOrder\": false,\n  \"isFlagged\": false,\n  \"PurchaseOrders\": [],\n  \"createdAt\": \"2025-10-01T09:00:00.000Z\",\n  \"updatedAt\": \"2025-10-28T15:30:00.000Z\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"404---order-not-found\">404 - Order Not Found</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Order not found\"\n}\n\n</code></pre>\n<h3 id=\"401---unauthorized\">401 - Unauthorized</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Unauthorized\"\n}\n\n</code></pre>\n<h3 id=\"422---validation-error\">422 - Validation Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Validation failed\",\n  \"errors\": []\n}\n\n</code></pre>\n<hr />\n<h2 id=\"automatic-behaviors\">Automatic Behaviors</h2>\n<h3 id=\"1-change-logging\">1. Change Logging</h3>\n<ul>\n<li><p>All changes are automatically tracked</p>\n</li>\n<li><p>Creates detailed diff of before/after state</p>\n</li>\n<li><p>Logs to <code>Log</code> collection with category <code>ORDER_UPDATES</code></p>\n</li>\n<li><p>Includes IP address, user ID, and timestamp</p>\n</li>\n</ul>\n<h3 id=\"2-socket-notifications\">2. Socket Notifications</h3>\n<ul>\n<li><p>Sends <code>CART_UPDATED_FRESH</code> event via WebSocket</p>\n</li>\n<li><p>Notifies connected clients of order updates</p>\n</li>\n<li><p>Real-time updates for order management UI</p>\n</li>\n</ul>\n<h3 id=\"3-api-token-logging\">3. API Token Logging</h3>\n<ul>\n<li><p>Logs all API token-based requests</p>\n</li>\n<li><p>Tracks which integration/API key made the change</p>\n</li>\n<li><p>Audits external system access</p>\n</li>\n</ul>\n<h3 id=\"4-field-auto-management\">4. Field Auto-Management</h3>\n<ul>\n<li><p><code>updatedBy</code> automatically set to current user</p>\n</li>\n<li><p><code>orderId</code> and <code>createdBy</code> removed from request body</p>\n</li>\n<li><p>Cannot be changed via this endpoint</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"important-notes\">Important Notes</h2>\n<h3 id=\"order-id-vs-mongodb-id\">Order ID vs MongoDB ID</h3>\n<ul>\n<li><p>This endpoint uses <strong>numeric</strong> <strong><code>orderId</code></strong>, not MongoDB <code>_id</code></p>\n</li>\n<li><p>Example: Use <code>12345</code>, not <code>507f1f77bcf86cd799439999</code></p>\n</li>\n</ul>\n<h3 id=\"partial-updates\">Partial Updates</h3>\n<ul>\n<li><p>Only send fields you want to update</p>\n</li>\n<li><p>Unspecified fields remain unchanged</p>\n</li>\n<li><p>Arrays are replaced entirely if provided</p>\n</li>\n</ul>\n<h3 id=\"financial-totals\">Financial Totals</h3>\n<ul>\n<li><p>Most totals are auto-calculated from purchase orders</p>\n</li>\n<li><p>Manual updates may be overwritten on next save</p>\n</li>\n<li><p>Use with caution</p>\n</li>\n</ul>\n<h3 id=\"status-changes\">Status Changes</h3>\n<ul>\n<li><p>Changing status may trigger side effects</p>\n</li>\n<li><p>May update virtual proofs, inventory, notifications</p>\n</li>\n<li><p>Test in development environment first</p>\n</li>\n</ul>\n<h3 id=\"external-system-sync\">External System Sync</h3>\n<ul>\n<li><p>Changes may auto-sync to QuickBooks, Zoho, HubSpot</p>\n</li>\n<li><p>Sync happens asynchronously after update</p>\n</li>\n<li><p>Check sync status in response or logs</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"complete-field-reference-csv\">Complete Field Reference (CSV)</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Field,Description,Required,Data Type,Updatable\norderStatus,Order status,No,String,Yes\norderType,Order type,No,String,Yes\norderDate,Order date,No,DateOnly,Yes\ncompletedDate,Completion date,No,DateOnly,Yes\ndueDate,Due date,No,String,Yes\norderEmail,Customer email,No,String,Yes\ncustomerId,Customer reference,No,ObjectId,Yes\nstoreId,Store reference,No,ObjectId,Yes\ndistributorId,Distributor reference,No,ObjectId,Yes\nsalesUserId,Sales user,No,ObjectId,Yes\nadminUserId,Admin user,No,ObjectId,Yes\norderTotal,Total amount,No,Number,Yes (auto-calc)\nproductTotal,Product total,No,Number,Yes (auto-calc)\ntaxTotal,Tax total,No,Number,Yes\nshippingTotal,Shipping total,No,Number,Yes (auto-calc)\norderDiscount,Order discount,No,Number,Yes\ninvoiceQBId,QuickBooks invoice ID,No,String,Yes\norderZohoId,Zoho order ID,No,String,Yes\norderHubspotId,HubSpot order ID,No,String,Yes\nisTest,Test flag,No,Boolean,Yes\nrushOrder,Rush flag,No,Boolean,Yes\nisFlagged,Flagged status,No,Boolean,Yes\norderId,Order ID (numeric),No,Number,No (path param)\ncreatedBy,Creator,No,ObjectId,No (auto-removed)\n\n</code></pre><hr />\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Use Numeric Order ID</strong>: Always use the numeric <code>orderId</code>, not MongoDB <code>_id</code></p>\n</li>\n<li><p><strong>Partial Updates</strong>: Only include fields you're changing</p>\n</li>\n<li><p><strong>Test Mode</strong>: Use <code>isTest: true</code> for testing integrations</p>\n</li>\n<li><p><strong>Status Transitions</strong>: Follow proper status flow (Pending → Processing → Shipped)</p>\n</li>\n<li><p><strong>Validation</strong>: Validate data before sending to avoid errors</p>\n</li>\n<li><p><strong>Logging</strong>: All changes are logged - ensure proper user context</p>\n</li>\n<li><p><strong>Real-time Updates</strong>: Changes trigger socket events for UI updates</p>\n</li>\n<li><p><strong>External Sync</strong>: Be aware changes may sync to external systems</p>\n</li>\n</ol>\n","urlObject":{"path":["orders","{{orderId}}","edit"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"96fbfeb3-0882-429a-ad59-28755d10b8db"},{"name":"Delete Order","id":"d240d608-a45b-4d97-9331-e9658145d0e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/orders/{{orderId}}","description":"<h2 id=\"delete-ordersorderid---delete-order-soft-delete\">DELETE /orders/:orderId - Delete Order (Soft Delete)</h2>\n<h3 id=\"request-configuration\">Request Configuration</h3>\n<p><strong>Method:</strong> <code>DELETE</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/orders/{{orderId}}</code><br /><strong>Authentication:</strong> Required (JWT Bearer token)<br /><strong>API Token Access:</strong> Supported</p>\n<p><strong>Important:</strong> This is a <strong>soft delete</strong> - the order is not permanently removed from the database. Instead, it is marked as deleted with a timestamp and reason.</p>\n<hr />\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>orderId</code></td>\n<td>Order ID (numeric)</td>\n<td><strong>Yes</strong></td>\n<td>Number</td>\n<td><code>12345</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note:</strong> This endpoint uses the <strong>numeric</strong> <strong><code>orderId</code></strong>, not the MongoDB <code>_id</code>.</p>\n<hr />\n<h2 id=\"headers\">Headers</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Description</th>\n<th>Required</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td>Bearer JWT token</td>\n<td><strong>Yes</strong></td>\n<td><code>Bearer {{token}}</code></td>\n</tr>\n<tr>\n<td><code>Content-Type</code></td>\n<td>Request content type</td>\n<td>No</td>\n<td><code>application/json</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"request-body\">Request Body</h2>\n<p><strong>No request body required</strong> - this is a simple DELETE operation.</p>\n<hr />\n<h2 id=\"what-happens-when-you-delete-an-order\">What Happens When You Delete an Order</h2>\n<h3 id=\"1-order-is-soft-deleted\">1. Order is Soft Deleted</h3>\n<p>The order record is updated with:</p>\n<ul>\n<li><p><code>deletedAt</code>: Current timestamp</p>\n</li>\n<li><p><code>deletedBy</code>: User ID who deleted the order</p>\n</li>\n<li><p><code>orderStatus</code>: Changed to <code>\"Deleted\"</code></p>\n</li>\n<li><p><code>deletedReason</code>: Set to <code>\"User deleted. {user_email}\"</code></p>\n</li>\n</ul>\n<h3 id=\"2-order-follow-ups-are-deleted\">2. Order Follow-Ups are Deleted</h3>\n<p>All associated follow-up records are also soft deleted:</p>\n<ul>\n<li>All <code>OrderFollowUp</code> records linked to this order get a <code>deletedAt</code> timestamp</li>\n</ul>\n<h3 id=\"3-socket-notification\">3. Socket Notification</h3>\n<p>If socket connections are active, a cart update notification is broadcast.</p>\n<h3 id=\"4-api-token-logging\">4. API Token Logging</h3>\n<p>If the request used an API token, the action is logged for tracking.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<p>Returns the deleted order object with updated fields:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439050\",\n  \"orderId\": 12345,\n  \"orderStatus\": \"Deleted\",\n  \"orderType\": \"Decorated\",\n  \"orderEmail\": \"customer@example.com\",\n  \"customerId\": \"507f1f77bcf86cd799439012\",\n  \"storeId\": \"507f1f77bcf86cd799439011\",\n  \"salesUserId\": \"507f1f77bcf86cd799439013\",\n  \"adminUserId\": \"507f1f77bcf86cd799439014\",\n  \"productTotal\": 1250.00,\n  \"orderTotal\": 1425.00,\n  \"deletedAt\": \"2025-11-07T14:30:00.000Z\",\n  \"deletedBy\": \"507f1f77bcf86cd799439013\",\n  \"deletedReason\": \"User deleted. admin@company.com\",\n  \"PurchaseOrders\": [],\n  \"createdAt\": \"2025-11-07T10:30:00.000Z\",\n  \"updatedAt\": \"2025-11-07T14:30:00.000Z\"\n}\n\n</code></pre>\n<h3 id=\"key-response-fields\">Key Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>deletedAt</code></td>\n<td>Deletion timestamp</td>\n<td>Date (ISO 8601)</td>\n</tr>\n<tr>\n<td><code>deletedBy</code></td>\n<td>User who deleted (ObjectId)</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>orderStatus</code></td>\n<td>Changed to \"Deleted\"</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>deletedReason</code></td>\n<td>Reason for deletion</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"sample-request\">Sample Request</h2>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location --request DELETE 'https://api.mpowerpromo.com/orders/12345' \\\n--header 'Authorization: Bearer {{token}}'\n\n</code></pre>\n<h3 id=\"postman-example\">Postman Example</h3>\n<p><strong>Method:</strong> <code>DELETE</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/orders/12345</code><br /><strong>Headers:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer {{token}}\n\n</code></pre><p><strong>Body:</strong> None</p>\n<h3 id=\"javascriptaxios-example\">JavaScript/Axios Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">const axios = require('axios');\naxios.delete('https://api.example.com/orders/12345', {\n  headers: {\n    'Authorization': 'Bearer YOUR_TOKEN_HERE'\n  }\n})\n.then(response =&gt; {\n  console.log('Order deleted:', response.data);\n})\n.catch(error =&gt; {\n  console.error('Error deleting order:', error.response.data);\n});\n\n</code></pre>\n<hr />\n<h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"404-not-found\">404 Not Found</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Order not found\"\n}\n\n</code></pre>\n<p><strong>Causes:</strong></p>\n<ul>\n<li><p>Order doesn't exist</p>\n</li>\n<li><p>Invalid orderId format</p>\n</li>\n<li><p>Order already deleted</p>\n</li>\n</ul>\n<h3 id=\"401-unauthorized\">401 Unauthorized</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Unauthorized\"\n}\n\n</code></pre>\n<p><strong>Causes:</strong></p>\n<ul>\n<li><p>Missing authentication token</p>\n</li>\n<li><p>Invalid authentication token</p>\n</li>\n<li><p>Expired token</p>\n</li>\n</ul>\n<h3 id=\"403-forbidden\">403 Forbidden</h3>\n<p><strong>Causes:</strong></p>\n<ul>\n<li><p>User doesn't have permission to delete orders</p>\n</li>\n<li><p>User doesn't belong to the order's distributor</p>\n</li>\n<li><p>API token doesn't have delete permissions</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"important-notes\">Important Notes</h2>\n<h3 id=\"soft-delete-vs-hard-delete\">Soft Delete vs Hard Delete</h3>\n<ul>\n<li><p>✅ <strong>Soft Delete:</strong> Order remains in database</p>\n</li>\n<li><p>✅ <strong>Can be restored:</strong> Use the un-delete endpoint</p>\n</li>\n<li><p>✅ <strong>Audit trail:</strong> Deletion is tracked with timestamp, user, and reason</p>\n</li>\n<li><p>❌ <strong>Not immediately removed:</strong> Order still exists in database</p>\n</li>\n<li><p>❌ <strong>Won't appear in normal queries:</strong> Queries filter out deleted orders by default</p>\n</li>\n</ul>\n<h3 id=\"what-gets-deleted\">What Gets Deleted</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Item</th>\n<th>Action</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Order record</td>\n<td>Soft deleted (marked with <code>deletedAt</code>)</td>\n</tr>\n<tr>\n<td>Order follow-ups</td>\n<td>Soft deleted (all related follow-ups)</td>\n</tr>\n<tr>\n<td>Purchase orders</td>\n<td>Remain but inaccessible via order</td>\n</tr>\n<tr>\n<td>Payments</td>\n<td>Remain in database</td>\n</tr>\n<tr>\n<td>Documents</td>\n<td>Remain in database</td>\n</tr>\n<tr>\n<td>Shipments</td>\n<td>Remain in database</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"what-doesnt-get-deleted\">What Doesn't Get Deleted</h3>\n<p>The following remain unchanged:</p>\n<ul>\n<li><p>Customer record</p>\n</li>\n<li><p>Store record</p>\n</li>\n<li><p>Payment records</p>\n</li>\n<li><p>Documents/uploads</p>\n</li>\n<li><p>Logs and history</p>\n</li>\n<li><p>Related data in other systems (QB, Zoho, etc.)</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"restoring-deleted-orders\">Restoring Deleted Orders</h2>\n<h3 id=\"un-delete-endpoint\">Un-Delete Endpoint</h3>\n<p>You can restore a deleted order using:</p>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/orders/{{_id}}/un-delete</code></p>\n<p><strong>Note:</strong> This uses the MongoDB <code>_id</code>, not the numeric <code>orderId</code>.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location --request POST 'https://api.mpowerpromo.com/orders/507f1f77bcf86cd799439050/un-delete' \\\n--header 'Authorization: Bearer {{token}}'\n\n</code></pre>\n<p><strong>Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439050\",\n  \"orderId\": 12345,\n  \"orderStatus\": \"Deleted\",\n  \"cancelDeletedAt\": \"2025-11-07T15:00:00.000Z\"\n}\n\n</code></pre>\n<p><strong>Note:</strong> The <code>deletedAt</code> field is removed, and <code>cancelDeletedAt</code> is set to track the restoration.</p>\n<hr />\n<h2 id=\"viewing-deleted-orders\">Viewing Deleted Orders</h2>\n<p>To view deleted orders in the load-orders endpoint:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"params\": {\n    \"deletedOnly\": true,\n    \"page\": 1,\n    \"limit\": 25\n  }\n}\n\n</code></pre>\n<hr />\n<h2 id=\"authorization--permissions\">Authorization &amp; Permissions</h2>\n<h3 id=\"required-permissions\">Required Permissions</h3>\n<ul>\n<li><p>Must be authenticated</p>\n</li>\n<li><p>Must have access to the order's distributor</p>\n</li>\n<li><p>API tokens must have delete permissions enabled</p>\n</li>\n</ul>\n<h3 id=\"who-can-delete-orders\">Who Can Delete Orders</h3>\n<ul>\n<li><p>✅ Admin users</p>\n</li>\n<li><p>✅ Sales users (for their own orders)</p>\n</li>\n<li><p>✅ Users with proper role permissions</p>\n</li>\n<li><p>✅ API tokens with delete access</p>\n</li>\n<li><p>❌ Customers cannot delete orders</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"use-cases\">Use Cases</h2>\n<h3 id=\"when-to-delete-an-order\">When to Delete an Order</h3>\n<ul>\n<li><p>Order created by mistake</p>\n</li>\n<li><p>Duplicate order entry</p>\n</li>\n<li><p>Test order cleanup</p>\n</li>\n<li><p>Customer canceled before processing</p>\n</li>\n<li><p>Order entered in wrong system</p>\n</li>\n</ul>\n<h3 id=\"when-not-to-delete\">When NOT to Delete</h3>\n<ul>\n<li><p>❌ <strong>Completed orders</strong> - Use \"Canceled\" status instead</p>\n</li>\n<li><p>❌ <strong>Orders with payments</strong> - Refund first, then delete</p>\n</li>\n<li><p>❌ <strong>Orders in production</strong> - Cancel with supplier first</p>\n</li>\n<li><p>❌ <strong>Shipped orders</strong> - Use appropriate status instead</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"best-practices\">Best Practices</h2>\n<h3 id=\"before-deleting\">Before Deleting</h3>\n<ol>\n<li><p><strong>Check order status</strong> - Ensure it's safe to delete</p>\n</li>\n<li><p><strong>Verify with team</strong> - Confirm no one is working on it</p>\n</li>\n<li><p><strong>Document reason</strong> - The deletion reason is auto-generated but you may want to add a note</p>\n</li>\n<li><p><strong>Check for payments</strong> - Handle any payments appropriately</p>\n</li>\n<li><p><strong>Notify stakeholders</strong> - Customer, supplier, etc.</p>\n</li>\n</ol>\n<h3 id=\"after-deleting\">After Deleting</h3>\n<ol>\n<li><p><strong>Verify deletion</strong> - Check the response confirms deletion</p>\n</li>\n<li><p><strong>Notify team</strong> - Let relevant team members know</p>\n</li>\n<li><p><strong>Update external systems</strong> - If integrated with QB, Zoho, etc.</p>\n</li>\n<li><p><strong>Document</strong> - Add notes if needed for audit purposes</p>\n</li>\n</ol>\n<hr />\n<h2 id=\"related-endpoints\">Related Endpoints</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Endpoint</th>\n<th>Purpose</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>POST /orders/:_id/un-delete</code></td>\n<td>Restore a deleted order</td>\n</tr>\n<tr>\n<td><code>POST /load-orders</code></td>\n<td>View deleted orders with <code>deletedOnly: true</code></td>\n</tr>\n<tr>\n<td><code>PATCH /orders/:orderId</code></td>\n<td>Update order status to \"Canceled\" instead</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"difference-delete-vs-cancel\">Difference: Delete vs Cancel</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Action</th>\n<th>Delete</th>\n<th>Cancel</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Status</strong></td>\n<td>\"Deleted\"</td>\n<td>\"Canceled\"</td>\n</tr>\n<tr>\n<td><strong>Visibility</strong></td>\n<td>Hidden from normal queries</td>\n<td>Visible in order lists</td>\n</tr>\n<tr>\n<td><strong>Reversible</strong></td>\n<td>Yes (un-delete endpoint)</td>\n<td>Yes (update status)</td>\n</tr>\n<tr>\n<td><strong>Use Case</strong></td>\n<td>Mistakes, duplicates, tests</td>\n<td>Legitimate cancellations</td>\n</tr>\n<tr>\n<td><strong>Recommended</strong></td>\n<td>Internal errors</td>\n<td>Business operations</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Recommendation:</strong> Use <strong>Cancel</strong> status for normal business operations. Use <strong>Delete</strong> only for data cleanup and errors.</p>\n<hr />\n<h2 id=\"example-workflow\">Example Workflow</h2>\n<h3 id=\"delete-order-flow\">Delete Order Flow</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">// 1. Get the order to verify it exists\nconst order = await axios.get('https://api.mpowerpromo.com/orders/12345/full', {\n  headers: { Authorization: 'Bearer {{token}}' }\n});\nconsole.log(`Deleting order ${order.data.orderId} - ${order.data.orderStatus}`);\n// 2. Delete the order\nconst deletedOrder = await axios.delete('https://api.mpowerpromo.com/orders/12345', {\n  headers: { Authorization: 'Bearer {{token}}' }\n});\nconsole.log(`Order deleted at: ${deletedOrder.data.deletedAt}`);\nconsole.log(`Deleted by: ${deletedOrder.data.deletedBy}`);\nconsole.log(`Reason: ${deletedOrder.data.deletedReason}`);\n// 3. Verify deletion\nconst orders = await axios.post('https://api.mpowerpromo.com/load-orders', {\n  params: {\n    filter: { orderId: 12345 }\n  }\n}, {\n  headers: { Authorization: 'Bearer {{token}}' }\n});\nconsole.log(`Order visible in normal queries: ${orders.data.data.length &gt; 0}`);\n// 4. Check deleted orders list\nconst deletedOrders = await axios.post('https://api.mpowerpromo.com/load-orders', {\n  params: {\n    deletedOnly: true,\n    filter: { orderId: 12345 }\n  }\n}, {\n  headers: { Authorization: 'Bearer {{token}}' }\n});\nconsole.log(`Order in deleted list: ${deletedOrders.data.data.length &gt; 0}`)\n\n</code></pre>\n","urlObject":{"path":["orders","{{orderId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"d240d608-a45b-4d97-9331-e9658145d0e2"}],"id":"acbbcfa4-d7f3-4147-8689-a579bf55eeb3","_postman_id":"acbbcfa4-d7f3-4147-8689-a579bf55eeb3","description":""},{"name":"Order PO","item":[{"name":"Get POs","id":"d4490aa0-d4e3-4d1a-8457-90564f3b8ba3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"{{apiToken}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"params\": {\n        \"filter\": {\n            //\"status\": []\n        },\n        \"limit\": 100,\n        \"ascending\": 0,\n        \"page\": 1,\n        \"orderBy\": \"orderDate\"\n        // \"withTestOrders\":true\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/load-purchase-orders","description":"<p>Get purchase orders.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Key</strong></th>\n<th><strong>Value</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Filter</strong></td>\n<td></td>\n</tr>\n<tr>\n<td>status</td>\n<td>Ready for Production  <br />Ready for Fulfillment  <br />Sent to Supplier  <br />In Production  <br />Shipped  <br />Delivered</td>\n</tr>\n<tr>\n<td><strong>withTestOrders</strong></td>\n<td>true, false</td>\n</tr>\n<tr>\n<td><strong>initialType</strong></td>\n<td>web  <br />non-web</td>\n</tr>\n<tr>\n<td><strong>Limit</strong></td>\n<td>100</td>\n</tr>\n<tr>\n<td><strong>Ascending</strong></td>\n<td>0</td>\n</tr>\n<tr>\n<td><strong>Page</strong></td>\n<td>1</td>\n</tr>\n<tr>\n<td><strong>OrderBy</strong></td>\n<td>orderDate</td>\n</tr>\n<tr>\n<td><strong>orderDateRange</strong></td>\n<td>\"startDate\":\"2025-07-01\"  <br />\"endDate\":\"2025-07-01\"</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["load-purchase-orders"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"d4490aa0-d4e3-4d1a-8457-90564f3b8ba3"},{"name":"Get Order POs","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"purchaseOrderId\", jsonData[0].friendlyPurchaseOrderDetailId);  "],"type":"text/javascript","packages":{}}}],"id":"e36d8712-eadb-49c3-a7e3-f857e93765f7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/orders/{{orderId}}/details","description":"<p>Get order</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n<th><strong>Required</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>orderId</td>\n<td></td>\n<td>Id of order included in URL</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p>Optional Params</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Name</strong></th>\n<th><strong>Value</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>withoutDistributor</td>\n<td>1 or 0 (true or false)</td>\n<td>if true, will show all orders assigned to supplier regardless of distributor</td>\n</tr>\n<tr>\n<td>populateShipments</td>\n<td>1 or 0 (true or false)</td>\n<td>if true, will include all shippment tracking information</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["orders","{{orderId}}","details"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"e36d8712-eadb-49c3-a7e3-f857e93765f7"},{"name":"Get Order PO","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","\r","// postman.setEnvironmentVariable(\"order_id\", jsonData._id);  \r","\r","pm.test(\"Response status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","pm.test(\"Response time is less than 200ms\", function () {\r","  pm.expect(pm.response.responseTime).to.be.below(200);\r","});\r","\r","\r","pm.test(\"Verify that the response is in JSON format\", function () {\r","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\r","});\r","\r","\r","pm.test(\"Status is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"Content type is application/json\", function () {\r","    pm.response.to.have.header(\"Content-Type\", \"application/json\");\r","});\r","\r","pm.test(\"Check for the presence of required fields\", function () {\r","    const responseData = pm.response.json();\r","    \r","    pm.expect(responseData).to.be.an('object');\r","    pm.expect(responseData).to.have.property('fromPOId');\r","    pm.expect(responseData).to.have.property('childOrderId');\r","    pm.expect(responseData).to.have.property('productTotal');\r","    pm.expect(responseData).to.have.property('supplier');\r","    pm.expect(responseData).to.have.property('LineItemArray');\r","    pm.expect(responseData).to.have.property('ShipmentArray');\r","    pm.expect(responseData).to.have.property('relatedPO');\r","    pm.expect(responseData).to.have.property('grouped');\r","});\r","\r","\r","pm.test(\"LineItemArray contains the expected number of elements\", function () {\r","    const responseData = pm.response.json();\r","    \r","    pm.expect(responseData.LineItemArray).to.be.an('array');\r","    pm.expect(responseData.LineItemArray).to.have.lengthOf(1);\r","});\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"688e09e9-37a3-49b8-b198-cf69eb0395c9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/orders/{{orderId}}/details/{{friendlyPurchaseOrderDetailId}}","description":"<p>Get order PO</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>orderId</td>\n<td><strong>Int</strong></td>\n<td></td>\n<td>order id</td>\n</tr>\n<tr>\n<td>purchaseOrderId</td>\n<td>Int</td>\n<td></td>\n<td>PO id</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["orders","{{orderId}}","details","{{friendlyPurchaseOrderDetailId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"688e09e9-37a3-49b8-b198-cf69eb0395c9"},{"name":"Update Order PO","id":"a24cccee-bcfb-467a-9c41-25f7ba99e6ee","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\r\n  \"status\": \"In Production\",\r\n  \"prevStatus\": \"Sent to Supplier\",\r\n  \"type\": \"Standard\",\r\n  \"supplier\": \"507f1f77bcf86cd799439011\",\r\n  \"supplierCode\": \"ABC-12345\",\r\n  \"productId\": \"PROD-001\",\r\n  \"SO\": \"1234\",\r\n  \"source\": \"PromoStandards API\",\r\n  \"requestedBy\": \"Email\",\r\n  \"rush\": true,\r\n  \"taxExempt\": false,\r\n  \"hideLogo\": false,\r\n  \"fromProductView\": false,\r\n  \"availableStatusToCheck\": true,\r\n  \"productTotal\": 1000.00,\r\n  \"productTotalCost\": 650.00,\r\n  \"margin\": 350.00,\r\n  \"total\": 1315.00,\r\n  \"shippingTotal\": 50.00,\r\n  \"shippingTotalCost\": 35.00,\r\n  \"chargeTotal\": 150.00,\r\n  \"chargeTotalCost\": 100.00,\r\n  \"discountTotal\": 100.00,\r\n  \"adjustmentsTotal\": 25.00,\r\n  \"productDiscount\": 100.00,\r\n  \"shippingDiscount\": 25.00,\r\n  \"taxTotal\": 115.00,\r\n  \"taxRate\": 10.0,\r\n  \"partFundraisingTotal\": 200.00,\r\n  \"estimatedDeliveryDate\": \"11/20/2025\",\r\n  \"estimatedProductionDate\": \"11/5/2025\",\r\n  \"estimatedShipDate\": \"11/15/2025\",\r\n  \"receivedDate\": \"10/28/2025\",\r\n  \"dueDate\": \"11/25/2025\",\r\n  \"shippedDate\": \"11/16/2025\",\r\n  \"reconciledAt\": \"2025-10-28T15:30:00.000Z\",\r\n  \"shippingReconciliationAt\": 20251028,\r\n  \"supplierReconciliationAt\": 20251028,\r\n  \"lastCheckedTrackingDate\": \"2025-10-28T10:00:00.000Z\",\r\n  \"hasSupplierReconciliationDate\": true,\r\n  \"hasShippingReconciliationDate\": true,\r\n  \"updateReconciled\": false,\r\n  \"publicComments\": \"Thank you for your order! Expected delivery: November 20th, 2025.\",\r\n  \"privateComments\": \"VIP customer - priority handling required. Account manager: Jane Smith.\",\r\n  \"billingComments\": \"Approved for Net 30 payment terms. PO#12345 on file.\",\r\n  \"supplierComments\": \"Rush order - expedite through all production stages. Use premium materials.\",\r\n  \"additionalSupplierComments\": \"Customer is very particular about color matching. Use PMS color guide.\",\r\n  \"externalComments\": \"Referred by ABC Corporation partnership program.\",\r\n  \"customerComments\": {\r\n    \"decorationColors\": \"Pantone 186C Red, Pantone 280 Blue, Process Black\",\r\n    \"instructions\": \"Left chest placement: 3 inch logo. Right sleeve: 1.5 inch text 'TEAM 2025'.\",\r\n    \"dueDate\": \"11/20/2025\"\r\n  },\r\n  \"productionManagerId\": \"507f1f77bcf86cd799439012\",\r\n  \"machine\": \"507f1f77bcf86cd799439013\",\r\n  \"lineQBId\": \"LINE-12345\",\r\n  \"qbProductsAndServicesId\": \"PROD-67890\",\r\n  \"sync\": [\"QuickBooks\", \"Zoho\", \"HubSpot\"],\r\n  \"syncIds\": [\"QB-12345\", \"ZOHO-67890\", \"HS-111222\"],\r\n  \"parentPoId\": 100,\r\n  \"fromPOId\": [95, 96],\r\n  \"childOrderId\": [12346, 12347],\r\n  \"batchedPO\": [2, 3, 4],\r\n  \"promoCode\": \"VIP2025\",\r\n  \"salesChannel\": \"Direct Sales\",\r\n  \"updateGroup\": false,\r\n  \"digitalProof\": {\r\n    \"sentDate\": \"2025-10-28T10:00:00.000Z\",\r\n    \"approvedDate\": \"2025-10-29T14:30:00.000Z\",\r\n    \"proofUrl\": \"https://example.com/proofs/order-12345-po-1.pdf\"\r\n  },\r\n  \"shipment\": {\r\n    \"_id\": \"507f1f77bcf86cd799439020\",\r\n    \"carrier\": \"FedEx\",\r\n    \"carrierService\": \"Ground\",\r\n    \"trackingPackages\": [\"507f1f77bcf86cd799439021\"],\r\n    \"shipmentCost\": 45.00,\r\n    \"shipmentPrice\": 55.00,\r\n    \"weight\": 12.5,\r\n    \"attentionTo\": \"John Smith\",\r\n    \"street1\": \"123 Business Park Drive\",\r\n    \"street2\": \"Building B, Suite 200\",\r\n    \"city\": \"Los Angeles\",\r\n    \"state\": \"CA\",\r\n    \"zip\": \"90001\",\r\n    \"country\": \"US\",\r\n    \"email\": \"john.smith@acme.com\",\r\n    \"phone\": \"555-123-4567\"\r\n  }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/orders/{{orderId}}/details/{{friendlyPurchaseOrderDetailId}}","description":"<h2 id=\"put-ordersorderiddetailsfriendlypurchaseorderdetailid---update-purchase-order\">PUT /orders/:orderId/details/:friendlyPurchaseOrderDetailId - Update Purchase Order</h2>\n<h3 id=\"request-configuration\">Request Configuration</h3>\n<p><strong>Method:</strong> <code>PUT</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/orders/{{orderId}}/details/{{friendlyPurchaseOrderDetailId}}</code><br /><strong>Authentication:</strong> Required (JWT Bearer token)</p>\n<hr />\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>orderId</code></td>\n<td>Order ID (numeric)</td>\n<td><strong>Yes</strong></td>\n<td>Number</td>\n<td><code>12345</code></td>\n</tr>\n<tr>\n<td><code>friendlyPurchaseOrderDetailId</code></td>\n<td>Purchase Order detail ID</td>\n<td><strong>Yes</strong></td>\n<td>Number</td>\n<td><code>1</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"request-body-parameters\">Request Body Parameters</h2>\n<h3 id=\"table-1-basic-po-information\">Table 1: Basic PO Information</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>Purchase order status</td>\n<td>String</td>\n<td><code>\"Sent to Supplier\"</code></td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>Purchase order type</td>\n<td>String</td>\n<td><code>\"Standard\"</code></td>\n</tr>\n<tr>\n<td><code>supplier</code></td>\n<td>Supplier ObjectId reference</td>\n<td>ObjectId</td>\n<td><code>\"507f1f77bcf86cd799439011\"</code></td>\n</tr>\n<tr>\n<td><code>supplierCode</code></td>\n<td>Supplier product code</td>\n<td>String</td>\n<td><code>\"ABC-12345\"</code></td>\n</tr>\n<tr>\n<td><code>productId</code></td>\n<td>Product ID</td>\n<td>String</td>\n<td><code>\"PROD-001\"</code></td>\n</tr>\n<tr>\n<td><code>SO</code></td>\n<td>Sales Order number</td>\n<td>String</td>\n<td><code>\"SO-2025-001\"</code></td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>Source system</td>\n<td>String</td>\n<td><code>\"PromoStandards\"</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Status Values:</strong> Pending, Sent to Supplier, In Production, Shipped, Delivered, Canceled, Archive, Proof Sent, Proof Approved, Ready for Production, etc.</p>\n<p><strong>Type Values:</strong> Standard, Sample, Blank, Decorator, etc.</p>\n<hr />\n<h3 id=\"table-2-flags--boolean-settings\">Table 2: Flags &amp; Boolean Settings</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Default</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>rush</code></td>\n<td>Rush order flag</td>\n<td>Boolean</td>\n<td>false</td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td><code>taxExempt</code></td>\n<td>Tax exempt flag</td>\n<td>Boolean</td>\n<td>false</td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td><code>hideLogo</code></td>\n<td>Hide logo on proof</td>\n<td>Boolean</td>\n<td>false</td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td><code>fromProductView</code></td>\n<td>Created from product view</td>\n<td>Boolean</td>\n<td>false</td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td><code>availableStatusToCheck</code></td>\n<td>Can check status</td>\n<td>Boolean</td>\n<td>-</td>\n<td><code>true</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"table-3-financial-totals-usually-auto-calculated\">Table 3: Financial Totals (Usually Auto-Calculated)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Auto-Calc</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>productTotal</code></td>\n<td>Total product price</td>\n<td>Number</td>\n<td>Yes</td>\n<td><code>1000.00</code></td>\n</tr>\n<tr>\n<td><code>productTotalCost</code></td>\n<td>Total product cost</td>\n<td>Number</td>\n<td>Yes</td>\n<td><code>650.00</code></td>\n</tr>\n<tr>\n<td><code>margin</code></td>\n<td>Profit margin</td>\n<td>Number</td>\n<td>Yes</td>\n<td><code>350.00</code></td>\n</tr>\n<tr>\n<td><code>total</code></td>\n<td>Grand total</td>\n<td>Number</td>\n<td>Yes</td>\n<td><code>1165.00</code></td>\n</tr>\n<tr>\n<td><code>shippingTotal</code></td>\n<td>Shipping price</td>\n<td>Number</td>\n<td>Yes</td>\n<td><code>50.00</code></td>\n</tr>\n<tr>\n<td><code>shippingTotalCost</code></td>\n<td>Shipping cost</td>\n<td>Number</td>\n<td>Yes</td>\n<td><code>35.00</code></td>\n</tr>\n<tr>\n<td><code>chargeTotal</code></td>\n<td>Additional charges total</td>\n<td>Number</td>\n<td>Yes</td>\n<td><code>150.00</code></td>\n</tr>\n<tr>\n<td><code>chargeTotalCost</code></td>\n<td>Charges cost</td>\n<td>Number</td>\n<td>Yes</td>\n<td><code>100.00</code></td>\n</tr>\n<tr>\n<td><code>discountTotal</code></td>\n<td>Total discounts</td>\n<td>Number</td>\n<td>Yes</td>\n<td><code>100.00</code></td>\n</tr>\n<tr>\n<td><code>adjustmentsTotal</code></td>\n<td>Adjustments total</td>\n<td>Number</td>\n<td>Yes</td>\n<td><code>50.00</code></td>\n</tr>\n<tr>\n<td><code>productDiscount</code></td>\n<td>Product discount (manual)</td>\n<td>Number</td>\n<td>No</td>\n<td><code>100.00</code></td>\n</tr>\n<tr>\n<td><code>shippingDiscount</code></td>\n<td>Shipping discount (manual)</td>\n<td>Number</td>\n<td>No</td>\n<td><code>25.00</code></td>\n</tr>\n<tr>\n<td><code>taxTotal</code></td>\n<td>Tax total</td>\n<td>Number</td>\n<td>Yes/Manual</td>\n<td><code>115.00</code></td>\n</tr>\n<tr>\n<td><code>taxRate</code></td>\n<td>Tax rate percentage (min: 0)</td>\n<td>Number</td>\n<td>Yes/Manual</td>\n<td><code>10.0</code></td>\n</tr>\n<tr>\n<td><code>partFundraisingTotal</code></td>\n<td>Fundraising total</td>\n<td>Number</td>\n<td>Yes</td>\n<td><code>200.00</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"table-4-date-fields\">Table 4: Date Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Format</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>estimatedDeliveryDate</code></td>\n<td>Estimated delivery</td>\n<td>Number</td>\n<td>YYYYMMDD</td>\n<td><code>20251120</code></td>\n</tr>\n<tr>\n<td><code>estimatedProductionDate</code></td>\n<td>Estimated production start</td>\n<td>Number</td>\n<td>YYYYMMDD</td>\n<td><code>20251105</code></td>\n</tr>\n<tr>\n<td><code>estimatedShipDate</code></td>\n<td>Estimated ship date</td>\n<td>Number</td>\n<td>YYYYMMDD</td>\n<td><code>20251115</code></td>\n</tr>\n<tr>\n<td><code>receivedDate</code></td>\n<td>Date received</td>\n<td>Number</td>\n<td>YYYYMMDD</td>\n<td><code>20251028</code></td>\n</tr>\n<tr>\n<td><code>dueDate</code></td>\n<td>Due date</td>\n<td>Number</td>\n<td>YYYYMMDD</td>\n<td><code>20251125</code></td>\n</tr>\n<tr>\n<td><code>shippedDate</code></td>\n<td>Shipped date</td>\n<td>Number</td>\n<td>YYYYMMDD</td>\n<td><code>20251116</code></td>\n</tr>\n<tr>\n<td><code>reconciledAt</code></td>\n<td>Reconciliation timestamp</td>\n<td>Date</td>\n<td>ISO 8601</td>\n<td><code>\"2025-10-28T15:30:00.000Z\"</code></td>\n</tr>\n<tr>\n<td><code>shippingReconciliationAt</code></td>\n<td>Shipping reconciliation</td>\n<td>Number</td>\n<td>YYYYMMDD</td>\n<td><code>20251028</code></td>\n</tr>\n<tr>\n<td><code>supplierReconciliationAt</code></td>\n<td>Supplier reconciliation</td>\n<td>Number</td>\n<td>YYYYMMDD</td>\n<td><code>20251028</code></td>\n</tr>\n<tr>\n<td><code>lastCheckedTrackingDate</code></td>\n<td>Last tracking check</td>\n<td>Date</td>\n<td>ISO 8601</td>\n<td><code>\"2025-10-28T10:00:00.000Z\"</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"table-5-comment-fields\">Table 5: Comment Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Max Length</th>\n<th>Visibility</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>publicComments</code></td>\n<td>Customer-visible comments</td>\n<td>1000 chars</td>\n<td>Public</td>\n<td><code>\"Thank you for your order!\"</code></td>\n</tr>\n<tr>\n<td><code>privateComments</code></td>\n<td>Internal comments only</td>\n<td>1000 chars</td>\n<td>Private</td>\n<td><code>\"VIP customer - priority\"</code></td>\n</tr>\n<tr>\n<td><code>billingComments</code></td>\n<td>Billing-related notes</td>\n<td>1000 chars</td>\n<td>Internal</td>\n<td><code>\"Net 30 terms approved\"</code></td>\n</tr>\n<tr>\n<td><code>supplierComments</code></td>\n<td>Comments for supplier</td>\n<td>1000 chars</td>\n<td>Supplier</td>\n<td><code>\"Rush order - expedite\"</code></td>\n</tr>\n<tr>\n<td><code>additionalSupplierComments</code></td>\n<td>Additional supplier notes</td>\n<td>1000 chars</td>\n<td>Supplier</td>\n<td><code>\"Call before shipping\"</code></td>\n</tr>\n<tr>\n<td><code>externalComments</code></td>\n<td>External comments</td>\n<td>1000 chars</td>\n<td>External</td>\n<td><code>\"Referred by ABC Corp\"</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"table-6-user-assignments\">Table 6: User Assignments</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Reference</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>productionManagerId</code></td>\n<td>Production manager</td>\n<td>ObjectId</td>\n<td>User</td>\n<td><code>\"507f1f77bcf86cd799439011\"</code></td>\n</tr>\n<tr>\n<td><code>machine</code></td>\n<td>Machine assigned</td>\n<td>ObjectId</td>\n<td>Machine</td>\n<td><code>\"507f1f77bcf86cd799439012\"</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"table-7-reconciliation-flags\">Table 7: Reconciliation Flags</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>hasSupplierReconciliationDate</code></td>\n<td>Has supplier reconciliation</td>\n<td>Boolean</td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td><code>hasShippingReconciliationDate</code></td>\n<td>Has shipping reconciliation</td>\n<td>Boolean</td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td><code>updateReconciled</code></td>\n<td>Trigger reconciliation update</td>\n<td>Boolean</td>\n<td><code>true</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"table-8-external-system-ids\">Table 8: External System IDs</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>System</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>lineQBId</code></td>\n<td>QuickBooks line item ID</td>\n<td>String</td>\n<td>QuickBooks</td>\n<td><code>\"LINE-12345\"</code></td>\n</tr>\n<tr>\n<td><code>qbProductsAndServicesId</code></td>\n<td>QB products/services ID</td>\n<td>String</td>\n<td>QuickBooks</td>\n<td><code>\"PROD-67890\"</code></td>\n</tr>\n<tr>\n<td><code>sync</code></td>\n<td>Sync status array</td>\n<td>Array[String]</td>\n<td>Multiple</td>\n<td><code>[\"QuickBooks\", \"Zoho\"]</code></td>\n</tr>\n<tr>\n<td><code>syncIds</code></td>\n<td>External sync IDs</td>\n<td>Array[String]</td>\n<td>Multiple</td>\n<td><code>[\"QB-12345\", \"ZOHO-67890\"]</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"table-9-reference--relationship-ids\">Table 9: Reference &amp; Relationship IDs</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>parentPoId</code></td>\n<td>Parent PO ID</td>\n<td>Number</td>\n<td><code>100</code></td>\n</tr>\n<tr>\n<td><code>fromPOId</code></td>\n<td>Source PO IDs</td>\n<td>Array[Number]</td>\n<td><code>[95, 96]</code></td>\n</tr>\n<tr>\n<td><code>childOrderId</code></td>\n<td>Child order IDs</td>\n<td>Array[Number]</td>\n<td><code>[12346, 12347]</code></td>\n</tr>\n<tr>\n<td><code>batchedPO</code></td>\n<td>Batched PO numbers</td>\n<td>Array[Number]</td>\n<td><code>[2, 3, 4]</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"table-10-additional-fields\">Table 10: Additional Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>promoCode</code></td>\n<td>Promo code applied</td>\n<td>String</td>\n<td><code>\"SAVE20\"</code></td>\n</tr>\n<tr>\n<td><code>salesChannel</code></td>\n<td>Sales channel</td>\n<td>String</td>\n<td><code>\"Website\"</code></td>\n</tr>\n<tr>\n<td><code>requestedBy</code></td>\n<td>Request source</td>\n<td>String</td>\n<td><code>\"PromoStandards\"</code></td>\n</tr>\n<tr>\n<td><code>prevStatus</code></td>\n<td>Previous status</td>\n<td>String</td>\n<td><code>\"Pending\"</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"table-11-special-control-fields\">Table 11: Special Control Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Purpose</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>updateGroup</code></td>\n<td>Update grouped POs</td>\n<td>Boolean</td>\n<td>Updates all POs in same group</td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td><code>shipment</code></td>\n<td>Single shipment update</td>\n<td>Object</td>\n<td>Update specific shipment (see schema below)</td>\n<td><code>{ \"_id\": \"507f...\", ... }</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"complex-object-schemas\">Complex Object Schemas</h2>\n<h3 id=\"customercomments-schema\">customerComments Schema</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>decorationColors</code></td>\n<td>Decoration color specifications</td>\n<td>String</td>\n<td><code>\"Pantone 186C Red, Black\"</code></td>\n</tr>\n<tr>\n<td><code>instructions</code></td>\n<td>Special instructions</td>\n<td>String</td>\n<td><code>\"Left chest placement, 3 inch logo\"</code></td>\n</tr>\n<tr>\n<td><code>dueDate</code></td>\n<td>Customer due date</td>\n<td>String</td>\n<td><code>\"12/15/2025\"</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Example:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"customerComments\": {\n    \"decorationColors\": \"Pantone 186C Red, Process Black\",\n    \"instructions\": \"Left chest placement, exact PMS color match required\",\n    \"dueDate\": \"11/20/2025\"\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"shipment-object-schema-for-updating-specific-shipment\">shipment Object Schema (for updating specific shipment)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Required</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>_id</code></td>\n<td>Shipment ID to update</td>\n<td>ObjectId</td>\n<td><strong>Yes</strong></td>\n<td><code>\"507f1f77bcf86cd799439020\"</code></td>\n</tr>\n<tr>\n<td><code>carrier</code></td>\n<td>Carrier name</td>\n<td>String</td>\n<td>No</td>\n<td><code>\"FedEx\"</code></td>\n</tr>\n<tr>\n<td><code>carrierService</code></td>\n<td>Service level</td>\n<td>String</td>\n<td>No</td>\n<td><code>\"Ground\"</code></td>\n</tr>\n<tr>\n<td><code>trackingPackages</code></td>\n<td>Tracking package IDs</td>\n<td>Array[ObjectId]</td>\n<td>No</td>\n<td><code>[\"507f1f77bcf86cd799439021\"]</code></td>\n</tr>\n<tr>\n<td><code>shipmentCost</code></td>\n<td>Shipping cost</td>\n<td>Number</td>\n<td>No</td>\n<td><code>45.00</code></td>\n</tr>\n<tr>\n<td><code>shipmentPrice</code></td>\n<td>Shipping price</td>\n<td>Number</td>\n<td>No</td>\n<td><code>55.00</code></td>\n</tr>\n<tr>\n<td><code>weight</code></td>\n<td>Package weight</td>\n<td>Number</td>\n<td>No</td>\n<td><code>10.5</code></td>\n</tr>\n<tr>\n<td><code>attentionTo</code></td>\n<td>Attention to name</td>\n<td>String</td>\n<td>No</td>\n<td><code>\"John Doe\"</code></td>\n</tr>\n<tr>\n<td><code>street1</code></td>\n<td>Street address line 1</td>\n<td>String</td>\n<td>No</td>\n<td><code>\"123 Main St\"</code></td>\n</tr>\n<tr>\n<td><code>street2</code></td>\n<td>Street address line 2</td>\n<td>String</td>\n<td>No</td>\n<td><code>\"Suite 100\"</code></td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>City</td>\n<td>String</td>\n<td>No</td>\n<td><code>\"New York\"</code></td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>State/Province</td>\n<td>String</td>\n<td>No</td>\n<td><code>\"NY\"</code></td>\n</tr>\n<tr>\n<td><code>zip</code></td>\n<td>Zip/Postal code</td>\n<td>String</td>\n<td>No</td>\n<td><code>\"10001\"</code></td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>Country</td>\n<td>String</td>\n<td>No</td>\n<td><code>\"US\"</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Example:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"shipment\": {\n    \"_id\": \"507f1f77bcf86cd799439020\",\n    \"carrier\": \"FedEx\",\n    \"carrierService\": \"Overnight\",\n    \"trackingPackages\": [\"507f1f77bcf86cd799439021\"],\n    \"shipmentCost\": 45.00,\n    \"shipmentPrice\": 55.00\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"digitalproof-schema\">digitalProof Schema</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>sentDate</code></td>\n<td>Proof sent date</td>\n<td>Date (ISO 8601)</td>\n<td><code>\"2025-10-28T10:00:00.000Z\"</code></td>\n</tr>\n<tr>\n<td><code>approvedDate</code></td>\n<td>Proof approved date</td>\n<td>Date (ISO 8601)</td>\n<td><code>\"2025-10-29T14:30:00.000Z\"</code></td>\n</tr>\n<tr>\n<td><code>proofUrl</code></td>\n<td>URL to proof file</td>\n<td>String</td>\n<td><code>\"https://example.com/proof/12345.pdf\"</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Example:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"digitalProof\": {\n    \"sentDate\": \"2025-10-28T10:00:00.000Z\",\n    \"approvedDate\": null,\n    \"proofUrl\": \"https://example.com/proof/12345.pdf\"\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"lineitemarray-schema-complex---reference-only\">LineItemArray Schema (Complex - Reference Only)</h3>\n<p><strong>Note:</strong> This is a complex nested structure. Include only if updating entire line items.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>_id</code></td>\n<td>Line item ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>localProduct</code></td>\n<td>Product reference</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>Quantity</code></td>\n<td>Quantity object</td>\n<td>Object (<code>{ value: Number, uom: String }</code>)</td>\n</tr>\n<tr>\n<td><code>unitPrice</code></td>\n<td>Unit price</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>unitCost</code></td>\n<td>Unit cost</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>PartArray</code></td>\n<td>Array of parts</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>Configuration</code></td>\n<td>Configuration array</td>\n<td>Array[Object]</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Recommendation:</strong> Avoid sending <code>LineItemArray</code> unless you need to completely replace all line items. Use line-item-specific endpoints instead.</p>\n<hr />\n<h3 id=\"shipmentarray-schema-complex---reference-only\">ShipmentArray Schema (Complex - Reference Only)</h3>\n<p><strong>Note:</strong> For updating a single shipment, use the <code>shipment</code> field (see above). Only send <code>ShipmentArray</code> if replacing all shipments.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>_id</code></td>\n<td>Shipment ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>shipmentId</code></td>\n<td>Shipment number</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>carrier</code></td>\n<td>Carrier name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>Quantity</code></td>\n<td>Quantity object</td>\n<td>Object</td>\n</tr>\n<tr>\n<td><code>street1</code></td>\n<td>Address line 1</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>City</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>State</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>zip</code></td>\n<td>Zip code</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>Country</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Recommendation:</strong> Use the <code>shipment</code> field to update individual shipments instead of replacing the entire array.</p>\n<hr />\n<h2 id=\"quick-reference-common-update-patterns\">Quick Reference: Common Update Patterns</h2>\n<h3 id=\"pattern-1-simple-status-change\">Pattern 1: Simple Status Change</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"Sent to Supplier\"\n}\n\n</code></pre>\n<h3 id=\"pattern-2-status--group-update\">Pattern 2: Status + Group Update</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"Proof Approved\",\n  \"updateGroup\": true\n}\n\n</code></pre>\n<h3 id=\"pattern-3-add-comments\">Pattern 3: Add Comments</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"supplierComments\": \"Rush order - please expedite\",\n  \"privateComments\": \"Customer is VIP\"\n}\n\n</code></pre>\n<h3 id=\"pattern-4-update-dates\">Pattern 4: Update Dates</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"estimatedShipDate\": 20251115,\n  \"estimatedDeliveryDate\": 20251120,\n  \"dueDate\": 20251125\n}\n\n</code></pre>\n<h3 id=\"pattern-5-apply-discounts\">Pattern 5: Apply Discounts</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"productDiscount\": 100.00,\n  \"shippingDiscount\": 25.00\n}\n\n</code></pre>\n<h3 id=\"pattern-6-mark-as-shipped\">Pattern 6: Mark as Shipped</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"Shipped\",\n  \"shippedDate\": 20251028,\n  \"supplierComments\": \"Shipped via FedEx - Tracking: 123456789\"\n}\n\n</code></pre>\n<h3 id=\"pattern-7-rush-order\">Pattern 7: Rush Order</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"rush\": true,\n  \"status\": \"In Production\",\n  \"privateComments\": \"Expedite - needed by Friday\"\n}\n\n</code></pre>\n<h3 id=\"pattern-8-tax-exempt\">Pattern 8: Tax Exempt</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"taxExempt\": true,\n  \"taxTotal\": 0,\n  \"taxRate\": 0\n}\n\n</code></pre>\n","urlObject":{"path":["orders","{{orderId}}","details","{{friendlyPurchaseOrderDetailId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a24cccee-bcfb-467a-9c41-25f7ba99e6ee"},{"name":"Create Order PO","event":[{"listen":"test","script":{"id":"b16f986b-fdba-4acb-a64d-b6b25539fd15","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"purchaseOrderId\", jsonData.model.friendlyPurchaseOrderDetailId);  "],"type":"text/javascript","packages":{}}}],"id":"b7c9a04f-20c4-4298-83e4-3ead2fe459b8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\r\n    \"productTotal\": 467.1,\r\n    \"productTotalCost\": 298.944,\r\n    \"margin\": 32.91704899981647,\r\n    \"rush\": false,\r\n    \"taxExempt\": false,\r\n    \"fromProductView\": false,\r\n    \"total\": 644.4,\r\n    \"shippingTotal\": 99.5,\r\n    \"shippingTotalCost\": 78.36,\r\n    \"chargeTotal\": 77.8,\r\n    \"chargeTotalCost\": 66.591,\r\n    \"discountTotal\": 0,\r\n    \"status\":\"New\",\r\n    \"type\":\"Blank\",\r\n    \"supplier\":\"5cd0b4c1f83ffe3446488d91\",\r\n    \"LineItemArray\":[]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/orders/{{orderId}}/details","description":"<p>Update order. In post request provide the order object from getOrder request with updates</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>orderId</td>\n<td>Int</td>\n<td>0</td>\n<td>order id</td>\n</tr>\n<tr>\n<td>purchaseOrderId</td>\n<td>Int</td>\n<td></td>\n<td>order PO id</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["orders","{{orderId}}","details"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"b7c9a04f-20c4-4298-83e4-3ead2fe459b8"},{"name":"Delete Order PO","event":[{"listen":"test","script":{"id":"b16f986b-fdba-4acb-a64d-b6b25539fd15","exec":[""],"type":"text/javascript","packages":{}}}],"id":"9c62bb43-0aa5-4928-8376-c0419323aeb0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/orders/{{orderId}}/details/{{friendlyPurchaseOrderDetailId}}","description":"<p>Update order. In post request provide the order object from getOrder request with updates</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>orderId</td>\n<td>Int</td>\n<td>0</td>\n<td>order id</td>\n</tr>\n<tr>\n<td>purchaseOrderId</td>\n<td>Int</td>\n<td></td>\n<td>order PO id</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["orders","{{orderId}}","details","{{friendlyPurchaseOrderDetailId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"9c62bb43-0aa5-4928-8376-c0419323aeb0"}],"id":"c3fdd46e-187e-4133-9643-1bde2603e3b0","_postman_id":"c3fdd46e-187e-4133-9643-1bde2603e3b0","description":""},{"name":"Products","item":[{"name":"Get Product","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","// postman.setEnvironmentVariable(\"order_id\", jsonData._id);  "],"type":"text/javascript","packages":{}}}],"id":"a0c43715-85aa-4e00-9135-525cfea3aba1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/products/{{productId}}/view","description":"<p>Get product</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td><strong>Stri</strong></td>\n<td></td>\n<td>hash id or slug</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["products","{{productId}}","view"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a0c43715-85aa-4e00-9135-525cfea3aba1"},{"name":"Get Products","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"productId\", jsonData.data[0]._id);  "],"type":"text/javascript","packages":{}}}],"id":"bc48e732-8414-486e-86dd-0915d1a04efe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\n    \"params\": {\n        \"page\": 1,\n        \"limit\": 24,\n        \"categoriesCount\": true,\n        \"categoriesToFilter\": [],\n        \"facetsToFilter\": {},\n        \"sortFilter\": {\n            \"label\": \"Most Popular\",\n            \"value\": -1,\n            \"type\": \"popular\"\n        }, \n        \"showPriceRange\": true\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/stores/{{storeId}}/store-products","description":"<p>Get products</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>page</td>\n<td><strong>Int</strong></td>\n<td>1</td>\n<td>page</td>\n</tr>\n<tr>\n<td>limit</td>\n<td>Int</td>\n<td>10</td>\n<td>limit</td>\n</tr>\n<tr>\n<td>categoriesCount</td>\n<td>Boolean</td>\n<td>false</td>\n<td>Show categories with products count totals</td>\n</tr>\n<tr>\n<td>sortFilter</td>\n<td>Object</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>sortFilter.label</td>\n<td>String</td>\n<td></td>\n<td>sorting options: Most Popular</td>\n</tr>\n<tr>\n<td>sortFilter.type</td>\n<td></td>\n<td></td>\n<td>popular</td>\n</tr>\n<tr>\n<td>sortFilter.value</td>\n<td>Int</td>\n<td></td>\n<td>Direction, 1-ASC, -1-DSC</td>\n</tr>\n<tr>\n<td>showPriceRange</td>\n<td>Boolean</td>\n<td></td>\n<td>return min and max price for products</td>\n</tr>\n<tr>\n<td>facetsToFilter</td>\n<td>Object</td>\n<td></td>\n<td>Include facetGroup with facets hash id. Ex. <code>facetsToFilte:{\"activity\":[\"62b4ede2dc29d606aec89e9d\"]}</code></td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["stores","{{storeId}}","store-products"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"bc48e732-8414-486e-86dd-0915d1a04efe"},{"name":"Create Product","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"productId\", jsonData._id);  "],"type":"text/javascript","packages":{}}}],"id":"1476f3a1-bbef-4416-a593-2dcec0f1c164","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\n    \"supplierCode\": \"92366\",\n    \"fobPoints\": [\n        {\n            \"_id\": \"5f075ba508861b49e07b1cd0\",\n            \"country\": \"US\",\n            \"state\": \"PA\",\n            \"zip\": \"19123\",\n            \"city\": \"PHILA\",\n            \"name\": \"19123, PHILA, PA, US\"\n        }\n    ],\n    \"cartButtons\": [],\n    \"source\": \"Manual\",\n    \"productName\": \"product name\",\n    \"slug\": \"product-name-product id-92366\",\n    \"productId\": \"product id\", \n    \"status\": \"not active\", \n    \"descriptions\": [],\n    \"decorationProducts\": [],\n    \"facets\": [],\n    \"supplierId\": \"5f075ba208861b49e07b1472\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/products","description":"<p>Create products</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Body</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>supplierCode</td>\n<td><strong>String</strong></td>\n<td></td>\n<td>supplier code</td>\n</tr>\n<tr>\n<td>supplierId</td>\n<td>String</td>\n<td></td>\n<td>supplier hash id</td>\n</tr>\n<tr>\n<td>status</td>\n<td>String</td>\n<td>not active</td>\n<td>active</td>\n</tr>\n<tr>\n<td>descriptions</td>\n<td>String[]</td>\n<td></td>\n<td>list of descrition</td>\n</tr>\n<tr>\n<td>slug</td>\n<td>String</td>\n<td></td>\n<td>unique product slug</td>\n</tr>\n<tr>\n<td>productId</td>\n<td>String</td>\n<td></td>\n<td>product id</td>\n</tr>\n<tr>\n<td>productName</td>\n<td>String</td>\n<td></td>\n<td>product name</td>\n</tr>\n<tr>\n<td>fobPoints</td>\n<td>String[]</td>\n<td></td>\n<td>list of fobs</td>\n</tr>\n<tr>\n<td>facets</td>\n<td>String[]</td>\n<td></td>\n<td>list of facets</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["products"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"1476f3a1-bbef-4416-a593-2dcec0f1c164"},{"name":"Edit Product","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"productId\", jsonData.data[0]._id);  "],"type":"text/javascript","packages":{}}}],"id":"d9889e38-51c0-4ef3-97ae-762df70b2f61","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\n    \"productName\": \"product name\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/products/{{productId}}","description":"<p>Edit product</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Body</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>supplierCode</td>\n<td><strong>String</strong></td>\n<td></td>\n<td>supplier code</td>\n</tr>\n<tr>\n<td>supplierId</td>\n<td>String</td>\n<td></td>\n<td>supplier hash id</td>\n</tr>\n<tr>\n<td>status</td>\n<td>String</td>\n<td>not active</td>\n<td>active</td>\n</tr>\n<tr>\n<td>descriptions</td>\n<td>String[]</td>\n<td></td>\n<td>list of descrition</td>\n</tr>\n<tr>\n<td>slug</td>\n<td>String</td>\n<td></td>\n<td>unique product slug</td>\n</tr>\n<tr>\n<td>productId</td>\n<td>String</td>\n<td></td>\n<td>product id</td>\n</tr>\n<tr>\n<td>productName</td>\n<td>String</td>\n<td></td>\n<td>product name</td>\n</tr>\n<tr>\n<td>fobPoints</td>\n<td>String[]</td>\n<td></td>\n<td>list of fobs</td>\n</tr>\n<tr>\n<td>facets</td>\n<td>String[]</td>\n<td></td>\n<td>list of facets</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["products","{{productId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"d9889e38-51c0-4ef3-97ae-762df70b2f61"},{"name":"Delete Product","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":[""],"type":"text/javascript","packages":{}}}],"id":"4ccafb24-885d-4a73-a52f-51b7d8cb920c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/products/{{productId}}","description":"<p>Remove product</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Params</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td><strong>String</strong></td>\n<td></td>\n<td>product id hash code</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["products","{{productId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"4ccafb24-885d-4a73-a52f-51b7d8cb920c"}],"id":"0eda0493-f4d4-4855-822e-7b6960bbf394","_postman_id":"0eda0493-f4d4-4855-822e-7b6960bbf394","description":""},{"name":"Products Part","item":[{"name":"Get Product Part","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","// postman.setEnvironmentVariable(\"order_id\", jsonData._id);  "],"type":"text/javascript","packages":{}}}],"id":"30c7ed55-21dd-4962-a605-debc608bc232","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/products/{{productId}}/parts/{{productPartId}}","description":"<p>Get product</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td><strong>Stri</strong></td>\n<td></td>\n<td>hash id or slug</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["products","{{productId}}","parts","{{productPartId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"30c7ed55-21dd-4962-a605-debc608bc232"},{"name":"Get Product Parts","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"productId\", jsonData.data[0]._id);  "],"type":"text/javascript","packages":{}}}],"id":"4fdf54f3-8236-449c-9fa6-32ace68de32f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\n    \"params\": {\n        \"page\": 1,\n        \"limit\": 24,\n        \"categoriesCount\": true,\n        \"categoriesToFilter\": [],\n        \"facetsToFilter\": {},\n        \"sortFilter\": {\n            \"label\": \"Most Popular\",\n            \"value\": -1,\n            \"type\": \"popular\"\n        }, \n        \"showPriceRange\": true\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/products/{{productId}}/parts","description":"<p>Get product parts</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>page</td>\n<td><strong>Int</strong></td>\n<td>1</td>\n<td>page</td>\n</tr>\n<tr>\n<td>productId</td>\n<td>String</td>\n<td></td>\n<td>product id hash</td>\n</tr>\n<tr>\n<td>limit</td>\n<td>Int</td>\n<td>10</td>\n<td>limit</td>\n</tr>\n<tr>\n<td>sortFilter</td>\n<td>Object</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>sortFilter.label</td>\n<td>String</td>\n<td></td>\n<td>sorting options: Most Popular</td>\n</tr>\n<tr>\n<td>sortFilter.type</td>\n<td></td>\n<td></td>\n<td>popular</td>\n</tr>\n<tr>\n<td>sortFilter.value</td>\n<td>Int</td>\n<td></td>\n<td>Direction, 1-ASC, -1-DSC</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["products","{{productId}}","parts"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"4fdf54f3-8236-449c-9fa6-32ace68de32f"},{"name":"Create Product Part","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"productPartId\", jsonData._id);  "],"type":"text/javascript","packages":{}}}],"id":"eeece0a5-f7df-4c14-9f8e-7dab3a348602","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\n    \"partGroup\": \"1\",\n    \"colors\": [\n        {\n            \"name\": \"black\",\n            \"hex\": \"\"\n        }\n    ],\n    \"compress\": true,\n    \"mediaList\": [],\n    \"charge_prices\": [],\n    \"pricing\": [],\n    \"shippingPackages\": [],\n    \"dimension\": {\n        \"weight\": null,\n        \"width\": null,\n        \"height\": null,\n        \"depth\": null\n    },\n    \"inventory\": {\n        \"partInventories\": []\n    },\n    \"defaultPart\": false,\n    \"partId\": \"984927\",\n    \"partDescription\": \"Duralast Brake Poster (English)\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/products/{{productId}}/parts","description":"<p>Create product part</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Body</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>partGroup</td>\n<td><strong>String</strong></td>\n<td>1</td>\n<td>A numeric identifier grouping mutually exclusive parts together. When configuring data, always start with part group “1” code</td>\n</tr>\n<tr>\n<td>colors</td>\n<td>String[]</td>\n<td></td>\n<td><br /><br />  <br />The name of the imprint color<br /><br /></td>\n</tr>\n<tr>\n<td>partId</td>\n<td>String</td>\n<td></td>\n<td>The partId</td>\n</tr>\n<tr>\n<td>partDescription</td>\n<td>String</td>\n<td></td>\n<td>A description of the partId</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["products","{{productId}}","parts"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"eeece0a5-f7df-4c14-9f8e-7dab3a348602"},{"name":"Edit Product Part","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"productId\", jsonData.data[0]._id);  "],"type":"text/javascript","packages":{}}}],"id":"03424502-5d3d-4e4a-8156-2cdde3628e2f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\n    \"partId\": \"new part id\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/products/{{productId}}/parts/{{productPartId}}","description":"<p>Create products</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Body</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>supplierCode</td>\n<td><strong>String</strong></td>\n<td></td>\n<td>supplier code</td>\n</tr>\n<tr>\n<td>supplierId</td>\n<td>String</td>\n<td></td>\n<td>supplier hash id</td>\n</tr>\n<tr>\n<td>status</td>\n<td>String</td>\n<td>not active</td>\n<td>active</td>\n</tr>\n<tr>\n<td>descriptions</td>\n<td>String[]</td>\n<td></td>\n<td>list of descrition</td>\n</tr>\n<tr>\n<td>slug</td>\n<td>String</td>\n<td></td>\n<td>unique product slug</td>\n</tr>\n<tr>\n<td>productId</td>\n<td>String</td>\n<td></td>\n<td>product id</td>\n</tr>\n<tr>\n<td>productName</td>\n<td>String</td>\n<td></td>\n<td>product name</td>\n</tr>\n<tr>\n<td>fobPoints</td>\n<td>String[]</td>\n<td></td>\n<td>list of fobs</td>\n</tr>\n<tr>\n<td>facets</td>\n<td>String[]</td>\n<td></td>\n<td>list of facets</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["products","{{productId}}","parts","{{productPartId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"03424502-5d3d-4e4a-8156-2cdde3628e2f"},{"name":"Delete Product Part","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":[""],"type":"text/javascript","packages":{}}}],"id":"03db7ab0-d898-4700-8d72-c67d006158f8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/products/{{productId}}/parts/{{productPartId}}","description":"<p>Remove product part</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Body</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td><strong>String</strong></td>\n<td></td>\n<td>product id hash code</td>\n</tr>\n<tr>\n<td>productPartId</td>\n<td>String</td>\n<td></td>\n<td>part hash id</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["products","{{productId}}","parts","{{productPartId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"03db7ab0-d898-4700-8d72-c67d006158f8"}],"id":"9034b1d9-f4c3-4cc9-b852-aad8d551d7c9","_postman_id":"9034b1d9-f4c3-4cc9-b852-aad8d551d7c9","description":""},{"name":"Customer","item":[{"name":"Get Customer","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","// postman.setEnvironmentVariable(\"order_id\", jsonData._id);  "],"type":"text/javascript","packages":{}}}],"id":"17ef67ef-3a3f-42f2-a5ba-e8da4fe42827","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/customers/{{customerId}}","description":"<h2 id=\"get-customerscustomerid---retrieve-single-customer\">GET /customers/:customerId - Retrieve Single Customer</h2>\n<h3 id=\"request-configuration\">Request Configuration</h3>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/customers/{{customerId}}</code><br /><strong>Authentication:</strong> Required (JWT Bearer token)</p>\n<hr />\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customerId</code></td>\n<td>MongoDB ObjectId of the customer</td>\n<td><strong>Yes</strong></td>\n<td>ObjectId</td>\n<td><code>507f1f77bcf86cd799439011</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"headers\">Headers</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Description</th>\n<th>Required</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td>Bearer JWT token</td>\n<td><strong>Yes</strong></td>\n<td><code>{{vault:bearer-token}}</code></td>\n</tr>\n<tr>\n<td><code>Content-Type</code></td>\n<td>Content type</td>\n<td>No</td>\n<td><code>application/json</code></td>\n</tr>\n<tr>\n<td><code>portal</code></td>\n<td>Portal identifier (admin/customer)</td>\n<td>No</td>\n<td><code>admin</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"query-parameters\">Query Parameters</h2>\n<p><strong>None</strong> - This endpoint does not accept query parameters.</p>\n<hr />\n<h2 id=\"response-fields\">Response Fields</h2>\n<h3 id=\"core-customer-fields\">Core Customer Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>_id</code></td>\n<td>Customer's unique MongoDB ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>customerId</code></td>\n<td>Sequential customer ID number</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>Customer's email address</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>firstName</code></td>\n<td>Customer's first name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>lastName</code></td>\n<td>Customer's last name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>jobTitle</code></td>\n<td>Customer's job title</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>isActive</code></td>\n<td>Whether account is active</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>rank</code></td>\n<td>Customer ranking/priority</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>deletedAt</code></td>\n<td>Soft delete timestamp (if deleted)</td>\n<td>Date / null</td>\n</tr>\n<tr>\n<td><code>createdAt</code></td>\n<td>Account creation timestamp</td>\n<td>Date (ISO 8601)</td>\n</tr>\n<tr>\n<td><code>updatedAt</code></td>\n<td>Last update timestamp</td>\n<td>Date (ISO 8601)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"company-information-populated\">Company Information (Populated)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>companyId</code></td>\n<td>Company object (populated)</td>\n<td>Object / null</td>\n</tr>\n<tr>\n<td><code>companyId._id</code></td>\n<td>Company's MongoDB ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>companyId.companyName</code></td>\n<td>Company name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>companyId.photo</code></td>\n<td>Company logo URL</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>companyId.distributorId</code></td>\n<td>Company's distributor ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>companyId.referenceFields</code></td>\n<td>Custom company fields</td>\n<td>Object</td>\n</tr>\n<tr>\n<td><code>companyId.notes</code></td>\n<td>Company notes</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"user-relationships-populated\">User Relationships (Populated)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>userId</code></td>\n<td>Account Manager object (populated)</td>\n<td>Object / null</td>\n</tr>\n<tr>\n<td><code>userId._id</code></td>\n<td>User's MongoDB ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>userId.firstName</code></td>\n<td>User's first name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>userId.lastName</code></td>\n<td>User's last name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>userId.photo</code></td>\n<td>User's profile photo URL</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>adminUserId</code></td>\n<td>Sales Admin object (populated)</td>\n<td>Object / null</td>\n</tr>\n<tr>\n<td><code>sourceUserId</code></td>\n<td>User who created customer (populated)</td>\n<td>Object / null</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"ownership--distribution\">Ownership &amp; Distribution</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>distributorId</code></td>\n<td>Distributor's MongoDB ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>supplierId</code></td>\n<td>Supplier's MongoDB ID (if applicable)</td>\n<td>ObjectId / null</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>Creation source (Web, API, Import, etc.)</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>createdBy</code></td>\n<td>User ID who created the record</td>\n<td>ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"store-access\">Store Access</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>stores</code></td>\n<td>Array of store IDs customer has access to</td>\n<td>Array[ObjectId]</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"contact-information\">Contact Information</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>CustomerPhoneNumbers</code></td>\n<td>Array of phone number objects</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>CustomerPhoneNumbers[]._id</code></td>\n<td>Phone record ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>CustomerPhoneNumbers[].phoneNumber</code></td>\n<td>Phone number</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerPhoneNumbers[].phoneType</code></td>\n<td>Type: Work, Cell, Home, Fax</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerPhoneNumbers[].extension</code></td>\n<td>Phone extension</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"addresses\">Addresses</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>CustomerAddresses</code></td>\n<td>Array of shipping addresses</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[]._id</code></td>\n<td>Address record ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].street</code></td>\n<td>Street address line 1</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].street1</code></td>\n<td>Street address line 2</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].city</code></td>\n<td>City</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].state</code></td>\n<td>State/Province</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].zip</code></td>\n<td>Zip/Postal code</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].country</code></td>\n<td>Country code</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].isDefault</code></td>\n<td>Default address flag</td>\n<td>Boolean</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"billing-addresses\">Billing Addresses</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>CustomerBillingAddress</code></td>\n<td>Array of billing addresses</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[]._id</code></td>\n<td>Billing address record ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[].street</code></td>\n<td>Street address</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[].city</code></td>\n<td>City</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[].state</code></td>\n<td>State/Province</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[].zip</code></td>\n<td>Zip/Postal code</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[].country</code></td>\n<td>Country code</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[].isDefault</code></td>\n<td>Default billing address flag</td>\n<td>Boolean</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"shipper-accounts\">Shipper Accounts</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>CustomerShippers</code></td>\n<td>Array of shipper accounts</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>CustomerShippers[]._id</code></td>\n<td>Shipper record ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>CustomerShippers[].shipperName</code></td>\n<td>Shipper company name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerShippers[].accountNumber</code></td>\n<td>Account number</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerShippers[].isDefault</code></td>\n<td>Default shipper flag</td>\n<td>Boolean</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"notes--communication\">Notes &amp; Communication</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>CustomerNotes</code></td>\n<td>Array of notes (with user populated)</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>CustomerNotes[]._id</code></td>\n<td>Note ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>CustomerNotes[].note</code></td>\n<td>Note text</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerNotes[].userId</code></td>\n<td>User object who created note</td>\n<td>Object</td>\n</tr>\n<tr>\n<td><code>CustomerNotes[].userId._id</code></td>\n<td>User's ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>CustomerNotes[].userId.firstName</code></td>\n<td>User's first name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerNotes[].userId.lastName</code></td>\n<td>User's last name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerNotes[].userId.photo</code></td>\n<td>User's photo URL</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerNotes[].createdAt</code></td>\n<td>Note creation date</td>\n<td>Date</td>\n</tr>\n<tr>\n<td><code>lastContactedAt</code></td>\n<td>Last contact timestamp</td>\n<td>Date / null</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"documents-populated\">Documents (Populated)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Documents</code></td>\n<td>Array of document objects (populated)</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>Documents[]._id</code></td>\n<td>Document ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>Documents[].fileName</code></td>\n<td>Original filename</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>Documents[].title</code></td>\n<td>Document title</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>Documents[].url</code></td>\n<td>S3 URL to document</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>Documents[].fileSize</code></td>\n<td>File size in bytes</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>Documents[].uploadDate</code></td>\n<td>Upload timestamp</td>\n<td>Date</td>\n</tr>\n<tr>\n<td><code>Documents[].userId</code></td>\n<td>User who uploaded (populated)</td>\n<td>Object</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"roles--permissions-populated\">Roles &amp; Permissions (Populated)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>roles</code></td>\n<td>Array of role objects (populated)</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>roles[]._id</code></td>\n<td>Role ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>roles[].name</code></td>\n<td>Role name</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>roles[].settings</code></td>\n<td>Role settings/permissions</td>\n<td>Object</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"device--tracking\">Device &amp; Tracking</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customerDevice</code></td>\n<td>Device info from account creation</td>\n<td>Object / null</td>\n</tr>\n<tr>\n<td><code>customerDevice._id</code></td>\n<td>Device record ID</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>customerDevice.source</code></td>\n<td>Device source (CREATE_ACCOUNT, etc.)</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>customerDevice.location</code></td>\n<td>Location data</td>\n<td>Object</td>\n</tr>\n<tr>\n<td><code>customerDevice.userAgent</code></td>\n<td>Browser user agent</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>customerDevice.referrer</code></td>\n<td>Referrer URL</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>customerDeviceId</code></td>\n<td>Current device ID reference</td>\n<td>ObjectId / null</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"utm--marketing-data\">UTM &amp; Marketing Data</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>utmData</code></td>\n<td>UTM tracking data</td>\n<td>Object / null</td>\n</tr>\n<tr>\n<td><code>utmData.utmSource</code></td>\n<td>UTM source parameter</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>utmData.utmMedium</code></td>\n<td>UTM medium parameter</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>utmData.utmCampaign</code></td>\n<td>UTM campaign parameter</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"social-authentication\">Social Authentication</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>socialData</code></td>\n<td>Array of social login connections</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>socialData[].service</code></td>\n<td>Service name (facebook, google)</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>socialData[].id</code></td>\n<td>Social network user ID</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"registration--activity\">Registration &amp; Activity</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>registrationsSent</code></td>\n<td>Array of registration email records</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>registrationsSent[].createdAt</code></td>\n<td>Email sent date</td>\n<td>Date</td>\n</tr>\n<tr>\n<td><code>registrationsSent[].storeId</code></td>\n<td>Store ID email was sent for</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>hasFollowUps</code></td>\n<td>Whether customer has active follow-ups</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>reviewsToken</code></td>\n<td>Token for product reviews</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"custom-fields\">Custom Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>referenceFields</code></td>\n<td>Custom fields specific to distributor</td>\n<td>Object</td>\n</tr>\n<tr>\n<td><code>CustomerArtwork</code></td>\n<td>Array of artwork references</td>\n<td>Array[ObjectId]</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"excluded-fields-not-returned\">Excluded Fields (Not Returned)</h3>\n<p>These fields are explicitly excluded for security:</p>\n<ul>\n<li><p>❌ <code>password</code> - Encrypted password</p>\n</li>\n<li><p>❌ <code>passwordResetToken</code> - Password reset token</p>\n</li>\n<li><p>❌ <code>passwordOrigin</code> - Original plain text password</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"example-request\">Example Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: {{vault:bearer-token}}\n\n</code></pre>\n<hr />\n<h2 id=\"example-response-success---200\">Example Response (Success - 200)</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439011\",\n  \"customerId\": 12345,\n  \"email\": \"john.doe@example.com\",\n  \"firstName\": \"John\",\n  \"lastName\": \"Doe\",\n  \"jobTitle\": \"Marketing Manager\",\n  \"isActive\": true,\n  \"rank\": 5,\n  \"source\": \"Web\",\n  \"distributorId\": \"507f1f77bcf86cd799439012\",\n  \"stores\": [\n    \"507f1f77bcf86cd799439013\"\n  ],\n  \"companyId\": {\n    \"_id\": \"507f1f77bcf86cd799439014\",\n    \"companyName\": \"Acme Corporation\",\n    \"photo\": \"https://s3.amazonaws.com/company-logo.png\",\n    \"distributorId\": \"507f1f77bcf86cd799439012\",\n    \"referenceFields\": {},\n    \"notes\": \"\"\n  },\n  \"userId\": {\n    \"_id\": \"507f1f77bcf86cd799439015\",\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Smith\",\n    \"photo\": \"https://s3.amazonaws.com/user-photo.png\"\n  },\n  \"adminUserId\": {\n    \"_id\": \"507f1f77bcf86cd799439016\",\n    \"firstName\": \"Bob\",\n    \"lastName\": \"Manager\",\n    \"photo\": null\n  },\n  \"sourceUserId\": {\n    \"_id\": \"507f1f77bcf86cd799439017\",\n    \"firstName\": \"Alice\",\n    \"lastName\": \"Creator\",\n    \"photo\": null\n  },\n  \"CustomerPhoneNumbers\": [\n    {\n      \"_id\": \"507f1f77bcf86cd799439018\",\n      \"phoneNumber\": \"555-123-4567\",\n      \"phoneType\": \"Work\",\n      \"extension\": \"123\"\n    },\n    {\n      \"_id\": \"507f1f77bcf86cd799439019\",\n      \"phoneNumber\": \"555-987-6543\",\n      \"phoneType\": \"Cell\"\n    }\n  ],\n  \"CustomerAddresses\": [\n    {\n      \"_id\": \"507f1f77bcf86cd79943901a\",\n      \"street\": \"123 Main Street\",\n      \"street1\": \"Suite 400\",\n      \"city\": \"New York\",\n      \"state\": \"NY\",\n      \"zip\": \"10001\",\n      \"country\": \"US\",\n      \"isDefault\": true\n    }\n  ],\n  \"CustomerBillingAddress\": [\n    {\n      \"_id\": \"507f1f77bcf86cd79943901b\",\n      \"street\": \"123 Main Street\",\n      \"city\": \"New York\",\n      \"state\": \"NY\",\n      \"zip\": \"10001\",\n      \"country\": \"US\",\n      \"isDefault\": true\n    }\n  ],\n  \"CustomerShippers\": [\n    {\n      \"_id\": \"507f1f77bcf86cd79943901c\",\n      \"shipperName\": \"FedEx\",\n      \"accountNumber\": \"123456789\",\n      \"isDefault\": true\n    }\n  ],\n  \"CustomerNotes\": [\n    {\n      \"_id\": \"507f1f77bcf86cd79943901d\",\n      \"note\": \"Prefers email communication\",\n      \"userId\": {\n        \"_id\": \"507f1f77bcf86cd799439015\",\n        \"firstName\": \"Jane\",\n        \"lastName\": \"Smith\",\n        \"photo\": \"https://s3.amazonaws.com/user-photo.png\"\n      },\n      \"createdAt\": \"2025-10-20T10:00:00.000Z\"\n    }\n  ],\n  \"Documents\": [\n    {\n      \"_id\": \"507f1f77bcf86cd79943901e\",\n      \"fileName\": \"contract.pdf\",\n      \"title\": \"Service Contract\",\n      \"url\": \"https://s3.amazonaws.com/documents/contract.pdf\",\n      \"fileSize\": 245678,\n      \"uploadDate\": \"2025-10-15T14:30:00.000Z\",\n      \"userId\": {\n        \"_id\": \"507f1f77bcf86cd799439015\",\n        \"firstName\": \"Jane\",\n        \"lastName\": \"Smith\",\n        \"photo\": \"https://s3.amazonaws.com/user-photo.png\"\n      }\n    }\n  ],\n  \"roles\": [\n    {\n      \"_id\": \"507f1f77bcf86cd79943901f\",\n      \"name\": \"Customer\",\n      \"settings\": {\n        \"general\": [\"view_orders\", \"place_orders\"],\n        \"menu\": [\"orders\", \"products\"]\n      }\n    }\n  ],\n  \"customerDevice\": {\n    \"_id\": \"507f1f77bcf86cd799439020\",\n    \"source\": \"CREATE_ACCOUNT\",\n    \"location\": {\n      \"city\": \"New York\",\n      \"country\": \"US\",\n      \"ip\": \"192.168.1.1\"\n    },\n    \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64)...\",\n    \"referrer\": \"https://google.com\"\n  },\n  \"utmData\": {\n    \"utmSource\": \"google\",\n    \"utmMedium\": \"cpc\",\n    \"utmCampaign\": \"summer_2025\"\n  },\n  \"socialData\": [],\n  \"registrationsSent\": [\n    {\n      \"createdAt\": \"2025-10-01T09:00:00.000Z\",\n      \"storeId\": \"507f1f77bcf86cd799439013\"\n    }\n  ],\n  \"hasFollowUps\": false,\n  \"reviewsToken\": \"abc123xyz456\",\n  \"referenceFields\": {},\n  \"createdAt\": \"2025-10-01T09:00:00.000Z\",\n  \"updatedAt\": \"2025-10-28T10:00:00.000Z\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"404---customer-not-found-invalid-id\">404 - Customer Not Found (Invalid ID)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Customer not found\"\n}\n\n</code></pre>\n<h3 id=\"404---customer-not-found\">404 - Customer Not Found</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Customer not found!\"\n}\n\n</code></pre>\n<h3 id=\"401---unauthorized\">401 - Unauthorized</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Unauthorized\"\n}\n\n</code></pre>\n<h3 id=\"403---forbidden-no-access\">403 - Forbidden (No Access)</h3>\n<p>Returned when user doesn't have permission to view this customer.</p>\n<hr />\n<h2 id=\"access-control\">Access Control</h2>\n<p>The endpoint applies role-based access:</p>\n<ol>\n<li><p><strong>Admin Users</strong>: Can view all customers in the system</p>\n</li>\n<li><p><strong>Distributor Users</strong>: Can only view customers within their distributor</p>\n</li>\n<li><p><strong>Regular Users</strong>: Access based on role settings</p>\n</li>\n</ol>\n<hr />\n<h2 id=\"quick-copy-format-csv-style\">Quick Copy Format (CSV-style)</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Field,Description,Data Type,Populated\n_id,Customer's unique MongoDB ID,ObjectId,No\ncustomerId,Sequential customer ID number,Number,No\nemail,Customer's email address,String,No\nfirstName,Customer's first name,String,No\nlastName,Customer's last name,String,No\njobTitle,Customer's job title,String,No\nisActive,Whether account is active,Boolean,No\nrank,Customer ranking/priority,Number,No\ncompanyId,Company object,Object,Yes\nuserId,Account Manager object,Object,Yes\nadminUserId,Sales Admin object,Object,Yes\nsourceUserId,User who created customer,Object,Yes\ndistributorId,Distributor's MongoDB ID,ObjectId,No\nstores,Array of store IDs,Array[ObjectId],No\nCustomerPhoneNumbers,Array of phone numbers,Array[Object],No\nCustomerAddresses,Array of shipping addresses,Array[Object],No\nCustomerBillingAddress,Array of billing addresses,Array[Object],No\nCustomerShippers,Array of shipper accounts,Array[Object],No\nCustomerNotes,Array of notes,Array[Object],Yes (userId)\nDocuments,Array of documents,Array[Object],Yes (full)\nroles,Array of role objects,Array[Object],Yes (full)\ncustomerDevice,Device info from creation,Object,No\nutmData,UTM tracking data,Object,No\nsocialData,Social login connections,Array[Object],No\nregistrationsSent,Registration email records,Array[Object],No\ncreatedAt,Account creation timestamp,Date,No\nupdatedAt,Last update timestamp,Date,No\n\n</code></pre><hr />\n<h2 id=\"notes\">Notes:</h2>\n<ol>\n<li><p><strong>Authentication Required</strong>: Must provide valid JWT Bearer token</p>\n</li>\n<li><p><strong>Valid ObjectId</strong>: customerId must be a valid 24-character hex string</p>\n</li>\n<li><p><strong>Excluded Fields</strong>: Password fields are never returned</p>\n</li>\n<li><p><strong>Populated Fields</strong>: Related objects (company, users, documents, roles) are fully populated</p>\n</li>\n<li><p><strong>Null Values</strong>: Fields may be null if not set</p>\n</li>\n<li><p><strong>Access Control</strong>: Response filtered based on user permissions</p>\n</li>\n<li><p><strong>No Query Params</strong>: This endpoint doesn't accept filtering or selection parameters</p>\n</li>\n</ol>\n","urlObject":{"path":["customers","{{customerId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"17ef67ef-3a3f-42f2-a5ba-e8da4fe42827"},{"name":"Find Customers","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"customerId\", jsonData.data[0]._id);  "],"type":"text/javascript","packages":{},"requests":{}}}],"id":"016e42a0-e370-4226-a6db-2f6c400846ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/customers","description":"<h2 id=\"get-customers---listsearch-customers-complete-reference\">GET /customers - List/Search Customers (COMPLETE REFERENCE)</h2>\n<h3 id=\"request-configuration\">Request Configuration</h3>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/customers</code><br /><strong>Authentication:</strong> Required (JWT Bearer token)</p>\n<hr />\n<h2 id=\"complete-query-parameters-reference-table\">Complete Query Parameters Reference Table</h2>\n<h3 id=\"pagination--limits\">Pagination &amp; Limits</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Default</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>page</code></td>\n<td>Page number for pagination</td>\n<td>No</td>\n<td>Number</td>\n<td>1</td>\n<td><code>page=1</code></td>\n</tr>\n<tr>\n<td><code>limit</code></td>\n<td>Number of records per page</td>\n<td>No</td>\n<td>Number</td>\n<td>25</td>\n<td><code>limit=25</code></td>\n</tr>\n<tr>\n<td><code>onlyCount</code></td>\n<td>Return only count, no data</td>\n<td>No</td>\n<td>Boolean</td>\n<td>false</td>\n<td><code>onlyCount=true</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"sorting--ordering\">Sorting &amp; Ordering</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Default</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>ascending</code></td>\n<td>Sort order (1=ascending, 0=descending)</td>\n<td>No</td>\n<td>Number</td>\n<td>0</td>\n<td><code>ascending=1</code></td>\n</tr>\n<tr>\n<td><code>byColumn</code></td>\n<td>Enable column-specific sorting</td>\n<td>No</td>\n<td>Number</td>\n<td>0</td>\n<td><code>byColumn=1</code></td>\n</tr>\n<tr>\n<td><code>orderBy</code></td>\n<td>Field name to sort by</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>orderBy=lastName</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"search--basic-filtering\">Search &amp; Basic Filtering</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Default</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>query</code></td>\n<td>Search term (searches across multiple fields)</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>query=john</code></td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>Filter by exact email</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>email=john@example.com</code></td>\n</tr>\n<tr>\n<td><code>firstName</code></td>\n<td>Filter by first name</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>firstName=John</code></td>\n</tr>\n<tr>\n<td><code>lastName</code></td>\n<td>Filter by last name</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>lastName=Doe</code></td>\n</tr>\n<tr>\n<td><code>jobTitle</code></td>\n<td>Filter by job title</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>jobTitle=Manager</code></td>\n</tr>\n<tr>\n<td><code>isActive</code></td>\n<td>Filter by active status</td>\n<td>No</td>\n<td>Boolean</td>\n<td>-</td>\n<td><code>isActive=true</code></td>\n</tr>\n<tr>\n<td><code>rank</code></td>\n<td>Filter by customer rank</td>\n<td>No</td>\n<td>Number</td>\n<td>-</td>\n<td><code>rank=5</code></td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>Filter by creation source</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>source=Web</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"company--store-filtering\">Company &amp; Store Filtering</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Default</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>companyId</code></td>\n<td>Filter by company ID</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n<td><code>companyId=507f1f77bcf86cd799439011</code></td>\n</tr>\n<tr>\n<td><code>stores</code></td>\n<td>Filter by store ID (alias: <code>store</code>)</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n<td><code>stores=507f1f77bcf86cd799439012</code></td>\n</tr>\n<tr>\n<td><code>store</code></td>\n<td>Filter by store ID</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n<td><code>store=507f1f77bcf86cd799439012</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"user-assignment-filtering\">User Assignment Filtering</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Default</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>userId</code></td>\n<td>Filter by account manager</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n<td><code>userId=507f1f77bcf86cd799439013</code></td>\n</tr>\n<tr>\n<td><code>adminUserId</code></td>\n<td>Filter by sales admin</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n<td><code>adminUserId=507f1f77bcf86cd799439014</code></td>\n</tr>\n<tr>\n<td><code>accountManagerId</code></td>\n<td>Filter by account manager (alternative)</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n<td><code>accountManagerId=507f1f77bcf86cd799439013</code></td>\n</tr>\n<tr>\n<td><code>salesAdminId</code></td>\n<td>Filter by sales admin (alternative)</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n<td><code>salesAdminId=507f1f77bcf86cd799439014</code></td>\n</tr>\n<tr>\n<td><code>sourceUserId</code></td>\n<td>Filter by user who created customer</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n<td><code>sourceUserId=507f1f77bcf86cd799439015</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"external-id-filtering-integration-systems\">External ID Filtering (Integration Systems)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Default</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customerId</code></td>\n<td>Filter by sequential customer ID</td>\n<td>No</td>\n<td>Number</td>\n<td>-</td>\n<td><code>customerId=12345</code></td>\n</tr>\n<tr>\n<td><code>externalId</code></td>\n<td>Filter by external/third-party ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>externalId=EXT-12345</code></td>\n</tr>\n<tr>\n<td><code>customerQBId</code></td>\n<td>Filter by QuickBooks customer ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>customerQBId=QB-12345</code></td>\n</tr>\n<tr>\n<td><code>customerZohoId</code></td>\n<td>Filter by Zoho CRM customer ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>customerZohoId=ZOHO-12345</code></td>\n</tr>\n<tr>\n<td><code>customerHubspotId</code></td>\n<td>Filter by HubSpot customer ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>customerHubspotId=HS-12345</code></td>\n</tr>\n<tr>\n<td><code>customerXeroId</code></td>\n<td>Filter by Xero accounting customer ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>customerXeroId=XERO-12345</code></td>\n</tr>\n<tr>\n<td><code>customerStripeId</code></td>\n<td>Filter by Stripe customer ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>customerStripeId=cus_12345</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"data-population\">Data Population</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Default</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>populate</code></td>\n<td>Array of fields to populate (comma-separated)</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>populate=companyId,userId</code></td>\n</tr>\n<tr>\n<td><code>populate[]</code></td>\n<td>Array of fields to populate (multiple params)</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>populate[]=companyId&amp;populate[]=userId</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"export-options\">Export Options</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Default</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>exportFormat</code></td>\n<td>Export format (csv, xlsx, etc.)</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>exportFormat=csv</code></td>\n</tr>\n<tr>\n<td><code>exportFields</code></td>\n<td>Fields to include in export</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n<td><code>exportFields=email,firstName,lastName</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"special-filters\">Special Filters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Default</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>withLastFollowUp</code></td>\n<td>Include last follow-up information</td>\n<td>No</td>\n<td>Number</td>\n<td>0</td>\n<td><code>withLastFollowUp=1</code></td>\n</tr>\n<tr>\n<td><code>hasFollowUps</code></td>\n<td>Filter by follow-up status</td>\n<td>No</td>\n<td>Boolean</td>\n<td>-</td>\n<td><code>hasFollowUps=true</code></td>\n</tr>\n<tr>\n<td><code>noDistributor</code></td>\n<td>Disable auto distributor filtering</td>\n<td>No</td>\n<td>Boolean</td>\n<td>false</td>\n<td><code>noDistributor=true</code></td>\n</tr>\n<tr>\n<td><code>loadByAccountManager</code></td>\n<td>Load by account manager context</td>\n<td>No</td>\n<td>Boolean</td>\n<td>false</td>\n<td><code>loadByAccountManager=true</code></td>\n</tr>\n<tr>\n<td><code>forceQueryByName</code></td>\n<td>Force search by name even if no results</td>\n<td>No</td>\n<td>Boolean</td>\n<td>false</td>\n<td><code>forceQueryByName=true</code></td>\n</tr>\n<tr>\n<td><code>defaultValue</code></td>\n<td>Include specific customer ID in results</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n<td><code>defaultValue=507f1f77bcf86cd799439016</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"date-filters\">Date Filters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Default</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>createdAt</code></td>\n<td>Filter by creation date</td>\n<td>No</td>\n<td>Date / Object</td>\n<td>-</td>\n<td><code>createdAt[gte]=2025-01-01</code></td>\n</tr>\n<tr>\n<td><code>updatedAt</code></td>\n<td>Filter by update date</td>\n<td>No</td>\n<td>Date / Object</td>\n<td>-</td>\n<td><code>updatedAt[lte]=2025-12-31</code></td>\n</tr>\n<tr>\n<td><code>lastContactedAt</code></td>\n<td>Filter by last contact date</td>\n<td>No</td>\n<td>Date / Object</td>\n<td>-</td>\n<td><code>lastContactedAt[gte]=2025-10-01</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"example-requests\">Example Requests</h2>\n<h3 id=\"1-basic-list-with-pagination\">1. Basic List with Pagination</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?page=1&amp;limit=25&amp;ascending=1\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"2-search-customers\">2. Search Customers</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?query=john&amp;page=1&amp;limit=25\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"3-filter-by-external-id\">3. Filter by External ID</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?externalId=EXT-12345\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"4-filter-by-quickbooks-id\">4. Filter by QuickBooks ID</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?customerQBId=QB-12345&amp;populate=companyId\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"5-filter-by-stripe-id\">5. Filter by Stripe ID</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?customerStripeId=cus_abc123xyz\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"6-filter-by-hubspot-id\">6. Filter by HubSpot ID</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?customerHubspotId=12345678&amp;page=1&amp;limit=1\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"7-filter-by-store-and-sort\">7. Filter by Store and Sort</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?store=507f1f77bcf86cd799439012&amp;orderBy=lastName&amp;ascending=1&amp;page=1&amp;limit=50\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"8-with-follow-ups-and-populated-fields\">8. With Follow-ups and Populated Fields</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?page=1&amp;limit=25&amp;withLastFollowUp=1&amp;populate=companyId,userId,stores\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"9-filter-by-account-manager\">9. Filter by Account Manager</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?userId=507f1f77bcf86cd799439013&amp;page=1&amp;limit=25&amp;ascending=1\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"10-search-active-customers-only\">10. Search Active Customers Only</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?isActive=true&amp;query=&amp;page=1&amp;limit=25\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"11-get-only-count\">11. Get Only Count</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?onlyCount=true&amp;isActive=true\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"12-export-to-csv\">12. Export to CSV</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?exportFormat=csv&amp;exportFields=email,firstName,lastName,companyId,externalId\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"13-date-range-filter-created-in-october-2025\">13. Date Range Filter (Created in October 2025)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?createdAt[gte]=2025-10-01&amp;createdAt[lte]=2025-10-31&amp;page=1&amp;limit=25\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"14-multiple-filters-combined\">14. Multiple Filters Combined</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?store=507f1f77bcf86cd799439012&amp;isActive=true&amp;userId=507f1f77bcf86cd799439013&amp;page=1&amp;limit=25&amp;orderBy=lastName&amp;ascending=1&amp;populate=companyId\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"15-filter-by-sequential-customer-id\">15. Filter by Sequential Customer ID</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?customerId=12345\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<hr />\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"standard-response-with-data\">Standard Response (with data)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"_id\": \"507f1f77bcf86cd799439011\",\n      \"customerId\": 12345,\n      \"externalId\": \"EXT-12345\",\n      \"customerQBId\": \"QB-12345\",\n      \"customerStripeId\": \"cus_abc123xyz\",\n      \"customerHubspotId\": \"12345678\",\n      \"email\": \"john.doe@example.com\",\n      \"firstName\": \"John\",\n      \"lastName\": \"Doe\",\n      \"jobTitle\": \"Marketing Manager\",\n      \"isActive\": true,\n      \"rank\": 5,\n      \"distributorId\": \"507f1f77bcf86cd799439012\",\n      \"stores\": [\"507f1f77bcf86cd799439013\"],\n      \"companyId\": {\n        \"_id\": \"507f1f77bcf86cd799439014\",\n        \"companyName\": \"Acme Corp\"\n      },\n      \"userId\": {\n        \"_id\": \"507f1f77bcf86cd799439015\",\n        \"firstName\": \"Jane\",\n        \"lastName\": \"Manager\",\n        \"photo\": null\n      },\n      \"source\": \"Web\",\n      \"createdAt\": \"2025-10-01T09:00:00.000Z\",\n      \"updatedAt\": \"2025-10-28T10:00:00.000Z\"\n    }\n  ],\n  \"count\": 150,\n  \"referenceFields\": []\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data</code></td>\n<td>Array of customer objects</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>count</code></td>\n<td>Total number of matching records</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>referenceFields</code></td>\n<td>Custom reference fields (if applicable)</td>\n<td>Array</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"count-only-response-onlycounttrue\">Count Only Response (onlyCount=true)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"count\": 150\n}\n\n</code></pre>\n<h3 id=\"export-response-exportformatcsv\">Export Response (exportFormat=csv)</h3>\n<p>Returns CSV file as text/plain with customer data.</p>\n<hr />\n<h2 id=\"customer-object-fields-in-response\">Customer Object Fields (in response)</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Data Type</th>\n<th>Populated</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>_id</code></td>\n<td>Customer MongoDB ID</td>\n<td>ObjectId</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>customerId</code></td>\n<td>Sequential customer ID</td>\n<td>Number</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>externalId</code></td>\n<td>External/third-party ID</td>\n<td>String</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>customerQBId</code></td>\n<td>QuickBooks customer ID</td>\n<td>String</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>customerZohoId</code></td>\n<td>Zoho CRM customer ID</td>\n<td>String</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>customerHubspotId</code></td>\n<td>HubSpot customer ID</td>\n<td>String</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>customerXeroId</code></td>\n<td>Xero accounting customer ID</td>\n<td>String</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>customerStripeId</code></td>\n<td>Stripe customer ID</td>\n<td>String</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>Email address</td>\n<td>String</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>firstName</code></td>\n<td>First name</td>\n<td>String</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>lastName</code></td>\n<td>Last name</td>\n<td>String</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>jobTitle</code></td>\n<td>Job title</td>\n<td>String</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>isActive</code></td>\n<td>Active status</td>\n<td>Boolean</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>rank</code></td>\n<td>Customer rank</td>\n<td>Number</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>distributorId</code></td>\n<td>Distributor ID</td>\n<td>ObjectId</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>supplierId</code></td>\n<td>Supplier ID</td>\n<td>ObjectId</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>stores</code></td>\n<td>Store IDs array</td>\n<td>Array[ObjectId]</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>companyId</code></td>\n<td>Company object</td>\n<td>Object</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>userId</code></td>\n<td>Account manager</td>\n<td>Object</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>adminUserId</code></td>\n<td>Sales admin</td>\n<td>Object</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>sourceUserId</code></td>\n<td>Creator user</td>\n<td>Object</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>CustomerPhoneNumbers</code></td>\n<td>Phone numbers array</td>\n<td>Array[Object]</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses</code></td>\n<td>Addresses array</td>\n<td>Array[Object]</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>Creation source</td>\n<td>String</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>createdAt</code></td>\n<td>Creation date</td>\n<td>Date</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>updatedAt</code></td>\n<td>Last update date</td>\n<td>Date</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>lastContactedAt</code></td>\n<td>Last contact date</td>\n<td>Date</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code>hasFollowUps</code></td>\n<td>Has active follow-ups</td>\n<td>Boolean</td>\n<td>No</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note:</strong> Password fields (<code>password</code>, <code>passwordOrigin</code>, <code>passwordResetToken</code>) are excluded from responses.</p>\n<hr />\n<h2 id=\"complete-quick-copy-format-csv-style\">Complete Quick Copy Format (CSV-style)</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Parameter,Description,Required,Data Type,Example\npage,Page number for pagination,No,Number,page=1\nlimit,Number of records per page,No,Number,limit=25\nonlyCount,Return only count no data,No,Boolean,onlyCount=true\nascending,Sort order (1=asc 0=desc),No,Number,ascending=1\nbyColumn,Enable column sorting,No,Number,byColumn=1\norderBy,Field to sort by,No,String,orderBy=lastName\nquery,Search term,No,String,query=john\nemail,Filter by email,No,String,email=john@example.com\nfirstName,Filter by first name,No,String,firstName=John\nlastName,Filter by last name,No,String,lastName=Doe\njobTitle,Filter by job title,No,String,jobTitle=Manager\nisActive,Filter by active status,No,Boolean,isActive=true\nrank,Filter by customer rank,No,Number,rank=5\nsource,Filter by creation source,No,String,source=Web\ncompanyId,Filter by company,No,ObjectId,companyId=507f...\nstores,Filter by store,No,ObjectId,stores=507f...\nstore,Filter by store (alias),No,ObjectId,store=507f...\nuserId,Filter by account manager,No,ObjectId,userId=507f...\nadminUserId,Filter by sales admin,No,ObjectId,adminUserId=507f...\naccountManagerId,Filter by account manager,No,ObjectId,accountManagerId=507f...\nsalesAdminId,Filter by sales admin,No,ObjectId,salesAdminId=507f...\nsourceUserId,Filter by creator user,No,ObjectId,sourceUserId=507f...\ncustomerId,Filter by sequential customer ID,No,Number,customerId=12345\nexternalId,Filter by external/third-party ID,No,String,externalId=EXT-12345\ncustomerQBId,Filter by QuickBooks ID,No,String,customerQBId=QB-12345\ncustomerZohoId,Filter by Zoho CRM ID,No,String,customerZohoId=ZOHO-12345\ncustomerHubspotId,Filter by HubSpot ID,No,String,customerHubspotId=HS-12345\ncustomerXeroId,Filter by Xero accounting ID,No,String,customerXeroId=XERO-12345\ncustomerStripeId,Filter by Stripe customer ID,No,String,customerStripeId=cus_12345\npopulate,Fields to populate,No,String,populate=companyId,userId\nexportFormat,Export format,No,String,exportFormat=csv\nexportFields,Fields to export,No,String,exportFields=email,firstName\nwithLastFollowUp,Include follow-up info,No,Number,withLastFollowUp=1\nhasFollowUps,Filter by follow-up status,No,Boolean,hasFollowUps=true\nnoDistributor,Disable distributor filter,No,Boolean,noDistributor=true\nloadByAccountManager,Load by account manager context,No,Boolean,loadByAccountManager=true\nforceQueryByName,Force search by name,No,Boolean,forceQueryByName=true\ndefaultValue,Include specific customer,No,ObjectId,defaultValue=507f...\ncreatedAt,Filter by creation date,No,Date/Object,createdAt[gte]=2025-01-01\nupdatedAt,Filter by update date,No,Date/Object,updatedAt[lte]=2025-12-31\nlastContactedAt,Filter by last contact date,No,Date/Object,lastContactedAt[gte]=2025-10-01\n\n</code></pre><hr />\n<h2 id=\"access-control--behavior\">Access Control &amp; Behavior</h2>\n<ol>\n<li><p><strong>Auto-filtering by Distributor</strong>: Results automatically filtered by logged-in user's distributor (unless admin with <code>noDistributor=true</code>)</p>\n</li>\n<li><p><strong>Deleted Records</strong>: Automatically excluded (deletedAt: { $exists: false })</p>\n</li>\n<li><p><strong>Role-based Access</strong>:</p>\n<ul>\n<li><p>Admin roles can view all distributor customers</p>\n</li>\n<li><p>Regular users see customers based on role settings</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Populate</strong>: Only populated if explicitly requested via <code>populate</code> parameter</p>\n</li>\n<li><p><strong>Search Query</strong>: Searches across multiple fields (email, firstName, lastName, etc.)</p>\n</li>\n<li><p><strong>External IDs</strong>: All external ID filters perform exact matches</p>\n</li>\n</ol>\n<hr />\n<h2 id=\"common-use-cases\">Common Use Cases</h2>\n<h3 id=\"1-standard-list-view\">1. Standard List View</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/customers?page=1&amp;limit=25&amp;ascending=1&amp;orderBy=lastName\n\n</code></pre><h3 id=\"2-search-customers-1\">2. Search Customers</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/customers?query=john&amp;page=1&amp;limit=25\n\n</code></pre><h3 id=\"3-find-by-external-system-id\">3. Find by External System ID</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/customers?externalId=EXT-12345\n/customers?customerQBId=QB-12345\n/customers?customerStripeId=cus_12345\n\n</code></pre><h3 id=\"4-filter-by-store\">4. Filter by Store</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/customers?store=507f1f77bcf86cd799439012&amp;page=1&amp;limit=25\n\n</code></pre><h3 id=\"5-get-customer-count\">5. Get Customer Count</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/customers?onlyCount=true&amp;isActive=true\n\n</code></pre><h3 id=\"6-export-all-customers\">6. Export All Customers</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/customers?exportFormat=csv&amp;exportFields=email,firstName,lastName,companyId,externalId\n\n</code></pre><h3 id=\"7-with-related-data\">7. With Related Data</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/customers?page=1&amp;limit=25&amp;populate=companyId,userId,stores&amp;withLastFollowUp=1\n\n</code></pre><hr />\n<h2 id=\"notes\">Notes:</h2>\n<ol>\n<li><p><strong>Required Parameters</strong>: None - all parameters are optional</p>\n</li>\n<li><p><strong>Empty Query String</strong>: <code>query=\"\"</code> is valid and returns all customers</p>\n</li>\n<li><p><strong>Multiple Filters</strong>: Can combine multiple filter parameters</p>\n</li>\n<li><p><strong>Date Filtering</strong>: Use MongoDB query operators like <code>[gte]</code>, <code>[lte]</code>, <code>[gt]</code>, <code>[lt]</code></p>\n</li>\n<li><p><strong>Populate Performance</strong>: Only populate fields you need to reduce response size</p>\n</li>\n<li><p><strong>Export</strong>: When exporting, pagination is ignored and all matching records are returned</p>\n</li>\n<li><p><strong>Authentication</strong>: Valid JWT Bearer token required in all cases</p>\n</li>\n<li><p><strong>External IDs</strong>: All external ID fields are case-sensitive and perform exact matches</p>\n</li>\n<li><p><strong>Case Sensitivity</strong>: Most string filters are case-sensitive unless using <code>query</code> parameter</p>\n</li>\n</ol>\n","urlObject":{"path":["customers"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"016e42a0-e370-4226-a6db-2f6c400846ad"},{"name":"Create Customer","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"47315723-ea35-4e8b-b0f6-829f64af0e87","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"john.doe@example.com\",\n  \"stores\": [\"507f1f77bcf86cd799439011\"],\n  \"firstName\": \"John\",\n  \"lastName\": \"Doe\",\n  \"jobTitle\": \"Marketing Manager\",\n  \"password\": \"SecurePassword123!\",\n  \"passwordOrigin\": \"SecurePassword123!\",\n  \"customerCompany\": \"Acme Corporation\",\n  \"source\": \"Web\",\n  \"userId\": \"507f1f77bcf86cd799439016\",\n  \"adminUserId\": \"507f1f77bcf86cd799439017\",\n  \"isActive\": true,\n  \"rank\": 5,\n  \"sendRegistrationEmail\": true,\n  \"CustomerPhoneNumbers\": [\n    {\n      \"phoneNumber\": \"555-123-4567\",\n      \"phoneType\": \"Work\",\n      \"extension\": \"123\"\n    },\n    {\n      \"phoneNumber\": \"555-987-6543\",\n      \"phoneType\": \"Cell\"\n    }\n  ],\n  \"CustomerAddresses\": [\n    {\n      \"street\": \"123 Main Street\",\n      \"street1\": \"Suite 400\",\n      \"city\": \"New York\",\n      \"state\": \"NY\",\n      \"zip\": \"10001\",\n      \"country\": \"US\",\n      \"isDefault\": true\n    }\n  ],\n  \"CustomerBillingAddress\": [\n    {\n      \"street\": \"123 Main Street\",\n      \"city\": \"New York\",\n      \"state\": \"NY\",\n      \"zip\": \"10001\",\n      \"country\": \"US\",\n      \"isDefault\": true\n    }\n  ],\n  \"CustomerShippers\": [\n    {\n      \"shipperName\": \"FedEx\",\n      \"accountNumber\": \"123456789\",\n      \"isDefault\": true\n    }\n  ],\n  \"CustomerNotes\": [\n    {\n      \"note\": \"Prefers email communication\",\n      \"userId\": \"507f1f77bcf86cd799439018\",\n      \"createdAt\": \"2025-10-28T10:00:00.000Z\"\n    }\n  ],\n  \"roles\": [\"507f1f77bcf86cd799439019\"],\n  \"Documents\": [],\n  \"socialData\": [],\n  \"CustomerArtwork\": []\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/customers","description":"<h2 id=\"post-customers---field-reference-table\">POST /customers - Field Reference Table</h2>\n<h3 id=\"core-fields\">Core Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>Customer email address (unique per distributor)</td>\n<td><strong>Yes</strong></td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>stores</code></td>\n<td>Array of store IDs customer has access to</td>\n<td><strong>Yes</strong></td>\n<td>Array[ObjectId]</td>\n</tr>\n<tr>\n<td><code>firstName</code></td>\n<td>Customer's first name</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>lastName</code></td>\n<td>Customer's last name</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>Plain text password (auto-encrypted)</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>passwordOrigin</code></td>\n<td>Original password (stored separately)</td>\n<td>No</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"company-information\">Company Information</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customerCompany</code></td>\n<td>Company name (auto-creates company record)</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>companyId</code></td>\n<td>Direct reference to existing company</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>jobTitle</code></td>\n<td>Customer's job title/position</td>\n<td>No</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"ownership--tracking\">Ownership &amp; Tracking</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>sourceUserId</code></td>\n<td>User who created this customer (auto-set)</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>distributorId</code></td>\n<td>Distributor ID (auto-assigned)</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>supplierId</code></td>\n<td>Supplier ID if applicable</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>Creation source (defaults to \"Web\")</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>createdBy</code></td>\n<td>User who created the record (auto-set)</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"account-management\">Account Management</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>userId</code></td>\n<td>Account Manager user ID</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>adminUserId</code></td>\n<td>Sales Admin user ID</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>accountManagerId</code></td>\n<td>Alternative account manager field</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>salesAdminId</code></td>\n<td>Alternative sales admin field</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>isActive</code></td>\n<td>Whether customer account is active</td>\n<td>No</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>rank</code></td>\n<td>Customer ranking/priority</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n<tr>\n<td><code>customerId</code></td>\n<td>Sequential customer ID (auto-generated)</td>\n<td>No</td>\n<td>Number</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"contact-arrays\">Contact Arrays</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>CustomerPhoneNumbers</code></td>\n<td>Array of phone number objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>CustomerPhoneNumbers[].phoneNumber</code></td>\n<td>Phone number string</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerPhoneNumbers[].phoneType</code></td>\n<td>Type: Work, Cell, Home, Fax</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerPhoneNumbers[].extension</code></td>\n<td>Phone extension</td>\n<td>No</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"address-arrays\">Address Arrays</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>CustomerAddresses</code></td>\n<td>Array of shipping address objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].street</code></td>\n<td>Street address line 1</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].street1</code></td>\n<td>Street address line 2</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].city</code></td>\n<td>City name</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].state</code></td>\n<td>State/Province code</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].zip</code></td>\n<td>Zip/Postal code</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].country</code></td>\n<td>Country code (ISO 2-letter)</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses[].isDefault</code></td>\n<td>Mark as default address</td>\n<td>No</td>\n<td>Boolean</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"billing-address-arrays\">Billing Address Arrays</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>CustomerBillingAddress</code></td>\n<td>Array of billing address objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[].street</code></td>\n<td>Street address line 1</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[].city</code></td>\n<td>City name</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[].state</code></td>\n<td>State/Province code</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[].zip</code></td>\n<td>Zip/Postal code</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[].country</code></td>\n<td>Country code (REQUIRED for billing)</td>\n<td><strong>Yes</strong>*</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress[].isDefault</code></td>\n<td>Mark as default billing address</td>\n<td>No</td>\n<td>Boolean</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"shipper-information\">Shipper Information</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>CustomerShippers</code></td>\n<td>Array of shipper account objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>CustomerShippers[].shipperName</code></td>\n<td>Shipper company name</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerShippers[].accountNumber</code></td>\n<td>Shipper account number</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerShippers[].isDefault</code></td>\n<td>Mark as default shipper</td>\n<td>No</td>\n<td>Boolean</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"notes--documentation\">Notes &amp; Documentation</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>CustomerNotes</code></td>\n<td>Array of note objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>CustomerNotes[].note</code></td>\n<td>Note text content</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>CustomerNotes[].userId</code></td>\n<td>User who created note</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n<tr>\n<td><code>CustomerNotes[].createdAt</code></td>\n<td>Note creation timestamp</td>\n<td>No</td>\n<td>Date (ISO 8601)</td>\n</tr>\n<tr>\n<td><code>Documents</code></td>\n<td>Array of document/upload IDs</td>\n<td>No</td>\n<td>Array[ObjectId]</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"permissions--roles\">Permissions &amp; Roles</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>roles</code></td>\n<td>Array of customer role IDs</td>\n<td>No</td>\n<td>Array[ObjectId]</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"social-authentication\">Social Authentication</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>socialData</code></td>\n<td>Array of social login objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n</tr>\n<tr>\n<td><code>socialData[].service</code></td>\n<td>Social network (facebook, google, etc.)</td>\n<td>No</td>\n<td>String</td>\n</tr>\n<tr>\n<td><code>socialData[].id</code></td>\n<td>Social network user ID</td>\n<td>No</td>\n<td>String</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"email--communication\">Email &amp; Communication</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>sendRegistrationEmail</code></td>\n<td>Send welcome email immediately</td>\n<td>No</td>\n<td>Boolean</td>\n</tr>\n<tr>\n<td><code>registrationsSent</code></td>\n<td>Array of registration email records</td>\n<td>No</td>\n<td>Array[Object]</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"custom--reference-fields\">Custom &amp; Reference Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>referenceFields</code></td>\n<td>Custom fields specific to distributor</td>\n<td>No</td>\n<td>Object</td>\n</tr>\n<tr>\n<td><code>CustomerArtwork</code></td>\n<td>Array of artwork objects (rarely used)</td>\n<td>No</td>\n<td>Array[Object]</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"device-tracking\">Device Tracking</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customerDeviceId</code></td>\n<td>Customer device tracking ID</td>\n<td>No</td>\n<td>ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"notes\">Notes:</h2>\n<ol>\n<li><p><strong>Required Fields</strong>: Only <code>email</code> and <code>stores</code> are strictly required</p>\n</li>\n<li><p><strong>Auto-Generated</strong>: Fields like <code>customerId</code>, <code>createdBy</code>, <code>sourceUserId</code>, and <code>distributorId</code> are auto-set if not provided</p>\n</li>\n<li><p><strong>Conditional Required</strong>: <code>CustomerBillingAddress[].country</code> is required IF you're adding billing addresses</p>\n</li>\n<li><p><strong>ObjectId Format</strong>: Use valid MongoDB ObjectId strings (24 hex characters)</p>\n</li>\n<li><p><strong>Date Format</strong>: Use ISO 8601 format (e.g., \"2025-10-28T10:00:00.000Z\")</p>\n</li>\n<li><p><strong>Country Codes</strong>: Use ISO 2-letter codes (US, CA, GB, etc.)</p>\n</li>\n<li><p><strong>Phone Types</strong>: Common values are \"Work\", \"Cell\", \"Home\", \"Fax\"</p>\n</li>\n</ol>\n","urlObject":{"path":["customers"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"47315723-ea35-4e8b-b0f6-829f64af0e87"},{"name":"Update Customer","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":[""],"type":"text/javascript","packages":{}}}],"id":"8f3d8a7d-6e26-4229-ac82-633d6e0a64dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\n    \"userId\": null,\n    \"adminUserId\": null,\n    \"email\": \"customer@test.com\",\n    \"passwordOrigin\": \"11111\",\n    \"sourceUserId\": \"5f989350956add0fd61f08bb\",\n    \"companyId\": null,\n    \"CustomerPhoneNumbers\": [],\n    \"CustomerBillingAddress\": [\n        {\n            \"country\": \"\",\n            \"state\": \"\"\n        }\n    ],\n    \"stores\": [\n        {\n            \"_id\": \"63911c18053945656f1cecf6\",\n            \"storeName\": \"MPower Distributor Store\",\n            \"storeUrl\": \"storeprod.mpowerpromo.com\" \n        }\n    ],\n    \"states\": [],\n    \"isActive\": true,\n    \"isTest\": false,\n    \"firstName\": \"Customer\",\n    \"lastName\": \"Lastname\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/customers/{{customerId}}","description":"<h2 id=\"put-customerscustomerid---update-customer-complete-reference\">PUT /customers/:customerId - Update Customer (COMPLETE REFERENCE)</h2>\n<h3 id=\"request-configuration\">Request Configuration</h3>\n<p><strong>Method:</strong> <code>PUT</code> or <code>PATCH</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/customers/{{customerId}}</code><br /><strong>Authentication:</strong> Required (JWT Bearer token)</p>\n<p><strong>Note:</strong> Both <code>PUT</code> and <code>PATCH</code> methods are supported and use the same handler.</p>\n<hr />\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customerId</code></td>\n<td>MongoDB ObjectId of the customer</td>\n<td><strong>Yes</strong></td>\n<td>ObjectId</td>\n<td><code>507f1f77bcf86cd799439011</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"headers\">Headers</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Description</th>\n<th>Required</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td>Bearer JWT token</td>\n<td><strong>Yes</strong></td>\n<td><code>{{vault:bearer-token}}</code></td>\n</tr>\n<tr>\n<td><code>Content-Type</code></td>\n<td>Content type</td>\n<td><strong>Yes</strong></td>\n<td><code>application/json</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"request-body-parameters\">Request Body Parameters</h2>\n<h3 id=\"basic-information-fields\">Basic Information Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>Customer email address</td>\n<td>No</td>\n<td>String</td>\n<td>Must be unique per distributor</td>\n</tr>\n<tr>\n<td><code>firstName</code></td>\n<td>Customer's first name</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>lastName</code></td>\n<td>Customer's last name</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>jobTitle</code></td>\n<td>Job title/position</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>isActive</code></td>\n<td>Account active status</td>\n<td>No</td>\n<td>Boolean</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>rank</code></td>\n<td>Customer ranking/priority</td>\n<td>No</td>\n<td>Number</td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"company-information\">Company Information</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customerCompany</code></td>\n<td>Company name (updates company record)</td>\n<td>No</td>\n<td>String</td>\n<td>Updates linked company's name</td>\n</tr>\n<tr>\n<td><code>companyId</code></td>\n<td>Company ObjectId reference</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"password-management\">Password Management</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>passwordOrigin</code></td>\n<td>Original password (plain text)</td>\n<td>No</td>\n<td>String</td>\n<td>Stored separately, encrypts automatically</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Important:</strong> <code>password</code> field is automatically removed from updates for security. Use <code>passwordOrigin</code> to update password.</p>\n<h3 id=\"user-assignments\">User Assignments</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>userId</code></td>\n<td>Account Manager ObjectId</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>adminUserId</code></td>\n<td>Sales Admin ObjectId</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>sourceUserId</code></td>\n<td>User who created customer</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"store--distribution\">Store &amp; Distribution</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>stores</code></td>\n<td>Array of store IDs</td>\n<td>No</td>\n<td>Array[ObjectId]</td>\n<td>Duplicates auto-removed</td>\n</tr>\n<tr>\n<td><code>distributorId</code></td>\n<td>Distributor ObjectId</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>supplierId</code></td>\n<td>Supplier ObjectId</td>\n<td>No</td>\n<td>ObjectId</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>source</code></td>\n<td>Creation source</td>\n<td>No</td>\n<td>String</td>\n<td>e.g., \"Web\", \"API\", \"Import\"</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"external-ids-integration-systems\">External IDs (Integration Systems)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>externalId</code></td>\n<td>External/third-party ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>customerQBId</code></td>\n<td>QuickBooks customer ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>customerZohoId</code></td>\n<td>Zoho CRM customer ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>customerHubspotId</code></td>\n<td>HubSpot customer ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>customerXeroId</code></td>\n<td>Xero accounting customer ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>customerStripeId</code></td>\n<td>Stripe customer ID</td>\n<td>No</td>\n<td>String</td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"contact-arrays\">Contact Arrays</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>CustomerPhoneNumbers</code></td>\n<td>Complete array of phone objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n<td>Replaces entire array</td>\n</tr>\n<tr>\n<td><code>CustomerAddresses</code></td>\n<td>Complete array of address objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n<td>State fields auto-filled</td>\n</tr>\n<tr>\n<td><code>CustomerBillingAddress</code></td>\n<td>Complete array of billing address objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n<td>State fields auto-filled</td>\n</tr>\n<tr>\n<td><code>CustomerShippers</code></td>\n<td>Complete array of shipper objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n<td>Replaces entire array</td>\n</tr>\n<tr>\n<td><code>CustomerNotes</code></td>\n<td>Complete array of note objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n<td>Replaces entire array</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"phone-number-object-structure\">Phone Number Object Structure</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439011\",\n  \"phoneNumber\": \"555-123-4567\",\n  \"phoneType\": \"Work\",\n  \"extension\": \"123\"\n}\n\n</code></pre>\n<h4 id=\"address-object-structure\">Address Object Structure</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439012\",\n  \"street\": \"123 Main Street\",\n  \"street1\": \"Suite 400\",\n  \"city\": \"New York\",\n  \"state\": \"NY\",\n  \"zip\": \"10001\",\n  \"country\": \"US\",\n  \"isDefault\": true\n}\n\n</code></pre>\n<h4 id=\"billing-address-object-structure\">Billing Address Object Structure</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439013\",\n  \"street\": \"123 Main Street\",\n  \"city\": \"New York\",\n  \"state\": \"NY\",\n  \"zip\": \"10001\",\n  \"country\": \"US\",\n  \"isDefault\": true\n}\n\n</code></pre>\n<h4 id=\"shipper-object-structure\">Shipper Object Structure</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439014\",\n  \"shipperName\": \"FedEx\",\n  \"accountNumber\": \"123456789\",\n  \"isDefault\": true\n}\n\n</code></pre>\n<h4 id=\"note-object-structure\">Note Object Structure</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439015\",\n  \"note\": \"Important customer note\",\n  \"userId\": \"507f1f77bcf86cd799439016\",\n  \"createdAt\": \"2025-10-28T10:00:00.000Z\"\n}\n\n</code></pre>\n<h3 id=\"additional-fields\">Additional Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Documents</code></td>\n<td>Array of document ObjectIds</td>\n<td>No</td>\n<td>Array[ObjectId]</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>roles</code></td>\n<td>Array of role ObjectIds</td>\n<td>No</td>\n<td>Array[ObjectId]</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>socialData</code></td>\n<td>Array of social login objects</td>\n<td>No</td>\n<td>Array[Object]</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>referenceFields</code></td>\n<td>Custom fields specific to distributor</td>\n<td>No</td>\n<td>Object</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>hasFollowUps</code></td>\n<td>Whether customer has active follow-ups</td>\n<td>No</td>\n<td>Boolean</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>lastContactedAt</code></td>\n<td>Last contact timestamp</td>\n<td>No</td>\n<td>Date</td>\n<td>ISO 8601 format</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"read-only--auto-managed-fields\">Read-Only / Auto-Managed Fields</h3>\n<p>These fields are automatically managed and cannot be directly updated:</p>\n<ul>\n<li><p>❌ <code>password</code> - Removed for security (use <code>passwordOrigin</code>)</p>\n</li>\n<li><p>❌ <code>__v</code> - Mongoose version key</p>\n</li>\n<li><p>✅ <code>customerId</code> - Auto-generated if missing</p>\n</li>\n<li><p>✅ <code>updatedAt</code> - Auto-updated on save</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"example-requests\">Example Requests</h2>\n<h3 id=\"1-update-basic-information\">1. Update Basic Information</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"firstName\": \"John\",\n  \"lastName\": \"Doe\",\n  \"email\": \"john.doe.updated@example.com\",\n  \"jobTitle\": \"Senior Marketing Manager\"\n}\n\n</code></pre>\n<h3 id=\"2-update-external-ids\">2. Update External IDs</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"externalId\": \"EXT-12345\",\n  \"customerQBId\": \"QB-98765\",\n  \"customerStripeId\": \"cus_abc123xyz\",\n  \"customerHubspotId\": \"12345678\"\n}\n\n</code></pre>\n<h3 id=\"3-update-password\">3. Update Password</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"passwordOrigin\": \"NewSecurePassword123!\"\n}\n\n</code></pre>\n<h3 id=\"4-update-account-manager-and-status\">4. Update Account Manager and Status</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"userId\": \"507f1f77bcf86cd799439016\",\n  \"adminUserId\": \"507f1f77bcf86cd799439017\",\n  \"isActive\": true,\n  \"rank\": 5\n}\n\n</code></pre>\n<h3 id=\"5-update-company\">5. Update Company</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"customerCompany\": \"Acme Corporation Updated\",\n  \"jobTitle\": \"VP of Marketing\"\n}\n\n</code></pre>\n<h3 id=\"6-update-stores\">6. Update Stores</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"stores\": [\n    \"507f1f77bcf86cd799439020\",\n    \"507f1f77bcf86cd799439021\"\n  ]\n}\n\n</code></pre>\n<h3 id=\"7-update-phone-numbers\">7. Update Phone Numbers</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"CustomerPhoneNumbers\": [\n    {\n      \"phoneNumber\": \"555-123-4567\",\n      \"phoneType\": \"Work\",\n      \"extension\": \"123\"\n    },\n    {\n      \"phoneNumber\": \"555-987-6543\",\n      \"phoneType\": \"Cell\"\n    }\n  ]\n}\n\n</code></pre>\n<h3 id=\"8-update-addresses\">8. Update Addresses</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"CustomerAddresses\": [\n    {\n      \"street\": \"456 Oak Avenue\",\n      \"street1\": \"Building B\",\n      \"city\": \"Los Angeles\",\n      \"state\": \"CA\",\n      \"zip\": \"90001\",\n      \"country\": \"US\",\n      \"isDefault\": true\n    }\n  ]\n}\n\n</code></pre>\n<h3 id=\"9-update-billing-address\">9. Update Billing Address</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"CustomerBillingAddress\": [\n    {\n      \"street\": \"789 Billing Street\",\n      \"city\": \"Chicago\",\n      \"state\": \"IL\",\n      \"zip\": \"60601\",\n      \"country\": \"US\",\n      \"isDefault\": true\n    }\n  ]\n}\n\n</code></pre>\n<h3 id=\"10-complete-update-multiple-fields\">10. Complete Update (Multiple Fields)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\nContent-Type: application/json\n{\n  \"firstName\": \"Jane\",\n  \"lastName\": \"Smith\",\n  \"email\": \"jane.smith@example.com\",\n  \"jobTitle\": \"Director of Operations\",\n  \"externalId\": \"EXT-UPDATED-001\",\n  \"customerStripeId\": \"cus_newstripe123\",\n  \"isActive\": true,\n  \"rank\": 10,\n  \"userId\": \"507f1f77bcf86cd799439016\",\n  \"stores\": [\n    \"507f1f77bcf86cd799439020\"\n  ],\n  \"CustomerPhoneNumbers\": [\n    {\n      \"phoneNumber\": \"555-111-2222\",\n      \"phoneType\": \"Work\"\n    }\n  ],\n  \"referenceFields\": {\n    \"customField1\": \"Updated Value\",\n    \"customField2\": \"New Value\"\n  }\n}\n\n</code></pre>\n<hr />\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200\">Success Response (200)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"$$notification\": {\n    \"success\": \"Successfully Saved\"\n  },\n  \"model\": {\n    \"_id\": \"507f1f77bcf86cd799439011\",\n    \"customerId\": 12345,\n    \"email\": \"john.doe.updated@example.com\",\n    \"firstName\": \"John\",\n    \"lastName\": \"Doe\",\n    \"jobTitle\": \"Senior Marketing Manager\",\n    \"externalId\": \"EXT-12345\",\n    \"customerQBId\": \"QB-98765\",\n    \"customerStripeId\": \"cus_abc123xyz\",\n    \"customerHubspotId\": \"12345678\",\n    \"isActive\": true,\n    \"rank\": 5,\n    \"distributorId\": \"507f1f77bcf86cd799439012\",\n    \"stores\": [\"507f1f77bcf86cd799439020\"],\n    \"userId\": \"507f1f77bcf86cd799439016\",\n    \"adminUserId\": \"507f1f77bcf86cd799439017\",\n    \"CustomerPhoneNumbers\": [\n      {\n        \"_id\": \"507f1f77bcf86cd799439018\",\n        \"phoneNumber\": \"555-123-4567\",\n        \"phoneType\": \"Work\",\n        \"extension\": \"123\"\n      }\n    ],\n    \"CustomerAddresses\": [\n      {\n        \"_id\": \"507f1f77bcf86cd79943901a\",\n        \"street\": \"456 Oak Avenue\",\n        \"city\": \"Los Angeles\",\n        \"state\": \"CA\",\n        \"zip\": \"90001\",\n        \"country\": \"US\"\n      }\n    ],\n    \"createdAt\": \"2025-10-01T09:00:00.000Z\",\n    \"updatedAt\": \"2025-10-28T10:30:00.000Z\"\n  }\n}\n\n</code></pre>\n<hr />\n<h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"422---email-already-in-use\">422 - Email Already in Use</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"$$notification\": {\n    \"error\": \"Email already in use\"\n  }\n}\n\n</code></pre>\n<h3 id=\"422---validation-error\">422 - Validation Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"$$notification\": {\n    \"error\": \"Validation error message\"\n  }\n}\n\n</code></pre>\n<h3 id=\"500---user-not-available-deleted\">500 - User Not Available (Deleted)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"User is not available\"\n}\n\n</code></pre>\n<h3 id=\"404---customer-not-found\">404 - Customer Not Found</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Customer not found\"\n}\n\n</code></pre>\n<h3 id=\"401---unauthorized\">401 - Unauthorized</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Unauthorized\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"automatic-behaviors\">Automatic Behaviors</h2>\n<h3 id=\"1-email-uniqueness-check\">1. Email Uniqueness Check</h3>\n<ul>\n<li><p>Validates email is unique across the distributor</p>\n</li>\n<li><p>Excludes the current customer from uniqueness check</p>\n</li>\n<li><p>Case-insensitive check</p>\n</li>\n</ul>\n<h3 id=\"2-company-name-update\">2. Company Name Update</h3>\n<ul>\n<li><p>If <code>customerCompany</code> is provided, updates the linked company's name</p>\n</li>\n<li><p>Uses the existing <code>companyId</code> to find and update the company</p>\n</li>\n</ul>\n<h3 id=\"3-password-handling\">3. Password Handling</h3>\n<ul>\n<li><p><code>password</code> field is automatically removed from request body</p>\n</li>\n<li><p><code>passwordOrigin</code> is extracted and handled separately</p>\n</li>\n<li><p>Password is encrypted automatically before saving</p>\n</li>\n</ul>\n<h3 id=\"4-address-state-population\">4. Address State Population</h3>\n<ul>\n<li><p>If both <code>CustomerAddresses</code> and <code>CustomerBillingAddress</code> are provided</p>\n</li>\n<li><p>State fields are automatically filled/validated</p>\n</li>\n</ul>\n<h3 id=\"5-store-duplicates-removal\">5. Store Duplicates Removal</h3>\n<ul>\n<li><p>If <code>stores</code> array is updated, duplicates are automatically removed</p>\n</li>\n<li><p>Uses <code>clearStoresDuplicates()</code> helper</p>\n</li>\n</ul>\n<h3 id=\"6-sendgrid-sync\">6. SendGrid Sync</h3>\n<ul>\n<li>If <code>stores</code> are updated, customer is automatically synced to SendGrid</li>\n</ul>\n<h3 id=\"7-sequential-customer-id\">7. Sequential Customer ID</h3>\n<ul>\n<li>If missing, automatically generates next <code>customerId</code> from sequence</li>\n</ul>\n<h3 id=\"8-change-logging\">8. Change Logging</h3>\n<ul>\n<li><p>All changes are logged to the <code>Log</code> collection</p>\n</li>\n<li><p>Tracks before/after state with detailed diff</p>\n</li>\n<li><p>Includes IP, user, and timestamp</p>\n</li>\n</ul>\n<h3 id=\"9-cache-clearing\">9. Cache Clearing</h3>\n<ul>\n<li><p>Automatically clears all cache keys after update</p>\n</li>\n<li><p>Clears runtime cache</p>\n</li>\n</ul>\n<h3 id=\"10-hubspot-sync\">10. HubSpot Sync</h3>\n<ul>\n<li>Automatically updates customer in HubSpot after save (async)</li>\n</ul>\n<h3 id=\"11-private-data-removal\">11. Private Data Removal</h3>\n<ul>\n<li><p>Automatically removes private/sensitive fields via <code>removePrivateData()</code></p>\n</li>\n<li><p>Based on user permissions and context</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"important-notes\">Important Notes</h2>\n<h3 id=\"fields-you-cannot-update-directly\">Fields You CANNOT Update Directly:</h3>\n<ol>\n<li><p><strong>password</strong> - Use <code>passwordOrigin</code> instead (auto-encrypted)</p>\n</li>\n<li><p><strong>__v</strong> - Mongoose version key (auto-managed)</p>\n</li>\n<li><p><strong>deletedAt</strong> - Use DELETE endpoint instead</p>\n</li>\n</ol>\n<h3 id=\"fields-that-are-auto-generated\">Fields That Are Auto-Generated:</h3>\n<ol>\n<li><p><strong>customerId</strong> - Auto-generated sequential ID if missing</p>\n</li>\n<li><p><strong>updatedAt</strong> - Auto-updated timestamp</p>\n</li>\n<li><p><strong>createdBy</strong> - Cannot be changed after creation</p>\n</li>\n</ol>\n<h3 id=\"special-validations\">Special Validations:</h3>\n<ol>\n<li><p><strong>Email</strong> - Must be valid email format and unique per distributor</p>\n</li>\n<li><p><strong>CustomerBillingAddress</strong> - Entries without <code>country</code> are filtered out</p>\n</li>\n<li><p><strong>Stores</strong> - Duplicates automatically removed</p>\n</li>\n<li><p><strong>ObjectId Fields</strong> - Must be valid MongoDB ObjectIds</p>\n</li>\n</ol>\n<h3 id=\"automatic-side-effects\">Automatic Side Effects:</h3>\n<ol>\n<li><p><strong>SendGrid</strong> - Customer synced to SendGrid if stores updated</p>\n</li>\n<li><p><strong>HubSpot</strong> - Customer synced to HubSpot after save</p>\n</li>\n<li><p><strong>Cache</strong> - All caches cleared after update</p>\n</li>\n<li><p><strong>Logging</strong> - Changes tracked in Log collection with full diff</p>\n</li>\n<li><p><strong>Company</strong> - Company name updated if <code>customerCompany</code> provided</p>\n</li>\n</ol>\n<hr />\n<h2 id=\"complete-field-reference-table-csv\">Complete Field Reference Table (CSV)</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Field,Description,Required,Data Type,Updatable,Notes\nemail,Customer email address,No,String,Yes,Must be unique per distributor\nfirstName,First name,No,String,Yes,-\nlastName,Last name,No,String,Yes,-\njobTitle,Job title,No,String,Yes,-\nisActive,Active status,No,Boolean,Yes,-\nrank,Customer rank,No,Number,Yes,-\ncustomerCompany,Company name,No,String,Yes,Updates linked company record\ncompanyId,Company reference,No,ObjectId,Yes,-\npasswordOrigin,Plain text password,No,String,Yes,Auto-encrypted\nuserId,Account Manager,No,ObjectId,Yes,-\nadminUserId,Sales Admin,No,ObjectId,Yes,-\nsourceUserId,Creator user,No,ObjectId,Yes,-\nstores,Store IDs array,No,Array[ObjectId],Yes,Auto-deduped\ndistributorId,Distributor ID,No,ObjectId,Yes,-\nsupplierId,Supplier ID,No,ObjectId,Yes,-\nsource,Creation source,No,String,Yes,-\nexternalId,External/third-party ID,No,String,Yes,-\ncustomerQBId,QuickBooks ID,No,String,Yes,-\ncustomerZohoId,Zoho CRM ID,No,String,Yes,-\ncustomerHubspotId,HubSpot ID,No,String,Yes,-\ncustomerXeroId,Xero ID,No,String,Yes,-\ncustomerStripeId,Stripe ID,No,String,Yes,-\nCustomerPhoneNumbers,Phone array,No,Array[Object],Yes,Replaces entire array\nCustomerAddresses,Address array,No,Array[Object],Yes,Replaces entire array\nCustomerBillingAddress,Billing address array,No,Array[Object],Yes,Replaces entire array\nCustomerShippers,Shipper array,No,Array[Object],Yes,Replaces entire array\nCustomerNotes,Notes array,No,Array[Object],Yes,Replaces entire array\nDocuments,Document IDs,No,Array[ObjectId],Yes,-\nroles,Role IDs,No,Array[ObjectId],Yes,-\nsocialData,Social login data,No,Array[Object],Yes,-\nreferenceFields,Custom fields,No,Object,Yes,-\nhasFollowUps,Has follow-ups flag,No,Boolean,Yes,-\nlastContactedAt,Last contact date,No,Date,Yes,ISO 8601 format\npassword,Password (encrypted),No,String,No,Use passwordOrigin instead\ncustomerId,Sequential customer ID,No,Number,No,Auto-generated if missing\n__v,Version key,No,Number,No,Auto-managed by Mongoose\n\n</code></pre><hr />\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Partial Updates</strong>: Only send fields you want to update</p>\n</li>\n<li><p><strong>Email Changes</strong>: Verify email uniqueness before updating</p>\n</li>\n<li><p><strong>Password Updates</strong>: Always use <code>passwordOrigin</code>, never <code>password</code></p>\n</li>\n<li><p><strong>Array Fields</strong>: When updating arrays, send the complete array (not individual items)</p>\n</li>\n<li><p><strong>External IDs</strong>: Use appropriate external ID fields for integrations</p>\n</li>\n<li><p><strong>Validation</strong>: Check for validation errors in response</p>\n</li>\n<li><p><strong>Logging</strong>: All changes are logged - ensure user has proper context</p>\n</li>\n<li><p><strong>Cache</strong>: Updates clear cache - may affect performance in high-volume scenarios</p>\n</li>\n</ol>\n","urlObject":{"path":["customers","{{customerId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"8f3d8a7d-6e26-4229-ac82-633d6e0a64dd"},{"name":"Delete Customer","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":[""],"type":"text/javascript","packages":{}}}],"id":"de0263b7-3fe0-4321-8cc9-007c2f897b6e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/customers/{{customerId}}","description":"<h2 id=\"delete-customerscustomerid---delete-customer-soft-delete\">DELETE /customers/:customerId - Delete Customer (Soft Delete)</h2>\n<h3 id=\"request-configuration\">Request Configuration</h3>\n<p><strong>Method:</strong> <code>DELETE</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/customers/{{customerId}}</code><br /><strong>Authentication:</strong> Required (JWT Bearer token)</p>\n<p><strong>Important:</strong> This is a <strong>soft delete</strong> - the customer record is not permanently removed from the database. Instead, a <code>deletedAt</code> timestamp is set, marking the customer as deleted.</p>\n<hr />\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n<th>Required</th>\n<th>Data Type</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customerId</code></td>\n<td>MongoDB ObjectId of the customer</td>\n<td><strong>Yes</strong></td>\n<td>ObjectId</td>\n<td><code>507f1f77bcf86cd799439011</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"headers\">Headers</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Description</th>\n<th>Required</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td>Bearer JWT token</td>\n<td><strong>Yes</strong></td>\n<td><code>{{vault:bearer-token}}</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"request-body\">Request Body</h2>\n<p><strong>None</strong> - This endpoint does not require a request body.</p>\n<hr />\n<h2 id=\"query-parameters\">Query Parameters</h2>\n<p><strong>None</strong> - This endpoint does not accept query parameters.</p>\n<hr />\n<h2 id=\"example-requests\">Example Requests</h2>\n<h3 id=\"basic-delete-request\">Basic Delete Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">DELETE https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"using-postman\">Using Postman</h3>\n<p><strong>Method:</strong> <code>DELETE</code><br /><strong>URL:</strong> <code>https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011</code><br /><strong>Headers:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer {{token}}\n\n</code></pre><p><strong>Body:</strong> None</p>\n<hr />\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200\">Success Response (200)</h3>\n<p>Returns the deleted customer object with the <code>deletedAt</code> field set:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439011\",\n  \"customerId\": 12345,\n  \"email\": \"john.doe@example.com\",\n  \"firstName\": \"John\",\n  \"lastName\": \"Doe\",\n  \"jobTitle\": \"Marketing Manager\",\n  \"externalId\": \"EXT-12345\",\n  \"customerQBId\": \"QB-98765\",\n  \"customerStripeId\": \"cus_abc123xyz\",\n  \"isActive\": true,\n  \"distributorId\": \"507f1f77bcf86cd799439012\",\n  \"stores\": [\"507f1f77bcf86cd799439013\"],\n  \"companyId\": \"507f1f77bcf86cd799439014\",\n  \"userId\": \"507f1f77bcf86cd799439015\",\n  \"CustomerPhoneNumbers\": [],\n  \"CustomerAddresses\": [],\n  \"createdAt\": \"2025-10-01T09:00:00.000Z\",\n  \"updatedAt\": \"2025-10-28T10:00:00.000Z\",\n  \"deletedAt\": \"2025-10-28T15:30:00.000Z\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"error-responses\">Error Responses</h2>\n<h3 id=\"404---customer-not-found\">404 - Customer Not Found</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Customer not found\"\n}\n\n</code></pre>\n<h3 id=\"401---unauthorized\">401 - Unauthorized</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Unauthorized\"\n}\n\n</code></pre>\n<h3 id=\"403---forbidden\">403 - Forbidden</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Access denied\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"behavior--side-effects\">Behavior &amp; Side Effects</h2>\n<h3 id=\"what-happens-on-delete\">What Happens on Delete:</h3>\n<ol>\n<li><p><strong>Soft Delete</strong></p>\n<ul>\n<li><p>Customer record is NOT permanently removed</p>\n</li>\n<li><p><code>deletedAt</code> field is set to current timestamp</p>\n</li>\n<li><p>Customer remains in database but is marked as deleted</p>\n</li>\n</ul>\n</li>\n<li><p><strong>API Token Logging</strong></p>\n<ul>\n<li><p>Delete action is logged via <code>logCustomerApiTokenRequest()</code></p>\n</li>\n<li><p>Tracks which user/token performed the deletion</p>\n</li>\n<li><p>Includes timestamp and customer information</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Customer Visibility</strong></p>\n<ul>\n<li><p>Deleted customers are automatically excluded from GET <code>/customers</code> list queries</p>\n</li>\n<li><p>Filter applied: <code>deletedAt: { $exists: false }</code></p>\n</li>\n<li><p>Can still be retrieved by direct ID if needed (for audit/recovery)</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Related Data</strong></p>\n<ul>\n<li><p>Customer's orders, artwork, documents remain intact</p>\n</li>\n<li><p>Relationships preserved for historical/audit purposes</p>\n</li>\n<li><p>No cascade deletion of related records</p>\n</li>\n</ul>\n</li>\n</ol>\n<hr />\n<h2 id=\"important-notes\">Important Notes</h2>\n<h3 id=\"soft-delete-vs-hard-delete\">Soft Delete vs Hard Delete</h3>\n<p>✅ <strong>What This Endpoint Does (Soft Delete):</strong></p>\n<ul>\n<li><p>Sets <code>deletedAt</code> timestamp</p>\n</li>\n<li><p>Hides customer from normal queries</p>\n</li>\n<li><p>Preserves all data for audit/recovery</p>\n</li>\n<li><p>Maintains referential integrity</p>\n</li>\n</ul>\n<p>❌ <strong>What This Endpoint Does NOT Do (Hard Delete):</strong></p>\n<ul>\n<li><p>Does not permanently remove the record</p>\n</li>\n<li><p>Does not delete related orders</p>\n</li>\n<li><p>Does not delete customer artwork</p>\n</li>\n<li><p>Does not remove from database</p>\n</li>\n</ul>\n<h3 id=\"recovery\">Recovery</h3>\n<p>To restore a soft-deleted customer, you would need to:</p>\n<ol>\n<li><p>Use a direct database update to remove the <code>deletedAt</code> field</p>\n</li>\n<li><p>Or use a custom restore endpoint if available</p>\n</li>\n</ol>\n<h3 id=\"access-control\">Access Control</h3>\n<ul>\n<li><p>User must have appropriate permissions to delete customers</p>\n</li>\n<li><p>Typically restricted to admin users or account managers</p>\n</li>\n<li><p>Deletion is logged for audit trail</p>\n</li>\n</ul>\n<h3 id=\"integration-impact\">Integration Impact</h3>\n<p><strong>Important for integrations:</strong></p>\n<ul>\n<li><p>External IDs (<code>externalId</code>, <code>customerQBId</code>, <code>customerStripeId</code>, etc.) remain in the database</p>\n</li>\n<li><p>If re-creating a customer with the same external ID, you may encounter conflicts</p>\n</li>\n<li><p>Consider checking for soft-deleted customers before creating new ones</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"after-deletion\">After Deletion</h2>\n<h3 id=\"finding-deleted-customers\">Finding Deleted Customers</h3>\n<p>Deleted customers can still be queried directly by ID:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<p><strong>Response will include:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"507f1f77bcf86cd799439011\",\n  \"deletedAt\": \"2025-10-28T15:30:00.000Z\",\n  ...\n}\n\n</code></pre>\n<h3 id=\"excluded-from-list-queries\">Excluded from List Queries</h3>\n<p>Deleted customers are automatically excluded:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?email=john.doe@example.com\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<p><strong>Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [],\n  \"count\": 0\n}\n\n</code></pre>\n<hr />\n<h2 id=\"use-cases\">Use Cases</h2>\n<h3 id=\"1-remove-inactive-customer\">1. Remove Inactive Customer</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">DELETE https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439011\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"2-clean-up-test-accounts\">2. Clean Up Test Accounts</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">DELETE https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439012\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<h3 id=\"3-gdprprivacy-request-soft-archive\">3. GDPR/Privacy Request (Soft Archive)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">DELETE https://api.mpowerpromo.com/customers/507f1f77bcf86cd799439013\nAuthorization: Bearer {{token}}\n\n</code></pre>\n<p><strong>Note:</strong> For full GDPR compliance, you may need additional steps to anonymize or permanently delete data.</p>\n<hr />\n<h2 id=\"related-endpoints\">Related Endpoints</h2>\n<h3 id=\"create-customer\">Create Customer</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">POST https://api.mpowerpromo.com/customers\n\n</code></pre>\n<h3 id=\"update-customer\">Update Customer</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">PUT https://api.mpowerpromo.com/customers/{{customerId}}\n\n</code></pre>\n<h3 id=\"get-customer-including-deleted\">Get Customer (Including Deleted)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers/{{customerId}}\n\n</code></pre>\n<h3 id=\"list-active-customers-excludes-deleted\">List Active Customers (Excludes Deleted)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-http\">GET https://api.mpowerpromo.com/customers?page=1&amp;limit=25\n\n</code></pre>\n<hr />\n<h2 id=\"complete-quick-reference\">Complete Quick Reference</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Aspect</th>\n<th>Details</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Method</strong></td>\n<td>DELETE</td>\n</tr>\n<tr>\n<td><strong>URL</strong></td>\n<td><code>https://api.mpowerpromo.com/customers/:customerId</code></td>\n</tr>\n<tr>\n<td><strong>Auth</strong></td>\n<td>Required (Bearer token)</td>\n</tr>\n<tr>\n<td><strong>Body</strong></td>\n<td>None</td>\n</tr>\n<tr>\n<td><strong>Query Params</strong></td>\n<td>None</td>\n</tr>\n<tr>\n<td><strong>Delete Type</strong></td>\n<td>Soft delete (sets <code>deletedAt</code>)</td>\n</tr>\n<tr>\n<td><strong>Returns</strong></td>\n<td>Updated customer object with <code>deletedAt</code></td>\n</tr>\n<tr>\n<td><strong>Cascade</strong></td>\n<td>No - related data preserved</td>\n</tr>\n<tr>\n<td><strong>Logging</strong></td>\n<td>Yes - API token request logged</td>\n</tr>\n<tr>\n<td><strong>Reversible</strong></td>\n<td>Yes - via database update</td>\n</tr>\n<tr>\n<td><strong>Response Code</strong></td>\n<td>200 (Success), 404 (Not Found), 401 (Unauthorized)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"csv-format-reference\">CSV Format Reference</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Field,Value\nMethod,DELETE\nEndpoint,/customers/:customerId\nAuthentication,Required (JWT Bearer)\nRequest Body,None\nQuery Parameters,None\nDelete Type,Soft Delete\nSets Field,deletedAt\nReturns,Customer object with deletedAt timestamp\nRemoves Data,No - soft delete only\nCascade Delete,No\nLogged,Yes - via logCustomerApiTokenRequest\nReversible,Yes - requires database update\nSuccess Code,200\nError Codes,\"404 (Not Found), 401 (Unauthorized), 403 (Forbidden)\"\n\n</code></pre><hr />\n<h2 id=\"best-practices\">Best Practices</h2>\n<ol>\n<li><p><strong>Confirm Before Delete</strong>: Always confirm user intent before deleting</p>\n</li>\n<li><p><strong>Check Dependencies</strong>: Review customer's orders/data before deletion</p>\n</li>\n<li><p><strong>Audit Trail</strong>: Deletion is logged - ensure proper user context</p>\n</li>\n<li><p><strong>External Systems</strong>: Notify integrated systems (QuickBooks, Stripe, etc.) about deletion</p>\n</li>\n<li><p><strong>Recovery Plan</strong>: Have a process to restore accidentally deleted customers</p>\n</li>\n<li><p><strong>GDPR Compliance</strong>: If permanent deletion needed for compliance, additional steps required</p>\n</li>\n<li><p><strong>Batch Operations</strong>: For bulk deletions, consider creating a batch endpoint</p>\n</li>\n</ol>\n","urlObject":{"path":["customers","{{customerId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"de0263b7-3fe0-4321-8cc9-007c2f897b6e"}],"id":"7e4d11c9-2005-4cfd-8064-df91dd1f1022","_postman_id":"7e4d11c9-2005-4cfd-8064-df91dd1f1022","description":""},{"name":"Company","item":[{"name":"Get Company","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","// postman.setEnvironmentVariable(\"order_id\", jsonData._id);  "],"type":"text/javascript","packages":{}}}],"id":"b884bb8c-3f31-4afe-a9ef-311972e47e37","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/companies/{{companyId}}","description":"<p>Get company by his id</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>companyd</td>\n<td><strong>Stri</strong></td>\n<td></td>\n<td>hash id of customer</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["companies","{{companyId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"b884bb8c-3f31-4afe-a9ef-311972e47e37"},{"name":"Get Customers","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"companyId\", jsonData.data[0]._id);  "],"type":"text/javascript","packages":{}}}],"id":"bd464828-71a4-4c9f-83f7-991084d593c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/companies/all?page=1&query=\"\"&limit&25&ascending=1&page=1&byColumn=1&orderBy=companyName&withLastFollowUp=1","description":"<p>Get companies</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>page</td>\n<td><strong>Int</strong></td>\n<td></td>\n<td>page number  <br /></td>\n</tr>\n<tr>\n<td>query</td>\n<td>String</td>\n<td></td>\n<td>search by first/last name, email</td>\n</tr>\n<tr>\n<td>limit</td>\n<td>Int</td>\n<td></td>\n<td>limit list to response</td>\n</tr>\n<tr>\n<td>byColumn</td>\n<td>String</td>\n<td></td>\n<td>column name sorting</td>\n</tr>\n<tr>\n<td>ascending</td>\n<td>Int</td>\n<td></td>\n<td>1-ASC  <br />-1-DSC</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["companies","all"],"host":["https://api.mpowerpromo.com"],"query":[{"key":"page","value":"1"},{"key":"query","value":"\"\""},{"key":"limit","value":""},{"key":"25","value":""},{"key":"ascending","value":"1"},{"key":"page","value":"1"},{"key":"byColumn","value":"1"},{"key":"orderBy","value":"companyName"},{"key":"withLastFollowUp","value":"1"}],"variable":[]}},"response":[],"_postman_id":"bd464828-71a4-4c9f-83f7-991084d593c7"},{"name":"Create Company","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"companyId\", jsonData._id);  "],"type":"text/javascript","packages":{}}}],"id":"3b9ac4fb-00b1-4aab-bfc6-e45b34c8158f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{ \n            \"companyName\": \"New company\" \n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/companies","description":"<p>Create new company</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Body</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Validation</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>companyName</td>\n<td><strong>Stri</strong></td>\n<td></td>\n<td>required</td>\n<td>name of company</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["companies"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"3b9ac4fb-00b1-4aab-bfc6-e45b34c8158f"},{"name":"Edit Company","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":[""],"type":"text/javascript","packages":{}}}],"id":"a0881cca-72ec-48da-9aab-5f469339f819","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\n       \"companyName\": \"New company2\" \n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/companies/{{companyId}}","description":"<p>Edit company. Can update all fields</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>companyId</td>\n<td><strong>Stri</strong></td>\n<td></td>\n<td>company id</td>\n</tr>\n</tbody>\n</table>\n</div><div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Body</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Validation</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>companyName</td>\n<td>String</td>\n<td></td>\n<td>required</td>\n<td>name of company</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["companies","{{companyId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a0881cca-72ec-48da-9aab-5f469339f819"},{"name":"Delete Company","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":[""],"type":"text/javascript","packages":{}}}],"id":"23cb966a-52c7-4ce8-95d5-60d08fe9622d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/companies/{{companyId}}","description":"<p>Delete the company</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>companyId</td>\n<td><strong>Stri</strong></td>\n<td></td>\n<td>company hash id to delete</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["companies","{{companyId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"23cb966a-52c7-4ce8-95d5-60d08fe9622d"}],"id":"efe2509c-8683-4ea6-a408-fd76d64bdfa5","_postman_id":"efe2509c-8683-4ea6-a408-fd76d64bdfa5","description":""},{"name":"Shipping","item":[{"name":"Add Tracking","id":"40eaee24-f5ab-475b-9528-8277cb82121b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"{{apiToken}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"trackingNumber\": \"1ZRA05870382170881\",\n    \"carrier\": \"ups\",\n    \"shipmentId\": \"59717\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/orders/{{orderId}}/trackings","description":"<h3 id=\"track-order-shipment\">Track Order Shipment</h3>\n<p>This endpoint allows users to track the shipment of a specific order by providing tracking information. By sending a POST request to the <code>/orders/{{orderId}}/trackings</code> endpoint, users can update or add tracking details associated with their order.</p>\n<h4 id=\"request-parameters\">Request Parameters</h4>\n<p>The request body must be in JSON format and should include the following parameters:</p>\n<ul>\n<li><p><strong>trackingNumber</strong> (string): The unique identifier assigned to the shipment by the carrier. This is essential for tracking the package's status.</p>\n</li>\n<li><p><strong>carrier</strong> (string): The name of the shipping carrier responsible for delivering the package (e.g., UPS, FedEx). (optional)</p>\n</li>\n<li><p><strong>shipmentId</strong> (string): The identifier for the shipment, which may be used internally to track the shipment's progress. (optional)</p>\n</li>\n</ul>\n<h4 id=\"example-request-body\">Example Request Body</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"trackingNumber\": \"1ZRA05870382170881\",\n  \"carrier\": \"ups\",\n  \"shipmentId\": \"59717\"\n}\n\n</code></pre>\n<h4 id=\"response-structure\">Response Structure</h4>\n<p>Upon successful processing of the request, the API will return a response indicating the status of the tracking update. The response typically includes confirmation of the tracking information added or updated, along with any relevant metadata about the order and tracking status.</p>\n<p>Ensure that all required parameters are included in the request to avoid errors and ensure proper tracking of the shipment.</p>\n","urlObject":{"path":["orders","{{orderId}}","trackings"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"40eaee24-f5ab-475b-9528-8277cb82121b"}],"id":"bac522fe-ed59-4309-826a-4ba5837882ee","_postman_id":"bac522fe-ed59-4309-826a-4ba5837882ee","description":""},{"name":"Stores","item":[{"name":"Get Stores","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"storeId\", jsonData.data[0]._id);  "],"type":"text/javascript","packages":{}}}],"id":"ec14a1b6-d88e-4713-95a3-ff7459870c39","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/stores?query=\"\"&limit=25=ascending=1&page=1&byColumn=0&orderBy=\"storeName\"&project=[\"storeName\",\"storeUrl\",\"isTemplate\"]","description":"<p>Get product</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td><strong>Stri</strong></td>\n<td></td>\n<td>hash id or slug</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["stores"],"host":["https://api.mpowerpromo.com"],"query":[{"key":"query","value":"\"\""},{"key":"limit","value":"25=ascending=1"},{"key":"page","value":"1"},{"key":"byColumn","value":"0"},{"key":"orderBy","value":"\"storeName\""},{"key":"project","value":"[\"storeName\",\"storeUrl\",\"isTemplate\"]"}],"variable":[]}},"response":[],"_postman_id":"ec14a1b6-d88e-4713-95a3-ff7459870c39"},{"name":"Create Store","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"storeId\", jsonData.model._id);  "],"type":"text/javascript","packages":{}}}],"id":"9d6cd39c-c890-4be3-baf2-60c1cae78073","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\n    \"countries\": [],\n    \"HeadTags\": [\n        {\n            \"headTag\": {\n                \"isBootstrap\": true,\n                \"tagType\": \"link\",\n                \"description\": \"Bootstrap Theme\",\n                \"rel\": \"stylesheet\",\n                \"href\": \"https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css\"\n            },\n            \"tagType\": \"link\"\n        }\n    ],\n    \"isActive\": true,\n    \"phone\": {\n        \"phoneNumber\": \"111-111-1111\",\n        \"countryCode\": \"1\",\n        \"extension\": null,\n        \"phoneType\": null\n    },\n    \"storeName\": \"tempcooolstore\",\n    \"logoUrl\": \"\",\n    \"redirectURLs\": [], \n    \"storeUrl\": \"tempcooolstore.mpowerpromo.com\" \n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/stores","description":"<p>Create store</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Body</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>storeName</td>\n<td><strong>String</strong></td>\n<td></td>\n<td>name of the store</td>\n</tr>\n<tr>\n<td>storeUrl</td>\n<td>String</td>\n<td></td>\n<td>url of the store</td>\n</tr>\n<tr>\n<td>isActive</td>\n<td>Boolean</td>\n<td>false</td>\n<td>the store availabaility</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["stores"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"9d6cd39c-c890-4be3-baf2-60c1cae78073"},{"name":"Sync with Brand SSL","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":["var jsonData = JSON.parse(responseBody);\r","postman.setEnvironmentVariable(\"storeId\", jsonData.model._id);  "],"type":"text/javascript","packages":{}}}],"id":"4566631d-15e3-4e30-abc8-71f843217aef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\"domain\":\"gopromonow.com\"}","options":{"raw":{"language":"json"}}},"url":"https://www.brandssl.io/api/7400901801088198/tls","description":"<p>Create store</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Body</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>storeName</td>\n<td><strong>String</strong></td>\n<td></td>\n<td>name of the store</td>\n</tr>\n<tr>\n<td>storeUrl</td>\n<td>String</td>\n<td></td>\n<td>url of the store</td>\n</tr>\n<tr>\n<td>isActive</td>\n<td>Boolean</td>\n<td>false</td>\n<td>the store availabaility</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["api","7400901801088198","tls"],"host":["www","brandssl","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"4566631d-15e3-4e30-abc8-71f843217aef"},{"name":"Edit Store","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":[""],"type":"text/javascript","packages":{}}}],"id":"a56484ef-c816-43fb-9e83-d808e22ccdfb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"{\n    \"_id\":\"63a5e6f3f04e641d0276d9c6\",\n    \"data\":{\n        \"storeName\":\"temp new name\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/stores","description":"<p>Edit store</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Body</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>_id</td>\n<td><strong>String</strong></td>\n<td></td>\n<td>hash id or of store</td>\n</tr>\n<tr>\n<td>storeName</td>\n<td>String</td>\n<td></td>\n<td>store name</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["stores"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a56484ef-c816-43fb-9e83-d808e22ccdfb"},{"name":"Delete Store","event":[{"listen":"test","script":{"id":"18e5c3a2-8c23-49a0-94ad-e5b69bfde53d","exec":[""],"type":"text/javascript","packages":{}}}],"id":"c0a14959-14e5-4ab9-b81b-bd1dad3c302d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"authorization","value":"{{apiToken}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api.mpowerpromo.com/stores/{{storeId}}","description":"<p>Get product</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td><strong>Stri</strong></td>\n<td></td>\n<td>hash id or slug</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["stores","{{storeId}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"c0a14959-14e5-4ab9-b81b-bd1dad3c302d"},{"name":"New Request","id":"f35dcfde-6c7f-452c-b2ed-cadc7eae34d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"","urlObject":{"query":[],"variable":[]}},"response":[],"_postman_id":"f35dcfde-6c7f-452c-b2ed-cadc7eae34d2"}],"id":"93e3d0ba-5ff2-4ba5-a48b-762213d5d9be","_postman_id":"93e3d0ba-5ff2-4ba5-a48b-762213d5d9be","description":""},{"name":"PromoStandards","item":[{"name":"getProductData","id":"fd685b54-7dcb-42de-b796-91ce69dac8d8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/xml"},{"key":"SOAPaction","value":"getProduct"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:tns=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">\r\n  <soap:Body>\r\n    <tns:GetProductRequest>\r\n      <ns3:wsVersion xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">2.0.0</ns3:wsVersion>\r\n      <ns3:id xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">{{ps_id}}</ns3:id>\r\n      <ns3:password xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">{{ps_password}}</ns3:password>\r\n      <ns3:productId xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">MCB01823</ns3:productId>\r\n      <ns3:localizationCountry xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">US</ns3:localizationCountry>\r\n      <ns3:localizationLanguage xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">en</ns3:localizationLanguage>      \r\n    </tns:GetProductRequest>\r\n  </soap:Body>\r\n</soap:Envelope>","options":{"raw":{"language":"xml"}}},"url":"https://api.mpowerpromo.com/ps/{{supplierCode}}","description":"<p>Function: getProduct()</p>\n<p>This function will provide the detail product data based on a specific ProductId or any additional optional subset filtering provided at the request</p>\n<p><em><strong>Request url params</strong></em> </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>supplierCode</td>\n<td><b>String</b></td>\n<td></td>\n<td><code>CNB,AAA,AL</code></td>\n</tr>\n</tbody>\n</table>\n</div><div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>wsVersion</td>\n<td><b>String</b></td>\n<td></td>\n<td>The Standard Version of the Web Service being referenced.  Values are enumerated {1.0.0}</td>\n</tr>\n<tr>\n<td>id</td>\n<td><b>String</b></td>\n<td></td>\n<td>The customer Id or any other agreed upon Id.</td>\n</tr>\n<tr>\n<td>password</td>\n<td><b>String</b></td>\n<td></td>\n<td>The password associated with the Id</td>\n</tr>\n<tr>\n<td>productId</td>\n<td><b>String</b></td>\n<td></td>\n<td>Item’s ID</td>\n</tr>\n<tr>\n<td>localizationCountry</td>\n<td><b>String</b></td>\n<td></td>\n<td>ISO 3166-1 Alpha 2 code for Country Example: CA=Canada; US=United States</td>\n</tr>\n<tr>\n<td>localizationLanguage</td>\n<td><b>String</b></td>\n<td></td>\n<td>ISO 639-1 Alpha 2 code for Language Example: en = English; fr = French</td>\n</tr>\n</tbody>\n</table>\n</div><p><em><strong>Response</strong></em> </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ProductData</td>\n<td><b>OBJECT</b></td>\n<td>Product data object</td>\n</tr>\n<tr>\n<td>ErrorMessage999</td>\n<td><b>OBJECT</b></td>\n<td>Response for any error requiring notification to requestor</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["ps","{{supplierCode}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"fd685b54-7dcb-42de-b796-91ce69dac8d8"},{"name":"getProductsSellable","id":"e9f1a9d4-b9f8-4b43-acce-1dbf711bd372","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/xml"},{"key":"SOAPaction","value":"getProductSellable"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:tns=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">\r\n  <soap:Body>\r\n    <tns:GetProductSellableRequest>\r\n      <ns3:wsVersion xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">2.0.0</ns3:wsVersion>\r\n      <ns3:id xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">{{ps_id}}</ns3:id>\r\n      <ns3:password xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">{{ps_password}}</ns3:password>\r\n      <ns3:isSellable xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">true</ns3:isSellable>  \r\n    </tns:GetProductSellableRequest>\r\n  </soap:Body>\r\n</soap:Envelope>","options":{"raw":{"language":"xml"}}},"url":"https://api.mpowerpromo.com/ps/{{supplierCode}}","description":"<p>getProductSellable()</p>\n<p>This function will provide a list of Product Ids and optional Part Ids along with their status of available to sell (Sellable TRUE or FALSE).</p>\n<p><em><strong>Request url params</strong></em> </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>supplierCode</td>\n<td><b>String</b></td>\n<td></td>\n<td><code>CNB,AAA,AL</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><em><strong>Request body params</strong></em> </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>wsVersion</td>\n<td><b>String</b></td>\n<td></td>\n<td>The Standard Version of the Web Service being referenced.  Values are enumerated {1.0.0}</td>\n</tr>\n<tr>\n<td>id</td>\n<td><b>String</b></td>\n<td></td>\n<td>The customer Id or any other agreed upon Id.</td>\n</tr>\n<tr>\n<td>password</td>\n<td><b>String</b></td>\n<td></td>\n<td>The password associated with the Id</td>\n</tr>\n<tr>\n<td>productId</td>\n<td><b>String</b></td>\n<td></td>\n<td>Item’s ID</td>\n</tr>\n<tr>\n<td>partId</td>\n<td><b>String</b></td>\n<td></td>\n<td>The associated part</td>\n</tr>\n<tr>\n<td>isSellable</td>\n<td><b>Boolean</b></td>\n<td></td>\n<td>Indicates if sellable</td>\n</tr>\n</tbody>\n</table>\n</div><p><em><strong>Response</strong></em> </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ProductSellableArray</td>\n<td><b>OBJECT ARRAY</b></td>\n<td>Array listing of all product and part specific Ids along with sellable status.  An array of ProductSellable objects.</td>\n</tr>\n<tr>\n<td>ErrorMessage999</td>\n<td><b>OBJECT</b></td>\n<td>Response for any error requiring notification to requestor</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["ps","{{supplierCode}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"e9f1a9d4-b9f8-4b43-acce-1dbf711bd372"},{"name":"getFobPoints","id":"89014a59-9616-4897-bd27-3aac83d32292","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/xml"},{"key":"SOAPaction","value":"getFobPoints"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:tns=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">\r\n    <soap:Body>\r\n        <tns:GetFobPointsRequest>\r\n            <ns3:wsVersion xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">1.0.0</ns3:wsVersion>\r\n            <ns3:id xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">{{ps_id}}</ns3:id>\r\n            <ns3:password xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">{{ps_password}}</ns3:password>\r\n            <ns3:productId xmlns:ns3=\"http://www.promostandards.org/WSDL/PricingAndConfiguration/1.0.0/SharedObjects/\">LQK00041</ns3:productId>\r\n            <ns3:localizationCountry xmlns:ns3=\"http://www.promostandards.org/WSDL/PricingAndConfiguration/1.0.0/SharedObjects/\">US</ns3:localizationCountry>\r\n            <ns3:localizationLanguage xmlns:ns3=\"http://www.promostandards.org/WSDL/PricingAndConfiguration/1.0.0/SharedObjects/\">en</ns3:localizationLanguage>\r\n        </tns:GetFobPointsRequest>\r\n    </soap:Body>\r\n</soap:Envelope>","options":{"raw":{"language":"xml"}}},"url":"https://api.mpowerpromo.com/ps/{{supplierCode}}","description":"<p>Function: getFobPoints()</p>\n<p>This function will return basic information about FOB points for a given product.</p>\n<p><em><strong>Request url params</strong></em> </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>supplierCode</td>\n<td><b>String</b></td>\n<td></td>\n<td><code>CNB,AAA,AL</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><em><strong>Request body params</strong></em> </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>wsVersion</td>\n<td><b>String</b></td>\n<td></td>\n<td>The Standard Version of the Web Service being referenced.  Values are enumerated {1.0.0}</td>\n</tr>\n<tr>\n<td>id</td>\n<td><b>String</b></td>\n<td></td>\n<td>The customer Id or any other agreed upon Id.</td>\n</tr>\n<tr>\n<td>password</td>\n<td><b>String</b></td>\n<td></td>\n<td>The password associated with the Id</td>\n</tr>\n<tr>\n<td>productId</td>\n<td><b>String</b></td>\n<td></td>\n<td>Item’s ID</td>\n</tr>\n<tr>\n<td>localizationCountry</td>\n<td><b>String</b></td>\n<td></td>\n<td>ISO 3166-1 Alpha 2 code for Country Example: CA=Canada; US=United States</td>\n</tr>\n<tr>\n<td>localizationLanguage</td>\n<td><b>String</b></td>\n<td></td>\n<td>ISO 639-1 Alpha 2 code for Language Example: en = English; fr = French</td>\n</tr>\n</tbody>\n</table>\n</div><p><em><strong>Response</strong></em> </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>FobPointArray</td>\n<td><b>OBJECT ARRAY</b></td>\n<td>Array of fob Points.</td>\n</tr>\n<tr>\n<td>ErrorMessage999</td>\n<td><b>OBJECT</b></td>\n<td>Response for any error requiring notification to requestor</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["ps","{{supplierCode}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"89014a59-9616-4897-bd27-3aac83d32292"},{"name":"getConfigurationAndPricing","id":"8a4bb456-325b-4e97-a09a-67416f3738dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/xml"},{"key":"SOAPaction","value":"getConfigurationAndPricing"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:tns=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">\r\n    <soap:Body>\r\n        <tns:GetConfigurationAndPricingRequest>\r\n            <ns3:wsVersion xmlns:ns3=\"http://www.promostandards.org/WSDL/PricingAndConfiguration/1.0.0/SharedObjects/\">1.0.0</ns3:wsVersion>\r\n            <ns3:id xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">{{ps_id}}</ns3:id>\r\n            <ns3:password xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">{{ps_password}}</ns3:password>\r\n            <ns3:productId xmlns:ns3=\"http://www.promostandards.org/WSDL/PricingAndConfiguration/1.0.0/SharedObjects/\">LQK00041</ns3:productId>\r\n            <ns3:currency xmlns:ns3=\"http://www.promostandards.org/WSDL/PricingAndConfiguration/1.0.0/SharedObjects/\">USD</ns3:currency>\r\n            <ns3:fobId xmlns:ns3=\"http://www.promostandards.org/WSDL/PricingAndConfiguration/1.0.0/SharedObjects/\">Stafford</ns3:fobId>\r\n            <ns3:priceType xmlns:ns3=\"http://www.promostandards.org/WSDL/PricingAndConfiguration/1.0.0/SharedObjects/\">List</ns3:priceType>\r\n            <ns3:localizationCountry xmlns:ns3=\"http://www.promostandards.org/WSDL/PricingAndConfiguration/1.0.0/SharedObjects/\">US</ns3:localizationCountry>\r\n            <ns3:localizationLanguage xmlns:ns3=\"http://www.promostandards.org/WSDL/PricingAndConfiguration/1.0.0/SharedObjects/\">en</ns3:localizationLanguage>\r\n            <ns3:configurationType xmlns:ns3=\"http://www.promostandards.org/WSDL/PricingAndConfiguration/1.0.0/SharedObjects/\">Blank</ns3:configurationType>\r\n        </tns:GetConfigurationAndPricingRequest>\r\n    </soap:Body>\r\n</soap:Envelope>","options":{"raw":{"language":"xml"}}},"url":"https://api.mpowerpromo.com/ps/{{supplierCode}}","description":"<p>Function: GetConfigurationAndPricing()</p>\n<p>This function will provide the pricing and configuration of a product.</p>\n<p><em><strong>Request body params</strong></em> </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>wsVersion</td>\n<td><b>String</b></td>\n<td></td>\n<td>The Standard Version of the Web Service being referenced.  Values are enumerated {1.0.0}</td>\n</tr>\n<tr>\n<td>id</td>\n<td><b>String</b></td>\n<td></td>\n<td>The customer Id or any other agreed upon Id.</td>\n</tr>\n<tr>\n<td>password</td>\n<td><b>String</b></td>\n<td></td>\n<td>The password associated with the Id</td>\n</tr>\n<tr>\n<td>productId</td>\n<td><b>String</b></td>\n<td></td>\n<td>Item’s ID</td>\n</tr>\n<tr>\n<td>partId</td>\n<td><b>String</b></td>\n<td></td>\n<td>The partId</td>\n</tr>\n<tr>\n<td>currency</td>\n<td><b>String</b></td>\n<td></td>\n<td>The unit of currency that the pricing should be returned in ISO4217 “CODE” format.</td>\n</tr>\n<tr>\n<td>fobId</td>\n<td><b>String</b></td>\n<td></td>\n<td>The  fobId of the FOB point</td>\n</tr>\n<tr>\n<td>priceType</td>\n<td><b>String</b></td>\n<td></td>\n<td>The type of pricing that should be returned. Values are enumerated: {Customer, List, Net }</td>\n</tr>\n<tr>\n<td>configurationType</td>\n<td><b>String</b></td>\n<td></td>\n<td>The type of configuration of the product to be returned. Values are enumerated: {Blank, Decorated</td>\n</tr>\n<tr>\n<td>localizationCountry</td>\n<td><b>String</b></td>\n<td></td>\n<td>ISO 3166-1 Alpha 2 code for Country Example: CA=Canada; US=United States</td>\n</tr>\n<tr>\n<td>localizationLanguage</td>\n<td><b>String</b></td>\n<td></td>\n<td>ISO 639-1 Alpha 2 code for Language Example: en = English; fr = French</td>\n</tr>\n</tbody>\n</table>\n</div><p><em><strong>Response</strong></em> </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Configuration</td>\n<td><b>OBJECT</b></td>\n<td>An object to hold Configuration data..</td>\n</tr>\n<tr>\n<td>ErrorMessage999</td>\n<td><b>OBJECT</b></td>\n<td>Response for any error requiring notification to requestor</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["ps","{{supplierCode}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"8a4bb456-325b-4e97-a09a-67416f3738dd"},{"name":"getMedia","id":"f5497ab3-3879-4ab3-a484-a099170a1e90","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/xml"},{"key":"SOAPaction","value":"getMediaContent"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:tns=\"http://www.promostandards.org/WSDL/MediaService/1.0.0/\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://www.promostandards.org/WSDL/MediaService/1.0.0/SharedObjects/\">\r\n    <soap:Body>\r\n        <tns:GetMediaContentRequest>\r\n            <ns3:wsVersion xmlns:ns3=\"http://www.promostandards.org/WSDL/PricingAndConfiguration/1.0.0/SharedObjects/\">1.1.0</ns3:wsVersion>\r\n            <ns3:id xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">{{ps_id}}</ns3:id>\r\n            <ns3:password xmlns:ns3=\"http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/\">{{ps_password}}</ns3:password>\r\n            <ns2:mediaType xmlns:ns2=\"http://www.promostandards.org/WSDL/MediaService/1.0.0/SharedObjects/\">Image</ns2:mediaType>\r\n            <ns2:productId xmlns:ns2=\"http://www.promostandards.org/WSDL/MediaService/1.0.0/SharedObjects/\">LQK00041</ns2:productId>\r\n            <ns2:localizationCountry xmlns:ns2=\"http://www.promostandards.org/WSDL/MediaService/1.0.0/SharedObjects/\">US</ns2:localizationCountry>\r\n            <ns2:localizationLanguage xmlns:ns2=\"http://www.promostandards.org/WSDL/MediaService/1.0.0/SharedObjects/\">en</ns2:localizationLanguage>\r\n        </tns:GetMediaContentRequest>\r\n    </soap:Body>\r\n</soap:Envelope>","options":{"raw":{"language":"xml"}}},"url":"https://api.mpowerpromo.com/ps/{{supplierCode}}","description":"<p>Function: getMediaContent()</p>\n<p>Summary: Provides a mechanism to get a media content by specific parameters like (last change date, product id, part id, media type, etc).  This allows the consumer of the service to obtain specific media content for their needs.</p>\n<p><em><strong>Request url params</strong></em> </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>supplierCode</td>\n<td><b>String</b></td>\n<td></td>\n<td><code>CNB,AAA,AL</code></td>\n</tr>\n</tbody>\n</table>\n</div><div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Default</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>wsVersion</td>\n<td><b>String</b></td>\n<td></td>\n<td>The Standard Version of the Web Service being referenced.  Values are enumerated {1.0.0}</td>\n</tr>\n<tr>\n<td>id</td>\n<td><b>String</b></td>\n<td></td>\n<td>The customer Id or any other agreed upon Id.</td>\n</tr>\n<tr>\n<td>password</td>\n<td><b>String</b></td>\n<td></td>\n<td>The password associated with the Id</td>\n</tr>\n<tr>\n<td>productId</td>\n<td><b>String</b></td>\n<td></td>\n<td>Item’s ID</td>\n</tr>\n<tr>\n<td>partId</td>\n<td><b>String</b></td>\n<td></td>\n<td>the part Id associated to the product Id</td>\n</tr>\n<tr>\n<td>mediaType</td>\n<td><b>String</b></td>\n<td></td>\n<td>The type of media to return, Image,Videp,Document,Audio</td>\n</tr>\n</tbody>\n</table>\n</div><p><em><strong>Response</strong></em> </p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Param</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>GetMediaContentDetailsResponse</td>\n<td><b>OBJECT</b></td>\n<td>Product data object</td>\n</tr>\n<tr>\n<td>ErrorMessage999</td>\n<td><b>OBJECT</b></td>\n<td>An array of media content objects</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["ps","{{supplierCode}}"],"host":["https://api.mpowerpromo.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"f5497ab3-3879-4ab3-a484-a099170a1e90"}],"id":"bd2bd61c-8995-4466-bf55-1e2c7df2ee10","_postman_id":"bd2bd61c-8995-4466-bf55-1e2c7df2ee10","description":""}],"event":[{"listen":"prerequest","script":{"id":"6055f646-27b0-4596-82cb-38e2a5a0ea14","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6ade3a44-0c55-4980-b586-9795411a8857","type":"text/javascript","exec":[""]}}],"variable":[{"id":"ecc6b3be-ec7f-48f2-8921-193b98cf88cc","key":"host","value":"https://api.mpowerpromo.com"}]}