{
  "openapi": "3.1.1",
  "info": {
    "title": "Specify store API",
    "description": "A store's own systems — an ERP, a production system, a warehouse — reading its orders and structured requests, driving orders through their states, and reading and setting stock, with a store API key the merchant issues in their admin (Settings → API keys). Send it as 'Authorization: Bearer msk.…'. The key names the store, so no route takes one. A key is issued with scopes — orders:read, orders:write, stock:read, stock:write, opportunities:read — and every route says which it needs; a key without it gets 403 with code scope_missing. Changed orders: GET /api/store/v1/orders?updatedSince= answers oldest change first, paged by cursor. changedAt is the time of the save, and two saves can commit in the opposite order, so resume a few minutes before the last changedAt you stored and de-duplicate on (orderId, changedAt). Stock for many products at once: PUT /api/store/v1/products/stock, up to 100 a call, each set on its own and reported as set, not_found, invalid or conflict. Every count in the store: GET /api/store/v1/products/stock, in SKU order, paged by cursor, up to 100 products and 1,000 counts a page; each page is read when asked for, so a count can move between pages. For pushes instead of polling, register a webhook: order.placed, order.paid, order.cancelled, order.shipped and opportunity.recorded carry ids, and this API reads the rest. Version in the path; v1 changes are additive only. Each key has its own budget of 240 requests a minute; past it, 429.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api-dev.specify.digital/"
    }
  ],
  "paths": {
    "/api/store/v1/orders": {
      "get": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "updatedSince",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreOrderPageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/orders/{id}": {
      "get": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderStatusResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/orders/{id}/available-actions": {
      "get": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailableActionsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/orders/{id}/lines/{lineId}/docket": {
      "get": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "lineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductionDocketResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/orders/{id}/accept": {
      "post": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderStateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/orders/{id}/start-manufacturing": {
      "post": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderStateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/orders/{id}/mark-ready-to-ship": {
      "post": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderStateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/orders/{id}/mark-delivered": {
      "post": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderStateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/orders/{id}/complete": {
      "post": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderStateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/orders/{id}/ship": {
      "post": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderStateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/orders/{id}/cancel": {
      "post": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderStateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/products/{sku}/stock": {
      "get": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "sku",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductStockResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "sku",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetProductStockRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductStockResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/products/stock": {
      "get": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreStockPageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Specify.Api"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreStockBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreStockBatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/opportunities": {
      "get": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpportunityQueue"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/v1/opportunities/{id}": {
      "get": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodedErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpportunityBrief"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AvailableActionsResponse": {
        "required": [
          "actions"
        ],
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BlockingRule": {
        "required": [
          "constraintKey",
          "kind",
          "title",
          "reason",
          "customerMessage",
          "reviewDueAt"
        ],
        "type": "object",
        "properties": {
          "constraintKey": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "customerMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewDueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "BriefAttachment": {
        "required": [
          "publicId",
          "fileName",
          "mimeType"
        ],
        "type": "object",
        "properties": {
          "publicId": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          }
        }
      },
      "BriefDecision": {
        "required": [
          "decisionRecordId",
          "outcome",
          "reasoning",
          "decidedByConstraint",
          "capabilityMapVersion",
          "decidedAt",
          "supersedesDecisionRecordId",
          "isSuperseded"
        ],
        "type": "object",
        "properties": {
          "decisionRecordId": {
            "type": "string",
            "format": "uuid"
          },
          "outcome": {
            "type": "string"
          },
          "reasoning": {
            "type": "string"
          },
          "decidedByConstraint": {
            "type": "boolean"
          },
          "capabilityMapVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time"
          },
          "supersedesDecisionRecordId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "isSuperseded": {
            "type": "boolean"
          },
          "referredTo": {
            "type": [
              "null",
              "string"
            ]
          },
          "referralDueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "referralOverdue": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "BriefResponse": {
        "required": [
          "customerResponseId",
          "decisionRecordId",
          "outcome",
          "status",
          "wasSent",
          "isResolved",
          "sentAt",
          "viewedAt",
          "respondedAt",
          "expiresAt",
          "failureReason"
        ],
        "type": "object",
        "properties": {
          "customerResponseId": {
            "type": "string",
            "format": "uuid"
          },
          "decisionRecordId": {
            "type": "string",
            "format": "uuid"
          },
          "outcome": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "wasSent": {
            "type": "boolean"
          },
          "isResolved": {
            "type": "boolean"
          },
          "sentAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "viewedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "respondedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "failureReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "agreedPriceAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "agreedPriceCurrency": {
            "type": [
              "null",
              "string"
            ]
          },
          "agreedPriceExpiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "agreedPriceOrderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "failure": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BriefResponseFailure"
              }
            ]
          }
        }
      },
      "BriefResponseFailure": {
        "required": [
          "code",
          "sentence",
          "detail"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "sentence": {
            "type": "string"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "BriefSelection": {
        "required": [
          "dimensionKey",
          "valueKeys",
          "magnitude",
          "unit"
        ],
        "type": "object",
        "properties": {
          "dimensionKey": {
            "type": "string"
          },
          "valueKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "magnitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "unit": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestedValue": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "BriefUnknown": {
        "required": [
          "dimensionKey",
          "question",
          "isBlocking"
        ],
        "type": "object",
        "properties": {
          "dimensionKey": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "isBlocking": {
            "type": "boolean"
          }
        }
      },
      "CancelOrderRequest": {
        "required": [
          "reason",
          "note"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "customerRefundedElsewhere": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "CodedErrorResponse": {
        "required": [
          "code",
          "error"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "values": {
            "type": [
              "null",
              "object"
            ]
          }
        }
      },
      "ErrorResponse": {
        "required": [
          "error"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "LowStockAlertRequest": {
        "required": [
          "level"
        ],
        "type": "object",
        "properties": {
          "level": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "OpportunityBrief": {
        "required": [
          "structuredOpportunityId",
          "merchantSlug",
          "asOf",
          "status",
          "words",
          "contactEmail",
          "contactName",
          "productSlug",
          "capabilityMapKey",
          "capabilityMapVersion",
          "likelyPath",
          "waitingParty",
          "waitingSince",
          "daysWaiting",
          "openedAt",
          "nextQuestion",
          "abandonedAtDimensionKey",
          "requestedSelections",
          "unknowns",
          "acceptableAlternatives",
          "verdict",
          "decisions",
          "responses"
        ],
        "type": "object",
        "properties": {
          "structuredOpportunityId": {
            "type": "string",
            "format": "uuid"
          },
          "merchantSlug": {
            "type": "string"
          },
          "asOf": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "words": {
            "type": "string"
          },
          "contactEmail": {
            "type": [
              "null",
              "string"
            ]
          },
          "contactName": {
            "type": [
              "null",
              "string"
            ]
          },
          "productSlug": {
            "type": [
              "null",
              "string"
            ]
          },
          "capabilityMapKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "capabilityMapVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "likelyPath": {
            "type": "string"
          },
          "waitingParty": {
            "type": "string"
          },
          "waitingSince": {
            "type": "string",
            "format": "date-time"
          },
          "daysWaiting": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "openedAt": {
            "type": "string",
            "format": "date-time"
          },
          "nextQuestion": {
            "type": [
              "null",
              "string"
            ]
          },
          "abandonedAtDimensionKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestedSelections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefSelection"
            }
          },
          "unknowns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefUnknown"
            }
          },
          "acceptableAlternatives": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "verdict": {
            "$ref": "#/components/schemas/OpportunityVerdict"
          },
          "decisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefDecision"
            }
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefResponse"
            }
          },
          "attachments": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/BriefAttachment"
            }
          },
          "requestedQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "contactBouncedBefore": {
            "type": "boolean",
            "default": false
          },
          "storeCurrency": {
            "type": [
              "null",
              "string"
            ]
          },
          "intent": {
            "type": [
              "null",
              "string"
            ]
          },
          "rowsNeedingMerchantPrice": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "designEstimate": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OpportunityDesignEstimate"
              }
            ]
          },
          "dateRowKeys": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "OpportunityDesignEstimate": {
        "required": [
          "low",
          "high",
          "currency",
          "finalPriceBasis",
          "estimateConfirmedOn",
          "specificationVersion"
        ],
        "type": "object",
        "properties": {
          "low": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "high": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": "string"
          },
          "finalPriceBasis": {
            "type": "string"
          },
          "estimateConfirmedOn": {
            "type": "string",
            "format": "date"
          },
          "specificationVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "OpportunityNotEvaluatedReason": {
        "required": [
          "code",
          "sentence",
          "capabilityMapKey"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "sentence": {
            "type": "string"
          },
          "capabilityMapKey": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OpportunityQueue": {
        "required": [
          "merchantSlug",
          "asOf",
          "openCount",
          "waiting",
          "overdueReferrals",
          "overdueReferralCount"
        ],
        "type": "object",
        "properties": {
          "merchantSlug": {
            "type": "string"
          },
          "asOf": {
            "type": "string",
            "format": "date-time"
          },
          "openCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "waiting": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueuedOpportunity"
            }
          },
          "overdueReferrals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OverdueReferral"
            }
          },
          "overdueReferralCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "overdueRequestCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          }
        }
      },
      "OpportunityVerdict": {
        "required": [
          "evaluated",
          "notEvaluatedReason",
          "currentCapabilityMapVersion",
          "isOffered",
          "needsApproval",
          "needsMoreInformation",
          "leadTimeWorkingDays",
          "blocking",
          "requiringApproval",
          "unknownDimensionKeys"
        ],
        "type": "object",
        "properties": {
          "evaluated": {
            "type": "boolean"
          },
          "notEvaluatedReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "currentCapabilityMapVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isOffered": {
            "type": "boolean"
          },
          "needsApproval": {
            "type": "boolean"
          },
          "needsMoreInformation": {
            "type": "boolean"
          },
          "leadTimeWorkingDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "blocking": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlockingRule"
            }
          },
          "requiringApproval": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlockingRule"
            }
          },
          "unknownDimensionKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notEvaluated": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OpportunityNotEvaluatedReason"
              }
            ]
          }
        }
      },
      "OrderAnswerResponse": {
        "required": [
          "dueDate",
          "dueAt",
          "overdue"
        ],
        "type": "object",
        "properties": {
          "dueDate": {
            "type": "string",
            "format": "date"
          },
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "overdue": {
            "type": "boolean"
          }
        }
      },
      "OrderCancellationResponse": {
        "required": [
          "reason",
          "note",
          "cancelledAt",
          "by",
          "unpaidDays"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "cancelledAt": {
            "type": "string",
            "format": "date-time"
          },
          "by": {
            "type": [
              "null",
              "string"
            ]
          },
          "unpaidDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "OrderDiscountResponse": {
        "required": [
          "amount",
          "label",
          "source"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "label": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "OrderDisputeResponse": {
        "required": [
          "status",
          "closed",
          "amount",
          "disputedAt",
          "evidenceDueBy",
          "paymentUrl"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "closed": {
            "type": "boolean"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "disputedAt": {
            "type": "string",
            "format": "date-time"
          },
          "evidenceDueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "paymentUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OrderEstimateResponse": {
        "required": [
          "basis",
          "date",
          "makeTimeWorkingDays",
          "revisedAt",
          "late"
        ],
        "type": "object",
        "properties": {
          "basis": {
            "type": "string"
          },
          "date": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "makeTimeWorkingDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "revisedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "late": {
            "type": "boolean"
          },
          "dispatchWorkingDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "transitMinWorkingDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "transitMaxWorkingDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "deliveryFrom": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "deliveryTo": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "restockExpectedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "OrderLineAllergensResponse": {
        "required": [
          "contains"
        ],
        "type": "object",
        "properties": {
          "contains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "OrderLineBottleResponse": {
        "required": [
          "productSlug",
          "design"
        ],
        "type": "object",
        "properties": {
          "productSlug": {
            "type": "string"
          },
          "design": {
            "type": "string"
          }
        }
      },
      "OrderLineResponse": {
        "required": [
          "id",
          "sku",
          "title",
          "unitPriceAmount",
          "unitPriceCurrencyCode",
          "quantity",
          "specification",
          "workflowType",
          "imageUrl"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "unitPriceAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unitPriceCurrencyCode": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "specification": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SpecificationResponse"
              }
            ]
          },
          "workflowType": {
            "type": "string"
          },
          "imageUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "backordered": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "purchase": {
            "type": "string",
            "default": "item"
          },
          "bottle": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderLineBottleResponse"
              }
            ]
          },
          "sampledIn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderLineSampledInResponse"
              }
            ]
          },
          "allergens": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderLineAllergensResponse"
              }
            ]
          }
        }
      },
      "OrderLineSampledInResponse": {
        "required": [
          "orderId",
          "placedAt"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "placedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrderReviewFlagResponse": {
        "required": [
          "flaggedAt",
          "reasons",
          "clearedAt",
          "needsReview"
        ],
        "type": "object",
        "properties": {
          "flaggedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "clearedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "needsReview": {
            "type": "boolean"
          },
          "providerReviewClosedAs": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OrderRevisionResponse": {
        "required": [
          "id",
          "status",
          "revisedTotalAmount",
          "revisedTotalCurrencyCode",
          "merchantNote",
          "revisedEstimatedDelivery",
          "proposedAt",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "revisedTotalAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "revisedTotalCurrencyCode": {
            "type": "string"
          },
          "merchantNote": {
            "type": "string"
          },
          "revisedEstimatedDelivery": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "proposedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "OrderStateResponse": {
        "required": [
          "orderId",
          "state"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string"
          }
        }
      },
      "OrderStatusResponse": {
        "required": [
          "orderId",
          "merchantId",
          "customerEmail",
          "state",
          "workflowType",
          "merchantReviewRequired",
          "effectiveTotalAmount",
          "effectiveTotalCurrencyCode",
          "payableTotalAmount",
          "shippingCostAmount",
          "shippingCostCurrencyCode",
          "lines",
          "pendingRevision",
          "trackingReference",
          "placedAt"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "merchantId": {
            "type": "string",
            "format": "uuid"
          },
          "customerEmail": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "workflowType": {
            "type": "string"
          },
          "merchantReviewRequired": {
            "type": "boolean"
          },
          "effectiveTotalAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "effectiveTotalCurrencyCode": {
            "type": "string"
          },
          "payableTotalAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "shippingCostAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "shippingCostCurrencyCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLineResponse"
            }
          },
          "pendingRevision": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderRevisionResponse"
              }
            ]
          },
          "trackingReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "placedAt": {
            "type": "string",
            "format": "date-time"
          },
          "netTotalAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "taxAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "taxRatePercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "taxName": {
            "type": [
              "null",
              "string"
            ]
          },
          "pricesIncludeTax": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "customerContactFailedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "shippingAddress": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ShippingAddressResponse"
              }
            ]
          },
          "customerNote": {
            "type": [
              "null",
              "string"
            ]
          },
          "marketKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "marketName": {
            "type": [
              "null",
              "string"
            ]
          },
          "deliveredAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "deliverySource": {
            "type": [
              "null",
              "string"
            ]
          },
          "refundOnCancelAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "cancellationRefundAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "cancellationRefundedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "reviewFlag": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderReviewFlagResponse"
              }
            ]
          },
          "cancellationRefundedElsewhereAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "latePaymentRefundAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "latePaymentRefundedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "duplicatePaymentRefundAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "duplicatePaymentRefundedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "answer": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderAnswerResponse"
              }
            ]
          },
          "estimate": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderEstimateResponse"
              }
            ]
          },
          "discounts": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/OrderDiscountResponse"
            }
          },
          "statedCountry": {
            "type": [
              "null",
              "string"
            ]
          },
          "cancellationRefundStartedAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "cancellationRefundConfirmationLost": {
            "type": "boolean",
            "default": false
          },
          "dispute": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderDisputeResponse"
              }
            ]
          },
          "cancellation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderCancellationResponse"
              }
            ]
          },
          "trackingCarrier": {
            "type": [
              "null",
              "string"
            ]
          },
          "trackingUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "cancelledBeforeAnyPayment": {
            "type": "boolean",
            "default": false
          },
          "timeline": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/OrderTimelineEntryResponse"
            }
          },
          "taxRefundedAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "taxKeptAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "OrderTimelineEntryResponse": {
        "required": [
          "step",
          "at",
          "by",
          "amount",
          "currencyCode"
        ],
        "type": "object",
        "properties": {
          "step": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "by": {
            "type": [
              "null",
              "string"
            ]
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currencyCode": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OverdueReferral": {
        "required": [
          "structuredOpportunityId",
          "decisionRecordId",
          "referredTo",
          "referralDueBy",
          "daysOverdue"
        ],
        "type": "object",
        "properties": {
          "structuredOpportunityId": {
            "type": "string",
            "format": "uuid"
          },
          "decisionRecordId": {
            "type": "string",
            "format": "uuid"
          },
          "referredTo": {
            "type": "string"
          },
          "referralDueBy": {
            "type": "string",
            "format": "date"
          },
          "daysOverdue": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ProductionDocketAllergensResponse": {
        "required": [
          "state",
          "contains",
          "undeclared"
        ],
        "type": "object",
        "properties": {
          "state": {
            "type": "string"
          },
          "contains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "undeclared": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductionDocketUndeclaredChoiceResponse"
            }
          }
        }
      },
      "ProductionDocketDesignEstimateResponse": {
        "required": [
          "low",
          "high",
          "currency",
          "finalPriceBasis",
          "estimateConfirmedOn"
        ],
        "type": "object",
        "properties": {
          "low": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "high": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": "string"
          },
          "finalPriceBasis": {
            "type": "string"
          },
          "estimateConfirmedOn": {
            "type": "string"
          }
        }
      },
      "ProductionDocketExportResponse": {
        "required": [
          "format",
          "payload"
        ],
        "type": "object",
        "properties": {
          "format": {
            "type": "string"
          },
          "payload": {
            "type": "string"
          }
        }
      },
      "ProductionDocketLineResponse": {
        "required": [
          "rowKey",
          "rowLabel",
          "optionKey",
          "optionLabel",
          "manufacturerValue",
          "categoryKey",
          "unitOfMeasure",
          "rank",
          "rankLabel",
          "itemRowKey",
          "itemRowLabel",
          "itemId",
          "itemIndex",
          "itemQuantity"
        ],
        "type": "object",
        "properties": {
          "rowKey": {
            "type": "string"
          },
          "rowLabel": {
            "type": "string"
          },
          "optionKey": {
            "type": "string"
          },
          "optionLabel": {
            "type": "string"
          },
          "manufacturerValue": {
            "type": [
              "null",
              "string"
            ]
          },
          "categoryKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "unitOfMeasure": {
            "type": [
              "null",
              "string"
            ]
          },
          "rank": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rankLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "itemRowKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "itemRowLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "itemId": {
            "type": [
              "null",
              "string"
            ]
          },
          "itemIndex": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "itemQuantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "costBand": {
            "type": [
              "null",
              "string"
            ]
          },
          "costEstimateLow": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "costEstimateHigh": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "costEstimateCurrency": {
            "type": [
              "null",
              "string"
            ]
          },
          "acceptedAsSuggested": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "costFinalPriceBasis": {
            "type": [
              "null",
              "string"
            ]
          },
          "costEstimateConfirmedOn": {
            "type": [
              "null",
              "string"
            ]
          },
          "yesNo": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "ProductionDocketMeasureResponse": {
        "required": [
          "key",
          "label",
          "unit",
          "total"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unitLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "unitLabelOne": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProductionDocketResponse": {
        "required": [
          "orderId",
          "orderLineId",
          "sku",
          "title",
          "quantity",
          "availability",
          "specificationNumber",
          "specificationTitle",
          "productSlug",
          "definitionVersion",
          "lines",
          "measures",
          "export"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "orderLineId": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "availability": {
            "type": "string"
          },
          "specificationNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "specificationTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "productSlug": {
            "type": [
              "null",
              "string"
            ]
          },
          "definitionVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lines": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ProductionDocketLineResponse"
            }
          },
          "measures": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ProductionDocketMeasureResponse"
            }
          },
          "export": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProductionDocketExportResponse"
              }
            ]
          },
          "purchase": {
            "type": "string",
            "default": "item"
          },
          "allergens": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProductionDocketAllergensResponse"
              }
            ]
          },
          "designEstimate": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProductionDocketDesignEstimateResponse"
              }
            ]
          }
        }
      },
      "ProductionDocketUndeclaredChoiceResponse": {
        "required": [
          "rowKey",
          "rowLabel",
          "optionKey",
          "optionLabel"
        ],
        "type": "object",
        "properties": {
          "rowKey": {
            "type": "string"
          },
          "rowLabel": {
            "type": "string"
          },
          "optionKey": {
            "type": "string"
          },
          "optionLabel": {
            "type": "string"
          }
        }
      },
      "ProductStockResponse": {
        "required": [
          "sku",
          "tracked",
          "quantity",
          "inStock",
          "variants",
          "committed",
          "backorders",
          "lowStockLevel",
          "effectiveLowStockLevel",
          "movements"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "tracked": {
            "type": "boolean"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "inStock": {
            "type": "boolean"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VariantStockResponse"
            }
          },
          "committed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "backorders": {
            "type": "boolean"
          },
          "lowStockLevel": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "effectiveLowStockLevel": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "movements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StockMovementResponse"
            }
          },
          "restockExpectedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "QueuedOpportunity": {
        "required": [
          "structuredOpportunityId",
          "productSlug",
          "capabilityMapKey",
          "capabilityMapVersion",
          "likelyPath",
          "waitingParty",
          "waitingSince",
          "daysWaiting",
          "openedAt",
          "blockingUnknownCount",
          "decisionCount",
          "hasContactChannel",
          "nextQuestion"
        ],
        "type": "object",
        "properties": {
          "structuredOpportunityId": {
            "type": "string",
            "format": "uuid"
          },
          "productSlug": {
            "type": [
              "null",
              "string"
            ]
          },
          "capabilityMapKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "capabilityMapVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "likelyPath": {
            "type": "string"
          },
          "waitingParty": {
            "type": "string"
          },
          "waitingSince": {
            "type": "string",
            "format": "date-time"
          },
          "daysWaiting": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "openedAt": {
            "type": "string",
            "format": "date-time"
          },
          "blockingUnknownCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "decisionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasContactChannel": {
            "type": "boolean"
          },
          "nextQuestion": {
            "type": [
              "null",
              "string"
            ]
          },
          "intent": {
            "type": [
              "null",
              "string"
            ]
          },
          "rowsNeedingMerchantPrice": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "firstAnswerDueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "firstAnswerOverdue": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "RestockExpectedRequest": {
        "required": [
          "on"
        ],
        "type": "object",
        "properties": {
          "on": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "SetProductStockRequest": {
        "required": [
          "tracked",
          "quantity",
          "variants"
        ],
        "type": "object",
        "properties": {
          "tracked": {
            "type": "boolean"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "variants": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/VariantStockCountRequest"
            }
          },
          "backorders": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "lowStockAlert": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LowStockAlertRequest"
              }
            ]
          },
          "restockExpected": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RestockExpectedRequest"
              }
            ]
          }
        }
      },
      "ShipOrderRequest": {
        "required": [
          "trackingReference"
        ],
        "type": "object",
        "properties": {
          "trackingReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "trackingCarrier": {
            "type": [
              "null",
              "string"
            ]
          },
          "trackingUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ShippingAddressResponse": {
        "required": [
          "recipientName",
          "addressLine1",
          "addressLine2",
          "city",
          "postalCode",
          "country",
          "phone"
        ],
        "type": "object",
        "properties": {
          "recipientName": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": [
              "null",
              "string"
            ]
          },
          "city": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "phone": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SpecificationItemResponse": {
        "required": [
          "id",
          "answers",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "answers": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SpecificationResponse": {
        "required": [
          "id",
          "productTypeDescription",
          "attributes",
          "freeTextRequest",
          "budgetAmount",
          "budgetCurrencyCode",
          "desiredDeliveryDate",
          "referenceNotes",
          "specificationNumber",
          "title",
          "description"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "productTypeDescription": {
            "type": "string"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "freeTextRequest": {
            "type": "string"
          },
          "budgetAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "budgetCurrencyCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "desiredDeliveryDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "referenceNotes": {
            "type": [
              "null",
              "string"
            ]
          },
          "specificationNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "attributeItems": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SpecificationItemResponse"
              }
            }
          },
          "definitionVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rowsAcceptedAsSuggested": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "StockMovementResponse": {
        "required": [
          "sku",
          "title",
          "cause",
          "delta",
          "quantityAfter",
          "orderId",
          "reason",
          "occurredAt"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "cause": {
            "type": "string"
          },
          "delta": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "quantityAfter": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "orderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "StoreOrderPageResponse": {
        "required": [
          "orders",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StoreOrderSummaryResponse"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "StoreOrderSummaryResponse": {
        "required": [
          "orderId",
          "state",
          "workflowType",
          "effectiveTotalAmount",
          "effectiveTotalCurrencyCode",
          "customerEmail",
          "placedAt",
          "changedAt",
          "payableTotalAmount",
          "taxAmount",
          "taxRefundedAmount",
          "taxKeptAmount"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string"
          },
          "workflowType": {
            "type": "string"
          },
          "effectiveTotalAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "effectiveTotalCurrencyCode": {
            "type": "string"
          },
          "customerEmail": {
            "type": "string"
          },
          "placedAt": {
            "type": "string",
            "format": "date-time"
          },
          "changedAt": {
            "type": "string",
            "format": "date-time"
          },
          "payableTotalAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "taxAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "taxRefundedAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "taxKeptAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "StoreStockBatchItemRequest": {
        "required": [
          "sku",
          "tracked",
          "quantity",
          "variants"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": [
              "null",
              "string"
            ]
          },
          "tracked": {
            "type": "boolean"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "variants": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/VariantStockCountRequest"
            }
          },
          "backorders": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "lowStockAlert": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LowStockAlertRequest"
              }
            ]
          },
          "restockExpected": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RestockExpectedRequest"
              }
            ]
          }
        }
      },
      "StoreStockBatchItemResponse": {
        "required": [
          "sku",
          "outcome",
          "stock",
          "error"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "stock": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StoreStockCountResponse"
              }
            ]
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "StoreStockBatchRequest": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/StoreStockBatchItemRequest"
            }
          }
        }
      },
      "StoreStockBatchResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StoreStockBatchItemResponse"
            }
          }
        }
      },
      "StoreStockCountResponse": {
        "required": [
          "sku",
          "tracked",
          "quantity",
          "inStock",
          "backorders",
          "variants"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "tracked": {
            "type": "boolean"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "inStock": {
            "type": "boolean"
          },
          "backorders": {
            "type": "boolean"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StoreVariantStockCountResponse"
            }
          }
        }
      },
      "StoreStockPageResponse": {
        "required": [
          "products",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StoreStockCountResponse"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "StoreVariantStockCountResponse": {
        "required": [
          "sku",
          "quantity",
          "inStock",
          "backorders"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "inStock": {
            "type": "boolean"
          },
          "backorders": {
            "type": "boolean"
          }
        }
      },
      "VariantStockCountRequest": {
        "required": [
          "sku",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": [
              "null",
              "string"
            ]
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "backorders": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "restockExpected": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RestockExpectedRequest"
              }
            ]
          }
        }
      },
      "VariantStockResponse": {
        "required": [
          "sku",
          "options",
          "quantity",
          "inStock",
          "committed",
          "backorders"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "options": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "inStock": {
            "type": "boolean"
          },
          "committed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "backorders": {
            "type": "boolean"
          },
          "restockExpectedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Specify.Api"
    }
  ]
}