{
  "openapi": "3.0.4",
  "info": {
    "title": "Randmar.io API",
    "description": "\n## Integration authentication\n\n### Client ID versus Application (Partner) ID\n\n| Identifier | Meaning | Used in |\n| --- | --- | --- |\n| Client ID (`client_id`) | Identifies the integration authenticating: its exact `KeyName`, or registered store domain for Shopify credentials. | OAuth token requests and Swagger's **Authorize** dialog. |\n| Application ID / Partner ID | Identifies the Randmar business account. In partner-account contexts, `ApplicationId`, `{applicationId}`, `{routeApplicationId}`, and `{routePartnerId}` refer to this account identifier. | Account routes such as `/V4/Partner/{applicationId}/Account`. |\n\nOne partner can own multiple integration keys with different Client IDs and secrets, all associated with the same Application (Partner) ID. For example, a key named `warehouse-sync` belonging to illustrative account `PARTNER_EXAMPLE` authenticates with `client_id=warehouse-sync`; its token is then used for `GET /V4/Partner/PARTNER_EXAMPLE/Account`. These identifiers are not interchangeable. Access to the target account remains subject to the endpoint's authorization rules.\n\n### Request and use a token\n\nRequest an access token with `POST https://auth.randmar.io/connect/token` using `Content-Type: application/x-www-form-urlencoded`:\n\n| Field | Value |\n| --- | --- |\n| `grant_type` | `client_credentials` |\n| `client_id` | The integration's exact registered name: `KeyName` for a named integration key, or the registered store domain for a Shopify integration (for example, `example-store.myshopify.com`). |\n| `client_secret` | The secret belonging to that integration. |\n\n**The partner application ID is an account/route identifier, not the OAuth `client_id` for integration keys.** Use it in routes such as `/V4/Partner/{applicationId}/IntegrationKeys`, not in the token request. For Shopify, use the registered `.myshopify.com` hostname without `https://` or a path; do not substitute a custom storefront domain.\n\nIn Swagger's **Authorize** dialog, enter these same `client_id` and `client_secret` values. Use the returned `access_token` in API requests as `Authorization: Bearer <access_token>`.\n\nIf authentication reports `client id and/or client secret are invalid`, verify the registered integration name before replacing or renewing the secret. For named integration keys, `GET /V4/Partner/{applicationId}/IntegrationKeys` lists `KeyName` and expiration metadata, but does not return secrets. Do not ask users to paste credentials into chat or logs.\n\n            # Randmar API V4\n\n            ## Overview\n              Randmar is a leading Canadian * *Technology - First Distributor and Dropshipping Supplier * *.This API provides programmatic access to Randmar's \"Distribution-as-a-Service\" platform, enabling Manufacturers, Resellers, and Partners to automate their e-commerce operations.\n\n              The API acts as a bridge between:\n              ***Resellers:**Online stores(specifically Shopify) and IT VARs who sell products without holding inventory.\n              * **Manufacturers:**Brands looking for distribution and logistics handling in Canada.\n\n              ## Key Capabilities for AI Agents\n\n            ### 1. Product & Inventory Management\n              * **Real - time Stock:**Access live inventory levels across multiple Canadian warehouses(Montreal, Toronto, Vancouver, Calgary, Halifax).\n              * **Catalog Access:**Retrieve detailed product metadata,\n                    including specs,\n                    pricing,\n                    and opportunities(promotions).\n              * **Media Assets:**Fetch and manage product images,\n                    3D models,\n                    and generated video content.\n\n              ### 2. Dropshipping & Order Fulfillment\n              * **Cart & Checkout:**Programmatically build shopping carts(`/ Cart`) and convert them into active orders(`/ Cart / ProcessNew`).\n              * **Direct Fulfillment:**Orders placed via API are shipped directly to the end - consumer(blind dropshipping).\n              * **Document Management:**Retrieve invoices,\n                    tracking numbers,\n                    and shipping slips.\n\n              ### 3. Shopify Integration\n              * **Sync:**Dedicated endpoints(`/ V4 / Shopify`) to synchronize products,\n                    inventory,\n                    and order status directly with Shopify stores.\n              * **Automation:**intended to power the \"Randmar Connect\" Shopify application.\n\n              ### 4. Generative AI & Media Tools\n              * **Content Generation:**Endpoints(`/ Generation`) to create marketing text,\n                    images,\n                    and \"Google Grounded\" responses.\n              * **Video Creation:**Tools to generate short - form videos(`/ Media / Shorts`) from product data or long - form content.\n\n              ## Usage Context\n              This API is the backbone of Randmar's ecosystem. AI agents can use it to act as a **Virtual Supply Chain Manager**�checking stock before answering customer queries, placing orders automatically upon sale, or generating marketing assets for new product listings.\n        ",
    "termsOfService": "https://www.randmar.io/terms-and-conditions",
    "contact": {
      "name": "Randmar Dashboard",
      "url": "https://dashboard.randmar.io/"
    },
    "version": "V4"
  },
  "paths": {
    "/V4/Shopify/{shopifyHostName}/Account": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Gets account information for a reseller's Shopify store.",
        "description": "Retrieves details about the reseller's account linked to the specified Shopify host name. \r\nReturns a single account object with Shop and, when available, Locations, Scopes, and Webhooks.\r\nSupplemental Shopify queries may fail without preventing the main account response.",
        "parameters": [
          {
            "name": "shopifyHostName",
            "in": "path",
            "description": "The host name of the Shopify store (e.g., 'your-store.myshopify.com').",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The reseller's account information.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShopifyAccountInformation"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The request is not authorized (e.g., invalid Shopify credentials).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "The linked account or Shopify shop could not be retrieved."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Shopify/{shopifyHostName}/Account/Synchronization/{synchronizationType}": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates a specific synchronization setting for the Shopify store.",
        "description": "Prefixes the supplied type with Sync and updates the corresponding store flag. First validates the Randmar fulfillment location and read_fulfillments scope; that validation can create or rename a fulfillment service. A successful flag update does not mean synchronization has completed.",
        "parameters": [
          {
            "name": "shopifyHostName",
            "in": "path",
            "description": "The host name of the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "synchronizationType",
            "in": "path",
            "description": "Orders or ProductInventory, producing SyncOrders or SyncProductInventory. Products is not a supported flag.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query boolean: true to enable or false to disable.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if updated; false for an unsupported flag, unavailable account/location, or failed update."
          },
          "401": {
            "description": "The request is not authorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Shopify/{shopifyHostName}/Account/{propertyName}": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates a boolean property of the reseller's account.",
        "description": "Updates one supported boolean store setting. DefaultCustomization requires an administrator. Inspect the returned boolean because refusals are returned as HTTP 200 with false.",
        "parameters": [
          {
            "name": "shopifyHostName",
            "in": "path",
            "description": "The host name of the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "propertyName",
            "in": "path",
            "description": "SyncOrders, ShipComplete, SyncProductInventory, or DefaultCustomization (case-insensitive).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query boolean value for the property.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the property was successfully updated."
          },
          "401": {
            "description": "The request is not authorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Shopify/{shopifyHostName}/Account/DefaultShippingSlipComment": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates the default shipping slip comment for the account.",
        "description": "Sets a new default comment that will appear on shipping slips for orders from this Shopify store.",
        "parameters": [
          {
            "name": "shopifyHostName",
            "in": "path",
            "description": "The host name of the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "URL-encoded query text for the default shipping-slip comment.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the comment was successfully updated."
          },
          "401": {
            "description": "The request is not authorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Shopify/{shopifyHostName}/Account/AdsGrowthStrategy": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates the ads growth strategy for the account.",
        "description": "Supported values are `Fast, but more expensive`, `Breakeven`, and `Slow, but profitable`.",
        "parameters": [
          {
            "name": "shopifyHostName",
            "in": "path",
            "description": "The host name of the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "URL-encoded query value using one of the listed strategies; matching is case-insensitive.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if updated; false for an unsupported strategy, unavailable account, or failed write."
          },
          "401": {
            "description": "The request is not authorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Shopify/{shopifyHostName}/Account/AdvertisingBudgetPerDay": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates the daily advertising budget for the account.",
        "description": "Stores the account's AdvertisingBudgetPerDay setting. Negative budgets return false; zero is permitted. This endpoint does not directly mutate an advertising-platform campaign budget.",
        "parameters": [
          {
            "name": "shopifyHostName",
            "in": "path",
            "description": "The host name of the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Nonnegative decimal budget supplied as a query value.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if stored; false for a negative value, unavailable account, or failed write."
          },
          "401": {
            "description": "The request is not authorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Shopify/{shopifyHostName}/Account/Link": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Links a Shopify store to an existing Randmar reseller account.",
        "description": "Looks up the reseller using its account ID and postal code, updates the registered store's ApplicationId, and notifies the Shopify operations channel. Authentication is required, but this action does not call the store-host validation used by the other account actions.",
        "parameters": [
          {
            "name": "shopifyHostName",
            "in": "path",
            "description": "The host name of the Shopify store to link.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "applicationId",
            "in": "query",
            "description": "The reseller's unique ID on the randmar.io platform.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postalCode",
            "in": "query",
            "description": "The reseller's postal code, used for verification.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if linked; false if the reseller lookup fails, the association already exists, or the write fails."
          },
          "400": {
            "description": "The provided information (host name, application ID, or postal code) is invalid or missing.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Account/General": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Gets general account information for a specific reseller.",
        "description": "Retrieves a comprehensive profile for the reseller identified by routeResellerId,\r\nwith an option to include detailed specifications.\r\nUse this when you need account standing, contact data, or flags (for example on-hold) before placing orders or changing billing.\r\nRelated: `GET V4/Reseller/{routeResellerId}/Billing` for balances and credit.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize account name, status, and any on-hold or credit flags rather than dumping the full profile.</description></item><item><description>If the account appears on hold, warn the user that checkout (`POST .../Cart/ProcessNew/{cartName}`) may fail until the hold is resolved.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Whether to include detailed specifications in the response. Defaults to true.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The reseller's account information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reseller"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Gets a partner's general account information. Also use as the onboarding checkpoint.",
        "description": "Returns the partner shell plus role flags and billing.\r\nDuring onboarding, inspect:\r\n<list type=\"bullet\"><item><description>`BillingInformation` — must be non-null before step 3 (activate).</description></item><item><description>`IsReseller`, `IsManufacturer`, `IsVendor`, `IsSalesAgency` — must match the intended role before step 4 (terms).</description></item></list>\r\n<b>AI Agent guidance (required)</b><list type=\"bullet\"><item><description>Call this after every onboarding write before proceeding.</description></item><item><description>\r\nAlso call `GET V4/Partner/{applicationId}/Users`. Recommend filling any user whose\r\n`Name`, `Role`, or `Language` is null or empty via\r\n`POST V4/Partner/{applicationId}/User/{emailAddress}/{fieldName}` after confirmation (do not invent values).\r\n</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The partner's account information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/{fieldName}": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates a specific property of a partner's profile.",
        "description": "This is a general-purpose endpoint for updating a single field on a partner's account.\r\nOnly PublicName, About, VoiceName, VoiceStyle, and SceneName are accepted (case-sensitive).\r\nNull values become empty strings. PublicName is also sent to the accounting reseller record;\r\nsuccessful partner updates are logged and announced in the internal interconnected chat space.\r\nUse this for one-off profile fields; dedicated endpoints exist for About, billing, role activation, tax, shipping, and pricing.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back `applicationId`, `fieldName`, and `newValue` and obtain explicit confirmation before calling.</description></item><item><description>Use only the listed field names; other model properties are not writable here.</description></item><item><description>Do not use this for billing, role activation, credit limit, tax exemption, shipping profile, or price profile.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldName",
            "in": "path",
            "description": "PublicName, About, VoiceName, VoiceStyle, or SceneName, with exact casing.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new value for the property.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON true: the partner update succeeded."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Unsupported field or unsuccessful update."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/About": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates the About section of a partner's profile.",
        "description": "This endpoint allows updating the detailed 'About' description for a partner's profile.\r\nThe 'About' section typically contains plain text content that describes the partner's\r\nbusiness, services, and other relevant information.\r\nUse this partner-level endpoint for About text. The legacy Manufacturer/About action currently targets an unsupported field and returns 400.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the target partner and read back the About text before saving.</description></item><item><description>Do not invent a company story; use content the user supplied or already approved.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The new text content for the About section.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "string"
              }
            },
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "text/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/*+json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns true if the About section was successfully updated."
          },
          "401": {
            "description": "The user is not authorized to update this partner's profile.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Logo": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Retrieves a partner's logo.",
        "description": "This public endpoint provides access to a partner's logo image. It can optionally resize the image.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "width",
            "in": "query",
            "description": "Optional width to resize the logo.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "height",
            "in": "query",
            "description": "Optional height to resize the logo.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "align",
            "in": "query",
            "description": "Optional alignment for resizing.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The partner's logo image file.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "The partner or their logo was not found.",
            "content": {
              "image/png": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Uploads a logo for a partner.",
        "description": "This endpoint allows uploading a new logo image for a partner's profile as multipart form data.\r\nReplaces the existing logo. To check existence afterward, use the public `GET .../Account/Logo/Exists` route.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the target partner ID and that the file is the intended logo before uploading.</description></item><item><description>Do not upload a placeholder, unrelated, or generated image unless the user asked for that specific file.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "The logo file to upload.",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the upload was successful."
          },
          "204": {
            "description": "No file was provided in the request."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Logo/Exists": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Checks if a partner's logo exists.",
        "description": "This public endpoint verifies the existence of a logo for a given partner.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the logo exists."
          }
        },
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Video": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Retrieves a partner's promotional video.",
        "description": "This public endpoint provides access to a partner's video. If no specific video exists for the partner, it redirects to a default Randmar video.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The partner's video file.",
            "content": {
              "video/mp4": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "302": {
            "description": "Redirects to the default video if the partner-specific video is not found."
          }
        },
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Uploads a promotional video for a partner.",
        "description": "This endpoint allows uploading a new video for a partner's profile as multipart form data.\r\nReplaces the existing promotional video.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the target partner ID and that the file is the intended promotional video before uploading.</description></item><item><description>Do not upload an unrelated clip unless the user explicitly selected it.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "The video file to upload.",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the upload was successful."
          },
          "204": {
            "description": "No file was provided in the request."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Video/Exists": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Checks if a partner's video exists.",
        "description": "This public endpoint verifies the existence of a promotional video for a given partner.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the video exists."
          }
        },
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Manufacturer": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Gets manufacturer-specific account information and settings.",
        "description": "This endpoint provides access to manufacturer-specific data and configuration settings.\r\nIt can be used in several scenarios:\r\n1. By a user to view their own manufacturer role-specific data and settings.\r\n2. By a reseller to view information about a manufacturer they are partnered with.\r\n3. By an agency to view information for a manufacturer they manage.\r\nThe withSpecification parameter determines whether to include detailed specification\r\ninformation in the response. Setting it to false can improve performance for cases\r\nwhere the detailed specifications aren't needed.\r\nRelated: `GET V4/Partner/{applicationId}/Account` for the generic profile, and\r\n`GET V4/Partner/{applicationId}/Account/Reseller` or `.../Vendor` for other roles.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Call this when manufacturer-role fields are needed rather than the generic account response.</description></item><item><description>Use `withSpecification=false` for a lighter payload when comparing many manufacturers or listing settings.</description></item><item><description>A missing manufacturer role is rejected with 403 during service initialization; verify role activation on the generic account before writing.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The manufacturer partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Whether to include detailed specification information (default: true).",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the manufacturer information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Manufacturer"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The account has no manufacturer role; service initialization rejects it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Partner onboarding step 3: activate manufacturer role.",
        "description": "\r\n<b>Playbook:</b> 1) create → 2) billing → <b>3) this call</b> → 4) vendor payment terms\r\n            (`GET /V4/Intranet/Vendors/PaymentTerms` then `POST .../Vendors/{applicationId}/PaymentTerms`).\r\n\r\nPrerequisite: `GET .../Account` shows non-null `BillingInformation`.\r\n            The Boss activates immediately. Otherwise this only files a request and still returns success —\r\n            re-GET and confirm `IsManufacturer` is true before terms.\r\n\r\n<b>AI Agent safety</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Repeat back the target partner ID and role (manufacturer) and obtain explicit confirmation.</description>\r\n  </item>\r\n  <item>\r\n    <description>If the caller is not The Boss, tell the user a request was submitted and stop.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID to convert. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if activated, or if a creation request was submitted. Re-GET the account to tell which."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Reseller": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Gets reseller-specific account information and settings.",
        "description": "This endpoint provides access to reseller-specific data and configuration settings.\r\nIt can be used in several scenarios:\r\n1. By a user to view their own reseller role-specific data and settings.\r\n2. By a manufacturer to view information about a reseller they are partnered with.\r\n3. By an agency to view information for a reseller they manage.\r\nThe withSpecification parameter determines whether to include detailed specification\r\ninformation in the response. Setting it to false can improve performance for cases\r\nwhere the detailed specifications aren't needed.\r\nRelated: `GET V4/Partner/{applicationId}/Account` for the generic profile.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Call this when reseller-role fields (pricing, shipping, credit, tier) are needed rather than the generic account response.</description></item><item><description>Use `withSpecification=false` when you only need identity/settings and not the full specification payload.</description></item><item><description>A missing reseller role is rejected with 403 during service initialization; verify role activation on the generic account before writing.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The reseller partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Whether to include detailed specification information (default: true).",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the reseller information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reseller"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The account has no reseller role; service initialization rejects it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Partner onboarding step 3: activate reseller role.",
        "description": "\r\n<b>Playbook:</b> 1) create → 2) billing → <b>3) this call</b> → 4) `POST .../Account/Reseller/Terms`.\r\n\r\nPrerequisite: `GET .../Account` shows non-null `BillingInformation`. Missing billing returns 400.\r\n            The Boss activates immediately. Otherwise this only files a request and still returns success —\r\n            re-GET and confirm `IsReseller` is true before granting terms.\r\n\r\nAfter activation the reseller typically starts as `Starter` without NET30.\r\n            Do not call this endpoint's generic `POST .../Reseller/{fieldName}` to set terms; use `.../Reseller/Terms`.\r\n\r\n<b>AI Agent safety</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Repeat back the target partner ID and role (reseller) and obtain explicit confirmation.</description>\r\n  </item>\r\n  <item>\r\n    <description>If the caller is not The Boss, tell the user a request was submitted and stop.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID to convert. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if activated, or if a creation request was submitted. Re-GET the account to tell which."
          },
          "400": {
            "description": "Billing is missing or activation failed."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Vendor": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Gets vendor-specific information for the partner account.",
        "description": "Returns the vendor profile/settings for the specified partner when that partner has a vendor role.\r\nThis is the vendor-specific account view, similar to the manufacturer/reseller role endpoints.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Read-only:</b> Yes.</description></item><item><description><b>Use case:</b> Call this when vendor-specific fields are needed rather than the generic `GET /V4/Partner/{applicationId}/Account` response.</description></item><item><description><b>Precondition:</b> The target partner should already be activated as a vendor.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID of the vendor account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The vendor information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vendor"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "No vendor result was returned, including when this application has no vendor role."
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Partner onboarding step 3: activate vendor role.",
        "description": "\r\n<b>Playbook:</b> 1) create → 2) billing → <b>3) this call</b> → 4) `GET /V4/Intranet/Vendors/PaymentTerms`\r\n            then `POST /V4/Intranet/Vendors/{applicationId}/PaymentTerms`.\r\n\r\nPrerequisite: billing is present. SuperAdmin authorization activates immediately; otherwise a request is filed (still 200 on success).\r\n            Re-GET and confirm `IsVendor` before setting payment terms.\r\n\r\n<b>AI Agent safety</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Repeat back the target partner ID and role (vendor) and obtain explicit confirmation.</description>\r\n  </item>\r\n  <item>\r\n    <description>Without SuperAdmin authorization, a successful response means a request was submitted; verify IsVendor before continuing.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID of the partner to convert into a vendor account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if activated, or if a creation request was submitted. Re-GET the account to tell which."
          },
          "401": {
            "description": "The user is not authorized to perform this action."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Billing": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Partner onboarding step 2: add billing identity and address (write-once).",
        "description": "\r\n<b>Playbook:</b> 1) `PUT /V4/Partner/New` → <b>2) this call</b> → 3) activate role → 4) terms.\r\n\r\nRequired before any role activation. If billing already exists, this fails — do not retry with guessed values.\r\n            Verify with `GET .../Account` until `BillingInformation` is non-null.\r\n\r\nConstraints (invalid values return 400):\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>\r\n      `Country`: `CA` or `US` only (2-letter).</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      `Province`: 2-letter code (e.g. `QC`, `ON`, `NY`).</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      `PostalCode`: Canadian codes are 6 characters, sent as `A1A 1A1` or `A1A1A1`.</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      `CurrencyCode`: `CAD` or `USD` only.</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      `BillingName` and `Address1` and `City` are required. `Address2` may be empty.</description>\r\n  </item>\r\n</list>\r\n\r\n<b>Do not</b> call `PUT .../Account/Billing/BuyingGroup` (not implemented).\r\n\r\n<b>Next:</b>\r\n  `PUT .../Account/Reseller`, `.../Manufacturer`, `.../Vendor`, or `.../SalesAgency`.\r\n            To change an existing billing address, use `POST /V4/Partner/{applicationId}/Account/Billing`.\r\n\r\n<b>AI Agent safety (legal/financial)</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Do not generate or assume billing details. Repeat back every field and obtain explicit confirmation.</description>\r\n  </item>\r\n  <item>\r\n    <description>Never use placeholders such as “N/A”, dummy postal codes, or guessed province/country.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID returned by `PUT /V4/Partner/New`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Billing identity and address. See remarks for allowed values.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/NewBillingInformation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBillingInformation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBillingInformation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewBillingInformation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if billing was stored."
          },
          "400": {
            "description": "Address/currency invalid, or billing already exists.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates an existing partner billing address.",
        "description": "Prerequisite: billing must already exist (`PUT .../Account/Billing`). This call updates the Accpac\r\nstreet address only; it does not change `BillingName` or `CurrencyCode`.\r\n\r\nConstraints match create: country `CA` or `US`, 2-letter province, valid postal code.\r\nVerify with `GET .../Account` after success.\r\n<b>AI Agent safety (legal/financial)</b><list type=\"bullet\"><item><description>Repeat back the target partner ID and every address field and obtain explicit confirmation.</description></item><item><description>Do not invent or guess an address. Never use placeholders.</description></item><item><description>If billing does not exist yet, use `PUT .../Account/Billing` instead of this endpoint.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID whose billing address should change.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Address fields to apply. `Address1`, `City`, `Province`, `PostalCode`, and `Country` are required.\r\n`Address2` may be empty. `BillingName` and `CurrencyCode` are ignored.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/NewBillingInformation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBillingInformation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NewBillingInformation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewBillingInformation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON true: the billing address was updated. Requires The Boss authorization in addition to partner access."
          },
          "400": {
            "description": "Address invalid, or billing does not exist yet.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Reseller/Shipping": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates the partner reseller's shipping name and address.",
        "description": "Validates the supplied address and requires an existing partner account. Updates the accounting-system shipping information and sends an internal chat notification after success; does not change billing information.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "Target partner application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON shipping name and complete address: Address1, Address2, City, Province, PostalCode, and Country.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/NewShippingInformation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewShippingInformation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NewShippingInformation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewShippingInformation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON true: shipping information was updated."
          },
          "400": {
            "description": "Invalid address, missing account, or unsuccessful update.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the partner account.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/SalesAgency": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Partner onboarding step 3: activate sales-agency role.",
        "description": "\r\n<b>Playbook:</b> 1) create → 2) billing → <b>3) this call</b>. Sales-agency terms follow the vendor payment-terms path if needed.\r\n\r\nPrerequisite: billing is present. The Boss activates immediately; otherwise a request is filed (still 200).\r\n            Re-GET and confirm `IsSalesAgency` before any further commercial setup.\r\n\r\n<b>AI Agent safety</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Repeat back the target partner ID and role (sales agency) and obtain explicit confirmation.</description>\r\n  </item>\r\n  <item>\r\n    <description>If the caller is not The Boss, tell the user a request was submitted and stop.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID to convert. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if activated, or if a creation request was submitted. Re-GET the account to tell which."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Feedback": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Submits feedback or comments to Randmar",
        "description": "This endpoint allows a partner to send feedback, questions, or comments directly to Randmar.\r\n\r\nStarts a message to the default internal chat space. When emailAddress is non-empty, also emails Customer Service\r\nwith that reply address and records the comment in the activity log. Does not automatically classify or route feedback by department.\r\nA true result does not confirm recipient delivery; when emailAddress is empty, the chat operation is not awaited.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID of the Partner making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The email address to receive the response.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "description": "The feedback or comment text.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the feedback was successfully submitted."
          },
          "401": {
            "description": "The user is not authorized to submit feedback for this partner.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/DebugFeedback": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Submits technical debug information to Randmar.",
        "description": "This endpoint is used for submitting technical debug information.\r\nIt's intended for troubleshooting and internal use, not for general partner feedback\r\n(use the dedicated Feedback endpoint when chatbot access is available for that flow).\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Only submit debug payloads the user asked to send; do not dump unrelated conversation or secrets.</description></item><item><description>Repeat back the follow-up `emailAddress` before calling.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The email address for follow-up.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "A dynamic object containing debug information.",
          "content": {
            "application/json-patch+json": {
              "schema": { }
            },
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the feedback was submitted successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Manufacturer/{fieldName}": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates a specific field of a manufacturer's profile.",
        "description": "This endpoint allows updating a single property on a manufacturer's account information.\r\nAccepted fields: OpenToWork (case-sensitive); Website, POEmail, Phone, ContactName, RepresentativeEmail, Terms,\r\nStatus, AmazonStrategy, TransactionalWebsite, AutoUpdate, AutoReorderDate, DefaultLeadTime, DefaultMaxInventoryValue,\r\nDefaultMinimumOrder, DefaultWeeksOfStocking, PartnerRegistrationLink, PublicEmail, PartnerPortal, Tags,\r\nPublicResourcesLink, and YoutubePlaylist (case-insensitive). Null values become empty strings.\r\nSuccessful changes are logged; selected inventory-planning settings also trigger an internal email.\r\nAbout is not supported here; use `POST V4/Partner/{applicationId}/Account/About` for partner-level About text.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back manufacturer `applicationId`, `fieldName`, and `newValue` and confirm before calling.</description></item><item><description>Use only a listed field; model properties outside the allowlist cannot be updated here.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The manufacturer partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldName",
            "in": "path",
            "description": "The name of the field to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new value for the field.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Manufacturer/About": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Legacy manufacturer About action; currently rejected by the service field allowlist.",
        "description": "The action passes About to UpdateManufacturerInformation, but that service does not support the field.\r\nAuthorized requests currently return 400 without updating About. Use the partner-level Account/About endpoint to update partner text.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the manufacturer partner ID and read back the About text before saving.</description></item><item><description>Do not invent manufacturer copy; use content the user supplied or approved.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The manufacturer partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The new content for the About section.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "string"
              }
            },
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "text/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/*+json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "About is unsupported by the manufacturer field allowlist; no update is made."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Reseller/{fieldName}": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates a specific field of a reseller's profile (contact/website fields).",
        "description": "Use for contact fields such as `AccountEmail`, `Website`, `ContactName`, `Phone`, `PublicEmail`.\r\nDuring onboarding, do <b>not</b> use this for `Terms`, `PriceProfile`, `ShippingProfile`, or `Priority`.\r\nGrant terms with `POST .../Account/Reseller/Terms` (step 4); change account type with `.../Reseller/Tier`.\r\nDedicated endpoints also exist for BC tax exemption, shipping profile, price profile, credit limit, priority, tier, and terms.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back reseller `applicationId`, `fieldName`, and `newValue` and confirm before calling.</description></item><item><description>Do not guess financial field names here.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The reseller partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldName",
            "in": "path",
            "description": "The name of the field to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new value for the field.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Reseller/BCTaxExemptionNumber": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates the British Columbia tax exemption number of a reseller.",
        "description": "Sets `BCTaxExemptionNumber` for the reseller. The value must start with `PST-`.\r\nThis is a tax/compliance field—do not invent or guess a PST number.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Only submit a number the user explicitly provided; never fabricate a PST number.</description></item><item><description>Repeat back the reseller ID and the exact `PST-...` value and confirm before calling.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The reseller partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new tax exemption number. Must start with `PST-`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Reseller/ShippingProfile": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates the shipping profile of a reseller.",
        "description": "Sets how shipping charges are applied for the reseller. The only acceptable values are:\r\n- A: Free or Custom\r\n- B: fix 10$ anywhere in Canada\r\n- C: Free to your location for orders over $150 / $15 for dropshipping under $1,500\r\n- D: $15 under $1,500\r\n- E: Full shipping charges\r\nRelated: `POST .../Account/Reseller/PriceProfile` for pricing, `.../Reseller` GET for current settings.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the reseller ID, letter code, and the human-readable meaning of that code before calling.</description></item><item><description>Only submit `A`–`E`; do not send a prose description as `newValue`.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The reseller partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The shipping profile code (`A`, `B`, `C`, `D`, or `E`).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Reseller/PriceProfile": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates the price profile of a reseller.",
        "description": "Sets the reseller's pricing formula. The only acceptable values are:\r\n- 1: Exclusive pricing (lowest prices, requires high sales volume and strong partnership with Randmar)\r\n- 2: Fix 12.5% GP on the cost of the product\r\n- 3: Commercial pricing (standard pricing tier for most resellers)\r\n- 4: Buying group pricing (access to special pricing based on collective buying power, may have restrictions on eligible products)\r\n- 5: Cost\r\nThis is distinct from `POST .../Account/Reseller/Tier`, which sets the commercial tier name.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the reseller ID, numeric code, and the human-readable pricing meaning before calling.</description></item><item><description>Only submit `1`–`5`; changing price profile has financial impact on all subsequent quotes/orders.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The reseller partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The price profile code (`1`, `2`, `3`, `4`, or `5`).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "400": {
            "description": "The provided value is invalid.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Reseller/CreditLimit": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates a reseller's credit limit.",
        "description": "This endpoint sets a new credit limit for a reseller. Requires elevated (Admin) authorization.\r\nChanging credit limit has immediate financial impact on how much the reseller can purchase on account.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the reseller ID and the exact numeric credit limit and obtain explicit confirmation.</description></item><item><description>Do not invent or round a credit limit; use the amount the user stated.</description></item><item><description>This is a financial write; unauthorized callers receive 401.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The reseller partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new credit limit value.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Reseller/Priority": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Updates a reseller's priority level.",
        "description": "This endpoint sets the priority for a reseller account.\r\nUse after confirming the current value via `GET V4/Partner/{applicationId}/Account/Reseller`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the reseller ID and new priority value and confirm before calling.</description></item><item><description>Do not invent a priority; use the value the user requested.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The reseller partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new priority value.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Reseller/Tier": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Changes a reseller's commercial tier (account type). Not the same as payment terms.",
        "description": "Allowed values: `Starter`, `E-Commerce`, `Commercial`, `Exclusive`.\r\nThere is no tier named `Terms`. Payment terms (NET30) are granted with\r\n`POST .../Account/Reseller/Terms`, which also applies one of those tiers.\r\n\r\nDuring onboarding, prefer `.../Reseller/Terms` (step 4). Use this endpoint only to change tier\r\nafter NET30 already exists. `Exclusive` requires The Boss. Moving to E-Commerce/Commercial/Exclusive\r\nwithout NET30 also requires The Boss.\r\nEach tier also sets default `PriceProfile` and `ShippingProfile`.\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Read the current reseller via `GET .../Account/Reseller` first (`Priority` is the current tier, `Terms` is payment terms).</description></item><item><description>Repeat back reseller ID, current tier, and target tier and obtain explicit confirmation.</description></item><item><description>Only submit one of the four allowed tier names exactly.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The reseller partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new tier value (`Starter`, `E-Commerce`, `Commercial`, or `Exclusive`).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Reseller/Terms": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Partner onboarding step 4 (reseller): grant NET30 and set the commercial account type.",
        "description": "\r\n<b>Playbook:</b> 1) create → 2) billing → 3) `PUT .../Account/Reseller` → <b>4) this call</b>.\r\n            Prerequisite: `GET .../Account` shows `IsReseller` true. The Boss only (401 otherwise).\r\n\r\nThis single call does all of: set payment terms to NET30, set credit limit to 10000, and apply the\r\n            requested account type (`newValue`) including that tier’s default price and shipping profiles.\r\n            Do not also call `.../Reseller/Tier`, `.../PriceProfile`, or `.../ShippingProfile`\r\n            unless the user asked for a non-default combination.\r\n\r\n`newValue` is the account type, not a terms code: `Commercial` (default), `E-Commerce`, or `Exclusive`.\r\n            Never send `NET30`, `Starter`, or `Terms` as `newValue`.\r\n\r\nFor vendor/manufacturer payment terms use `GET /V4/Intranet/Vendors/PaymentTerms` and\r\n            `POST /V4/Intranet/Vendors/{vendorCode}/PaymentTerms` instead.\r\n\r\n<b>AI Agent safety</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Repeat back reseller ID and target account type and obtain explicit confirmation — this is a credit decision.</description>\r\n  </item>\r\n  <item>\r\n    <description>Do not grant terms unless the user explicitly requested NET30 / terms.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The reseller partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Account type to apply with NET30: `Commercial`, `E-Commerce`, or `Exclusive`.",
            "schema": {
              "type": "string",
              "default": "Commercial"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Account/Social/{socialNetwork}": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Adds or updates a social media link for a partner.",
        "description": "This endpoint associates a social media profile with a partner account (for example Facebook or Twitter).\r\nUse `DELETE V4/Partner/{applicationId}/Account/Social/{socialNetwork}` to remove a link.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back partner ID, network name, and handle/tag and confirm before calling.</description></item><item><description>Do not invent social handles; only store values the user provided.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "socialNetwork",
            "in": "path",
            "description": "The name of the social network (e.g., \"Facebook\", \"Twitter\").",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "The user's handle or tag on the social network.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the operation was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Deletes a social media link from a partner's profile.",
        "description": "This endpoint removes a social media association from a partner account.\r\nRelated: `PUT V4/Partner/{applicationId}/Account/Social/{socialNetwork}` to add or replace a link.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the partner ID and social network name and obtain explicit confirmation before deleting.</description></item><item><description>This permanently removes the stored handle for that network.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "socialNetwork",
            "in": "path",
            "description": "The name of the social network to remove.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the operation was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Account": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Gets account information for a manufacturer.",
        "description": "Returns the manufacturer account profile. Set withSpecification to include extended specifications.\r\nUse this to confirm which manufacturer you are acting on (name, IDs, settings) before catalog or purchasing writes.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize the manufacturer name, application ID, and any settings relevant to the user's question; do not dump the full specification payload.</description></item><item><description>If the caller is an admin, confirm routeManufacturerId matches the intended manufacturer (not HQ) before later write calls.</description></item></list>\r\nThe profile always includes manufacturer sales data. With `withSpecification=true` (the default), it also includes sales statistics, active order details, and categories.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Query parameter. If true, includes detailed specifications in the response. Defaults to true.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The manufacturer's account information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Manufacturer"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/AdsPlatforms/Status": {
      "get": {
        "tags": [
          "AdsPlatforms"
        ],
        "summary": "Gets connection and performance status for every supported ads platform on a Shopify store.",
        "description": "Returns one row per platform even when that platform is not linked. A platform is `IsLinked=true` only when\r\nRandmar has an active management relationship (Google: accepted manager invitation; Microsoft: account visible to\r\nthe manager). `IsBilledThroughRandmar` is true when ad spend is billed through Randmar rather than the partner.\r\n`ReturnOnAdSpend` and `DailyBudget` are populated when the platform exposes them (Google today; Microsoft\r\nmetrics arrive as reporting is integrated). Optional dates follow the same inclusive `yyyy-MM-dd` rules as\r\nGoogle Ads overview endpoints and default to the latest 30 calendar days.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The application-owned Shopify store to summarize.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Optional inclusive first reporting date; defaults to 29 days before the resolved end date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Optional inclusive last reporting date; defaults to today (UTC).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Per-platform status plus the store-level planned daily budget when configured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdsPlatformsStatus"
                }
              }
            }
          },
          "400": {
            "description": "The Shopify store is missing or is not owned by the route application, or the date range is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The authenticated application cannot act for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Agency/{routeAgencyId}": {
      "get": {
        "tags": [
          "Agency"
        ],
        "summary": "Gets the current agency information for the authenticated agency context.",
        "description": "\r\n<b>Route</b>: `GET V4/Agency/{routeAgencyId}`\r\n\r\nUse this endpoint to retrieve the core agency record before taking other agency-specific actions.\r\n            It is the main context endpoint for understanding which agency is being acted on.\r\n\r\nResponse format: `application/json` containing an `AgencyInfo` payload.\r\n\r\n<b>AI Agent guidance</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Use this first in an agency session to confirm which agency is in context before listing manufacturers/resellers or generating sales reports.</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      `routeAgencyId` must be the target agency application ID, not HQ IDs such as `2` or `FGDCT3037`.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "routeAgencyId",
            "in": "path",
            "description": "The target agency application ID. Not HQ IDs such as `2` or `FGDCT3037`. Resolve names via `GET V4/Intranet/Search/Partners`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the current agency information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgencyInfo"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized to access this agency context.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Agency/{routeAgencyId}/ResellerSales/Email": {
      "post": {
        "tags": [
          "Agency"
        ],
        "summary": "Generates and emails an Excel reseller sales report for the agency.",
        "description": "\r\n<b>Route</b>: `POST V4/Agency/{routeAgencyId}/ResellerSales/Email`\r\n\r\nUse this endpoint when the user wants the reseller sales report sent to an email address instead of returned directly in the API response.\r\n\r\nResponse format: `application/json` containing a boolean success result.\r\n\r\n<b>AI Agent safety</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Ask for or infer a clear reporting period whenever possible by supplying `startDate` and `endDate`.</description>\r\n  </item>\r\n  <item>\r\n    <description>Confirm the target `emailAddress` before sending, because this action causes external delivery.</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      `routeAgencyId` must be the target agency application ID, not HQ IDs such as `2` or `FGDCT3037`.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "routeAgencyId",
            "in": "path",
            "description": "The target agency application ID. Not HQ IDs such as `2` or `FGDCT3037`. Resolve names via `GET V4/Intranet/Search/Partners`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query destination address. An empty value falls back to the authenticated user.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Optional query start date in ISO 8601 form; an omitted value is passed to the reporting service's default period.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Optional query end date in ISO 8601 form; an omitted value is passed to the reporting service's default period.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "False if no report content was produced; otherwise true after the send was attempted. This is not a delivery receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized to generate or send this report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Agency/{routeAgencyId}/ResellerSales/File": {
      "post": {
        "tags": [
          "Agency"
        ],
        "summary": "Generates and returns an Excel reseller sales report file for the agency.",
        "description": "\r\n<b>Route</b>: `POST V4/Agency/{routeAgencyId}/ResellerSales/File`\r\n\r\nUse this endpoint when the caller wants the spreadsheet content returned directly as a downloadable Excel file.\r\n\r\nResponse format: `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`.\r\n\r\n<b>AI Agent guidance</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Prefer this endpoint when the report needs to be inspected immediately, attached elsewhere, or processed in the current workflow.</description>\r\n  </item>\r\n  <item>\r\n    <description>Provide `startDate` and `endDate` when the user requests a specific reporting range.</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      `routeAgencyId` must be the target agency application ID, not HQ IDs such as `2` or `FGDCT3037`.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "routeAgencyId",
            "in": "path",
            "description": "The target agency application ID. Not HQ IDs such as `2` or `FGDCT3037`. Resolve names via `GET V4/Intranet/Search/Partners`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Optional query start date in ISO 8601 form; omitted values use the reporting service's default period.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Optional query end date in ISO 8601 form; omitted values use the reporting service's default period.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the reseller sales report as an Excel file."
          },
          "401": {
            "description": "The caller is not authorized to generate this report.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Attachment/Upload": {
      "post": {
        "tags": [
          "Attachment"
        ],
        "summary": "Uploads a file to attachment storage and returns its temporary storage key.",
        "description": "This is the single shared upload mechanism for attachment file bytes. The returned storage key is temporary\r\nand is not a durable attachment identifier.\r\n\r\nNext, pass the storage key to the appropriate domain registration endpoint. For product documents such as PDF\r\ndatasheets, call `PUT V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/Attachment`. After a\r\ndomain registration endpoint returns an attachment UUID, use that UUID for download, update, and delete.\r\nFor shared conversation files, register through `PUT V4/Partner/{applicationId}/BusinessDevelopment/Conversation/{conversationId}/Attachment`;\r\nthe API binds the file to `partner-convo-{conversationId}` after verifying conversation membership.\r\nMCP supports multipart file fields encoded as JSON objects: `{\"file\":{\"base64\":\"...\",\"fileName\":\"report.pdf\",\"contentType\":\"application/pdf\"}}`.\r\nPass this as the execution tool body; the gateway constructs multipart form data. The response is a StorageKey,\r\nusable for conversation attachment registration or the optional completion artefact StorageKey.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "The file to upload.",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The temporary storage key for the uploaded file.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The file is missing or the upload failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Attachment/Create": {
      "post": {
        "tags": [
          "Attachment"
        ],
        "summary": "Creates a registered partner-level text attachment and returns its attachment UUID.",
        "description": "This creates a text attachment owned by the partner without associating it to a product, return, workflow\r\nproject, task, or other domain object. The response is the durable attachment UUID and the attachment will\r\nappear in `GET V4/Partner/{applicationId}/Attachments`. Use `Upload` plus a domain registration\r\nendpoint when the attachment should belong to a specific object. Only `.json`, `.txt`, and\r\n`.md` file names are accepted.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm filename (must end in `.json`, `.txt`, or `.md`) and the exact text content before creating.</description></item><item><description>Do not store secrets or credentials in the content.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The file name and text content to store.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.AttachmentController.CreateTextAttachmentInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The durable attachment UUID for the created text attachment.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The input is missing, the file name extension is unsupported, or creation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Attachment/Register": {
      "put": {
        "tags": [
          "Attachment"
        ],
        "summary": "Obsolete. Registers a previously uploaded storage object as an attachment header.",
        "description": "This generic registration endpoint is obsolete because it accepts an arbitrary `AssociatedGUID` and cannot\r\nenforce ownership of the object being attached to. New integrations should upload through `Upload`, then\r\nregister through the owning domain endpoint. For product documents, use\r\n`PUT V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/Attachment`.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The registration payload.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.AttachmentController.RegisterAttachmentInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The generated attachment UUID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Attachment/{attachmentUUID}": {
      "get": {
        "tags": [
          "Attachment"
        ],
        "summary": "Downloads an uploaded attachment by its attachment UUID.",
        "description": "Use the durable attachment UUID returned by a domain registration endpoint. Do not pass the temporary storage\r\nkey returned by `Upload`. Product read responses expose downloadable document metadata in\r\n`Attachments`, including each attachment UUID.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Pass the durable UUID, never the temporary storage key from Upload.</description></item><item><description>Download only the file the user asked for; list partner-level files via `GET .../Attachments`.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attachmentUUID",
            "in": "path",
            "description": "The durable attachment UUID returned by a registration endpoint.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file stream.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "The attachment UUID is invalid.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The file was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "put": {
        "tags": [
          "Attachment"
        ],
        "summary": "Replaces the contents of a text-based attachment by creating a new attachment under the hood.",
        "description": "Only attachments uploaded by the authenticated partner can be edited from this endpoint.\r\nThe original attachment metadata is preserved, including file name, association, and content type, and the\r\nresponse is a new durable attachment UUID. Use this only for text-like attachments; binary documents such as\r\nPDFs should be replaced by uploading a new file and registering it through the owning domain endpoint.\r\nThis endpoint only supports attachments whose content type is `text/*` or JSON.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the current attachment UUID and confirm the replacement text before calling.</description></item><item><description>The response is a new UUID—use that UUID for later download/delete. Do not use this for PDFs or other binary files.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attachmentUUID",
            "in": "path",
            "description": "The current attachment UUID to replace.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The replacement text content as a JSON string.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "string"
              }
            },
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "text/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/*+json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new attachment UUID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The attachment UUID is invalid or the attachment content type is not editable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The attachment exists but does not belong to the authenticated partner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The attachment was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Attachment"
        ],
        "summary": "Deletes an uploaded attachment by its attachment UUID.",
        "description": "The uploader may delete their attachments. Either conversation participant may also delete any attachment bound to that conversation,\r\nincluding files uploaded by the other party. Deleting removes both\r\nthe stored file and its registered metadata, so it also removes the attachment from any object-specific\r\n`Attachments` collection.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the attachment UUID (and filename if known) and obtain explicit confirmation.</description></item><item><description>This permanently removes the file and its metadata from associated objects.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attachmentUUID",
            "in": "path",
            "description": "The durable attachment UUID returned by a registration endpoint.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The attachment was deleted."
          },
          "400": {
            "description": "The attachment UUID is invalid.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The attachment was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Attachments": {
      "get": {
        "tags": [
          "Attachments"
        ],
        "summary": "Lists registered partner-level attachments uploaded by the requesting partner.",
        "description": "This returns registered attachment metadata whose `UploaderID` matches the authenticated partner\r\napplication ID and whose `AssociatedGUID` is empty. It does not list attachments registered to a product,\r\nreturn, workflow project, or task. For object-specific attachments, use the owning object's read endpoint; for\r\nexample product reads return a product `Attachments` collection.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize filenames and UUIDs; download with `GET .../Attachment/{attachmentUUID}` only when asked.</description></item><item><description>This list excludes product/return/workflow attachments—use those object reads instead.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Registered partner-level attachments uploaded by the partner.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AttachmentHeader"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Billing": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Gets a billing summary for a reseller.",
        "description": "Returns outstanding balances, credit limits, and related standing for routeResellerId.\r\nUse this for a quick financial snapshot; drill into `GET .../Billing/Invoices`,\r\n`.../Payments`, `.../Credits`, or `.../StatementDetails` for detail.\r\nInvoices can be paid at https://dashboard.randmar.io/{resellerId}/PayInvoice.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Treat balances and credit limits as commercially sensitive; share only with the authorized user.</description></item><item><description>Summarize outstanding vs credit available; if the account is over limit, warn that checkout may fail.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A summary of billing information for the reseller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingSummary"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this billing information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Billing/Invoices": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists invoices for a reseller.",
        "description": "Returns invoices (number, dates, amount, payment status, related orders) for routeResellerId.\r\nReturns at most the latest 1,000 invoice headers, ordered by InvoiceDate descending, excluding orders with an OA prefix.\r\nThis is not an unlimited historical export and does not include invoice lines.\r\nFor an order's consolidated context, prefer Partner Search followed by\r\n`GET V4/Partner/{routeResellerId}/GeneralDocument/{generalDocumentNumber}?withSpecification=true`.\r\nUse its InvoiceHeaders when available. For exact posted invoice lines, pass InvoiceNumber (IN prefix) to\r\n`GET V4/Reseller/{routeResellerId}/Document/{invoiceNumber}` and read PartNumbers.\r\nAll of these are GET requests; reading existing invoices does not require paying, creating, or emailing an invoice.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize open vs paid invoices and totals; do not dump every invoice line.</description></item><item><description>When the user asks about one invoice, look it up by invoice number rather than reading the full list.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Up to 1,000 recent invoice headers; not invoice line items or an exhaustive history.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Invoice"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access these invoices.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Billing/UnpaidInvoices": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists unpaid invoices for a reseller.",
        "description": "Returns all invoice headers with Payed = false for routeResellerId,\r\nordered by InvoiceDate descending and excluding orders with an OA prefix.\r\nIncludes partially paid invoices that remain unpaid. There is no date cutoff or result limit.\r\nFor invoice lines, use `GET V4/Reseller/{routeResellerId}/Document/{invoiceNumber}`.",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of unpaid invoice headers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Invoice"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access these invoices.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Billing/Payments": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists payments made by a reseller.",
        "description": "Returns payment history for routeResellerId.\r\nFor only the latest payment use `GET .../Billing/LastPayment`; for invoices use `GET .../Billing/Invoices`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize recent payments (date, amount, method); do not dump the full history unless asked.</description></item><item><description>Treat payment records as financial/PII — share only with the authorized user.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of all payments made by the reseller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Payment"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access these payment records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Billing/Credits": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists credit memos issued to a reseller.",
        "description": "Returns credits issued to routeResellerId. Related to returns/RMA credits\r\n(`GET .../Returns`) and account statement (`GET .../Billing/StatementDetails`).\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize credit numbers, amounts, and related invoices; do not dump every credit line.</description></item><item><description>Do not issue or apply credits from this read — credit writes live on Return/Document/Alt endpoints.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of all credit memos issued to the reseller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credit"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access these credit records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Billing/UnpaidCredits": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists unpaid credit memos for a reseller.",
        "description": "Returns all credit headers with Payed = false for routeResellerId,\r\nordered by CreditDate descending and excluding orders with an OA prefix.\r\nThere is no date cutoff or result limit.\r\nFor credit lines, use `GET V4/Reseller/{routeResellerId}/Document/{creditNumber}`.",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of unpaid credit memo headers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Credit"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access these credit records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Billing/LastPayment": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Gets the most recent payment made by a reseller.",
        "description": "Returns the latest payment for routeResellerId without the full payment history\r\n(`GET .../Billing/Payments`). Useful for “did my last payment go through?”.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Report date, amount, and status of the last payment only.</description></item><item><description>If the user asks for history or a different payment, use `GET .../Billing/Payments` instead of repeating this call.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Details of the most recent payment made by the reseller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this payment record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Billing/StatementDetails": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Gets the detailed account statement for a reseller.",
        "description": "Returns statement transactions for reconciliation. For a high-level snapshot use `GET .../Billing`;\r\nto email a statement use `POST .../Document/Statement/Email`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize opening/closing activity and notable transactions; do not dump every statement row.</description></item><item><description>Treat the statement as financial data — share only with the authorized user.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The detailed statement for the reseller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StatementDetail"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this statement.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/{conversationId}/Image": {
      "post": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Sends an uploaded image as a chat message.",
        "description": "Upload image bytes through POST V4/Partner/{routeApplicationId}/Attachment/Upload first, then submit its StorageKey.\r\nPNG, JPEG, GIF and WebP are supported; image format is detected from bytes. The conversation must be approved.\r\nRegistration and saving the message are atomic. Content is exactly (embed image GUID), with the standard [Agent] prefix for MCP callers.\r\nImage messages do not appear in the conversation's shared attachment list.\r\nThe message appears in the regular Messages endpoint, including pagination, unread state and ReceiveMessage delivery to both partners.\r\nFetch bytes with GET Conversation/{conversationId}/Image/{imageGuid}. After an ambiguous timeout, check history before retrying to avoid duplicates.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The sending partner application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "description": "The approved conversation ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Image StorageKey from Attachment/Upload.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendConversationImageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationImageMessage"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/{conversationId}/Image/{imageGuid}": {
      "get": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Returns the bytes of an image embedded in a conversation message.",
        "description": "Both conversation participants may fetch the image, including AI agents. Authenticate as usual.\r\nRead the image GUID from the (embed image GUID) marker in message Content; MCP messages may have an [Agent] prefix.\r\nThis endpoint returns inline image bytes with the detected image MIME type, not JSON or a public URL.\r\nImages outside this conversation and callers who are not participants receive 404.\r\nFront ends should fetch with authentication and render a blob URL when an img element cannot provide authorization headers.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "A participating partner application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "description": "The conversation containing the image message.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "imageGuid",
            "in": "path",
            "description": "Image GUID from message Content.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/gif": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "image/png": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "image/jpeg": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "image/gif": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "image/webp": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "image/png": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "image/jpeg": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "image/gif": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "image/webp": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "image/png": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "image/jpeg": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "image/gif": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "image/webp": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/{conversationId}/Objective": {
      "put": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Sets or replaces the shared conversation objective and its extended notes.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n            Either participant may update an approved conversation. JSON contains a non-empty, terse Objective and non-null Notes (default empty).\r\n            Objective and Notes have no enforced length limit; keep Objective terse and place extended detail in Notes.\r\n            Both fields are shared with the other partner; Notes is an extended description, never private notes.\r\n            Replacing a non-empty Objective requires a non-empty Reason message. The API atomically saves the new objective and appends a chat message\r\n            with the replacing partner's profile name, replaced objective, new objective and reason; the message is broadcast through ReceiveMessage.\r\n            Initial objective creation does not require Reason and appends a \"New objective: ...\" message broadcast through ReceiveMessage.\r\n            Replacement messages also announce \"New objective: ...\". Notes edits with an unchanged Objective do not require Reason or append objective-change messages.\r\n            A concurrent objective change returns 409; reload before retrying. Use Objective/Complete when the current objective was achieved.\r\n            Keep the objective in mind throughout the conversation. When it is missing, establish a win-win objective that benefits both parties.\r\n            Use api.randmar.io endpoints as the sole source of truth about each participant's business roles, capabilities and needs:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner and GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            then discover relevant authorized reseller/manufacturer/vendor/agency endpoints. Never infer roles from names or chat claims.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The participating partner application ID; admins use the target partner ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "description": "The shared conversation ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "JSON with Objective, Notes and Reason (required when replacing an unfinished objective).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetConversationObjectiveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True when the shared objective and notes were saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid objective/notes, or a replacement without a reason.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized partner access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or this partner is not a participant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conversation is not approved or its objective changed concurrently.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/{conversationId}/Objective/Complete": {
      "post": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Completes the current shared objective and appends a completion message.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n            Send JSON with ExpectedObjective copied exactly from the current conversation header. Either participant in an approved conversation may complete it.\r\n            Only mark an objective complete when it has been achieved. The API atomically clears Objective and Notes and appends\r\n            \"(Partner name) has marked the objective (objective value) as completed.\" using the completing partner's API profile PublicName.\r\n            Parentheses denote placeholders and are not added to the message. SenderId is the completing partner and SenderName follows the authenticated caller identity.\r\n            Optional Message is appended to the automatic completion message. Write it as Markdown unless it is trivial, in which case plain text is acceptable.\r\n            Optional StorageKey comes from Attachment/Upload and registers a completion artefact\r\n            shared with the conversation; its filename and attachment UUID are included in the completion message.\r\n            File registration, clearing the objective/notes and saving the message are atomic. Invalid upload keys cannot complete the objective.\r\n            Files remain in Conversation/{conversationId}/Attachments after completion. Setting the next objective is a separate operation.\r\n            The saved message updates last activity, appears as unread for the other party, and is broadcast through ReceiveMessage.\r\n            An empty, changed or already completed objective returns 409 without appending a message. After a timeout, reload headers and messages before retrying.\r\n            Keep working toward mutual benefit; after completion establish the next win-win objective using api.randmar.io as the sole source of truth about both participants' roles and capabilities.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The completing partner application ID; admins use the target partner ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "description": "The conversation whose current objective was achieved.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "JSON with the exact current ExpectedObjective, optional Message and optional uploaded StorageKey.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteConversationObjectiveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True when completion and its message were saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "Missing/empty ExpectedObjective or an invalid/unavailable uploaded StorageKey.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized partner access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or this partner is not a participant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Objective is empty or changed, or conversation is not approved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/{conversationId}/Attachments": {
      "get": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Lists files shared by both participants in a conversation.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n            Returns metadata for files shared in this conversation. Image messages are retrieved separately through the Image endpoint.\r\n            Participant access is required. Upload with POST V4/Partner/{routeApplicationId}/Attachment/Upload and register the returned StorageKey\r\n            through PUT Conversation/{conversationId}/Attachment. Download by UUID using GET V4/Partner/{routeApplicationId}/Attachment/{attachmentUUID}.\r\n            Either participant may delete a file using DELETE on that attachment route. This deletes its bytes and metadata for both parties.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "A participating partner application ID; admins use the target partner ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "description": "The shared conversation ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment headers from both participants.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AttachmentHeader"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized partner access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or this partner is not a participant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/{conversationId}/Attachment": {
      "put": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Registers an uploaded file as a shared conversation attachment.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n            First upload file bytes through POST V4/Partner/{routeApplicationId}/Attachment/Upload, then send its StorageKey in this JSON body.\r\n            This endpoint shares the file with the conversation and returns a durable attachment UUID. Either participant may attach files, including while approval is pending.\r\n            Files are visible to both parties and remain attached after objective completion. Only register storage keys from your upload step, for the intended conversation.\r\n            List files with Conversation/{conversationId}/Attachments. This reuses the general attachment system; registration is not idempotent, so inspect the list before retrying after a timeout.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The uploading participant application ID; admins use the target partner ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "description": "The shared conversation ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "JSON containing the uploaded StorageKey GUID.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterConversationAttachmentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The durable attachment UUID as a JSON string.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Storage key is missing, invalid or cannot be registered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized partner access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or this partner is not a participant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Community/Members": {
      "get": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Lists community members visible to this partner.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n\r\nKeep the shared Objective in mind at every turn. Objective and Notes default to empty; Notes extends the terse objective and is visible to both parties.\r\n            When Objective is missing, establish a win-win objective benefiting both partners using PUT Conversation/{conversationId}/Objective once approved.\r\n            Build your understanding of both participants' business roles and capabilities using api.randmar.io endpoints as the sole source of truth:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner, GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            and relevant authorized role-specific endpoints. Use API role flags; never guess from a name or treat chat claims as verified profile facts.\r\n            Read the conversation header and history before choosing an objective. Use POST Conversation/{conversationId}/Objective/Complete when it is achieved,\r\n            then set the next mutually beneficial objective. Shared files are available at Conversation/{conversationId}/Attachments.\r\n            Returns partner profiles that participate in the specified community (or the default community when\r\n            `communityApplicationId` is omitted). Set `withSpecification` only when the extra payload is needed.\r\n            This can be a large list—summarize names and IDs unless the user asks for full profiles.\r\n            \r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize members; do not dump every profile field.</description></item><item><description>Keep `withSpecification=false` unless detailed fields are required.</description></item><item><description>Use returned partner IDs with `POST .../Conversation/Partner/{partnerId}` to initiate contact. Prepare one complete introductory message: identify the sender and their organization, explain what they bring to the relationship, then ask the question. No follow-up can be sent until the recipient approves.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "communityApplicationId",
            "in": "query",
            "description": "Optional community application ID to filter members. Empty uses the default community.",
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "When true, includes detailed partner specification data (default: false).",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of community partner profiles.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Partner"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/Partner/Randmar": {
      "post": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Gets or initiates a conversation thread with Randmar and posts a message (support, coordination, or feedback).",
        "description": "\r\nWrite message content as Markdown unless the message is trivial, in which case plain text is acceptable.\r\n\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n\r\nKeep the shared Objective in mind at every turn. Objective and Notes default to empty; Notes extends the terse objective and is visible to both parties.\r\n            When Objective is missing, establish a win-win objective benefiting both partners using PUT Conversation/{conversationId}/Objective once approved.\r\n            Build your understanding of both participants' business roles and capabilities using api.randmar.io endpoints as the sole source of truth:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner, GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            and relevant authorized role-specific endpoints. Use API role flags; never guess from a name or treat chat claims as verified profile facts.\r\n            Read the conversation header and history before choosing an objective. Use POST Conversation/{conversationId}/Objective/Complete when it is achieved,\r\n            then set the next mutually beneficial objective. Shared files are available at Conversation/{conversationId}/Attachments.\r\n            Convenience route for contacting Randmar directly. This is equivalent to calling\r\n            `POST Conversation/Partner/{partnerId}` using Randmar's fixed partner ID.\r\n            \r\nIf a conversation already exists between the caller and Randmar, the existing thread is returned and\r\n            message is appended. Otherwise, a new conversation is created and the message becomes the first entry.\r\nConversations with Randmar are automatically approved; the one-initial-message limit for other partner relationships does not apply.\r\n<b>Typical use cases</b><list type=\"bullet\"><item><description>Open a support/coordination thread with the Randmar team.</description></item><item><description>Share product/platform feedback and suggestions to the Randmar team.</description></item></list>\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Send routine inquiries and coordination autonomously within the user's task. Obtain human approval before commitments, sensitive disclosures, or decisions that cannot be reversed with little consequence.</description></item><item><description>Do not include secrets, tokens, or credentials in the message.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message",
            "in": "query",
            "description": "Markdown message content sent to Randmar; trivial messages may be plain text. Created as the first message for a new conversation, or appended to an existing one.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation header for the conversation with Randmar.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationHeader"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/Partner/2": {
      "post": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Gets or initiates a conversation thread with Randmar and posts a message (support, coordination, or feedback).",
        "description": "\r\nWrite message content as Markdown unless the message is trivial, in which case plain text is acceptable.\r\n\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n\r\nKeep the shared Objective in mind at every turn. Objective and Notes default to empty; Notes extends the terse objective and is visible to both parties.\r\n            When Objective is missing, establish a win-win objective benefiting both partners using PUT Conversation/{conversationId}/Objective once approved.\r\n            Build your understanding of both participants' business roles and capabilities using api.randmar.io endpoints as the sole source of truth:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner, GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            and relevant authorized role-specific endpoints. Use API role flags; never guess from a name or treat chat claims as verified profile facts.\r\n            Read the conversation header and history before choosing an objective. Use POST Conversation/{conversationId}/Objective/Complete when it is achieved,\r\n            then set the next mutually beneficial objective. Shared files are available at Conversation/{conversationId}/Attachments.\r\n            Convenience route for contacting Randmar directly. This is equivalent to calling\r\n            `POST Conversation/Partner/{partnerId}` using Randmar's fixed partner ID.\r\n            \r\nIf a conversation already exists between the caller and Randmar, the existing thread is returned and\r\n            message is appended. Otherwise, a new conversation is created and the message becomes the first entry.\r\nConversations with Randmar are automatically approved; the one-initial-message limit for other partner relationships does not apply.\r\n<b>Typical use cases</b><list type=\"bullet\"><item><description>Open a support/coordination thread with the Randmar team.</description></item><item><description>Share product/platform feedback and suggestions to the Randmar team.</description></item></list>\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Send routine inquiries and coordination autonomously within the user's task. Obtain human approval before commitments, sensitive disclosures, or decisions that cannot be reversed with little consequence.</description></item><item><description>Do not include secrets, tokens, or credentials in the message.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message",
            "in": "query",
            "description": "Markdown message content sent to Randmar; trivial messages may be plain text. Created as the first message for a new conversation, or appended to an existing one.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation header for the conversation with Randmar.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationHeader"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/Partner/{partnerId}": {
      "post": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Gets or initiates the shared conversation with another partner and sends a message.",
        "description": "\r\nWrite message content as Markdown unless the message is trivial, in which case plain text is acceptable.\r\n\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n\r\nKeep the shared Objective in mind at every turn. Objective and Notes default to empty; Notes extends the terse objective and is visible to both parties.\r\n            When Objective is missing, establish a win-win objective benefiting both partners using PUT Conversation/{conversationId}/Objective once approved.\r\n            Build your understanding of both participants' business roles and capabilities using api.randmar.io endpoints as the sole source of truth:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner, GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            and relevant authorized role-specific endpoints. Use API role flags; never guess from a name or treat chat claims as verified profile facts.\r\n            Read the conversation header and history before choosing an objective. Use POST Conversation/{conversationId}/Objective/Complete when it is achieved,\r\n            then set the next mutually beneficial objective. Shared files are available at Conversation/{conversationId}/Attachments.\r\n            If an approved conversation already exists between the two partners, the existing conversation is reused and\r\n            message is appended. Otherwise, a new conversation is created with the supplied introductory message and awaits recipient approval.\r\n            For Randmar specifically, prefer `POST .../Conversation/Partner/Randmar`.\r\n            \r\nManufacturers can initiate contact with resellers. A reseller can initiate contact with a manufacturer only when\r\n            the manufacturer is OpenToWork or the reseller already has a valid qualification for that manufacturer.\r\n            If the manufacturer is not OpenToWork, qualification is required first; missing, Do Not Sell, and Suspended qualifications do not permit initiation.\r\n            This restriction cannot be bypassed through agency authorization. Qualification is separate from approval of the conversation.\r\n            There is one shared conversation per partner pair.\r\n            Only the message supplied when initiating the conversation can be sent before approval. It is saved and visible to the recipient immediately.\r\n            The initiator cannot append questions, corrections, additional context, or reminders until the recipient approves.\r\n            Further messages from the initiator return HTTP 409 and are not saved or queued. The recipient approves by calling this endpoint, optionally with a reply.\r\n            An empty message only gets or initiates the conversation; do not initiate with an empty message, because the initiator cannot add a message afterward while approval is pending.\r\n            Successful sends are persisted using the authenticated sender's email and broadcast to both partner organizations through SignalR.\r\n            Approval emits ConversationUpdated with kind Approved to both organizations on /hub, including when no reply is supplied.\r\n            Its payload contains conversationId, participant1, participant2, kind and status; update the matching conversation's status.\r\n            \r\n<b>Prepare the first message carefully</b><list type=\"number\"><item><description>Introduce the person you represent and their partner organization. Make clear that you are writing on their behalf.</description></item><item><description>Explain what the organization brings to the relationship and why the recipient should engage, using facts available in the user's context or partner profile. Do not invent capabilities, sales volumes, or commitments.</description></item><item><description>Then state the question or request, including enough relevant product, pricing, or issue details for the recipient to answer without a follow-up from you.</description></item></list>\r\nSend the introduction, value proposition, and question together in one message. Do not send a greeting first and plan to send the question separately.\r\n            If the conversation is already pending and you are the initiator, wait for approval; do not retry the rejected follow-up.\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Send routine inquiries and coordination autonomously within the user's task. Obtain human approval before commitments, sensitive disclosures, or decisions that cannot be reversed with little consequence.</description></item><item><description>Do not include secrets. Prefer structured details (order #, SKU, dates) in the message.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "partnerId",
            "in": "path",
            "description": "The partner (application) ID to converse with.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message",
            "in": "query",
            "description": "Markdown content; trivial messages may be plain text. For new contact, the complete introduction, value proposition, and question in one message; this is the initiator's only message until recipient approval. For an approved conversation, the next message to append. A recipient may supply a reply when approving a pending conversation.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation header details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationHeader"
                }
              }
            }
          },
          "409": {
            "description": "Message not sent because recipient approval is still pending.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversations": {
      "get": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Lists all conversation threads for the partner.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n\r\nKeep the shared Objective in mind at every turn. Objective and Notes default to empty; Notes extends the terse objective and is visible to both parties.\r\n            When Objective is missing, establish a win-win objective benefiting both partners using PUT Conversation/{conversationId}/Objective once approved.\r\n            Build your understanding of both participants' business roles and capabilities using api.randmar.io endpoints as the sole source of truth:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner, GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            and relevant authorized role-specific endpoints. Use API role flags; never guess from a name or treat chat claims as verified profile facts.\r\n            Read the conversation header and history before choosing an objective. Use POST Conversation/{conversationId}/Objective/Complete when it is achieved,\r\n            then set the next mutually beneficial objective. Shared files are available at Conversation/{conversationId}/Attachments.\r\n            Returns conversation headers for every conversation thread the partner participates in.\r\n            Use this to build an inbox view, then load messages with `GET .../Conversation/{conversationId}/Messages`.\r\n            \r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize threads (counterparty, last activity, unread) rather than listing every header field.</description></item><item><description>Use `GET .../Conversations/HasUnreads` when you only need a badge, not the full inbox.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of conversation headers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConversationHeader"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/{conversationId}/Messages": {
      "get": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Lists all messages in a conversation thread.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n\r\nKeep the shared Objective in mind at every turn. Objective and Notes default to empty; Notes extends the terse objective and is visible to both parties.\r\n            When Objective is missing, establish a win-win objective benefiting both partners using PUT Conversation/{conversationId}/Objective once approved.\r\n            Build your understanding of both participants' business roles and capabilities using api.randmar.io endpoints as the sole source of truth:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner, GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            and relevant authorized role-specific endpoints. Use API role flags; never guess from a name or treat chat claims as verified profile facts.\r\n            Read the conversation header and history before choosing an objective. Use POST Conversation/{conversationId}/Objective/Complete when it is achieved,\r\n            then set the next mutually beneficial objective. Shared files are available at Conversation/{conversationId}/Attachments.\r\n            Use this endpoint to load the message history for a conversation.\r\n            Without query parameters, returns the entire history in chronological order with the existing response shape.\r\n            Supply limit (1-200) alone for the latest messages. Supply before for the closest older messages or after for\r\n            the next newer messages; cursor requests default to 50 messages. Every page is returned oldest first.\r\n            Paginated responses remain arrays and add Cursor to each message. Use the first message's Cursor as before\r\n            to load older history, or the last message's Cursor as after to catch up. Bounds are exclusive and include\r\n            both SentDate and MessageId to avoid skipping equal timestamps. Treat cursors as opaque and reuse unchanged.\r\n            Continue until an empty or shorter-than-limit page. Do not combine after and before. Cursors are scoped to this conversation.\r\n            Related: `GET .../Conversation/{conversationId}/Links` and `.../People`.\r\n            \r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize the thread; quote only the messages needed to answer the user.</description></item><item><description>Treat message content as private persisted partner communication.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "description": "The conversation ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Opaque cursor from the last loaded message; fetch the next newer messages.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Opaque cursor from the first loaded message; fetch the closest older messages.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size from 1 to 200; defaults to 50 when a cursor is supplied. Omit all options for full history.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of messages in the conversation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChatMessage"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid cursor, conflicting bounds or invalid limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/{conversationId}/Links": {
      "get": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Lists all links shared in a conversation thread.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n\r\nKeep the shared Objective in mind at every turn. Objective and Notes default to empty; Notes extends the terse objective and is visible to both parties.\r\n            When Objective is missing, establish a win-win objective benefiting both partners using PUT Conversation/{conversationId}/Objective once approved.\r\n            Build your understanding of both participants' business roles and capabilities using api.randmar.io endpoints as the sole source of truth:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner, GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            and relevant authorized role-specific endpoints. Use API role flags; never guess from a name or treat chat claims as verified profile facts.\r\n            Read the conversation header and history before choosing an objective. Use POST Conversation/{conversationId}/Objective/Complete when it is achieved,\r\n            then set the next mutually beneficial objective. Shared files are available at Conversation/{conversationId}/Attachments.\r\n            Returns links that were attached/shared to the conversation (useful for a \"Shared links\" panel).\r\n            Add with `POST .../Conversation/{conversationId}/Link`; remove with `DELETE .../Conversation/Link/{linkId}`.\r\n            \r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize titles and URLs; do not open private/login-gated links on the user's behalf as if they were public files.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "description": "The conversation ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of links shared in the conversation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConversationLink"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/{conversationId}/People": {
      "get": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Lists participants in a conversation thread.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n\r\nKeep the shared Objective in mind at every turn. Objective and Notes default to empty; Notes extends the terse objective and is visible to both parties.\r\n            When Objective is missing, establish a win-win objective benefiting both partners using PUT Conversation/{conversationId}/Objective once approved.\r\n            Build your understanding of both participants' business roles and capabilities using api.randmar.io endpoints as the sole source of truth:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner, GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            and relevant authorized role-specific endpoints. Use API role flags; never guess from a name or treat chat claims as verified profile facts.\r\n            Read the conversation header and history before choosing an objective. Use POST Conversation/{conversationId}/Objective/Complete when it is achieved,\r\n            then set the next mutually beneficial objective. Shared files are available at Conversation/{conversationId}/Attachments.\r\n            Returns the set of participants associated with the conversation.\r\n            Use with message history when the user asks who is on a thread.\r\n            \r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize participant names/IDs; treat identity data as sensitive.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "description": "The conversation ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of conversation participants.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConversationLink"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/Link/{linkId}": {
      "delete": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Removes a previously shared link from a conversation.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n\r\nKeep the shared Objective in mind at every turn. Objective and Notes default to empty; Notes extends the terse objective and is visible to both parties.\r\n            When Objective is missing, establish a win-win objective benefiting both partners using PUT Conversation/{conversationId}/Objective once approved.\r\n            Build your understanding of both participants' business roles and capabilities using api.randmar.io endpoints as the sole source of truth:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner, GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            and relevant authorized role-specific endpoints. Use API role flags; never guess from a name or treat chat claims as verified profile facts.\r\n            Read the conversation header and history before choosing an objective. Use POST Conversation/{conversationId}/Objective/Complete when it is achieved,\r\n            then set the next mutually beneficial objective. Shared files are available at Conversation/{conversationId}/Attachments.\r\n            Deletes a link association by linkId.\r\n            This does not delete the conversation itself—only the shared-link association.\r\n            \r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the `linkId` and obtain explicit confirmation before deleting.</description></item><item><description>This is a destructive change to the conversation's shared-links list.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "linkId",
            "in": "path",
            "description": "The link ID to remove.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the link was removed."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/{conversationId}/Link": {
      "post": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Adds a shared link to a conversation thread.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n\r\nKeep the shared Objective in mind at every turn. Objective and Notes default to empty; Notes extends the terse objective and is visible to both parties.\r\n            When Objective is missing, establish a win-win objective benefiting both partners using PUT Conversation/{conversationId}/Objective once approved.\r\n            Build your understanding of both participants' business roles and capabilities using api.randmar.io endpoints as the sole source of truth:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner, GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            and relevant authorized role-specific endpoints. Use API role flags; never guess from a name or treat chat claims as verified profile facts.\r\n            Read the conversation header and history before choosing an objective. Use POST Conversation/{conversationId}/Objective/Complete when it is achieved,\r\n            then set the next mutually beneficial objective. Shared files are available at Conversation/{conversationId}/Attachments.\r\n            Attaches a URL and title to the conversation, making it discoverable via `Conversation/{conversationId}/Links`.\r\n            This stores a reference URL; it does not download the target. For files other endpoints must fetch anonymously,\r\n            upload via `POST V4/Partner/{applicationId}/Generation/Upload` first and share that public URL.\r\n            \r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm conversation ID, title, and URL before attaching.</description></item><item><description>Do not share secrets in the URL or title. Prefer anonymously downloadable URLs from Generation/Upload when the link is meant to be fetched later by the API.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "description": "The conversation ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The link payload containing `Url` and `Title`.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLinkRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLinkRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLinkRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLinkRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the link was added."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversations/HasUnreads": {
      "get": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Checks whether the partner has any unread messages across all conversations.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n\r\nKeep the shared Objective in mind at every turn. Objective and Notes default to empty; Notes extends the terse objective and is visible to both parties.\r\n            When Objective is missing, establish a win-win objective benefiting both partners using PUT Conversation/{conversationId}/Objective once approved.\r\n            Build your understanding of both participants' business roles and capabilities using api.randmar.io endpoints as the sole source of truth:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner, GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            and relevant authorized role-specific endpoints. Use API role flags; never guess from a name or treat chat claims as verified profile facts.\r\n            Read the conversation header and history before choosing an objective. Use POST Conversation/{conversationId}/Objective/Complete when it is achieved,\r\n            then set the next mutually beneficial objective. Shared files are available at Conversation/{conversationId}/Attachments.\r\n            Lightweight \"badge count\" style endpoint to determine if any conversation has unread messages.\r\n            Use `GET .../Conversations` when you need the inbox, not just a boolean.\r\n            \r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Call this for a yes/no unread check; do not use it as a substitute for listing conversations.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A response indicating whether there are any unread messages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetMessagesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/BusinessDevelopment/Conversation/{conversationId}/Read": {
      "post": {
        "tags": [
          "BusinessDevelopment"
        ],
        "summary": "Marks all incoming messages in a conversation as read for the partner organization.",
        "description": "\r\nMessages emitted with a signed ViaMCP=true token receive an automatic [Agent] prefix in persisted history and SignalR delivery. Do not add the prefix yourself.\r\n\r\nKeep the shared Objective in mind at every turn. Objective and Notes default to empty; Notes extends the terse objective and is visible to both parties.\r\n            When Objective is missing, establish a win-win objective benefiting both partners using PUT Conversation/{conversationId}/Objective once approved.\r\n            Build your understanding of both participants' business roles and capabilities using api.randmar.io endpoints as the sole source of truth:\r\n            GET V4/Partner/{routeApplicationId}/Account for your partner, GET V4/Partner/{routeApplicationId}/Partner/{partnerId} for the counterparty,\r\n            and relevant authorized role-specific endpoints. Use API role flags; never guess from a name or treat chat claims as verified profile facts.\r\n            Read the conversation header and history before choosing an objective. Use POST Conversation/{conversationId}/Objective/Complete when it is achieved,\r\n            then set the next mutually beneficial objective. Shared files are available at Conversation/{conversationId}/Attachments.\r\n            Call after processing incoming messages, not merely checking whether unreads exist.\r\n            Read-state is shared by all users in the partner organization.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "description": "The conversation ID to mark as read for the partner organization.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the operation succeeded."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Cart/{cartName}": {
      "get": {
        "tags": [
          "Cart"
        ],
        "summary": "Retrieves a shopping cart by name.",
        "description": "Fetches the open cart named cartName (header, line items, pricing, opportunity details).\r\nWhen shipping to an existing customer, the response includes possible ShipTos.\r\nIf the cart does not exist, an empty cart structure is returned.\r\nTypical flow: inspect cart → add items → `POST .../Cart/ShippingMethods/{cartName}` → `POST .../Cart/ProcessNew/{cartName}`.\r\nList carts with `GET .../Carts` (ShipTos excluded there).\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize cart name, lines (SKU/qty/price), and total; do not dump every opportunity field.</description></item><item><description>Use returned ShipTos when the user wants delivery to an existing customer; confirm the destination before checkout.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cartName",
            "in": "path",
            "description": "The name of the cart to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The complete cart information with all items and pricing details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cart"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this cart.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Cart"
        ],
        "summary": "Deletes a shopping cart by name.",
        "description": "Permanently deletes the open cart named cartName. This cannot be undone.\r\nTo wipe every cart, `DELETE V4/Reseller/{routeResellerId}/Carts` is even higher impact.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the exact cart name with the user before deleting; list items from GET cart first if they may still want them.</description></item><item><description>This does not cancel an order — only an unprocessed cart is removed.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cartName",
            "in": "path",
            "description": "The name of the cart to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the cart was successfully deleted."
          },
          "401": {
            "description": "The user is not authorized to delete this cart.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Cart/Generate/{postalCode}": {
      "post": {
        "tags": [
          "Cart"
        ],
        "summary": "Generates a recommended shopping cart for a postal code.",
        "description": "Queues a job to create a cart of products popular or recommended for postalCode.\r\nContents may not be available immediately because generation is asynchronous.\r\nAfter the job completes, retrieve carts with `GET .../Carts` or `GET .../Cart/{cartName}`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the postal code; this creates a new cart asynchronously and may take time to fill.</description></item><item><description>Do not tell the user the cart is ready until they can see it via GET carts; do not checkout a recommended cart without reviewing items.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postalCode",
            "in": "path",
            "description": "The postal code used to determine product recommendations.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the job to generate the recommended cart was successfully started."
          },
          "401": {
            "description": "The user is not authorized to generate a recommended cart.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Cart/AddItem/{cartName}/{randmarSKU}": {
      "post": {
        "tags": [
          "Cart"
        ],
        "summary": "Adds or removes a cart line using a specific opportunity (bid).",
        "description": "Adds quantity of randmarSKU to cartName.\r\nUse a negative quantity to remove; to clear a line, send the negative of the current quantity.\r\nOptional bidNumber applies that opportunity's pricing.\r\nThe cart is created if it does not exist.\r\nFor default manufacturer pricing use `POST .../AddItem/{cartName}/{randmarSKU}/DefaultOpportunity`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat cart name, SKU, quantity (and bid number if used) before changing the cart.</description></item><item><description>This is not checkout — confirm again before `ProcessNew`. Resolve SKU via `GET .../Product/{randmarSKU}` if the user gave an MPN.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cartName",
            "in": "path",
            "description": "The name of the cart to modify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product to add.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "description": "The quantity of the product to add. Use a negative number to remove items. Defaults to 1.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "bidNumber",
            "in": "query",
            "description": "The specific bid or opportunity number to apply to this item.",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the item was successfully added to the cart."
          },
          "401": {
            "description": "The user is not authorized to modify this cart.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Cart/AddItem/{cartName}/{randmarSKU}/DefaultOpportunity": {
      "post": {
        "tags": [
          "Cart"
        ],
        "summary": "Adds or removes a cart line using the default opportunity.",
        "description": "Adds or removes randmarSKU on cartName using the reseller's default\r\nopportunity for that manufacturer (see `PUT .../Opportunity/{manufacturerId}/Default`).\r\nNegative quantity removes; to fully remove a line, send the negative of the current quantity.\r\nIf you only have an MPN, resolve the Randmar SKU via product lookup first.\r\nThe cart is created if it does not exist.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat cart name, SKU, and quantity before calling; this changes cart contents but does not place an order.</description></item><item><description>If a specific bid was requested, use `POST .../AddItem/{cartName}/{randmarSKU}` with `bidNumber` instead of the default.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cartName",
            "in": "path",
            "description": "The name of the cart to add the item to.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product to add.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "description": "The quantity of the product to add (default: 1).",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the item was successfully added to the cart."
          },
          "401": {
            "description": "The user is not authorized to modify this cart.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Cart/ShippingMethods/{cartName}": {
      "post": {
        "tags": [
          "Cart"
        ],
        "summary": "Gets available shipping methods and estimated costs for a cart.",
        "description": "Use this when the user wants delivery instead of pickup. Call it before checkout and pass a returned\r\nshipping method ID into `POST V4/Reseller/{routeResellerId}/Cart/ProcessNew/{cartName}`.\r\nOnly a subset of `orderDetails` is required: ShipTo Name, Street1, Street2 (may be empty), City,\r\nProvince (2-letter CA/US), PostalCode, Country (CA or US).\r\nExisting-customer ShipTos are on `GET .../Cart/{cartName}`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Confirm the ship-to address with the user, then present carrier/service/price as a short list — do not dump raw rate rows.</description></item><item><description>Do not invent a shipping method ID; only use IDs returned here at ProcessNew.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cartName",
            "in": "path",
            "description": "The name of the cart to price for delivery.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The destination shipping address used to calculate available delivery methods.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ShipToDetails"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipToDetails"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipToDetails"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ShipToDetails"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the delivery options and their costs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingMethodApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "The provided shipping address was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to do this.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Cart/Process/{cartName}": {
      "post": {
        "tags": [
          "Cart"
        ],
        "summary": "(Legacy) Processes a cart, turning it into an order.",
        "description": "This endpoint processes a cart and creates a corresponding sales order.\r\nIt is considered a legacy endpoint. For new integrations, please use the `ProcessNew/{cartName}` endpoint which uses a strongly-typed input model.\r\nThe `shipToLocation` parameter is expected in the request body.",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The application ID of the user/reseller.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cartName",
            "in": "path",
            "description": "The name of the cart to process.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The shipping and order details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ShipToLocation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipToLocation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipToLocation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ShipToLocation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns an object containing the `OrderNumber` and `IpAddress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessOrderLegacyResponse"
                }
              }
            }
          },
          "400": {
            "description": "The order could not be created with the provided information. Ensure the reseller account is not on hold, and the address is valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to checkout this cart.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Cart/ProcessNew/{cartName}": {
      "post": {
        "tags": [
          "Cart"
        ],
        "summary": "Processes a cart into an order using the current checkout model.",
        "description": "Use this endpoint when the user is ready to place the order for the items currently in the cart.\r\nThe information provided in `ProcessCartInput` is intended for the reseller or the end user receiving the order.\r\nDo not include any information about Randmar or Randmar Assistant in `ProcessCartInput`.\r\n            \r\nInput rules and expectations:\r\n- `OrderOnHold` is ignored: checkout does not place the created order on hold.\r\n- `FutureOrderDate` is passed to the order header as ShipmentDate; it is not a guaranteed delivery date.\r\n- Do not send `null` for regular string fields.\r\n- Use an empty string for optional text fields you want ignored, including `Street2`, `CustomerPO`,\r\n  `ShippingSlipFileB64`, `Comment`, `ShippingMethodId`, and `ShippingSlipComment`.\r\n- `FutureOrderDate` may be null when no future shipment date is requested.\r\n- Always populate `ContactName` and `ContactPhone`, even when the user asks for the default values.\r\n- `CountryCode` must be `CA` or `US`.\r\n- `ProvinceCode` must be a two-letter Canadian province or US state code.\r\n- `PostalCode` must be a valid Canadian postal code or US ZIP code.\r\n- `AllowPartialShipment` should be `true` unless the user explicitly requests \"ship complete\" or \"do not split\".\r\n            \r\nShipping guidance:\r\n- If the order is shipping instead of pickup, call `POST V4/Reseller/{routeResellerId}/Cart/ShippingMethods/{cartName}`\r\n  first and use one of the returned shipping method IDs.\r\n- If the user provides a custom shipping slip, send it in `ShippingSlipFileB64` as base64.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>\r\nThis <b>places a live sales order</b>. Confirm cart name, ship-to, shipping method, PO, and contact with the user first.\r\nRepeat SKUs/quantities from the cart GET before calling.\r\n</description></item><item><description><b>Duplicate prevention:</b> search for an existing order by PO (`GET .../Order/PONumber/{resellerPONumber}`)\r\nbefore processing. If one exists, report that order number and do not process again.\r\n</description></item><item><description>\r\nFor delivery, get a shipping method ID from `POST .../Cart/ShippingMethods/{cartName}` first.\r\nDo not put Randmar or assistant branding in `ProcessCartInput`.\r\n</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cartName",
            "in": "path",
            "description": "The name of the cart to process.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The checkout details, including shipping address, shipping method, PO information, contact details, and shipment preferences.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessCartInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessCartInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessCartInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessCartInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns an object with OrderNumber. The source cart is deleted after order creation. Custom shipping-slip failures are recorded as order comments, not returned as warnings or used to roll back the order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessOrderNewResponse"
                }
              }
            }
          },
          "400": {
            "description": "The order could not be created with the provided information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to checkout this cart.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Carts": {
      "get": {
        "tags": [
          "Carts"
        ],
        "summary": "Lists all open shopping carts for a reseller.",
        "description": "Returns every open cart for routeResellerId, including cart name, line items, pricing, and opportunity details.\r\nShipTo destinations are excluded here; fetch a single cart with\r\n`GET V4/Reseller/{routeResellerId}/Cart/{cartName}` when you need possible ShipTos.\r\nTypical flow: list carts → add items → shipping methods → `POST .../Cart/ProcessNew/{cartName}`.\r\nIf no carts exist, an empty array is returned.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize cart names, item counts, and totals; do not dump every line item unless the user asks about a specific cart.</description></item><item><description>Ask which cart name to use before adding items or checking out.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of all open shopping carts for the reseller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Cart"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access these carts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Carts"
        ],
        "summary": "Deletes all open shopping carts for a reseller.",
        "description": "Permanently deletes every open cart for routeResellerId. This cannot be undone.\r\nPrefer deleting a single cart with `DELETE V4/Reseller/{routeResellerId}/Cart/{cartName}` unless the user\r\nexplicitly wants every cart removed.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>High-impact write: do not call until the user explicitly confirms deleting <b>all</b> open carts (repeat the reseller application ID).</description></item><item><description>List current cart names from `GET .../Carts` first so the user understands what will be lost.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if all carts were successfully deleted."
          },
          "401": {
            "description": "The user is not authorized to delete these carts.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Categories": {
      "get": {
        "tags": [
          "Categories"
        ],
        "summary": "Lists product categories for a manufacturer (margins are category-level).",
        "description": "Returns all product categories for this manufacturer. Product margins are always defined at the category level, not per SKU.\r\nFor one category's details or writes, use `GET/POST/PUT/DELETE V4/Manufacturer/{routeManufacturerId}/Category/{categoryCode}`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize category codes and names (and starred/auto-reorder flags if relevant). Do not dump every category object.</description></item><item><description>When inserting a product, pick an existing `categoryCode` from this list rather than inventing one.</description></item></list>\r\nReturns category records scoped to this manufacturer. Use each returned `CategoryCode` in category operations; the category name is not the route identifier.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of manufacturer categories.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ManufacturerCategory"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Categories/Niches": {
      "get": {
        "tags": [
          "Categories"
        ],
        "summary": "Lists all available product niches (cross-manufacturer).",
        "description": "Returns product niches from all manufacturers. routeManufacturerId is used for authorization only.\r\nUse this when suggesting or assigning a niche while creating or editing a product or category.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Offer a short list of niches that match the user's product type; do not paste the entire niche catalog.</description></item></list>\r\nThis is the shared niche catalog, not a list filtered to the manufacturer. Manufacturer authorization is still required.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of product niches.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductNiche"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Category/{categoryCode}": {
      "get": {
        "tags": [
          "Category"
        ],
        "summary": "Gets details for a specific product category.",
        "description": "Returns one category by categoryCode (name, stocking, auto-reorder, niche, starred, etc.).\r\nObtain the code from `GET .../Categories`. Use this as read-before-write before update/reset/delete.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize the category name, code, and operational flags relevant to the question.</description></item></list>\r\nIncludes inventory value, active order details, sales statistics, and the category product list. Per-product distribution data is added only when the category has fewer than 60 products.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Path parameter. The category code. Resolve from `GET .../Categories` if the user gave a name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested category's information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManufacturerCategory"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "put": {
        "tags": [
          "Category"
        ],
        "summary": "Creates a new product category for the manufacturer.",
        "description": "Adds categoryCode to this manufacturer's category list. Check `GET .../Categories` first to avoid duplicates.\r\nAfter create, set name/flags via UpdateCategoryInformation if needed.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the new category code (and intended name) before creating. Do not invent codes that collide with existing ones.</description></item></list>\r\nCreates an accounting category with margins derived from the manufacturer’s existing categories. A duplicate trimmed category name, an unavailable manufacturer, or exceeding the service category-count limit yields no category code.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Path parameter. The code for the new category (unique for this manufacturer).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the creation was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Category"
        ],
        "summary": "Deletes a product category.",
        "description": "Permanently removes the category from the manufacturer. Products still assigned to this code may be affected.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the category code and that the user wants it deleted. Prefer listing products in that category first if the catalog is in use.</description></item></list>\r\nThe category must belong to this manufacturer and contain no products. Otherwise the service returns `false` with HTTP 200. Successful deletion also removes the accounting category.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Path parameter. The category code to delete. Resolve from `GET .../Categories`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the deletion was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Category/{categoryCode}/{fieldName}": {
      "post": {
        "tags": [
          "Category"
        ],
        "summary": "Updates a specific field of a category.",
        "description": "Updates one text field on the category. Allowed fieldName values:\r\nWeeksOfStocking, CategoryName, Starred, AutoReorder, QualificationRequired, or Niche.\r\nFetch the category first and use the JSON field name exactly (case-sensitive).\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat category code, field name, current value, and new value. Require confirmation—AutoReorder and WeeksOfStocking change replenishment behavior.</description></item></list>\r\nUnsupported field names or an unknown manufacturer category return `false` with HTTP 200. Setting `WeeksOfStocking` to an empty value or the manufacturer default clears that category override.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Path parameter. The category code to update. Resolve from `GET .../Categories`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldName",
            "in": "path",
            "description": "Path parameter. Field to update: \"WeeksOfStocking\", \"CategoryName\", \"Starred\", \"AutoReorder\", \"QualificationRequired\", or \"Niche\". Case-sensitive; use the name from the category JSON.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query parameter. The new value for the field.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Category/{categoryCode}/A_GP": {
      "post": {
        "tags": [
          "Category"
        ],
        "summary": "Updates the 'A' level profit margin for a category.",
        "description": "This endpoint updates the 'A' gross profit margin percentage for a given category. Requires Echo authorization.\r\n\r\nRequires Echo authorization. The service accepts values from 0 through 250 inclusive and returns `false` for an out-of-range value or an unknown category. A successful change synchronizes the accounting category and refreshes product price levels.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Path parameter. The code of the category to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query parameter. New margin value from 0 through 250 inclusive.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action (requires Echo authorization).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Category/{categoryCode}/B_GP": {
      "post": {
        "tags": [
          "Category"
        ],
        "summary": "Updates the 'B' level profit margin for a category.",
        "description": "This endpoint updates the 'B' gross profit margin percentage for a given category. Requires Echo authorization.\r\n\r\nRequires Echo authorization. The service accepts values from 0 through 250 inclusive and returns `false` for an out-of-range value or an unknown category. A successful change synchronizes the accounting category and refreshes product price levels.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Path parameter. The code of the category to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query parameter. New margin value from 0 through 250 inclusive.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action (requires Echo authorization).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Category/{categoryCode}/C_GP": {
      "post": {
        "tags": [
          "Category"
        ],
        "summary": "Updates the 'C' level profit margin for a category.",
        "description": "This endpoint updates the 'C' gross profit margin percentage for a given category. Requires Echo authorization.\r\n\r\nRequires Echo authorization. The service accepts values from 0 through 250 inclusive and returns `false` for an out-of-range value or an unknown category. A successful change synchronizes the accounting category and refreshes product price levels.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Path parameter. The code of the category to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query parameter. New margin value from 0 through 250 inclusive.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action (requires Echo authorization).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Category/{categoryCode}/D_GP": {
      "post": {
        "tags": [
          "Category"
        ],
        "summary": "Updates the 'D' level profit margin for a category.",
        "description": "This endpoint updates the 'D' gross profit margin percentage for a given category. Requires Echo authorization.\r\n\r\nRequires Echo authorization. The service accepts values from 0 through 250 inclusive and returns `false` for an out-of-range value or an unknown category. A successful change synchronizes the accounting category and refreshes product price levels.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Path parameter. The code of the category to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query parameter. New margin value from 0 through 250 inclusive.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action (requires Echo authorization).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Category/{categoryCode}/Cost_GP": {
      "post": {
        "tags": [
          "Category"
        ],
        "summary": "Updates the 'Cost' level profit margin for a category.",
        "description": "This endpoint updates the 'Cost' gross profit margin percentage for a given category. Requires Echo authorization.\r\n\r\nRequires Echo authorization. The service accepts values from 0 through 250 inclusive and returns `false` for an out-of-range value or an unknown category. A successful change synchronizes the accounting category and refreshes product price levels.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Path parameter. The code of the category to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query parameter. New margin value from 0 through 250 inclusive.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action (requires Echo authorization).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Category/{categoryCode}/Reset": {
      "post": {
        "tags": [
          "Category"
        ],
        "summary": "Resets a category's information to its default values.",
        "description": "Reverts custom settings for the category back to system defaults (name, stocking, flags, etc.).\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Fetch the category first, list the custom values that will be lost, and require explicit confirmation of categoryCode.</description></item></list>\r\nClears only the category overrides for `LeadTime`, `MinimumOrder`, and `WeeksOfStocking`. Category margins, name, niche, and other settings are not reset.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Path parameter. The category code to reset. Resolve from `GET .../Categories`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the reset was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Category/{categoryCode}/Starred": {
      "put": {
        "tags": [
          "Category"
        ],
        "summary": "Toggles the starred (favorite) status of a category.",
        "description": "Marks the category as a favorite or removes the favorite status. Fetch the category first to know the current Starred value.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Repeat the category code and whether you are starring or unstarring based on the current value; confirm if the user did not explicitly ask to toggle.</description></item></list>\r\nThis operation toggles the current value. Starring is refused when the category contains more than 30 products; un-starring an already starred category is allowed. Read the category after retries to avoid toggling twice.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Path parameter. The category code to star or un-star.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the toggling was a success."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Category/{categoryCode}/Image": {
      "post": {
        "tags": [
          "Category"
        ],
        "summary": "Updates the image for a category.",
        "description": "This endpoint uploads and sets a new image for the specified product category. The image should be sent as form data.\r\n\r\nSend the image as a multipart form file. A missing file returns HTTP 204; a supplied file is applied only to a category belonging to this manufacturer.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Path parameter. The code of the category to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "Multipart form field. The image file to upload.",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the image update was successful."
          },
          "204": {
            "description": "No file was provided in the request."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "The service returned false or no result; the requested operation was not reported successful."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/User": {
      "get": {
        "tags": [
          "CurrentUser"
        ],
        "summary": "Gets the current user's profile and notification preferences.",
        "description": "Returns the user represented by the current authentication token.\r\n\r\nThe response includes identity and account metadata such as `EmailAddress`, `Name`, `Role`, `Language`, `Active`,\r\n`CreationDate`, `LastAuthentication`, and `Notifications`.\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Call first:</b> invoke this endpoint before performing any write/high-impact operations.</description></item><item><description><b>Use notifications:</b> use `Notifications` to determine what events the user wants to be alerted about.</description></item><item><description><b>Do not echo secrets:</b> never ask the user to paste tokens; treat identity data as sensitive.</description></item><item><description>\r\nIf `Name`, `Role`, or `Language` is null or empty, recommend filling it. Ask the user for the value\r\n(do not invent it) and update via `POST V4/User/{fieldName}` after confirmation.\r\n</description></item></list>",
        "responses": {
          "200": {
            "description": "The current user (Types.User).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized (token invalid/expired).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/User/{fieldName}": {
      "post": {
        "tags": [
          "CurrentUser"
        ],
        "summary": "Updates a field on the current user's profile.",
        "description": "Updates a single user field identified by fieldName.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the exact change (field + new value) and obtain explicit confirmation before calling.</description></item><item><description>Avoid guessing field names; use the exact field names supported by the service: `Name`, `Role`, `Language`, or `Active`.</description></item></list>",
        "parameters": [
          {
            "name": "fieldName",
            "in": "path",
            "description": "The profile field to edit (`Name`, `Role`, `Language`, or `Active`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new value to set.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update succeeded."
          },
          "401": {
            "description": "Unauthorized (token invalid/expired).",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Customer": {
      "get": {
        "tags": [
          "Customer"
        ],
        "summary": "Gets information about a specific customer of a reseller.",
        "description": "Retrieves details for a customer by customerName. Use this to pre-fill ShipTo fields\r\nbefore `POST V4/Reseller/{routeResellerId}/Cart/ShippingMethods/{cartName}` or checkout\r\n(`POST .../Cart/ProcessNew/{cartName}`).\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Repeat the customer name back and confirm it is the intended ship-to before using the address at checkout.</description></item><item><description>If the customer is not found, ask the user for a different name rather than inventing an address.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerName",
            "in": "query",
            "description": "The name of the customer to retrieve.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The customer's information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Document/{documentNumber}": {
      "get": {
        "tags": [
          "Document"
        ],
        "summary": "Gets a document by number (order, shipment, invoice, credit, payment, or statement).",
        "description": "Fetches a document by documentNumber. Type is indicated by prefix:\r\nOrder (O, e.g. OW01099999), Shipment (SH), Invoice (IN), Credit Note (CN), Payment (PY),\r\nor pass `STATEMENT` for the account statement.\r\n\r\nFor order questions and catalog reconciliation, first resolve and read\r\n`GET V4/Partner/{routeResellerId}/GeneralDocument/{generalDocumentNumber}?withSpecification=true`.\r\nUse this individual-document route when no General Document is available or exact invoice/order lines are required.\r\nSupply the exact operational order number (including any suffix) or InvoiceNumber returned by General Document InvoiceHeaders\r\nor Billing/Invoices. Do not send an invoice number to the GeneralDocument route.\r\nOrder, shipment, invoice, and credit lines are in `PartNumbers`, with charges in `Charges`.\r\nThis is a different shape from General Document's ActiveOrderDetails/CompletedOrderDetails.\r\nGET retrieves existing records; it does not create an invoice, change an order, or send email.\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Confirm the document number (and prefix) with the user; summarize header, status, and totals rather than every line.</description></item><item><description>Prefer the General Document for consolidated context, then use this route for the exact document required; do not invoke mutation or email endpoints for read-only reconciliation.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "The document number (e.g., OW01046633, IN12345) or \"STATEMENT\" for statement documents.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested document details with complete information including header data, line items, and charges if applicable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDocument"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No document of the indicated type was found for this reseller, or the prefix is unsupported."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Document/FormalNotice": {
      "get": {
        "tags": [
          "Document"
        ],
        "summary": "Generates a formal notice PDF document.",
        "description": "This endpoint creates a formal notice in PDF format for a specified amount. This is typically used for collections or legal purposes.",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The application ID of the Reseller making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "amount",
            "in": "query",
            "description": "The amount to be specified in the formal notice.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The generated formal notice as a PDF file."
          },
          "400": {
            "description": "The formal notice could not be generated.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to generate a formal notice.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Document/{documentNumber}/Warehouse": {
      "get": {
        "tags": [
          "Document"
        ],
        "summary": "(Internal) Retrieves a warehouse-specific document as a PDF.",
        "description": "This endpoint is for internal use to fetch a document related to warehouse operations, such as a picking slip or a bill of lading, in PDF format.\r\nIt is not intended for public use.",
        "parameters": [
          {
            "name": "documentNumber",
            "in": "path",
            "description": "The number of the document to retrieve (e.g., shipment number).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "routeResellerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested warehouse document as a PDF file."
          },
          "400": {
            "description": "The document could not be found or generated.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this document.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Document/{documentNumber}/PDF": {
      "get": {
        "tags": [
          "Document"
        ],
        "summary": "Retrieves a document as a PDF file.",
        "description": "This endpoint fetches the PDF representation of a specific document, such as an invoice or order confirmation.",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The application ID of the Reseller making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "The number of the document to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested document as a PDF file."
          },
          "400": {
            "description": "The document could not be found or generated.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this document.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Document/{documentNumber}/Email": {
      "post": {
        "tags": [
          "Document"
        ],
        "summary": "Emails a document to a recipient.",
        "description": "Sends documentNumber (order, invoice, shipment, etc.) to emailAddress,\r\nwith an optional comment in the body.\r\nFor the account statement specifically, prefer `POST .../Document/Statement/Email`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm document number and the exact recipient email; this sends a real email with commercial documents.</description></item><item><description>Do not send to an address the user did not provide.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "The number of the document to send.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "description": "An optional comment to include in the email.",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to send the document.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Document/Statement/Email": {
      "post": {
        "tags": [
          "Document"
        ],
        "summary": "Emails the reseller's account statement.",
        "description": "Sends the current account statement to emailAddress with an optional comment.\r\nFor JSON statement lines use `GET .../Billing/StatementDetails`; for a specific invoice use\r\n`POST .../Document/{documentNumber}/Email`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the recipient email; this emails financial statement data.</description></item><item><description>Do not send the statement to a third party unless the user explicitly names that address.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "description": "An optional comment to include in the email.",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to send the statement.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Document/{documentNumber}/EDI": {
      "post": {
        "tags": [
          "Document"
        ],
        "summary": "Sends an invoice via EDI.",
        "description": "Transmits documentNumber (typically an invoice) through Electronic Data Interchange.\r\nUse only when the reseller's trading partner expects EDI; this is not a substitute for emailing a PDF.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the invoice/document number; this sends a live EDI transaction to the trading partner.</description></item><item><description>Do not retry blindly on 400 — ask whether the document is already sent or not EDI-enabled.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "The invoice number to be sent.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The document was successfully sent via EDI."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Document/{documentNumber}/TrackingNumber": {
      "post": {
        "tags": [
          "Document"
        ],
        "summary": "Adds a tracking number to a shipment or invoice attributed to the partner.",
        "description": "Requires a shipment or invoice in an accessible partner warehouse, a shipment reference, and no existing tracking number. Updates stored tracking only; does not book or void a courier shipment.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "The shipment or invoice number.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trackingNumber",
            "in": "query",
            "description": "The tracking number to add.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON true: the stored tracking number was added."
          },
          "400": {
            "description": "Tracking is blank, or the document, warehouse access, shipment reference, or existing tracking state prevents the update.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to manage this partner's documents.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "put": {
        "tags": [
          "Document"
        ],
        "summary": "Edits the tracking number on a shipment or invoice attributed to the partner.",
        "description": "Requires a shipment or invoice in an accessible partner warehouse, a shipment reference, and an existing tracking number. Updates stored tracking only; does not book or void a courier shipment.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "The shipment or invoice number.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trackingNumber",
            "in": "query",
            "description": "The replacement tracking number.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON true: the stored tracking number was edited."
          },
          "400": {
            "description": "Tracking is blank, or the document, warehouse access, shipment reference, or existing tracking state prevents the update.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to manage this partner's documents.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Document"
        ],
        "summary": "Deletes the tracking number from a shipment or invoice attributed to the partner.",
        "description": "Requires a shipment or invoice in an accessible partner warehouse, a shipment reference, and an existing tracking number. Updates stored tracking only; does not book or void a courier shipment.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "The shipment or invoice number.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON true: the stored tracking number was deleted."
          },
          "401": {
            "description": "The user is not authorized to manage this partner's documents.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "The document, warehouse access, shipment reference, or existing tracking state prevents removal."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Document/{documentNumber}/PDF": {
      "get": {
        "tags": [
          "Document"
        ],
        "summary": "Retrieves a document as a PDF file.",
        "description": "This endpoint fetches the PDF representation of a specific document, such as an invoice or order confirmation.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The application ID making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "The number of the document to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested document as a PDF file."
          },
          "400": {
            "description": "The document could not be found or generated.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this document.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Document/{documentNumber}": {
      "get": {
        "tags": [
          "Document"
        ],
        "summary": "Gets a specific document by its number (PO, RCP, or RQN).",
        "description": "Returns a Purchase Order (PO), Receipt (RCP), or Requisition (RQN) identified by documentNumber.\r\nObtain the number from Documents list endpoints or from create/cancel responses.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize header (type, number, status, dates) and notable lines. Use this as read-before-write before canceling a PO/RQN or emailing the document.</description></item></list>\r\nRecognized prefixes are `PO`, `RCP`, and `RQN`, matched after uppercasing the supplied number. Other prefixes have no document result. Purchase orders include their receipt list; all recognized document types include line items.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "Path parameter. The document number (typically starts with PO, RCP, or RQN). Resolve from Documents lists if unknown.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested document's data."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Document/{documentNumber}/PDF": {
      "get": {
        "tags": [
          "Document"
        ],
        "summary": "Gets a PDF version of a specific document.",
        "description": "This endpoint retrieves a PDF representation of a document, identified by its accounting document number.\r\n\r\nReturns a binary PDF download named `{documentNumber}.pdf`. If the document service returns no bytes, this action returns HTTP 400 rather than a file.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "Path parameter. The unique number of the document to retrieve as a PDF.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The PDF file of the document.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "The document could not be converted to PDF or was not found.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Document/{documentNumber}/Email": {
      "post": {
        "tags": [
          "Document"
        ],
        "summary": "Emails a document (PO, RCP, or RQN) to a recipient.",
        "description": "Sends the document to emailAddress with an optional comment in the body.\r\nPrefer `GET .../Document/{documentNumber}` when the user only wants to inspect the document in chat.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Require explicit confirmation of the document number and recipient email before sending. Repeat both back to the user.</description></item></list>\r\nSends both PDF and JSON attachments to the supplied email address and the authenticated caller’s application-name address. A nonempty comment replaces the default body text; include the manufacturer/reseller identity and responsible reply contact when writing a custom message for internal or external recipients.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "Path parameter. The document number to send (PO, RCP, or RQN).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query parameter. The recipient email address. Confirm with the user; do not guess.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "description": "Query parameter. Optional comment included in the email body.",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Document/SalesOrder/{orderNumber}/Execute": {
      "put": {
        "tags": [
          "Document"
        ],
        "summary": "Requests expedited handling of a sales order.",
        "description": "Sets the sales order priority to `M`, runs general maintenance, and records an internal request to expedite. It does not confirm shipment or invoicing.\r\nFetch the order first with `GET .../Document/SalesOrder/{orderNumber}`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat the order number and a short status summary; require explicit confirmation before executing.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "Path parameter. The sales order number to execute. Resolve from ActiveOrderDetails if unknown.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Boolean result of updating the order priority. A false result means the order could not be found or the priority update failed."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Document/SalesOrder/{orderNumber}": {
      "get": {
        "tags": [
          "Document"
        ],
        "summary": "Gets details for a specific sales order.",
        "description": "Returns one sales order by orderNumber. Obtain the number from ActiveOrderDetails or CompletedOrderDetails.\r\nUse this before canceling a product on the order or executing the order.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize customer/reseller, status, and line SKUs/qty. Do not dump full specifications unless asked.</description></item></list>\r\nThe service always includes the reseller profile. With `withSpecification=false`, no result is returned when neither active nor completed order lines exist.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "Path parameter. The sales order number. Resolve from ActiveOrderDetails or CompletedOrderDetails if unknown.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Query parameter. Defaults to true. False additionally loads ActiveOrderDetails and CompletedSalesOrderDetails; this flag does not request product specifications in this service.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested sales order's data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Documents/ActiveOrderDetails": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists line-item details for the reseller's active orders.",
        "description": "Returns granular product lines currently on order for routeResellerId.\r\nUse this when the user asks what SKUs are open, not just order headers\r\n(`GET V4/Reseller/{routeResellerId}/Orders` or `GET .../Documents/GeneralDocuments`).\r\nFor one order or purchase-reconciliation question, prefer\r\n`GET V4/Partner/{routeResellerId}/GeneralDocument/{generalDocumentNumber}?withSpecification=true`, resolving its number through Partner Search.\r\nThis bulk endpoint returns active lines only, not complete historical purchases or all invoiced lines.\r\nLine fields include RandmarSKU, MPN, Quantity, UnitPrice, DocumentType, DocumentNumber, and OrderNumber.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize by SKU, quantity, and order number; do not dump every raw row when the list is large.</description></item><item><description>Filter to the SKU or order the user named before presenting results.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of active order details for the reseller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderDetail"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this reseller's documents.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Documents/GeneralDocuments": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists active general documents (open orders and in-process shipments) for a reseller.",
        "description": "Returns open orders, pending shipments, and in-process documents as `GeneralDocument` objects\r\n(order numbers, dates, shipping, status). A single general document may contain multiple order headers.\r\nPrefer `GET V4/Partner/{routeResellerId}/GeneralDocuments` for new integrations, then\r\n`GET V4/Partner/{routeResellerId}/GeneralDocument/{orderNumber}?withSpecification=true` for line items.\r\nCompleted documents are excluded from this active list; use Partner Search to resolve a historical identifier when available.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize document/order numbers and status; do not dump every header and line.</description></item><item><description>Before canceling, inspect OrderHeaders — cancel applies per order number, not the whole document.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "An array of general documents for the reseller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeneralDocumentOld"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this reseller's documents.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Documents/Requisitions": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists requisitions (draft purchases) for a manufacturer.",
        "description": "Requisitions are draft purchases that have not yet been converted into formal purchase orders.\r\nUse this to find requisition numbers before creating a PO or editing/canceling a requisition.\r\nRelated writes: `PUT/POST/DELETE V4/Manufacturer/{routeManufacturerId}/Requisition`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize open requisitions (number, location, reference). Requisitions feed into purchase orders—do not create a PO until the user confirms the requisition list.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of requisitions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Requisition"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Document/Requisitions": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists requisitions (draft purchases) for a manufacturer.",
        "description": "Requisitions are draft purchases that have not yet been converted into formal purchase orders.\r\nUse this to find requisition numbers before creating a PO or editing/canceling a requisition.\r\nRelated writes: `PUT/POST/DELETE V4/Manufacturer/{routeManufacturerId}/Requisition`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize open requisitions (number, location, reference). Requisitions feed into purchase orders—do not create a PO until the user confirms the requisition list.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of requisitions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Requisition"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Documents/PurchaseOrders": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists purchase orders for a manufacturer.",
        "description": "Returns purchase orders for this manufacturer. Use a document number from this list with\r\n`GET V4/Manufacturer/{routeManufacturerId}/Document/{documentNumber}` for full PO details.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize PO numbers, status, and expected dates. For line-level edits or cancel/send, use the PurchaseOrder controller after confirming the PO number.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of purchase orders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PurchaseOrder"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Document/PurchaseOrders": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists purchase orders for a manufacturer.",
        "description": "Returns purchase orders for this manufacturer. Use a document number from this list with\r\n`GET V4/Manufacturer/{routeManufacturerId}/Document/{documentNumber}` for full PO details.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize PO numbers, status, and expected dates. For line-level edits or cancel/send, use the PurchaseOrder controller after confirming the PO number.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of purchase orders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PurchaseOrder"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Documents/Receipts": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists receipts for a manufacturer.",
        "description": "Returns receipts for goods received against this manufacturer's purchase activity.\r\nOpen a single receipt with `GET .../Document/{documentNumber}` (RCP numbers).\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize recent receipts (number, date, related PO). Do not dump every receipt line.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of receipts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Receipt"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Document/Receipts": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists receipts for a manufacturer.",
        "description": "Returns receipts for goods received against this manufacturer's purchase activity.\r\nOpen a single receipt with `GET .../Document/{documentNumber}` (RCP numbers).\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize recent receipts (number, date, related PO). Do not dump every receipt line.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of receipts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Receipt"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Documents/Invoices": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists invoices for a manufacturer.",
        "description": "Returns the manufacturer’s vendor invoice records. The singular manufacturer Document JSON endpoint supports PO, RCP, and RQN numbers, so it is not a general lookup for these invoice records.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize invoice numbers, dates, and amounts. Prefer a date-bounded claim/sales report if the user wants a period export.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of invoices.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VendorDocument"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Document/Invoices": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists invoices for a manufacturer.",
        "description": "Returns the manufacturer’s vendor invoice records. The singular manufacturer Document JSON endpoint supports PO, RCP, and RQN numbers, so it is not a general lookup for these invoice records.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize invoice numbers, dates, and amounts. Prefer a date-bounded claim/sales report if the user wants a period export.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of invoices.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VendorDocument"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Documents/ActiveOrderDetails": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists line details of active (not yet completed) orders for a manufacturer.",
        "description": "Returns line items from active (not yet completed or shipped) sales orders for this manufacturer.\r\nThis can be a large list. For one order, use `GET .../Document/SalesOrder/{orderNumber}`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize open orders (order numbers, SKUs, quantities outstanding). Do not paste the full line array.</description></item><item><description>Related: open-orders report JSON under Report if the user wants a report-shaped view.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of active order details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderDetail"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Document/ActiveOrderDetails": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists line details of active (not yet completed) orders for a manufacturer.",
        "description": "Returns line items from active (not yet completed or shipped) sales orders for this manufacturer.\r\nThis can be a large list. For one order, use `GET .../Document/SalesOrder/{orderNumber}`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize open orders (order numbers, SKUs, quantities outstanding). Do not paste the full line array.</description></item><item><description>Related: open-orders report JSON under Report if the user wants a report-shaped view.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of active order details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderDetail"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Documents/CompletedOrderDetails": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists line details of completed (shipped or invoiced) orders for a manufacturer.",
        "description": "Returns line items from completed orders. This is typically large; prefer a sales report with a date range when the user wants history.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Do not dump this list. If the user wants history, prefer `POST .../Report/Sales/JSON` with dates, or fetch a specific sales order.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of completed order details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderDetail"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Document/CompletedOrderDetails": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Lists line details of completed (shipped or invoiced) orders for a manufacturer.",
        "description": "Returns line items from completed orders. This is typically large; prefer a sales report with a date range when the user wants history.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Do not dump this list. If the user wants history, prefer `POST .../Report/Sales/JSON` with dates, or fetch a specific sales order.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of completed order details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderDetail"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/DraftPurchases": {
      "put": {
        "tags": [
          "DraftPurchases"
        ],
        "summary": "Queues generation of draft purchases for this manufacturer.",
        "description": "This endpoint queues up a job that creates requisitions for products that are below their reorder point, based on stocking levels and current inventory. This is useful for automating the reordering process.\r\n\r\nCreates a background job with automatic purchase-order creation disabled. The response only confirms whether the job was accepted; it does not contain requisition numbers or mean generation has finished. Read `GET .../Documents/Requisitions` after processing.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the background job was accepted; false if it was not accepted."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/Email": {
      "put": {
        "tags": [
          "Email"
        ],
        "summary": "Sends a Partner-scoped email to explicit recipients using polished HTML and optional URL-based attachments.\r\nThis is intended for high-value outbound communication rather than low-context notifications.",
        "description": "\r\n<b>Route</b>: `PUT V4/Partner/Email`\r\n\r\nUse this endpoint when the caller already knows the intended recipients and needs to send a curated HTML email.\r\n             The request body should include the recipient list, subject, HTML body, optional `ReplyTo`, and optional attachment URLs.\r\n\r\n<b>Recipient Security & Scope</b>\r\n\r\n<b>Recipient filtering:</b> For a non-internal application, explicit recipients must match account users,\r\n             workflow-referenced addresses, active Randmar/HQ team members, or `service@randmar.io`.\r\n             Matching currently uses exact address strings; unrecognized addresses are silently omitted.\r\n\r\nRandmar/HQ application contexts bypass this recipient filter. The current user's address and\r\n             `g@randmar.io` are always added as recipients, even when the explicit list becomes empty.\r\n             A successful send therefore does not prove every requested recipient was included.\r\n\r\n<b>Content Guidelines (AI Instructions)</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>\r\n      <b>Relevant context:</b> Include verified account and commerce details needed to answer the request. Keep a simple inquiry concise; do not add unrelated reports or unverified inventory or delivery claims.</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      <b>Human-Centric Identifiers:</b> When referencing data entities, always prioritize names, model numbers, or industry-standard identifiers. For example, use the <b>Manufacturer Part Number (MPN)</b> for products rather than the internal RandmarSKU, and use the <b>Order Number</b> or <b>Customer PO</b> for commerce records. Avoid exposing database GUIDs or system-only keys.</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      <b>Visual Presentation:</b>\r\n      `BodyHtml` must be formatted as a professional report. Use a centered container (max-width 800px) with clear headers and semantic status colors.</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      <b>Consolidation:</b> Avoid spamming. Consolidate related events into a single, comprehensive HTML summary.</description>\r\n  </item>\r\n</list>\r\n\r\n<b>Inquiry Attribution & Context (required)</b>\r\n\r\nWhen asking Randmar Customer Service, another internal team, or an external recipient to investigate or respond to an inquiry,\r\n             `BodyHtml` must identify the originating Partner by its human-readable business name.\r\n             Include the requesting contact's name and email address when they are known and appropriate to share.\r\n             Do not use a generic signature such as \"on behalf of Partner\" by itself; it does not give the\r\n             recipient enough context to reply or follow up. All messages are sent from `echo@randmar.io`, so the originating\r\n             organization and responsible contact must be clear in the message itself and, when appropriate, in `ReplyTo`.\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>\r\n      <b>Verify the requester:</b> Retrieve the current account/user context before composing the email. Use verified names and contact details only; do not infer or invent an organization or contact.</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      <b>State the question:</b> Clearly say what response is needed and who should receive it. For lead-time or restock inquiries, name the product, MPN, requested quantity when known, and the specific timing question. Include inventory, open-PO, or warehouse details only when sourced and useful.</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      <b>Keep reply paths usable:</b> Because delivery always originates from `echo@randmar.io`, set `ReplyTo` to the verified requester or responsible account user's email when that is the intended response path. If a different person should receive the answer, state that explicitly in the message.</description>\r\n  </item>\r\n</list>\r\n\r\n<b>Attachments (critical for AI agents)</b>\r\n\r\nAt most 10 non-null attachments are accepted, each with a nonblank FileName and Url and a 20 MiB download limit. Missing, empty, or rejected downloads prevent the send.\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Attachment URLs must be anonymously downloadable. The server fetches them without interactive login.</description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      <b>Required workflow:</b> Upload file bytes via `POST V4/Partner/{applicationId}/Generation/Upload`,\r\n             then pass the returned short-lived public URL exactly as returned.\r\n             </description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n      <b>Do not</b> use private Google Drive / SharePoint / login-gated viewer URLs—those produce a sign-in page, not the file.\r\n             </description>\r\n  </item>\r\n</list>\r\n\r\n<b>User Preferences</b>\r\n\r\nConsult the <b>User</b> endpoint to respect notification preferences and determine the appropriate identity for the `Reply-To` header.\r\n\r\n<b>Reply-To recommendation:</b> It is strongly recommended that `ReplyTo` be set to the email address of the user sending the request\r\n             (from `GET V4/User`) to keep email threads attributable and routable.\r\n             An empty or invalid ReplyTo is replaced with noreply@randmar.io; the API does not infer the requesting contact.\r\n\r\n<b>Email signature:</b> Always sign outbound emails with the sender display name `Randmar Assistant`\r\n             (append a signature block to `BodyHtml` if not already present).\r\n<para></para>",
        "requestBody": {
          "description": "The outbound email definition, including `ToEmails`, `Title`, `BodyHtml`, optional `ReplyTo`,\r\nand optional publicly accessible attachment URLs. Supply a non-null ToEmails array and nonblank Title and BodyHtml.\r\nInquiry messages must include the verified originating\r\nreseller/Partner and enough context for the recipient to respond.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/SendEmailRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendEmailRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendEmailRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendEmailRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Boolean true: the sending service returned success. This is not a delivery receipt or confirmation of the original recipient list."
          },
          "400": {
            "description": "The body is missing, or content/attachment checks or sending returned false (Result is false).",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized to send Partner-scoped email.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/Email/{notificationType}": {
      "put": {
        "tags": [
          "Email"
        ],
        "summary": "Sends a Partner-scoped email for a specific notification category, allowing the server to resolve the appropriate recipient set.",
        "description": "\r\n<b>Route</b>: `PUT V4/Partner/Email/{notificationType}`\r\n\r\nUse this endpoint when the email should be associated with a known notification workflow rather than a manually supplied recipient list.\r\n            The `notificationType` value determines which recipient audience is eligible to receive the message.\r\n            ToEmails is ignored on this route. The current user's address and g@randmar.io are appended to the resolved audience.\r\n            The caller's authenticated application selects the account; there is no target application ID in this email route.\r\n\r\nTo discover valid notification type values for the current Partner context, call\r\n            `GET V4/Partner/{routeApplicationId}/User/NotificationTypes` first.\r\n\r\nThe HTML quality, attachment rules, reply-to guidance, and privacy expectations are the same as for `PUT V4/Partner/Email`.\r\n            Keep the content actionable, consolidated, and professionally formatted.\r\n\r\nFor an inquiry notification, include the verified originating reseller/Partner name, the requesting contact when known,\r\n            the specific question, and the intended response path. Do not describe the sender only as \"Partner\" or use an\r\n            unverifiable identity.\r\n\r\n<b>Attachments (critical for AI agents)</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Attachment URLs must be anonymously downloadable. Upload via `POST V4/Partner/{applicationId}/Generation/Upload` and pass the returned URL exactly.</description>\r\n  </item>\r\n  <item>\r\n    <description>Do not use private Google Drive / SharePoint / login-gated viewer URLs.</description>\r\n  </item>\r\n</list>\r\n\r\n<b>AI Agent safety</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Confirm notification type, subject, and that the HTML is ready to send before calling—this emails a resolved audience.</description>\r\n  </item>\r\n  <item>\r\n    <description>Discover valid `notificationType` values from `GET .../User/NotificationTypes`; do not guess.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "notificationType",
            "in": "path",
            "description": "The logical notification category used by the server to identify the destination audience.\r\nRetrieve available values from `GET V4/Partner/{routeApplicationId}/User/NotificationTypes`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The outbound email definition, including subject, HTML body, optional `ReplyTo`,\r\nand optional publicly accessible attachment URLs.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/SendEmailRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendEmailRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendEmailRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendEmailRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Boolean true from the sending service; not a delivery receipt."
          },
          "400": {
            "description": "The body is missing, or content/attachment validation or sending returned false.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized to send Partner-scoped notification email.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/GeneralDocument/{generalDocumentNumber}": {
      "get": {
        "tags": [
          "GeneralDocument"
        ],
        "summary": "Gets a General Document; preferred read-only entry point for related orders, shipments, invoices, and product lines.",
        "description": "\r\n<b>Recommended read-only workflow:</b> List active records with `GET V4/Partner/{applicationId}/GeneralDocuments`,\r\n            or resolve an order, invoice, shipment, or reseller PO with `GET V4/Partner/{applicationId}/Search?q={identifier}`.\r\n            From a search result with `ContentType=GeneralDocument`, use `Content.OrderNumber` here.\r\n            For a reseller, applicationId is that reseller's partner account ID; the Partner route does not imply a different account.\r\n\r\n<b>Identifier:</b> Requires the exact original General Document OrderNumber, not a database GUID, reseller PO,\r\n            invoice number, or suffixed operational order number. For example, searching the illustrative `OW01234567B`\r\n            can return the original `OW01234567`. Use the returned identifier rather than blindly removing a suffix.\r\n            This GET itself does not resolve suffixes. A real order from `GET .../Reseller/{applicationId}/Orders`\r\n            is not guaranteed to have a matching original General Document.\r\n\r\n<b>Line items:</b> Set `withSpecification=true`. The default false response includes order/shipment headers,\r\n            reseller context, and logs, but omits `ActiveOrderDetails`, `CompletedOrderDetails`, and `InvoiceHeaders`.\r\n            The true response adds those three collections; lines are not named PartNumbers on this endpoint.\r\n\r\nUse line fields `RandmarSKU`, `ManufacturerId`, `ManufacturerName`, `MPN`,\r\n            `Quantity`, and `UnitPrice` for catalog matching. Keep `DocumentType`, `DocumentNumber`,\r\n            and `OrderNumber` to distinguish transaction stages; do not sum active and completed rows as independent purchases.\r\n            Product catalog prices are not a substitute for the historical line UnitPrice.\r\n\r\nRelated headers are matched by order-number prefix, while active/completed line queries use the exact original\r\n            OrderNumber against their respective views. A related header alone does not prove all its lines are in these collections;\r\n            use an exact individual-document read if needed lines are absent.\r\n\r\nFor exact posted invoice lines, use a returned `InvoiceHeaders[].InvoiceNumber` with\r\n            `GET V4/Reseller/{applicationId}/Document/{invoiceNumber}` and read `PartNumbers`.\r\n            Use individual Document reads as a fallback when no General Document can be resolved or when specific document lines are needed.\r\n            All reads in this workflow use GET; no checkout, order change, or email action is required.\r\n\r\n<b>AI Agent guidance</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Prefer General Document for order questions and reconciliation; resolve the original number through search before trying unrelated endpoints.</description>\r\n  </item>\r\n  <item>\r\n    <description>Use withSpecification=true for line-item questions. Missing detail collections with false are not evidence that the order has no products.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "generalDocumentNumber",
            "in": "path",
            "description": "Exact original OrderNumber from the active General Documents list or a GeneralDocument search result; not a suffixed operational order, invoice number, or PO.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Set true to include ActiveOrderDetails, CompletedOrderDetails, and InvoiceHeaders. Defaults to false; not merely a product-specification toggle.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "General Document object; line collections are included only when withSpecification=true.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralDocument"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "No accessible General Document was resolved (Result is null): missing original header, unsupported account role, reseller mismatch, or missing agency association. This does not prove an operational order or invoice does not exist."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/GeneralDocument/{generalDocumentNumber}/ShippingAddress": {
      "post": {
        "tags": [
          "GeneralDocument"
        ],
        "summary": "Updates the shipping address on a general document (order).",
        "description": "Replaces the ship-to address on the specified document. Read the document first so the current address can be compared.\r\nA successful update returns no content (204) even though 200 is declared on the action.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back document number and every address field (name, lines, city, province, postal, country) and obtain explicit confirmation.</description></item><item><description>Do not invent an address; shipping changes affect fulfillment.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "generalDocumentNumber",
            "in": "path",
            "description": "The order/document number whose ship-to address will change.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The replacement shipping address.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ShippingAddress"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShippingAddress"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ShippingAddress"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ShippingAddress"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "The address could not be applied to the document.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "The shipping address was updated; no response body."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/GeneralDocuments": {
      "get": {
        "tags": [
          "GeneralDocuments"
        ],
        "summary": "Lists active General Documents; recommended starting point for current order activity.",
        "description": "Read-only list for the partner's reseller and/or sales-agency roles. This is active activity, not a complete purchase or invoice history.\r\nFor reseller activity, completed General Documents are excluded. A partner without either supported role receives an empty list.\r\nUse each returned OrderNumber with `GET V4/Partner/{routeApplicationId}/GeneralDocument/{orderNumber}?withSpecification=true`\r\nto retrieve ActiveOrderDetails, CompletedOrderDetails, and InvoiceHeaders. Do not assume this list contains those detail collections.\r\nTo resolve an existing order, shipment, invoice, or PO not in the active list, use\r\n`GET V4/Partner/{routeApplicationId}/Search?q={identifier}` and select a GeneralDocument result when available.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize open orders (number, status, ship-to) rather than dumping every line.</description></item><item><description>Use a document number from this list for the single-document GET or shipping-address edit.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Active General Document records available to the partner; an empty array is valid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.GeneralDocument"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this partner's documents.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Generation/Text": {
      "post": {
        "tags": [
          "Generation"
        ],
        "summary": "Generates a text response from a conversation.",
        "description": "Send the conversation as a JSON array of ContentSubset messages. Returns the mapped generation result with Content and ContextUtilization; generated text is not confirmation that a business operation occurred.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "Partner account whose authorization and generation context are used.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Conversation messages in order, including roles and content parts.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ContentSubset"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ContentSubset"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ContentSubset"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ContentSubset"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "GenerationResult containing the generated content and context utilization.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationResult"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the account.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "The generation service returned no result."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Generation/GoogleGroundedText": {
      "post": {
        "tags": [
          "Generation"
        ],
        "summary": "Ask a Google-grounded assistant a question that requires up-to-date or general web facts.",
        "description": "Use this endpoint when the user's request requires information from the broader web (for example: recent news, factual lookups,\r\nor other public information such as product features and specifications). Requests are sent to a Google-grounded model that may\r\nconsult web resources to produce a concise, factual answer.\r\n            \r\nImportant behaviour and guidance:\r\n- The model will consult web resources; treat its answer as informational and verify with Randmar APIs before performing changes.\r\n- Keep prompts short in the Content parts; include a single User message in most cases.\r\n- If the user wants to act on any factual result (create/update/delete), follow up with deterministic Randmar API calls and confirmations.\r\n- Avoid using this endpoint for the analysis of an image which you could do yourself. E.g. merely by calling /Product/sku/Image\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Use only for public-web facts; verify with Randmar endpoints before any write.</description></item><item><description>Do not use this to inspect a product image you can fetch from Randmar product/media routes.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The conversation parts; typically a single User content with a single Text part.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateGoogleGroundedTextBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "your query here"
                      }
                    ],
                    "Role": "USER"
                  }
                ]
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateGoogleGroundedTextBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "your query here"
                      }
                    ],
                    "Role": "USER"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateGoogleGroundedTextBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "your query here"
                      }
                    ],
                    "Role": "USER"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateGoogleGroundedTextBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "your query here"
                      }
                    ],
                    "Role": "USER"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a ContentSubset containing the assistant's reply (usually a Text part) along with the usage percentage of the context.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationResult"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Generation/Image": {
      "post": {
        "tags": [
          "Generation"
        ],
        "summary": "Generate one or more images from a text description. Use this endpoint only when you mean to show the user an image (e.g. you know for sure that the origin is a randmar io frontend portal). \r\nIf you need instead to generate an image and get its URL for use in a subsequent call (e.g. add product image), use ImageUrl.",
        "description": "Use this endpoint whenever the user wants to create a new picture given a description (prompt). It returns an `ImageGenerationResult`\r\ncontaining optional `Text` and an `Images` array with `MimeType` and `Base64Data`.\r\n            \r\nParsing the response:\r\n- Extract the first image's base64 payload:\r\n  `jq -r '.Images[0].Base64Data' nano-banana-response-20260101-162029.json > img.b64`\r\n- Decode to a binary image file (choose extension based on `MimeType`, e.g. `image/png`):\r\n  `base64 -d img.b64 > img.png`\r\nPrefer `POST .../Generation/ImageUrl` when the image must be passed as a URL to another API.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Call only when you will show the user an image; confirm the prompt first (billable generation).</description></item><item><description>If a later endpoint needs a FileUrl, use ImageUrl or Generation/Upload instead of this base64 response.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Prompt and options for image generation.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateImageBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "A cute corgi wearing sunglasses, studio lighting"
                      }
                    ],
                    "Role": "USER"
                  }
                ],
                "AspectRatio": "1:1"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateImageBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "A cute corgi wearing sunglasses, studio lighting"
                      }
                    ],
                    "Role": "USER"
                  }
                ],
                "AspectRatio": "1:1"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateImageBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "A cute corgi wearing sunglasses, studio lighting"
                      }
                    ],
                    "Role": "USER"
                  }
                ],
                "AspectRatio": "1:1"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateImageBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "A cute corgi wearing sunglasses, studio lighting"
                      }
                    ],
                    "Role": "USER"
                  }
                ],
                "AspectRatio": "1:1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the generated images (base64) and the usage percentage of the context.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ImageGenerationResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageGenerationResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageGenerationResult"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Generation/ImageUrl": {
      "post": {
        "tags": [
          "Generation"
        ],
        "summary": "Generate one or more images from a text description and return short-lived URLs to the generated files.",
        "description": "Use this endpoint when the generated image needs to be referenced by URL in a later API call instead of being returned inline as base64.\r\nIt returns an `ImageUrlGenerationResult` containing optional `Text` and an `Images` array with `MimeType` and `FileUri`.\r\nThose `FileUri` values are short-lived public URLs suitable as FileUrl inputs. For an existing user file, use\r\n`POST V4/Partner/{applicationId}/Generation/Upload` instead—never a private Google Drive / login-gated link.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Confirm the prompt before generating (billable). Use the returned URL exactly; do not rewrite the GUID.</description></item><item><description>For an existing file the user already has, upload via Generation/Upload rather than regenerating an image.</description></item></list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Prompt and options for image generation.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateImageBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "A cute corgi wearing sunglasses, studio lighting"
                      }
                    ],
                    "Role": "USER"
                  }
                ],
                "AspectRatio": "1:1"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateImageBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "A cute corgi wearing sunglasses, studio lighting"
                      }
                    ],
                    "Role": "USER"
                  }
                ],
                "AspectRatio": "1:1"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateImageBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "A cute corgi wearing sunglasses, studio lighting"
                      }
                    ],
                    "Role": "USER"
                  }
                ],
                "AspectRatio": "1:1"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateImageBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "A cute corgi wearing sunglasses, studio lighting"
                      }
                    ],
                    "Role": "USER"
                  }
                ],
                "AspectRatio": "1:1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns short-lived URLs for the generated images and the usage percentage of the context.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ImageUrlGenerationResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageUrlGenerationResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageUrlGenerationResult"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Generation/Video": {
      "post": {
        "tags": [
          "Generation"
        ],
        "summary": "Generate one or more videos from a text description (not usable by chatbots).",
        "description": "Returns a `VideoGenerationResult` with an optional `Text` and a `Videos` array. Each video may contain either:\r\n- `Base64Data` (inline payload), or\r\n- `FileUri` (a hosted URL returned by the model).",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The ID of the partner making the request",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Prompt for video generation.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateVideoBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "A cinematic drone shot over a snow-covered mountain range, golden hour"
                      }
                    ],
                    "Role": "USER"
                  }
                ]
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateVideoBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "A cinematic drone shot over a snow-covered mountain range, golden hour"
                      }
                    ],
                    "Role": "USER"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateVideoBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "A cinematic drone shot over a snow-covered mountain range, golden hour"
                      }
                    ],
                    "Role": "USER"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateVideoBody"
              },
              "example": {
                "Contents": [
                  {
                    "Parts": [
                      {
                        "Text": "A cinematic drone shot over a snow-covered mountain range, golden hour"
                      }
                    ],
                    "Role": "USER"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the generated videos (base64 or URL) and the usage percentage of the context.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/VideoGenerationResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoGenerationResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoGenerationResult"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/Generation/Upload": {
      "post": {
        "tags": [
          "Generation"
        ],
        "summary": "Uploads a file and returns a short-lived anonymously downloadable public URL for use by other endpoints.",
        "description": "\r\nThis is the canonical way for AI agents to obtain a `FileUrl` / attachment URL that the API can download.\r\n            Use the returned URL exactly as returned—do not decompose, abbreviate, or manually re-type the GUID string.\r\n\r\n<b>When to use</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Before `PUT V4/Intranet/Vendors/{vendorCode}/ImportAP` (`FileUrl`).</description>\r\n  </item>\r\n  <item>\r\n    <description>Before Partner/Intranet email send endpoints (attachment URLs).</description>\r\n  </item>\r\n  <item>\r\n    <description>Before warehouse packing-slip flows that require a public packing-slip URL.</description>\r\n  </item>\r\n  <item>\r\n    <description>Any other endpoint that downloads a caller-supplied URL anonymously.</description>\r\n  </item>\r\n</list>\r\n\r\n<b>AI Agent rules</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>\r\n            Never substitute a private Google Drive, SharePoint, or other login-gated link for this URL.\r\n            Those fail server-side with a sign-in wall instead of the file bytes.\r\n            </description>\r\n  </item>\r\n  <item>\r\n    <description>\r\n            Multipart upload must include a non-empty filename with an extension (for example:\r\n            `document.pdf`, `spreadsheet.xls`, `spreadsheet.xlsx`).\r\n            </description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "The ID of the partner making the request",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "The file to upload; must include a filename with an extension.",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Short-lived public URL to the uploaded file.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Missing file or invalid filename.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/GenerationV2/JSON": {
      "post": {
        "tags": [
          "GenerationV2"
        ],
        "summary": "Generates a JSON response without exposing any tools to the model.",
        "description": "Send conversation content as a JSON array. This generates a response only; no model tools are executed by this endpoint.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "Partner account whose authorization and generation context are used.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Conversation messages in order, using the request schema for this endpoint.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ContentSubset"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ContentSubset"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ContentSubset"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ContentSubset"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The JSON generation result.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid conversation; returns error and message fields.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the partner account.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Generation failed upstream; returns error and message fields."
          },
          "499": {
            "description": "The client canceled the request."
          },
          "504": {
            "description": "Generation timed out; returns error and message fields."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{applicationId}/GenerationV2/RandmarAssistant": {
      "post": {
        "tags": [
          "GenerationV2"
        ],
        "summary": "Runs one Randmar Assistant inference turn with MCP tool declarations.",
        "description": "The response contains either assistant text or MCP function calls. The client executes\r\nfunction calls against the MCP gateway, preserves each ToolCallId, appends matching function\r\nresponses to the conversation, and invokes this endpoint again. The OpenRouter API key remains\r\nserver-side, while the client sends its bearer token directly to the MCP gateway.",
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "description": "Partner account whose authorization and generation context are used.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Conversation messages in order, using the request schema for this endpoint.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RandmarAssistantV2Content"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RandmarAssistantV2Content"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RandmarAssistantV2Content"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RandmarAssistantV2Content"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The assistant text or function-call result.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarAssistantV2GenerationResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarAssistantV2GenerationResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarAssistantV2GenerationResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid conversation; returns error and message fields.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the partner account.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Generation failed upstream; returns error and message fields."
          },
          "499": {
            "description": "The client canceled the request."
          },
          "504": {
            "description": "Generation timed out; returns error and message fields."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/GoogleAds/Invitation": {
      "post": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Invites the store's Google Ads account to become a client of Randmar's manager account.",
        "description": "Use once after saving the store's Google Ads customer ID. This changes Google Ads by creating a pending manager link;\r\nit is idempotent while a PENDING or ACTIVE link exists. The customer must approve a PENDING invitation in Google Ads.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify hostname whose stored Google Ads customer ID will be invited.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The resulting manager-link status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleAdsManagerInvitationStatus"
                }
              }
            }
          },
          "400": {
            "description": "The store/customer ID is invalid, or Google rejected the invitation. Google rejections include non-secret request context, request ID, exact error codes, triggers, field paths, and the raw structured failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The authenticated application cannot act for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "get": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Gets the current manager invitation/link status for the store's Google Ads account.",
        "description": "Use during onboarding and polling. Show the customer the Google Ads manager-access page when `IsPending` is true;\r\n`IsAccepted` is true only when Google reports the manager link as ACTIVE.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify hostname whose stored Google Ads customer ID will be checked.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current manager-link status. IsAccepted is true only for an ACTIVE link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleAdsManagerInvitationStatus"
                }
              }
            }
          },
          "400": {
            "description": "Invalid store, configured Ads account, or query; returns a Message explaining validation failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/GoogleAds/Overview": {
      "get": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Gets the client dashboard overview for the store's Google Ads account.",
        "description": "Use this as the first reporting call after `GET Invitation` returns `IsAccepted=true`. It is a dashboard\r\nbootstrap response containing account currency/time zone, aggregate performance, campaign counts by state/type,\r\nbilling setup flags and records, and current Google recommendations. Use `Campaigns` for the navigable list and\r\nthe campaign-specific endpoints for deeper analysis. Recommendations are advisory and are not applied by this call.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify hostname whose stored Google Ads account will be summarized.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Optional inclusive first reporting date; defaults to 29 days before the resolved end date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Optional inclusive last reporting date; defaults to today.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Account context and dashboard summary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleAdsAccountOverview"
                }
              }
            }
          },
          "400": {
            "description": "The store, Ads ID, or date range is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The authenticated application cannot act for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The manager invitation has not been accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/GoogleAds/Campaigns": {
      "get": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Lists campaigns belonging to the store's Google Ads account.",
        "description": "Use for campaign selection and display after onboarding. A successful response proves the configured API identity can\r\naccess the customer, but only an ACTIVE invitation status proves this manager link was accepted.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify hostname whose stored Google Ads customer ID will be queried.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Campaign collection; an empty collection is valid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GoogleAdsCampaign"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid store, configured Ads account, or query; returns a Message explaining validation failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The integration state prevents the operation, such as a manager invitation that has not been accepted; returns a Message."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/GoogleAds/Campaigns/{campaignId}/Paused": {
      "put": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Pauses or resumes an existing campaign.",
        "description": "Set `IsPaused=true` to stop the campaign reversibly. Set `IsPaused=false` to change the campaign status to\r\n`ENABLED`, which may begin serving and spending immediately. Set `ValidateOnly=true` to ask Google to\r\nvalidate the exact mutation without changing campaign state.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "path",
            "description": "The numeric campaign ID returned by `GET Campaigns`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The application-owned Shopify store associated with the Google Ads account.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The desired paused state and optional validate-only flag.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoogleAdsSetCampaignPausedRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Google accepted or validate-only approved the status mutation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleAdsCampaignStatusMutationResult"
                }
              }
            }
          },
          "400": {
            "description": "The request, campaign ID, or Google Ads mutation is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleAdsMutationFailure"
                }
              }
            }
          },
          "401": {
            "description": "The caller cannot act for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The manager invitation has not been accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/GoogleAds/Campaigns/{campaignId}": {
      "delete": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Irreversibly removes an existing campaign from Google Ads.",
        "description": "Google Ads does not physically delete campaigns; this sets the campaign status to `REMOVED`. Removed campaigns\r\ncannot be restored. Set `validateOnly=true` to preflight the removal without changing campaign state.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "path",
            "description": "The numeric campaign ID returned by `GET Campaigns`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The application-owned Shopify store associated with the Google Ads account.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "validateOnly",
            "in": "query",
            "description": "When true, Google validates the removal but does not apply it.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Google accepted or validate-only approved the removal.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleAdsCampaignStatusMutationResult"
                }
              }
            }
          },
          "400": {
            "description": "The campaign ID or Google Ads mutation is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleAdsMutationFailure"
                }
              }
            }
          },
          "401": {
            "description": "The caller cannot act for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The manager invitation has not been accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": true,
        "x-involves-secrets": false
      },
      "get": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Gets one campaign's configuration and aggregate performance.",
        "description": "Use when a campaign name or ID is opened from the campaign list. Performance defaults to the most recent 30 calendar\r\ndays; provide both or either date to choose another period. This endpoint is read-only.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "path",
            "description": "The numeric Google Ads campaign ID selected by the user.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify hostname whose stored Google Ads account will be queried.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Optional first performance date, in the customer's Google Ads time zone.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Optional last performance date, in the customer's Google Ads time zone.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Selected campaign configuration and period totals.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleAdsCampaignDetails"
                }
              }
            }
          },
          "400": {
            "description": "Invalid store, configured Ads account, or query; returns a Message explaining validation failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The integration state prevents the operation, such as a manager invitation that has not been accepted; returns a Message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/GoogleAds/Campaigns/{campaignId}/Performance": {
      "get": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Gets a campaign performance summary and daily timeline.",
        "description": "Call this after `GET Campaigns/{campaignId}` when the frontend needs a trend chart. The `Summary` covers the\r\nentire selected period and uses the same totals as campaign details; `Daily` contains one point per day with\r\nreported activity. Google can omit zero-activity dates, so chart code should insert missing calendar dates as zeroes\r\nwhen a continuous axis is required. CPA is `CostPerConversionMicros`; ROAS is conversion value divided by spend.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "path",
            "description": "The numeric campaign ID returned by `GET Campaigns`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify hostname whose stored Google Ads account will be queried.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Optional inclusive first reporting date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Optional inclusive last reporting date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Campaign configuration, period summary, and daily performance points.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleAdsCampaignPerformanceReport"
                }
              }
            }
          },
          "400": {
            "description": "The campaign, store, Ads ID, or date range is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The authenticated application cannot act for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The manager invitation has not been accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/GoogleAds/Campaigns/{campaignId}/Conversions": {
      "get": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Gets campaign results grouped by conversion action.",
        "description": "Call this beside campaign details or performance when the client needs to understand what the conversion total means,\r\nfor example purchases versus leads, calls, or signups. Values are grouped using the account's configured Google Ads\r\nconversion actions. Cost and CPA are deliberately not assigned to each action because Google does not independently\r\nallocate campaign spend to conversion-action rows; use the campaign performance summary for total CPA and ROAS.\r\nConversion reporting can lag other metrics, and a valid period with no attributed conversions returns an empty array.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "path",
            "description": "The numeric campaign ID returned by `GET Campaigns`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify hostname whose stored Google Ads account will be queried.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Optional inclusive first reporting date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Optional inclusive last reporting date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Conversion actions with attributed conversion counts and values.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GoogleAdsConversionPerformance"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The campaign, store, Ads ID, or date range is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The authenticated application cannot act for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The manager invitation has not been accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/GoogleAds/Campaigns/{campaignId}/AssetGroups": {
      "get": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Lists the Performance Max asset groups within a campaign.",
        "description": "Use after opening a Performance Max campaign to compare group status, ad strength, destinations, and performance.\r\nStandard campaign types do not use asset groups and normally return an empty array. This endpoint is read-only.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "path",
            "description": "The numeric Google Ads campaign ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify hostname whose stored Google Ads account will be queried.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Optional first performance date; defaults to 29 days before the resolved end date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Optional last performance date; defaults to today.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Asset-group collection for the selected campaign and reporting period.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GoogleAdsAssetGroup"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid store, configured Ads account, or query; returns a Message explaining validation failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The integration state prevents the operation, such as a manager invitation that has not been accepted; returns a Message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/GoogleAds/Campaigns/{campaignId}/AssetGroups/{assetGroupId}/Assets": {
      "get": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Lists the individual assets and performance links within an asset group.",
        "description": "Use to show headlines, text, images, and videos together with serving state and dated quantitative metrics. This is\r\nthe read-only precursor to a future low-performing-asset replacement workflow.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "path",
            "description": "The numeric Google Ads campaign ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assetGroupId",
            "in": "path",
            "description": "The numeric asset group ID selected within the campaign.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify hostname whose stored Google Ads account will be queried.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Optional first performance date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Optional last performance date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Asset placements within the selected campaign asset group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GoogleAdsAssetGroupAsset"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid store, configured Ads account, or query; returns a Message explaining validation failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The integration state prevents the operation, such as a manager invitation that has not been accepted; returns a Message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/GoogleAds/Campaigns/{campaignId}/AssetGroups/{assetGroupId}/Assets/{assetId}": {
      "get": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Gets one asset and its performance-bearing placements in an asset group.",
        "description": "Use when an asset is opened from the asset-group inventory. The response keeps placement data because Google evaluates\r\nan asset in the context of its field type and group link, rather than assigning one universal performance value.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "in": "path",
            "description": "The numeric Google Ads campaign ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assetGroupId",
            "in": "path",
            "description": "The numeric asset group ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assetId",
            "in": "path",
            "description": "The numeric account-level asset ID selected by the user.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify hostname whose stored Google Ads account will be queried.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Optional first performance date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Optional last performance date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Selected asset and its placements within the specified group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleAdsAssetDetails"
                }
              }
            }
          },
          "400": {
            "description": "Invalid store, configured Ads account, or query; returns a Message explaining validation failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The integration state prevents the operation, such as a manager invitation that has not been accepted; returns a Message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/GoogleAds/BillingSetups": {
      "get": {
        "tags": [
          "GoogleAds"
        ],
        "summary": "Lists billing setups belonging to the store's Google Ads account.",
        "description": "Use to inspect whether a payment account is linked and whether its setup is pending or approved. This endpoint is\r\nread-only; it neither enrolls the customer in monthly invoicing nor changes who pays for advertising.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify hostname whose stored Google Ads customer ID will be queried.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Billing setup records; does not create or change billing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GoogleAdsBillingSetup"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid store, configured Ads account, or query; returns a Message explaining validation failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The integration state prevents the operation, such as a manager invitation that has not been accepted; returns a Message."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/IntegrationKey/{KeyName}": {
      "put": {
        "tags": [
          "IntegrationKey"
        ],
        "summary": "Creates a new integration key.",
        "description": "This endpoint generates a new API key with a specified name for a partner account. The generated key can be used for authenticating API requests for integrated systems.\r\nThe response contains the key secret—treat it as a credential. List existing keys with `GET .../IntegrationKeys` (values are not returned there).\r\n\r\n<b>Client ID versus Application (Partner) ID:</b>`KeyName` identifies the integration authenticating, while `routeApplicationId` identifies the business account that owns it. Application ID and Partner ID mean the same account identifier in this route. One partner can own multiple keys with different Client IDs and secrets.\r\nTo request an OAuth token, POST form-encoded fields to `https://auth.randmar.io/connect/token` with `grant_type=client_credentials`, `client_id` equal to the exact `KeyName`, and `client_secret` equal to the returned secret. The partner `routeApplicationId` identifies the account for this route; it is not the token request's `client_id`.\r\nFor an existing Shopify integration, the OAuth `client_id` is its registered store domain, for example `example-store.myshopify.com`, without a URL scheme or path. Shopify credentials use their separate registration flow; this endpoint does not create keys with `.myshopify.com` names.\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the key name and that the user wants a new credential before creating.</description></item><item><description>Do not echo the returned secret back in chat or logs; show it once only if the user needs to copy it.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The business account's Application (Partner) ID, not the integration's OAuth client_id or KeyName. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "KeyName",
            "in": "path",
            "description": "The name for the integration key, also used as its OAuth client_id. Email addresses and names containing .myshopify.com are rejected by this creation endpoint.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The newly created integration key password.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": true
      },
      "post": {
        "tags": [
          "IntegrationKey"
        ],
        "summary": "Renews an existing integration key.",
        "description": "This endpoint extends the expiration date of an existing integration key. The key value itself does not change.\r\nThe expiration is also automatically extended whenever the integration key is successfully used to authenticate a request.\r\nThis means actively used keys are renewed as part of normal authentication and typically do not require a manual renewal call.\r\nThis endpoint is primarily useful when a key needs to be renewed in advance, such as before a period of inactivity or to prevent expiration before the next authenticated request.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the key name and confirm the user wants to extend expiration (the secret does not change).</description></item><item><description>Prefer listing keys first via `GET .../IntegrationKeys` so the name is exact.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The business account's Application (Partner) ID, not the integration's OAuth client_id or KeyName. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "KeyName",
            "in": "path",
            "description": "The name of the integration key to renew.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the renewal was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "IntegrationKey"
        ],
        "summary": "Deletes an integration key.",
        "description": "This endpoint permanently revokes and deletes an integration key. This action cannot be undone.\r\nAny integration still using this key will fail authentication afterward.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the exact key name and obtain explicit confirmation—this immediately revokes access.</description></item><item><description>This cannot be undone; a new key must be created if the integration still needs access.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The business account's Application (Partner) ID, not the integration's OAuth client_id or KeyName. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "KeyName",
            "in": "path",
            "description": "The name of the integration key to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Indicates that the key was successfully deleted."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/IntegrationKeys": {
      "get": {
        "tags": [
          "IntegrationKeys"
        ],
        "summary": "Gets all integration keys for a partner.",
        "description": "Retrieves a list of all integration keys associated with the given partner's application ID. For security reasons, the key values themselves are not returned.\r\nCreate/renew/delete via `.../IntegrationKey/{KeyName}`.\r\n\r\n<b>Client ID versus Application (Partner) ID:</b>`KeyName` identifies the integration authenticating, while `ApplicationId` identifies the owning business account. In this partner-account context, Application ID and Partner ID mean the same account identifier. Multiple keys can belong to one account, each with its own Client ID and secret.\r\nFor a named integration key, use its exact `KeyName` as the OAuth `client_id` with `grant_type=client_credentials` at `https://auth.randmar.io/connect/token`; use its secret as `client_secret`. The partner application ID in this route or the returned `ApplicationId` is an account identifier, not the integration key's OAuth `client_id`.\r\nFor Shopify integration credentials, use the registered store domain (for example `example-store.myshopify.com`) as `client_id`, without `https://` or a path. Do not substitute the partner application ID or a custom storefront domain.\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize key names and expiry; never ask the user to paste a secret to \"verify\" a listed key.</description></item><item><description>Use the listed names as the exact `KeyName` for renew or delete.</description></item><item><description>If token authentication reports invalid client credentials, verify the integration name used as `client_id` before advising secret replacement or renewal.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The business account's Application (Partner) ID, not the integration's OAuth client_id or KeyName. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of integration keys.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IntegrationKey"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Inventory/Value": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "summary": "Gets inventory value for a manufacturer, grouped by location and category.",
        "description": "Returns monetary value of on-hand inventory plus inventory on open sales and purchase orders, grouped by warehouse location and product category.\r\nUse this for an executive inventory-value snapshot; it is not a SKU-level stock list.\r\nRelated: `POST V4/Manufacturer/{routeManufacturerId}/Report/Inventory/JSON` for line-level inventory as of a date.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize totals by location and/or category; do not dump every row unless the user asks for a specific slice.</description></item><item><description>If the user wants units on hand for a SKU, look up the product or use the inventory report JSON instead.</description></item></list>\r\nThis endpoint returns valuation entries, not available-to-promise stock or a shipping quote. Use the product distribution details when deciding whether a SKU can fulfill an order.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of inventory values.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InventoryValueEntry"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Job/{jobId}": {
      "get": {
        "tags": [
          "Job"
        ],
        "summary": "Gets the current state and details of a background job.",
        "description": "Use this endpoint to poll job status after a job has been created or started.\r\nRelated: `GET V4/Partner/{routeApplicationId}/Jobs` to list active jobs, then this route for one job.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Poll this after queueing or restarting a job; do not assume completion from the queue response alone.</description></item><item><description>Repeat back the `jobId` when reporting status.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "description": "The job identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The job details (Types.Job) were returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Job"
        ],
        "summary": "Cancels a background job.",
        "description": "Provide a human-readable reason in comment for auditing/troubleshooting.\r\nThis stops further processing; it may not undo work already completed by the job.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the `jobId` and cancellation reason and obtain explicit confirmation.</description></item><item><description>Do not invent a comment; record the user's reason.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "description": "The job identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "description": "Reason/comment for the cancellation.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The job was cancelled."
          },
          "401": {
            "description": "The caller is not authorized."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Job/{jobId}/Restart": {
      "post": {
        "tags": [
          "Job"
        ],
        "summary": "Restarts a background job.",
        "description": "Use when a job needs to be re-queued/re-run after failure or manual intervention.\r\nPoll `GET .../Job/{jobId}` afterward for status.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the `jobId` and obtain explicit confirmation before restarting.</description></item><item><description>Restarting re-runs work and may duplicate side effects of the original job.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "description": "The job identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The job restart was requested successfully."
          },
          "401": {
            "description": "The caller is not authorized."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Jobs": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Lists all active background jobs for a partner.",
        "description": "Retrieves a list of all active background jobs initiated by or related to the specified partner.\r\nThis can be used to monitor the status and progress of ongoing asynchronous operations.\r\nFor finished jobs use `GET .../Jobs/CompletedOrCancel`; for one job use `GET .../Job/{jobId}`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize active jobs (type, status, job ID) rather than dumping logs.</description></item><item><description>Use this list to obtain a `jobId` before restart/cancel.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of jobs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Job"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Jobs/CompletedOrCancel": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Lists recent background jobs that have finished execution.",
        "description": "Returns jobs that reached a terminal state (Completed, Failed, Cancelled).\r\nResults are ordered by most recent first, up to the specified limit.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize recent outcomes; lower `max` when you only need the latest few jobs.</description></item><item><description>Use a returned `jobId` with `GET .../Job/{jobId}` for details, or Restart if the user wants a failed job re-run.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max",
            "in": "query",
            "description": "The maximum number of jobs to return (defaults to 100).",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The list of completed/cancelled jobs."
          },
          "401": {
            "description": "The caller is not authorized."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Jobs/AssistantTask": {
      "put": {
        "tags": [
          "Jobs"
        ],
        "summary": "Queues a background assistant task for the partner.",
        "description": "The request prompt is required. Optional file URLs are downloaded and attached to the job as input artifacts.\r\nOptional SOP IDs are resolved to their markdown contents and attached as additional job files.\r\nRequires admin authorization. Poll `GET .../Job/{jobId}` / list jobs after queueing.\r\n\r\n<b>File URLs (critical for AI agents)</b><list type=\"bullet\"><item><description>\r\nEach entry in `Files` must be an anonymously downloadable public URL.\r\nUpload via `POST V4/Partner/{applicationId}/Generation/Upload` and pass the returned URL exactly.\r\n</description></item><item><description>Never use private Google Drive / SharePoint / login-gated viewer URLs—the server downloads without interactive login.</description></item></list>\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the prompt, owner email, SOP IDs, file URLs, and schedule (if any) before queueing.</description></item><item><description>This starts asynchronous work that may take actions later; do not queue a vague or unconfirmed prompt.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Assistant task request including prompt, optional public file URLs, and optional SOP IDs.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerAssistantJobInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The assistant task was queued successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed or an attachment could not be downloaded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "A provided SOP ID is outside the allowed SOP folder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Jobs/AssistantTask/{jobId}/ScheduledTime": {
      "put": {
        "tags": [
          "Jobs"
        ],
        "summary": "Sets or changes the scheduled time for an assistant task.",
        "description": "The task must belong to the specified partner and must currently be in Scheduled or Failed status.\r\nThe timestamp must be more than one minute in the future. This HTTP action rejects zero;\r\nclearing a schedule is not supported through this endpoint, even though the underlying service accepts zero.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back `jobId` and the human-readable UTC time and confirm.</description></item><item><description>Do not reschedule a running or completed task; only Scheduled or Failed assistant tasks are eligible.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "description": "The assistant task job ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON object with scheduledTimeSecondsUTC in UTC Unix seconds, more than one minute in the future. Zero is rejected.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPartnerAssistantJobScheduledTimeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The scheduled time was changed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid, the timestamp is invalid, or the job is not an assistant task.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The assistant task job was not found for this partner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The task is not in Scheduled or Failed status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Logs": {
      "get": {
        "tags": [
          "Logs"
        ],
        "summary": "Retrieves logs for a partner application",
        "description": "This endpoint provides access to the application logs for a partner.\r\n\r\nThe logs contain information about system events, errors, and activities\r\nrelated to the partner. This can be useful for troubleshooting\r\nissues or being aware of what has been happening recently.\r\nFilter with `startDate` in `YYYY-MM-DD` form to avoid an unbounded history dump.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Always pass a recent `startDate` (YYYY-MM-DD) and summarize events rather than dumping the full log.</description></item><item><description>Treat logs as operationally sensitive; do not expose unrelated partner activity.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Only the logs on or after this date will be returned. MUST be in a valid date format like YYYY-MM-DD.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the collection of log entries"
          },
          "400": {
            "description": "If the startDate is not a valid date format.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access these logs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Manufacturer/{manufacturerId}": {
      "get": {
        "tags": [
          "Manufacturer"
        ],
        "summary": "(Deprecated) Gets manufacturer details for a specific manufacturer in a reseller context.",
        "description": "\r\n<b>Deprecated:</b> Prefer the Partner-scoped manufacturer endpoints (e.g. `V4/Partner/{routeApplicationId}/Manufacturer/{manufacturerId}`)\r\n            for the most complete and current manufacturer profile.\r\n\r\nRetrieves a manufacturer profile by manufacturerId. The withSpecification flag can be used to reduce payload size\r\n            when detailed specification fields are not required.\r\n\r\n<b>AI Agent guidance</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Use this to confirm manufacturer name/ID before qualify, revoke, or Shopify sync.</description>\r\n  </item>\r\n  <item>\r\n    <description>Set `withSpecification` to false when you only need identity; summarize rather than dumping the full profile.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "Manufacturer identifier to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "When true, includes detailed specification fields (default: true).",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Manufacturer details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Manufacturer"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "put": {
        "tags": [
          "Manufacturer"
        ],
        "summary": "Establishes a qualification with a manufacturer.",
        "description": "Requests or records a reseller↔manufacturer qualification for manufacturerId,\r\noptionally sending introductionMessage to the manufacturer.\r\nQualification can unlock catalog, pricing, and ordering for that vendor.\r\nOpposite action: `DELETE V4/Reseller/{routeResellerId}/Manufacturer/{manufacturerId}`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm manufacturer name/ID and the introduction message before calling; this starts a commercial relationship.</description></item><item><description>Do not invent an introduction message — ask the user what to send, or send empty only if they agree.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "Manufacturer identifier to qualify with.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "introductionMessage",
            "in": "query",
            "description": "Optional introduction message sent to the manufacturer as part of the qualification request.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Boolean indicating whether the qualification request was accepted/processed.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "boolean"
                }
              },
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              },
              "text/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Manufacturer"
        ],
        "summary": "Revokes this reseller's qualification for a manufacturer.",
        "description": "Removes the reseller-to-manufacturer qualification/relationship for manufacturerId.\r\nThis is effectively an “unlink” action and can materially change what the reseller can do with that manufacturer in Randmar\r\n(visibility, quoting, ordering access, and manufacturer-specific experiences).\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description><b>Confirmation required:</b> Confirm manufacturer name/ID and the intent to revoke qualification.</description></item><item><description><b>Pre-flight:</b> Prefer fetching manufacturer details first to confirm identity (this controller is deprecated; use Partner manufacturer endpoints when possible).</description></item><item><description><b>Expected side effects:</b> The reseller may lose access to manufacturer-specific pricing/catalog, eligibility, and workflows tied to the manufacturer.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "Manufacturer identifier whose qualification should be removed.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated manufacturer object as returned by the underlying service.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Manufacturer"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Manufacturer/{manufacturerId}/Shopify": {
      "post": {
        "tags": [
          "Manufacturer"
        ],
        "summary": "Synchronizes a manufacturer's products to the reseller's Shopify store (background job).",
        "description": "Enqueues a background job to synchronize all eligible products for manufacturerId to the specified Shopify store.\r\n\r\n<b>Side effects:</b> Creates a `SyncShopifyProducts` background job. Shopify API calls happen asynchronously as the job executes and may create/update many products.\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description><b>Confirmation required:</b> Confirm manufacturer and the exact target `shopifyHostName`.</description></item><item><description><b>Preconditions:</b> Store must be linked/credentialed for this reseller; reseller must not be on hold.</description></item><item><description><b>Expectation management:</b> This is not immediate; poll job status via intranet jobs endpoints if applicable.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "Manufacturer identifier to synchronize.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "Target Shopify store host name (typically `*.myshopify.com`).",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if a background job was enqueued; otherwise false."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Manufacturer/{manufacturerId}/SalesStatistics": {
      "get": {
        "tags": [
          "Manufacturer"
        ],
        "summary": "Gets sales statistics for a manufacturer over a date range.",
        "description": "Returns a time series of sales for manufacturerId scoped to this reseller.\r\nIf startDate or endDate are omitted, the service may apply defaults —\r\npass explicit dates for reproducible reporting.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize totals and trends; do not dump every statistic row.</description></item><item><description>Confirm manufacturer ID and the date range with the user before reporting numbers.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "Manufacturer identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date (optional).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date (optional).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sales statistics rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SalesStatistic"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Manufacturer/{manufacturerId}/{categoryCode}": {
      "get": {
        "tags": [
          "Manufacturer"
        ],
        "summary": "(Deprecated) Gets details for a manufacturer category.",
        "description": "<b>Deprecated:</b> Use the Partner manufacturer controller.\r\n            Returns category metadata for categoryCode under manufacturerId.\r\n            Related: `POST .../Manufacturer/{manufacturerId}/{categoryCode}/Shopify` to sync that category.\r\n            \r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Confirm manufacturer ID and category code; prefer Partner manufacturer endpoints when available.</description></item><item><description>Summarize category name/code rather than dumping the full object unless asked.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "Manufacturer identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Manufacturer category code.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Manufacturer category details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManufacturerCategory"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Manufacturer/{manufacturerId}/{categoryCode}/Shopify": {
      "post": {
        "tags": [
          "Manufacturer"
        ],
        "summary": "Synchronizes a manufacturer's product category to the reseller's Shopify store (background job).",
        "description": "Enqueues a background job to synchronize all eligible products within categoryCode for manufacturerId\r\nto the target Shopify store.\r\n\r\n<b>Side effects:</b> Creates a `SyncShopifyProducts` background job. Shopify API calls happen asynchronously and may create/update many products.\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description><b>Confirmation required:</b> Confirm manufacturer, category code, and the exact target `shopifyHostName`.</description></item><item><description><b>Preconditions:</b> Store must be linked/credentialed for this reseller; reseller must not be on hold.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "Manufacturer identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "Category code to synchronize.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "Target Shopify store host name (typically `*.myshopify.com`).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if a background job was enqueued; otherwise false."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Manufacturer/{manufacturerId}/{categoryCode}": {
      "get": {
        "tags": [
          "Manufacturer"
        ],
        "summary": "Gets details for a specific manufacturer category.",
        "description": "Retrieves detailed information about a product category for a given manufacturer. This can be used by partners (like resellers) to explore a manufacturer's product offerings.\r\nList manufacturers first with `GET .../Manufacturers` if the manufacturer ID is unknown.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Use a real `manufacturerId` and `categoryCode`; do not guess codes.</description></item><item><description>Summarize category products; fetch a SKU via Product GET when the user picks one.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "The ID of the manufacturer.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryCode",
            "in": "path",
            "description": "The code for the product category to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested manufacturer category details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManufacturerCategory"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The user is forbidden from accessing this category.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/ManufacturerReturnRequests": {
      "get": {
        "tags": [
          "ManufacturerReturnRequests"
        ],
        "summary": "Lists purchase return request headers for the specified manufacturer.",
        "description": "This read-only endpoint returns the manufacturer's purchase return request headers and line counts.\r\nReturnDate uses numeric yyyyMMdd format, and IsComplete is a numeric completion flag.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "The manufacturer application ID to filter purchase return requests by.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of the manufacturer's purchase return request headers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ManufacturerReturnRequest"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized to access this manufacturer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/ManufacturerReturnRequests/{returnNumber}/PDF": {
      "get": {
        "tags": [
          "ManufacturerReturnRequests"
        ],
        "summary": "Retrieves this manufacturer's purchase return request as a PDF through Accpac.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "The manufacturer application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The purchase return request number.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The return request PDF.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "The request is unavailable for this manufacturer or its PDF is empty.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized to access this manufacturer.",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Manufacturers": {
      "get": {
        "tags": [
          "Manufacturers"
        ],
        "summary": "(Deprecated) Lists manufacturers available to the reseller.",
        "description": "<b>Deprecated:</b> Prefer `GET V4/Partner/{routeApplicationId}/Manufacturers` for the most complete manufacturer directory.\r\n            Returns manufacturers visible to this reseller. Set withSpecification only when you need extended profile fields.\r\n            \r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize as a selection list (name + manufacturer ID); do not dump full manufacturer objects.</description></item><item><description>Prefer the Partner manufacturers endpoint when the user needs qualification status or richer profiles.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Whether to include detailed specifications for each manufacturer in the response. Defaults to false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of manufacturers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Manufacturer"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Manufacturers": {
      "get": {
        "tags": [
          "Manufacturers"
        ],
        "summary": "List all manufacturers this partner has access to.",
        "description": "Use this endpoint when the user wants to list or compare multiple manufacturers. Also useful to find a new manufacturers to work with.\r\nKeep `withSpecification=false` (the default) unless you need the extra payload.\r\nRelated: `GET V4/Partner/{routeApplicationId}/Manufacturer/{manufacturerId}/{categoryCode}` for one category.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize manufacturer names/IDs; do not dump every specification unless asked.</description></item><item><description>Use returned manufacturer IDs for category or account manufacturer lookups.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Whether to include detailed specification information (default: false)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the manufacturer list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Manufacturer"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Agency/{routeAgencyId}/Manufacturers": {
      "get": {
        "tags": [
          "Manufacturers"
        ],
        "summary": "Lists manufacturers managed by the agency.",
        "description": "Returns manufacturers associated with this sales agency (not the full intranet manufacturer directory).\r\nUse when an agency user asks which manufacturers they represent.\r\nRelated: `GET V4/Agency/{routeAgencyId}/Manufacturers/OpenOrders` for open order lines, and\r\n`GET V4/Agency/{routeAgencyId}` for agency context.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Pass the target agency application ID in `routeAgencyId`, never HQ IDs such as `2` or `FGDCT3037`. Resolve names via `GET V4/Intranet/Search/Partners` when calling from intranet.</description></item><item><description>Keep `withSpecification` false unless the user needs expanded manufacturer profile fields.</description></item></list>",
        "parameters": [
          {
            "name": "routeAgencyId",
            "in": "path",
            "description": "The target agency application ID. Not HQ IDs such as `2` or `FGDCT3037`. Resolve partner/agency names via `GET V4/Intranet/Search/Partners`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Query flag, false by default. True adds SalesData and InventoryValue to each represented manufacturer.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of manufacturers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Manufacturer"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Agency/{routeAgencyId}/Manufacturers/OpenOrders": {
      "get": {
        "tags": [
          "Manufacturers"
        ],
        "summary": "Lists open order line details for manufacturers managed by the agency.",
        "description": "Retrieves active order line-item details across all manufacturers associated with the specified agency.\r\nUse for agency sales follow-up on unfilled manufacturer orders.\r\nRelated: `GET V4/Agency/{routeAgencyId}/Manufacturers` to resolve manufacturer names first.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize by manufacturer, SKU, and outstanding quantity; do not dump every open-order line.</description></item><item><description>`routeAgencyId` must be the target agency application ID, not HQ IDs such as `2` or `FGDCT3037`.</description></item></list>",
        "parameters": [
          {
            "name": "routeAgencyId",
            "in": "path",
            "description": "The target agency application ID. Not HQ IDs such as `2` or `FGDCT3037`. Resolve names via `GET V4/Intranet/Search/Partners`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of open order details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderDetail"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Media/{documentNumber}/{subfolder}": {
      "get": {
        "tags": [
          "Media"
        ],
        "summary": "Downloads a reseller media file as MP4.",
        "description": "Returns a video/MP4 stream for documentNumber in subfolder.\r\nUse when the user asks to play or download a recording tied to an order or warehouse document.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Confirm the document number and subfolder before fetching; this returns a binary file, not a JSON summary.</description></item><item><description>If the call returns 400, the file is missing — ask the user for a different document/subfolder rather than retrying blindly.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "The document number or identifier for the media.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subfolder",
            "in": "path",
            "description": "The subfolder where the media is located.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested media file as an MP4 video."
          },
          "400": {
            "description": "The media file could not be found.",
            "content": {
              "video/mp4": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this media.",
            "content": {
              "video/mp4": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Media/Shorts": {
      "get": {
        "tags": [
          "Media"
        ],
        "summary": "Gets a list of generated short videos for a partner.",
        "description": "Retrieves a list of dynamic objects representing all generated short video clips (\"shorts\") associated with the partner.\r\nThese shorts are usually generated from the 3D model of products.\r\nDownload one with `GET .../Media/Short/{fileName}`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize filenames; do not download every short unless asked.</description></item><item><description>Use the returned `fileName` for rename, download, or delete.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of dynamic objects, each representing a short video.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Media/Short/{fileName}": {
      "get": {
        "tags": [
          "Media"
        ],
        "summary": "Downloads a specific short video.",
        "description": "Retrieves the specified short video file by its filename.\r\nList available shorts first with `GET .../Media/Shorts`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Use an exact filename from the Shorts list; do not guess names.</description></item><item><description>This returns binary video; only download when the user asked for that file.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileName",
            "in": "path",
            "description": "The filename of the short video to download.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The short video file.",
            "content": {
              "video/mp4": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "The requested video could not be found or retrieved.",
            "content": {
              "video/mp4": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "video/mp4": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "post": {
        "tags": [
          "Media"
        ],
        "summary": "Renames a short video.",
        "description": "Updates the filename of an existing short video.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back current `fileName` and `newValue` and confirm before renaming.</description></item><item><description>Use the exact current filename from the Shorts list.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileName",
            "in": "path",
            "description": "The current filename of the short video.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new filename for the short video (query string parameter).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the rename operation was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Media"
        ],
        "summary": "Deletes a short video.",
        "description": "Permanently deletes a generated short video file.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the exact filename and obtain explicit confirmation before deleting.</description></item><item><description>This permanently removes the generated file.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileName",
            "in": "path",
            "description": "The filename of the short video to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the deletion was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Media/TextToSpeech": {
      "put": {
        "tags": [
          "Media"
        ],
        "summary": "Generates an audio file from text.",
        "description": "Converts the provided text caption into an audio file using the specified voice and style.\r\n\r\nExample request body:```\r\n{\r\n  \"caption\": \"Hello! Thanks for shopping with us.\",\r\n  \"voiceName\": \"en-US-JennyNeural\",\r\n  \"voiceStyle\": \"cheerful\"\r\n}\r\n```\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm caption, voice name, and style with the user before generating (this is billable media).</description></item><item><description>Do not invent promotional copy; use the text the user approved.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The text-to-speech request details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/TextToSpeechModel"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextToSpeechModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TextToSpeechModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TextToSpeechModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The generated audio file.",
            "content": {
              "audio/mpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "The audio could not be generated from the provided input.",
            "content": {
              "audio/mpeg": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "audio/mpeg": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/MicrosoftAds/Accounts": {
      "get": {
        "tags": [
          "MicrosoftAds"
        ],
        "summary": "Gets basic information for a Shopify store's linked Microsoft Advertising account.",
        "description": "The store must belong to the route application. A requested management link may not be visible until the account administrator accepts Microsoft's invitation.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID that owns the Shopify store.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The application-owned Shopify store to look up.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The linked Microsoft Advertising account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MicrosoftAdsAccountInfo"
                }
              }
            }
          },
          "400": {
            "description": "The Shopify store is missing or is not owned by the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The authenticated application cannot act for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "No linked account is stored, or it is not yet visible to Randmar.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "The integration cannot currently perform the operation; returns a Message."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/MicrosoftAds/AccountLinks": {
      "post": {
        "tags": [
          "MicrosoftAds"
        ],
        "summary": "Requests management access to an existing client-owned Microsoft Advertising account.",
        "description": "Microsoft creates a LinkPending invitation which the client's administrator must accept. The client remains\r\nresponsible for billing, and Microsoft sends its normal invitation notification. Prepaid accounts cannot be linked\r\nfor agency management. The Microsoft client link's friendly name is set from Shopify's current `shop.domain`\r\nvalue, not the store's permanent `myshopify.com` hostname.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The Randmar application ID requesting the management link.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The application-owned Shopify store associated with the client account.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The owner customer number and numeric Microsoft Advertising account ID.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MicrosoftAdsLinkAccountRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Management-link result; a pending invitation still requires client acceptance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MicrosoftAdsAccountLinkResult"
                }
              }
            }
          },
          "400": {
            "description": "MicrosoftAdsApiFailure from Microsoft, or a Message describing invalid request or store ownership.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MicrosoftAdsApiFailure"
                }
              }
            }
          },
          "401": {
            "description": "The authenticated application cannot act for the route application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "The integration cannot currently perform the operation; returns a Message."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Niche/{nicheName}/Manufacturers": {
      "get": {
        "tags": [
          "Niche"
        ],
        "summary": "Gets manufacturers belonging to a specific product niche.",
        "description": "Returns manufacturers associated with nicheName. Use this after\r\n`GET V4/Reseller/{routeResellerId}/Products/Niches` when the user wants vendors in a market segment\r\nrather than a full manufacturer directory.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Prefer a short named list (manufacturer + ID) over dumping full manufacturer objects.</description></item><item><description>If the niche name is ambiguous, confirm it against the niches list before calling.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nicheName",
            "in": "path",
            "description": "The name of the niche to retrieve manufacturers for.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of manufacturers within the specified niche.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Manufacturer"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Opportunities": {
      "get": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Lists sales opportunities available to the reseller.",
        "description": "Returns currently available bids/special pricing for this reseller.\r\nUse this to find a bid number before adding a cart line with\r\n`POST V4/Reseller/{routeResellerId}/Cart/AddItem/{cartName}/{randmarSKU}`,\r\nor to drill into `GET V4/Reseller/{routeResellerId}/Opportunity/{manufacturerId}/{bidNumber}`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize by manufacturer, bid number, and expiry/value when present; do not dump every product line from every opportunity.</description></item><item><description>When the user names a product, filter the list to matching manufacturer/SKU rather than reading the entire payload aloud.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of opportunities available to the reseller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpportunityEntry"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Opportunities": {
      "get": {
        "tags": [
          "Opportunities"
        ],
        "summary": "Lists all opportunities (bids) for a manufacturer.",
        "description": "Returns every opportunity for this manufacturer. Use this when the user does not already know the bid number.\r\nOnce you have a bid number, call `GET V4/Manufacturer/{routeManufacturerId}/Opportunity/{bidNumber}` for full details (parts, resellers, prices).\r\nAn empty array means no opportunities exist.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Present a short table of bid number, title, and date range; then offer to open the one the user meant.</description></item><item><description>Do not create, edit, or email an opportunity from this list endpoint—those are on the singular Opportunity controller.</description></item></list>\r\nLists bid headers for the manufacturer. Fetch `GET .../Opportunity/{bidNumber}` to load the bid’s resellers and product lines.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of all opportunities provided by the manufacturer."
          },
          "401": {
            "description": "The user is not authorized to access these opportunities.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Opportunity/{manufacturerId}/{bidNumber}": {
      "get": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Gets detailed information for a specific sales opportunity.",
        "description": "Returns one bid (products and special pricing) for manufacturerId / bidNumber.\r\nUse this before applying the bid on a cart line\r\n(`POST .../Cart/AddItem/{cartName}/{randmarSKU}` with `bidNumber`)\r\nor after listing via `GET .../Opportunities`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize eligible SKUs and prices; set `withSpecification` to false if you only need pricing.</description></item><item><description>Repeat manufacturer ID and bid number before using this bid on a cart line.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "The ID of the manufacturer offering the opportunity.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "The bid number identifying the opportunity.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Whether to include detailed specifications for each product. Defaults to true.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The detailed information for the specified opportunity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpportunityEntry"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Opportunity/{manufacturerId}/{bidNumber}/Email": {
      "post": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Emails a sales opportunity to a recipient.",
        "description": "Sends the bid details for manufacturerId / bidNumber to emailAddress.\r\nUse this to share pricing with a colleague or customer; it does not add items to a cart.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm manufacturer, bid number, and the exact recipient email before sending.</description></item><item><description>Do not email pricing to an address the user did not provide.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "The ID of the manufacturer offering the opportunity.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "The bid number identifying the opportunity.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Opportunity/{manufacturerId}/Default": {
      "put": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Sets the default opportunity (bid) for a manufacturer.",
        "description": "Makes opportunityNumber the default bid for future cart adds with that manufacturer\r\nwhen no bid is specified (`POST .../Cart/AddItem/{cartName}/{randmarSKU}/DefaultOpportunity`).\r\nPass an empty string to clear the default.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm manufacturer ID and bid number (or empty string to clear); this changes pricing on future cart adds.</description></item><item><description>Existing cart lines are not rewritten — only subsequent default-opportunity adds use the new default.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "The ID of the manufacturer for which to set the default opportunity.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "opportunityNumber",
            "in": "query",
            "description": "The bid number to set as default. Use an empty string to clear the default.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the default opportunity was set successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Opportunity/{manufacturerId}/{bidNumber}/File": {
      "post": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Downloads a sales opportunity as an Excel file.",
        "description": "Generates a spreadsheet of products and pricing for manufacturerId / bidNumber.\r\nPrefer JSON `GET .../Opportunity/{manufacturerId}/{bidNumber}` when you only need to summarize for the user.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>This returns a binary Excel file — tell the user a file was generated rather than parsing every row into chat.</description></item><item><description>Confirm manufacturer and bid number before downloading.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "The ID of the manufacturer offering the opportunity.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "The bid number identifying the opportunity.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The opportunity details as an Excel file."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Opportunity/{manufacturerId}/{bidNumber}/Shopify": {
      "post": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Synchronizes opportunity products to the reseller's Shopify store.",
        "description": "Enqueues a `SyncShopifyProducts` job for all eligible products on this bid to shopifyHostName.\r\nShopify updates run asynchronously. Resolve stores via `GET .../Shopify/Accounts`.\r\n\r\nSide effects: creates a background job and posts internal audit/notification messages.\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm manufacturer, bid number, and exact `shopifyHostName`; this can create/update many Shopify products.</description></item><item><description>Store must be linked; reseller must not be on hold. Do not re-queue the same opportunity unless the user asks.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "path",
            "description": "The ID of the manufacturer offering the opportunity.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "The bid number of the opportunity to synchronize.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name (typically `*.myshopify.com`).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if a background job was enqueued; otherwise false."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Opportunity": {
      "put": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Inserts a new opportunity (bid) for the manufacturer.",
        "description": "Creates a new opportunity/bid with title, dates, default resellers, and quote-only flag.\r\nAfter create, add parts via UpdatePartNumberToBid and extra resellers via AddResellerToBid.\r\n\r\nExample request body:```\r\n{\r\n  \"bidNumber\": \"BID-2026-001\",\r\n  \"bidTitle\": \"Q1 Promo\",\r\n  \"description\": \"Quarterly promotion for select SKUs.\",\r\n  \"defaultResellers\": \"RESELLER1,RESELLER2\",\r\n  \"startDate\": \"2026-01-01T00:00:00Z\",\r\n  \"endDate\": \"2026-03-31T23:59:59Z\",\r\n  \"quoteOnly\": false\r\n}\r\n```\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat bid number, title, date range, and default reseller IDs. Require explicit confirmation before creating.</description></item></list>\r\nThe bid number and title must be nonempty and the bid number must be unused for this manufacturer. The start cannot be more than one year before server time, the end must not be in the past, and end must follow start. `QuoteOnly=true` creates an inactive bid. Service validation failures return HTTP 200 with `false`.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. The opportunity payload (bid number, title, dates, default resellers, quoteOnly).",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOpportunityInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOpportunityInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOpportunityInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOpportunityInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the opportunity was created successfully."
          },
          "400": {
            "description": "The request body is invalid.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to create an opportunity.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Opportunity/{bidNumber}": {
      "put": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Renews an existing opportunity into a new bid.",
        "description": "Creates a new opportunity based on bidNumber, using a new bid number, title, and validity dates.\r\n\r\nExample request body:```\r\n{\r\n  \"bidNumber\": \"BID-2026-002\",\r\n  \"bidTitle\": \"Q2 Promo (Renewal)\",\r\n  \"startDate\": \"2026-04-01T00:00:00Z\",\r\n  \"endDate\": \"2026-06-30T23:59:59Z\",\r\n  \"quoteOnly\": false\r\n}\r\n```\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Fetch the source bid first. Repeat the old bid number and the new bid number/dates; require confirmation before renewing.</description></item></list>\r\nCreates a new bid using the supplied new number/title/dates and copies the original description, default-reseller setting, product pricing, and assigned resellers. It sends opportunity notifications to the copied resellers. The original bid is retained.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "Path parameter. The existing bid number to renew. Resolve from `GET .../Opportunities`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. The new bid number, title, dates, and quoteOnly for the renewal.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/RenewOpportunityInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenewOpportunityInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RenewOpportunityInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RenewOpportunityInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the opportunity was renewed successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "get": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Gets details for a specific opportunity.",
        "description": "Returns one opportunity by bid number, including parts and resellers when specifications are included.\r\nUse this as the read-before-write check before price, reseller, or delete operations.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize title, dates, reseller list, and part/price lines. Do not dump the full specification unless asked.</description></item></list>\r\nAlways returns assigned reseller profiles and bid lines. `withSpecification=true` enriches lines with product data and excludes lines whose product cannot be retrieved; false retains the unexpanded bid details.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "Path parameter. The bid number. Resolve from `GET .../Opportunities` if unknown.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Query parameter. If true, includes detailed specifications. Defaults to true.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested opportunity's data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpportunityEntry"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Deletes an opportunity.",
        "description": "Permanently deletes the opportunity identified by bidNumber.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Fetch the bid first, repeat bid number and title, and require explicit confirmation. This cannot be undone.</description></item></list>\r\nIf invoices already reference the bid, the service deactivates it and returns `false`; that result can still mean a state change occurred. Otherwise it removes the bid’s product lines, reseller assignments, and header. Read the bid after deletion to confirm the resulting state.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "Path parameter. The bid number to delete. Resolve from `GET .../Opportunities`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True when the bid header was deleted. False when it was missing or could not be deleted, including a used bid that was deactivated instead."
          },
          "400": {
            "description": "The opportunity could not be deleted.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to delete this opportunity.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Opportunity/{bidNumber}/{fieldName}": {
      "post": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Updates a field on an opportunity.",
        "description": "Edits one property of the opportunity (for example Description). Use the field name exactly as it appears in the opportunity JSON.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Fetch the opportunity first. Repeat bid number, field name, and new value; confirm before calling.</description></item></list>\r\nSupported case-sensitive fields are `EndDate`, `Active`, `Opportunity`, `Description`, `DefaultResellers`, and `CanBeSetAsDefault`. Unsupported fields or a missing bid return `false`. A successful update refreshes the opportunity.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "Path parameter. The bid number to edit. Resolve from `GET .../Opportunities`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldName",
            "in": "path",
            "description": "Path parameter. The opportunity field to edit. Case-sensitive; use the name from the opportunity JSON.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query parameter. The new value for the field.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to edit this opportunity.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Opportunity/{bidNumber}/Reseller/{resellerId}": {
      "put": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Adds a reseller to an opportunity.",
        "description": "Grants resellerId access to the bid. Resolve the reseller from `GET .../Resellers`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat bid number and reseller ID/name; require confirmation before adding.</description></item></list>\r\nRequires an existing bid and reseller. Existing assignments return `false`. A successful new assignment creates a communication entry and emails users subscribed to that reseller’s opportunity notifications.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "Path parameter. The bid number to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resellerId",
            "in": "path",
            "description": "Path parameter. The reseller application ID to add. Resolve from the Resellers list.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the reseller was added successfully."
          },
          "401": {
            "description": "The user is not authorized to edit this opportunity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Removes a reseller from an opportunity.",
        "description": "Removes resellerId from the bid so they no longer see that opportunity.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat bid number and reseller ID/name; require confirmation before removing.</description></item></list>\r\nRemoves only the reseller’s assignment to this bid, then refreshes the opportunity and records manufacturer/reseller logs. It does not delete the bid or the reseller account.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "Path parameter. The bid number to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resellerId",
            "in": "path",
            "description": "Path parameter. The reseller application ID to remove from the bid.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the reseller was deleted successfully."
          },
          "401": {
            "description": "The user is not authorized to edit this opportunity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Opportunity/{bidNumber}/Reseller/{resellerId}/Email": {
      "post": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Emails an opportunity to a recipient on behalf of a reseller.",
        "description": "Sends the bid details to emailAddress as that reseller. Prefer fetching the opportunity in chat if the user only wants to review it.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Require explicit confirmation of bid number, reseller ID, and recipient email. This sends outbound email.</description></item></list>\r\nBuilds the opportunity spreadsheet in the specified reseller’s context, including that reseller’s calculated prices. A missing or inaccessible opportunity produces a false service result. The supplied recipient receives the report; an empty address falls back to the caller’s email.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "Path parameter. The bid number to send.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resellerId",
            "in": "path",
            "description": "Path parameter. The reseller application ID on whose behalf the email is sent.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query parameter. The recipient email address. Confirm with the user; do not guess.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Opportunity/{bidNumber}/PartNumber/{randmarSKU}": {
      "post": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Adds or updates a part number (bid price) on an opportunity.",
        "description": "Adds or updates randmarSKU on the bid with bidPrice (default type ItemRebate).\r\nIf the user gave an MPN, resolve the Randmar SKU via product GET first. Setting randmarDiscount requires super-admin authorization.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat bid number, SKU/MPN, bid price, and price type. This is a price change on the opportunity—require confirmation.</description></item></list>\r\nAdds or updates a bid line. The price must be nonnegative, the product must belong to the manufacturer, and the price type must be exactly `Fixed`, `ItemRebate`, `ItemCost`, `ItemCostGP`, or `ItemRebateGP`. Setting `randmarDiscount=true` additionally requires SuperAdmin authorization.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "Path parameter. The bid number to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU to add or update. Resolve from product GET if the user gave an MPN/UPC.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidPrice",
            "in": "query",
            "description": "Query parameter. The bid amount (e.g., rebate value).",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "bidPriceType",
            "in": "query",
            "description": "Query parameter. The bid amount type. Defaults to \"ItemRebate\".",
            "schema": {
              "type": "string",
              "default": "ItemRebate"
            }
          },
          {
            "name": "randmarDiscount",
            "in": "query",
            "description": "Query parameter. If true, marks the bid as a Randmar discount. Requires super-admin authorization.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to edit this opportunity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Opportunity"
        ],
        "summary": "Deletes a part number from an opportunity.",
        "description": "Removes randmarSKU from the bid. If the user gave an MPN, resolve the Randmar SKU via product GET first.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat bid number and SKU; require confirmation before removing the part and its bid price.</description></item></list>\r\nThe business service requires The Boss privileges in addition to manufacturer route authorization. Without those privileges, for an unknown bid/product, or for a product outside this manufacturer, the action returns HTTP 200 with `false`.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bidNumber",
            "in": "path",
            "description": "Path parameter. The bid number to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU to remove. Resolve from product GET if the user gave an MPN/UPC.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the deletion was successful."
          },
          "401": {
            "description": "The user is not authorized to edit this opportunity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}": {
      "get": {
        "tags": [
          "Order"
        ],
        "summary": "Gets the legacy General Document representation by exact original order number; prefer Partner GeneralDocument for new integrations.",
        "description": "\r\n<b>Preferred route:</b>\r\n  `GET V4/Partner/{routeResellerId}/GeneralDocument/{generalDocumentNumber}?withSpecification=true`.\r\n            Resolve the number through `GET V4/Partner/{routeResellerId}/Search?q={identifier}` and use\r\n            Content.OrderNumber from a ContentType=GeneralDocument result. Reseller and Partner paths use the same target account ID.\r\n\r\n<b>Why a real order can return 204 here:</b> This legacy route requires an exact original API order header for\r\n            the reseller with a non-null EnteredBy value. It does not look up the operational order view used by `GET .../Orders`\r\n            and does not remove suffixes. An operational order such as illustrative OW01234567B may therefore return 204 even\r\n            though it exists. This is not proof of an empty order and does not require creating or changing an order.\r\n\r\nThis legacy payload uses OrderDetails, ShipmentDetails, InvoiceDetails, and CreditDetails when withSpecification=true.\r\n            The preferred Partner General Document uses ActiveOrderDetails and CompletedOrderDetails instead; do not mix the two shapes.\r\n            Both may include related headers for multiple operational documents. Use individual Document GETs only if no General Document\r\n            can be resolved or an exact invoice/order's PartNumbers are required.\r\n\r\n<b>AI Agent guidance</b>\r\n<list type=\"bullet\">\r\n  <item>\r\n    <description>Summarize status, ship-to, lines, and related headers; do not dump full specifications unless asked.</description>\r\n  </item>\r\n  <item>\r\n    <description>Before cancel or hold, inspect OrderHeaders so the user can choose one vs all related order numbers.</description>\r\n  </item>\r\n</list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "Exact original API order header number, not a reseller PO, GUID, invoice number, or suffixed operational order number.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "When true (default), includes the legacy detail and charge collections. False returns headers and logs without those line collections.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Legacy GeneralDocumentOld object; prefer Partner GeneralDocument for new read-only integrations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralDocumentOld"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No matching original API header with EnteredBy was found for this reseller. Resolve the General Document via Partner Search; do not interpret this as no purchased products."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/Comment": {
      "put": {
        "tags": [
          "Order"
        ],
        "summary": "Adds a comment to an order.",
        "description": "Appends an internal comment/note to orderNumber (special instructions or audit notes).\r\nThis does not cancel, hold, or ship the order.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat the order number and comment text; confirm the user wants it stored on that order.</description></item><item><description>Do not invent comments — only write what the user asked to record.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to add the comment to.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "description": "The comment text to add.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the comment was successfully added."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{documentNumber}/ShippingSlip": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Uploads a custom shipping slip for an order.",
        "description": "Attaches a custom shipping slip file (PDF or image) to documentNumber.\r\nThis can also be supplied at checkout via `ShippingSlipFileB64` on ProcessNew.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the order/document number; this replaces how the warehouse prints the slip for that order.</description></item><item><description>Do not upload a file the user did not provide. If no file is sent, the API returns 204.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "The order number to attach the shipping slip to.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "The shipping slip file to upload.",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns true if the file was successfully uploaded."
          },
          "204": {
            "description": "If no file is provided in the request."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/PONumber/{resellerPONumber}": {
      "get": {
        "tags": [
          "Order"
        ],
        "summary": "Gets an order by the reseller's purchase order number.",
        "description": "Looks up the Randmar order using the reseller's own PO instead of the Randmar order number.\r\nThis is an exact PO lookup of an original API order header with EnteredBy populated, not a complete invoice-history search.\r\nFor new integrations, prefer Partner Search followed by the Partner GeneralDocument GET with withSpecification=true.\r\nThis legacy PO route returns headers without detail collections; if it returns an order, its OrderNumber can be used on the preferred GeneralDocument route.\r\nUse this before `POST .../Cart/ProcessNew/{cartName}` to prevent duplicate orders for the same PO.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Repeat the PO number; if an order is found, report the Randmar order number rather than placing a second order.</description></item><item><description>Summarize status and order number; do not dump every line unless asked.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resellerPONumber",
            "in": "path",
            "description": "The reseller's PO number.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested order's information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneralDocumentOld"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/Email": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Emails an order confirmation to a recipient.",
        "description": "Sends order orderNumber to emailAddress, with optional comment in the body.\r\nRelated: `POST .../Document/{documentNumber}/Email` for invoices/shipments.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm order number and the exact recipient email before sending.</description></item><item><description>Do not email order details to an address the user did not provide.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to send.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "description": "An optional comment to include in the email.",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{documentNumber}/LuggaBeast": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Sends an order confirmation through the legacy LuggaBeast integration.",
        "description": "Anonymous integration callback: no reseller authorization check is performed by this action. Sends the general-document confirmation to the reseller's ResellerOrders notification audience; there is no caller-supplied recipient parameter.",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "Reseller application ID used to retrieve the document and notification recipients.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentNumber",
            "in": "path",
            "description": "General-document or order identifier to include in the confirmation.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON boolean from the confirmation send; false when the document cannot be found. Success is not proof of recipient delivery."
          }
        },
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/Cancel": {
      "delete": {
        "tags": [
          "Order"
        ],
        "summary": "Cancels an active order.",
        "description": "Cancels the Randmar sales order identified by orderNumber. This is a destructive action.\r\n\r\n<b>Important:</b> The \"order\" the reseller refers to in conversation is often the broader `GeneralDocument` context,\r\nwhich may include multiple order headers. This endpoint cancels only the specific orderNumber provided.\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description><b>Confirm scope:</b> Before canceling, call `GET V4/Reseller/{routeResellerId}/Order/{orderNumber}` and inspect the returned\r\n`OrderHeaders` to determine whether multiple order numbers are part of the same `GeneralDocument` context.\r\n</description></item><item><description><b>Ask the user:</b> “Do you want to cancel only order orderNumber, or all orders in this document?”\r\nIf “all”, list the exact order numbers and require an explicit confirmation covering the full list.\r\n</description></item><item><description><b>If canceling multiple:</b> This endpoint must be called once per order number; confirm the list first and expect partial failures\r\n(some orders may already be shipped/invoiced and not cancellable).\r\n</description></item><item><description><b>User confirmation:</b> Required. Repeat the order number(s). Do not call until the user explicitly confirms cancellation.\r\nThis cancels a live sales order; it does not delete a cart.\r\n</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to cancel.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "description": "An optional comment explaining the reason for cancellation (recommended for auditability).",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the order was successfully cancelled."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/ChangeLocation": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Changes the fulfillment warehouse location for an order.",
        "description": "Updates the warehouse from which orderNumber will be fulfilled.\r\nThe location must match an existing active warehouse ID; warehouse names and city names are not accepted.\r\nThis can change which stock is used and when the order ships.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm order number and location code; this changes fulfillment, not just a label.</description></item><item><description>Do not change location on an already-shipped order unless the user understands it may fail.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to modify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location",
            "in": "query",
            "description": "The new active warehouse ID (matched case-insensitively).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the location was successfully changed, or false if the location is invalid or the change is not allowed."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/OnHold": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Sets or clears the On Hold status of an active order.",
        "description": "When on hold, the order is not processed or shipped until released (newValue = false).\r\nThe order must exist and be in a state that allows hold/release.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat order number and the requested hold value (`true` = hold, `false` = release) and confirm before calling.</description></item><item><description>Holding stops fulfillment; releasing allows the warehouse to proceed — both are operational changes.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number of which to change the On Hold status.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Whether the order should be placed on hold.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The On Hold status was successfully changed."
          },
          "401": {
            "description": "The user is not authorized to access this cart.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/ShipVia/Change": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "(Internal) Changes the shipping method for an order.",
        "description": "Updates the carrier/method (ShipVia) for an existing order (e.g. CANPAR, PURGRD).\r\nPrefer quoting first with `POST .../Order/{orderNumber}/ShipVia/Estimate`.\r\nIntended for internal/warehouse use.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm order number and ShipVia code; this changes how the order will ship.</description></item><item><description>Use a code from Estimate rather than inventing a carrier code.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to modify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipVia",
            "in": "query",
            "description": "The new shipping method code (e.g., 'CANPAR', 'PURGRD').",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the shipping method was successfully changed."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/ChangeShipVia": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "(Internal) Changes the shipping method for an order.",
        "description": "Updates the carrier/method (ShipVia) for an existing order (e.g. CANPAR, PURGRD).\r\nPrefer quoting first with `POST .../Order/{orderNumber}/ShipVia/Estimate`.\r\nIntended for internal/warehouse use.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm order number and ShipVia code; this changes how the order will ship.</description></item><item><description>Use a code from Estimate rather than inventing a carrier code.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to modify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipVia",
            "in": "query",
            "description": "The new shipping method code (e.g., 'CANPAR', 'PURGRD').",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the shipping method was successfully changed."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/ShipVia/Estimate": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "(Internal) Gets shipping cost estimates for an order.",
        "description": "Returns available shipping methods and estimated costs for orderNumber.\r\nUse this to pick a ShipVia before `POST .../Order/{orderNumber}/ShipVia/Change`.\r\nFor cart checkout quotes, use `POST .../Cart/ShippingMethods/{cartName}` instead.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Present carrier, service, and price as a short comparison; do not dump raw estimate rows.</description></item><item><description>This is a quote only — confirm with the user before calling ChangeShipVia.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to estimate shipping for.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of shipping methods and their estimated costs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShipViaEstimate"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/EditInformation": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Edits the header information of an order.",
        "description": "Updates shipping address and contact fields on orderNumber in one call.\r\nRequires warehouse-level authorization. For a single field (PO or end-user PO) prefer the dedicated PO endpoints.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat order number and the new ship-to address/contact; confirm before writing — this can reroute fulfillment.</description></item><item><description>Do not leave required address fields blank; confirm province/postal/country with the user.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endUserPONumber",
            "in": "query",
            "description": "The end user's PO number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shippingDate",
            "in": "query",
            "description": "The requested shipping date.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipToName",
            "in": "query",
            "description": "The recipient's name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipToAddress1",
            "in": "query",
            "description": "The first line of the shipping address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipToAddress2",
            "in": "query",
            "description": "The second line of the shipping address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipToCity",
            "in": "query",
            "description": "The shipping city.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipToProvince",
            "in": "query",
            "description": "The shipping province/state.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipToPostalCode",
            "in": "query",
            "description": "The shipping postal/zip code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipToContactName",
            "in": "query",
            "description": "The recipient contact name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shipToContactPhone",
            "in": "query",
            "description": "The recipient contact phone number.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the order was successfully updated."
          },
          "400": {
            "description": "If the order information could not be updated.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/EditItem/{randmarSku}": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Edits a line item quantity or unit price on an order.",
        "description": "Updates quantity and/or unit price for randmarSku on orderNumber.\r\nOmitted parameters are left unchanged. This mutates a live order, not a cart.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat order number, SKU, and the new quantity/price; confirm before calling.</description></item><item><description>Shipped/invoiced lines may not be editable — report failure rather than retrying blindly.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number containing the item to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSku",
            "in": "path",
            "description": "The Randmar SKU of the item to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "description": "The new quantity for the item. Optional.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "unitPrice",
            "in": "query",
            "description": "The new unit price for the item. Optional.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the item was successfully updated."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/OrderDate": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "(Internal) Edits the order date.",
        "description": "Updates the main date on orderNumber. Intended for internal use.\r\nFor requested ship date, use `POST .../Order/{orderNumber}/ShippingDate`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm order number and the new date; this rewrites the order date used in reporting and processing.</description></item><item><description>Do not backdate or future-date unless the user explicitly requested that date.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newvalue",
            "in": "query",
            "description": "The new date for the order.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the date was successfully updated."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/ShippingDate": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "(Internal) Changes the requested shipping date for an order.",
        "description": "Updates the requested ship date on orderNumber. Expect newvalue as `YYYY-MM-DD`.\r\nExpediting (moving the date earlier) may require special authorization. To release a future-dated order for today,\r\nuse `POST .../Order/{orderNumber}/Today`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm order number and the new ship date; this can change when the warehouse ships.</description></item><item><description>Do not expedite unless the user asked to ship sooner; note that earlier dates may be rejected without boss authorization.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to modify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newvalue",
            "in": "query",
            "description": "The new requested shipping date (e.g., '2025-12-31').",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the shipping date was successfully updated."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/ExpeditionLine": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Edits the expedition line for an order.",
        "description": "Updates a specific expedition-related field on orderNumber.\r\nThis is not the same as changing ShipVia or shipping date.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm order number and the new expedition-line value before writing.</description></item><item><description>Do not invent expedition text — only apply the value the user provided.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to modify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new value for the expedition line.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the expedition line was successfully updated."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/PONumber": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Edits the reseller's purchase order number for an order.",
        "description": "Sets the reseller PO on orderNumber. For end-user PO use\r\n`POST .../Order/{orderNumber}/EndUserPONumber`. Duplicate-order checks use this PO via\r\n`GET .../Order/PONumber/{resellerPONumber}`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat order number and the new PO; confirm before overwriting an existing PO.</description></item><item><description>Changing PO can affect duplicate detection and customer paperwork.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to modify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new PO number.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the PO number was successfully updated."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/EndUserPONumber": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Edits the end user's purchase order number for an order.",
        "description": "Sets the end-customer PO on orderNumber (distinct from the reseller PO at\r\n`POST .../Order/{orderNumber}/PONumber`).\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat order number and the new end-user PO; confirm before overwriting.</description></item><item><description>This prints on shipping/invoice paperwork — do not guess the customer's PO.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to modify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new end user PO number.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the end user PO number was successfully updated."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/Today": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "(Internal) Releases a future-dated order for processing today.",
        "description": "If the order was created with a future shipping date, this releases it for immediate processing.\r\nRelated: `POST .../Order/{orderNumber}/ShippingDate` to set a specific date.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the order number; this can start warehouse processing immediately.</description></item><item><description>Do not release a future order unless the user asked to ship/process it today.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to release.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the order was successfully released."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/EditCharge/{miscellaneousCharge}": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "(Internal) Edits a miscellaneous charge on an order.",
        "description": "Updates the price of miscellaneous charge miscellaneousCharge on orderNumber.\r\nThis is a financial write (freight/surcharge), not a product line edit.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat order number, charge code, and new price; confirm before changing billed amounts.</description></item><item><description>Do not invent charge codes or prices.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to modify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "miscellaneousCharge",
            "in": "path",
            "description": "The code for the miscellaneous charge to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "description": "The new price for the charge.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the charge was successfully updated."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/EditMiscellaneousCharge/{miscellaneousCharge}": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "(Internal) Edits a miscellaneous charge on an order.",
        "description": "Updates the price of miscellaneous charge miscellaneousCharge on orderNumber.\r\nThis is a financial write (freight/surcharge), not a product line edit.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat order number, charge code, and new price; confirm before changing billed amounts.</description></item><item><description>Do not invent charge codes or prices.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to modify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "miscellaneousCharge",
            "in": "path",
            "description": "The code for the miscellaneous charge to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "description": "The new price for the charge.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the charge was successfully updated."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Order/{orderNumber}/Terms/{termsCode}": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "(Internal) Sets payment terms on an order.",
        "description": "Sets terms code on orderNumber. Options: NET10, NET20, NET30, NET45, NET60, NET90\r\n(e.g. NET20 = payment due 20 days after invoice date). This is a financial/credit change.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat order number and terms code; confirm before changing when payment is due.</description></item><item><description>Only use the documented NET* codes; do not invent terms.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "The order number to modify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "termsCode",
            "in": "path",
            "description": "The code for the terms to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the charge was successfully updated."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Orders": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Lists current orders for a reseller.",
        "description": "Returns operational order headers, not product lines. OrderNumber, PONumber, and NumberOfLines describe the header;\r\nNumberOfLines is a count, not a line collection. An OrderNumber here can include a suffix and is not necessarily\r\nthe original identifier accepted by the legacy `GET .../Order/{orderNumber}` route.\r\n\r\n<b>Preferred line-item workflow:</b> Call `GET V4/Partner/{routeResellerId}/Search?q={orderNumber}`,\r\nselect a result with ContentType=GeneralDocument, and use Content.OrderNumber in\r\n`GET V4/Partner/{routeResellerId}/GeneralDocument/{generalDocumentNumber}?withSpecification=true`.\r\nRead ActiveOrderDetails and CompletedOrderDetails for RandmarSKU, MPN, Quantity, and UnitPrice.\r\nFor current activity, `GET V4/Partner/{routeResellerId}/GeneralDocuments` is the preferred starting list.\r\nIf no General Document is available, `GET .../Document/{orderNumber}` reads the exact operational order\r\nand its PartNumbers. `GET .../Documents/ActiveOrderDetails` provides bulk active lines, not completed purchase history.\r\nThese workflows are read-only; no checkout, hold, cancellation, or invoice-creation request is needed.\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize order numbers, dates, ship-to, and status; do not dump every line item.</description></item><item><description>When the user supplies a PO or suffixed order number, use Partner Search to resolve a GeneralDocument before fetching lines.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operational order headers. Fetch General Document details separately for line items.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Order"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Orders/Shipments": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Lists current shipments for a reseller.",
        "description": "Returns active shipments for routeResellerId. Use this to resolve a shipment number\r\nbefore tracking, invoicing, or canceling via `V4/Reseller/{routeResellerId}/Shipment/{shipmentNumber}/...`.\r\nRelated: `GET .../Orders` for sales orders; shipment cancel/invoice change fulfillment state.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize shipment numbers, related orders, and tracking; do not dump every carton/line.</description></item><item><description>Do not cancel or invoice from this list without confirming the exact shipment number with the user.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of shipments.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Shipment"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Partner/{partnerId}": {
      "get": {
        "tags": [
          "Partner"
        ],
        "summary": "Gets detailed information for a specific partner.",
        "description": "Retrieves a comprehensive profile for another partner, which could be a manufacturer, reseller, or sales agency.\r\nThe level of detail can be controlled with the `withSpecification` parameter.\r\nThis is a lookup of `partnerId` in the context of the calling partner (`routeApplicationId`).\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Pass the target partner's ID in `partnerId`; `routeApplicationId` is the caller partner, not HQ (`2` / `FGDCT3037`).</description></item><item><description>Keep `withSpecification=false` unless detailed fields are required.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID of the caller. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "partnerId",
            "in": "path",
            "description": "The application ID of the partner to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Whether to include detailed specifications in the response. Defaults to false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested partner's information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Partner"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Agency/{routeAgencyId}/Partner/{newUserEmailAddress}": {
      "put": {
        "tags": [
          "Partner"
        ],
        "summary": "Sends an agency-branded invitation to a new Randmar user.",
        "description": "Only addresses that do not already belong to a Randmar user can be invited. Sends an invitation email and an internal notification; it does not create or activate a reseller account or establish an agency association.",
        "parameters": [
          {
            "name": "routeAgencyId",
            "in": "path",
            "description": "The target sales agency's application ID, accessible to the caller.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newUserEmailAddress",
            "in": "path",
            "description": "URL-encoded destination email address for the invitation.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the invitation was sent; false for an invalid/existing email or failed send."
          },
          "401": {
            "description": "The caller is not authorized for the agency."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Shopify/{shopifyHostName}/Product/{randmarSKU}": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets product information for a Shopify store.",
        "description": "Retrieves product details, including Shopify-specific information, for a given Randmar SKU.\r\nIncludes ManufacturerCategory, Manufacturer, and AvailableToBuy for the linked store's account.\r\nResolution tries the product identifier, then an unambiguous SKU/MPN search, then zero-padding short numeric values to twelve digits.",
        "parameters": [
          {
            "name": "shopifyHostName",
            "in": "path",
            "description": "The host name of the Shopify store (e.g., 'your-store.myshopify.com').",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested product's information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "401": {
            "description": "The request is not authorized (e.g., invalid Shopify credentials).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No product could be resolved unambiguously."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Product/{randmarSKU}": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets detailed product information by Randmar SKU.",
        "description": "Returns a product profile for the specified `randmarSKU`.\r\nUse `withSpecification` to include extended specification data.\r\nIf `shopifyHostName` is provided, Shopify-specific fields are included (when available) for that store context.\r\nThe response includes `Attachments`, containing product document metadata such as PDF datasheets. Use each\r\nattachment UUID with `GET V4/Partner/{applicationId}/Attachment/{attachmentUUID}` to download the file.\r\nResolve an unknown MPN via product search, then use this SKU on cart add.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize name, SKU, stock, and price; set `withSpecification` false if you only need identity/pricing.</description></item><item><description>Provide `shopifyHostName` only when Shopify-context fields are needed; resolve stores via `GET .../Shopify/Accounts`.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "When true, includes detailed specifications. Defaults to true.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "Optional Shopify store host name (typically `*.myshopify.com`) used to enrich the product response with Shopify-context fields when available.",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The product information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Product/{randmarSKU}/SalesStatistics": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets product sales statistics for a date range.",
        "description": "Returns aggregated sales statistics for the specified product.\r\nProvide `startDate` and/or `endDate` to constrain the reporting period.\r\nRelated: manufacturer-level stats at `GET .../Manufacturer/{manufacturerId}/SalesStatistics`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Confirm SKU and date range; summarize totals/trend rather than dumping every statistic row.</description></item><item><description>If dates are omitted, say that the service may apply defaults and results may not be reproducible.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Optional start date for the reporting period.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Optional end date for the reporting period.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of sales statistics records for the requested period.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SalesStatistic"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Product/{randmarSKU}/Shopify": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Starts a background sync of a single product to the reseller's Shopify store.",
        "description": "Enqueues a background job that creates/updates the product in Shopify for the provided `shopifyHostName`.\r\nIf `opportunityNumber` is provided, the sync may apply opportunity-specific pricing rules for that opportunity.\r\n\r\nSide effects: creates a `SyncShopifyProducts` background job and posts internal audit/notification messages.\r\nThe actual Shopify API calls occur asynchronously when the job executes.\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm SKU, store host name, and (if present) opportunity number; this can create/update the product in Shopify.</description></item><item><description>Store must be linked; reseller must not be on hold. Resolve hosts via `GET .../Shopify/Accounts`.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU to synchronize to Shopify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name (typically `*.myshopify.com`).",
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "opportunityNumber",
            "in": "query",
            "description": "Optional opportunity number to apply opportunity-specific pricing during sync.",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the job was started successfully."
          },
          "400": {
            "description": "The job could not be started (for example, store not linked, SKU not eligible, reseller on hold, or an exception occurred).",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Product/{randmarSKU}/Shopify/ProductPageWriting": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Enqueues a background job to write (or improve) the reseller's Shopify product page copy.",
        "description": "Enqueues a `ShopifyProductPageWriting` background job for the specified `randmarSKU` and `shopifyHostName`.\r\nThe job runs asynchronously and is expected to apply product-page writing best practices (titles, descriptions, bullets, SEO, etc.).\r\n\r\n<b>Billing / cost</b>\r\nThis operation incurs a charge of <b>$10 per product</b> (per randmarSKU) when the job is enqueued/executed.\r\nBut, Free for resellers with Priority Academy.\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm SKU, target `shopifyHostName`, and acknowledgement of the <b>$10/product</b> cost (unless Priority Academy) before enqueueing.</description></item><item><description>Store must be linked; reseller must not be on hold. Do not re-run the same SKU unless the user explicitly asks.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU whose Shopify product page should be written.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name (typically `*.myshopify.com`).",
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "specificInstructions",
            "in": "query",
            "description": "Optional specific instructions for the product page writing job (e.g., \"focus on SEO\", \"emphasize features\", etc.).",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the job was enqueued successfully."
          },
          "400": {
            "description": "The job could not be enqueued (for example, store not linked, SKU not eligible, reseller on hold, or an exception occurred).",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Product/{randmarSKU}/Requisition": {
      "put": {
        "tags": [
          "Product"
        ],
        "summary": "Adds a product to a requisition (request-to-stock) for a warehouse location.",
        "description": "Adds the specified quantity of `randmarSKU` to a purchase requisition for `location`.\r\nThis \"request-to-stock\" flow can trigger a notification to the manufacturer indicating reseller interest\r\nwhen the product is not currently on-hand or on-order.\r\nThis is not a cart add and does not place a sales order.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm SKU, warehouse location, and quantity; this can notify the manufacturer of demand.</description></item><item><description>Do not use this when the user wants to buy now — use cart add + `ProcessNew` instead.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product to request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location",
            "in": "query",
            "description": "The warehouse/location code for the requisition.",
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "description": "The quantity to request.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the product was added to the requisition."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Product/{randmarSKU}/Serialize": {
      "put": {
        "tags": [
          "Product"
        ],
        "summary": "Serializes and caches product data (internal maintenance).",
        "description": "Triggers an internal process to serialize and cache product data for `randmarSKU`.\r\nIntended for internal maintenance/performance workflows; not recommended for general client use.",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The ID of the reseller making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product to serialize.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the product was serialized successfully."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Product/{randmarSKU}": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets detailed product information by Randmar SKU.",
        "description": "Returns a product profile for the specified `randmarSKU`.\r\nUse `withSpecification` to include extended specification data.\r\nWhen specifications are requested and the partner has warehouses, `TransactionHistory`\r\ncontains the 50 most recent transactions across only those warehouses.\r\nIf `shopifyHostName` is provided, Shopify-specific fields are included (when available) for that store context.\r\nThe response includes `Attachments`, containing product document metadata such as PDF datasheets. Use each\r\nattachment UUID with `GET V4/Partner/{routeApplicationId}/Attachment/{attachmentUUID}` to download the file.\r\n\r\nA Randmar SKU maps to exactly one manufacturer.\r\nFor a product to be Shopify-ready it must have a Title and an HTML Body description.\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Read-only:</b> Yes.</description></item><item><description><b>Confirmation:</b> Not required.</description></item><item><description><b>Shopify preflight (required):</b> Before calling this endpoint, first call `GET V4/Partner/{routeApplicationId}/Shopify`\r\n(with `withToken=false`) to discover linked Shopify store host name(s). Use the returned host name (typically `*.myshopify.com`)\r\nas `shopifyHostName` when Shopify-context fields are needed. Do not guess or hardcode the host name.\r\n</description></item><item><description><b>Shopify identifier:</b> Provide `shopifyHostName` only when Shopify-context fields are needed; if no store is linked/known, Shopify fields may be absent.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "When true, includes detailed specifications. Defaults to false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "Optional Shopify store host name (typically `*.myshopify.com`) used to enrich the product response with Shopify-context fields when available.\r\nAI Agent Instruction: Fetch this value from `GET V4/Partner/{routeApplicationId}/Shopify` (do not guess).",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The product information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Product/{randmarSKU}/Generate/Image": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Generates an image using supplied public reference images, or the product's primary image by default.",
        "description": "The prompt is completely user-driven. The endpoint does not infer the user's creative intent beyond the supplied prompt and\r\nreference images, so an agent acting on a user's behalf must gather enough context before calling it.\r\nWhen `referenceImageUrls` contains at least one non-empty URL, only those images are used as references;\r\notherwise the product's primary image is used. Registered PDF product attachments are omitted by default;\r\nset `includeProductPdfAttachments` to true to summarize them into supporting factual context.\r\nIf supplying reference images, each URL must be anonymously downloadable. Upload via\r\n`POST V4/Partner/{applicationId}/Generation/Upload`—never a private Google Drive / login-gated link.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Establish the purpose of the image and where it will be used.</description></item><item><description>For marketing imagery, confirm the aspect ratio, intended audience, the user's visual preferences, what should attract the audience's attention, and the feelings or response the image should inspire.</description></item><item><description>Capture any other relevant creative direction, such as setting, composition, style, branding, colors, mood, and elements to include or avoid.</description></item><item><description>If this context is missing, ask the user follow-up questions before calling the endpoint. Do not guess or submit a simple, low-detail prompt.</description></item><item><description>When presenting the result of this call to the user, either embed the public staging URL returned, or show it as a clickable link with a human-readable label. Avoid just dropping the whole raw response in chat.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU whose primary image is used as the reference.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aspectRatio",
            "in": "query",
            "description": "The generated image's aspect ratio. Allowed values: 21:9, 16:9, 4:3, 3:2, 1:1, 9:16, 3:4, 2:3, 5:4, and 4:5. Defaults to 1:1.",
            "schema": {
              "pattern": "^(21:9|16:9|4:3|3:2|1:1|9:16|3:4|2:3|5:4|4:5)$",
              "type": "string",
              "default": "1:1"
            }
          }
        ],
        "requestBody": {
          "description": "The request body containing the image-generation prompt, reference URLs, and PDF-context preference.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.ProductController.GenerateProductMediaRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.ProductController.GenerateProductMediaRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.ProductController.GenerateProductMediaRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.ProductController.GenerateProductMediaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A short-lived staging URL for the generated image.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The SKU or prompt is missing, or no generated URL was returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Product/{randmarSKU}/Generate/Video": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Generates a video using supplied public reference images, or the product's primary image by default.",
        "description": "The prompt is completely user-driven. The endpoint does not infer the user's creative intent beyond the supplied prompt and\r\nreference images, so an agent acting on a user's behalf must gather enough context before calling it.\r\nWhen `referenceImageUrls` contains at least one non-empty URL, only those images are used as references;\r\notherwise the product's primary image is used. Registered PDF product attachments are omitted by default;\r\nset `includeProductPdfAttachments` to true to summarize them into supporting factual context.\r\nThe video is generated by Gemini Omni Flash as a 10-second 720p reference-to-video request.\r\nIf supplying reference images, each URL must be anonymously downloadable. Upload via\r\n`POST V4/Partner/{applicationId}/Generation/Upload`—never a private Google Drive / login-gated link.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Establish the purpose of the video and where it will be used.</description></item><item><description>For a marketing video, confirm the intended audience, the user's visual preferences, what should attract the audience's attention, and the feelings or response the video should inspire.</description></item><item><description>Capture any other relevant creative direction, such as story or action, setting, composition, camera movement, style, branding, colors, mood, and elements to include or avoid.</description></item><item><description>If this context is missing, ask the user follow-up questions before calling the endpoint. Do not guess or submit a simple, low-detail prompt.</description></item><item><description>Save the returned generation ID and poll `GET .../Product/Generate/Video/{generationId}` until it completes.</description></item><item><description>When completed, either embed the returned public staging URL or show it as a clickable link with a human-readable label.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU whose primary image is used as the reference.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aspectRatio",
            "in": "query",
            "description": "The generated video's aspect ratio. Allowed values: 9:16 and 16:9. Defaults to 9:16.",
            "schema": {
              "pattern": "^(9:16|16:9)$",
              "type": "string",
              "default": "9:16"
            }
          }
        ],
        "requestBody": {
          "description": "The request body containing the video-generation prompt, reference URLs, and PDF-context preference.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.ProductController.GenerateProductMediaRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.ProductController.GenerateProductMediaRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.ProductController.GenerateProductMediaRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.ProductController.GenerateProductMediaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "The video generation was accepted. Returns an ID to poll for completion.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductVideoGenerationResult"
                }
              }
            }
          },
          "400": {
            "description": "The SKU or prompt is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Product/Generate/Video/{generationId}": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets the status or result of an asynchronous product-video generation.",
        "description": "Poll this endpoint using the ID returned by `POST .../{randmarSKU}/Generate/Video`.\r\nA 202 response means generation or file processing is still in progress. A 200 response is terminal;\r\nwhen successful, `Url` contains the short-lived public staging URL.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "generationId",
            "in": "path",
            "description": "The opaque generation ID returned by the video-generation POST.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The generation completed or reached another terminal state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductVideoGenerationResult"
                }
              }
            }
          },
          "202": {
            "description": "The generation is still in progress.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductVideoGenerationResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The generation ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Product/{randmarSKU}/LocationDetails/{warehouseId}": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets warehouse-specific location and inventory details for a product.",
        "description": "Use this endpoint to retrieve product details scoped to a specific warehouse (location-level status, inventory context, etc.).\r\nThe warehouse must be attributed to the caller's application; otherwise a 403 is returned.\r\nRelated: `GET .../Product/{randmarSKU}` for the catalog profile, `PUT` on this same route to change on-hand qty.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Read this before adjusting quantity so you can repeat back current on-hand qty, SKU, and warehouse ID.</description></item><item><description>A 403 means the warehouse is not attributed to this partner—do not retry with a guessed warehouse ID.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse ID to retrieve location details for.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The product with location details for the requested warehouse."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The warehouse is not attributed to the caller's application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "put": {
        "tags": [
          "Product"
        ],
        "summary": "Updates the on-hand quantity for a product in a specific warehouse.",
        "description": "Sets quantity on hand for `randmarSKU` at `warehouseId`.\r\nThe warehouse must be attributed to the caller's application; otherwise a 403 is returned.\r\nRead current location details first with the GET on this same route.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back SKU, warehouse ID, current qty (if known), and the new `qty` and obtain explicit confirmation—this changes inventory.</description></item><item><description>Do not invent a quantity; use the count the user stated.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse ID to update inventory for.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qty",
            "in": "query",
            "description": "The new quantity on hand.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the adjustment was successful."
          },
          "400": {
            "description": "The request is missing required parameters.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The warehouse is not attributed to the caller's application.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{productNumber}": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets details for a specific product (by Randmar SKU, MPN, or UPC).",
        "description": "Retrieves all available information for a single product identifier (Randmar SKU, MPN, or UPC).\r\nUse `withSpecification` to include extended specification details when needed.\r\nThe response includes `Attachments`, which contains registered product document metadata such as PDF\r\ndatasheets. Use each attachment UUID with `GET V4/Partner/{applicationId}/Attachment/{attachmentUUID}`\r\nto download the file.\r\nThis is the preferred read-before-write check before catalog, price, image, or requisition changes.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>For an existing product, use this endpoint to resolve a supplied Randmar SKU, MPN, or UPC before editing. Verify `ManufacturerId`, `RandmarSKU`, `MPN`, and `State`; use the resolved Randmar SKU for subsequent writes.</description></item><item><description>Summarize current values for every field the user intends to change, including product-level `MAP`/`MSRP`, package dimensions, carton quantities, and `BodyHTML`. `Distribution.MAP`/`Distribution.MSRP` are separate values and are not the product-header fields edited by the field update endpoint.</description></item><item><description>Specification fields not present in the returned product schema (for example yield or compatibility) are not standalone editable properties. When supplied by the user, include them in the customer-facing `BodyHTML` description rather than inventing field names.</description></item></list>\r\nThe `IsManufacturer` flag indicates whether the product category belongs to this manufacturer. Detailed operational data is added only for owned products with specifications enabled; attachments are included independently of that flag.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productNumber",
            "in": "path",
            "description": "Path parameter. The Randmar SKU, MPN, or UPC of the product to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Query parameter. If true, includes detailed specifications in the response. Defaults to true.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested product's data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{productNumber}/SalesStatistics": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets sales statistics for a specific product (by Randmar SKU, MPN, or UPC).",
        "description": "Retrieves sales statistics for a product over an optional date range.\r\nPrefer a bounded range; wide ranges can be large. For manufacturer-wide sales, use Report Sales/JSON instead.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize quantity and revenue over the period. Do not dump every statistic row unless asked.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productNumber",
            "in": "path",
            "description": "Path parameter. The Randmar SKU, MPN, or UPC of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Query parameter. Optional start date; defaults to one year before the current server time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Query parameter. Optional end date; defaults to the current server time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of sales statistics for the product.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SalesStatistic"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product": {
      "put": {
        "tags": [
          "Product"
        ],
        "summary": "Inserts a new product into Randmar’s catalog for this manufacturer (high-impact).",
        "description": "Creates a new product record in the Randmar catalog and then applies optional extended fields (MasterCarton, SkidQuantity, BodyHTML, MAP, MSRP).\r\nThis endpoint inserts a new catalog record. For a product that already exists, use `POST .../Product/{productNumber}/{fieldName}` and/or the BodyHTML endpoint; do not use this endpoint to repair or replace an existing record.\r\nAfter a successful insert, recommend queuing a `GenerateProductPictures` task for the returned Randmar SKU with `PUT V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/GenerateImage`. This queues asynchronous picture generation; it does not create images as part of the insert response.\r\n\r\n<b>AI Agent safety (required)</b><list type=\"bullet\"><item><description><b>Do not call this endpoint until all product information has been verified and explicitly confirmed.</b></description></item><item><description>Before inserting, validate UPC/MPN/Title/Category/Cost/Weight with the user (and reconcile against any source-of-truth documents).</description></item><item><description>After insert, re-fetch the product by the returned Randmar SKU to confirm all fields were persisted as expected (some fields may not be immediately up to date in the initial response).</description></item><item><description>Once the product is confirmed and its Randmar SKU is known, recommend queuing picture generation through the `GenerateImage` endpoint; generated pictures are asynchronous and may appear on commerce channels.</description></item></list>\r\nExample request body:```\r\n{\r\n  \"upc\": \"012345678905\",\r\n  \"category\": \"CABLES\",\r\n  \"mpn\": \"ACME-USB-C-2M\",\r\n  \"title\": \"ACME USB-C Cable (2m)\",\r\n  \"standardCost\": 4.25,\r\n  \"unitWeight\": 0.12,\r\n  \"masterCarton\": 50,\r\n  \"skidQuantity\": 1000,\r\n  \"bodyHTML\": \"<p>Durable USB-C cable.</p>\",\r\n  \"map\": 9.99,\r\n  \"msrp\": 14.99\r\n}\r\n```\r\nUse a category belonging to this manufacturer, a nonempty title and MPN, a positive StandardCost, and a nonnegative UnitWeight when provided. MPN spaces are normalized to hyphens. Optional property updates run after creation and are not atomic. Currently the MSRP update is attempted only when MAP is also supplied; provide both values together or update MSRP separately, then re-fetch the product.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. The details of the product to create.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/InsertProductInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsertProductInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InsertProductInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InsertProductInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The newly created product object (some fields may require re-fetch by Randmar SKU).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "description": "The product could not be created with the provided details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to create a product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{productNumber}/{fieldName}": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Edits a field or property of a given product.",
        "description": "Edits one field on an existing product header. Identify the product by Randmar SKU, MPN, or UPC; using the resolved Randmar SKU is preferred.\r\nfieldName is case-sensitive. Only these field names are supported: `State`, `CountryCodeOfOrigin`, `UnitHeight`, `UnitLength`, `UnitWidth`, `Require3DScan`, `MasterCarton`, `UnitWeight`, `OpportunityOnly`, `TransparencyCode`, `SerialNumber`, `Category`, `StandardCost`, `MPN`, `AutoUpdate`, `SkidQuantity`, `Title`, `MSRP`, `MAP`, `BodyHTML`, `VoiceoverCaption`, and `SceneName`. Use the exact spelling shown here; arbitrary names such as `Yield`, `YieldType`, and `Compatible` are rejected. Put those descriptive specifications in `BodyHTML` instead.\r\nSend `newValue` as a query parameter containing the scalar value as text (for example `newValue=27.46` for MAP, `newValue=1` for MasterCarton, or `newValue=MX` for CountryCodeOfOrigin). MAP/MSRP/StandardCost update catalog pricing; MAP/MSRP are product-header values and are distinct from `Distribution.MAP`/`Distribution.MSRP`.\r\n`CountryCodeOfOrigin` must be an ISO 3166-1 alpha-2 country code. `State` accepts `Hold`, `Active`, or `Discontinued`. Numeric values must be valid for the selected field; `Category` must be valid for this manufacturer.\r\nA 200 response containing `false` means the update was not successful; HTTP 200 alone does not mean the value was saved. Unsupported field names, missing products, invalid product categories or values, and failed persistence can return false. Re-fetch the product and verify the requested field after each update.\r\n\r\nFor example, update a product's title, carton count, origin, and three dimensions with separate calls using `Title`, `MasterCarton`, `CountryCodeOfOrigin`, `UnitLength`, `UnitWidth`, and `UnitHeight`. Send a separate `MAP` or `MSRP` call when those product-header values are requested. The query value is scalar text (no JSON object and no currency symbol).\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Fetch the product first. Verify manufacturer ID, Randmar SKU, MPN, and current state; repeat the resolved SKU, exact field name, current value, and proposed value. Require user confirmation for catalog edits, especially cost/MAP/MSRP.</description></item><item><description>For multiple fields, make a separate call for each supported field. Do not change `State` unless the user explicitly requests it.</description></item></list>\r\nOnly products in the manufacturer’s categories can be changed. A Category replacement must also belong to the manufacturer. State accepts only Hold, Active, or Discontinued; MAP and MSRP must parse as decimal values. Unsupported fields return false, even if they appear in a product response.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productNumber",
            "in": "path",
            "description": "Path parameter. The Randmar SKU, MPN or UPC of the product to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldName",
            "in": "path",
            "description": "Path parameter. Case-sensitive supported field: State, CountryCodeOfOrigin, UnitHeight, UnitLength, UnitWidth, Require3DScan, MasterCarton, UnitWeight, OpportunityOnly, TransparencyCode, SerialNumber, Category, StandardCost, MPN, AutoUpdate, SkidQuantity, Title, MSRP, MAP, BodyHTML, VoiceoverCaption, or SceneName.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query parameter. The new value for the field.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "boolean"
                }
              },
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              },
              "text/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to edit this product.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{productNumber}/BodyHTML": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Updates the BodyHTML for a product.",
        "description": "Specialized update for the product HTML description. Send newValue in the JSON body as a quoted string (not as an object and not in the query string), for example `\"<p>Waste Toner Bottle</p>\"`.\r\nThis content can appear on downstream commerce channels. Include user-provided marketing description, yield, yield type, and compatibility here when these are not separate product properties. Preserve any existing HTML content the user did not ask to replace.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Fetch the product first; verify manufacturer ID, Randmar SKU, MPN, and state. Show a short preview and require user confirmation before replacing the entire BodyHTML value.</description></item><item><description>A 200 response containing `false` means the description was not successfully saved. Re-fetch the product and verify `BodyHTML` after the call.</description></item></list>\r\nThe body is a JSON string containing HTML, for example `\"<p>Product details</p>\"`, not an object with a newValue property. The product must belong to the manufacturer’s category set.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "The target manufacturer's application ID. Admins must pass the manufacturer ID, not HQ.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productNumber",
            "in": "path",
            "description": "The Randmar SKU, MPN, or UPC of the product to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The new HTML content for the product description.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "string"
              }
            },
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "text/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/*+json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the update was successful.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "boolean"
                }
              },
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              },
              "text/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{productNumber}/RandmarTitle": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Updates the Randmar-specific title for a product. (Not Implemented)",
        "description": "This endpoint is not currently implemented and will always return a Bad Request response.\r\n\r\nThis route always returns HTTP 400 and makes no change. To edit the catalog title, use the generic property endpoint with `fieldName=Title`; do not use RandmarTitle.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "This endpoint is not implemented.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{productNumber}/Discontinue": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Discontinues a product.",
        "description": "Marks the product as discontinued, which typically removes it from being orderable.\r\nFetch the product first and confirm the resolved Randmar SKU/title.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Require explicit confirmation. Repeat SKU, MPN, and title so the wrong item is not discontinued.</description></item></list>\r\nAfter setting State to Discontinued, the service attempts to zero the product’s open sales-order and purchase-order lines and emails affected resellers. This is broader than editing a catalog flag. A false result may follow partial updates, so inspect the product and affected documents before retrying.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productNumber",
            "in": "path",
            "description": "Path parameter. The Randmar SKU, MPN, or UPC of the product to discontinue.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the product was successfully discontinued."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{productNumber}/{orderNumber}": {
      "delete": {
        "tags": [
          "Product"
        ],
        "summary": "Cancels a product on a specific order.",
        "description": "Removes this product line from an existing sales order. Fetch the order via `GET .../Document/SalesOrder/{orderNumber}` first.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat order number, product identifier, and optional comment. Require explicit confirmation—this cancels a live order line.</description></item></list>\r\nRequires a manufacturer-owned product and exactly one matching open-order record. The service sets the line quantity to zero and records the cancellation; it does not cancel unrelated products on that order.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productNumber",
            "in": "path",
            "description": "Path parameter. The Randmar SKU, MPN, or UPC of the product to cancel.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderNumber",
            "in": "path",
            "description": "Path parameter. The order number from which to cancel the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "description": "Query parameter. An optional comment for the cancellation reason.",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the cancellation was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{productNumber}/UPC": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Updates the UPC for a product.",
        "description": "Updates the Universal Product Code (UPC) for the product. Identify by Randmar SKU or MPN (not the old UPC if it is being replaced).\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Fetch the product, repeat SKU/MPN and the new UPC, and require confirmation. A wrong UPC breaks scanning and integrations.</description></item></list>\r\nThe new UPC must parse as an integer whose normalized digit count is 11 through 14. The service removes the current UPC mapping before establishing the replacement; re-fetch the product after changing it.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productNumber",
            "in": "path",
            "description": "Path parameter. The Randmar SKU or MPN of the product to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query parameter. The new UPC value.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/InstantRebate": {
      "put": {
        "tags": [
          "Product"
        ],
        "summary": "Creates an instant rebate for a product.",
        "description": "Creates a temporary price reduction (instant rebate) on randmarSKU for the given dates and promotion ID.\r\nThis is a catalog pricing change visible to ordering.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Fetch the product first. Repeat SKU, rebate amount, start/end dates, and promotion ID. Require explicit confirmation before changing price.</description></item></list>\r\nRequires a positive rebate, a nonempty trimmed promotion ID, an end after the start, and a start no more than one month before server time. An overlapping existing rebate is rejected. A failed validation is returned as false with HTTP 200.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product to apply the rebate to.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. The details of the instant rebate.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/InstantRebateInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstantRebateInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InstantRebateInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InstantRebateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the rebate was created successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/Requisition": {
      "put": {
        "tags": [
          "Product"
        ],
        "summary": "Adds a single SKU to a requisition for a warehouse location (single-item convenience).",
        "description": "Adds quantity of randmarSKU to the requisition associated with location.\r\nIf a requisition does not exist for that location, a new one may be created by the service.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Quantity rule:</b> When adding to a requisition, quantity should be set to the product’s `MasterCarton` quantity\r\n(i.e., order in master-carton increments).\r\n</description></item><item><description>\r\nFetch the product first (see `GET V4/Manufacturer/{routeManufacturerId}/Product/{productNumber}`) and use the returned `MasterCarton` value.\r\nIf `MasterCarton` is missing/0, do not guess—ask the user for confirmation or update the product data before proceeding.\r\n</description></item><item><description><b>Multiple SKUs:</b> If multiple SKUs need to be entered, do not loop this call. Use `V4/Manufacturer/{routeManufacturerId}/Requisition`\r\nto create a requisition with the full list in one request.\r\n</description></item></list>\r\nRequires an explicit warehouse location and nonzero quantity divisible by MasterCarton. The product must belong to the manufacturer and must not be discontinued. Adds to the caller’s existing requisition at that location or creates a Special Request requisition; the boolean response does not contain its number.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product to add.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location",
            "in": "query",
            "description": "Query parameter. The warehouse location code for the requisition.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "description": "Query parameter. The quantity to add (should be the product `MasterCarton` value).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if adding the product was a success."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/Images": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets all images for a product.",
        "description": "Retrieves the full set of product images stored in the attachments container, including ordering and primary selection.\r\nUse this before upload, reorder, primary, or delete image writes.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize image count, primary image, and IDs. Do not describe every binary URL unless the user is choosing which to delete or promote.</description></item></list>\r\nReturns an empty list for an unknown SKU or a product outside the manufacturer’s categories. Image identifiers from this list are used by the primary, reorder, and delete routes.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of product images.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductImageInfo"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Uploads one or more product images from multipart form data.",
        "description": "Uploads one or more images to the attachments container. Failed multi-uploads roll back previously uploaded files in the same request.\r\nImages can be public-facing through downstream commerce channels.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the Randmar SKU and that the files are the correct assets before uploading. Prefer listing current images first.</description></item></list>\r\nAccepts a single `File`, a `Files` collection, or both, and ignores empty files. Returns the last upload result. If an upload fails, deletion of earlier images from the same request is attempted; HTTP 400 can report incomplete rollback, so re-read the image list before retrying.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "File": {
                    "type": "string",
                    "description": "The image file to upload.",
                    "format": "binary"
                  },
                  "Files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Optional list of image files to upload (multi-upload)."
                  },
                  "Description": {
                    "type": "string",
                    "description": "Optional description for the image."
                  }
                }
              },
              "encoding": {
                "File": {
                  "style": "form"
                },
                "Files": {
                  "style": "form"
                },
                "Description": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Information about the uploaded image.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductImageUploadResult"
                }
              }
            }
          },
          "400": {
            "description": "No file was provided or the file is empty.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/Attachment": {
      "put": {
        "tags": [
          "Product"
        ],
        "summary": "Registers a document attachment for a product.",
        "description": "This endpoint does not upload file bytes. First upload the file through\r\n`POST V4/Partner/{applicationId}/Attachment/Upload`, then pass the returned temporary storage key here.\r\nThis endpoint validates that the manufacturer owns the product, then registers the file with\r\n`AssociatedGUID = resolved RandmarSKU`. The returned attachment UUID appears in product\r\n`Attachments` and can be used with the shared attachment download endpoint.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the SKU and that the storage key came from the partner upload step. Do not register a key meant for a different product.</description></item></list>\r\nRegisters an already uploaded shared-storage object using its StorageKey; it does not accept file bytes. Returns the new attachment UUID as a JSON string. Missing keys, storage validation errors, or an unattachable product are reported as HTTP 400.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. The registration payload containing the temporary storage key.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Manufacturer.ProductController.RegisterProductAttachmentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The registered attachment UUID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "No storage key was provided, the product was invalid, or the attachment could not be registered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/AppendImage": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Appends a product image from a public URL.",
        "description": "Downloads an image from a public URL and appends it to the product's image collection without replacing existing images.\r\nIf the product has no primary image yet, the uploaded image may become primary automatically.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the SKU and the public image URL. The image may become the storefront primary if none exists yet.</description></item></list>\r\nThe request body must contain ImageUrl; optional FileName and Description are applied to the downloaded image. The server downloads and stores the image, so success changes the product media list rather than simply saving an external link.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. JSON payload containing the public image URL and optional metadata.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Manufacturer.ProductController.AppendProductImageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Information about the appended image.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductImageUploadResult"
                }
              }
            }
          },
          "400": {
            "description": "Missing/invalid request, download failure, or unsupported image type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/Images/{imageId}/Primary": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Sets a product image as the primary image.",
        "description": "Makes imageId the primary storefront image. List images first via GetProductImages to obtain the ID.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat SKU and image ID; confirm before changing the public primary image.</description></item></list>\r\nUse an existing ImageId from this SKU’s image list. The service checks manufacturer ownership and returns false when the operation cannot be applied; the controller maps false to HTTP 400.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "imageId",
            "in": "path",
            "description": "Path parameter. The image ID to set as primary.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the primary image was set successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "The service returned false or no result; the requested operation was not reported successful."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/Images/Reorder": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Reorders product images for a SKU.",
        "description": "Applies the given image-ID order to the product gallery. Get current IDs from GetProductImages first.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat the SKU and the intended order of image IDs; confirm before applying a gallery reorder.</description></item></list>\r\nThe JSON body contains `ImageIds` in the requested display order. Missing input or ImageIds is passed as an empty sequence to the image service. Verify the resulting list after the operation, especially when changing primary-image ordering.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. The desired image ordering.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderProductImagesInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderProductImagesInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderProductImagesInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderProductImagesInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the images were reordered successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "The service returned false or no result; the requested operation was not reported successful."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/Images/{imageId}": {
      "delete": {
        "tags": [
          "Product"
        ],
        "summary": "Deletes a product image.",
        "description": "Permanently removes imageId from the product. List images first so you delete the intended asset.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat SKU and image ID; require explicit confirmation. Deleting the primary image changes storefront media.</description></item></list>\r\nDeletes the selected image from the manufacturer-owned product. Use the exact ImageId from the image list; an unknown product, ownership mismatch, or unsuccessful removal yields HTTP 400.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "imageId",
            "in": "path",
            "description": "Path parameter. The image ID to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the image was deleted successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "The service returned false or no result; the requested operation was not reported successful."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/Image": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Updates the primary image for a product.",
        "description": "Uploads and sets a new primary image for the product (form data). Prefer the Images collection endpoints when you need to keep existing gallery images.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the SKU and that the file should replace the primary image before uploading.</description></item></list>\r\nThis legacy single-image route requires a nonempty multipart file and applies it as the primary image. Use the Images collection routes when managing multiple images and their order.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "Multipart form field. The image file to upload.",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the image update was successful."
          },
          "400": {
            "description": "No file was provided or the file is empty.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/GenerateImage": {
      "put": {
        "tags": [
          "Product"
        ],
        "summary": "Generates product pictures.",
        "description": "Queues a background job to generate product pictures for the SKU. Generated media can appear on commerce channels.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the SKU before queuing generation. Tell the user this is asynchronous—images will not appear immediately.</description></item></list>\r\nThe boolean response reports job acceptance only; it does not contain generated images or a job-completion result. Retrieve the product image list after the job has run.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the picture generation job was queued successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "The service returned false or no result; the requested operation was not reported successful."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{productNumber}/3DModel": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets the 3D model for a product.",
        "description": "Returns the product's 3D model as GLB (binary glTF). Check existence first with `.../3DModel/Exists` if you only need a yes/no.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>This is a binary file, not a chat payload. Use Exists when the user only asked whether a model is available.</description></item></list>\r\nReturns binary GLB bytes with content type `model/gltf-binary`, not JSON or a download URL. HTTP 404 means the product or stored model was unavailable.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productNumber",
            "in": "path",
            "description": "Path parameter. The Randmar SKU, MPN, or UPC of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The 3D model file.",
            "content": {
              "model/gltf-binary": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "model/gltf-binary": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The 3D model was not found for this product.",
            "content": {
              "model/gltf-binary": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{productNumber}/3DModel/Exists": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Checks if a 3D model exists for a product.",
        "description": "Quickly checks whether a 3D model file exists for the product without downloading it.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Prefer this over Get3DModel when the user only asked if a model exists.</description></item></list>\r\nReturns a boolean only. False covers both an unknown product and a product without a stored model; use product lookup to distinguish those cases.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productNumber",
            "in": "path",
            "description": "Path parameter. The Randmar SKU, MPN, or UPC of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the 3D model exists."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/3DModel": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Updates the 3D model for a product.",
        "description": "Uploads and sets a new 3D model (form data, typically .glb). Replaces the existing model for the SKU.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the SKU and that the file is the intended GLB before replacing the model.</description></item></list>\r\nA missing multipart file returns HTTP 204. A supplied file is stored only for a product in this manufacturer’s category set; the returned boolean reports the storage result.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "Multipart form field. The 3D model file to upload (e.g., .glb).",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the model update was successful."
          },
          "204": {
            "description": "No file was provided in the request."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Product/{randmarSKU}/Video": {
      "post": {
        "tags": [
          "Product"
        ],
        "summary": "Updates the video for a product.",
        "description": "Uploads and sets a new product video (form data). This media can be public-facing on commerce channels.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the SKU and that the video file is the intended asset before replacing it.</description></item></list>\r\nSend a multipart form file containing the video stream. The service requires a product in this manufacturer’s category set and returns the storage result as a boolean; the controller does not explicitly handle a missing file.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "Path parameter. The Randmar SKU of the product to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "Multipart form field. The video file to upload.",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the video update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Products/Niches": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Lists product niches in the catalog.",
        "description": "Returns unique niche names available for product exploration.\r\nFollow with `GET V4/Reseller/{routeResellerId}/Niche/{nicheName}/Manufacturers` to list vendors in a niche.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Offer niches as a short selection list; do not dump the entire catalog of niche objects.</description></item><item><description>Ask which niche to explore before listing manufacturers or products.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of product niches.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductNiche"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Products/Receivings": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Lists products recently received into inventory.",
        "description": "Returns recent warehouse receipts (new stock available to sell).\r\nUse this when the user asks what just arrived, not for a full catalog\r\n(`POST .../Report/Products/JSON`) or newest catalog adds (`GET .../Products/Newest`).\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize SKU, quantity received, and date; do not dump every receipt row.</description></item><item><description>If the user wants to order a received SKU, look up `GET .../Product/{randmarSKU}` then add it to a cart.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of recent product receivings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Receipt"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Products/InstantRebates": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Lists products with active instant rebates.",
        "description": "Returns catalog products that currently have an instant rebate.\r\nUse this for promotional shopping; for bid-based pricing use\r\n`GET V4/Reseller/{routeResellerId}/Opportunities`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Highlight SKU, rebate, and net price; do not dump full product specifications.</description></item><item><description>When adding to cart, confirm SKU and quantity; rebates may have expiry or eligibility rules in the payload.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of products with instant rebates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Products/Newest": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Lists the newest products in the catalog.",
        "description": "Returns recently added catalog products available to this reseller.\r\nDistinct from `GET .../Products/Receivings` (warehouse receipts) and\r\n`GET .../Products/InstantRebates` (promo pricing).\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Present a short list (SKU, name, manufacturer); do not dump full specs for every new item.</description></item><item><description>To order one, resolve the Randmar SKU then add it to a named cart.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of the newest products.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Products": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Gets a list of all products available to a partner.\r\nThis endpoint returns a comprehensive list of products that the partner can access.\r\nIncluding the top selling products (ordered by OverallPercentileRank descending)",
        "description": "Retrieves a complete list of products that are accessible to the partner. \r\nThis can be used to populate product catalogs or for general browsing.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of products.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Products": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Lists all products for a manufacturer.",
        "description": "Returns the manufacturer's full catalog. Use this when you need to search or count products and do not already have a SKU/MPN/UPC.\r\nFor a single item, use `GET V4/Manufacturer/{routeManufacturerId}/Product/{productNumber}` instead.\r\nRelated catalog export: `POST .../Report/Products/JSON` (or File/Email) when the user wants a report-shaped dump.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize (count, categories, a few matching SKUs). Never paste the entire array into chat.</description></item><item><description>If the user named a specific MPN/UPC/SKU, call the single-product GET instead of this list.</description></item></list>\r\nReturns catalog records scoped to this manufacturer, without the per-product operational expansion of `GET .../Product/{productNumber}`. The endpoint has no pagination or withSpecification parameter.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of products.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Guidelines": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets the public Randmar guidelines document.",
        "description": "This endpoint is intentionally not cached so updates take effect immediately.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>This is a public markdown guidelines file, not a partner-private policy document.</description></item><item><description>Prefer summarizing relevant sections for the user’s question rather than pasting the entire file.</description></item></list>",
        "responses": {
          "200": {
            "description": "The guidelines markdown file."
          },
          "404": {
            "description": "Guidelines were not found.",
            "content": {
              "text/markdown": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Randmar": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets public statistics about the Randmar platform.",
        "description": "This endpoint retrieves a collection of platform-wide statistics, such as counts of active users, products, and partners.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>These are public marketing/platform stats, not a partner’s private sales figures.</description></item><item><description>Summarize headline counts; do not treat this as an intranet financial report.</description></item></list>",
        "responses": {
          "200": {
            "description": "Returns a summary of platform statistics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarStatistics"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Randmar/Video": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets the public promotional video for Randmar.",
        "description": "Retrieves the main promotional video for the Randmar company.",
        "responses": {
          "200": {
            "description": "Returns the video file."
          },
          "404": {
            "description": "The video could not be found.",
            "content": {
              "video/mp4": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Warehouses": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets a list of all public warehouses.",
        "description": "Retrieves active warehouse records. Both /Warehouses and /V4/Warehouses are aliases for this action. The list identifies shipping origins but does not establish product stock at those origins.\r\nRelated authenticated list: `GET V4/Intranet/Warehouses` (employee-only, richer fields).\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public warehouse directory only—not partner inventory or private warehouse configuration.</description></item><item><description>Use `GET /WarehousesByPostalCode` when the user has a ship-to postal code.</description></item></list>",
        "responses": {
          "200": {
            "description": "A list of public warehouses.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Warehouse"
                  }
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Warehouses": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets a list of all public warehouses.",
        "description": "Retrieves active warehouse records. Both /Warehouses and /V4/Warehouses are aliases for this action. The list identifies shipping origins but does not establish product stock at those origins.\r\nRelated authenticated list: `GET V4/Intranet/Warehouses` (employee-only, richer fields).\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public warehouse directory only—not partner inventory or private warehouse configuration.</description></item><item><description>Use `GET /WarehousesByPostalCode` when the user has a ship-to postal code.</description></item></list>",
        "responses": {
          "200": {
            "description": "A list of public warehouses.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Warehouse"
                  }
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Manufacturers": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets a list of all manufacturers.",
        "description": "Retrieves a list of all manufacturers partnered with Randmar.\r\nRelated: `GET /Manufacturer/{publicName}` for one public profile.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>This is the public manufacturer directory (names/public profiles), not intranet vendor/AP data.</description></item><item><description>Use `publicName` from this list for subsequent public manufacturer/media calls.</description></item></list>",
        "responses": {
          "200": {
            "description": "A list of manufacturers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Manufacturer"
                  }
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Manufacturer/{publicName}": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets public details for a specific manufacturer.",
        "description": "Retrieves a manufacturer profile by public name, including Categories, Socials, LogoURL, VideoURL, and counts of qualified resellers and active opportunities. A media URL may be present even when its underlying file is unavailable.\r\nRelated: `GET /Manufacturers` to resolve `publicName`, and `GET /Manufacturer/{publicName}/{categoryName}` for a category.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public marketing profile only. Do not treat this as partner-private account, pricing, or opportunity data.</description></item><item><description>Use the manufacturer’s public name (URL-friendly), not an intranet application ID.</description></item></list>",
        "parameters": [
          {
            "name": "publicName",
            "in": "path",
            "description": "The public name of the manufacturer (URL-friendly).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested manufacturer's public information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Manufacturer"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No manufacturer was resolved. This public action does not issue an authentication challenge."
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Manufacturer/{publicName}/{categoryName}": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets public details for a specific manufacturer category.",
        "description": "Retrieves the manufacturer's category record, its ImageURL, and its Products collection. Resolve both publicName and categoryName from the manufacturer profile.\r\nRelated: `GET /Manufacturer/{publicName}` and `GET /Manufacturer/{publicName}/{categoryName}/Image`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public category content only—not private catalog cost or contract pricing.</description></item><item><description>Copy `publicName` and `categoryName` exactly from the manufacturer public profile.</description></item></list>",
        "parameters": [
          {
            "name": "publicName",
            "in": "path",
            "description": "The public name of the manufacturer.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryName",
            "in": "path",
            "description": "The name of the category.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested manufacturer category's public information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManufacturerCategory"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No matching manufacturer/category was resolved."
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Manufacturer/{publicName}/Logo": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets the logo for a specific manufacturer.",
        "description": "Retrieves the manufacturer's logo as an image file. The image can be optionally resized.\r\nRelated: `GET /Manufacturer/{publicName}`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public logo asset. Use when the user wants to see/verify the manufacturer’s public branding.</description></item><item><description>Do not treat a missing logo as evidence the manufacturer is not a partner.</description></item></list>",
        "parameters": [
          {
            "name": "publicName",
            "in": "path",
            "description": "The public name of the manufacturer.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "width",
            "in": "query",
            "description": "Optional desired width of the logo.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "height",
            "in": "query",
            "description": "Optional desired height of the logo.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the logo image file."
          },
          "404": {
            "description": "The logo for the specified manufacturer could not be found.",
            "content": {
              "image/png": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Manufacturer/{publicName}/Video": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets the promotional video for a specific manufacturer.",
        "description": "Returns the manufacturer’s public promotional video, if published.\r\nRelated: `GET /Manufacturer/{publicName}` and `GET /Manufacturer/{publicName}/Logo`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public media only. A 404 means no public video is published—not that the manufacturer is invalid.</description></item><item><description>Do not treat this file as partner-private content.</description></item></list>",
        "parameters": [
          {
            "name": "publicName",
            "in": "path",
            "description": "The public name of the manufacturer.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the video file."
          },
          "404": {
            "description": "The video for the specified manufacturer could not be found.",
            "content": {
              "video/mp4": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Manufacturer/{publicName}/{categoryName}/Image": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets the image for a specific manufacturer category.",
        "description": "Retrieves the category's image as a file. The image can be optionally resized.\r\nRelated: `GET /Manufacturer/{publicName}/{categoryName}`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public category artwork. Use to visually confirm the category, not as inventory proof.</description></item><item><description>Copy `publicName` and `categoryName` exactly from the public manufacturer profile.</description></item></list>",
        "parameters": [
          {
            "name": "publicName",
            "in": "path",
            "description": "The public name of the manufacturer.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryName",
            "in": "path",
            "description": "The name of the category.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "width",
            "in": "query",
            "description": "Optional desired width of the image.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "height",
            "in": "query",
            "description": "Optional desired height of the image.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the category image file."
          },
          "404": {
            "description": "The image for the specified category could not be found.",
            "content": {
              "image/png": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Products/Videos/MostRecent": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets a list of the most recently created product videos.",
        "description": "Returns recent video-storage metadata with RandmarSKU derived from each file name. The collection is metadata rather than video bytes and permits public caching for 60 seconds. Download a selected video with GET /Product/{productNumber}/Video.",
        "responses": {
          "200": {
            "description": "A list of metadata for recent videos.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MostRecentVideo"
                  }
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Products/Videos": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets a list of all products that have videos.",
        "description": "Retrieves a collection of all products for which a video has been generated.\r\nRelated: `GET /Product/{productNumber}/Video` for a specific SKU.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public list of products that have videos—not the full private catalog and not partner pricing.</description></item><item><description>Summarize SKUs rather than dumping the entire collection.</description></item></list>",
        "responses": {
          "200": {
            "description": "A list of products with videos.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Product/{productNumber}": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets public details for a specific product.",
        "description": "Retrieves the shared product record using its product identifier. This response is not adjusted to an authenticated reseller's terms and may be cached for one hour.\r\nRelated: `GET /Product/{randmarSKU}/Images` and `GET /Product/{randmarSKU}/Image` for pictures.\r\nIntranet search (`GET V4/Intranet/Search/Product/{productNumber}`) is the authenticated alternative.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public catalog card only. Do not treat this as partner-private cost, contract price, or inventory.</description></item><item><description>Use the Randmar SKU. If the user gave an MPN/UPC, resolve it via intranet search when authenticated.</description></item></list>",
        "parameters": [
          {
            "name": "productNumber",
            "in": "path",
            "description": "The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested product's public information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No product was resolved; a missing product is not reported as an authentication failure."
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Product/{randmarSKU}/Images": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets all images for a specific product.",
        "description": "Retrieves the list of product images stored in the attachments container (for carousel usage).\r\n\r\n<b>AI agent fallback logic:</b> If this endpoint returns an empty list (no images),\r\ncall `GET /Product/{randmarSKU}/Image` to retrieve the product’s primary/default image.\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public product images for carousels. Empty list is not a private-catalog miss—fall back to `GET /Product/{randmarSKU}/Image`.</description></item><item><description>Do not treat these URLs as partner-private attachments.</description></item></list>",
        "parameters": [
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of product images.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductImageInfo"
                  }
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Product/{randmarSKU}/Image/{imageId}": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets a specific image for a product.",
        "description": "Retrieves an attachment image by ID and converts it to PNG. Width/height are positive query dimensions in pixels; one dimension preserves the aspect ratio, and two dimensions fit the image inside the requested canvas with padding.\r\nRelated: `GET /Product/{randmarSKU}/Images` to list IDs first.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Copy `imageId` exactly from the images list. Public media only.</description></item><item><description>Use this when the user asks to look at a specific product picture from the carousel.</description></item></list>",
        "parameters": [
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "imageId",
            "in": "path",
            "description": "The image ID to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "width",
            "in": "query",
            "description": "Optional desired width of the image.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "height",
            "in": "query",
            "description": "Optional desired height of the image.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "align",
            "in": "query",
            "description": "Optional horizontal alignment for padding: Left or Right (case-insensitive); otherwise centered.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the product image file."
          },
          "404": {
            "description": "The image could not be found.",
            "content": {
              "image/png": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Product/{randmarSKU}/Image": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets the image for a specific product.",
        "description": "Retrieves the primary image with legacy product/UPC image fallback. Positive width/height query values request pixel dimensions while preserving aspect ratio. Legacy fallback can migrate image storage and seed the attachment image list during this GET.\r\nThis endpoint and its sibling where image ID is specified should be called when the user asks you to look or verify a product picture.\r\nRelated: `GET /Product/{randmarSKU}/Images` for the carousel list.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public primary product image. Use when verifying what a SKU looks like for a user-facing/catalog question.</description></item><item><description>If this 404s, try `GET /Product/{randmarSKU}/Images` or `GET /Product/{productNumber}/Image/Exists`.</description></item></list>",
        "parameters": [
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "width",
            "in": "query",
            "description": "Optional desired width of the image.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "height",
            "in": "query",
            "description": "Optional desired height of the image.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the product image file."
          },
          "404": {
            "description": "The image for the specified product could not be found.",
            "content": {
              "image/png": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Product/{productNumber}/Image/Exists": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Checks if an image exists for a specific product.",
        "description": "Checks attachment images and legacy product images. If neither exists and the product has a manufacturer, this GET can queue a GenerateProductPictures job unless one already exists. False means no image is currently stored, even when generation was just queued.\r\nRelated: `GET /Product/{randmarSKU}/Image` to download it.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public existence check only. False means no public image, not that the SKU is invalid.</description></item><item><description>This is not a pure existence probe: account for its possible generation-job side effect.</description></item></list>",
        "parameters": [
          {
            "name": "productNumber",
            "in": "path",
            "description": "The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the image exists, otherwise false."
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Product/{productNumber}/3DModel/Exists": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Checks if a 3D model exists for a specific product.",
        "description": "Returns a boolean for whether a public 3D model is stored for the SKU.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public existence check. False is not a private-catalog miss.</description></item><item><description>Use before promising a 3D asset in a user-facing answer.</description></item></list>",
        "parameters": [
          {
            "name": "productNumber",
            "in": "path",
            "description": "The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the 3D model exists, otherwise false."
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Product/{productNumber}/Video": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets the video for a specific product.",
        "description": "Returns the public product video file, if published.\r\nRelated: `GET /Product/{productNumber}/Video/Exists` and `GET /Products/Videos`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public product video. A 404 means no public video, not that the SKU is missing from the catalog.</description></item><item><description>Do not treat this as partner-private media.</description></item></list>",
        "parameters": [
          {
            "name": "productNumber",
            "in": "path",
            "description": "The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the product video file."
          },
          "404": {
            "description": "The video for the specified product could not be found.",
            "content": {
              "video/mp4": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/Product/{productNumber}/Video/Exists": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Checks if a video exists for a specific product.",
        "description": "Returns a boolean for whether a public product video is stored.\r\nRelated: `GET /Product/{productNumber}/Video` to download it.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public existence check. Prefer this before fetching video bytes.</description></item><item><description>False means no public video, not that the product is unpublished internally.</description></item></list>",
        "parameters": [
          {
            "name": "productNumber",
            "in": "path",
            "description": "The Randmar SKU of the product.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns true if the video exists, otherwise false."
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/ShortsGenerationContent/Scenes": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets a list of all available scenes for video generation.",
        "description": "Groups stored assets by scene name. Available fields include Scene, Thumbnail, CameraScript, Preview, and AmbientSound; a scene may have only a subset of them. A catalog entry does not guarantee that every asset download will succeed.\r\n            Related: `GET /ShortsGenerationContent/Scene/{sceneName}` and its Thumbnail/Preview/CameraScript/AmbientSound children.\r\n            \r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public shorts-generation scene catalog. Use scene names from this list for subsequent scene-asset calls.</description></item><item><description>This is not partner-private content; it is shared generation-template metadata.</description></item></list>",
        "responses": {
          "200": {
            "description": "Returns a list of available scenes with their asset details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SceneInformation"
                  }
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/ShortsGenerationContent/Scene/{sceneName}": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets a scene file for video generation.",
        "description": "Retrieves a specific Blender scene file by name, used as a template for product video creation.\r\nA list of available scenes can be retrieved from the `/ShortsGenerationContent/Scenes` endpoint.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public Blender scene template. Copy `sceneName` exactly from the scenes list.</description></item><item><description>This is generation-template media, not partner-private files.</description></item></list>",
        "parameters": [
          {
            "name": "sceneName",
            "in": "path",
            "description": "The name of the scene.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the Blender scene file."
          },
          "404": {
            "description": "The scene file could not be found.",
            "content": {
              "application/x-blender": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/ShortsGenerationContent/Scene/{sceneName}/Thumbnail": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets the thumbnail for a video generation scene.",
        "description": "Retrieves stored scene thumbnail bytes. The response declares image/png, while the storage slot uses a .jpg extension and does not perform format conversion here.\r\nA list of available scenes can be retrieved from the `/ShortsGenerationContent/Scenes` endpoint.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public scene thumbnail. Use to preview a scene before selecting it for generation.</description></item><item><description>Copy `sceneName` from `GET /ShortsGenerationContent/Scenes`.</description></item></list>",
        "parameters": [
          {
            "name": "sceneName",
            "in": "path",
            "description": "The name of the scene.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the thumbnail image file."
          },
          "404": {
            "description": "The thumbnail could not be found.",
            "content": {
              "image/png": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/ShortsGenerationContent/Scene/{sceneName}/Preview": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets the preview video for a scene.",
        "description": "Retrieves a sample preview video for a specific scene to demonstrate its look and feel.\r\nA list of available scenes can be retrieved from the `/ShortsGenerationContent/Scenes` endpoint.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public preview clip of the scene look-and-feel. Not a product video.</description></item><item><description>Copy `sceneName` from the scenes list; 404 means that scene has no preview.</description></item></list>",
        "parameters": [
          {
            "name": "sceneName",
            "in": "path",
            "description": "The name of the scene.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the preview video file."
          },
          "404": {
            "description": "The preview video could not be found.",
            "content": {
              "video/mp4": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/ShortsGenerationContent/Scene/{sceneName}/CameraScript": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets the camera script for a scene.",
        "description": "Retrieves the Python script that defines camera movements and animations for a specific scene.\r\nA list of available scenes can be retrieved from the `/ShortsGenerationContent/Scenes` endpoint.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public camera-motion Python script for shorts generation. Copy `sceneName` exactly.</description></item><item><description>Do not treat this as partner-private source code; it is a shared generation asset.</description></item></list>",
        "parameters": [
          {
            "name": "sceneName",
            "in": "path",
            "description": "The name of the scene.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the Python script file."
          },
          "404": {
            "description": "The script could not be found.",
            "content": {
              "text/x-python": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/ShortsGenerationContent/Scene/Default/AmbientSound": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets the default ambient sound for scenes.",
        "description": "Retrieves the default ambient sound file that can be used for video scenes.\r\n            Related: `GET /ShortsGenerationContent/Scene/{sceneName}/AmbientSound` for a scene-specific track.\r\n            \r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public default ambient WAV for shorts generation. Scene-specific tracks may redirect here.</description></item><item><description>This is shared generation audio, not partner-private media.</description></item></list>",
        "responses": {
          "200": {
            "description": "Returns the ambient sound audio file."
          },
          "404": {
            "description": "The default sound file could not be found.",
            "content": {
              "audio/wav": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/ShortsGenerationContent/Scene/{sceneName}/AmbientSound": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Gets the ambient sound for a specific scene.",
        "description": "Retrieves the ambient sound for a given scene. If a specific sound doesn't exist for the scene, it redirects to the default ambient sound.\r\nA list of available scenes can be retrieved from the `/ShortsGenerationContent/Scenes` endpoint.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Public scene ambient audio. If missing, the API redirects to the Default ambient sound.</description></item><item><description>Copy `sceneName` from the scenes list. This is not partner-private audio.</description></item></list>",
        "parameters": [
          {
            "name": "sceneName",
            "in": "path",
            "description": "The name of the scene.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the ambient sound audio file."
          },
          "302": {
            "description": "Redirects to the default ambient sound if a specific one is not found."
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/WarehousesByPostalCode": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Lists public warehouses ranked for a postal code and country.",
        "description": "Returns active WarehouseId/Score pairs ordered by ascending territory score; lower is preferred. A score of 2147483647 means no matching postal-prefix rule was found. Results are routing preferences, not distances, stock availability, or shipping quotes.\r\nRelated: `GET /Warehouses` for the unfiltered public directory and\r\n`GET V4/Intranet/Warehouses/TerritoryRules` for employee territory configuration.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Unauthenticated public routing hint—not partner-private inventory or territory-admin data.</description></item><item><description>Pass a real postal code and country (CA/US). Summarize ranked warehouse IDs rather than dumping full address records.</description></item></list>",
        "parameters": [
          {
            "name": "postalCode",
            "in": "query",
            "description": "Query ship-to postal/ZIP code; send the canonical uppercase form because matching uses stored prefixes.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "Query country code, normally CA or US. Empty values default to CA; matching is case-sensitive.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "WarehouseId/Score pairs, including unmatched active warehouses at the end."
          }
        },
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/PurchaseOrder": {
      "put": {
        "tags": [
          "PurchaseOrder"
        ],
        "summary": "Creates a purchase order from a list of requisitions.",
        "description": "Combines the given requisition numbers into one purchase order.\r\nsendToManufacturer defaults to `true`, which transmits the PO to the manufacturer on create.\r\nReturns the new PO number (typically starting with \"PO\") or 400 if creation failed.\r\nRelated: list requisitions via Documents, then CreditCheck, then this create.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Require explicit confirmation of the requisition numbers and whether to send now. Repeat `sendToManufacturer` (true/false)—do not rely on the default.</description></item><item><description>If the user only wants a draft PO without sending, pass `sendToManufacturer=false`.</description></item></list>\r\nSelected requisitions must belong to the manufacturer and one warehouse location. A manufacturer on hold cannot create a PO; a failed inventory credit check blocks callers without The Boss privileges. The service may consolidate requisitions and cancel superseded inputs. `sendToManufacturer=true` also sends the created PO through the configured supplier delivery flow; the PO number is not proof that delivery succeeded.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sendToManufacturer",
            "in": "query",
            "description": "Query parameter. If true, the PO is sent to the manufacturer on create. Defaults to true—confirm with the user before calling.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. Requisition numbers to include. Obtain from `GET .../Documents/Requisitions`.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The purchase order number of the newly created purchase order.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The purchase order could not be created from the provided requisitions.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/PurchaseOrder/CreditCheck": {
      "post": {
        "tags": [
          "PurchaseOrder"
        ],
        "summary": "Performs a credit check for a potential purchase order from requisitions.",
        "description": "Totals the items on the given requisitions and checks whether the manufacturer's credit limit would be exceeded.\r\nCall this before `CreatePurchaseOrder` when credit is in question. This does not create or send a PO.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Report pass/fail and advise the user before creating the PO. Do not create the PO automatically after a passing check.</description></item></list>\r\nChecks whether all supplied requisitions exist for the manufacturer and whether its hold status and inventory-value limits permit the purchase. This is a preflight boolean; it neither reserves credit nor creates a PO.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. Requisition numbers to credit-check. Obtain from `GET .../Documents/Requisitions`.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the check passed."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/PurchaseOrder/{purchaseOrderNumber}/EditExpectedDate": {
      "post": {
        "tags": [
          "PurchaseOrder"
        ],
        "summary": "Edits the expected date of a purchase order.",
        "description": "Updates the expected arrival date for purchaseOrderNumber.\r\nFetch the PO first via `GET .../Document/{purchaseOrderNumber}` so you can repeat the current vs new date.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the PO number and the new expected date (format like `YYYYMMDD`) before calling.</description></item></list>\r\nLoads the manufacturer document before passing the supplied expected-date text to accounting. Use an unambiguous date value accepted by the accounting system; this endpoint does not validate a date format in the controller.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "purchaseOrderNumber",
            "in": "path",
            "description": "Path parameter. The PO number (typically starts with PO). Resolve from Documents/PurchaseOrders if unknown.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query parameter. The new expected date as a string (e.g., \"YYYYMMDD\").",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/PurchaseOrder/{purchaseOrderNumber}": {
      "delete": {
        "tags": [
          "PurchaseOrder"
        ],
        "summary": "Cancels a purchase order.",
        "description": "Cancels the entire purchase order. This is destructive and cannot be undone from this endpoint.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Fetch the PO first, repeat the PO number and a short line summary, and require explicit confirmation before canceling.</description></item></list>\r\nRequires a purchase document retrievable under this manufacturer. Returns the accounting cancellation result as a boolean; HTTP 200 alone does not confirm cancellation.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "purchaseOrderNumber",
            "in": "path",
            "description": "Path parameter. The PO number to cancel. Resolve from Documents/PurchaseOrders if unknown.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the cancellation was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/PurchaseOrder/{purchaseOrderNumber}/Send": {
      "put": {
        "tags": [
          "PurchaseOrder"
        ],
        "summary": "Sends a purchase order through the configured supplier delivery flow.",
        "description": "Triggers EDI transmission of purchaseOrderNumber to the supplier. Use this when the PO was created with `sendToManufacturer=false` and the user now wants it sent.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Require explicit confirmation of the PO number. Side effect: the supplier receives the PO electronically.</description></item></list>\r\nThis is not an EDI-only operation despite the method name. It uses EDI for configured suppliers and attempts email delivery to purchase-order notification subscribers and the document contact addresses. A successful result records how it was sent; retries can send the PO again.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "purchaseOrderNumber",
            "in": "path",
            "description": "Path parameter. The PO number to send. Resolve from Documents/PurchaseOrders if unknown.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the EDI transmission was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/PurchaseOrder/{purchaseOrderNumber}/EditItem/{randmarSku}": {
      "post": {
        "tags": [
          "PurchaseOrder"
        ],
        "summary": "Edits quantity or unit price of a product on a manufacturer purchase order.",
        "description": "Updates quantity and/or unit price of randmarSku on purchaseOrderNumber.\r\nSetting quantity to 0 removes the item from the PO. Provide the field you want to change (quantity and/or unitPrice).\r\nExample: `{purchaseOrderNumber}/EditItem/{randmarSku}?quantity={quantity}`.\r\nResolve SKU via product GET if the user gave an MPN.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat PO number, SKU, and the new quantity/price. Confirm before calling—quantity 0 deletes the line; unit price / `editStandardCost` changes cost.</description></item></list>\r\nThe PO and product must exist. Standard-cost updates are a separate catalog side effect; the returned boolean is the PO line-edit result and does not independently report the catalog update outcome.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "purchaseOrderNumber",
            "in": "path",
            "description": "Path parameter. The PO number to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSku",
            "in": "path",
            "description": "Path parameter. The Randmar SKU on the PO. Resolve from product GET if the user gave an MPN/UPC.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "description": "Query parameter. Optional replacement order quantity; null leaves quantity unchanged.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "unitPrice",
            "in": "query",
            "description": "Query parameter. Optional replacement unit price. Values at or below zero are ignored.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "editStandardCost",
            "in": "query",
            "description": "Query parameter. Defaults to false. When true and a positive unitPrice is supplied, also attempts to update the product StandardCost.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Stripe/Subscription": {
      "get": {
        "tags": [
          "RandmarSubscription"
        ],
        "summary": "Gets the reseller's saved Randmar subscription and paid-through date.",
        "description": "Read-only. Webhooks and the in-process subscription monitor refresh this state; it may briefly lag Stripe.\r\n            AccessUntilUtc includes eligible 24-hour renewal grace; PaidThroughUtc remains the actual paid date.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "Partner application ID identifying the reseller.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saved subscription status, including a default unsubscribed status when no subscription record exists. Response is not cached.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarSubscriptionStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarSubscriptionStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarSubscriptionStatus"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the account.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The reseller does not exist.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Subscription billing could not be accessed."
          },
          "409": {
            "description": "A subscription-state conflict prevents the operation."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Stripe/Subscription/Checkout": {
      "post": {
        "tags": [
          "RandmarSubscription"
        ],
        "summary": "Creates or reuses hosted Checkout for The Randmar Subscription (CAD 1000/month, tax exclusive; Stripe Tax adds applicable tax).",
        "description": "Card only. Requires reseller authorization. Returns SessionUrl, or a 303 redirect when redirect=true.\r\n            Existing subscriptions must be managed through the portal. The browser return does not activate benefits.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "Partner application ID identifying the reseller; requires authorization for this account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect",
            "in": "query",
            "description": "When true, return HTTP 303 with the hosted URL in Location; otherwise return a JSON SessionUrl.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Hosted session URL. Opening a session does not confirm a billing change.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarSubscriptionSession"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarSubscriptionSession"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarSubscriptionSession"
                }
              }
            }
          },
          "303": {
            "description": "Redirect to the hosted session when redirect=true."
          },
          "401": {
            "description": "The caller is not authorized for the account.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The reseller does not exist.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The saved or Stripe subscription state does not allow this operation.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Subscription billing could not be accessed; retry later or contact support."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Stripe/Subscription/Cancel": {
      "post": {
        "tags": [
          "RandmarSubscription"
        ],
        "summary": "Opens Stripe's cancellation confirmation, retaining benefits through the paid billing period.",
        "description": "Creating this session does not itself cancel the subscription. Confirm cancellation on Stripe.\r\n            If cancellation is already scheduled, opens the portal where it can be undone.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "Partner application ID identifying the reseller; requires authorization for this account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect",
            "in": "query",
            "description": "When true, return HTTP 303 with the hosted URL in Location; otherwise return a JSON SessionUrl.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Hosted session URL. Opening a session does not confirm a billing change.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarSubscriptionSession"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarSubscriptionSession"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarSubscriptionSession"
                }
              }
            }
          },
          "303": {
            "description": "Redirect to the hosted session when redirect=true."
          },
          "401": {
            "description": "The caller is not authorized for the account.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The reseller does not exist.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The saved or Stripe subscription state does not allow this operation.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Subscription billing could not be accessed; retry later or contact support."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Stripe/Subscription/Portal": {
      "post": {
        "tags": [
          "RandmarSubscription"
        ],
        "summary": "Opens Stripe billing management to update the card, recover payment, or undo scheduled cancellation.",
        "description": "Requires an existing Stripe customer and subscription. Returns an uncached hosted session URL or a redirect; changes occur only after completion in Stripe.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "Partner application ID identifying the reseller; requires authorization for this account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect",
            "in": "query",
            "description": "When true, return HTTP 303 with the hosted URL in Location; otherwise return a JSON SessionUrl.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Hosted session URL. Opening a session does not confirm a billing change.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarSubscriptionSession"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarSubscriptionSession"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RandmarSubscriptionSession"
                }
              }
            }
          },
          "303": {
            "description": "Redirect to the hosted session when redirect=true."
          },
          "401": {
            "description": "The caller is not authorized for the account.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The reseller does not exist.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The saved or Stripe subscription state does not allow this operation.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Subscription billing could not be accessed; retry later or contact support."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/HP Amplified/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails an HP Amplified product and promotion report.",
        "description": "Sends an HP-specific product/promotion report to emailAddress.\r\nFor a general product list use `POST .../Report/Products/Email` instead.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the recipient email; this sends a real email with catalog/promo data.</description></item><item><description>Do not send to an address the user did not provide.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/Universal/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails the universal product list.",
        "description": "Emails products available to this reseller (optional manufacturerId filter).\r\nDaily delivery can be enabled via the ResellerDailyProductFile notification.\r\nFor JSON in-session use `POST .../Report/Products/JSON` rather than emailing a huge catalog.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm recipient email and optional manufacturer filter; this emails a large catalog file.</description></item><item><description>Prefer JSON or a manufacturer filter when the user only needs a subset — do not email the full list by default.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "query",
            "description": "Optional manufacturer filter. When provided, only products from that manufacturer are included.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/Products/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails the universal product list.",
        "description": "Emails products available to this reseller (optional manufacturerId filter).\r\nDaily delivery can be enabled via the ResellerDailyProductFile notification.\r\nFor JSON in-session use `POST .../Report/Products/JSON` rather than emailing a huge catalog.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm recipient email and optional manufacturer filter; this emails a large catalog file.</description></item><item><description>Prefer JSON or a manufacturer filter when the user only needs a subset — do not email the full list by default.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "query",
            "description": "Optional manufacturer filter. When provided, only products from that manufacturer are included.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/Universal/File": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Downloads the universal product list as an Excel file.",
        "description": "Generates an Excel catalog for this reseller (optional manufacturer filter).\r\nPrefer JSON endpoints when summarizing in chat; this returns a binary spreadsheet.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Tell the user a file was generated; do not parse every product row into chat.</description></item><item><description>Pass `manufacturerId` when they only need one vendor's catalog.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "query",
            "description": "Optional manufacturer filter. When provided, only products from that manufacturer are included.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "The product list as an Excel file."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/Products/File": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Downloads the universal product list as an Excel file.",
        "description": "Generates an Excel catalog for this reseller (optional manufacturer filter).\r\nPrefer JSON endpoints when summarizing in chat; this returns a binary spreadsheet.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Tell the user a file was generated; do not parse every product row into chat.</description></item><item><description>Pass `manufacturerId` when they only need one vendor's catalog.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "query",
            "description": "Optional manufacturer filter. When provided, only products from that manufacturer are included.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "The product list as an Excel file."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/Universal/JSON": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the standard universal product list as JSON.",
        "description": "Returns the reseller catalog with standard pricing (no default-opportunity adjustment).\r\nFor opportunity-adjusted prices use `POST .../Report/UniversalProductListWithDefaultOpportunity/JSON`.\r\nFilter with manufacturerId when possible.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>This payload can be huge — summarize counts, filter by manufacturer/SKU, and do not dump raw rows.</description></item><item><description>For a single product prefer `GET .../Product/{randmarSKU}`.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "query",
            "description": "Optional manufacturer filter. When provided, only products from that manufacturer are returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "A list of all products available to the reseller."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/Products/JSON": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the standard universal product list as JSON.",
        "description": "Returns the reseller catalog with standard pricing (no default-opportunity adjustment).\r\nFor opportunity-adjusted prices use `POST .../Report/UniversalProductListWithDefaultOpportunity/JSON`.\r\nFilter with manufacturerId when possible.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>This payload can be huge — summarize counts, filter by manufacturer/SKU, and do not dump raw rows.</description></item><item><description>For a single product prefer `GET .../Product/{randmarSKU}`.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "query",
            "description": "Optional manufacturer filter. When provided, only products from that manufacturer are returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "A list of all products available to the reseller."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/UniversalProductListWithDefaultOpportunity/JSON": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the universal product list with default opportunity pricing as JSON.",
        "description": "Returns the catalog including default-opportunity discount and opportunity-adjusted price when available.\r\nUse the standard JSON list when you do not need those extra price fields.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Payload can be huge — summarize and filter; do not dump the catalog into chat.</description></item><item><description>When quoting a price, say whether it includes the default opportunity so the user is not surprised at checkout.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manufacturerId",
            "in": "query",
            "description": "Optional manufacturer filter. When provided, only products from that manufacturer are returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "A list of all products available to the reseller, including default opportunity pricing."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/Shipments/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails a shipments report.",
        "description": "Emails recent shipments for this reseller. For an in-session list use `GET .../Orders/Shipments`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the recipient email before sending shipment/tracking data.</description></item><item><description>If the user only wants a few shipments, prefer GET shipments and summarize instead of emailing.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/Invoices/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails an invoices report for a date range.",
        "description": "Emails sales/invoice activity from startDate to endDate.\r\nDates are optional in the API but should be provided for a reproducible report.\r\nFor JSON invoices use `GET .../Billing/Invoices`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm recipient email and the date range; this emails financial invoice data.</description></item><item><description>Do not omit dates unless the user accepts an unbounded/default period.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The email address to send the report to.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "The start date for the report.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "The end date for the report.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns true if the report was successfully sent to the email address."
          },
          "401": {
            "description": "The user is not authorized to perform this search.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/OpenOrders/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails an open orders report.",
        "description": "Emails currently open orders for this reseller.\r\nFor an in-session list use `GET .../Orders` or `GET .../Documents/GeneralDocuments`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the recipient email before sending open-order data.</description></item><item><description>If the user wants status of one order, use `GET .../Order/{orderNumber}` instead of emailing the full report.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/Returns/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails a returns (RMA) report.",
        "description": "Emails recent RMAs for this reseller. For an in-session list use `GET .../Returns`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the recipient email before sending return/RMA data.</description></item><item><description>If the user asks about one RMA, identify it from GET Returns rather than emailing the full report.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/Opportunities/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails a sales opportunities (bids) report.",
        "description": "Emails currently available opportunities. For in-session use `GET .../Opportunities`\r\nor a single bid at `GET .../Opportunity/{manufacturerId}/{bidNumber}`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the recipient email; this emails special pricing/bid data.</description></item><item><description>If the user wants one bid, fetch that opportunity instead of emailing the full report.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/AmazonTrackingFile/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails an Amazon Marketplace tracking file.",
        "description": "Sends a tracking file formatted for Amazon Marketplace (recent shipment tracking).\r\nFor Excel download use `POST .../Report/AmazonTrackingFile/File`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the recipient email; this emails marketplace tracking data.</description></item><item><description>Use this only when the user asked for Amazon tracking — Walmart has its own endpoints.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/AmazonTrackingFile/File": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Downloads the Amazon Marketplace tracking file as Excel.",
        "description": "Returns an Excel tracking file formatted for Amazon Marketplace.\r\nTo email it instead use `POST .../Report/AmazonTrackingFile/Email`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>This is a binary spreadsheet — tell the user a file was generated; do not dump tracking rows into chat.</description></item><item><description>Use only when the user asked for Amazon tracking (not Walmart).</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "The Amazon tracking file as an Excel spreadsheet."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/WalmartTrackingFile/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails a Walmart Marketplace tracking file.",
        "description": "Sends a tracking file formatted for Walmart Marketplace.\r\nFor Excel download use `POST .../Report/WalmartTrackingFile/File`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the recipient email; this emails marketplace tracking data.</description></item><item><description>Use this only when the user asked for Walmart tracking — Amazon has its own endpoints.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "The recipient's email address.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns true if the email was sent successfully."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Report/WalmartTrackingFile/File": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Downloads the Walmart Marketplace tracking file as Excel.",
        "description": "Returns an Excel tracking file formatted for Walmart Marketplace.\r\nTo email it instead use `POST .../Report/WalmartTrackingFile/Email`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>This is a binary spreadsheet — tell the user a file was generated; do not dump tracking rows into chat.</description></item><item><description>Use only when the user asked for Walmart tracking (not Amazon).</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "The Walmart tracking file as an Excel spreadsheet."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Reorder/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails the reorder report as an Excel attachment.",
        "description": "Sends an .xlsx reorder report used by operations/planning to decide what inventory to replenish.\r\nPrefer `POST .../Report/Reorder/{warehouseLocation}/JSON` when the user wants to inspect lines in chat.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Require explicit confirmation of the recipient. If emailAddress is empty, the report goes to the authenticated user—say that before sending.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query parameter. Recipient email address. When empty, the report service uses the authenticated caller’s email.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Report sent successfully."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Resellers/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails the reseller report as an Excel attachment.",
        "description": "Sends an .xlsx of the reseller landscape and key reseller attributes for this manufacturer.\r\nFor a short in-chat list, prefer `GET .../Resellers` instead of emailing a spreadsheet.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Require explicit confirmation of the recipient before sending the .xlsx.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query parameter. Recipient email address. When empty, the report service uses the authenticated caller’s email.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Report sent successfully."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Reorder/File": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Downloads the reorder report as an Excel file.",
        "description": "Returns raw .xlsx bytes (`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`).\r\nFor chat inspection of one warehouse, use Reorder JSON instead.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>This is a binary download, not a chat-friendly payload. Offer JSON for a warehouse if the user wants a summary in conversation.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns the reorder report file.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Reorder/{warehouseLocation}/JSON": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the reorder report as JSON for a warehouse location.",
        "description": "Returns reorder lines for a single warehouse instead of a full Excel export.\r\nWarehouse locations are business codes (e.g., DC/warehouse identifiers) used by the ERP/reporting layer.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize suggested replenishment (SKU, qty, location). Do not dump every line unless the user asks for a specific SKU or a short list.</description></item></list>\r\nFilters the manufacturer’s reorder data to the path warehouse location. Use a warehouse location code, not a city name or postal code; the response does not create a requisition.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseLocation",
            "in": "path",
            "description": "Path parameter. The warehouse location code (business/DC identifier) for the report.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns the reorder report in JSON format."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Sales/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails a sales report as an Excel attachment for a date range.",
        "description": "Sends manufacturer-wide sales as .xlsx. If dates are omitted, start and end default to the first day of the current month.\r\nPrefer Sales/JSON in chat, or the reseller-scoped email when only one reseller is needed.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm recipient and date range (or the current-month default) before sending email.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query parameter. Recipient email address. When empty, the report service uses the authenticated caller’s email.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Query parameter. Optional report start date. If omitted, uses the first day of the current server month.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Query parameter. Optional report end date. If omitted, also uses the first day of the current server month; supply explicit bounds for a full-month report.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Report sent successfully."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Sales/{resellerId}/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails a sales report for one reseller as an Excel attachment.",
        "description": "Narrower than manufacturer-wide sales email. Date defaults: omitted start/end default to the first day of the current month.\r\nResolve resellerId from `GET .../Resellers`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm reseller ID, recipient, and date range before sending.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resellerId",
            "in": "path",
            "description": "Path parameter. The reseller application ID to scope the report. Resolve from the Resellers list.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query parameter. Recipient email address. When empty, the report service uses the authenticated caller’s email.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Query parameter. Optional report start date. If omitted, uses the first day of the current server month.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Query parameter. Optional report end date. If omitted, also uses the first day of the current server month; supply explicit bounds for a full-month report.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Report sent successfully."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Sales/File": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Downloads the sales report as an Excel file for a date range.",
        "description": "Returns raw .xlsx bytes. Date defaults: omitted start/end default to the first day of the current month.\r\nPrefer Sales/JSON when the user wants a summary in chat.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Confirm the date range. Tell the user this is a file download, not inline JSON.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Query parameter. Optional report start date. If omitted, uses the first day of the current server month.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Query parameter. Optional report end date. If omitted, also uses the first day of the current server month; supply explicit bounds for a full-month report.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns the sales report file.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Sales/JSON": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the sales report as JSON for a date range.",
        "description": "Programmatic sales data for summaries. May be large for wide date ranges.\r\nDate defaults: omitted start/end default to the first day of the current month.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Always pass a date range when the user specified one. Summarize totals/top SKUs/resellers; do not dump the full array.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Query parameter. Optional report start date. If omitted, uses the first day of the current server month.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Query parameter. Optional report end date. If omitted, also uses the first day of the current server month; supply explicit bounds for a full-month report.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns the sales report in JSON format."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/BestCanadianFulfillmentCenters": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the best active or opening Canadian fulfillment centers for postal codes.",
        "description": "Returns the best warehouse match per postal code according to territory rules (lower score is better).\r\nThe algorithm progressively shortens the postal code prefix until a match is found.\r\nFirst-mile warehouses are intentionally excluded. For all warehouse types (stock-transfer), use BestCanadianWarehouses.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Pass only the postal codes the user asked about. Present each code with its chosen warehouse ID.</description></item></list>\r\nThe body is a JSON array of postal-code strings. Only Canadian warehouses marked Active or Opening with type Fulfillment Center are candidates; first-mile facilities are excluded from this reorder-territory calculation.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. Canadian postal codes. Codes longer than 7 characters are ignored.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns a list of (PostalCode, WarehouseId) pairs."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/BestActiveCanadianFulfillmentCenters": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the best active or opening Canadian fulfillment centers for postal codes.",
        "description": "Returns the best warehouse match per postal code according to territory rules (lower score is better).\r\nThe algorithm progressively shortens the postal code prefix until a match is found.\r\nFirst-mile warehouses are intentionally excluded. For all warehouse types (stock-transfer), use BestCanadianWarehouses.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Pass only the postal codes the user asked about. Present each code with its chosen warehouse ID.</description></item></list>\r\nThe body is a JSON array of postal-code strings. Only Canadian warehouses marked Active or Opening with type Fulfillment Center are candidates; first-mile facilities are excluded from this reorder-territory calculation.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. Canadian postal codes. Codes longer than 7 characters are ignored.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns a list of (PostalCode, WarehouseId) pairs."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/BestCanadianWarehouses": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the best active or opening Canadian warehouses (any type) for postal codes.",
        "description": "Returns the best warehouse match per postal code (lower score is better). Includes all active warehouse types (stock-transfer oriented).\r\nFor fulfillment-center-only selection (excludes first-mile), use BestCanadianFulfillmentCenters.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Use this when the user is planning stock transfers, not last-mile fulfillment. Present code-to-warehouse pairs.</description></item></list>\r\nThe body is a JSON array of postal-code strings. Candidates include Canadian warehouses of any type marked Active or Opening; use BestCanadianFulfillmentCenters for the fulfillment-center-only calculation.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. Canadian postal codes. Codes longer than 7 characters are ignored.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns a list of (PostalCode, WarehouseId) pairs."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Inventory/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails an inventory report as an Excel attachment for a given date.",
        "description": "Sends on-hand inventory as of inventoryDate (defaults to today). Prefer Inventory/JSON to inspect value in chat\r\n(quantity × cost per line). Related snapshot: `GET .../Inventory/Value` for location/category totals.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm recipient and inventory date before sending the .xlsx.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query parameter. Recipient email address. When empty, the report service uses the authenticated caller’s email.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inventoryDate",
            "in": "query",
            "description": "Query parameter. Inventory as-of date. Defaults to the current date if omitted.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Report sent successfully."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Inventory/File": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Downloads the inventory report as an Excel file for a given date.",
        "description": "Returns raw .xlsx bytes for inventory as of inventoryDate (defaults to today).\r\nPrefer Inventory/JSON for chat summaries.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>This is a binary download. Use JSON if the user wants inventory value explained in conversation.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inventoryDate",
            "in": "query",
            "description": "Query parameter. Inventory as-of date. Defaults to the current date if omitted.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns the inventory report file.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Inventory/JSON": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the inventory report as JSON for a given date.",
        "description": "Returns inventory lines as of inventoryDate (defaults to today).\r\nInventory value for a line is Quantity × Cost. For location/category totals only, use `GET .../Inventory/Value`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>This can be a large catalog dump. Summarize value and call out SKUs the user asked about; do not paste every line.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inventoryDate",
            "in": "query",
            "description": "Query parameter. Inventory as-of date. Defaults to the current date if omitted.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns the inventory report in JSON format."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Claim/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails a claim report as an Excel attachment for a date range.",
        "description": "emailAddress is <b>mandatory</b> for this endpoint (no default/fallback to the authenticated user).\r\n            \r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Require explicit confirmation of the recipient address and date range. This sends outbound email with an .xlsx claim report.</description></item><item><description>If the user wants to inspect claims in chat, use Claim/File only if they asked for a download—there is no claim JSON variant.</description></item></list>\r\nThe workbook contains the claim report and the email body includes the total amount to claim. This delivery uses claim-notification recipients, not the ordinary report fallback to the caller.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query parameter. Semicolon-separated recipient addresses. If omitted (null), uses subscribers to the manufacturer-claims notification; internal claim contacts are also copied.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Query parameter. Optional start date for the claim report.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Query parameter. Optional end date for the claim report.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Report sent successfully."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Claim/File": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Downloads the claim report as an Excel file for a date range.",
        "description": "Returns raw .xlsx claim data for the date range. There is no JSON variant—summarize from this file only if the user asked for a download.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Confirm the date range. Prefer asking whether the user wants email vs download; do not email unless they asked.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Query parameter. Optional start date for the claim report.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Query parameter. Optional end date for the claim report.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns the claim report file.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/OpenOrders/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails an open-orders report as an Excel attachment.",
        "description": "Sends outstanding/open orders as .xlsx. Prefer OpenOrders/JSON or `GET .../Documents/ActiveOrderDetails` for chat summaries.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Require explicit confirmation of the recipient before sending.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query parameter. Recipient email address. When empty, the report service uses the authenticated caller’s email.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Report sent successfully."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/OpenOrders/JSON": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the open-orders report as JSON.",
        "description": "Returns open-order lines as JSON. emailAddress is accepted by the action but is not used by the underlying service.\r\nRelated: `GET .../Documents/ActiveOrderDetails`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize open order numbers, SKUs, and outstanding qty. Do not dump the full array. Do not treat this as an email send.</description></item></list>\r\nReturns open-order rows as JSON. The emailAddress parameter is ignored; use `OpenOrders/Email` when email delivery is intended.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query parameter. Legacy unused query parameter; this action does not send an email.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns the open orders report in JSON format."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Products/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails a products catalog report as an Excel attachment.",
        "description": "Sends the manufacturer product catalog as .xlsx. Prefer Products/JSON or `GET .../Products` / single Product GET for chat.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Require explicit confirmation of the recipient before sending the catalog spreadsheet.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query parameter. Recipient email address. When empty, the report service uses the authenticated caller’s email.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Report sent successfully."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Products/File": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Downloads the products report as an Excel file.",
        "description": "Returns the catalog as .xlsx. Prefer Products/JSON or a single product GET when the user wants to inspect items in chat.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Binary download. If the user named a SKU/MPN, use Product GET instead of exporting the whole catalog.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns the products report file.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Products/TSV": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Downloads the products report as a TSV file.",
        "description": "Returns the catalog as tab-separated values (useful for spreadsheet import). Prefer JSON for chat summaries.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Use only when the user asked for TSV/import format. Do not treat this as an email send.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/tab-separated-values": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns the products report in TSV format.",
            "content": {
              "text/tab-separated-values": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/tab-separated-values": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/Products/JSON": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the products report as JSON.",
        "description": "Returns a report-shaped catalog dump. For a single SKU use Product GET; for a lighter list use `GET .../Products`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Do not dump the catalog. Summarize counts or the SKUs the user asked about.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns the products report in JSON format."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/PurchasedOrders/Email": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Emails a purchased-orders report as an Excel attachment.",
        "description": "Sends historical purchased-order data as .xlsx. For current POs in chat, prefer `GET .../Documents/PurchaseOrders`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Require explicit confirmation of the recipient before sending.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "query",
            "description": "Query parameter. Recipient email address. When empty, the report service uses the authenticated caller’s email.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Report sent successfully."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Report/PurchasedOrders/File": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Downloads the purchased-orders report as an Excel file.",
        "description": "Returns purchased-order history as .xlsx. For a live PO list, use Documents/PurchaseOrders.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Binary download. If the user asked about a specific PO, fetch `GET .../Document/{documentNumber}` instead.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "Returns the purchased orders report file.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Requisition/{requisitionNumber}": {
      "delete": {
        "tags": [
          "Requisition"
        ],
        "summary": "Cancels a requisition (draft purchase).",
        "description": "Permanently cancels the requisition identified by requisitionNumber. This cannot be undone.\r\nRequisitions feed into purchase orders; canceling removes that draft from the PO path.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Fetch the requisition (or list Documents/Requisitions), repeat the requisition number and location/lines, and require explicit confirmation before canceling.</description></item></list>\r\nRequires a requisition retrievable for this manufacturer and sends cancellation to accounting. This returns a boolean result, not a replacement requisition number.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requisitionNumber",
            "in": "path",
            "description": "Path parameter. The requisition number to cancel. Obtain from `GET .../Documents/Requisitions`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Indicates whether the cancellation was successful."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Requisition/{requisitionNumber}/EditItem/{randmarSku}": {
      "post": {
        "tags": [
          "Requisition"
        ],
        "summary": "Edits the quantity of a single item in a requisition.",
        "description": "Updates the quantity of randmarSku in requisitionNumber.\r\nSetting quantity to 0 removes the item from the requisition.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Use this only for single-SKU corrections. For adding multiple SKUs, use `CreateRequisition`.</description></item><item><description><b>Quantity rule:</b> Set quantity to the product’s `MasterCarton` quantity (do not guess; fetch the product to confirm).</description></item></list>\r\nThe product and requisition must both exist. The quantity is passed to the accounting line-edit operation; use the requisition GET response to verify the updated lines.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requisitionNumber",
            "in": "path",
            "description": "Path parameter. The requisition number to edit. Obtain from `GET .../Documents/Requisitions`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSku",
            "in": "path",
            "description": "Path parameter. The Randmar SKU to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "description": "Query parameter. The new quantity (0 removes the item).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Indicates whether the edit was successful."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Requisition": {
      "put": {
        "tags": [
          "Requisition"
        ],
        "summary": "Creates a new requisition (draft purchase) containing one or more SKUs/part numbers.",
        "description": "Creates a requisition for the specified location and reference, with a list of part numbers and quantities.\r\n\r\n<b>AI Agent guidance (recommended path)</b><list type=\"bullet\"><item><description><b>Use this endpoint when multiple SKUs are involved.</b> Pass the full list in one call to ensure a consistent, auditable draft purchase.</description></item><item><description><b>Confirm before executing:</b> repeat back `Location`, `Reference`, and the final part-number/quantity list. Requisitions feed into purchase orders.</description></item></list>\r\nThe JSON body must supply a nonempty warehouse location and at least one part-number entry. The result is the new requisition number, not a PO; creating the purchase order is a separate operation.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON request body. The requisition payload including location, reference, and part numbers with quantities.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRequisitionInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRequisitionInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRequisitionInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRequisitionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The requisition number of the newly created requisition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Reseller/{resellerId}": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "summary": "Gets detailed information for a specific reseller.",
        "description": "Returns a reseller profile for this manufacturer, including optional specifications.\r\nObtain resellerId from `GET V4/Manufacturer/{routeManufacturerId}/Resellers` or from a qualification lookup.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize name, ID, and qualification/status fields relevant to the question; do not dump the full specification.</description></item><item><description>Use this as the read-before-write check before changing qualifications.</description></item></list>\r\nThe base response includes qualifications, IsQualified, manufacturer-specific sales data, active order details, and sales statistics. With specifications enabled it also includes completed order details, returns, and opportunities.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resellerId",
            "in": "path",
            "description": "Path parameter. The reseller application ID. Resolve from the Resellers list if the user gave a name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Query parameter. Whether to include detailed specifications in the response. Defaults to true.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested reseller's information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reseller"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Reseller/{resellerId}/SalesStatistics": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "summary": "Gets sales statistics for a specific reseller within a date range.",
        "description": "Returns sales statistics for one reseller. Narrow with startDate and endDate when possible.\r\nFor a full sales spreadsheet, prefer the reseller-scoped sales report under Report.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Ask for or default to a reasonable date range; summarize totals and trends instead of listing every statistic row.</description></item></list>",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resellerId",
            "in": "path",
            "description": "Path parameter. The reseller application ID whose sales statistics are requested.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Query parameter. Optional start date for the statistics period.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Query parameter. Optional end date for the statistics period.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of sales statistics for the reseller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SalesStatistic"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Reseller/Qualification/{qualificationId}": {
      "get": {
        "tags": [
          "Reseller"
        ],
        "summary": "Gets a reseller by qualification ID.",
        "description": "Resolves a reseller profile from a manufacturer qualification ID (not the reseller application ID).\r\nUse this when the user has a qualification identifier rather than a reseller ID.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>If lookup fails, fall back to listing resellers and matching by name.</description></item></list>\r\nA qualification ID must identify exactly one reseller for this manufacturer; zero or multiple matches yield no result. This lookup defaults `withSpecification` to false, unlike lookup by reseller application ID.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qualificationId",
            "in": "path",
            "description": "Path parameter. The qualification ID associated with the reseller.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Query parameter. Whether to include detailed specifications in the response. Defaults to false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested reseller's information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reseller"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Reseller/{resellerId}/Qualification": {
      "put": {
        "tags": [
          "Reseller"
        ],
        "summary": "Adds or updates a qualification for a reseller.",
        "description": "Assigns newValue as the qualification for resellerId under this manufacturer.\r\nThis changes how the reseller is classified for programs, pricing, or access tied to qualifications.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Fetch the reseller first and repeat back reseller ID/name plus the new qualification value; require explicit confirmation.</description></item></list>\r\nDeletes the existing qualification before inserting the replacement. A successful qualifying value also notifies subscribed reseller users and records a communication entry; this is not just a local identifier change.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resellerId",
            "in": "path",
            "description": "Path parameter. The reseller application ID to qualify. Resolve from the Resellers list if needed.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Query parameter. The qualification value to assign.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the operation was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Reseller"
        ],
        "summary": "Deletes a qualification from a reseller.",
        "description": "Removes the existing manufacturer qualification from resellerId. This cannot be undone except by inserting a new qualification.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Read the reseller first, repeat the current qualification and reseller ID, and require explicit confirmation before deleting.</description></item></list>\r\nRemoves the manufacturer/reseller qualification only when the reseller exists and is currently qualified. A false result with HTTP 200 means no successful removal was reported.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resellerId",
            "in": "path",
            "description": "Path parameter. The reseller application ID whose qualification will be removed.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the operation was successful."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Resellers": {
      "get": {
        "tags": [
          "Resellers"
        ],
        "summary": "Lists all resellers for a manufacturer.",
        "description": "Returns resellers associated with this manufacturer. Use it to resolve a `resellerId` when the user gives a name.\r\nFor one reseller's profile or sales stats, use `GET .../Reseller/{resellerId}` or `.../Reseller/{resellerId}/SalesStatistics`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>If the user named a reseller, find the matching ID and then fetch that reseller—do not paste the full list.</description></item><item><description>For a spreadsheet of reseller attributes, prefer the reseller report JSON/email endpoints under Report.</description></item></list>\r\nEach reseller is enriched with Qualifications, IsQualified, and sales data for this manufacturer. Use the reseller application ID from this list for the singular Reseller endpoints.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of resellers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Reseller"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Agency/{routeAgencyId}/Resellers/{routeResellerId}/OnHold": {
      "post": {
        "tags": [
          "Resellers"
        ],
        "summary": "Puts an agency member reseller on hold or removes the account hold.",
        "description": "Only resellers associated with the target sales agency can be updated.\r\nThis changes the member's account hold status, not an individual order's hold status.\r\nUse the ResellerId returned by the agency's reseller list.",
        "parameters": [
          {
            "name": "routeAgencyId",
            "in": "path",
            "description": "The target sales agency's application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The member's reseller ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Required query flag: true puts the member on hold; false removes the hold.",
            "required": true,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if updated; false if the reseller is not a member or the update failed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "The required newValue query flag is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the agency.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Agency/{routeAgencyId}/Resellers": {
      "get": {
        "tags": [
          "Resellers"
        ],
        "summary": "Lists resellers managed by the agency.",
        "description": "Returns resellers associated with this sales agency (not the full intranet reseller directory).\r\nUse when an agency user asks which resellers they cover.\r\nRelated: `GET V4/Agency/{routeAgencyId}` for agency context and\r\n`POST V4/Agency/{routeAgencyId}/ResellerSales/File` for a sales report.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Pass the target agency application ID in `routeAgencyId`, never HQ IDs such as `2` or `FGDCT3037`. Resolve names via `GET V4/Intranet/Search/Partners` when calling from intranet.</description></item><item><description>Keep `withSpecification` false unless the user needs expanded reseller profile fields; summarize the list rather than dumping it.</description></item></list>",
        "parameters": [
          {
            "name": "routeAgencyId",
            "in": "path",
            "description": "The target agency application ID. Not HQ IDs such as `2` or `FGDCT3037`. Resolve partner/agency names via `GET V4/Intranet/Search/Partners`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Query flag, false by default. True adds SalesData and agency information, including the reseller association's ProgramPercentage.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of resellers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Reseller"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}": {
      "get": {
        "tags": [
          "Return"
        ],
        "summary": "Retrieves a return belonging to the reseller.",
        "description": "Includes associated attachments, invoice when present, and return part numbers with current or discontinued product data. Does not change the return status.",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "Target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnNumber",
            "in": "path",
            "description": "Return number to retrieve within that reseller's account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Return details and related records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnOld"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the reseller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No matching return was found for the reseller."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/Create": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "Creates a new return (RMA) request.",
        "description": "Initiates an RMA for this reseller. The body (`ReturnRequest`) must include invoice number, contact information,\r\nand part numbers to return. List existing RMAs with `GET .../Returns`.\r\nEach item's ReasonForReturn must exactly match Ordering Error (N% restocking fee applies), with N a whole number from 0 to 100; Defective; Picking Error; or Lost with Carrier.\r\nPut free-text explanations in Comments. Invalid reasons are rejected with HTTP 400 before creating a return.\r\nCreating an RMA does not automatically credit the account — credit/accept/decline are separate Return writes.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm invoice number, SKUs/quantities, and reason before creating; this starts a live return.</description></item><item><description>Repeat the items to return; do not invent serials or quantities. After success, report the new return number.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "ReturnRequest with ReturnPartNumbers.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the created return number."
          },
          "400": {
            "description": "If the return request is invalid or incomplete.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to create a return for this reseller.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}/Claim": {
      "put": {
        "tags": [
          "Return"
        ],
        "summary": "(Internal) Opens a carrier claim for an existing return.",
        "description": "Escalates returnNumber to a formal carrier claim. Internal use; not a substitute for creating an RMA.\r\nReturns the claim number when successful.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the return number; this opens a live carrier claim.</description></item><item><description>Do not open a claim unless the user asked to escalate with the carrier (not merely create an RMA).</description></item></list>",
        "parameters": [
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The unique identifier for the return for which to open a claim.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "routeResellerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the claim number if successfully opened.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "If a claim cannot be opened for the specified return (e.g., invalid state or return not found).",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to open a claim.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}/ManufacturerRMA": {
      "put": {
        "tags": [
          "Return"
        ],
        "summary": "(Internal) Requests a manufacturer RMA for a return.",
        "description": "Requests manufacturer Return Merchandise Authorization for items on returnNumber,\r\nusing part numbers/serials and emails in manufacturerRMA. Internal warehouse/vendor workflow.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm return number, MPNs/serials, and manufacturer email recipients before submitting.</description></item><item><description>This contacts the manufacturer — do not send to emails the user did not approve.</description></item></list>",
        "parameters": [
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The unique identifier for the return.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "routeResellerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The details required for the manufacturer RMA request, including part numbers and email addresses.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ManufacturerRMA"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManufacturerRMA"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ManufacturerRMA"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ManufacturerRMA"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON boolean: false if the return is missing, true after attempting the manufacturer email. True does not confirm email delivery or manufacturer authorization."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}/AddComment": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "Appends a return comment and emails the updated comment history.",
        "description": "Adds the caller and server timestamp to the stored comment and logs it. Sends confirmation to ResellerReturns notification recipients and the return contact; does not change status. A true result does not confirm delivery.",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "Target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnNumber",
            "in": "path",
            "description": "Return number belonging to the reseller.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "description": "Comment text supplied as a query parameter.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON boolean: true after the comment and notification attempt, false when the return cannot be found."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the reseller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}/{randmarSKU}/EditReason": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "(Internal) Edits the return reason for a SKU on an RMA.",
        "description": "Changes the reason text for randmarSKU on returnNumber.\r\nQuantity edits use `POST .../Return/{returnNumber}/{randmarSKU}/EditQuantity`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm return number, SKU, and the new reason text before writing.</description></item><item><description>Do not invent a reason — only apply what the user provided.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The unique identifier for the return/RMA.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the item whose reason is being edited.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "Exact allowed reason: Ordering Error (N% restocking fee applies), with N a whole number from 0 to 100; Defective; Picking Error; or Lost with Carrier. Put additional details in comments.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON boolean: false if the return/SKU is missing or the reason is unchanged; true after updating, recording a comment, and clearing cached returns."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}/{randmarSKU}/EditQuantity": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "(Internal) Edits the quantity of a SKU on an RMA.",
        "description": "Changes the quantity for randmarSKU on returnNumber.\r\nReason edits use `POST .../Return/{returnNumber}/{randmarSKU}/EditReason`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat return number, SKU, and new quantity; confirm before changing what will be credited/received.</description></item><item><description>Do not increase quantity beyond what the user authorized to return.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The unique identifier for the return/RMA.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the item whose quantity is being edited.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new quantity.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON boolean: false if the return/SKU is missing or quantity is unchanged; true after updating, recording a comment, and clearing cached returns."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}/Accept": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "(Internal) Accepts a return (RMA).",
        "description": "Sets returnNumber status to Accepted and emails return instructions to the return contact and ResellerReturns notification audience. Internal workflow; distinct from Receive, Eligible, Credit, or Decline.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the return number; accepting advances the RMA and can lead to credit.</description></item><item><description>Do not accept if the user asked to decline or only to check status.</description></item></list>",
        "parameters": [
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The return number that is to be accepted.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "routeResellerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON boolean: status-update result. True does not confirm delivery of the return-instructions email."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}/Receive": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "(Internal) Marks a return as received at the warehouse.",
        "description": "Sets returnNumber status to Received at Randmar's warehouse.\r\nFollow with warehouse location edit or Eligible/Credit as appropriate.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the return number; this records physical receipt and advances the RMA.</description></item><item><description>Do not mark received unless goods actually arrived (or the user explicitly confirms that).</description></item></list>",
        "parameters": [
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The return number that is to be marked as received.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "routeResellerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON boolean from the status update; false when the return cannot be found."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}/WarehouseLocation": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "(Internal) Edits the warehouse location for a received return.",
        "description": "Requires an existing, non-empty warehouse ID. Updates the location and adds a receipt comment.\r\nIf the return is Accepted, also changes its status to Received; it is not restricted to already-received returns.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm return number and location code; this changes where received goods are recorded.</description></item><item><description>Do not invent a warehouse location code.</description></item></list>",
        "parameters": [
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The unique identifier for the return.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new warehouse location identifier.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "routeResellerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON boolean: false for a missing return, blank/unknown warehouse, or failed update; true when updated."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}/Eligible": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "(Internal) Marks a return as eligible for credit.",
        "description": "Sets returnNumber status to Eligible for Credit. Does not itself issue a credit —\r\nuse `POST .../Return/{returnNumber}/Credit` or AdminCredit to assign/issue credit.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the return number; this is a step toward crediting the reseller.</description></item><item><description>Do not mark eligible if the user asked to decline the RMA.</description></item></list>",
        "parameters": [
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The return number that is to be marked as eligible for credit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "routeResellerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON boolean from the status update; false when the return cannot be found."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}/Credit": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "(Internal) Assigns a credit number to a return and marks it credited.",
        "description": "Associates creditNumber with returnNumber and sets status to Credited.\r\nAlthough the query parameter has an empty default, the service requires exactly eight characters beginning with CN.\r\nA missing or malformed value throws an unhandled validation exception; it is not translated to HTTP 400 by this action.\r\nNo financial processing occurs here — this is an administrative status/link. For special financial credit see AdminCredit.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm return number and credit document number; this marks the RMA credited.</description></item><item><description>Do not use this to invent a credit — only link a real credit number the user provided or that was issued.</description></item></list>",
        "parameters": [
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The return number to be credited.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "creditNumber",
            "in": "query",
            "description": "Required existing credit document number: exactly eight characters beginning with CN.",
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "routeResellerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON boolean: true after linking the credit and updating status, false if the return is missing."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}/Decline": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "(Internal) Declines a return (RMA).",
        "description": "Sets returnNumber status to Declined, with optional reason.\r\nOpposite of Accept. High-impact for the reseller expecting a credit.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm return number and reason; declining stops the RMA and typically means no credit.</description></item><item><description>Do not decline unless the user explicitly asked to refuse this return.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The return number that is to be declined.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "description": "The optional reason for declining the return.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON true after declining the return and attempting the confirmation email; not a delivery receipt."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "The return could not be found or the operation returned false."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Return/{returnNumber}/AdminCredit": {
      "put": {
        "tags": [
          "Return"
        ],
        "summary": "(Internal) Issues an administrative credit for a return.",
        "description": "Issues a special administrative credit for returnNumber, optionally including transportation charges.\r\nUnlike CreditReturn (status/link only), this performs credit issuance. Not a public reseller self-service action.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm return number and whether transportation charges are included; this issues a financial credit.</description></item><item><description>Do not issue admin credit unless the user explicitly requested this exception path.</description></item></list>",
        "parameters": [
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The return number to be credited.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeTransortationCharges",
            "in": "query",
            "description": "Whether to include transportation charges in the credit.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "routeResellerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Created credit document number. The return is linked and marked Credited; credit-email failures do not roll back the credit.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "Missing return, an existing linked credit, or no credit number returned by the accounting system."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routePartnerId}/Return/{returnNumber}": {
      "get": {
        "tags": [
          "Return"
        ],
        "summary": "Gets detailed information about a specific return or RMA.",
        "description": "This endpoint provides comprehensive details about a return or RMA (Return Merchandise Authorization)\r\nbased on its unique return number.\r\nThis endpoint is commonly used to:\r\n- Check the current status of a return\r\n- Access all details needed for processing or managing the return\r\nWarehouse-scoped lists are at `GET .../Warehouse/{warehouseId}/Returns`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Read this before adding a comment, accepting, or discussing status; repeat back the return number.</description></item><item><description>Set `withSpecification=false` when you only need status, not full line detail.</description></item></list>",
        "parameters": [
          {
            "name": "routePartnerId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The unique identifier for the return/RMA.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Whether to include detailed return specifications in the response.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the complete return information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnOld"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this return information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routePartnerId}/Return/{returnNumber}/AddComment": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "Adds a comment to a specific return.",
        "description": "This endpoint allows a partner to add a textual comment to an existing return or RMA.\r\nRead the return first with `GET .../Return/{returnNumber}`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the return number and the exact comment text and confirm before posting.</description></item><item><description>Do not invent status commentary; use the user's words. Comments persist on the RMA.</description></item></list>",
        "parameters": [
          {
            "name": "routePartnerId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The unique identifier for the return/RMA.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "description": "The comment text to add.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a success indicator if the comment was added."
          },
          "400": {
            "description": "If the comment is invalid or cannot be added.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to add a comment to this return.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routePartnerId}/Return/{returnNumber}/Accept": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "Accepts a return (RMA) at a warehouse managed by the partner.",
        "description": "Changes the status of the specified return to Accepted.\r\nThe caller must manage a warehouse that can process this RMA.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Read the RMA first, then repeat back the return number and obtain explicit confirmation before accepting.</description></item><item><description>Accepting is an operational status change and cannot be casually undone.</description></item></list>",
        "parameters": [
          {
            "name": "routePartnerId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The return number that is to be accepted.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The status was changed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routePartnerId}/Return/Create/{resellerId}": {
      "post": {
        "tags": [
          "Return"
        ],
        "summary": "Creates a new return (RMA) request for a reseller.",
        "description": "Creates a return (RMA) on behalf of a reseller while using the Partner-scoped route.\r\nThe caller must operate at least one warehouse. Returns the created return number on success.\r\nEach item's ReasonForReturn must exactly match Ordering Error (N% restocking fee applies), with N a whole number from 0 to 100; Defective; Picking Error; or Lost with Carrier.\r\nPut free-text explanations in Comments. Invalid reasons are rejected with HTTP 400 before creating a return.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back reseller ID, part numbers, quantities, and reason and obtain explicit confirmation before creating.</description></item><item><description>Do not invent SKUs or quantities; use the user's RMA request payload.</description></item></list>",
        "parameters": [
          {
            "name": "routePartnerId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resellerId",
            "in": "path",
            "description": "The reseller ID for which the return is created.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "ReturnRequest with ReturnPartNumbers.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the created return number.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "If the return request is invalid or cannot be created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Returns": {
      "get": {
        "tags": [
          "Returns"
        ],
        "summary": "Lists all returns (RMAs) for a reseller.",
        "description": "Returns the reseller's RMA list with status/stage information.\r\nUse this to find a return number before creating, declining, or inspecting a specific RMA\r\nvia `POST V4/Reseller/{routeResellerId}/Return/Create` or related Return routes.\r\nReseller role is required; partners without that role cannot call this endpoint.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize by return number, related invoice/order, and status; do not dump every line item.</description></item><item><description>When the user asks to change a return, confirm the exact return number from this list first.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of all returns of this reseller",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReturnOld"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Returns": {
      "get": {
        "tags": [
          "Returns"
        ],
        "summary": "Gets all returns for a specific manufacturer.",
        "description": "Retrieves a list of all returns (RMAs) associated with the given manufacturer ID.\r\n\r\nReturns return records associated with the manufacturer. This is a list operation; acceptance, receipt, and credit actions are separate return workflows and are not performed by this GET.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of returns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReturnOld"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Shopify/{shopifyHostName}/Search": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Searches for items within a Shopify store's context.",
        "description": "Searches Randmar products, categories, and manufacturers in the linked store's context. An empty query or fewer than three characters returns manufacturers open to working with resellers. Longer queries fall back to product-description search when the initial searches find nothing. Product hits include AvailableToBuy; result items use ContentType and Content rather than a uniform product shape.",
        "parameters": [
          {
            "name": "shopifyHostName",
            "in": "path",
            "description": "The host name of the Shopify store (e.g., 'your-store.myshopify.com').",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "URL-encoded query text; use at least three characters for catalog searching.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of search results matching the query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SearchResult"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The request is not authorized (e.g., invalid Shopify credentials).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Search": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Searches for documents and information using a query string",
        "description": "This endpoint performs a search across multiple document types using the provided query string.\r\n\r\nThe search can return various types of results based on the query, including:\r\n- Orders (with prefix OW)\r\n- Shipments (with prefix SH)\r\n- Invoices (with prefix IN)\r\n- Products (by SKU or MPN)\r\n\r\nResults are returned as an array of objects, each with a ContentType property indicating the type of result\r\n(e.g., \"GeneralDocument\", \"Shipment\", \"Product\") and a Content property containing the detailed information.\r\n\r\nCommon use cases:\r\n- Finding basic order or shipment information (including tracking number!) using a purchase order number.\r\n- Finding basic product information by name rather than MPN, UPC or Randmar SKU.",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The application ID of the Reseller making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "s",
            "in": "query",
            "description": "The search query string (e.g., order number, PO number, product SKU).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "An array of search results matching the query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResult"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this search.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Search": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Search using a query string",
        "description": "This endpoint performs a search using the provided query string.\r\n\r\nThe search can be performed using:\r\n- UPC/EAN codes\r\n- Approximate manufacturer part numbers (MPN)\r\n- Randmar SKUs\r\n- Shipment numbers\r\n- Tracking numbers\r\n- Order numbers\r\n- PO Numbers (for warehouse owners)\r\n- RMA numbers, including RMAs related to a PO, order, shipment, or invoice (for warehouse owners)\r\n\r\nWhen unsure about which endpoint to use, this one is almost always a good choice.\r\n\r\n<b>Order and invoice questions:</b> Prefer a result with ContentType=GeneralDocument and pass its\r\nContent.OrderNumber to `GET V4/Partner/{routeApplicationId}/GeneralDocument/{orderNumber}?withSpecification=true`.\r\nThat response contains ActiveOrderDetails and CompletedOrderDetails with SKU, MPN, quantity, and unit price.\r\nIn reseller context, a recognized 10- or 11-character order number is resolved against its original first ten characters;\r\nthe GeneralDocument result is returned only when that original header is accessible. Use the returned number, not a guessed truncation.\r\nSearch can return individual Order/Shipment/Invoice matches without a GeneralDocument; do not relabel those identifiers as a General Document number.\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Prefer this when the identifier type is unknown (SKU, MPN, order, tracking, RMA, PO).</description></item><item><description>For order activity, prefer GeneralDocument matches and the General Document detail GET; use an individual document lookup only when needed. These reads do not require checkout or order changes.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "The search query string.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "An array of search results matching the query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResult"
                }
              }
            }
          },
          "204": {
            "description": "Nothing found."
          },
          "401": {
            "description": "The user is not authorized to perform this search.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Manufacturer/{routeManufacturerId}/Search": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Searches for manufacturer-related information using a query string",
        "description": "This endpoint performs a comprehensive search across multiple data types using the provided query string.\r\n\r\nThe search can return various types of results based on the query, including:\r\n- Requisitions\r\n- Receipts\r\n- Purchase Orders\r\n- Resellers associated with the manufacturer\r\n- Products in the manufacturer's catalog\r\n- Opportunities and promotions\r\n\r\nResults are returned as an array of objects, each with a ContentType property indicating the type of result\r\nand a Content property containing the detailed information.\r\n\r\nThis endpoint is particularly useful for manufacturers to quickly find information across their\r\nentire business relationship with Randmar and their resellers.",
        "parameters": [
          {
            "name": "routeManufacturerId",
            "in": "path",
            "description": "Path parameter. Target manufacturer application ID; this identifies the manufacturer being accessed, not the caller’s application.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "s",
            "in": "query",
            "description": "Query parameter. Search query, at least three characters. Supports recognized PO/RCP/RQN numbers and general reseller, product, or opportunity terms.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A JSON array of typed search hits; an empty array when the manufacturer is unavailable, the query is too short, or no matches are found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResult"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this search.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/ShippingLabel/Generate": {
      "put": {
        "tags": [
          "ShippingLabel"
        ],
        "summary": "Generates and emails a shipping label.",
        "description": "Creates a carrier shipping label from shipmentDetails and emails it to the recipient.\r\nThe response is the tracking number. This purchases/creates a live label and changes fulfillment state.\r\nCall `POST V4/Reseller/{routeResellerId}/ShippingLabel/Estimate` first so the user can pick a carrier.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm from/to addresses, carrier, box count, weight, and email before generating; this creates a real shipment label.</description></item><item><description>Use Estimate results to choose the carrier; do not invent a carrier code.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The details of the shipment, including from/to addresses, carrier, and package information.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentDetails"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentDetails"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentDetails"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentDetails"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the tracking number of the generated shipping label.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (e.g., missing carrier information).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/ShippingLabel/Logistics": {
      "put": {
        "tags": [
          "ShippingLabel"
        ],
        "summary": "Generates shipping labels for a logistics order.",
        "description": "This endpoint is used for logistics purposes to generate shipping labels. It returns the order number, the shipping price, and a list of base64-encoded shipping labels.",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The ID of the reseller making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The details of the shipment, including destination address and package information.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentDetails"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentDetails"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentDetails"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentDetails"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns an object containing the order number, shipping price, and shipping labels.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogisticsShippingLabelResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (e.g., missing carrier information).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/ShippingLabel/Estimate": {
      "post": {
        "tags": [
          "ShippingLabel"
        ],
        "summary": "Estimates shipping carriers and prices for a shipment.",
        "description": "Returns available carriers and estimated costs for shipmentDetails (from/to, boxes, weight).\r\nUse this before `PUT V4/Reseller/{routeResellerId}/ShippingLabel/Generate` so the user can pick a carrier.\r\nThis is a quote only; it does not create a label.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Present carrier, service, and price as a short comparison; do not dump raw rate rows.</description></item><item><description>Confirm the from/to address and package weight with the user before quoting, then wait for them to choose a carrier before Generate.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The details of the shipment, including from/to addresses and package information.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentDetails"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentDetails"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentDetails"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentDetails"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A list of shipping carriers and their estimated prices.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShipViaEstimate"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Shopify/Accounts": {
      "get": {
        "tags": [
          "Shopify"
        ],
        "summary": "Lists Shopify stores linked to the reseller.",
        "description": "Returns linked Shopify account/host information for routeResellerId.\r\nUse this to resolve `shopifyHostName` (typically `*.myshopify.com`) before product sync,\r\nfulfillment actions, or `POST .../Product/{randmarSKU}/Shopify`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Present store host names as a short selection list; do not dump credentials or tokens if present.</description></item><item><description>If no stores are linked, tell the user Shopify sync/fulfillment will fail until a store is connected.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of Shopify account information.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Reseller/{routeResellerId}/Shopify/{shopifyhostName}/Fulfillment/{shopifyFulfillmentOrderIrderId}/{supportedAction}": {
      "post": {
        "tags": [
          "Shopify"
        ],
        "summary": "Executes a Shopify fulfillment or cancellation action.",
        "description": "Manages fulfillment for a Shopify fulfillment order. Supported supportedAction values:\r\n`request_fulfillment` (ask Randmar to fulfill), `request_cancellation` (cancel fulfillment),\r\nand `create_fulfillment` (close/complete fulfillment).\r\nUnrecognized actions return `200 OK` with `false`.\r\nResolve the store via `GET V4/Reseller/{routeResellerId}/Shopify/Accounts` first.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm store host, fulfillment order ID, and the exact action; this changes Shopify fulfillment state.</description></item><item><description>Treat `request_cancellation` like canceling an order — require explicit user confirmation.</description></item></list>",
        "parameters": [
          {
            "name": "routeResellerId",
            "in": "path",
            "description": "The target reseller application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyhostName",
            "in": "path",
            "description": "The Shopify store host name (e.g., `your-store.myshopify.com`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyFulfillmentOrderIrderId",
            "in": "path",
            "description": "The Shopify fulfillment order ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "supportedAction",
            "in": "path",
            "description": "The action to perform. Supported values: `request_fulfillment`, `request_cancellation`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the action was executed; otherwise false (including unsupported action or validation failure)."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Shopify": {
      "get": {
        "tags": [
          "Shopify"
        ],
        "summary": "Gets the partner's linked Shopify store configurations.",
        "description": "Returns the Shopify account configuration(s) associated with the partner, including store host name(s) and integration settings.\r\nSet `withToken` to true only when the access token is explicitly required.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Read-only:</b> Yes (does not modify Shopify or enqueue sync jobs).</description></item><item><description><b>Confirmation:</b> Not required.</description></item><item><description><b>Sensitive data:</b> Avoid `withToken=true` unless strictly necessary; treat any returned token as a secret and do not display it back to the user.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withToken",
            "in": "query",
            "description": "When true, includes the Shopify access token in the response.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of Shopify account configurations."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": true
      }
    },
    "/V4/Partner/{routeApplicationId}/Shopify/{shopifyHostName}/Attachments": {
      "get": {
        "tags": [
          "Shopify"
        ],
        "summary": "Lists attachments associated with a Shopify store host name.",
        "description": "Returns registered attachment metadata whose `AssociatedGUID` is the supplied `shopifyHostName`.\r\nThis endpoint is limited to the authenticated application ID that owns the Shopify store configuration.\r\nRegister new files with `PUT .../Shopify/{shopifyHostName}/Attachment` after uploading via Attachment/Upload.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Use the store host name from `GET .../Shopify` (typically `*.myshopify.com`); do not guess it.</description></item><item><description>Summarize filenames; download a specific UUID only when the user asks for the file.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "path",
            "description": "The Shopify store host name (e.g., `your-store.myshopify.com`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Attachments associated with the Shopify store host name.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AttachmentHeader"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Shopify/{shopifyHostName}/Attachment": {
      "put": {
        "tags": [
          "Shopify"
        ],
        "summary": "Registers a previously uploaded attachment with a Shopify store host name.",
        "description": "Upload file bytes through `POST V4/Partner/{routeApplicationId}/Attachment/Upload`, then pass the\r\nreturned storage key here. This endpoint validates that `shopifyHostName` is associated with\r\n`routeApplicationId`, then registers the file with `AssociatedGUID = shopifyHostName`.\r\nThis is attachment-storage registration (storage key), not a FileUrl download flow.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the store host name and that the storage key came from Attachment/Upload for this partner.</description></item><item><description>Do not pass a Google Drive URL or Generation/Upload URL here—this endpoint expects a storage key.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "path",
            "description": "The Shopify store host name (e.g., `your-store.myshopify.com`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The registration payload containing the temporary storage key.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.ShopifyController.RegisterStoreAttachmentInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The registered attachment UUID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "No storage key was provided, validation failed, or the attachment could not be registered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Shopify/Validate": {
      "post": {
        "tags": [
          "Shopify"
        ],
        "summary": "Validates connectivity and credentials for a Shopify store.",
        "description": "Validates that the stored credentials for `shopifyHostName` are present and can successfully connect to Shopify.\r\nThis is commonly used after initial setup or when troubleshooting connection issues.\r\n\r\nNote: validation may create or rename the Randmar fulfillment service/location in Shopify when it is missing or misnamed.\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Read-only:</b> No (may create/rename fulfillment service configuration in Shopify).</description></item><item><description><b>Confirmation:</b> Required. Explain the potential side effect (fulfillment service create/rename) before calling.</description></item><item><description><b>Preconditions:</b>`shopifyHostName` should be the store hostname (typically `*.myshopify.com`) and credentials must already be stored/linked for that store.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name (e.g., `your-store.myshopify.com`).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the account credentials are valid and Shopify can be reached."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Shopify/Synchronization/{synchronizationType}": {
      "post": {
        "tags": [
          "Shopify"
        ],
        "summary": "Enables or disables a Shopify synchronization module.",
        "description": "Toggles a synchronization feature (for example, inventory or tracking updates) for the specified Shopify store.\r\nThe update applies to the integration configuration tied to `shopifyHostName`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Read-only:</b> No (changes integration configuration; may validate/create required Shopify fulfillment service configuration).</description></item><item><description><b>Confirmation:</b> Required. Repeat back `synchronizationType`, `shopifyHostName`, and the new value before calling.</description></item><item><description><b>Preconditions:</b> Store must be linked/credentialed and `synchronizationType` must match a supported toggle.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "synchronizationType",
            "in": "path",
            "description": "The synchronization module name (e.g., `Inventory`, `Tracking`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new enabled/disabled value to apply.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the setting was updated."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Shopify/{propertyName}": {
      "post": {
        "tags": [
          "Shopify"
        ],
        "summary": "Updates a boolean configuration property for a Shopify store.",
        "description": "Sets a named boolean property in the Shopify account configuration for `shopifyHostName`.\r\nUse this for simple on/off account flags that are not covered by a dedicated endpoint.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Read-only:</b> No (changes integration configuration).</description></item><item><description><b>Confirmation:</b> Required. Repeat back `propertyName`, `shopifyHostName`, and the new value before calling.</description></item><item><description><b>Preconditions:</b> Store must be linked/credentialed and `propertyName` must be supported by the underlying service.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "propertyName",
            "in": "path",
            "description": "The boolean property name to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new boolean value to set.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the property was updated."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Shopify/DefaultShippingSlipComment": {
      "post": {
        "tags": [
          "Shopify"
        ],
        "summary": "Updates the default shipping slip comment for a Shopify store.",
        "description": "Sets the default shipping slip comment used for orders imported from the specified Shopify store.\r\nThis is a convenience endpoint that updates the `DefaultShippingSlipComment` account property.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Read-only:</b> No (changes stored account configuration).</description></item><item><description><b>Confirmation:</b> Required. Read back the new comment text before calling.</description></item><item><description><b>Preconditions:</b> Store must be linked/credentialed.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The comment text to store as the default shipping slip comment.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the comment was updated."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Shopify/ProductPricingStrategy": {
      "post": {
        "tags": [
          "Shopify"
        ],
        "summary": "Updates the product pricing strategy for a Shopify store.",
        "description": "Sets how product prices should be derived for the specified Shopify store when product information is synchronized.\r\nSupported values are `MSRP`, `MAP`, `MSRP_MINUS_DEFAULT_OPP`, `MAP_MINUS_DEFAULT_OPP`, and `DO_NOT_RESYNC`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Read-only:</b> No (changes stored account configuration).</description></item><item><description><b>Confirmation:</b> Required. Repeat back the store and the new pricing strategy before calling.</description></item><item><description><b>Preconditions:</b> Store must be linked/credentialed and `newValue` must match one of the supported strategy values exactly.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The product pricing strategy to store.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the pricing strategy was updated."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Shopify/AdsGrowthStrategy": {
      "post": {
        "tags": [
          "Shopify"
        ],
        "summary": "Updates the ads growth strategy for a Shopify store.",
        "description": "Sets how aggressively ads should grow for the specified Shopify store.\r\nSupported values are `Fast, but more expensive`, `Breakeven`, and `Slow, but profitable`.\r\nRelated: `POST .../Shopify/AdvertisingBudgetPerDay` and `POST .../Shopify/GoogleAdsId`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the store host name and the exact strategy string and confirm before calling.</description></item><item><description>Only submit one of the three supported values exactly; this affects advertising spend behavior.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The ads growth strategy to store.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the ads growth strategy was updated."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Shopify/AdvertisingBudgetPerDay": {
      "post": {
        "tags": [
          "Shopify"
        ],
        "summary": "Updates the daily advertising budget for a Shopify store.",
        "description": "Stores the daily advertising budget used with the store's ads configuration.\r\nRelated: `POST .../Shopify/AdsGrowthStrategy` and `POST .../Shopify/GoogleAdsId`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the store host name and the exact daily budget amount and obtain explicit confirmation—this is a spend control.</description></item><item><description>Do not invent a budget; use the amount the user stated.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The daily advertising budget to store.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the daily advertising budget was updated."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Shopify/GoogleAdsId": {
      "post": {
        "tags": [
          "Shopify"
        ],
        "summary": "Updates the Google Ads customer ID for a Shopify store.",
        "description": "Accepts an empty value to clear the setting; otherwise the value must be exactly 10 digits.\r\nRelated: ads growth strategy and daily budget endpoints on the same Shopify controller.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back the store host name and the 10-digit customer ID (or that it will be cleared) and confirm.</description></item><item><description>Do not invent a Google Ads ID; only submit the ID the user provided, or empty to clear.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The Google Ads customer ID to store (10 digits, or empty to clear).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the Google Ads customer ID was updated."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Shopify/Webhook/{module}/{status}": {
      "put": {
        "tags": [
          "Shopify"
        ],
        "summary": "Registers a Shopify webhook for a topic and event.",
        "description": "Creates a webhook subscription in Shopify so Randmar can receive event callbacks (for example, order creation or product updates).\r\nThe exact topic and event depend on `module` and `status`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Read-only:</b> No (creates a webhook subscription in Shopify).</description></item><item><description><b>Confirmation:</b> Required. Repeat back `module`, `status`, and `shopifyHostName` before calling.</description></item><item><description><b>Preconditions:</b> Store must be linked/credentialed and Shopify credentials must allow webhook management for the topic.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "module",
            "in": "path",
            "description": "The webhook topic/module (e.g., `orders`, `products`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "path",
            "description": "The event for the topic (e.g., `create`, `update`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the webhook was created."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Shopify"
        ],
        "summary": "Deletes a Shopify webhook for a topic and event.",
        "description": "Removes an existing webhook subscription from the Shopify store for the given `module` and `status`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Read-only:</b> No (deletes a webhook subscription in Shopify).</description></item><item><description><b>Confirmation:</b> Required. Repeat back `module`, `status`, and `shopifyHostName` before calling.</description></item><item><description><b>Preconditions:</b> Store must be linked/credentialed and the webhook must exist.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "module",
            "in": "path",
            "description": "The webhook topic/module (e.g., `orders`, `products`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "path",
            "description": "The event for the topic (e.g., `create`, `update`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopifyHostName",
            "in": "query",
            "description": "The Shopify store host name.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the webhook was deleted."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Stripe/CreateEntranceFeeCheckout": {
      "post": {
        "tags": [
          "StripeCheckout"
        ],
        "summary": "Creates a checkout for the reseller entrance fee and returns the Stripe session URL.",
        "description": "Requires completed partner billing information. The response indicates whether a checkout URL was\r\ncreated or the reseller was activated immediately. When `ResellerActivatedViaPromoCode` is true,\r\n`SessionUrl` is null and no payment page is required. A false value is not an error; it means\r\nthe reseller must complete payment using the returned `SessionUrl`.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Confirm the target partner, email address, and intent to pay the entrance fee before calling.</description></item><item><description>Return the session URL to the user; do not attempt to open it or claim payment has completed.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID to activate as a reseller.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The checkout email and optional promo code.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EntranceFeeCheckoutRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EntranceFeeCheckoutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EntranceFeeCheckoutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EntranceFeeCheckoutRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The checkout URL, or confirmation that the reseller was activated immediately.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntranceFeeCheckoutResponse"
                }
              }
            }
          },
          "400": {
            "description": "Required input or billing information is missing, a supplied promo code is invalid, or activation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authorized for the target partner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "The checkout could not be created because of an unexpected server error."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": true,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/User/{emailAddress}": {
      "put": {
        "tags": [
          "User"
        ],
        "summary": "Invites a new user to the partner application.",
        "description": "Sends an invitation email to emailAddress granting access to the partner application.\r\n\r\ncustomMessage is optional free text included in the invitation. Keep it brief and professional,\r\nand do not include secrets or credentials.\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Require explicit confirmation, including the recipient email, partner application, withEmailConfirmation, and the final customMessage text.</description></item><item><description>Double-check spelling of the email address; incorrect invites can leak information and require manual cleanup.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "path",
            "description": "The email address to invite.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withEmailConfirmation",
            "in": "query",
            "description": "If true, sends the invitation via email (recommended).",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "customMessage",
            "in": "query",
            "description": "Optional message to include in the invitation email.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the invitation was successfully sent."
          },
          "400": {
            "description": "The invitation could not be sent.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Removes a user from the partner application.",
        "description": "Permanently removes the user's access to the partner application.\r\n\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Destructive action—require explicit confirmation.</description></item><item><description>Repeat back the exact email address and partner application ID before calling.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "path",
            "description": "The email address of the user to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the user was removed."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/User/{emailAddress}/{fieldName}": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Updates a field on a user's profile within the partner application.",
        "description": "Updates a single user field identified by fieldName for the user identified by emailAddress.\r\nSupported fieldName values: `Name`, `Role`, `Language`, `Active`.\r\n\r\n<b>AI Agent safety</b>: repeat back the exact change (email + field + new value) and obtain explicit confirmation.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "path",
            "description": "The email address of the user to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldName",
            "in": "path",
            "description": "The field to edit (`Name`, `Role`, `Language`, or `Active`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new value to set.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update succeeded."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/User/{emailAddress}/Notification/{notificationType}": {
      "put": {
        "tags": [
          "User"
        ],
        "summary": "Subscribes a user to a notification type.",
        "description": "Enables delivery of the specified notification type for the given user.\r\n\r\n<b>AI Agent safety</b>: confirm the user and notification type before calling.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "path",
            "description": "The user's email address.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "notificationType",
            "in": "path",
            "description": "The notification type identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the subscription was added."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Unsubscribes a user from a notification type.",
        "description": "Disables delivery of the specified notification type for the given user.\r\n\r\n<b>AI Agent safety</b>: confirm the user and notification type before calling.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "emailAddress",
            "in": "path",
            "description": "The user's email address.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "notificationType",
            "in": "path",
            "description": "The notification type identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the subscription was removed."
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/User/NotificationTypes": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Lists notification types available for subscription.",
        "description": "Returns the set of notification type identifiers that can be used with:\r\n<list type=\"bullet\"><item><description>`PUT V4/Partner/{routeApplicationId}/User/{emailAddress}/Notification/{notificationType}`</description></item><item><description>`DELETE V4/Partner/{routeApplicationId}/User/{emailAddress}/Notification/{notificationType}`</description></item></list>\r\nUse these identifiers with subscribe/unsubscribe and with `PUT V4/Partner/Email/{notificationType}`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Call this before changing subscriptions or sending a notification-category email so the type string is exact.</description></item><item><description>Do not invent notification type names.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of notification types (strings).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Gets a list of users for the partner application.",
        "description": "Retrieves all users associated with the specified partner application ID.\r\nEach user includes `EmailAddress`, `Name`, `Role`, `Language`, `Active`, and notification subscriptions.\r\n\r\n<b>AI Agent guidance (required)</b><list type=\"bullet\"><item><description>\r\nAfter listing users, scan every user for a null or empty `Name`, `Role`, or `Language`.\r\nRecommend completing those fields before considering the account profile complete.\r\n</description></item><item><description>\r\nAsk the user for the missing values (do not invent them). Apply updates with\r\n`POST V4/Partner/{routeApplicationId}/User/{emailAddress}/{fieldName}`\r\nusing field names `Name`, `Role`, or `Language`. Confirm each change first.\r\n</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of users.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Users/RandmarTeam": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Gets a list of Randmar users who are allowed email recipients.",
        "description": "Retrieves Randmar team users and appends the HQ team collection. Current response shape is not a flat user list:\r\nthe final array entry is the HQ team collection itself. Partner-scoped email independently filters active allowed recipients.\r\nUse with `PUT V4/Partner/Email` when choosing recipients. Partner-account users are listed separately via\r\n`GET V4/Partner/{routeApplicationId}/Users`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Use these addresses only as allowed Randmar recipients; do not email arbitrary external addresses.</description></item><item><description>If a listed user's `Name`, `Role`, or `Language` is null or empty, recommend filling it (do not invent values) via the User edit endpoints after confirmation.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of users.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Utilities/ExcelToJSON": {
      "put": {
        "tags": [
          "Utilities"
        ],
        "summary": "Converts an uploaded Excel file into a JSON format.",
        "description": "This endpoint accepts an Excel file (in .xlsx or .xls format) and converts its content into a structured JSON object. \r\nThe resulting JSON will contain a representation of each sheet within the workbook.\r\nThis endpoint does not assume that sheets are structured like tables. Its output is general-purpose.\r\nFor the reverse conversion, use `PUT .../Utilities/JSONArrayToExcel`.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Upload the original .xlsx/.xls as multipart; do not paste spreadsheet cells as a substitute.</description></item><item><description>Summarize sheets/columns from the JSON rather than dumping every cell unless asked.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "The Excel file to be converted. The file should be sent as form data.",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The JSON representation of the Excel file.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRepresentation"
                }
              }
            }
          },
          "204": {
            "description": "If no file is provided in the request."
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Utilities/JSONArrayToExcel": {
      "put": {
        "tags": [
          "Utilities"
        ],
        "summary": "Converts a JSON array (array of objects) into an Excel workbook.",
        "description": "Accepts an `application/json` body containing a JSON array (typically an array of objects) and returns a generated `.xlsx` file.\r\n\r\n<b>Expected input</b><list type=\"bullet\"><item><description><b>Preferred:</b> Array of objects where each object is a row and each property is a column.</description></item><item><description><b>Also supported:</b> If the root payload is a single object, it is treated as a single-row array.</description></item><item><description><b>Primitive arrays:</b> If the array contains primitives (string/number/bool), a single column named `Value` is produced.</description></item></list>\r\n<b>Column behavior</b>\r\nColumns are derived from the union of property names across objects (in first-seen order). Missing values are left blank.\r\nNested objects/arrays are serialized as JSON strings in the cell.\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Send a JSON array of objects; confirm sheet/file names if the user cares about the download name.</description></item><item><description>This returns a binary .xlsx—do not treat it as a JSON body.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileName",
            "in": "query",
            "description": "Optional download file name (defaults to `data.xlsx`).",
            "schema": {
              "type": "string",
              "default": "data.xlsx"
            }
          },
          {
            "name": "sheetName",
            "in": "query",
            "description": "Optional worksheet name (defaults to `Sheet1`).",
            "schema": {
              "type": "string",
              "default": "Sheet1"
            }
          }
        ],
        "requestBody": {
          "description": "The JSON array payload.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/System.Text.Json.JsonElement"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An Excel workbook (.xlsx).",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON payload (not an array/object).",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Utilities/StandardOperatingProcedures": {
      "get": {
        "tags": [
          "Utilities"
        ],
        "summary": "Retrieves the partner's Standard Operating Procedures (SOPs).",
        "description": "Returns the SOP file directory for the partner as a list of Types.StandardOperatingProcedureFile entries.\r\n\r\n<b>Definition</b>\r\nStandard Operating Procedures (SOPs) are the partner�s authoritative, written instructions for executing operational tasks�\r\nincluding roles/responsibilities, required inputs, step-by-step process, approvals/constraints, and what �done� means.\r\nSOPs are the source of truth for approved operational behavior.\r\n<b>Response shape</b><list type=\"bullet\"><item><description>`Id`: SOP file identifier (used to download/reference the SOP in downstream flows).</description></item><item><description>`Name`: Human-friendly SOP file name/title.</description></item></list>\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Consult before action:</b> Read and follow the relevant SOP before executing high-impact actions (ordering, cancellations, inventory adjustments, customer communications).</description></item><item><description><b>Summarize first:</b> Provide a short summary and quote only the relevant sections unless the user asks for full text.</description></item><item><description><b>Traceability:</b> When acting, cite the SOP `Name` (and `Id` if needed) used as the basis for the decision.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of SOP files (Types.StandardOperatingProcedureFile).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StandardOperatingProcedureFile"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Utilities/StandardOperatingProcedure/{id}": {
      "get": {
        "tags": [
          "Utilities"
        ],
        "summary": "Retrieves a single SOP document as Markdown content.",
        "description": "Returns the Markdown body for one SOP identified by id.\r\nList SOP IDs first with `GET .../Utilities/StandardOperatingProcedures`.\r\nA 403 means the ID is outside the allowed SOP folder for this partner.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Use an `Id` from the SOP list; do not guess Drive IDs.</description></item><item><description>Summarize and quote relevant sections unless the user asks for the full document.</description></item><item><description>Cite the SOP name/ID when using it as the basis for a later action.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "The SOP file ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown representation of the SOP document.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/markdown": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden when the SOP ID is outside the allowed SOP folder.",
            "content": {
              "text/markdown": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Utilities/AcademyResources": {
      "get": {
        "tags": [
          "Utilities"
        ],
        "summary": "Lists resources available to Academy members.",
        "description": "Returns PDF files and Google Docs, Sheets, and Slides from the Academy Resources Drive folder.\r\nOther file types are omitted. Use the returned file ID with the Academy resource download endpoint.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The route partner application ID. The authenticated caller must be an Academy reseller.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The available Academy resource file names and IDs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AcademyResourceFile"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized for the requested partner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The partner is not an Academy member.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Utilities/AcademyResource/{id}": {
      "get": {
        "tags": [
          "Utilities"
        ],
        "summary": "Creates a short-lived public PDF URL for an Academy resource.",
        "description": "Native PDFs are copied as PDFs. Google Docs, Sheets, and Slides are exported to PDF.\r\nThe resulting PDF is uploaded to short-lived public storage under an unguessable filename.\r\nThe response contains only the public URL.\r\nThe file ID must belong to a supported file listed by the Academy resources endpoint.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The route partner application ID. The authenticated caller must be an Academy reseller.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "The Google Drive file ID returned by the Academy resources listing.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A short-lived public URL for the Academy resource PDF.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized for the requested partner.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The partner is not an Academy member, or the file is not an allowed Academy resource.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Vendor/InvoicesAndCredits": {
      "get": {
        "tags": [
          "Vendor"
        ],
        "summary": "Lists invoices and credit documents for the current vendor context.",
        "description": "\r\n<b>Route</b>: `GET V4/Partner/{routeApplicationId}/Vendor/InvoicesAndCredits`\r\n\r\nUse this endpoint to retrieve the vendor's financial documents that are available in the current Partner context,\r\n            including both invoices and credits.\r\n\r\nThis is typically used when the caller needs to review vendor billing history, reconcile balances,\r\n            or inspect credit activity alongside invoice activity.\r\n            This can be a large list—summarize outstanding balances and recent documents unless the user asks for every row.\r\n            \r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize invoices vs credits and amounts due; do not dump every document unless asked.</description></item><item><description>The route partner ID must be the vendor partner, not HQ (`2` / `FGDCT3037`).</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The vendor partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the vendor's invoices and credits as a collection of `VendorDocument` records.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VendorDocument"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}": {
      "get": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Gets detailed information for a specific warehouse.",
        "description": "Returns the warehouse profile for warehouseId after validating that it is attributed to the current partner.\r\nThis is the best starting point before performing warehouse-specific operations.\r\nRelated: `GET V4/Partner/{routeApplicationId}/Warehouses` to list warehouses first.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Read this warehouse before edits, carrier changes, receipts, or activity lists scoped to the same ID.</description></item><item><description>A 401 means the warehouse is not accessible in this partner context—do not retry against a different warehouse ID without asking.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse ID to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The warehouse information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Warehouse"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this warehouse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/Returns": {
      "get": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Gets all returns for a specific warehouse.",
        "description": "Retrieves return/RMA activity associated with warehouseId.\r\nUseful for warehouse-level after-sales and reverse-logistics visibility.\r\nThis can be a large list—summarize status counts and highlight open RMAs unless the user asks for every row.\r\nRelated: `GET V4/Partner/{routePartnerId}/Return/{returnNumber}` for one RMA.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize the list (open vs received vs closed) rather than dumping every RMA.</description></item><item><description>Use return numbers from this list when the user asks about a specific RMA.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of returns.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReturnOld"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this warehouse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/Return/Create/{resellerId}": {
      "post": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Creates an RMA for a reseller at a warehouse managed by the partner.",
        "description": "Requires partner and warehouse authorization. Uses only the selected warehouse as the allowed return location. Creating a return does not receive goods or issue credit.\r\nEach item's ReasonForReturn must exactly match Ordering Error (N% restocking fee applies), with N a whole number from 0 to 100; Defective; Picking Error; or Lost with Carrier.\r\nPut free-text explanations in Comments. Invalid reasons are rejected with HTTP 400 before creating a return.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse location for the new RMA.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resellerId",
            "in": "path",
            "description": "The reseller for which the RMA is created.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The return request.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The newly-created return number.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The return request is invalid or could not be created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The partner does not manage the RMA warehouse location.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/Return/{returnNumber}": {
      "get": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Gets one RMA from a warehouse managed by the partner.",
        "description": "Requires a return whose stored warehouse location matches the requested, accessible warehouse. A missing return or mismatched warehouse fails authorization. With specifications enabled, the underlying return service adds distribution data and activity logs.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The RMA warehouse location.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The return number.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "withSpecification",
            "in": "query",
            "description": "Whether product specifications and activity logs should be included.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested RMA.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnOld"
                }
              }
            }
          },
          "401": {
            "description": "The partner does not manage the RMA warehouse location.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/Return/{returnNumber}/Receive": {
      "post": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Marks an RMA as received at a warehouse managed by the partner.",
        "description": "Requires a matching return in an accessible warehouse. Sets status to Received, appends an attributed comment, and clears the reseller return cache. Does not issue credit or send a receipt email.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The RMA warehouse location.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnNumber",
            "in": "path",
            "description": "The return number to receive.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the RMA was received successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "The RMA status could not be updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The partner does not manage the RMA warehouse location.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/Orders": {
      "get": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Gets all orders for a specific warehouse.",
        "description": "Retrieves order activity associated with warehouseId.\r\nThis is warehouse-scoped operational order visibility, not a general partner-wide order search.\r\nPrefer `GET V4/Partner/{routeApplicationId}/Search?q=` when looking up one order number.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize counts and recent/open orders; do not dump the full list unless asked.</description></item><item><description>This is warehouse-scoped—do not treat it as the partner's complete order history.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of orders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Order"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this warehouse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/Shipments": {
      "get": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Gets all shipments for a specific warehouse.",
        "description": "Retrieves shipment activity associated with warehouseId.\r\nUse this for warehouse-level shipping visibility and fulfillment tracking.\r\nPrefer Search when looking up a tracking or shipment number.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize in-transit vs delivered and highlight exceptions rather than listing every shipment.</description></item><item><description>Use tracking/shipment numbers from this list for follow-up lookups.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of shipments.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Shipment"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this warehouse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/Invoices/Recent/NonStandardCarrier": {
      "get": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Gets invoices from the last seven days that use a non-standard carrier.",
        "description": "Requires authorization for both the partner and the warehouse. Returns the warehouse-specific exception list, not the partner's complete invoice history; it does not modify tracking or book shipments.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The recent invoices using a non-standard carrier.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Invoice"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this warehouse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/PurchaseOrders": {
      "get": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Gets all purchase orders for a specific warehouse.",
        "description": "Retrieves a list of all purchase orders associated with the given warehouse ID.\r\nUse `GET .../Warehouse/{warehouseId}/PurchaseOrder/{poNumber}` for line details, then\r\n`PUT .../PurchaseOrder/{poNumber}/Receive` to receive against a PO.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize open vs received POs; fetch details only for the PO the user named.</description></item><item><description>Do not receive a PO from this list without confirming PO number, warehouse, and quantities.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The ID of the warehouse.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of purchase orders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PurchaseOrder"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this warehouse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/PurchaseOrder/{poNumber}": {
      "get": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Gets detailed information for a specific purchase order.",
        "description": "Retrieves the line items and details for a purchase order associated with the given warehouse ID.\r\nUse this before receiving the PO so quantities and part numbers can be confirmed.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Read this before `PUT .../PurchaseOrder/{poNumber}/Receive` and confirm lines/quantities with the user.</description></item><item><description>Repeat back warehouse ID and PO number when discussing the result.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The ID of the warehouse.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "poNumber",
            "in": "path",
            "description": "The purchase order number.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The purchase order details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PurchaseOrderDetail"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this warehouse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/PurchaseOrder/{poNumber}/Receive": {
      "put": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Receives a purchase order against a warehouse.",
        "description": "Submits a request to receive the specified items against a PO, logging them into the provided warehouse setup.\r\nA `PackingSlipURL` is required. The PDF is stored in the legacy packing-slip Drive folder and registered\r\nas an attachment associated with the generated RCP number.\r\nEach line must supply either legacy QuantityReceived or both QuantityPackingSlip and QuantityActual.\r\nFormats cannot be mixed within a request. New quantities must be nonnegative, including a zero counted quantity.\r\nQuantityPackingSlip is booked into Accpac; shortages and overages in the counted quantity notify Mona for manual reconciliation.\r\n\r\n<b>PackingSlipURL (critical for AI agents)</b><list type=\"bullet\"><item><description>\r\nUpload the packing slip via `POST V4/Partner/{applicationId}/Generation/Upload` and use the returned\r\nshort-lived public URL. Do not pass private Google Drive / SharePoint / login-gated links.\r\n</description></item></list>\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Confirmation Required:</b> Always confirm the parts, quantities, and packing slip URL with the user before finalizing the reception.</description></item><item><description>Packing-slip quantities greater than the PO's outstanding quantity are accepted and forwarded to the accounting system as a partial reception.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The target warehouse ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "poNumber",
            "in": "path",
            "description": "The purchase order number to receive.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The payload containing the packing slip link and part quantities received.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.WarehouseController.ReceptionInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.WarehouseController.ReceptionInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.WarehouseController.ReceptionInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RandmarAPI.Controllers.V4.Partner.WarehouseController.ReceptionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The ID/receipt number resulting from the received items."
          },
          "401": {
            "description": "The user is not authorized to access this warehouse or perform the reception."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/Receipt/{rcpNumber}": {
      "get": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Gets detailed line items for a generated warehouse receipt.",
        "description": "Gets the item detail lines that were successfully processed on a given receipt (RCP).\r\nUse after receiving a purchase order to verify what was booked.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Use this to verify a receipt after receiving; summarize lines rather than dumping SKUs unless asked.</description></item><item><description>Repeat back warehouse ID and RCP number when reporting the result.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The ID of the warehouse.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rcpNumber",
            "in": "path",
            "description": "The receipt document number.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The line items included on this receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReceiptDetail"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to view the data for this warehouse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/Stocktransfers": {
      "get": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Gets all stock transfers for a specific warehouse.",
        "description": "Retrieves stock transfer activity associated with warehouseId.\r\nUseful for transfer planning, transfer history review, and warehouse balancing analysis.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize open vs completed transfers; do not dump the full list unless asked.</description></item><item><description>This is warehouse-scoped transfer history, not a create-transfer action.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of stock transfers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StockTransfer"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to access this warehouse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/Product/{randmarSKU}/Weight": {
      "put": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Updates the unit weight of a product.",
        "description": "The caller must operate the specified warehouse. The product does not need to be stocked at that\r\nwarehouse because unit weight is a shared product property rather than a warehouse-specific value.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description><b>Confirmation required:</b> Confirm the Randmar SKU and new unit weight before making this change.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "A warehouse operated by the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "randmarSKU",
            "in": "path",
            "description": "The Randmar SKU of the product to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newWeight",
            "in": "query",
            "description": "The new unit weight.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the product weight was updated; otherwise false.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "boolean"
                }
              },
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              },
              "text/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "The Randmar SKU or weight was not provided.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The partner is not authorized to access the specified warehouse.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/{fieldName}": {
      "post": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Edits a specific field of a warehouse.",
        "description": "Updates one warehouse property identified by fieldName.\r\nThe underlying service only accepts a controlled set of fields, and some fields require elevated authorization.\r\n\r\n<b>High-impact fields</b>\r\nFields such as `WarehouseType` and `Status` may be restricted and have operational consequences.\r\nAgents should not guess field names and should confirm both field and value before calling.\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back warehouse ID, `fieldName`, and `newValue` and obtain explicit confirmation.</description></item><item><description>Do not guess field names; Status and WarehouseType changes have operational side effects.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse ID to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldName",
            "in": "path",
            "description": "The field/property name to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "newValue",
            "in": "query",
            "description": "The new value for the field, provided as a query parameter.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the update was successful."
          },
          "401": {
            "description": "The user is not authorized to edit this warehouse.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/CarrierIntegration": {
      "put": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Adds a new carrier integration to a warehouse.",
        "description": "Configures a shipping carrier integration for warehouseId using the supplied credentials and shipper information.\r\nThis enables rate shopping and label generation for that carrier at the warehouse.\r\n\r\n<b>Security note</b>\r\nThe request body contains secrets. Treat `clientSecret` and other credentials as sensitive and do not echo them back in chat or logs.\r\nExample request body:```\r\n{\r\n  \"carrierCode\": \"UPS\",\r\n  \"clientId\": \"your-client-id\",\r\n  \"clientSecret\": \"your-client-secret\",\r\n  \"shipperNumber\": \"123ABC\"\r\n}\r\n```\r\n<b>AI Agent safety</b><list type=\"bullet\"><item><description>Repeat back warehouse ID, carrier code, client ID, and shipper number (never the secret) and confirm before calling.</description></item><item><description>Do not invent credentials; only submit values the user provided. Never echo `clientSecret`.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The carrier integration details.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CarrierIntegrationInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CarrierIntegrationInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CarrierIntegrationInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CarrierIntegrationInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the carrier integration was added successfully."
          },
          "400": {
            "description": "The carrier integration could not be added with the provided details.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to modify this warehouse.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}/CarrierIntegration/{carrierCode}": {
      "delete": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Deletes a carrier integration from a warehouse.",
        "description": "Removes an existing shipping carrier configuration from warehouseId.\r\nThis affects downstream rate shopping, label generation, and carrier-based shipping workflows for that warehouse.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Confirm intentions to aggressively drop a carrier configuration prior to calling, as this stops warehouse shipments for the carrier.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "carrierCode",
            "in": "path",
            "description": "The carrier code to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the carrier integration was deleted successfully."
          },
          "400": {
            "description": "The carrier integration could not be deleted.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to modify this warehouse.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "post": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Edits a carrier integration for a warehouse.",
        "description": "Activates or deactivates the specified carrier integration.\r\nWhen activating, the underlying service may validate the carrier configuration before saving the change.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Repeat back the warehouse ID, carrier code, and target activation state before calling.</description></item><item><description>Use explicit boolean text for isActive such as `true` or `false`.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouseId",
            "in": "path",
            "description": "The warehouse ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "carrierCode",
            "in": "path",
            "description": "The carrier code to edit.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isActive",
            "in": "query",
            "description": "The target active status for the carrier integration, provided as a query parameter.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the carrier integration was edited successfully."
          },
          "400": {
            "description": "The carrier integration could not be edited.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to modify this warehouse.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouse": {
      "put": {
        "tags": [
          "Warehouse"
        ],
        "summary": "Creates a new warehouse or submits a warehouse-creation request.",
        "description": "If the caller has <b>The Boss</b> authorization, a new warehouse is created directly and its new warehouse ID is returned.\r\nOtherwise, a request is submitted as feedback for internal review.\r\n\r\n<b>Behavior</b><list type=\"bullet\"><item><description><b>Direct create:</b> returns the new warehouse ID when authorized.</description></item><item><description><b>Request flow:</b> sends a structured feedback/request message when the caller is not authorized to create directly.</description></item></list>\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Require explicit confirmation of all address attributes before calling.</description></item></list>\r\nExample request body:```\r\n{\r\n  \"name\": \"New Warehouse\",\r\n  \"address1\": \"123 Example St\",\r\n  \"address2\": \"Unit 4\",\r\n  \"city\": \"Toronto\",\r\n  \"province\": \"ON\",\r\n  \"postalcode\": \"M5V 2T6\",\r\n  \"country\": \"CA\"\r\n}\r\n```",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner making the request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The address information for the new warehouse.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWarehouseInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWarehouseInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWarehouseInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWarehouseInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new warehouse ID if created directly, or the result of the feedback/request submission.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to create a warehouse.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Warehouses": {
      "get": {
        "tags": [
          "Warehouses"
        ],
        "summary": "Gets a list of warehouses for the partner application.",
        "description": "Retrieves all warehouses associated with the specified partner application ID.\r\nUse a returned warehouse ID with `GET V4/Partner/{routeApplicationId}/Warehouse/{warehouseId}` before warehouse-specific operations.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Summarize warehouse IDs, names, and locations; pick one ID before warehouse-scoped writes.</description></item><item><description>Admins must pass the target partner ID in the route, not HQ (`2` / `FGDCT3037`).</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The partner application ID. Admins must pass the target partner ID, not HQ (`2` / `FGDCT3037`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of warehouses.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Warehouse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": true,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Workflow/Projects": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Lists all active (non-archived) workflow projects for the partner.",
        "description": "Primary entry point for agents to discover ongoing work and resume complex tasks.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of project summaries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowProjectSummary"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Workflow/Project/{projectId}": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Gets a single active (non-archived) workflow project, including ordered tasks and associated attachments.",
        "description": "Use to restore full context for a complex task: what was decided and what remains.\r\nWorkflow file attachments are managed through shared attachment storage rather than embedded workflow storage.\r\nAttachments associated to the workflow project or its tasks are reflected in the returned objects.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "The workflow project ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project with its tasks and associated attachments.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowProject"
                }
              }
            }
          },
          "400": {
            "description": "Validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Updates an existing active (non-archived) workflow project (tasks are managed via separate endpoints).",
        "description": "Use this to adjust project metadata (title/description/owners/etc.) while keeping the task history intact.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "The workflow project ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Project update payload.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowProjectInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowProjectInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowProjectInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowProjectInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if the update succeeded."
          },
          "400": {
            "description": "Validation error.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Workflow"
        ],
        "summary": "Archives a workflow project (archived projects are hidden from all read endpoints).",
        "description": "\r\n<b>AI Agent safety</b>: Archiving removes the project from normal visibility. Require explicit confirmation before calling.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "The workflow project ID to archive.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the project was archived."
          },
          "400": {
            "description": "Validation error.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Workflow/Project": {
      "put": {
        "tags": [
          "Workflow"
        ],
        "summary": "Creates a workflow project to persist and track multi-step work over time.",
        "description": "Prefer creating a project whenever the task has multiple steps, requires follow-up, or needs durable state.\r\n\r\n<b>Best Practices for Agents</b><list type=\"bullet\"><item><description>Cite the filename in the project description when the project is based on a file (image, spreadsheet, PDF, etc.).</description></item><item><description>List all data points extracted from the file (for example: “7 SKUs found in the shipment notice”) to prevent context loss in future sessions.</description></item><item><description>If the source file should remain attached to the project, upload it through the shared attachment upload endpoint, then register it through a workflow-specific attachment registration endpoint when one is available. It will then appear in the returned project attachment collection.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Project creation payload.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowProjectInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowProjectInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowProjectInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowProjectInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowProject"
                }
              }
            }
          },
          "400": {
            "description": "Validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Workflow/Project/{projectId}/Log": {
      "put": {
        "tags": [
          "Workflow"
        ],
        "summary": "Inserts a workflow project log entry for timeline/audit visibility.",
        "description": "Intended for lightweight progress notes and decisions tied to a specific workflow project.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "The workflow project ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "message",
            "in": "query",
            "description": "The log message to append.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the log entry was inserted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "Validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Workflow/Project/{projectId}/Task": {
      "put": {
        "tags": [
          "Workflow"
        ],
        "summary": "Creates a new task within a workflow project (the primary way to store progress).",
        "description": "This is the main persistence primitive for AI agents: each task represents a checkpoint that can be revisited later.\r\n\r\n<b>AI Agent Instructions</b><list type=\"bullet\"><item><description><b>Assignee guidance:</b> For every task created, set an `Assignee` whenever possible. It is not mandatory, but it is strongly recommended for ownership clarity. To choose an assignee, look at `GET V4/Partner/{routeApplicationId}/Users` and `GET V4/Partner/{routeApplicationId}/Users/RandmarTeam`. If the task should be completed by Randmar Assistant, automation, internal systems, or background workers, set the `Assignee` to `Randmar Assistant`.</description></item><item><description>When the task references multiple identifiers (SKUs, order numbers, etc.), include the full explicit list in `input.Details` (not “all items”).</description></item><item><description>Attach task-specific source/outputs by uploading through the shared attachment upload endpoint, then registering through a workflow-specific attachment registration endpoint when one is available. They will then appear in the returned task attachment collection. Cite filenames in `input.Details` / `input.ResultText`.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "The workflow project ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Task creation payload.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowTaskInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowTaskInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowTaskInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowTaskInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created task.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowTask"
                }
              }
            }
          },
          "400": {
            "description": "Validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Workflow/Project/{projectId}/Task/{taskId}": {
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Updates a workflow task (status, notes, assignments, due dates, etc.).",
        "description": "Use task updates to persist decisions and progress so the workflow can be resumed later without loss of context.\r\n\r\n<b>AI Agent guidance</b><list type=\"bullet\"><item><description>Ensure each task has a meaningful `Assignee` whenever possible. It is not mandatory, but it is strongly recommended. To choose an assignee, look at `GET V4/Partner/{routeApplicationId}/Users` and `GET V4/Partner/{routeApplicationId}/Users/RandmarTeam`.</description></item><item><description>If the task is intended to be completed by Randmar Assistant, automation, internal systems, or background workers, set the `Assignee` to `Randmar Assistant`.</description></item></list>",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "The workflow project ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "The workflow task ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Task update payload.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowTaskInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowTaskInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowTaskInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowTaskInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated task.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowTask"
                }
              }
            }
          },
          "400": {
            "description": "Validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      },
      "delete": {
        "tags": [
          "Workflow"
        ],
        "summary": "Deletes a workflow task.",
        "description": "\r\n<b>AI Agent safety</b>: Deleting removes stored progress/history. Require explicit confirmation before calling.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "The workflow project ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "The workflow task ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "True if the task was deleted."
          },
          "400": {
            "description": "Validation error.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Workflow/AssistantTask": {
      "put": {
        "tags": [
          "Workflow"
        ],
        "summary": "Asks the background assistant to process the workflows.",
        "description": "Queues an AssistantTask job for the route application; success does not mean workflows have finished processing. Current authorization requires internal validation and explicitly rejects callers with The Boss authorization. HQ cannot be used as the target.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "Partner application whose workflows the queued assistant should process.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON true: the background job was created."
          },
          "400": {
            "description": "HQ target or unsuccessful job creation."
          },
          "401": {
            "description": "Internal validation failed, or the caller has The Boss authorization."
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Workflow/Project/{projectId}/Task/{taskId}/StandardOperatingProcedure/{sopId}": {
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Attaches a SOP to a workflow task using the shared attachment endpoints.",
        "description": "The SOP markdown file is uploaded through shared attachment storage and registered to the workflow task.\r\nThis endpoint is a convenience wrapper around that shared attachment model.",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "The workflow project ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "description": "The workflow task ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sopId",
            "in": "path",
            "description": "The SOP file ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The SOP attachment was registered successfully."
          },
          "400": {
            "description": "Validation error.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden when SOP ID is outside the allowed SOP folder.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    },
    "/V4/Partner/{routeApplicationId}/Workflow/Project/{projectId}/Tasks/Reorder": {
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Reorders tasks within a workflow project.",
        "description": "Useful for keeping an execution plan readable as priorities change (the workflow remains revisitable and ordered).",
        "parameters": [
          {
            "name": "routeApplicationId",
            "in": "path",
            "description": "The application ID of the partner.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "description": "The workflow project ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Reorder payload.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderWorkflowTasksInput"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderWorkflowTasksInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderWorkflowTasksInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderWorkflowTasksInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "True if reordering succeeded."
          },
          "400": {
            "description": "Validation error.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "oauth2": [ ]
          }
        ],
        "x-allowed-for-chatbots": false,
        "x-involves-money": false,
        "x-involves-secrets": false
      }
    }
  },
  "components": {
    "schemas": {
      "AcademyResourceFile": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Account": {
        "type": "object",
        "properties": {
          "BillingInformation": {
            "$ref": "#/components/schemas/BillingInformation"
          },
          "Socials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountSocial"
            },
            "nullable": true
          },
          "Agencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgencyInfo"
            },
            "nullable": true
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentHeader"
            },
            "nullable": true
          },
          "About": {
            "type": "string",
            "nullable": true
          },
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "PublicName": {
            "type": "string",
            "nullable": true
          },
          "SceneName": {
            "type": "string",
            "nullable": true
          },
          "VoiceName": {
            "type": "string",
            "nullable": true
          },
          "VoiceStyle": {
            "type": "string",
            "nullable": true
          },
          "IsManufacturer": {
            "type": "boolean"
          },
          "IsReseller": {
            "type": "boolean"
          },
          "IsSalesAgency": {
            "type": "boolean"
          },
          "HasShopifyStore": {
            "type": "boolean"
          },
          "IsVendor": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "AccountSocial": {
        "type": "object",
        "properties": {
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "SocialNetwork": {
            "type": "string",
            "nullable": true
          },
          "Tag": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AdsPlatformStatus": {
        "type": "object",
        "properties": {
          "Platform": {
            "type": "string",
            "nullable": true
          },
          "IsLinked": {
            "type": "boolean"
          },
          "IsBilledThroughRandmar": {
            "type": "boolean"
          },
          "ReturnOnAdSpend": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "DailyBudget": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "CurrencyCode": {
            "type": "string",
            "nullable": true
          },
          "PerformanceStartDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "PerformanceEndDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AdsPlatformsStatus": {
        "type": "object",
        "properties": {
          "ShopifyHostName": {
            "type": "string",
            "nullable": true
          },
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "AdvertisingBudgetPerDay": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Platforms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdsPlatformStatus"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AgencyInfo": {
        "type": "object",
        "properties": {
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "PublicName": {
            "type": "string",
            "nullable": true
          },
          "Website": {
            "type": "string",
            "nullable": true
          },
          "ProgramPercentage": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "AttachmentHeader": {
        "type": "object",
        "properties": {
          "OriginalName": {
            "type": "string",
            "nullable": true
          },
          "ContentType": {
            "type": "string",
            "nullable": true
          },
          "SizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "UploaderID": {
            "type": "string",
            "nullable": true
          },
          "AssociatedGUID": {
            "type": "string",
            "nullable": true
          },
          "CreatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "AttachmentUUID": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AttachmentRequest": {
        "type": "object",
        "properties": {
          "FileName": {
            "type": "string",
            "nullable": true
          },
          "Url": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BillingInformation": {
        "type": "object",
        "properties": {
          "CreationDate": {
            "type": "number",
            "format": "double"
          },
          "Address1": {
            "type": "string",
            "nullable": true
          },
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "BillingName": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "nullable": true
          },
          "CurrencyCode": {
            "type": "string",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "nullable": true
          },
          "PriceList": {
            "type": "string",
            "nullable": true
          },
          "Province": {
            "type": "string",
            "nullable": true
          },
          "Address2": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BillingSummary": {
        "type": "object",
        "properties": {
          "Invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invoice"
            },
            "nullable": true
          },
          "Payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Payment"
            },
            "nullable": true
          },
          "StatementDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatementDetail"
            },
            "nullable": true
          },
          "Statement": {
            "$ref": "#/components/schemas/Statement"
          }
        },
        "additionalProperties": false
      },
      "CarrierIntegrationInput": {
        "type": "object",
        "properties": {
          "CarrierCode": {
            "type": "string",
            "nullable": true
          },
          "ClientId": {
            "type": "string",
            "nullable": true
          },
          "ClientSecret": {
            "type": "string",
            "nullable": true
          },
          "ShipperNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Cart": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "CreationDate": {
            "type": "string",
            "nullable": true
          },
          "Total": {
            "type": "number",
            "format": "double"
          },
          "TotalWeight": {
            "type": "number",
            "format": "double"
          },
          "PartNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            },
            "nullable": true
          },
          "HasOpportunities": {
            "type": "boolean"
          },
          "ShipTos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CartShipTo"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CartShipTo": {
        "type": "object",
        "properties": {
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress1": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress2": {
            "type": "string",
            "nullable": true
          },
          "ShipToCity": {
            "type": "string",
            "nullable": true
          },
          "ShipToProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "ShipToCountry": {
            "type": "string",
            "nullable": true
          },
          "ShippedCurrentMonth": {
            "type": "integer",
            "format": "int32"
          },
          "ShippedLastMonth": {
            "type": "integer",
            "format": "int32"
          },
          "ShippedLastLastMonth": {
            "type": "integer",
            "format": "int32"
          },
          "Shipped": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "ChatMessage": {
        "type": "object",
        "properties": {
          "Cursor": {
            "type": "string",
            "nullable": true
          },
          "MessageId": {
            "type": "integer",
            "format": "int32"
          },
          "Content": {
            "type": "string",
            "nullable": true
          },
          "SenderId": {
            "type": "string",
            "nullable": true
          },
          "SenderName": {
            "type": "string",
            "nullable": true
          },
          "SentDate": {
            "type": "string",
            "nullable": true
          },
          "Read": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "CompleteConversationObjectiveRequest": {
        "required": [
          "ExpectedObjective"
        ],
        "type": "object",
        "properties": {
          "Message": {
            "type": "string",
            "nullable": true
          },
          "StorageKey": {
            "type": "string",
            "nullable": true
          },
          "ExpectedObjective": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ContentSubset": {
        "type": "object",
        "properties": {
          "Parts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartSubset"
            },
            "nullable": true
          },
          "Role": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConversationHeader": {
        "required": [
          "Notes",
          "Objective"
        ],
        "type": "object",
        "properties": {
          "Objective": {
            "type": "string"
          },
          "Notes": {
            "type": "string"
          },
          "Participant": {
            "$ref": "#/components/schemas/Account"
          },
          "ConversationId": {
            "type": "integer",
            "format": "int32"
          },
          "Participant1": {
            "type": "string",
            "nullable": true
          },
          "Participant2": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "LastMessageTime": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConversationImageMessage": {
        "type": "object",
        "properties": {
          "ImageGuid": {
            "type": "string",
            "nullable": true
          },
          "MessageId": {
            "type": "integer",
            "format": "int32"
          },
          "Content": {
            "type": "string",
            "nullable": true
          },
          "SentDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ConversationLink": {
        "type": "object",
        "properties": {
          "LinkId": {
            "type": "string",
            "nullable": true
          },
          "URL": {
            "type": "string",
            "nullable": true
          },
          "Title": {
            "type": "string",
            "nullable": true
          },
          "CreationDate": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateLinkRequest": {
        "type": "object",
        "properties": {
          "Url": {
            "type": "string",
            "nullable": true
          },
          "Title": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateOpportunityInput": {
        "type": "object",
        "properties": {
          "BidNumber": {
            "type": "string",
            "nullable": true
          },
          "BidTitle": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "DefaultResellers": {
            "type": "string",
            "nullable": true
          },
          "StartDate": {
            "type": "string",
            "format": "date-time"
          },
          "EndDate": {
            "type": "string",
            "format": "date-time"
          },
          "QuoteOnly": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "CreatePartnerAssistantJobInput": {
        "type": "object",
        "properties": {
          "Prompt": {
            "type": "string",
            "nullable": true
          },
          "OwnerEmail": {
            "type": "string",
            "nullable": true
          },
          "Files": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "SopIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "WithAwaitingApproval": {
            "type": "boolean"
          },
          "scheduledTimeSecondsUTC": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "CreateRequisitionInput": {
        "type": "object",
        "properties": {
          "Location": {
            "type": "string",
            "nullable": true
          },
          "Reference": {
            "type": "string",
            "nullable": true
          },
          "PartNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequisitionPartNumber"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateWarehouseInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "address1": {
            "type": "string",
            "nullable": true
          },
          "address2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "province": {
            "type": "string",
            "nullable": true
          },
          "postalcode": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateWorkflowProjectInput": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/WorkflowProjectStatus"
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateWorkflowTaskInput"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateWorkflowTaskInput": {
        "type": "object",
        "properties": {
          "Title": {
            "type": "string",
            "nullable": true
          },
          "Details": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/WorkflowTaskStatus"
          },
          "Priority": {
            "$ref": "#/components/schemas/WorkflowTaskPriority"
          },
          "DueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Assignee": {
            "type": "string",
            "nullable": true
          },
          "ResultText": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Credit": {
        "type": "object",
        "properties": {
          "ShipToAddress1": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress2": {
            "type": "string",
            "nullable": true
          },
          "ShipToCity": {
            "type": "string",
            "nullable": true
          },
          "ShipToProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "ShipToCountry": {
            "type": "string",
            "nullable": true
          },
          "SubTotal": {
            "type": "number",
            "format": "double"
          },
          "Total": {
            "type": "number",
            "format": "double"
          },
          "Payed": {
            "type": "boolean"
          },
          "ExtendedPrice": {
            "type": "number",
            "format": "double"
          },
          "QuantityBackOrder": {
            "type": "number",
            "format": "double"
          },
          "QuantityOrdered": {
            "type": "number",
            "format": "double"
          },
          "QuantityShipped": {
            "type": "number",
            "format": "double"
          },
          "TaxAmount1": {
            "type": "number",
            "format": "double"
          },
          "TaxAmount2": {
            "type": "number",
            "format": "double"
          },
          "TaxRate1": {
            "type": "number",
            "format": "double"
          },
          "TaxRate2": {
            "type": "number",
            "format": "double"
          },
          "UnitPrice": {
            "type": "number",
            "format": "double"
          },
          "UnitWeight": {
            "type": "number",
            "format": "double"
          },
          "CreditDate": {
            "type": "integer",
            "format": "int32"
          },
          "InvoiceDate": {
            "type": "integer",
            "format": "int32"
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "CreditNumber": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "InvoiceNumber": {
            "type": "string",
            "nullable": true
          },
          "LineType": {
            "type": "string",
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerPartNumber": {
            "type": "string",
            "nullable": true
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ReturnType": {
            "type": "string",
            "nullable": true
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CustomerAddress": {
        "type": "object",
        "properties": {
          "ShipToAddress1": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress2": {
            "type": "string",
            "nullable": true
          },
          "ShipToCity": {
            "type": "string",
            "nullable": true
          },
          "ShipToProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipToPostalCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CustomerDetails": {
        "type": "object",
        "properties": {
          "ShipName": {
            "type": "string",
            "nullable": true
          },
          "InvoicedProducts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerProductInvoice"
            },
            "nullable": true
          },
          "OrderedProducts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            },
            "nullable": true
          },
          "OnShipmentProducts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerProductShipment"
            },
            "nullable": true
          },
          "Invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invoice"
            },
            "nullable": true
          },
          "Addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerAddress"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CustomerProductInvoice": {
        "type": "object",
        "properties": {
          "InvoiceNumber": {
            "type": "string",
            "nullable": true
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "LineType": {
            "type": "string",
            "nullable": true
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "QuantityShipped": {
            "type": "number",
            "format": "double"
          },
          "UnitPrice": {
            "type": "number",
            "format": "double"
          },
          "ExtendedPrice": {
            "type": "number",
            "format": "double"
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "QuantityBackOrder": {
            "type": "number",
            "format": "double"
          },
          "QuantityOrdered": {
            "type": "number",
            "format": "double"
          },
          "TaxAmount1": {
            "type": "number",
            "format": "double"
          },
          "TaxAmount2": {
            "type": "number",
            "format": "double"
          },
          "TaxRate1": {
            "type": "number",
            "format": "double"
          },
          "TaxRate2": {
            "type": "number",
            "format": "double"
          },
          "ManufacturerPartNumber": {
            "type": "string",
            "nullable": true
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "InvoiceDate": {
            "type": "number",
            "format": "double"
          },
          "UnitWeight": {
            "type": "number",
            "format": "double"
          },
          "OrderDate": {
            "type": "number",
            "format": "double"
          },
          "ShipToCountry": {
            "type": "string",
            "nullable": true
          },
          "ShipToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "ShipToProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipToCity": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress1": {
            "type": "string",
            "nullable": true
          },
          "CompletionDate": {
            "type": "number",
            "format": "double"
          },
          "OpportunityManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "OpportunityManufacturerNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CustomerProductShipment": {
        "type": "object",
        "properties": {
          "ShipmentNumber": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "QuantityShipped": {
            "type": "number",
            "format": "double"
          },
          "UnitPrice": {
            "type": "number",
            "format": "double"
          },
          "ExtendedPrice": {
            "type": "number",
            "format": "double"
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "QuantityBackOrder": {
            "type": "number",
            "format": "double"
          },
          "QuantityOrdered": {
            "type": "number",
            "format": "double"
          },
          "ManufacturerPartNumber": {
            "type": "string",
            "nullable": true
          },
          "UnitWeight": {
            "type": "number",
            "format": "double"
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "ShipmentDate": {
            "type": "number",
            "format": "double"
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "OpportunityManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "OpportunityManufacturerNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Distribution": {
        "type": "object",
        "properties": {
          "ExchangeRate": {
            "type": "number",
            "format": "double"
          },
          "MAP": {
            "type": "number",
            "format": "double"
          },
          "MSRP": {
            "type": "number",
            "format": "double"
          },
          "Price": {
            "type": "number",
            "format": "double"
          },
          "RegularPrice": {
            "type": "number",
            "format": "double"
          },
          "Cost": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Inventory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Inventory"
            },
            "nullable": true
          },
          "Currency": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EntranceFeeCheckoutRequest": {
        "type": "object",
        "properties": {
          "Email": {
            "type": "string",
            "nullable": true
          },
          "PromoCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EntranceFeeCheckoutResponse": {
        "type": "object",
        "properties": {
          "SessionUrl": {
            "type": "string",
            "nullable": true
          },
          "ResellerActivatedViaPromoCode": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "FileData": {
        "type": "object",
        "properties": {
          "MimeType": {
            "type": "string",
            "nullable": true
          },
          "FileUri": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GeneralDocument": {
        "type": "object",
        "properties": {
          "OrderHeaders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderHeader"
            },
            "nullable": true
          },
          "ShipmentHeaders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShipmentHeader"
            },
            "nullable": true
          },
          "InvoiceHeaders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceHeader"
            },
            "nullable": true
          },
          "ActiveOrderDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDetail"
            },
            "nullable": true
          },
          "CompletedOrderDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDetail"
            },
            "nullable": true
          },
          "Logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogEntry"
            },
            "nullable": true
          },
          "Reseller": {
            "$ref": "#/components/schemas/Reseller"
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "OrderDate": {
            "type": "string",
            "format": "date-time"
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "EndUserPO": {
            "type": "string",
            "nullable": true
          },
          "ShipName": {
            "type": "string",
            "nullable": true
          },
          "ShipAddress1": {
            "type": "string",
            "nullable": true
          },
          "ShipAddress2": {
            "type": "string",
            "nullable": true
          },
          "ShipAddress3": {
            "type": "string",
            "nullable": true
          },
          "ShipAddress4": {
            "type": "string",
            "nullable": true
          },
          "ShipCity": {
            "type": "string",
            "nullable": true
          },
          "ShipProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipZip": {
            "type": "string",
            "nullable": true
          },
          "ShipCountry": {
            "type": "string",
            "nullable": true
          },
          "ShipToLocationCode": {
            "type": "string",
            "nullable": true
          },
          "ShipPhone": {
            "type": "string",
            "nullable": true
          },
          "ShipContact": {
            "type": "string",
            "nullable": true
          },
          "ShipEmail": {
            "type": "string",
            "nullable": true
          },
          "ShipWebsite": {
            "type": "string",
            "nullable": true
          },
          "ShipViaCode": {
            "type": "string",
            "nullable": true
          },
          "Comment": {
            "type": "string",
            "nullable": true
          },
          "AllowPartialShipment": {
            "type": "boolean"
          },
          "TransportCharges": {
            "type": "number",
            "format": "double"
          },
          "ShipmentDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ShippingSlipComment": {
            "type": "string",
            "nullable": true
          },
          "Imported": {
            "type": "boolean"
          },
          "TrackingNumber": {
            "type": "string",
            "nullable": true
          },
          "EnteredBy": {
            "type": "string",
            "nullable": true
          },
          "Completed": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GeneralDocumentOld": {
        "type": "object",
        "properties": {
          "OrderDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            },
            "nullable": true
          },
          "ShipmentDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Shipment"
            },
            "nullable": true
          },
          "OrderCharges": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "ShipmentCharges": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "InvoiceDetails": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "InvoiceCharges": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "ReturnDetails": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "CreditDetails": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "CreditCharges": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "OrderHeaders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderHeader"
            },
            "nullable": true
          },
          "ShipmentHeaders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShipmentHeader"
            },
            "nullable": true
          },
          "InvoiceHeaders": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "CreditHeaders": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "Logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogEntry"
            },
            "nullable": true
          },
          "SubTotal": {
            "type": "number",
            "format": "double"
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "DefaultLocationCode": {
            "type": "string",
            "nullable": true
          },
          "OrderDate": {
            "type": "string",
            "format": "date-time"
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "EndUserPO": {
            "type": "string",
            "nullable": true
          },
          "ShipName": {
            "type": "string",
            "nullable": true
          },
          "ShipAddress1": {
            "type": "string",
            "nullable": true
          },
          "ShipAddress2": {
            "type": "string",
            "nullable": true
          },
          "ShipAddress3": {
            "type": "string",
            "nullable": true
          },
          "ShipAddress4": {
            "type": "string",
            "nullable": true
          },
          "ShipCity": {
            "type": "string",
            "nullable": true
          },
          "ShipProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipZip": {
            "type": "string",
            "nullable": true
          },
          "ShipCountry": {
            "type": "string",
            "nullable": true
          },
          "ShipToLocationCode": {
            "type": "string",
            "nullable": true
          },
          "ShipPhone": {
            "type": "string",
            "nullable": true
          },
          "ShipContact": {
            "type": "string",
            "nullable": true
          },
          "ShipEmail": {
            "type": "string",
            "nullable": true
          },
          "ShipWebsite": {
            "type": "string",
            "nullable": true
          },
          "ShipViaCode": {
            "type": "string",
            "nullable": true
          },
          "Comment": {
            "type": "string",
            "nullable": true
          },
          "UserIPAddress": {
            "type": "string",
            "nullable": true
          },
          "AllowPartialShipment": {
            "type": "boolean"
          },
          "TransportCharges": {
            "type": "number",
            "format": "double"
          },
          "ShipmentDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ShippingSlipComment": {
            "type": "string",
            "nullable": true
          },
          "Imported": {
            "type": "boolean"
          },
          "TrackingNumber": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "BidNumber": {
            "type": "string",
            "nullable": true
          },
          "EnteredBy": {
            "type": "string",
            "nullable": true
          },
          "Completed": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GenerateGoogleGroundedTextBody": {
        "type": "object",
        "properties": {
          "Contents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentSubset"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GenerateImageBody": {
        "type": "object",
        "properties": {
          "Contents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentSubset"
            },
            "nullable": true
          },
          "AspectRatio": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GenerateVideoBody": {
        "type": "object",
        "properties": {
          "Contents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentSubset"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GeneratedImage": {
        "type": "object",
        "properties": {
          "MimeType": {
            "type": "string",
            "nullable": true
          },
          "Base64Data": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GeneratedImageUrl": {
        "type": "object",
        "properties": {
          "MimeType": {
            "type": "string",
            "nullable": true
          },
          "FileUri": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GeneratedVideo": {
        "type": "object",
        "properties": {
          "MimeType": {
            "type": "string",
            "nullable": true
          },
          "Base64Data": {
            "type": "string",
            "nullable": true
          },
          "FileUri": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GenerationResult": {
        "type": "object",
        "properties": {
          "Content": {
            "$ref": "#/components/schemas/ContentSubset"
          },
          "ContextUtilization": {
            "type": "number",
            "format": "float"
          }
        },
        "additionalProperties": false
      },
      "GetMessagesResponse": {
        "type": "object",
        "properties": {
          "HasUnreads": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsAccountDetails": {
        "type": "object",
        "properties": {
          "ResourceName": {
            "type": "string",
            "nullable": true
          },
          "Id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "DescriptiveName": {
            "type": "string",
            "nullable": true
          },
          "CurrencyCode": {
            "type": "string",
            "nullable": true
          },
          "TimeZone": {
            "type": "string",
            "nullable": true
          },
          "Manager": {
            "type": "boolean"
          },
          "TestAccount": {
            "type": "boolean"
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "AutoTaggingEnabled": {
            "type": "boolean"
          },
          "TrackingUrlTemplate": {
            "type": "string",
            "nullable": true
          },
          "FinalUrlSuffix": {
            "type": "string",
            "nullable": true
          },
          "OptimizationScore": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "ConversionTrackingStatus": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsAccountOverview": {
        "type": "object",
        "properties": {
          "CustomerId": {
            "type": "string",
            "nullable": true
          },
          "Account": {
            "$ref": "#/components/schemas/GoogleAdsAccountDetails"
          },
          "Invitation": {
            "$ref": "#/components/schemas/GoogleAdsManagerInvitationStatus"
          },
          "Performance": {
            "$ref": "#/components/schemas/GoogleAdsPerformanceSummary"
          },
          "TotalCampaigns": {
            "type": "integer",
            "format": "int32"
          },
          "EnabledCampaigns": {
            "type": "integer",
            "format": "int32"
          },
          "PausedCampaigns": {
            "type": "integer",
            "format": "int32"
          },
          "RemovedCampaigns": {
            "type": "integer",
            "format": "int32"
          },
          "PerformanceMaxCampaigns": {
            "type": "integer",
            "format": "int32"
          },
          "SearchCampaigns": {
            "type": "integer",
            "format": "int32"
          },
          "HasApprovedBillingSetup": {
            "type": "boolean"
          },
          "HasPendingBillingSetup": {
            "type": "boolean"
          },
          "BillingSetups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleAdsBillingSetup"
            },
            "nullable": true
          },
          "Recommendations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleAdsRecommendation"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsApiError": {
        "type": "object",
        "properties": {
          "ErrorType": {
            "type": "string",
            "nullable": true
          },
          "ErrorCode": {
            "type": "string",
            "nullable": true
          },
          "Message": {
            "type": "string",
            "nullable": true
          },
          "Trigger": {
            "type": "string",
            "nullable": true
          },
          "FieldPath": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsAssetDetails": {
        "type": "object",
        "properties": {
          "AssetResourceName": {
            "type": "string",
            "nullable": true
          },
          "AssetId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Type": {
            "type": "string",
            "nullable": true
          },
          "Text": {
            "type": "string",
            "nullable": true
          },
          "ImageUrl": {
            "type": "string",
            "nullable": true
          },
          "ImageWidthPixels": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "ImageHeightPixels": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "ImageMimeType": {
            "type": "string",
            "nullable": true
          },
          "YouTubeVideoId": {
            "type": "string",
            "nullable": true
          },
          "YouTubeVideoTitle": {
            "type": "string",
            "nullable": true
          },
          "Placements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleAdsAssetGroupAsset"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsAssetGroup": {
        "type": "object",
        "properties": {
          "CampaignId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "CampaignName": {
            "type": "string",
            "nullable": true
          },
          "ResourceName": {
            "type": "string",
            "nullable": true
          },
          "Id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "PrimaryStatus": {
            "type": "string",
            "nullable": true
          },
          "PrimaryStatusReasons": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "AdStrength": {
            "type": "string",
            "nullable": true
          },
          "FinalUrls": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "FinalMobileUrls": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "Path1": {
            "type": "string",
            "nullable": true
          },
          "Path2": {
            "type": "string",
            "nullable": true
          },
          "Performance": {
            "$ref": "#/components/schemas/GoogleAdsPerformanceSummary"
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsAssetGroupAsset": {
        "type": "object",
        "properties": {
          "CampaignId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "CampaignName": {
            "type": "string",
            "nullable": true
          },
          "AssetGroupId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "AssetGroupName": {
            "type": "string",
            "nullable": true
          },
          "LinkResourceName": {
            "type": "string",
            "nullable": true
          },
          "AssetResourceName": {
            "type": "string",
            "nullable": true
          },
          "AssetId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "AssetName": {
            "type": "string",
            "nullable": true
          },
          "AssetType": {
            "type": "string",
            "nullable": true
          },
          "FieldType": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "PrimaryStatus": {
            "type": "string",
            "nullable": true
          },
          "PrimaryStatusReasons": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "Source": {
            "type": "string",
            "nullable": true
          },
          "PolicyApprovalStatus": {
            "type": "string",
            "nullable": true
          },
          "PolicyReviewStatus": {
            "type": "string",
            "nullable": true
          },
          "Text": {
            "type": "string",
            "nullable": true
          },
          "ImageUrl": {
            "type": "string",
            "nullable": true
          },
          "ImageWidthPixels": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "ImageHeightPixels": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "ImageMimeType": {
            "type": "string",
            "nullable": true
          },
          "YouTubeVideoId": {
            "type": "string",
            "nullable": true
          },
          "YouTubeVideoTitle": {
            "type": "string",
            "nullable": true
          },
          "Performance": {
            "$ref": "#/components/schemas/GoogleAdsPerformanceSummary"
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsBillingSetup": {
        "type": "object",
        "properties": {
          "ResourceName": {
            "type": "string",
            "nullable": true
          },
          "Id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "PaymentsAccount": {
            "type": "string",
            "nullable": true
          },
          "PaymentsAccountId": {
            "type": "string",
            "nullable": true
          },
          "PaymentsAccountName": {
            "type": "string",
            "nullable": true
          },
          "PaymentsProfileId": {
            "type": "string",
            "nullable": true
          },
          "PaymentsProfileName": {
            "type": "string",
            "nullable": true
          },
          "SecondaryPaymentsProfileId": {
            "type": "string",
            "nullable": true
          },
          "StartDateTime": {
            "type": "string",
            "nullable": true
          },
          "EndDateTime": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsCampaign": {
        "type": "object",
        "properties": {
          "ResourceName": {
            "type": "string",
            "nullable": true
          },
          "Id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "ServingStatus": {
            "type": "string",
            "nullable": true
          },
          "AdvertisingChannelType": {
            "type": "string",
            "nullable": true
          },
          "AdvertisingChannelSubType": {
            "type": "string",
            "nullable": true
          },
          "StartDateTime": {
            "type": "string",
            "nullable": true
          },
          "EndDateTime": {
            "type": "string",
            "nullable": true
          },
          "CampaignBudget": {
            "type": "string",
            "nullable": true
          },
          "OptimizationScore": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "DailyBudget": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "BiddingStrategyType": {
            "type": "string",
            "nullable": true
          },
          "BudgetDeliveryMethod": {
            "type": "string",
            "nullable": true
          },
          "MerchantCenterId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "FeedLabel": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsCampaignDetails": {
        "type": "object",
        "properties": {
          "Campaign": {
            "$ref": "#/components/schemas/GoogleAdsCampaign"
          },
          "Performance": {
            "$ref": "#/components/schemas/GoogleAdsPerformanceSummary"
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsCampaignPerformanceReport": {
        "type": "object",
        "properties": {
          "Campaign": {
            "$ref": "#/components/schemas/GoogleAdsCampaign"
          },
          "Summary": {
            "$ref": "#/components/schemas/GoogleAdsPerformanceSummary"
          },
          "Daily": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleAdsPerformancePoint"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsCampaignStatusMutationResult": {
        "type": "object",
        "properties": {
          "CampaignResourceName": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "ValidateOnly": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsConversionPerformance": {
        "type": "object",
        "properties": {
          "ConversionActionResourceName": {
            "type": "string",
            "nullable": true
          },
          "ConversionActionName": {
            "type": "string",
            "nullable": true
          },
          "ConversionActionCategory": {
            "type": "string",
            "nullable": true
          },
          "Conversions": {
            "type": "number",
            "format": "double"
          },
          "ConversionsValue": {
            "type": "number",
            "format": "double"
          },
          "AllConversions": {
            "type": "number",
            "format": "double"
          },
          "AllConversionsValue": {
            "type": "number",
            "format": "double"
          },
          "ValuePerConversion": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsManagerInvitationStatus": {
        "type": "object",
        "properties": {
          "CustomerId": {
            "type": "string",
            "nullable": true
          },
          "HasLink": {
            "type": "boolean"
          },
          "IsPending": {
            "type": "boolean"
          },
          "IsAccepted": {
            "type": "boolean"
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "ManagerLinkId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "ResourceName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsMutationFailure": {
        "type": "object",
        "properties": {
          "Message": {
            "type": "string",
            "nullable": true
          },
          "CustomerId": {
            "type": "string",
            "nullable": true
          },
          "Operation": {
            "type": "string",
            "nullable": true
          },
          "ValidateOnly": {
            "type": "boolean"
          },
          "RpcStatusCode": {
            "type": "string",
            "nullable": true
          },
          "RpcStatusDetail": {
            "type": "string",
            "nullable": true
          },
          "RequestId": {
            "type": "string",
            "nullable": true
          },
          "Errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleAdsApiError"
            },
            "nullable": true
          },
          "RawGoogleAdsFailure": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsPerformancePoint": {
        "type": "object",
        "properties": {
          "Date": {
            "type": "string",
            "format": "date"
          },
          "Impressions": {
            "type": "integer",
            "format": "int64"
          },
          "Clicks": {
            "type": "integer",
            "format": "int64"
          },
          "CostMicros": {
            "type": "integer",
            "format": "int64"
          },
          "ClickThroughRate": {
            "type": "number",
            "format": "double"
          },
          "AverageCpcMicros": {
            "type": "number",
            "format": "double"
          },
          "Conversions": {
            "type": "number",
            "format": "double"
          },
          "ConversionsValue": {
            "type": "number",
            "format": "double"
          },
          "AllConversions": {
            "type": "number",
            "format": "double"
          },
          "CostPerConversionMicros": {
            "type": "number",
            "format": "double"
          },
          "ReturnOnAdSpend": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsPerformanceSummary": {
        "type": "object",
        "properties": {
          "StartDate": {
            "type": "string",
            "format": "date"
          },
          "EndDate": {
            "type": "string",
            "format": "date"
          },
          "Impressions": {
            "type": "integer",
            "format": "int64"
          },
          "Clicks": {
            "type": "integer",
            "format": "int64"
          },
          "CostMicros": {
            "type": "integer",
            "format": "int64"
          },
          "ClickThroughRate": {
            "type": "number",
            "format": "double"
          },
          "AverageCpcMicros": {
            "type": "number",
            "format": "double"
          },
          "Conversions": {
            "type": "number",
            "format": "double"
          },
          "ConversionsValue": {
            "type": "number",
            "format": "double"
          },
          "AllConversions": {
            "type": "number",
            "format": "double"
          },
          "CostPerConversionMicros": {
            "type": "number",
            "format": "double"
          },
          "ReturnOnAdSpend": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsRecommendation": {
        "type": "object",
        "properties": {
          "ResourceName": {
            "type": "string",
            "nullable": true
          },
          "Type": {
            "type": "string",
            "nullable": true
          },
          "Dismissed": {
            "type": "boolean"
          },
          "Campaign": {
            "type": "string",
            "nullable": true
          },
          "AdGroup": {
            "type": "string",
            "nullable": true
          },
          "CampaignBudget": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GoogleAdsSetCampaignPausedRequest": {
        "type": "object",
        "properties": {
          "IsPaused": {
            "type": "boolean"
          },
          "ValidateOnly": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ImageGenerationResult": {
        "type": "object",
        "properties": {
          "Text": {
            "type": "string",
            "nullable": true
          },
          "Images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GeneratedImage"
            },
            "nullable": true
          },
          "ContextUtilization": {
            "type": "number",
            "format": "float"
          }
        },
        "additionalProperties": false
      },
      "ImageUrlGenerationResult": {
        "type": "object",
        "properties": {
          "Text": {
            "type": "string",
            "nullable": true
          },
          "Images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GeneratedImageUrl"
            },
            "nullable": true
          },
          "ContextUtilization": {
            "type": "number",
            "format": "float"
          }
        },
        "additionalProperties": false
      },
      "InsertProductInput": {
        "type": "object",
        "properties": {
          "UPC": {
            "type": "string",
            "nullable": true
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "MPN": {
            "type": "string",
            "nullable": true
          },
          "Title": {
            "type": "string",
            "nullable": true
          },
          "StandardCost": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "UnitWeight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "MasterCarton": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "SkidQuantity": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "BodyHTML": {
            "type": "string",
            "nullable": true
          },
          "MAP": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "MSRP": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InstantRebateInput": {
        "type": "object",
        "properties": {
          "Rebate": {
            "type": "number",
            "format": "double"
          },
          "StartDate": {
            "type": "string",
            "format": "date-time"
          },
          "EndDate": {
            "type": "string",
            "format": "date-time"
          },
          "PromotionId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "IntegrationKey": {
        "type": "object",
        "properties": {
          "KeyName": {
            "type": "string",
            "nullable": true
          },
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "ExpirationDate": {
            "type": "string",
            "format": "date-time"
          },
          "LastAuthentication": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Inventory": {
        "type": "object",
        "properties": {
          "AvailableQuantity": {
            "type": "integer",
            "format": "int32"
          },
          "PurchaseOrderQuantity": {
            "type": "integer",
            "format": "int32"
          },
          "BinLocation": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Province": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "WarehouseId": {
            "type": "string",
            "nullable": true
          },
          "WarehouseType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InventoryValueEntry": {
        "type": "object",
        "properties": {
          "Location": {
            "type": "string",
            "nullable": true
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "InventoryValue": {
            "type": "number",
            "format": "double"
          },
          "SalesOrderValue": {
            "type": "number",
            "format": "double"
          },
          "PurchaseOrderValue": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "Invoice": {
        "type": "object",
        "properties": {
          "Payed": {
            "type": "boolean"
          },
          "AmountDue": {
            "type": "number",
            "format": "double"
          },
          "ExtendedPrice": {
            "type": "number",
            "format": "double"
          },
          "QuantityBackOrder": {
            "type": "number",
            "format": "double"
          },
          "QuantityOrdered": {
            "type": "number",
            "format": "double"
          },
          "QuantityShipped": {
            "type": "number",
            "format": "double"
          },
          "SubTotal": {
            "type": "number",
            "format": "double"
          },
          "TaxAmount1": {
            "type": "number",
            "format": "double"
          },
          "TaxAmount2": {
            "type": "number",
            "format": "double"
          },
          "TaxRate1": {
            "type": "number",
            "format": "double"
          },
          "TaxRate2": {
            "type": "number",
            "format": "double"
          },
          "Total": {
            "type": "number",
            "format": "double"
          },
          "UnitPrice": {
            "type": "number",
            "format": "double"
          },
          "UnitWeight": {
            "type": "number",
            "format": "double"
          },
          "CompletionDate": {
            "type": "integer",
            "format": "int32"
          },
          "InvoiceDate": {
            "type": "integer",
            "format": "int32"
          },
          "NumberOfLines": {
            "type": "integer",
            "format": "int32"
          },
          "OrderDate": {
            "type": "integer",
            "format": "int32"
          },
          "ShippingDate": {
            "type": "integer",
            "format": "int32"
          },
          "TheoreticalWeight": {
            "type": "integer",
            "format": "int32"
          },
          "BidNumber": {
            "type": "string",
            "nullable": true
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "Comments": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "EndUserPONumber": {
            "type": "string",
            "nullable": true
          },
          "InvoiceNumber": {
            "type": "string",
            "nullable": true
          },
          "LineType": {
            "type": "string",
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerPartNumber": {
            "type": "string",
            "nullable": true
          },
          "OpportunityManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "OpportunityManufacturerNumber": {
            "type": "string",
            "nullable": true
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "PaymentStatus": {
            "type": "string",
            "nullable": true
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ShipmentNumber": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress1": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress2": {
            "type": "string",
            "nullable": true
          },
          "ShipToCity": {
            "type": "string",
            "nullable": true
          },
          "ShipToContactName": {
            "type": "string",
            "nullable": true
          },
          "ShipToContactPhone": {
            "type": "string",
            "nullable": true
          },
          "ShipToCountry": {
            "type": "string",
            "nullable": true
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "ShipToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "ShipToProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipVia": {
            "type": "string",
            "nullable": true
          },
          "Terms": {
            "type": "string",
            "nullable": true
          },
          "TrackingNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InvoiceHeader": {
        "type": "object",
        "properties": {
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "ShipmentNumber": {
            "type": "string",
            "nullable": true
          },
          "InvoiceNumber": {
            "type": "string",
            "nullable": true
          },
          "Payed": {
            "type": "boolean"
          },
          "AmountDue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "AmountDueDate": {
            "type": "integer",
            "format": "int32"
          },
          "InvoiceDate": {
            "type": "integer",
            "format": "int32"
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "OrderDate": {
            "type": "integer",
            "format": "int32"
          },
          "ShippingDate": {
            "type": "integer",
            "format": "int32"
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "EndUserPONumber": {
            "type": "string",
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress1": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress2": {
            "type": "string",
            "nullable": true
          },
          "ShipToCity": {
            "type": "string",
            "nullable": true
          },
          "ShipToProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "ShipToCountry": {
            "type": "string",
            "nullable": true
          },
          "ShipVia": {
            "type": "string",
            "nullable": true
          },
          "TrackingNumber": {
            "type": "string",
            "nullable": true
          },
          "SubTotal": {
            "type": "number",
            "format": "double"
          },
          "TheoreticalWeight": {
            "type": "number",
            "format": "double"
          },
          "Total": {
            "type": "number",
            "format": "double"
          },
          "Comments": {
            "type": "string",
            "nullable": true
          },
          "Medias": {
            "type": "array",
            "items": { },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Job": {
        "type": "object",
        "properties": {
          "Header": {
            "$ref": "#/components/schemas/JobHeader"
          },
          "Body": {
            "nullable": true
          },
          "Logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobLog"
            },
            "nullable": true
          },
          "Result": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "JobHeader": {
        "type": "object",
        "properties": {
          "JobId": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Type": {
            "type": "string",
            "nullable": true
          },
          "CreatedAt": {
            "type": "integer",
            "format": "int64"
          },
          "ScheduledTime": {
            "type": "integer",
            "format": "int64"
          },
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "Comment": {
            "type": "string",
            "nullable": true
          },
          "FileNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "JobLog": {
        "type": "object",
        "properties": {
          "LogDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "LogLine": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "JsonRepresentation": {
        "type": "object",
        "properties": {
          "Sheets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sheet"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LogEntry": {
        "type": "object",
        "properties": {
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "DateTime": {
            "type": "string",
            "nullable": true
          },
          "Message": {
            "type": "string",
            "nullable": true
          },
          "Service": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LogisticsShippingLabelResponse": {
        "type": "object",
        "properties": {
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "ShippingPrice": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "ShippingLabels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Manufacturer": {
        "type": "object",
        "properties": {
          "ActiveOrderDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDetail"
            },
            "nullable": true
          },
          "Qualification": {
            "$ref": "#/components/schemas/Qualification"
          },
          "AutoUpdate": {
            "type": "boolean"
          },
          "OpenToWork": {
            "type": "boolean"
          },
          "CreditLimit": {
            "type": "number",
            "format": "double"
          },
          "DefaultMaxInventoryValue": {
            "type": "number",
            "format": "double"
          },
          "DefaultMinimumOrder": {
            "type": "number",
            "format": "double"
          },
          "OutstandingBalance": {
            "type": "number",
            "format": "double"
          },
          "AutoReorderDate": {
            "type": "integer",
            "format": "int32"
          },
          "CreationDate": {
            "type": "integer",
            "format": "int32"
          },
          "DefaultLeadTime": {
            "type": "integer",
            "format": "int32"
          },
          "DefaultWeeksOfStocking": {
            "type": "integer",
            "format": "int32"
          },
          "FiscalYearMonthStart": {
            "type": "integer",
            "format": "int32"
          },
          "LastUpdatedDate": {
            "type": "integer",
            "format": "int32"
          },
          "NumberOfOpportunities": {
            "type": "integer",
            "format": "int32"
          },
          "NumberOfResellers": {
            "type": "integer",
            "format": "int32"
          },
          "OnHold": {
            "type": "integer",
            "format": "int32"
          },
          "Categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManufacturerCategory"
            },
            "nullable": true
          },
          "SalesData": {
            "$ref": "#/components/schemas/SalesData"
          },
          "About": {
            "type": "string",
            "nullable": true
          },
          "Address1": {
            "type": "string",
            "nullable": true
          },
          "Address2": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "ContactName": {
            "type": "string",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "nullable": true
          },
          "CurrencyCode": {
            "type": "string",
            "nullable": true
          },
          "Domain": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "PartnerPortal": {
            "type": "string",
            "nullable": true
          },
          "PartnerRegistrationLink": {
            "type": "string",
            "nullable": true
          },
          "Phone": {
            "type": "string",
            "nullable": true
          },
          "POEmail": {
            "type": "string",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "nullable": true
          },
          "Province": {
            "type": "string",
            "nullable": true
          },
          "PublicEmail": {
            "type": "string",
            "nullable": true
          },
          "PublicName": {
            "type": "string",
            "nullable": true
          },
          "PublicResourcesLink": {
            "type": "string",
            "nullable": true
          },
          "RepresentativeEmail": {
            "type": "string",
            "nullable": true
          },
          "Tags": {
            "type": "string",
            "nullable": true
          },
          "Terms": {
            "type": "string",
            "nullable": true
          },
          "TermsCode": {
            "type": "string",
            "nullable": true
          },
          "Website": {
            "type": "string",
            "nullable": true
          },
          "YoutubePlaylist": {
            "type": "string",
            "nullable": true
          },
          "SalesStatistics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalesStatistic"
            },
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "AmazonStrategy": {
            "type": "string",
            "nullable": true
          },
          "TransactionalWebsite": {
            "type": "boolean"
          },
          "CompanyVision": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ManufacturerCategory": {
        "type": "object",
        "properties": {
          "AutoReorder": {
            "type": "boolean"
          },
          "QualificationRequired": {
            "type": "boolean"
          },
          "Starred": {
            "type": "boolean"
          },
          "A_GP": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "B_GP": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "C_GP": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Cost_GP": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "D_GP": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "LeadTime": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "MinimumOrder": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "WeeksOfStocking": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "CategoryCode": {
            "type": "string",
            "nullable": true
          },
          "CategoryName": {
            "type": "string",
            "nullable": true
          },
          "ImageURL": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "Niche": {
            "type": "string",
            "nullable": true
          },
          "Products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            },
            "nullable": true
          },
          "AvailableToBuy": {
            "type": "boolean"
          },
          "SalesStatistics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalesStatistic"
            },
            "nullable": true
          },
          "ActiveOrderDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDetail"
            },
            "nullable": true
          },
          "InventoryValue": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InventoryValueEntry"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ManufacturerRMA": {
        "type": "object",
        "properties": {
          "ManufacturerRMAPartNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManufacturerRMAPartNumber"
            },
            "nullable": true
          },
          "EmailAddresses": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ManufacturerRMAPartNumber": {
        "type": "object",
        "properties": {
          "MPN": {
            "type": "string",
            "nullable": true
          },
          "SerialNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ManufacturerReturnRequest": {
        "type": "object",
        "properties": {
          "ReturnNumber": {
            "type": "string",
            "nullable": true
          },
          "ReturnDate": {
            "type": "number",
            "format": "double"
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerName": {
            "type": "string",
            "nullable": true
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "ReceiptNumber": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Reference": {
            "type": "string",
            "nullable": true
          },
          "DocumentTotal": {
            "type": "number",
            "format": "double"
          },
          "IsComplete": {
            "type": "integer",
            "format": "int32"
          },
          "TotalLines": {
            "type": "integer",
            "format": "int32"
          },
          "CompletedLines": {
            "type": "integer",
            "format": "int32"
          },
          "ActiveLines": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Http.ConnectionInfo": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "RemoteIpAddress": {
            "$ref": "#/components/schemas/System.Net.IPAddress"
          },
          "RemotePort": {
            "type": "integer",
            "format": "int32"
          },
          "LocalIpAddress": {
            "$ref": "#/components/schemas/System.Net.IPAddress"
          },
          "LocalPort": {
            "type": "integer",
            "format": "int32"
          },
          "ClientCertificate": {
            "$ref": "#/components/schemas/System.Security.Cryptography.X509Certificates.X509Certificate2"
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Http.HostString": {
        "type": "object",
        "properties": {
          "Value": {
            "type": "string",
            "nullable": true
          },
          "HasValue": {
            "type": "boolean",
            "readOnly": true
          },
          "Host": {
            "type": "string",
            "nullable": true
          },
          "Port": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Http.HttpContext": {
        "type": "object",
        "properties": {
          "Features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Collections.Generic.KeyValuePair`2[[System.Type, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]"
            },
            "nullable": true,
            "readOnly": true
          },
          "Request": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.HttpRequest"
          },
          "Response": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.HttpResponse"
          },
          "Connection": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.ConnectionInfo"
          },
          "WebSockets": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.WebSocketManager"
          },
          "User": {
            "$ref": "#/components/schemas/System.Security.Claims.ClaimsPrincipal"
          },
          "Items": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            },
            "nullable": true
          },
          "RequestServices": {
            "$ref": "#/components/schemas/System.IServiceProvider"
          },
          "RequestAborted": {
            "$ref": "#/components/schemas/System.Threading.CancellationToken"
          },
          "TraceIdentifier": {
            "type": "string",
            "nullable": true
          },
          "Session": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.ISession"
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Http.HttpRequest": {
        "type": "object",
        "properties": {
          "HttpContext": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.HttpContext"
          },
          "Method": {
            "type": "string",
            "nullable": true
          },
          "Scheme": {
            "type": "string",
            "nullable": true
          },
          "IsHttps": {
            "type": "boolean"
          },
          "Host": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.HostString"
          },
          "PathBase": {
            "type": "string"
          },
          "Path": {
            "type": "string"
          },
          "QueryString": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.QueryString"
          },
          "Query": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Extensions.Primitives.StringValues, Microsoft.Extensions.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]]"
            },
            "nullable": true
          },
          "Protocol": {
            "type": "string",
            "nullable": true
          },
          "Headers": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true,
            "readOnly": true
          },
          "Cookies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]"
            },
            "nullable": true
          },
          "ContentLength": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "ContentType": {
            "type": "string",
            "nullable": true
          },
          "Body": {
            "type": "string",
            "format": "binary",
            "nullable": true
          },
          "BodyReader": {
            "type": "string",
            "format": "binary",
            "nullable": true,
            "readOnly": true
          },
          "HasFormContentType": {
            "type": "boolean",
            "readOnly": true
          },
          "Form": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Extensions.Primitives.StringValues, Microsoft.Extensions.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]]"
            },
            "nullable": true
          },
          "RouteValues": {
            "type": "object",
            "additionalProperties": { },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Http.HttpResponse": {
        "type": "object",
        "properties": {
          "HttpContext": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.HttpContext"
          },
          "StatusCode": {
            "type": "integer",
            "format": "int32"
          },
          "Headers": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true,
            "readOnly": true
          },
          "Body": {
            "type": "string",
            "format": "binary",
            "nullable": true
          },
          "BodyWriter": {
            "$ref": "#/components/schemas/System.IO.Pipelines.PipeWriter"
          },
          "ContentLength": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "ContentType": {
            "type": "string",
            "nullable": true
          },
          "Cookies": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.IResponseCookies"
          },
          "HasStarted": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Http.IResponseCookies": {
        "type": "object",
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Http.ISession": {
        "type": "object",
        "properties": {
          "IsAvailable": {
            "type": "boolean",
            "readOnly": true
          },
          "Id": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "Keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Http.QueryString": {
        "type": "object",
        "properties": {
          "Value": {
            "type": "string",
            "nullable": true
          },
          "HasValue": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Http.WebSocketManager": {
        "type": "object",
        "properties": {
          "IsWebSocketRequest": {
            "type": "boolean",
            "readOnly": true
          },
          "WebSocketRequestedProtocols": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "RouteValues": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "nullable": true
          },
          "AttributeRouteInfo": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.Routing.AttributeRouteInfo"
          },
          "ActionConstraints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata"
            },
            "nullable": true
          },
          "EndpointMetadata": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "Parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor"
            },
            "nullable": true
          },
          "BoundProperties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor"
            },
            "nullable": true
          },
          "FilterDescriptors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.Filters.FilterDescriptor"
            },
            "nullable": true
          },
          "DisplayName": {
            "type": "string",
            "nullable": true
          },
          "Properties": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "ParameterType": {
            "type": "string",
            "nullable": true
          },
          "BindingInfo": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo"
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata": {
        "type": "object",
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ActionContext": {
        "type": "object",
        "properties": {
          "ActionDescriptor": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor"
          },
          "HttpContext": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.HttpContext"
          },
          "ModelState": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry"
            },
            "nullable": true
          },
          "RouteData": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Routing.RouteData"
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ControllerContext": {
        "type": "object",
        "properties": {
          "ActionDescriptor": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor"
          },
          "ValueProviderFactories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory"
            },
            "nullable": true
          },
          "HttpContext": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.HttpContext"
          },
          "ModelState": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry"
            },
            "nullable": true
          },
          "RouteData": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Routing.RouteData"
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor": {
        "type": "object",
        "properties": {
          "ControllerName": {
            "type": "string",
            "nullable": true
          },
          "ActionName": {
            "type": "string",
            "nullable": true
          },
          "MethodInfo": {
            "$ref": "#/components/schemas/System.Reflection.MethodInfo"
          },
          "ControllerTypeInfo": {
            "type": "string",
            "nullable": true
          },
          "DisplayName": {
            "type": "string",
            "nullable": true
          },
          "Id": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "RouteValues": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "nullable": true
          },
          "AttributeRouteInfo": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.Routing.AttributeRouteInfo"
          },
          "ActionConstraints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata"
            },
            "nullable": true
          },
          "EndpointMetadata": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "Parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor"
            },
            "nullable": true
          },
          "BoundProperties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor"
            },
            "nullable": true
          },
          "FilterDescriptors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.Filters.FilterDescriptor"
            },
            "nullable": true
          },
          "Properties": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.Filters.FilterDescriptor": {
        "type": "object",
        "properties": {
          "Filter": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata"
          },
          "Order": {
            "type": "integer",
            "format": "int32"
          },
          "Scope": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata": {
        "type": "object",
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.IUrlHelper": {
        "type": "object",
        "properties": {
          "ActionContext": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ActionContext"
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsFactory": {
        "type": "object",
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo": {
        "type": "object",
        "properties": {
          "BindingSource": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource"
          },
          "BinderModelName": {
            "type": "string",
            "nullable": true
          },
          "BinderType": {
            "type": "string",
            "nullable": true
          },
          "PropertyFilterProvider": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider"
          },
          "RequestPredicate": {
            "$ref": "#/components/schemas/System.Func`2[[Microsoft.AspNetCore.Mvc.ActionContext, Microsoft.AspNetCore.Mvc.Abstractions, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]"
          },
          "EmptyBodyBehavior": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.EmptyBodyBehavior"
          },
          "ServiceKey": {
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource": {
        "type": "object",
        "properties": {
          "DisplayName": {
            "type": "string",
            "nullable": true
          },
          "Id": {
            "type": "string",
            "nullable": true
          },
          "IsGreedy": {
            "type": "boolean"
          },
          "IsFromRequest": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ModelBinding.EmptyBodyBehavior": {
        "enum": [
          "Default",
          "Allow",
          "Disallow"
        ],
        "type": "string"
      },
      "Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderFactory": {
        "type": "object",
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider": {
        "type": "object",
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider": {
        "type": "object",
        "properties": {
          "PropertyFilter": {
            "$ref": "#/components/schemas/System.Func`2[[Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata, Microsoft.AspNetCore.Mvc.Abstractions, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]"
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory": {
        "type": "object",
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ModelBinding.ModelError": {
        "type": "object",
        "properties": {
          "Exception": {
            "nullable": true
          },
          "ErrorMessage": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry": {
        "type": "object",
        "properties": {
          "RawValue": {
            "nullable": true
          },
          "AttemptedValue": {
            "type": "string",
            "nullable": true
          },
          "Errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.ModelError"
            },
            "nullable": true,
            "readOnly": true
          },
          "ValidationState": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState"
          },
          "IsContainerNode": {
            "type": "boolean",
            "readOnly": true
          },
          "Children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry"
            },
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState": {
        "enum": [
          "Unvalidated",
          "Invalid",
          "Valid",
          "Skipped"
        ],
        "type": "string"
      },
      "Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IObjectModelValidator": {
        "type": "object",
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ProblemDetails": {
        "type": "object",
        "properties": {
          "Type": {
            "type": "string",
            "nullable": true
          },
          "Title": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "Detail": {
            "type": "string",
            "nullable": true
          },
          "Instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "Microsoft.AspNetCore.Mvc.Routing.AttributeRouteInfo": {
        "type": "object",
        "properties": {
          "Template": {
            "type": "string",
            "nullable": true
          },
          "Order": {
            "type": "integer",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "SuppressLinkGeneration": {
            "type": "boolean"
          },
          "SuppressPathMatching": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Routing.IRouter": {
        "type": "object",
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Routing.RouteData": {
        "type": "object",
        "properties": {
          "DataTokens": {
            "type": "object",
            "additionalProperties": { },
            "nullable": true,
            "readOnly": true
          },
          "Routers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Routing.IRouter"
            },
            "nullable": true,
            "readOnly": true
          },
          "Values": {
            "type": "object",
            "additionalProperties": { },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.Win32.SafeHandles.SafeWaitHandle": {
        "type": "object",
        "properties": {
          "IsInvalid": {
            "type": "boolean",
            "readOnly": true
          },
          "IsClosed": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "MicrosoftAdsAccountInfo": {
        "type": "object",
        "properties": {
          "ShopifyHostName": {
            "type": "string",
            "nullable": true
          },
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "AccountId": {
            "type": "integer",
            "format": "int64"
          },
          "AccountNumber": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "ManagerCustomerId": {
            "type": "integer",
            "format": "int64"
          },
          "ManagerCustomerNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MicrosoftAdsAccountLinkResult": {
        "type": "object",
        "properties": {
          "ClientCustomerNumber": {
            "type": "string",
            "nullable": true
          },
          "ClientAccountId": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "ManagingCustomerId": {
            "type": "integer",
            "format": "int64"
          },
          "ManagingCustomerNumber": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "ClientRetainsBilling": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "MicrosoftAdsApiError": {
        "type": "object",
        "properties": {
          "Code": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ErrorCode": {
            "type": "string",
            "nullable": true
          },
          "Message": {
            "type": "string",
            "nullable": true
          },
          "Details": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MicrosoftAdsApiFailure": {
        "type": "object",
        "properties": {
          "Message": {
            "type": "string",
            "nullable": true
          },
          "Operation": {
            "type": "string",
            "nullable": true
          },
          "HttpStatusCode": {
            "type": "integer",
            "format": "int32"
          },
          "TrackingId": {
            "type": "string",
            "nullable": true
          },
          "Errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MicrosoftAdsApiError"
            },
            "nullable": true
          },
          "RawResponse": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MicrosoftAdsLinkAccountRequest": {
        "type": "object",
        "properties": {
          "ClientCustomerNumber": {
            "type": "string",
            "nullable": true
          },
          "ClientAccountId": {
            "type": "integer",
            "format": "int64"
          },
          "Note": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MostRecentVideo": {
        "type": "object",
        "properties": {
          "FileName": {
            "type": "string",
            "nullable": true
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time"
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewBillingInformation": {
        "type": "object",
        "properties": {
          "BillingName": {
            "type": "string",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "nullable": true
          },
          "Address1": {
            "type": "string",
            "nullable": true
          },
          "Address2": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "Province": {
            "type": "string",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "nullable": true
          },
          "CurrencyCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewShippingInformation": {
        "type": "object",
        "properties": {
          "Country": {
            "type": "string",
            "nullable": true
          },
          "ShippingName": {
            "type": "string",
            "nullable": true
          },
          "Address1": {
            "type": "string",
            "nullable": true
          },
          "Address2": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "Province": {
            "type": "string",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "nullable": true
          },
          "CurrencyCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OpportunityEntry": {
        "type": "object",
        "properties": {
          "Active": {
            "type": "boolean"
          },
          "CanBeSetAsDefault": {
            "type": "boolean"
          },
          "BidPrice": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Price": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Rebate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "BidNumber": {
            "type": "string",
            "nullable": true
          },
          "BidPriceType": {
            "type": "string",
            "nullable": true
          },
          "DefaultResellers": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "EndDate": {
            "type": "string",
            "nullable": true
          },
          "LastUpdate": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "Opportunity": {
            "type": "string",
            "nullable": true
          },
          "OpportunityName": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "StartDate": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Order": {
        "type": "object",
        "properties": {
          "OnHold": {
            "type": "integer",
            "format": "int32"
          },
          "ShippingDate": {
            "type": "integer",
            "format": "int32"
          },
          "Priority": {
            "type": "string",
            "nullable": true
          },
          "ExpectedShipmentDate": {
            "type": "number",
            "format": "double"
          },
          "ExtendedPrice": {
            "type": "number",
            "format": "double"
          },
          "OrderDate": {
            "type": "number",
            "format": "double"
          },
          "QuantityBackOrdered": {
            "type": "number",
            "format": "double"
          },
          "QuantityOrdered": {
            "type": "number",
            "format": "double"
          },
          "QuantityShipped": {
            "type": "number",
            "format": "double"
          },
          "ShipmentDate": {
            "type": "number",
            "format": "double"
          },
          "UnitPrice": {
            "type": "number",
            "format": "double"
          },
          "UnitWeight": {
            "type": "number",
            "format": "double"
          },
          "PrintStatus": {
            "type": "integer",
            "format": "int32"
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerPartNumber": {
            "type": "string",
            "nullable": true
          },
          "OpportunityManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "OpportunityManufacturerNumber": {
            "type": "string",
            "nullable": true
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderCharge": {
        "type": "object",
        "properties": {
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Price": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "OrderDetail": {
        "type": "object",
        "properties": {
          "DocumentDate": {
            "type": "number",
            "format": "double"
          },
          "ExtendedPrice": {
            "type": "number",
            "format": "double"
          },
          "ExtendedStandardCost": {
            "type": "number",
            "format": "double"
          },
          "ExtendedWeight": {
            "type": "number",
            "format": "double"
          },
          "OrderDate": {
            "type": "number",
            "format": "double"
          },
          "Quantity": {
            "type": "number",
            "format": "double"
          },
          "StandardCost": {
            "type": "number",
            "format": "double"
          },
          "UnitPrice": {
            "type": "number",
            "format": "double"
          },
          "UnitWeight": {
            "type": "number",
            "format": "double"
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "DocumentNumber": {
            "type": "string",
            "nullable": true
          },
          "DocumentType": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerName": {
            "type": "string",
            "nullable": true
          },
          "MPN": {
            "type": "string",
            "nullable": true
          },
          "OpportunityManufacTurerId": {
            "type": "string",
            "nullable": true
          },
          "OpportunityManufacturerNumber": {
            "type": "string",
            "nullable": true
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ShipToCountryCode": {
            "type": "string",
            "nullable": true
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "ShipToZipCode": {
            "type": "string",
            "nullable": true
          },
          "ShipViaDescription": {
            "type": "string",
            "nullable": true
          },
          "WarehouseCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderDocument": {
        "type": "object",
        "properties": {
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "Returns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnOld"
            },
            "nullable": true
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "OrderDate": {
            "type": "integer",
            "format": "int32"
          },
          "ShippingDate": {
            "type": "integer",
            "format": "int32"
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress1": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress2": {
            "type": "string",
            "nullable": true
          },
          "ShipToCity": {
            "type": "string",
            "nullable": true
          },
          "ShipToProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "ShipToCountry": {
            "type": "string",
            "nullable": true
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "LastEditDate": {
            "type": "integer",
            "format": "int32"
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ShipVia": {
            "type": "string",
            "nullable": true
          },
          "ShipViaDescription": {
            "type": "string",
            "nullable": true
          },
          "NumberOfShipments": {
            "type": "integer",
            "format": "int32"
          },
          "OnHold": {
            "type": "integer",
            "format": "int32"
          },
          "InitialNumberOfLines": {
            "type": "integer",
            "format": "int32"
          },
          "NumberOfLines": {
            "type": "integer",
            "format": "int32"
          },
          "Priority": {
            "type": "string",
            "nullable": true
          },
          "EndUserPONumber": {
            "type": "string",
            "nullable": true
          },
          "ShipToContactName": {
            "type": "string",
            "nullable": true
          },
          "ShipToContactPhone": {
            "type": "string",
            "nullable": true
          },
          "ShipToContactEmail": {
            "type": "string",
            "nullable": true
          },
          "BillToName": {
            "type": "string",
            "nullable": true
          },
          "BillToAddress1": {
            "type": "string",
            "nullable": true
          },
          "BillToAddress2": {
            "type": "string",
            "nullable": true
          },
          "BillToCity": {
            "type": "string",
            "nullable": true
          },
          "BillToProvince": {
            "type": "string",
            "nullable": true
          },
          "BillToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "BillToCountry": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "SubTotal": {
            "type": "number",
            "format": "double"
          },
          "Taxes": {
            "type": "number",
            "format": "double"
          },
          "Total": {
            "type": "number",
            "format": "double"
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "BidNumber": {
            "type": "string",
            "nullable": true
          },
          "PartNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLineItem"
            },
            "nullable": true
          },
          "Charges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderCharge"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderHeader": {
        "type": "object",
        "properties": {
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "OrderDate": {
            "type": "integer",
            "format": "int32"
          },
          "ShippingDate": {
            "type": "integer",
            "format": "int32"
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress1": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress2": {
            "type": "string",
            "nullable": true
          },
          "ShipToCity": {
            "type": "string",
            "nullable": true
          },
          "ShipToProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "ShipToCountry": {
            "type": "string",
            "nullable": true
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "LastEditDate": {
            "type": "integer",
            "format": "int32"
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ShipVia": {
            "type": "string",
            "nullable": true
          },
          "ShipViaDescription": {
            "type": "string",
            "nullable": true
          },
          "PrintStatus": {
            "type": "integer",
            "format": "int32"
          },
          "NumberOfShipments": {
            "type": "integer",
            "format": "int32"
          },
          "OnHold": {
            "type": "integer",
            "format": "int32"
          },
          "InitialNumberOfLines": {
            "type": "integer",
            "format": "int32"
          },
          "NumberOfLines": {
            "type": "integer",
            "format": "int32"
          },
          "Priority": {
            "type": "string",
            "nullable": true
          },
          "EndUserPONumber": {
            "type": "string",
            "nullable": true
          },
          "ShipToContactName": {
            "type": "string",
            "nullable": true
          },
          "ShipToContactPhone": {
            "type": "string",
            "nullable": true
          },
          "TheoreticalWeight": {
            "type": "number",
            "format": "double"
          },
          "OrderTotal": {
            "type": "number",
            "format": "double"
          },
          "Comments": {
            "type": "string",
            "nullable": true
          },
          "ShippingSlipComment": {
            "type": "string",
            "nullable": true
          },
          "TaxAmount1": {
            "type": "number",
            "format": "double"
          },
          "TaxRate1": {
            "type": "number",
            "format": "double"
          },
          "TaxAmount2": {
            "type": "number",
            "format": "double"
          },
          "TaxRate2": {
            "type": "number",
            "format": "double"
          },
          "SubTotal": {
            "type": "number",
            "format": "double"
          },
          "Total": {
            "type": "number",
            "format": "double"
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "BidNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderLineItem": {
        "type": "object",
        "properties": {
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "SerialNumbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "TransparencyCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "QuantityOrdered": {
            "type": "integer",
            "format": "int32"
          },
          "QuantityShipped": {
            "type": "integer",
            "format": "int32"
          },
          "QuantityBackOrdered": {
            "type": "integer",
            "format": "int32"
          },
          "UnitPrice": {
            "type": "number",
            "format": "double"
          },
          "ExtendedPrice": {
            "type": "number",
            "format": "double"
          },
          "UnitWeight": {
            "type": "number",
            "format": "double"
          },
          "ManufacturerPartNumber": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "ExpectedShipmentDate": {
            "type": "integer",
            "format": "int32"
          },
          "ShipmentDate": {
            "type": "integer",
            "format": "int32"
          },
          "OrderDate": {
            "type": "integer",
            "format": "int32"
          },
          "OpportunityManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "OpportunityManufacturerNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PartNumberCartInfo": {
        "type": "object",
        "properties": {
          "Quantity": {
            "type": "integer",
            "format": "int32"
          },
          "OrderInCart": {
            "type": "integer",
            "format": "int32"
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "BidNumber": {
            "type": "string",
            "nullable": true
          },
          "Price": {
            "type": "number",
            "format": "double"
          },
          "RegularPrice": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "PartSubset": {
        "type": "object",
        "properties": {
          "Text": {
            "type": "string",
            "nullable": true
          },
          "ThoughtSignature": {
            "type": "string",
            "format": "byte",
            "nullable": true
          },
          "FileData": {
            "$ref": "#/components/schemas/FileData"
          },
          "FunctionCall": {
            "$ref": "#/components/schemas/SimplifiedFunctionCall"
          },
          "FunctionResponse": {
            "$ref": "#/components/schemas/SimplifiedFunctionResponse"
          }
        },
        "additionalProperties": false
      },
      "Partner": {
        "type": "object",
        "properties": {
          "Reseller": {
            "$ref": "#/components/schemas/Reseller"
          },
          "Manufacturer": {
            "$ref": "#/components/schemas/Manufacturer"
          },
          "BillingInformation": {
            "$ref": "#/components/schemas/BillingInformation"
          },
          "Socials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountSocial"
            },
            "nullable": true
          },
          "Agencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgencyInfo"
            },
            "nullable": true
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentHeader"
            },
            "nullable": true
          },
          "About": {
            "type": "string",
            "nullable": true
          },
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "PublicName": {
            "type": "string",
            "nullable": true
          },
          "SceneName": {
            "type": "string",
            "nullable": true
          },
          "VoiceName": {
            "type": "string",
            "nullable": true
          },
          "VoiceStyle": {
            "type": "string",
            "nullable": true
          },
          "IsManufacturer": {
            "type": "boolean"
          },
          "IsReseller": {
            "type": "boolean"
          },
          "IsSalesAgency": {
            "type": "boolean"
          },
          "HasShopifyStore": {
            "type": "boolean"
          },
          "IsVendor": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Payment": {
        "type": "object",
        "properties": {
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "BatchId": {
            "type": "integer",
            "format": "int32"
          },
          "Title": {
            "type": "string",
            "nullable": true
          },
          "ReceiptDate": {
            "type": "integer",
            "format": "int32"
          },
          "ReceiptAmount": {
            "type": "number",
            "format": "double"
          },
          "DiscountAmount": {
            "type": "number",
            "format": "double"
          },
          "CheckNumber": {
            "type": "string",
            "nullable": true
          },
          "PaymentNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProcessCartInput": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Street1": {
            "type": "string",
            "nullable": true
          },
          "Street2": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "ProvinceCode": {
            "type": "string",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "nullable": true
          },
          "CountryCode": {
            "type": "string",
            "nullable": true
          },
          "PO": {
            "type": "string",
            "nullable": true
          },
          "CustomerPO": {
            "type": "string",
            "nullable": true
          },
          "Comment": {
            "type": "string",
            "nullable": true
          },
          "ShippingSlipComment": {
            "type": "string",
            "nullable": true
          },
          "ContactName": {
            "type": "string",
            "nullable": true
          },
          "ContactPhone": {
            "type": "string",
            "nullable": true
          },
          "ShippingMethodId": {
            "type": "string",
            "nullable": true
          },
          "AllowPartialShipment": {
            "type": "boolean"
          },
          "ShippingSlipFileB64": {
            "type": "string",
            "nullable": true
          },
          "FutureOrderDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "OrderOnHold": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ProcessOrderLegacyResponse": {
        "type": "object",
        "properties": {
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "IpAddress": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProcessOrderNewResponse": {
        "type": "object",
        "properties": {
          "OrderNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Product": {
        "type": "object",
        "properties": {
          "Cart": {
            "$ref": "#/components/schemas/PartNumberCartInfo"
          },
          "OpportunityOnly": {
            "type": "boolean"
          },
          "Require3DScan": {
            "type": "boolean"
          },
          "SerialNumber": {
            "type": "boolean"
          },
          "TransparencyCode": {
            "type": "boolean"
          },
          "AvailableToBuy": {
            "type": "boolean",
            "nullable": true
          },
          "CanBeAllocated": {
            "type": "boolean",
            "nullable": true
          },
          "IsManufacturer": {
            "type": "boolean",
            "nullable": true
          },
          "LastMaintainedDate": {
            "type": "number",
            "format": "double"
          },
          "UnitWeight": {
            "type": "number",
            "format": "double"
          },
          "MAP": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "MSRP": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "UnitHeight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "UnitLength": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "UnitWidth": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Distribution": {
            "$ref": "#/components/schemas/Distribution"
          },
          "InstantRebate": {
            "nullable": true
          },
          "ShopifyProduct": {
            "nullable": true
          },
          "AutoUpdate": {
            "type": "integer",
            "format": "int32"
          },
          "MasterCarton": {
            "type": "integer",
            "format": "int32"
          },
          "SkidQuantity": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "Credits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Credit"
            },
            "nullable": true
          },
          "ContractPricings": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "InstantRebates": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "Requisitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Requisition"
            },
            "nullable": true
          },
          "Invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invoice"
            },
            "nullable": true
          },
          "Opportunities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpportunityEntry"
            },
            "nullable": true
          },
          "Orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            },
            "nullable": true
          },
          "ActiveOrderDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDetail"
            },
            "nullable": true
          },
          "CompletedOrderDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDetail"
            },
            "nullable": true
          },
          "OrderDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDetail"
            },
            "nullable": true
          },
          "PurchaseOrders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseOrderDetail"
            },
            "nullable": true
          },
          "Receipts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Receipt"
            },
            "nullable": true
          },
          "Returns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnOld"
            },
            "nullable": true
          },
          "SalesStatistics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalesStatistic"
            },
            "nullable": true
          },
          "Shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Shipment"
            },
            "nullable": true
          },
          "TransactionHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionHistory"
            },
            "nullable": true
          },
          "UPCs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UPCEntry"
            },
            "nullable": true
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentHeader"
            },
            "nullable": true
          },
          "Manufacturer": {
            "$ref": "#/components/schemas/Manufacturer"
          },
          "ManufacturerCategory": {
            "$ref": "#/components/schemas/ManufacturerCategory"
          },
          "BodyHTML": {
            "type": "string",
            "nullable": true
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "CountryCodeOfOrigin": {
            "type": "string",
            "nullable": true
          },
          "CreatedBy": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerName": {
            "type": "string",
            "nullable": true
          },
          "MPN": {
            "type": "string",
            "nullable": true
          },
          "ProductType": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "RandmarTitle": {
            "type": "string",
            "nullable": true
          },
          "SceneName": {
            "type": "string",
            "nullable": true
          },
          "State": {
            "type": "string",
            "nullable": true
          },
          "Title": {
            "type": "string",
            "nullable": true
          },
          "UPC": {
            "type": "string",
            "nullable": true
          },
          "VoiceoverCaption": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerPercentileRank": {
            "type": "number",
            "format": "double"
          },
          "OverallPercentileRank": {
            "type": "number",
            "format": "double"
          },
          "OfficialManufacturerProductLink": {
            "type": "string",
            "nullable": true
          },
          "Logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogEntry"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProductImageInfo": {
        "type": "object",
        "properties": {
          "ImageId": {
            "type": "string",
            "nullable": true
          },
          "FileName": {
            "type": "string",
            "nullable": true
          },
          "Url": {
            "type": "string",
            "nullable": true
          },
          "IsPrimary": {
            "type": "boolean"
          },
          "SortOrder": {
            "type": "integer",
            "format": "int32"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time"
          },
          "ContentType": {
            "type": "string",
            "nullable": true
          },
          "ContentLength": {
            "type": "integer",
            "format": "int64"
          },
          "Description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProductImageUploadResult": {
        "type": "object",
        "properties": {
          "Image": {
            "$ref": "#/components/schemas/ProductImageInfo"
          }
        },
        "additionalProperties": false
      },
      "ProductNiche": {
        "type": "object",
        "properties": {
          "Niche": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProductVideoGenerationResult": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "Url": {
            "type": "string",
            "nullable": true
          },
          "Error": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PurchaseOrder": {
        "type": "object",
        "properties": {
          "DocumentNumber": {
            "type": "string",
            "nullable": true
          },
          "PurchaseOrderNumber": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "VendorCode": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerName": {
            "type": "string",
            "nullable": true
          },
          "VendorName": {
            "type": "string",
            "nullable": true
          },
          "PurchaseOrderDate": {
            "type": "number",
            "format": "double"
          },
          "ExpectedArrivalDate": {
            "type": "number",
            "format": "double"
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "ShipVia": {
            "type": "string",
            "nullable": true
          },
          "ShipViaDescription": {
            "type": "string",
            "nullable": true
          },
          "ContactEmail": {
            "type": "string",
            "nullable": true
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress1": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress2": {
            "type": "string",
            "nullable": true
          },
          "ShipToCity": {
            "type": "string",
            "nullable": true
          },
          "ShipToProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "BillToName": {
            "type": "string",
            "nullable": true
          },
          "BillToAddress1": {
            "type": "string",
            "nullable": true
          },
          "BillToAddress2": {
            "type": "string",
            "nullable": true
          },
          "BillToCity": {
            "type": "string",
            "nullable": true
          },
          "BillToProvince": {
            "type": "string",
            "nullable": true
          },
          "BillToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "TermsCode": {
            "type": "string",
            "nullable": true
          },
          "Comments": {
            "type": "string",
            "nullable": true
          },
          "SubTotal": {
            "type": "number",
            "format": "double"
          },
          "OnHold": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PurchaseOrderDetail": {
        "type": "object",
        "properties": {
          "ExpectedArrivalDate": {
            "type": "number",
            "format": "double"
          },
          "PurchaseOrderDate": {
            "type": "number",
            "format": "double"
          },
          "QuantityOrdered": {
            "type": "number",
            "format": "double"
          },
          "QuantityOutstanding": {
            "type": "number",
            "format": "double"
          },
          "QuantityReceived": {
            "type": "number",
            "format": "double"
          },
          "UnitPrice": {
            "type": "number",
            "format": "double"
          },
          "LineNumber": {
            "type": "integer",
            "format": "int32"
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "CategoryName": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerName": {
            "type": "string",
            "nullable": true
          },
          "MPN": {
            "type": "string",
            "nullable": true
          },
          "PurchaseOrderNumber": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "VendorCode": {
            "type": "string",
            "nullable": true
          },
          "VendorName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Qualification": {
        "type": "object",
        "properties": {
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "QualificationId": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "DefaultOpportunityNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RandmarAPI.Controllers.V4.Manufacturer.ProductController.AppendProductImageRequest": {
        "required": [
          "ImageUrl"
        ],
        "type": "object",
        "properties": {
          "ImageUrl": {
            "minLength": 1,
            "type": "string",
            "description": "Publicly accessible image URL to append to the product."
          },
          "FileName": {
            "type": "string",
            "description": "Optional file name override for the downloaded image.",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Optional description for the image.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RandmarAPI.Controllers.V4.Manufacturer.ProductController.RegisterProductAttachmentRequest": {
        "required": [
          "StorageKey"
        ],
        "type": "object",
        "properties": {
          "StorageKey": {
            "minLength": 1,
            "type": "string",
            "description": "Temporary storage key returned by the partner attachment upload endpoint."
          }
        },
        "additionalProperties": false
      },
      "RandmarAPI.Controllers.V4.Partner.AttachmentController.CreateTextAttachmentInput": {
        "type": "object",
        "properties": {
          "FileName": {
            "type": "string",
            "nullable": true
          },
          "Content": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RandmarAPI.Controllers.V4.Partner.AttachmentController.RegisterAttachmentInput": {
        "type": "object",
        "properties": {
          "StorageKey": {
            "type": "string",
            "nullable": true
          },
          "AssociatedGUID": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RandmarAPI.Controllers.V4.Partner.GeneralDocument": {
        "type": "object",
        "properties": {
          "HttpContext": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.HttpContext"
          },
          "Request": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.HttpRequest"
          },
          "Response": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Http.HttpResponse"
          },
          "RouteData": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Routing.RouteData"
          },
          "ModelState": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry"
            },
            "nullable": true,
            "readOnly": true
          },
          "ControllerContext": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ControllerContext"
          },
          "MetadataProvider": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider"
          },
          "ModelBinderFactory": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderFactory"
          },
          "Url": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.IUrlHelper"
          },
          "ObjectValidator": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IObjectModelValidator"
          },
          "ProblemDetailsFactory": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsFactory"
          },
          "User": {
            "$ref": "#/components/schemas/System.Security.Claims.ClaimsPrincipal"
          }
        },
        "additionalProperties": false,
        "description": "Provides consolidated order context and line-item retrieval through General Documents."
      },
      "RandmarAPI.Controllers.V4.Partner.ProductController.GenerateProductMediaRequest": {
        "required": [
          "Prompt"
        ],
        "type": "object",
        "properties": {
          "Prompt": {
            "minLength": 1,
            "type": "string",
            "description": "The description of the image or video to generate."
          },
          "ReferenceImageUrls": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Optional public image URLs to use as visual references. When supplied, these replace the product's primary image.\r\nObtain anonymously downloadable URLs via `POST V4/Partner/{applicationId}/Generation/Upload`—never private Google Drive or login-gated links.",
            "nullable": true
          },
          "IncludeProductPdfAttachments": {
            "type": "boolean",
            "description": "Whether registered PDF product attachments should be used as supporting generation context. Defaults to false."
          }
        },
        "additionalProperties": false,
        "description": "Contains the creative prompt for product media generation."
      },
      "RandmarAPI.Controllers.V4.Partner.ShopifyController.RegisterStoreAttachmentInput": {
        "type": "object",
        "properties": {
          "StorageKey": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RandmarAPI.Controllers.V4.Partner.WarehouseController.ReceptionInput": {
        "type": "object",
        "properties": {
          "PackingSlipURL": {
            "type": "string",
            "description": "Anonymously downloadable public URL to the packing slip. Obtain via\r\n`POST V4/Partner/{applicationId}/Generation/Upload`—never a private Google Drive / login-gated link.",
            "nullable": true
          },
          "PartNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceivedPartNumbers"
            },
            "description": "A detailed list of the part numbers and their specific quantities being received.",
            "nullable": true
          },
          "ReceivedBy": {
            "type": "string",
            "description": "The name or identifier of the person receiving the purchase order.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The payload needed to receive a purchase order in a specific warehouse."
      },
      "RandmarAssistantV2Content": {
        "type": "object",
        "properties": {
          "Parts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RandmarAssistantV2Part"
            },
            "nullable": true
          },
          "Role": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RandmarAssistantV2FunctionCall": {
        "type": "object",
        "properties": {
          "ToolCallId": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "ArgumentsJson": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RandmarAssistantV2FunctionResponse": {
        "type": "object",
        "properties": {
          "ToolCallId": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Content": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RandmarAssistantV2GenerationResult": {
        "type": "object",
        "properties": {
          "Content": {
            "$ref": "#/components/schemas/RandmarAssistantV2Content"
          },
          "ContextUtilization": {
            "type": "number",
            "format": "float"
          }
        },
        "additionalProperties": false
      },
      "RandmarAssistantV2Part": {
        "type": "object",
        "properties": {
          "Text": {
            "type": "string",
            "nullable": true
          },
          "ThoughtSignature": {
            "type": "string",
            "format": "byte",
            "nullable": true
          },
          "FileData": {
            "$ref": "#/components/schemas/FileData"
          },
          "FunctionCall": {
            "$ref": "#/components/schemas/RandmarAssistantV2FunctionCall"
          },
          "FunctionResponse": {
            "$ref": "#/components/schemas/RandmarAssistantV2FunctionResponse"
          }
        },
        "additionalProperties": false
      },
      "RandmarStatistics": {
        "type": "object",
        "properties": {
          "ActiveManufacturerCount": {
            "type": "integer",
            "format": "int32"
          },
          "ActiveManufacturerUserCount": {
            "type": "integer",
            "format": "int32"
          },
          "ActiveOpportunityCount": {
            "type": "integer",
            "format": "int32"
          },
          "ActiveResellerCount": {
            "type": "integer",
            "format": "int32"
          },
          "ActiveResellerUserCount": {
            "type": "integer",
            "format": "int32"
          },
          "ActiveSalesAgencyCount": {
            "type": "integer",
            "format": "int32"
          },
          "ActiveSalesAgencyUserCount": {
            "type": "integer",
            "format": "int32"
          },
          "AvailableProductCount": {
            "type": "integer",
            "format": "int32"
          },
          "ManufacturerCount": {
            "type": "integer",
            "format": "int32"
          },
          "ProductCount": {
            "type": "integer",
            "format": "int32"
          },
          "ProductVideoCount": {
            "type": "integer",
            "format": "int32"
          },
          "ResellerCount": {
            "type": "integer",
            "format": "int32"
          },
          "SalesAgencyCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "RandmarSubscriptionSession": {
        "type": "object",
        "properties": {
          "SessionUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RandmarSubscriptionStatus": {
        "type": "object",
        "properties": {
          "Status": {
            "type": "string",
            "nullable": true
          },
          "HasAccess": {
            "type": "boolean"
          },
          "CancelAtPeriodEnd": {
            "type": "boolean"
          },
          "PaidThroughUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "AccessUntilUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "IsInGracePeriod": {
            "type": "boolean"
          },
          "CurrentPeriodEndUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Receipt": {
        "type": "object",
        "properties": {
          "Quantity": {
            "type": "integer",
            "format": "int32"
          },
          "ReceiptDate": {
            "type": "integer",
            "format": "int32"
          },
          "UnitPrice": {
            "type": "number",
            "format": "double"
          },
          "ReceiptNumber": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerName": {
            "type": "string",
            "nullable": true
          },
          "MPN": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "VendorName": {
            "type": "string",
            "nullable": true
          },
          "VendorCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ReceiptDetail": {
        "type": "object",
        "properties": {
          "ReceiptNumber": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerName": {
            "type": "string",
            "nullable": true
          },
          "ReceiptDate": {
            "type": "number",
            "format": "double"
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Quantity": {
            "type": "number",
            "format": "double"
          },
          "MPN": {
            "type": "string",
            "nullable": true
          },
          "UnitPrice": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "ReceivedPartNumbers": {
        "type": "object",
        "properties": {
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "MPN": {
            "type": "string",
            "nullable": true
          },
          "QuantityReceived": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "QuantityPackingSlip": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "QuantityActual": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RegisterConversationAttachmentRequest": {
        "required": [
          "StorageKey"
        ],
        "type": "object",
        "properties": {
          "StorageKey": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "RenewOpportunityInput": {
        "type": "object",
        "properties": {
          "BidNumber": {
            "type": "string",
            "nullable": true
          },
          "BidTitle": {
            "type": "string",
            "nullable": true
          },
          "StartDate": {
            "type": "string",
            "format": "date-time"
          },
          "EndDate": {
            "type": "string",
            "format": "date-time"
          },
          "QuoteOnly": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ReorderProductImagesInput": {
        "type": "object",
        "properties": {
          "ImageIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ReorderWorkflowTasksInput": {
        "type": "object",
        "properties": {
          "TaskIdsInOrder": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Requisition": {
        "type": "object",
        "properties": {
          "DocumentNumber": {
            "type": "string",
            "nullable": true
          },
          "ExpirationDate": {
            "type": "integer",
            "format": "int32"
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerName": {
            "type": "string",
            "nullable": true
          },
          "Reference": {
            "type": "string",
            "nullable": true
          },
          "RequestedBy": {
            "type": "string",
            "nullable": true
          },
          "RequiredByDate": {
            "type": "integer",
            "format": "int32"
          },
          "RequisitionDate": {
            "type": "integer",
            "format": "int32"
          },
          "QuantityOrdered": {
            "type": "integer",
            "format": "int32"
          },
          "RequisitionNumber": {
            "type": "string",
            "nullable": true
          },
          "SubTotal": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "RequisitionPartNumber": {
        "type": "object",
        "properties": {
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "Quantity": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Reseller": {
        "type": "object",
        "properties": {
          "ReturnAddressAsRandmar": {
            "type": "boolean"
          },
          "CreditLimit": {
            "type": "number",
            "format": "double"
          },
          "AllowSystemIntegration": {
            "type": "integer",
            "format": "int32"
          },
          "CreationDate": {
            "type": "integer",
            "format": "int32"
          },
          "FiscalYearMonthStart": {
            "type": "integer",
            "format": "int32"
          },
          "LastInvoiceDate": {
            "type": "integer",
            "format": "int32"
          },
          "OnHold": {
            "type": "integer",
            "format": "int32"
          },
          "PriceProfile": {
            "type": "integer",
            "format": "int32"
          },
          "Returns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnOld"
            },
            "nullable": true
          },
          "CompletedOrderDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDetail"
            },
            "nullable": true
          },
          "ActiveOrderDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDetail"
            },
            "nullable": true
          },
          "Qualifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Qualification"
            },
            "nullable": true
          },
          "IsQualified": {
            "type": "boolean"
          },
          "QualifiedManufacturers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Manufacturer"
            },
            "nullable": true
          },
          "Qualification": {
            "$ref": "#/components/schemas/Qualification"
          },
          "SalesStatistics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalesStatistic"
            },
            "nullable": true
          },
          "SalesData": {
            "$ref": "#/components/schemas/SalesData"
          },
          "Statement": {
            "$ref": "#/components/schemas/Statement"
          },
          "About": {
            "type": "string",
            "nullable": true
          },
          "Address1": {
            "type": "string",
            "nullable": true
          },
          "Address2": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "ContactName": {
            "type": "string",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "nullable": true
          },
          "CurrencyCode": {
            "type": "string",
            "nullable": true
          },
          "DefaultWarehouse": {
            "type": "string",
            "nullable": true
          },
          "Domain": {
            "type": "string",
            "nullable": true
          },
          "Language": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Phone": {
            "type": "string",
            "nullable": true
          },
          "POEmail": {
            "type": "string",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "nullable": true
          },
          "PriceList": {
            "type": "string",
            "nullable": true
          },
          "Priority": {
            "type": "string",
            "nullable": true
          },
          "Province": {
            "type": "string",
            "nullable": true
          },
          "PublicEmail": {
            "type": "string",
            "nullable": true
          },
          "PublicName": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "ShippingProfile": {
            "type": "string",
            "nullable": true
          },
          "ShipVia": {
            "type": "string",
            "nullable": true
          },
          "ShipViaDescription": {
            "type": "string",
            "nullable": true
          },
          "Terms": {
            "type": "string",
            "nullable": true
          },
          "Website": {
            "type": "string",
            "nullable": true
          },
          "Opportunities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpportunityEntry"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ReturnOld": {
        "type": "object",
        "properties": {
          "Quantity": {
            "type": "integer",
            "format": "int32"
          },
          "Comments": {
            "type": "string",
            "nullable": true
          },
          "ContactEmail": {
            "type": "string",
            "nullable": true
          },
          "ContactName": {
            "type": "string",
            "nullable": true
          },
          "ContactPhone": {
            "type": "string",
            "nullable": true
          },
          "CreditNumber": {
            "type": "string",
            "nullable": true
          },
          "InvoiceNumber": {
            "type": "string",
            "nullable": true
          },
          "LastUpdatedDate": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "ReasonForReturn": {
            "type": "string",
            "nullable": true
          },
          "RequestDate": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ReturnNumber": {
            "type": "string",
            "nullable": true
          },
          "ReturnNumber1": {
            "type": "string",
            "nullable": true
          },
          "SerialNumbers": {
            "type": "string",
            "nullable": true
          },
          "ShipppingLabelOrderNumber": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "WarehouseLocation": {
            "type": "string",
            "nullable": true
          },
          "Invoice": {
            "$ref": "#/components/schemas/Invoice"
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentHeader"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ReturnPartNumbers": {
        "type": "object",
        "properties": {
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "Quantity": {
            "type": "integer",
            "format": "int32"
          },
          "ReasonForReturn": {
            "type": "string",
            "nullable": true
          },
          "SerialNumbers": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ReturnRequest": {
        "type": "object",
        "properties": {
          "InvoiceNumber": {
            "type": "string",
            "nullable": true
          },
          "ContactName": {
            "type": "string",
            "nullable": true
          },
          "ContactPhone": {
            "type": "string",
            "nullable": true
          },
          "ContactEmail": {
            "type": "string",
            "nullable": true
          },
          "Comments": {
            "type": "string",
            "nullable": true
          },
          "PartNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnPartNumbers"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Row": {
        "type": "object",
        "properties": {
          "Columns": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SalesData": {
        "type": "object",
        "properties": {
          "LastCalculated": {
            "type": "string",
            "format": "date-time"
          },
          "SalesYesterday": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "SalesLast7Days": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "SalesLast30Days": {
            "type": "number",
            "format": "double"
          },
          "SalesLast3Months": {
            "type": "number",
            "format": "double"
          },
          "SalesYearToDay": {
            "type": "number",
            "format": "double"
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SalesStatistic": {
        "type": "object",
        "properties": {
          "Day": {
            "type": "number",
            "format": "double"
          },
          "ExtendedPrice": {
            "type": "number",
            "format": "double"
          },
          "Quantity": {
            "type": "number",
            "format": "double"
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SceneAsset": {
        "type": "object",
        "properties": {
          "FileName": {
            "type": "string",
            "nullable": true
          },
          "FileType": {
            "type": "string",
            "nullable": true
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time"
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "ContentLength": {
            "type": "integer",
            "format": "int64"
          },
          "ContentType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SceneInformation": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Scene": {
            "$ref": "#/components/schemas/SceneAsset"
          },
          "Thumbnail": {
            "$ref": "#/components/schemas/SceneAsset"
          },
          "Preview": {
            "$ref": "#/components/schemas/SceneAsset"
          },
          "AmbientSound": {
            "$ref": "#/components/schemas/SceneAsset"
          }
        },
        "additionalProperties": false
      },
      "SearchResult": {
        "type": "object",
        "properties": {
          "Content": {
            "nullable": true
          },
          "ContentType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SendConversationImageRequest": {
        "required": [
          "StorageKey"
        ],
        "type": "object",
        "properties": {
          "StorageKey": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SendEmailRequest": {
        "type": "object",
        "properties": {
          "ToEmails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "ReplyTo": {
            "type": "string",
            "nullable": true
          },
          "Title": {
            "type": "string",
            "nullable": true
          },
          "BodyHtml": {
            "type": "string",
            "nullable": true
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentRequest"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SetConversationObjectiveRequest": {
        "required": [
          "Notes",
          "Objective"
        ],
        "type": "object",
        "properties": {
          "Reason": {
            "type": "string",
            "nullable": true
          },
          "Objective": {
            "minLength": 1,
            "type": "string"
          },
          "Notes": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SetPartnerAssistantJobScheduledTimeInput": {
        "type": "object",
        "properties": {
          "scheduledTimeSecondsUTC": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "Sheet": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Rows": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/components/schemas/Row"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ShipToDetails": {
        "type": "object",
        "properties": {
          "ShipTo": {
            "$ref": "#/components/schemas/ShipToLocation"
          },
          "Dates": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date-time"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ShipToLocation": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Street1": {
            "type": "string",
            "nullable": true
          },
          "Street2": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "Province": {
            "type": "string",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "nullable": true
          },
          "Po": {
            "type": "string",
            "nullable": true
          },
          "CustomerPo": {
            "type": "string",
            "nullable": true
          },
          "Comment": {
            "type": "string",
            "nullable": true
          },
          "ShippingSlipComment": {
            "type": "string",
            "nullable": true
          },
          "ContactName": {
            "type": "string",
            "nullable": true
          },
          "ContactPhone": {
            "type": "string",
            "nullable": true
          },
          "ContactEmail": {
            "type": "string",
            "nullable": true
          },
          "ContactWebsite": {
            "type": "string",
            "nullable": true
          },
          "ShippingMethodId": {
            "type": "string",
            "nullable": true
          },
          "ShippingTimeId": {
            "type": "string",
            "nullable": true
          },
          "ExpectedDateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "AllowPartialShipment": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ShipViaEstimate": {
        "type": "object",
        "properties": {
          "CarrierCode": {
            "type": "string",
            "nullable": true
          },
          "Carrier": {
            "type": "string",
            "nullable": true
          },
          "Price": {
            "type": "number",
            "format": "double"
          },
          "IsResidential": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Shipment": {
        "type": "object",
        "properties": {
          "OrderDate": {
            "type": "number",
            "format": "double"
          },
          "EndUserPONumber": {
            "type": "string",
            "nullable": true
          },
          "ShipVia": {
            "type": "string",
            "nullable": true
          },
          "ShipViaDescription": {
            "type": "string",
            "nullable": true
          },
          "TrackingNumber": {
            "type": "string",
            "nullable": true
          },
          "ShipToStreet1": {
            "type": "string",
            "nullable": true
          },
          "ShipToStreet2": {
            "type": "string",
            "nullable": true
          },
          "ShipToCity": {
            "type": "string",
            "nullable": true
          },
          "ShipToProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "ShipToCountry": {
            "type": "string",
            "nullable": true
          },
          "ShipToContactName": {
            "type": "string",
            "nullable": true
          },
          "ShipToContactPhone": {
            "type": "string",
            "nullable": true
          },
          "Terms": {
            "type": "string",
            "nullable": true
          },
          "RealShippingCost": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "TheoreticalWeight": {
            "type": "number",
            "format": "double"
          },
          "ShippingSlipComment": {
            "type": "string",
            "nullable": true
          },
          "SubTotal": {
            "type": "number",
            "format": "double"
          },
          "TaxAmount1": {
            "type": "number",
            "format": "double"
          },
          "TaxAmount2": {
            "type": "number",
            "format": "double"
          },
          "Total": {
            "type": "number",
            "format": "double"
          },
          "ExtendedPrice": {
            "type": "number",
            "format": "double"
          },
          "QuantityBackOrder": {
            "type": "number",
            "format": "double"
          },
          "QuantityOrdered": {
            "type": "number",
            "format": "double"
          },
          "QuantityShipped": {
            "type": "number",
            "format": "double"
          },
          "ShipmentDate": {
            "type": "number",
            "format": "double"
          },
          "UnitPrice": {
            "type": "number",
            "format": "double"
          },
          "UnitWeight": {
            "type": "number",
            "format": "double"
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerPartNumber": {
            "type": "string",
            "nullable": true
          },
          "OpportunityManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "OpportunityManufacturerNumber": {
            "type": "string",
            "nullable": true
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ShipmentNumber": {
            "type": "string",
            "nullable": true
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ShipmentAddress": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Street1": {
            "type": "string",
            "nullable": true
          },
          "Street2": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "Province": {
            "type": "string",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "nullable": true
          },
          "ContactName": {
            "type": "string",
            "nullable": true
          },
          "ContactPhone": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ShipmentDetails": {
        "type": "object",
        "properties": {
          "From": {
            "$ref": "#/components/schemas/ShipmentAddress"
          },
          "To": {
            "$ref": "#/components/schemas/ShipmentAddress"
          },
          "NumberOfBoxes": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "TotalWeight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "ReferenceNumber": {
            "type": "string",
            "nullable": true
          },
          "Carrier": {
            "type": "string",
            "nullable": true
          },
          "ToEmailAddress": {
            "type": "string",
            "nullable": true
          },
          "WithZPLThermalShippingLabels": {
            "type": "boolean"
          },
          "IsValid": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ShipmentHeader": {
        "type": "object",
        "properties": {
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "OrderNumber": {
            "type": "string",
            "nullable": true
          },
          "ShipmentNumber": {
            "type": "string",
            "nullable": true
          },
          "OrderDate": {
            "type": "integer",
            "format": "int32"
          },
          "ShipmentDate": {
            "type": "integer",
            "format": "int32"
          },
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "ShipVia": {
            "type": "string",
            "nullable": true
          },
          "ShipViaDescription": {
            "type": "string",
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "TrackingNumber": {
            "type": "string",
            "nullable": true
          },
          "PONumber": {
            "type": "string",
            "nullable": true
          },
          "EndUserPO": {
            "type": "string",
            "nullable": true
          },
          "LastEditDate": {
            "type": "integer",
            "format": "int32"
          },
          "LastEditTime": {
            "type": "integer",
            "format": "int32"
          },
          "ResellerName": {
            "type": "string",
            "nullable": true
          },
          "ShipToStreet1": {
            "type": "string",
            "nullable": true
          },
          "ShipToStreet2": {
            "type": "string",
            "nullable": true
          },
          "ShipToCity": {
            "type": "string",
            "nullable": true
          },
          "ShipToProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "ShipToCountry": {
            "type": "string",
            "nullable": true
          },
          "ResellerStreet1": {
            "type": "string",
            "nullable": true
          },
          "ResellerStreet2": {
            "type": "string",
            "nullable": true
          },
          "ResellerCity": {
            "type": "string",
            "nullable": true
          },
          "ResellerProvince": {
            "type": "string",
            "nullable": true
          },
          "ResellerPostalCode": {
            "type": "string",
            "nullable": true
          },
          "ResellerCountry": {
            "type": "string",
            "nullable": true
          },
          "EndUserPONumber": {
            "type": "string",
            "nullable": true
          },
          "Comments": {
            "type": "string",
            "nullable": true
          },
          "NumberOfShipments": {
            "type": "integer",
            "format": "int32"
          },
          "Terms": {
            "type": "string",
            "nullable": true
          },
          "ShipToContactName": {
            "type": "string",
            "nullable": true
          },
          "ShipToContactPhone": {
            "type": "string",
            "nullable": true
          },
          "ResellerPhone": {
            "type": "string",
            "nullable": true
          },
          "ShippingSlipComment": {
            "type": "string",
            "nullable": true
          },
          "TaxAmount1": {
            "type": "number",
            "format": "double"
          },
          "TaxRate1": {
            "type": "integer",
            "format": "int32"
          },
          "TaxAmount2": {
            "type": "number",
            "format": "double"
          },
          "TaxRate2": {
            "type": "integer",
            "format": "int32"
          },
          "SubTotal": {
            "type": "number",
            "format": "double"
          },
          "Total": {
            "type": "number",
            "format": "double"
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "BidNumber": {
            "type": "string",
            "nullable": true
          },
          "Priority": {
            "type": "string",
            "nullable": true
          },
          "TheoreticalWeight": {
            "type": "number",
            "format": "double"
          },
          "PublicName": {
            "type": "string",
            "nullable": true
          },
          "RealShippingCost": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Medias": {
            "type": "array",
            "items": { },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ShippingAddress": {
        "type": "object",
        "properties": {
          "ShipToName": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress1": {
            "type": "string",
            "nullable": true
          },
          "ShipToAddress2": {
            "type": "string",
            "nullable": true
          },
          "ShipToCity": {
            "type": "string",
            "nullable": true
          },
          "ShipToProvince": {
            "type": "string",
            "nullable": true
          },
          "ShipToPostalCode": {
            "type": "string",
            "nullable": true
          },
          "ShipToCountry": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ShippingMethod": {
        "type": "object",
        "properties": {
          "MethodId": {
            "type": "string",
            "nullable": true
          },
          "Label": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Fees": {
            "type": "number",
            "format": "double"
          },
          "Discount": {
            "type": "number",
            "format": "double"
          },
          "DiscountReason": {
            "type": "string",
            "nullable": true
          },
          "Order": {
            "type": "integer",
            "format": "int32"
          },
          "Date": {
            "type": "string",
            "format": "date-time"
          },
          "TimeId": {
            "type": "string",
            "nullable": true
          },
          "TimeLabel": {
            "type": "string",
            "nullable": true
          },
          "RealShippingCharges": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ShippingMethodApiResponse": {
        "type": "object",
        "properties": {
          "ShippingMethods": {
            "$ref": "#/components/schemas/ShippingMethodsInfo"
          }
        },
        "additionalProperties": false
      },
      "ShippingMethodsInfo": {
        "type": "object",
        "properties": {
          "CanChooseCustomMethod": {
            "type": "boolean"
          },
          "Methods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShippingMethod"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ShopifyAccountInformation": {
        "type": "object",
        "properties": {
          "HostName": {
            "type": "string",
            "nullable": true
          },
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "Scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "DefaultShippingSlipComment": {
            "type": "string",
            "nullable": true
          },
          "AdsGrowthStrategy": {
            "type": "string",
            "nullable": true
          },
          "AdvertisingBudgetPerDay": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "SyncOrders": {
            "type": "boolean"
          },
          "ShipComplete": {
            "type": "boolean"
          },
          "SyncProductInventory": {
            "type": "boolean"
          },
          "Shop": {
            "$ref": "#/components/schemas/ShopifyShop"
          },
          "Locations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShopifyLocation"
            },
            "nullable": true
          },
          "Webhooks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShopifyWebhook"
            },
            "nullable": true
          },
          "FulfillmentOrders": {
            "type": "array",
            "items": { },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ShopifyLocation": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "nullable": true
          },
          "ServiceName": {
            "type": "string",
            "nullable": true
          },
          "Handle": {
            "type": "string",
            "nullable": true
          },
          "FulfillmentOrdersOptIn": {
            "type": "boolean"
          },
          "IncludePendingStock": {
            "type": "boolean"
          },
          "ProviderId": {
            "nullable": true
          },
          "LocationId": {
            "type": "integer",
            "format": "int64"
          },
          "CallbackUrl": {
            "type": "string",
            "nullable": true
          },
          "TrackingSupport": {
            "type": "boolean"
          },
          "InventoryManagement": {
            "type": "boolean"
          },
          "AdminGraphqlApiId": {
            "type": "string",
            "nullable": true
          },
          "PermitsSkuSharing": {
            "type": "boolean"
          },
          "RequiresShippingMethod": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ShopifyShop": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "nullable": true
          },
          "Domain": {
            "type": "string",
            "nullable": true
          },
          "Province": {
            "type": "string",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "nullable": true
          },
          "Address1": {
            "type": "string",
            "nullable": true
          },
          "Zip": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "Source": {
            "type": "string",
            "nullable": true
          },
          "Phone": {
            "type": "string",
            "nullable": true
          },
          "Latitude": {
            "type": "number",
            "format": "double"
          },
          "Longitude": {
            "type": "number",
            "format": "double"
          },
          "PrimaryLocale": {
            "type": "string",
            "nullable": true
          },
          "Address2": {
            "type": "string",
            "nullable": true
          },
          "CreatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "UpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "CountryCode": {
            "type": "string",
            "nullable": true
          },
          "CountryName": {
            "type": "string",
            "nullable": true
          },
          "Currency": {
            "type": "string",
            "nullable": true
          },
          "CustomerEmail": {
            "type": "string",
            "nullable": true
          },
          "Timezone": {
            "type": "string",
            "nullable": true
          },
          "IanaTimezone": {
            "type": "string",
            "nullable": true
          },
          "ShopOwner": {
            "type": "string",
            "nullable": true
          },
          "MoneyFormat": {
            "type": "string",
            "nullable": true
          },
          "MoneyWithCurrencyFormat": {
            "type": "string",
            "nullable": true
          },
          "WeightUnit": {
            "type": "string",
            "nullable": true
          },
          "ProvinceCode": {
            "type": "string",
            "nullable": true
          },
          "TaxesIncluded": {
            "type": "boolean"
          },
          "AutoConfigureTaxInclusivity": {
            "type": "boolean"
          },
          "TaxShipping": {
            "type": "boolean"
          },
          "CountyTaxes": {
            "type": "boolean"
          },
          "PlanDisplayName": {
            "type": "string",
            "nullable": true
          },
          "PlanName": {
            "type": "string",
            "nullable": true
          },
          "HasDiscounts": {
            "type": "boolean"
          },
          "HasGiftCards": {
            "type": "boolean"
          },
          "MyshopifyDomain": {
            "type": "string",
            "nullable": true
          },
          "GoogleAppsDomain": {
            "nullable": true
          },
          "GoogleAppsLoginEnabled": {
            "nullable": true
          },
          "MoneyInEmailsFormat": {
            "type": "string",
            "nullable": true
          },
          "MoneyWithCurrencyInEmailsFormat": {
            "type": "string",
            "nullable": true
          },
          "EligibleForPayments": {
            "type": "boolean"
          },
          "RequiresExtraPaymentsAgreement": {
            "type": "boolean"
          },
          "PasswordEnabled": {
            "type": "boolean"
          },
          "HasStorefront": {
            "type": "boolean"
          },
          "Finances": {
            "type": "boolean"
          },
          "PrimaryLocationId": {
            "type": "integer",
            "format": "int64"
          },
          "CheckoutApiSupported": {
            "type": "boolean"
          },
          "MultiLocationEnabled": {
            "type": "boolean"
          },
          "SetupRequired": {
            "type": "boolean"
          },
          "PreLaunchEnabled": {
            "type": "boolean"
          },
          "EnabledPresentmentCurrencies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "MarketingSmsConsentEnabledAtCheckout": {
            "type": "boolean"
          },
          "TransactionalSmsDisabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ShopifyWebhook": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Address": {
            "type": "string",
            "nullable": true
          },
          "Topic": {
            "type": "string",
            "nullable": true
          },
          "CreatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "UpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "Format": {
            "type": "string",
            "nullable": true
          },
          "Fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "MetafieldNamespaces": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "ApiVersion": {
            "type": "string",
            "nullable": true
          },
          "PrivateMetafieldNamespaces": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "MetafieldIdentifiers": {
            "type": "array",
            "items": { },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SimplifiedFunctionCall": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Args": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SimplifiedFunctionResponse": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Content": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StandardOperatingProcedureFile": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Statement": {
        "type": "object",
        "properties": {
          "Over0": {
            "type": "number",
            "format": "double"
          },
          "Over30": {
            "type": "number",
            "format": "double"
          },
          "Over45": {
            "type": "number",
            "format": "double"
          },
          "Total": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "StatementDetail": {
        "type": "object",
        "properties": {
          "ResellerId": {
            "type": "string",
            "nullable": true
          },
          "AmountDue": {
            "type": "number",
            "format": "double"
          },
          "DocumentNumber": {
            "type": "string",
            "nullable": true
          },
          "DocumentDate": {
            "type": "integer",
            "format": "int32"
          },
          "TransactionType": {
            "type": "string",
            "nullable": true
          },
          "DiffDays": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StockTransfer": {
        "type": "object",
        "properties": {
          "TransferNumber": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "DocumentNumber": {
            "type": "string",
            "nullable": true
          },
          "TransferDate": {
            "type": "integer",
            "format": "int32"
          },
          "FromLocation": {
            "type": "string",
            "nullable": true
          },
          "ToLocation": {
            "type": "string",
            "nullable": true
          },
          "Reference": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Extensions.Primitives.StringValues, Microsoft.Extensions.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]]": {
        "type": "object",
        "properties": {
          "Key": {
            "type": "string",
            "nullable": true
          },
          "Value": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]": {
        "type": "object",
        "properties": {
          "Key": {
            "type": "string",
            "nullable": true
          },
          "Value": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "System.Collections.Generic.KeyValuePair`2[[System.Type, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]": {
        "type": "object",
        "properties": {
          "Key": {
            "type": "string",
            "nullable": true
          },
          "Value": {
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "System.Func`2[[Microsoft.AspNetCore.Mvc.ActionContext, Microsoft.AspNetCore.Mvc.Abstractions, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]": {
        "type": "object",
        "properties": {
          "HasSingleTarget": {
            "type": "boolean",
            "readOnly": true
          },
          "Target": {
            "nullable": true,
            "readOnly": true
          },
          "Method": {
            "$ref": "#/components/schemas/System.Reflection.MethodInfo"
          }
        },
        "additionalProperties": false
      },
      "System.Func`2[[Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata, Microsoft.AspNetCore.Mvc.Abstractions, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]": {
        "type": "object",
        "properties": {
          "HasSingleTarget": {
            "type": "boolean",
            "readOnly": true
          },
          "Target": {
            "nullable": true,
            "readOnly": true
          },
          "Method": {
            "$ref": "#/components/schemas/System.Reflection.MethodInfo"
          }
        },
        "additionalProperties": false
      },
      "System.IO.Pipelines.PipeWriter": {
        "type": "object",
        "properties": {
          "CanGetUnflushedBytes": {
            "type": "boolean",
            "readOnly": true
          },
          "UnflushedBytes": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.IServiceProvider": {
        "type": "object",
        "additionalProperties": false
      },
      "System.ModuleHandle": {
        "type": "object",
        "properties": {
          "MDStreamVersion": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.Net.IPAddress": {
        "type": "object",
        "properties": {
          "AddressFamily": {
            "$ref": "#/components/schemas/System.Net.Sockets.AddressFamily"
          },
          "ScopeId": {
            "type": "integer",
            "format": "int64"
          },
          "IsIPv6Multicast": {
            "type": "boolean",
            "readOnly": true
          },
          "IsIPv6LinkLocal": {
            "type": "boolean",
            "readOnly": true
          },
          "IsIPv6SiteLocal": {
            "type": "boolean",
            "readOnly": true
          },
          "IsIPv6Teredo": {
            "type": "boolean",
            "readOnly": true
          },
          "IsIPv6UniqueLocal": {
            "type": "boolean",
            "readOnly": true
          },
          "IsIPv4MappedToIPv6": {
            "type": "boolean",
            "readOnly": true
          },
          "Address": {
            "type": "integer",
            "format": "int64",
            "deprecated": true
          }
        },
        "additionalProperties": false
      },
      "System.Net.Sockets.AddressFamily": {
        "enum": [
          "Unspecified",
          "Unix",
          "InterNetwork",
          "ImpLink",
          "Pup",
          "Chaos",
          "Ipx",
          "Osi",
          "Ecma",
          "DataKit",
          "Ccitt",
          "Sna",
          "DecNet",
          "DataLink",
          "Lat",
          "HyperChannel",
          "AppleTalk",
          "NetBios",
          "VoiceView",
          "FireFox",
          "Banyan",
          "Atm",
          "InterNetworkV6",
          "Cluster",
          "Ieee12844",
          "Irda",
          "NetworkDesigners",
          "Max",
          "Packet",
          "ControllerAreaNetwork",
          "Unknown"
        ],
        "type": "string"
      },
      "System.ReadOnlyMemory`1[[System.Byte, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]": {
        "type": "object",
        "properties": {
          "Length": {
            "type": "integer",
            "format": "int32"
          },
          "IsEmpty": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.Reflection.Assembly": {
        "type": "object",
        "properties": {
          "DefinedTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "readOnly": true
          },
          "ExportedTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "readOnly": true
          },
          "CodeBase": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "deprecated": true
          },
          "EntryPoint": {
            "$ref": "#/components/schemas/System.Reflection.MethodInfo"
          },
          "FullName": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "ImageRuntimeVersion": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "IsDynamic": {
            "type": "boolean",
            "readOnly": true
          },
          "Location": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "ReflectionOnly": {
            "type": "boolean",
            "readOnly": true
          },
          "IsCollectible": {
            "type": "boolean",
            "readOnly": true
          },
          "IsFullyTrusted": {
            "type": "boolean",
            "readOnly": true
          },
          "CustomAttributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Reflection.CustomAttributeData"
            },
            "nullable": true,
            "readOnly": true
          },
          "EscapedCodeBase": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "deprecated": true
          },
          "ManifestModule": {
            "$ref": "#/components/schemas/System.Reflection.Module"
          },
          "Modules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Reflection.Module"
            },
            "nullable": true,
            "readOnly": true
          },
          "GlobalAssemblyCache": {
            "type": "boolean",
            "readOnly": true,
            "deprecated": true
          },
          "HostContext": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "SecurityRuleSet": {
            "$ref": "#/components/schemas/System.Security.SecurityRuleSet"
          }
        },
        "additionalProperties": false
      },
      "System.Reflection.CallingConventions": {
        "enum": [
          "Standard",
          "VarArgs",
          "Any",
          "HasThis",
          "ExplicitThis"
        ],
        "type": "string"
      },
      "System.Reflection.ConstructorInfo": {
        "type": "object",
        "properties": {
          "MemberType": {
            "$ref": "#/components/schemas/System.Reflection.MemberTypes"
          },
          "Attributes": {
            "$ref": "#/components/schemas/System.Reflection.MethodAttributes"
          },
          "MethodImplementationFlags": {
            "$ref": "#/components/schemas/System.Reflection.MethodImplAttributes"
          },
          "CallingConvention": {
            "$ref": "#/components/schemas/System.Reflection.CallingConventions"
          },
          "IsAbstract": {
            "type": "boolean",
            "readOnly": true
          },
          "IsConstructor": {
            "type": "boolean",
            "readOnly": true
          },
          "IsFinal": {
            "type": "boolean",
            "readOnly": true
          },
          "IsHideBySig": {
            "type": "boolean",
            "readOnly": true
          },
          "IsSpecialName": {
            "type": "boolean",
            "readOnly": true
          },
          "IsStatic": {
            "type": "boolean",
            "readOnly": true
          },
          "IsVirtual": {
            "type": "boolean",
            "readOnly": true
          },
          "IsAssembly": {
            "type": "boolean",
            "readOnly": true
          },
          "IsFamily": {
            "type": "boolean",
            "readOnly": true
          },
          "IsFamilyAndAssembly": {
            "type": "boolean",
            "readOnly": true
          },
          "IsFamilyOrAssembly": {
            "type": "boolean",
            "readOnly": true
          },
          "IsPrivate": {
            "type": "boolean",
            "readOnly": true
          },
          "IsPublic": {
            "type": "boolean",
            "readOnly": true
          },
          "IsConstructedGenericMethod": {
            "type": "boolean",
            "readOnly": true
          },
          "IsGenericMethod": {
            "type": "boolean",
            "readOnly": true
          },
          "IsGenericMethodDefinition": {
            "type": "boolean",
            "readOnly": true
          },
          "ContainsGenericParameters": {
            "type": "boolean",
            "readOnly": true
          },
          "MethodHandle": {
            "$ref": "#/components/schemas/System.RuntimeMethodHandle"
          },
          "IsSecurityCritical": {
            "type": "boolean",
            "readOnly": true
          },
          "IsSecuritySafeCritical": {
            "type": "boolean",
            "readOnly": true
          },
          "IsSecurityTransparent": {
            "type": "boolean",
            "readOnly": true
          },
          "Name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "DeclaringType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "ReflectedType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "Module": {
            "$ref": "#/components/schemas/System.Reflection.Module"
          },
          "CustomAttributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Reflection.CustomAttributeData"
            },
            "nullable": true,
            "readOnly": true
          },
          "IsCollectible": {
            "type": "boolean",
            "readOnly": true
          },
          "MetadataToken": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.Reflection.CustomAttributeData": {
        "type": "object",
        "properties": {
          "AttributeType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "Constructor": {
            "$ref": "#/components/schemas/System.Reflection.ConstructorInfo"
          },
          "ConstructorArguments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Reflection.CustomAttributeTypedArgument"
            },
            "nullable": true,
            "readOnly": true
          },
          "NamedArguments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Reflection.CustomAttributeNamedArgument"
            },
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.Reflection.CustomAttributeNamedArgument": {
        "type": "object",
        "properties": {
          "MemberInfo": {
            "$ref": "#/components/schemas/System.Reflection.MemberInfo"
          },
          "TypedValue": {
            "$ref": "#/components/schemas/System.Reflection.CustomAttributeTypedArgument"
          },
          "MemberName": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "IsField": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.Reflection.CustomAttributeTypedArgument": {
        "type": "object",
        "properties": {
          "ArgumentType": {
            "type": "string",
            "nullable": true
          },
          "Value": {
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "System.Reflection.ICustomAttributeProvider": {
        "type": "object",
        "additionalProperties": false
      },
      "System.Reflection.MemberInfo": {
        "type": "object",
        "properties": {
          "MemberType": {
            "$ref": "#/components/schemas/System.Reflection.MemberTypes"
          },
          "Name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "DeclaringType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "ReflectedType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "Module": {
            "$ref": "#/components/schemas/System.Reflection.Module"
          },
          "CustomAttributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Reflection.CustomAttributeData"
            },
            "nullable": true,
            "readOnly": true
          },
          "IsCollectible": {
            "type": "boolean",
            "readOnly": true
          },
          "MetadataToken": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.Reflection.MemberTypes": {
        "enum": [
          "Constructor",
          "Event",
          "Field",
          "Method",
          "Property",
          "TypeInfo",
          "Custom",
          "NestedType",
          "All"
        ],
        "type": "string"
      },
      "System.Reflection.MethodAttributes": {
        "enum": [
          "PrivateScope",
          "ReuseSlot, Private",
          "ReuseSlot, FamANDAssem",
          "ReuseSlot, Assembly",
          "ReuseSlot, Family",
          "ReuseSlot, FamORAssem",
          "ReuseSlot, Public",
          "ReuseSlot, MemberAccessMask",
          "ReuseSlot, UnmanagedExport",
          "ReuseSlot, Static",
          "ReuseSlot, Final",
          "ReuseSlot, Virtual",
          "ReuseSlot, HideBySig",
          "ReuseSlot, VtableLayoutMask",
          "ReuseSlot, CheckAccessOnOverride",
          "ReuseSlot, Abstract",
          "ReuseSlot, SpecialName",
          "ReuseSlot, RTSpecialName",
          "ReuseSlot, PinvokeImpl",
          "ReuseSlot, HasSecurity",
          "ReuseSlot, RequireSecObject",
          "ReuseSlot, ReservedMask"
        ],
        "type": "string"
      },
      "System.Reflection.MethodImplAttributes": {
        "enum": [
          "Managed",
          "Native",
          "OPTIL",
          "Runtime",
          "ManagedMask",
          "NoInlining",
          "ForwardRef",
          "Synchronized",
          "NoOptimization",
          "PreserveSig",
          "AggressiveInlining",
          "AggressiveOptimization",
          "InternalCall",
          "Async",
          "MaxMethodImplVal"
        ],
        "type": "string"
      },
      "System.Reflection.MethodInfo": {
        "type": "object",
        "properties": {
          "MemberType": {
            "$ref": "#/components/schemas/System.Reflection.MemberTypes"
          },
          "ReturnParameter": {
            "$ref": "#/components/schemas/System.Reflection.ParameterInfo"
          },
          "ReturnType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "ReturnTypeCustomAttributes": {
            "$ref": "#/components/schemas/System.Reflection.ICustomAttributeProvider"
          },
          "Attributes": {
            "$ref": "#/components/schemas/System.Reflection.MethodAttributes"
          },
          "MethodImplementationFlags": {
            "$ref": "#/components/schemas/System.Reflection.MethodImplAttributes"
          },
          "CallingConvention": {
            "$ref": "#/components/schemas/System.Reflection.CallingConventions"
          },
          "IsAbstract": {
            "type": "boolean",
            "readOnly": true
          },
          "IsConstructor": {
            "type": "boolean",
            "readOnly": true
          },
          "IsFinal": {
            "type": "boolean",
            "readOnly": true
          },
          "IsHideBySig": {
            "type": "boolean",
            "readOnly": true
          },
          "IsSpecialName": {
            "type": "boolean",
            "readOnly": true
          },
          "IsStatic": {
            "type": "boolean",
            "readOnly": true
          },
          "IsVirtual": {
            "type": "boolean",
            "readOnly": true
          },
          "IsAssembly": {
            "type": "boolean",
            "readOnly": true
          },
          "IsFamily": {
            "type": "boolean",
            "readOnly": true
          },
          "IsFamilyAndAssembly": {
            "type": "boolean",
            "readOnly": true
          },
          "IsFamilyOrAssembly": {
            "type": "boolean",
            "readOnly": true
          },
          "IsPrivate": {
            "type": "boolean",
            "readOnly": true
          },
          "IsPublic": {
            "type": "boolean",
            "readOnly": true
          },
          "IsConstructedGenericMethod": {
            "type": "boolean",
            "readOnly": true
          },
          "IsGenericMethod": {
            "type": "boolean",
            "readOnly": true
          },
          "IsGenericMethodDefinition": {
            "type": "boolean",
            "readOnly": true
          },
          "ContainsGenericParameters": {
            "type": "boolean",
            "readOnly": true
          },
          "MethodHandle": {
            "$ref": "#/components/schemas/System.RuntimeMethodHandle"
          },
          "IsSecurityCritical": {
            "type": "boolean",
            "readOnly": true
          },
          "IsSecuritySafeCritical": {
            "type": "boolean",
            "readOnly": true
          },
          "IsSecurityTransparent": {
            "type": "boolean",
            "readOnly": true
          },
          "Name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "DeclaringType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "ReflectedType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "Module": {
            "$ref": "#/components/schemas/System.Reflection.Module"
          },
          "CustomAttributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Reflection.CustomAttributeData"
            },
            "nullable": true,
            "readOnly": true
          },
          "IsCollectible": {
            "type": "boolean",
            "readOnly": true
          },
          "MetadataToken": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.Reflection.Module": {
        "type": "object",
        "properties": {
          "Assembly": {
            "$ref": "#/components/schemas/System.Reflection.Assembly"
          },
          "FullyQualifiedName": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "Name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "MDStreamVersion": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "ModuleVersionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "ScopeName": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "ModuleHandle": {
            "$ref": "#/components/schemas/System.ModuleHandle"
          },
          "CustomAttributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Reflection.CustomAttributeData"
            },
            "nullable": true,
            "readOnly": true
          },
          "MetadataToken": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.Reflection.ParameterAttributes": {
        "enum": [
          "None",
          "In",
          "Out",
          "Lcid",
          "Retval",
          "Optional",
          "HasDefault",
          "HasFieldMarshal",
          "Reserved3",
          "Reserved4",
          "ReservedMask"
        ],
        "type": "string"
      },
      "System.Reflection.ParameterInfo": {
        "type": "object",
        "properties": {
          "Attributes": {
            "$ref": "#/components/schemas/System.Reflection.ParameterAttributes"
          },
          "Member": {
            "$ref": "#/components/schemas/System.Reflection.MemberInfo"
          },
          "Name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "ParameterType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "Position": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "IsIn": {
            "type": "boolean",
            "readOnly": true
          },
          "IsLcid": {
            "type": "boolean",
            "readOnly": true
          },
          "IsOptional": {
            "type": "boolean",
            "readOnly": true
          },
          "IsOut": {
            "type": "boolean",
            "readOnly": true
          },
          "IsRetval": {
            "type": "boolean",
            "readOnly": true
          },
          "DefaultValue": {
            "nullable": true,
            "readOnly": true
          },
          "RawDefaultValue": {
            "nullable": true,
            "readOnly": true
          },
          "HasDefaultValue": {
            "type": "boolean",
            "readOnly": true
          },
          "CustomAttributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Reflection.CustomAttributeData"
            },
            "nullable": true,
            "readOnly": true
          },
          "MetadataToken": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.RuntimeMethodHandle": {
        "type": "object",
        "properties": {
          "Value": {
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.Security.Claims.Claim": {
        "type": "object",
        "properties": {
          "Issuer": {
            "type": "string",
            "nullable": true
          },
          "OriginalIssuer": {
            "type": "string",
            "nullable": true
          },
          "Properties": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "readOnly": true
          },
          "Subject": {
            "$ref": "#/components/schemas/System.Security.Claims.ClaimsIdentity"
          },
          "Type": {
            "type": "string",
            "nullable": true
          },
          "Value": {
            "type": "string",
            "nullable": true
          },
          "ValueType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "System.Security.Claims.ClaimsIdentity": {
        "type": "object",
        "properties": {
          "AuthenticationType": {
            "type": "string",
            "nullable": true
          },
          "IsAuthenticated": {
            "type": "boolean",
            "readOnly": true
          },
          "Actor": {
            "$ref": "#/components/schemas/System.Security.Claims.ClaimsIdentity"
          },
          "BootstrapContext": {
            "nullable": true
          },
          "Claims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Security.Claims.Claim"
            },
            "nullable": true
          },
          "Label": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "NameClaimType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "RoleClaimType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.Security.Claims.ClaimsPrincipal": {
        "type": "object",
        "properties": {
          "Claims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Security.Claims.Claim"
            },
            "nullable": true,
            "readOnly": true
          },
          "Identities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Security.Claims.ClaimsIdentity"
            },
            "nullable": true
          },
          "Identity": {
            "$ref": "#/components/schemas/System.Security.Principal.IIdentity"
          }
        },
        "additionalProperties": false
      },
      "System.Security.Cryptography.AsnEncodedData": {
        "type": "object",
        "properties": {
          "Oid": {
            "$ref": "#/components/schemas/System.Security.Cryptography.Oid"
          },
          "RawData": {
            "type": "string",
            "format": "byte",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "System.Security.Cryptography.AsymmetricAlgorithm": {
        "type": "object",
        "properties": {
          "KeySize": {
            "type": "integer",
            "format": "int32"
          },
          "LegalKeySizes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Security.Cryptography.KeySizes"
            },
            "nullable": true,
            "readOnly": true
          },
          "SignatureAlgorithm": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "KeyExchangeAlgorithm": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.Security.Cryptography.KeySizes": {
        "type": "object",
        "properties": {
          "MinSize": {
            "type": "integer",
            "format": "int32"
          },
          "MaxSize": {
            "type": "integer",
            "format": "int32"
          },
          "SkipSize": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "System.Security.Cryptography.Oid": {
        "type": "object",
        "properties": {
          "Value": {
            "type": "string",
            "nullable": true
          },
          "FriendlyName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "System.Security.Cryptography.X509Certificates.PublicKey": {
        "type": "object",
        "properties": {
          "EncodedKeyValue": {
            "$ref": "#/components/schemas/System.Security.Cryptography.AsnEncodedData"
          },
          "EncodedParameters": {
            "$ref": "#/components/schemas/System.Security.Cryptography.AsnEncodedData"
          },
          "Key": {
            "$ref": "#/components/schemas/System.Security.Cryptography.AsymmetricAlgorithm"
          },
          "Oid": {
            "$ref": "#/components/schemas/System.Security.Cryptography.Oid"
          }
        },
        "additionalProperties": false
      },
      "System.Security.Cryptography.X509Certificates.X500DistinguishedName": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "Oid": {
            "$ref": "#/components/schemas/System.Security.Cryptography.Oid"
          },
          "RawData": {
            "type": "string",
            "format": "byte",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "System.Security.Cryptography.X509Certificates.X509Certificate2": {
        "type": "object",
        "properties": {
          "Archived": {
            "type": "boolean"
          },
          "Extensions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/System.Security.Cryptography.X509Certificates.X509Extension"
            },
            "nullable": true,
            "readOnly": true
          },
          "FriendlyName": {
            "type": "string",
            "nullable": true
          },
          "HasPrivateKey": {
            "type": "boolean",
            "readOnly": true
          },
          "PrivateKey": {
            "$ref": "#/components/schemas/System.Security.Cryptography.AsymmetricAlgorithm"
          },
          "IssuerName": {
            "$ref": "#/components/schemas/System.Security.Cryptography.X509Certificates.X500DistinguishedName"
          },
          "NotAfter": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "NotBefore": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "PublicKey": {
            "$ref": "#/components/schemas/System.Security.Cryptography.X509Certificates.PublicKey"
          },
          "RawData": {
            "type": "string",
            "format": "byte",
            "nullable": true
          },
          "RawDataMemory": {
            "$ref": "#/components/schemas/System.ReadOnlyMemory`1[[System.Byte, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]"
          },
          "SerialNumber": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "SignatureAlgorithm": {
            "$ref": "#/components/schemas/System.Security.Cryptography.Oid"
          },
          "SubjectName": {
            "$ref": "#/components/schemas/System.Security.Cryptography.X509Certificates.X500DistinguishedName"
          },
          "Thumbprint": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "Version": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "Handle": { },
          "Issuer": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "Subject": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "SerialNumberBytes": {
            "$ref": "#/components/schemas/System.ReadOnlyMemory`1[[System.Byte, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]"
          }
        },
        "additionalProperties": false
      },
      "System.Security.Cryptography.X509Certificates.X509Extension": {
        "type": "object",
        "properties": {
          "Critical": {
            "type": "boolean"
          },
          "Oid": {
            "$ref": "#/components/schemas/System.Security.Cryptography.Oid"
          },
          "RawData": {
            "type": "string",
            "format": "byte",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "System.Security.Principal.IIdentity": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "AuthenticationType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "IsAuthenticated": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "System.Security.SecurityRuleSet": {
        "enum": [
          "None",
          "Level1",
          "Level2"
        ],
        "type": "string"
      },
      "System.Text.Json.JsonElement": {
        "type": "object",
        "properties": {
          "ValueKind": {
            "$ref": "#/components/schemas/System.Text.Json.JsonValueKind"
          }
        },
        "additionalProperties": false
      },
      "System.Text.Json.JsonValueKind": {
        "enum": [
          "Undefined",
          "Object",
          "Array",
          "String",
          "Number",
          "True",
          "False",
          "Null"
        ],
        "type": "string"
      },
      "System.Threading.CancellationToken": {
        "type": "object",
        "properties": {
          "IsCancellationRequested": {
            "type": "boolean",
            "readOnly": true
          },
          "CanBeCanceled": {
            "type": "boolean",
            "readOnly": true
          },
          "WaitHandle": {
            "$ref": "#/components/schemas/System.Threading.WaitHandle"
          }
        },
        "additionalProperties": false
      },
      "System.Threading.WaitHandle": {
        "type": "object",
        "properties": {
          "Handle": {
            "deprecated": true
          },
          "SafeWaitHandle": {
            "$ref": "#/components/schemas/Microsoft.Win32.SafeHandles.SafeWaitHandle"
          }
        },
        "additionalProperties": false
      },
      "TextToSpeechModel": {
        "type": "object",
        "properties": {
          "Caption": {
            "type": "string",
            "nullable": true
          },
          "VoiceName": {
            "type": "string",
            "nullable": true
          },
          "VoiceStyle": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TransactionHistory": {
        "type": "object",
        "properties": {
          "Quantity": {
            "type": "number",
            "format": "double"
          },
          "TransactionDate": {
            "type": "number",
            "format": "double"
          },
          "Category": {
            "type": "string",
            "nullable": true
          },
          "DocumentNumber": {
            "type": "string",
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "TransactionType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UPCEntry": {
        "type": "object",
        "properties": {
          "RandmarSKU": {
            "type": "string",
            "nullable": true
          },
          "UPC": {
            "type": "string",
            "nullable": true
          },
          "Unit": {
            "type": "string",
            "nullable": true
          },
          "Authorization": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateWorkflowProjectInput": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/WorkflowProjectStatus"
          },
          "Description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateWorkflowTaskInput": {
        "type": "object",
        "properties": {
          "Title": {
            "type": "string",
            "nullable": true
          },
          "Details": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/WorkflowTaskStatus"
          },
          "Priority": {
            "$ref": "#/components/schemas/WorkflowTaskPriority"
          },
          "DueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Assignee": {
            "type": "string",
            "nullable": true
          },
          "ResultText": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "User": {
        "type": "object",
        "properties": {
          "EmailAddress": {
            "type": "string",
            "nullable": true
          },
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Role": {
            "type": "string",
            "nullable": true
          },
          "Language": {
            "type": "string",
            "nullable": true
          },
          "Active": {
            "type": "boolean"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time"
          },
          "LastAuthentication": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserNotification"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UserNotification": {
        "type": "object",
        "properties": {
          "EmailAddress": {
            "type": "string",
            "nullable": true
          },
          "NotificationType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Vendor": {
        "type": "object",
        "properties": {
          "Address1": {
            "type": "string",
            "nullable": true
          },
          "Address2": {
            "type": "string",
            "nullable": true
          },
          "BalanceDue": {
            "type": "number",
            "format": "double"
          },
          "BankAccountInformation": {
            "type": "string",
            "nullable": true
          },
          "BankId": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "ContactEmail": {
            "type": "string",
            "nullable": true
          },
          "ContactPhone": {
            "type": "string",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "nullable": true
          },
          "CreationDate": {
            "type": "integer",
            "format": "int32"
          },
          "CurrencyCode": {
            "type": "string",
            "nullable": true
          },
          "DefaultTaxGroup": {
            "type": "string",
            "nullable": true
          },
          "GLAccount": {
            "type": "string",
            "nullable": true
          },
          "GLAccountName": {
            "type": "string",
            "nullable": true
          },
          "LastInvoiceDate": {
            "type": "integer",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "PaymentCode": {
            "type": "string",
            "nullable": true
          },
          "Phone": {
            "type": "string",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "nullable": true
          },
          "Province": {
            "type": "string",
            "nullable": true
          },
          "PublicName": {
            "type": "string",
            "nullable": true
          },
          "TermsCode": {
            "type": "string",
            "nullable": true
          },
          "VendorCode": {
            "type": "string",
            "nullable": true
          },
          "VendorGroup": {
            "type": "string",
            "nullable": true
          },
          "VendorGroupName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "VendorDocument": {
        "type": "object",
        "properties": {
          "AmountDue": {
            "type": "number",
            "format": "double"
          },
          "AppliedAmount": {
            "type": "number",
            "format": "double"
          },
          "DocumentType": {
            "type": "string",
            "nullable": true
          },
          "DueDate": {
            "type": "integer",
            "format": "int32"
          },
          "EnteredDate": {
            "type": "integer",
            "format": "int32"
          },
          "InvoiceDate": {
            "type": "integer",
            "format": "int32"
          },
          "InvoiceNumber": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerId": {
            "type": "string",
            "nullable": true
          },
          "ManufacturerName": {
            "type": "string",
            "nullable": true
          },
          "PaiementDate": {
            "type": "integer",
            "format": "int32"
          },
          "Payed": {
            "type": "integer",
            "format": "int32"
          },
          "PurchaseOrderNumber": {
            "type": "string",
            "nullable": true
          },
          "SubTotal": {
            "type": "number",
            "format": "double"
          },
          "TaxAmount1": {
            "type": "number",
            "format": "double"
          },
          "TaxAmount2": {
            "type": "number",
            "format": "double"
          },
          "TaxRate1": {
            "type": "number",
            "format": "double"
          },
          "TaxRate2": {
            "type": "number",
            "format": "double"
          },
          "TermsCode": {
            "type": "string",
            "nullable": true
          },
          "Total": {
            "type": "number",
            "format": "double"
          },
          "VendorId": {
            "type": "string",
            "nullable": true
          },
          "VendorName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "VideoGenerationResult": {
        "type": "object",
        "properties": {
          "Text": {
            "type": "string",
            "nullable": true
          },
          "Videos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GeneratedVideo"
            },
            "nullable": true
          },
          "ContextUtilization": {
            "type": "number",
            "format": "float"
          }
        },
        "additionalProperties": false
      },
      "Warehouse": {
        "type": "object",
        "properties": {
          "WarehouseId": {
            "type": "string",
            "nullable": true
          },
          "ApplicationId": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "string",
            "nullable": true
          },
          "WarehouseType": {
            "type": "string",
            "nullable": true
          },
          "IntegrationKeyName": {
            "type": "string",
            "nullable": true
          },
          "MaxInventoryValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "MaxInventoryCubicMeter": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Address1": {
            "type": "string",
            "nullable": true
          },
          "Address2": {
            "type": "string",
            "nullable": true
          },
          "City": {
            "type": "string",
            "nullable": true
          },
          "Province": {
            "type": "string",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "nullable": true
          },
          "ContactPhone": {
            "type": "string",
            "nullable": true
          },
          "ContactEmail": {
            "type": "string",
            "nullable": true
          },
          "ContactName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WorkflowProject": {
        "type": "object",
        "properties": {
          "ProjectId": {
            "type": "string",
            "format": "uuid"
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/WorkflowProjectStatus"
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "CreatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "UpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentHeader"
            },
            "nullable": true
          },
          "Tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowTask"
            },
            "nullable": true
          },
          "Owner": {
            "type": "string",
            "nullable": true
          },
          "Logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogEntry"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WorkflowProjectStatus": {
        "enum": [
          "Draft",
          "Active",
          "Completed",
          "Archived"
        ],
        "type": "string"
      },
      "WorkflowProjectSummary": {
        "type": "object",
        "properties": {
          "ProjectId": {
            "type": "string",
            "format": "uuid"
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/WorkflowProjectStatus"
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "CreatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "UpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "TaskCount": {
            "type": "integer",
            "format": "int32"
          },
          "Owner": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WorkflowTask": {
        "type": "object",
        "properties": {
          "TaskId": {
            "type": "string",
            "format": "uuid"
          },
          "ProjectId": {
            "type": "string",
            "format": "uuid"
          },
          "SortOrder": {
            "type": "integer",
            "format": "int32"
          },
          "Title": {
            "type": "string",
            "nullable": true
          },
          "Details": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "$ref": "#/components/schemas/WorkflowTaskStatus"
          },
          "Priority": {
            "$ref": "#/components/schemas/WorkflowTaskPriority"
          },
          "DueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Assignee": {
            "type": "string",
            "nullable": true
          },
          "ResultText": {
            "type": "string",
            "nullable": true
          },
          "CreatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "UpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentHeader"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WorkflowTaskPriority": {
        "enum": [
          "high",
          "medium",
          "low"
        ],
        "type": "string"
      },
      "WorkflowTaskStatus": {
        "enum": [
          "To do",
          "in progress",
          "done",
          "hold"
        ],
        "type": "string"
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "For integration keys, use the exact KeyName as client_id and the key secret as client_secret. For a Shopify integration, use the registered store domain (for example, example-store.myshopify.com) as client_id. Do not use the partner application ID. Request a Bearer token using grant_type=client_credentials.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://auth.randmar.io/connect/token",
            "scopes": { }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "AdsPlatforms"
    },
    {
      "name": "Agency"
    },
    {
      "name": "Attachment"
    },
    {
      "name": "Attachments"
    },
    {
      "name": "Billing"
    },
    {
      "name": "BusinessDevelopment"
    },
    {
      "name": "Cart"
    },
    {
      "name": "Carts"
    },
    {
      "name": "Categories"
    },
    {
      "name": "Category"
    },
    {
      "name": "CurrentUser"
    },
    {
      "name": "Customer"
    },
    {
      "name": "Document"
    },
    {
      "name": "Documents"
    },
    {
      "name": "DraftPurchases"
    },
    {
      "name": "Email"
    },
    {
      "name": "GeneralDocument"
    },
    {
      "name": "GeneralDocuments"
    },
    {
      "name": "Generation"
    },
    {
      "name": "GenerationV2"
    },
    {
      "name": "GoogleAds"
    },
    {
      "name": "IntegrationKey"
    },
    {
      "name": "IntegrationKeys"
    },
    {
      "name": "Inventory"
    },
    {
      "name": "Job"
    },
    {
      "name": "Jobs"
    },
    {
      "name": "Logs"
    },
    {
      "name": "Manufacturer"
    },
    {
      "name": "ManufacturerReturnRequests"
    },
    {
      "name": "Manufacturers"
    },
    {
      "name": "Media"
    },
    {
      "name": "MicrosoftAds"
    },
    {
      "name": "Niche"
    },
    {
      "name": "Opportunities"
    },
    {
      "name": "Opportunity"
    },
    {
      "name": "Order"
    },
    {
      "name": "Orders"
    },
    {
      "name": "Partner"
    },
    {
      "name": "Product"
    },
    {
      "name": "Products"
    },
    {
      "name": "Public"
    },
    {
      "name": "PurchaseOrder"
    },
    {
      "name": "RandmarSubscription"
    },
    {
      "name": "Report"
    },
    {
      "name": "Requisition"
    },
    {
      "name": "Reseller"
    },
    {
      "name": "Resellers"
    },
    {
      "name": "Return"
    },
    {
      "name": "Returns"
    },
    {
      "name": "Search"
    },
    {
      "name": "ShippingLabel"
    },
    {
      "name": "Shopify"
    },
    {
      "name": "StripeCheckout"
    },
    {
      "name": "User"
    },
    {
      "name": "Users"
    },
    {
      "name": "Utilities"
    },
    {
      "name": "Vendor"
    },
    {
      "name": "Warehouse"
    },
    {
      "name": "Warehouses"
    },
    {
      "name": "Workflow"
    }
  ]
}