{
  "openapi": "3.0.3",
  "info": {
    "title": "AMH Fitting Room — seller catalogue index",
    "version": "1.0.0",
    "description": "Indexed, searchable copy of a seller's real catalogue (Shopify storefronts). Use /index/items to find real products with real prices, in-stock sizes and product URLs; use /look to turn chosen items into one shareable link with a cart behind it. Never invent products: every id here maps to a live product page."
  },
  "servers": [
    {
      "url": "https://artificialmindhive.com/api/tryon"
    }
  ],
  "components": {
    "securitySchemes": {
      "savedProfileKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Private revocable profile key from the user-approved app connection. Never put credentials in URLs."
      }
    }
  },
  "paths": {
    "/profile/create": {
      "post": {
        "operationId": "privateProfile_create",
        "summary": "Private shared app/AI profile: create",
        "description": "POST JSON only. App uses a secure HttpOnly cookie; an AI uses its private Bearer key. Read requires consent_to_use:true; writes require consent_to_save:true. No photo bytes. Create is for the app cookie; it does not return the browser key. Access-key returns a private revocable AI credential only after explicit user request.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consent_to_use": {
                    "type": "boolean"
                  },
                  "consent_to_save": {
                    "type": "boolean"
                  },
                  "preferences": {
                    "type": "object",
                    "properties": {
                      "likes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "dislikes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "sizes": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "budget": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "favorite_photo_note": {
                        "type": "string",
                        "maxLength": 300
                      }
                    }
                  },
                  "item": {
                    "type": "object",
                    "required": [
                      "shop",
                      "id"
                    ],
                    "properties": {
                      "shop": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      }
                    }
                  },
                  "look": {
                    "type": "object",
                    "required": [
                      "label",
                      "scene",
                      "items"
                    ],
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "scene": {
                        "type": "string"
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "shop": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "favorite_photo_note": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Private no-store result"
          },
          "401": {
            "description": "Missing or revoked profile key"
          },
          "403": {
            "description": "User consent required"
          },
          "413": {
            "description": "Request exceeds 8 KB; no photos"
          }
        }
      }
    },
    "/profile/read": {
      "post": {
        "operationId": "privateProfile_read",
        "summary": "Private shared app/AI profile: read",
        "description": "POST JSON only. App uses a secure HttpOnly cookie; an AI uses its private Bearer key. Read requires consent_to_use:true; writes require consent_to_save:true. No photo bytes. Create is for the app cookie; it does not return the browser key. Access-key returns a private revocable AI credential only after explicit user request.",
        "security": [
          {
            "savedProfileKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consent_to_use": {
                    "type": "boolean"
                  },
                  "consent_to_save": {
                    "type": "boolean"
                  },
                  "preferences": {
                    "type": "object",
                    "properties": {
                      "likes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "dislikes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "sizes": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "budget": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "favorite_photo_note": {
                        "type": "string",
                        "maxLength": 300
                      }
                    }
                  },
                  "item": {
                    "type": "object",
                    "required": [
                      "shop",
                      "id"
                    ],
                    "properties": {
                      "shop": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      }
                    }
                  },
                  "look": {
                    "type": "object",
                    "required": [
                      "label",
                      "scene",
                      "items"
                    ],
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "scene": {
                        "type": "string"
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "shop": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "favorite_photo_note": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Private no-store result"
          },
          "401": {
            "description": "Missing or revoked profile key"
          },
          "403": {
            "description": "User consent required"
          },
          "413": {
            "description": "Request exceeds 8 KB; no photos"
          }
        }
      }
    },
    "/profile/preferences": {
      "post": {
        "operationId": "privateProfile_preferences",
        "summary": "Private shared app/AI profile: preferences",
        "description": "POST JSON only. App uses a secure HttpOnly cookie; an AI uses its private Bearer key. Read requires consent_to_use:true; writes require consent_to_save:true. No photo bytes. Create is for the app cookie; it does not return the browser key. Access-key returns a private revocable AI credential only after explicit user request.",
        "security": [
          {
            "savedProfileKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consent_to_use": {
                    "type": "boolean"
                  },
                  "consent_to_save": {
                    "type": "boolean"
                  },
                  "preferences": {
                    "type": "object",
                    "properties": {
                      "likes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "dislikes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "sizes": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "budget": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "favorite_photo_note": {
                        "type": "string",
                        "maxLength": 300
                      }
                    }
                  },
                  "item": {
                    "type": "object",
                    "required": [
                      "shop",
                      "id"
                    ],
                    "properties": {
                      "shop": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      }
                    }
                  },
                  "look": {
                    "type": "object",
                    "required": [
                      "label",
                      "scene",
                      "items"
                    ],
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "scene": {
                        "type": "string"
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "shop": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "favorite_photo_note": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Private no-store result"
          },
          "401": {
            "description": "Missing or revoked profile key"
          },
          "403": {
            "description": "User consent required"
          },
          "413": {
            "description": "Request exceeds 8 KB; no photos"
          }
        }
      }
    },
    "/profile/save_item": {
      "post": {
        "operationId": "privateProfile_save_item",
        "summary": "Private shared app/AI profile: save_item",
        "description": "POST JSON only. App uses a secure HttpOnly cookie; an AI uses its private Bearer key. Read requires consent_to_use:true; writes require consent_to_save:true. No photo bytes. Create is for the app cookie; it does not return the browser key. Access-key returns a private revocable AI credential only after explicit user request.",
        "security": [
          {
            "savedProfileKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consent_to_use": {
                    "type": "boolean"
                  },
                  "consent_to_save": {
                    "type": "boolean"
                  },
                  "preferences": {
                    "type": "object",
                    "properties": {
                      "likes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "dislikes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "sizes": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "budget": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "favorite_photo_note": {
                        "type": "string",
                        "maxLength": 300
                      }
                    }
                  },
                  "item": {
                    "type": "object",
                    "required": [
                      "shop",
                      "id"
                    ],
                    "properties": {
                      "shop": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      }
                    }
                  },
                  "look": {
                    "type": "object",
                    "required": [
                      "label",
                      "scene",
                      "items"
                    ],
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "scene": {
                        "type": "string"
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "shop": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "favorite_photo_note": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Private no-store result"
          },
          "401": {
            "description": "Missing or revoked profile key"
          },
          "403": {
            "description": "User consent required"
          },
          "413": {
            "description": "Request exceeds 8 KB; no photos"
          }
        }
      }
    },
    "/profile/remove_item": {
      "post": {
        "operationId": "privateProfile_remove_item",
        "summary": "Private shared app/AI profile: remove_item",
        "description": "POST JSON only. App uses a secure HttpOnly cookie; an AI uses its private Bearer key. Read requires consent_to_use:true; writes require consent_to_save:true. No photo bytes. Create is for the app cookie; it does not return the browser key. Access-key returns a private revocable AI credential only after explicit user request.",
        "security": [
          {
            "savedProfileKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consent_to_use": {
                    "type": "boolean"
                  },
                  "consent_to_save": {
                    "type": "boolean"
                  },
                  "preferences": {
                    "type": "object",
                    "properties": {
                      "likes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "dislikes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "sizes": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "budget": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "favorite_photo_note": {
                        "type": "string",
                        "maxLength": 300
                      }
                    }
                  },
                  "item": {
                    "type": "object",
                    "required": [
                      "shop",
                      "id"
                    ],
                    "properties": {
                      "shop": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      }
                    }
                  },
                  "look": {
                    "type": "object",
                    "required": [
                      "label",
                      "scene",
                      "items"
                    ],
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "scene": {
                        "type": "string"
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "shop": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "favorite_photo_note": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Private no-store result"
          },
          "401": {
            "description": "Missing or revoked profile key"
          },
          "403": {
            "description": "User consent required"
          },
          "413": {
            "description": "Request exceeds 8 KB; no photos"
          }
        }
      }
    },
    "/profile/save_look": {
      "post": {
        "operationId": "privateProfile_save_look",
        "summary": "Private shared app/AI profile: save_look",
        "description": "POST JSON only. App uses a secure HttpOnly cookie; an AI uses its private Bearer key. Read requires consent_to_use:true; writes require consent_to_save:true. No photo bytes. Create is for the app cookie; it does not return the browser key. Access-key returns a private revocable AI credential only after explicit user request.",
        "security": [
          {
            "savedProfileKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consent_to_use": {
                    "type": "boolean"
                  },
                  "consent_to_save": {
                    "type": "boolean"
                  },
                  "preferences": {
                    "type": "object",
                    "properties": {
                      "likes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "dislikes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "sizes": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "budget": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "favorite_photo_note": {
                        "type": "string",
                        "maxLength": 300
                      }
                    }
                  },
                  "item": {
                    "type": "object",
                    "required": [
                      "shop",
                      "id"
                    ],
                    "properties": {
                      "shop": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      }
                    }
                  },
                  "look": {
                    "type": "object",
                    "required": [
                      "label",
                      "scene",
                      "items"
                    ],
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "scene": {
                        "type": "string"
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "shop": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "favorite_photo_note": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Private no-store result"
          },
          "401": {
            "description": "Missing or revoked profile key"
          },
          "403": {
            "description": "User consent required"
          },
          "413": {
            "description": "Request exceeds 8 KB; no photos"
          }
        }
      }
    },
    "/profile/access_key": {
      "post": {
        "operationId": "privateProfile_access_key",
        "summary": "Private shared app/AI profile: access_key",
        "description": "POST JSON only. App uses a secure HttpOnly cookie; an AI uses its private Bearer key. Read requires consent_to_use:true; writes require consent_to_save:true. No photo bytes. Create is for the app cookie; it does not return the browser key. Access-key returns a private revocable AI credential only after explicit user request.",
        "security": [
          {
            "savedProfileKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consent_to_use": {
                    "type": "boolean"
                  },
                  "consent_to_save": {
                    "type": "boolean"
                  },
                  "preferences": {
                    "type": "object",
                    "properties": {
                      "likes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "dislikes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "sizes": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "budget": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "favorite_photo_note": {
                        "type": "string",
                        "maxLength": 300
                      }
                    }
                  },
                  "item": {
                    "type": "object",
                    "required": [
                      "shop",
                      "id"
                    ],
                    "properties": {
                      "shop": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      }
                    }
                  },
                  "look": {
                    "type": "object",
                    "required": [
                      "label",
                      "scene",
                      "items"
                    ],
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "scene": {
                        "type": "string"
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "shop": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "favorite_photo_note": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Private no-store result"
          },
          "401": {
            "description": "Missing or revoked profile key"
          },
          "403": {
            "description": "User consent required"
          },
          "413": {
            "description": "Request exceeds 8 KB; no photos"
          }
        }
      }
    },
    "/profile/revoke_ai": {
      "post": {
        "operationId": "privateProfile_revoke_ai",
        "summary": "Private shared app/AI profile: revoke_ai",
        "description": "POST JSON only. App uses a secure HttpOnly cookie; an AI uses its private Bearer key. Read requires consent_to_use:true; writes require consent_to_save:true. No photo bytes. Create is for the app cookie; it does not return the browser key. Access-key returns a private revocable AI credential only after explicit user request.",
        "security": [
          {
            "savedProfileKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consent_to_use": {
                    "type": "boolean"
                  },
                  "consent_to_save": {
                    "type": "boolean"
                  },
                  "preferences": {
                    "type": "object",
                    "properties": {
                      "likes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "dislikes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "sizes": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "budget": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "favorite_photo_note": {
                        "type": "string",
                        "maxLength": 300
                      }
                    }
                  },
                  "item": {
                    "type": "object",
                    "required": [
                      "shop",
                      "id"
                    ],
                    "properties": {
                      "shop": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      }
                    }
                  },
                  "look": {
                    "type": "object",
                    "required": [
                      "label",
                      "scene",
                      "items"
                    ],
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "scene": {
                        "type": "string"
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "shop": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "favorite_photo_note": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Private no-store result"
          },
          "401": {
            "description": "Missing or revoked profile key"
          },
          "403": {
            "description": "User consent required"
          },
          "413": {
            "description": "Request exceeds 8 KB; no photos"
          }
        }
      }
    },
    "/profile/delete": {
      "post": {
        "operationId": "privateProfile_delete",
        "summary": "Private shared app/AI profile: delete",
        "description": "POST JSON only. App uses a secure HttpOnly cookie; an AI uses its private Bearer key. Read requires consent_to_use:true; writes require consent_to_save:true. No photo bytes. Create is for the app cookie; it does not return the browser key. Access-key returns a private revocable AI credential only after explicit user request.",
        "security": [
          {
            "savedProfileKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consent_to_use": {
                    "type": "boolean"
                  },
                  "consent_to_save": {
                    "type": "boolean"
                  },
                  "preferences": {
                    "type": "object",
                    "properties": {
                      "likes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "dislikes": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "sizes": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "budget": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "favorite_photo_note": {
                        "type": "string",
                        "maxLength": 300
                      }
                    }
                  },
                  "item": {
                    "type": "object",
                    "required": [
                      "shop",
                      "id"
                    ],
                    "properties": {
                      "shop": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      }
                    }
                  },
                  "look": {
                    "type": "object",
                    "required": [
                      "label",
                      "scene",
                      "items"
                    ],
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "scene": {
                        "type": "string"
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "shop": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "favorite_photo_note": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Private no-store result"
          },
          "401": {
            "description": "Missing or revoked profile key"
          },
          "403": {
            "description": "User consent required"
          },
          "413": {
            "description": "Request exceeds 8 KB; no photos"
          }
        }
      }
    },
    "/presets": {
      "get": {
        "operationId": "listStylePresets",
        "summary": "Mixable style presets, environments and unchanged-source-art policy",
        "responses": {
          "200": {
            "description": "Preset library and source-image requirements"
          }
        }
      }
    },
    "/style": {
      "get": {
        "operationId": "resolveStyle",
        "summary": "Resolve a short outfit request into repeatable presets and an exact-item brief",
        "parameters": [
          {
            "name": "request",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 500
            }
          },
          {
            "name": "seed",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "presets",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated preset IDs"
          },
          {
            "name": "modifiers",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated modifier IDs"
          },
          {
            "name": "environment",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pose",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "standing",
                "keep_photo"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved style, catalog search kinds, source-layer prompt; no generated image"
          },
          "400": {
            "description": "Invalid or oversized input"
          }
        }
      }
    },
    "/index/shops": {
      "get": {
        "operationId": "listStores",
        "summary": "Discover connected stores without knowing a store domain",
        "responses": {
          "200": {
            "description": "{ok, shops:[{shop,name,platform,status,item_count,indexed_at}]}"
          }
        }
      }
    },
    "/index": {
      "get": {
        "operationId": "getCatalogStatus",
        "summary": "Is this store indexed, and what is in it",
        "parameters": [
          {
            "name": "shop",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Store domain, e.g. dndoutfitterswv.com"
          }
        ],
        "responses": {
          "200": {
            "description": "status, platform (shopify|import), counts by zone (head/top/legs/feet/bag/accessory), by who (men/women/kids/unisex) and by kind; newCount"
          }
        }
      },
      "post": {
        "operationId": "indexStore",
        "summary": "Index (or refresh) a Shopify store's catalogue",
        "parameters": [
          {
            "name": "shop",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Store domain, e.g. dndoutfitterswv.com"
          }
        ],
        "responses": {
          "200": {
            "description": "indexed counts"
          },
          "422": {
            "description": "not a Shopify storefront"
          }
        }
      }
    },
    "/index/items": {
      "get": {
        "operationId": "searchCatalog",
        "summary": "Search a store's indexed catalogue",
        "parameters": [
          {
            "name": "shop",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Store domain, e.g. dndoutfitterswv.com"
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "free text: 'square toe boots', 'flannel shirt'"
          },
          {
            "name": "zone",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "head",
                "top",
                "legs",
                "feet",
                "bag",
                "accessory"
              ]
            }
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "comma list of tee|shirt|sweater|jacket|dress|swim|pants|shorts|hat|beanie|backpack|bag|wallet|shoes|socks|sunglasses|keychain|accessory"
          },
          {
            "name": "new",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "new arrivals only"
          },
          {
            "name": "who",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "men",
                "women",
                "kids",
                "unisex",
                "any"
              ]
            }
          },
          {
            "name": "color",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "description": "min price USD"
          },
          {
            "name": "max",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "description": "max price USD"
          },
          {
            "name": "in_stock",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 12,
              "maximum": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ total, items:[{id,title,type,zone,who,price,image,url,colors,in_stock,sizes_in_stock,variant_for_cart}] }"
          }
        }
      }
    },
    "/index/item": {
      "get": {
        "operationId": "getCatalogItem",
        "summary": "One product in full (all images, description, every size)",
        "parameters": [
          {
            "name": "shop",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Store domain, e.g. dndoutfitterswv.com"
          },
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "product"
          },
          "404": {
            "description": "unknown id"
          }
        }
      }
    },
    "/look": {
      "post": {
        "operationId": "saveLook",
        "summary": "Store an outfit (one person or a whole family) temporarily and get one link with a cart",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "shop",
                  "people"
                ],
                "properties": {
                  "shop": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  },
                  "ttlHours": {
                    "type": "integer",
                    "default": 24,
                    "maximum": 168
                  },
                  "source": {
                    "type": "string",
                    "description": "who built it, e.g. 'gemini'"
                  },
                  "people": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "label",
                        "items"
                      ],
                      "properties": {
                        "label": {
                          "type": "string",
                          "example": "dad"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "variant": {
                                    "type": "string"
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{ id, url, expires_at }"
          }
        }
      }
    },
    "/look/{id}": {
      "get": {
        "operationId": "getLook",
        "summary": "Read a stored look: people, items, prices, cart_url",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "look"
          },
          "404": {
            "description": "expired or unknown"
          }
        }
      }
    }
  }
}
