{
  "openapi": "3.1.1",
  "info": {
    "title": "Specify agent API",
    "description": "Ask a merchant what they can make, and get the same answer their storefront gives. Reads are anonymous and resolved from the merchant slug in the path. Writes require a caller-supplied Idempotency-Key: at least 22 characters of caller-generated randomness, never derived from customer data, and persisted across retries so a repeat cannot become a second order. A 201 carries the guest access token exactly once; a replay returns the same order without it.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api-dev.specify.digital/"
    }
  ],
  "paths": {
    "/api/agent/v1/{merchantSlug}/capability": {
      "get": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "merchantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentCapabilityResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/{merchantSlug}/offer": {
      "post": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "merchantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentOfferRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfferResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/{merchantSlug}/offer/from-intent": {
      "post": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "merchantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentIntentOfferRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentIntentOfferResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/{merchantSlug}/catalogue": {
      "get": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "merchantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shopperCountry",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentCatalogueResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/{merchantSlug}/opportunities": {
      "post": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "merchantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentRecordOpportunityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRecordOpportunityResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/{merchantSlug}/orders": {
      "post": {
        "tags": [
          "Specify.Api"
        ],
        "parameters": [
          {
            "name": "merchantSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentPlaceOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPlaceOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentCapabilityDimensionResponse": {
        "required": [
          "key",
          "name",
          "kind",
          "unit",
          "minimum",
          "maximum",
          "step",
          "values"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "unit": {
            "type": [
              "null",
              "string"
            ]
          },
          "minimum": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "maximum": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "step": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityValueResponse"
            }
          }
        }
      },
      "AgentCapabilityMapResponse": {
        "required": [
          "key",
          "name",
          "version",
          "dimensions"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dimensions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityDimensionResponse"
            }
          }
        }
      },
      "AgentCapabilityProductResponse": {
        "required": [
          "productSlug",
          "name",
          "capabilityMapKey"
        ],
        "type": "object",
        "properties": {
          "productSlug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "capabilityMapKey": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgentCapabilityResponse": {
        "required": [
          "merchantSlug",
          "maps"
        ],
        "type": "object",
        "properties": {
          "protocol": {
            "$ref": "#/components/schemas/AgentProtocolResponse"
          },
          "merchantSlug": {
            "type": "string"
          },
          "maps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityMapResponse"
            }
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCapabilityProductResponse"
            }
          },
          "routes": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AgentCapabilityRoutesResponse"
              }
            ]
          },
          "language": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgentCapabilityRoutesResponse": {
        "required": [
          "offer",
          "offerFromIntent",
          "document"
        ],
        "type": "object",
        "properties": {
          "offer": {
            "type": "string"
          },
          "offerFromIntent": {
            "type": "string"
          },
          "document": {
            "type": "string"
          },
          "catalogue": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgentCapabilityValueResponse": {
        "required": [
          "key",
          "name"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "AgentCataloguePriceResponse": {
        "required": [
          "amount",
          "currencyCode"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "currencyCode": {
            "type": "string"
          }
        }
      },
      "AgentCatalogueProductResponse": {
        "required": [
          "sku",
          "name",
          "shortDescription",
          "purchaseMode",
          "price",
          "availability",
          "stockLeft",
          "restockExpectedOn",
          "sale",
          "imageUrl",
          "attributes",
          "variants"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "shortDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "purchaseMode": {
            "type": "string"
          },
          "price": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AgentCataloguePriceResponse"
              }
            ]
          },
          "availability": {
            "type": "string"
          },
          "stockLeft": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "restockExpectedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "sale": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AgentCatalogueSaleResponse"
              }
            ]
          },
          "imageUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCatalogueVariantResponse"
            }
          }
        }
      },
      "AgentCatalogueResponse": {
        "required": [
          "merchantSlug",
          "products",
          "nextCursor",
          "acceptingOrders"
        ],
        "type": "object",
        "properties": {
          "merchantSlug": {
            "type": "string"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentCatalogueProductResponse"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          },
          "acceptingOrders": {
            "type": "boolean"
          }
        }
      },
      "AgentCatalogueSaleResponse": {
        "required": [
          "endsAt",
          "priorPriceAmount"
        ],
        "type": "object",
        "properties": {
          "endsAt": {
            "type": "string",
            "format": "date-time"
          },
          "priorPriceAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "AgentCatalogueVariantResponse": {
        "required": [
          "sku",
          "options",
          "price",
          "availability",
          "stockLeft",
          "restockExpectedOn",
          "sale"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "options": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "price": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AgentCataloguePriceResponse"
              }
            ]
          },
          "availability": {
            "type": "string"
          },
          "stockLeft": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "restockExpectedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "sale": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AgentCatalogueSaleResponse"
              }
            ]
          }
        }
      },
      "AgentErrorResponse": {
        "required": [
          "code",
          "error"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "resourceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "currentTotalAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currentTotalCurrency": {
            "type": [
              "null",
              "string"
            ]
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "sku": {
            "type": [
              "null",
              "string"
            ]
          },
          "available": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "error": {
            "type": "string"
          }
        }
      },
      "AgentIntentOfferRequest": {
        "required": [
          "productSlug",
          "intent"
        ],
        "type": "object",
        "properties": {
          "productSlug": {
            "type": "string"
          },
          "intent": {
            "type": "string"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "requestedFor": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "destinationRegionCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "shopperCountry": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgentIntentOfferResponse": {
        "required": [
          "offer",
          "interpretation"
        ],
        "type": "object",
        "properties": {
          "offer": {
            "$ref": "#/components/schemas/OfferResponse"
          },
          "interpretation": {
            "$ref": "#/components/schemas/AgentInterpretationResponse"
          }
        }
      },
      "AgentInterpretationResponse": {
        "required": [
          "interpreted",
          "selections",
          "unmatchedPhrases",
          "recognised"
        ],
        "type": "object",
        "properties": {
          "interpreted": {
            "type": "boolean"
          },
          "selections": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "unmatchedPhrases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "recognised": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentRecognisedCapabilityResponse"
            }
          }
        }
      },
      "AgentOfferRequest": {
        "required": [
          "productSlug",
          "selections"
        ],
        "type": "object",
        "properties": {
          "productSlug": {
            "type": "string"
          },
          "selections": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "requestedFor": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "destinationRegionCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "shopperCountry": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgentOpportunitySelectionRequest": {
        "required": [
          "dimensionKey",
          "valueKeys",
          "magnitude",
          "unit"
        ],
        "type": "object",
        "properties": {
          "dimensionKey": {
            "type": "string"
          },
          "valueKeys": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "magnitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "unit": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgentOpportunityUnknownRequest": {
        "required": [
          "dimensionKey",
          "question",
          "isBlocking"
        ],
        "type": "object",
        "properties": {
          "dimensionKey": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "isBlocking": {
            "type": "boolean"
          }
        }
      },
      "AgentOrderLineRequest": {
        "required": [
          "sku",
          "quantity",
          "productTypeDescription",
          "specificationAttributes",
          "freeTextRequest",
          "budget",
          "desiredDeliveryDate",
          "referenceNotes",
          "specificationSlug",
          "specificationVersion"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "productTypeDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "specificationAttributes": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "freeTextRequest": {
            "type": [
              "null",
              "string"
            ]
          },
          "budget": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "desiredDeliveryDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "referenceNotes": {
            "type": [
              "null",
              "string"
            ]
          },
          "specificationSlug": {
            "type": [
              "null",
              "string"
            ]
          },
          "specificationVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "purchase": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgentPlaceOrderRequest": {
        "required": [
          "customerEmail",
          "recipientName",
          "addressLine1",
          "city",
          "postalCode",
          "countryCode",
          "lines"
        ],
        "type": "object",
        "properties": {
          "customerEmail": {
            "type": "string"
          },
          "recipientName": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentOrderLineRequest"
            }
          },
          "answeredRequestId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "answeredRequestToken": {
            "type": [
              "null",
              "string"
            ]
          },
          "expectedTotalAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "expectedTotalCurrency": {
            "type": [
              "null",
              "string"
            ]
          },
          "quotedCapabilityMapVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "quotedSpecificationVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "shopperCountry": {
            "type": [
              "null",
              "string"
            ]
          },
          "customerLanguage": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgentPlaceOrderResponse": {
        "required": [
          "orderId",
          "state",
          "accessToken",
          "totalAmount",
          "totalCurrency",
          "paymentUrl"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string"
          },
          "accessToken": {
            "type": [
              "null",
              "string"
            ]
          },
          "totalAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "totalCurrency": {
            "type": "string"
          },
          "paymentUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "payableTotalAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "AgentProtocolResponse": {
        "required": [
          "name",
          "version"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        }
      },
      "AgentRecognisedCapabilityResponse": {
        "required": [
          "dimensionKey",
          "dimensionLabel",
          "valueKey",
          "valueLabel",
          "matchedPhrase"
        ],
        "type": "object",
        "properties": {
          "dimensionKey": {
            "type": "string"
          },
          "dimensionLabel": {
            "type": "string"
          },
          "valueKey": {
            "type": "string"
          },
          "valueLabel": {
            "type": "string"
          },
          "matchedPhrase": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgentRecordOpportunityRequest": {
        "required": [
          "words",
          "contactEmail",
          "contactName",
          "productSlug",
          "mapKey",
          "selections",
          "unknowns",
          "acceptableAlternatives",
          "abandonedAtDimensionKey"
        ],
        "type": "object",
        "properties": {
          "words": {
            "type": "string"
          },
          "contactEmail": {
            "type": [
              "null",
              "string"
            ]
          },
          "contactName": {
            "type": [
              "null",
              "string"
            ]
          },
          "productSlug": {
            "type": [
              "null",
              "string"
            ]
          },
          "mapKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "selections": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AgentOpportunitySelectionRequest"
            }
          },
          "unknowns": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AgentOpportunityUnknownRequest"
            }
          },
          "acceptableAlternatives": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "abandonedAtDimensionKey": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgentRecordOpportunityResponse": {
        "required": [
          "opportunityId",
          "capabilityMapVersion",
          "blockingUnknownCount"
        ],
        "type": "object",
        "properties": {
          "opportunityId": {
            "type": "string",
            "format": "uuid"
          },
          "capabilityMapVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "blockingUnknownCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApprovalRequirement": {
        "required": [
          "approvalKey",
          "name",
          "requiredRole",
          "typicalResponseWorkingDays",
          "customerMessage"
        ],
        "type": "object",
        "properties": {
          "approvalKey": {
            "type": "string"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "requiredRole": {
            "type": [
              "null",
              "string"
            ]
          },
          "typicalResponseWorkingDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "customerMessage": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "DimensionTolerance": {
        "required": [
          "dimensionKey",
          "lower",
          "upper",
          "unit"
        ],
        "type": "object",
        "properties": {
          "dimensionKey": {
            "type": "string"
          },
          "lower": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "upper": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unit": {
            "type": "string"
          }
        }
      },
      "EvaluatedConstraintResponse": {
        "required": [
          "constraintKey",
          "kind",
          "outcome",
          "customerMessage",
          "approvalKey"
        ],
        "type": "object",
        "properties": {
          "constraintKey": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "customerMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "approvalKey": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OfferConfidenceResponse": {
        "required": [
          "interpretation",
          "coverage",
          "unknownDimensionKeys",
          "unknownValues"
        ],
        "type": "object",
        "properties": {
          "interpretation": {
            "type": "string"
          },
          "coverage": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "unknownDimensionKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "unknownValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnknownValueResponse"
            }
          }
        }
      },
      "OfferPriceResponse": {
        "required": [
          "mode",
          "amount",
          "currencyCode"
        ],
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currencyCode": {
            "type": "string"
          }
        }
      },
      "OfferResponse": {
        "required": [
          "fulfilledBy",
          "productSlug",
          "specificationVersion",
          "capabilityMapKey",
          "capabilityMapVersion",
          "verdict",
          "price",
          "leadTimeWorkingDays",
          "confidence",
          "blocking",
          "requiringApproval",
          "warnings",
          "unresolved",
          "stockedMatch",
          "alternatives",
          "approvals",
          "tolerances",
          "outOfRange",
          "priceConditions"
        ],
        "type": "object",
        "properties": {
          "fulfilledBy": {
            "type": "string"
          },
          "productSlug": {
            "type": "string"
          },
          "specificationVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "capabilityMapKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "capabilityMapVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "verdict": {
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/OfferPriceResponse"
          },
          "leadTimeWorkingDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "confidence": {
            "$ref": "#/components/schemas/OfferConfidenceResponse"
          },
          "blocking": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvaluatedConstraintResponse"
            }
          },
          "requiringApproval": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvaluatedConstraintResponse"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvaluatedConstraintResponse"
            }
          },
          "unresolved": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnresolvedRequirementResponse"
            }
          },
          "stockedMatch": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StandardProductMatchResponse"
              }
            ]
          },
          "alternatives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StandardProductMatchResponse"
            }
          },
          "approvals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApprovalRequirement"
            }
          },
          "tolerances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DimensionTolerance"
            }
          },
          "outOfRange": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutOfRangeMagnitude"
            }
          },
          "priceConditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvaluatedConstraintResponse"
            }
          },
          "sample": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OfferSampleResponse"
              }
            ]
          },
          "tax": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OfferTaxResponse"
              }
            ]
          }
        }
      },
      "OfferSampleResponse": {
        "required": [
          "amount",
          "currencyCode",
          "label",
          "rowsNotAsked"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "currencyCode": {
            "type": "string"
          },
          "label": {
            "type": [
              "null",
              "string"
            ]
          },
          "rowsNotAsked": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "OfferTaxResponse": {
        "required": [
          "ratePercent",
          "name",
          "pricesIncludeTax"
        ],
        "type": "object",
        "properties": {
          "ratePercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "name": {
            "type": "string"
          },
          "pricesIncludeTax": {
            "type": "boolean"
          }
        }
      },
      "OutOfRangeMagnitude": {
        "required": [
          "dimensionKey",
          "magnitude",
          "minimum",
          "maximum",
          "unit"
        ],
        "type": "object",
        "properties": {
          "dimensionKey": {
            "type": "string"
          },
          "magnitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "minimum": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "maximum": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unit": {
            "type": "string"
          }
        }
      },
      "ProductImageVariantResponse": {
        "required": [
          "url",
          "width"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "width": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "StandardProductMatchResponse": {
        "required": [
          "id",
          "sku",
          "title",
          "score",
          "kind",
          "differingRows",
          "missingRows",
          "coverage",
          "priceAmount",
          "priceCurrencyCode",
          "inStock",
          "imageUrl",
          "imageVariants"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "score": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "kind": {
            "type": "string"
          },
          "differingRows": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "missingRows": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "coverage": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "priceAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "priceCurrencyCode": {
            "type": "string"
          },
          "inStock": {
            "type": "boolean"
          },
          "imageUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "imageVariants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductImageVariantResponse"
            }
          },
          "stockNotice": {
            "type": [
              "null",
              "string"
            ]
          },
          "stockLeft": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "restockExpectedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "comesInVariants": {
            "type": "boolean",
            "default": false
          },
          "variant": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StandardProductMatchVariantResponse"
              }
            ]
          }
        }
      },
      "StandardProductMatchVariantResponse": {
        "required": [
          "sku",
          "label"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "UnknownValueResponse": {
        "required": [
          "dimensionKey",
          "valueKey"
        ],
        "type": "object",
        "properties": {
          "dimensionKey": {
            "type": "string"
          },
          "valueKey": {
            "type": "string"
          }
        }
      },
      "UnresolvedRequirementResponse": {
        "required": [
          "dimensionKey",
          "question"
        ],
        "type": "object",
        "properties": {
          "dimensionKey": {
            "type": "string"
          },
          "question": {
            "type": "string"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Specify.Api"
    }
  ]
}