{
  "openapi": "3.0.3",
  "info": {
    "title": "Dorm Kit – curated gift wishlist API",
    "version": "0.1.0",
    "description": "Create a gift wishlist for moving into a student room / dorm in seconds from curated amazon.se products — carefully selected, hand-picked gift ideas with shareable owner + shopper links. Curated by us (no customer reviews or ratings). Keywords: gift ideas, wishlist, gift list, shopping list, presenttips, önskelista, flytt till studentrum. Quickstart: POST /api/v1/agent/create-and-fill → shopUrl. Student dorm and back-to-school shopping lists, dorm kits, and roommate recommendation lists. Agents MUST pass marketplace + locale. amazon.se product /dp/ links use trackingTag sw-dormkit-21; other storefronts stay untagged search links. Prefer buyUrl / trackingTag wording. CORS enabled."
  },
  "servers": [
    {
      "url": "https://dorm-kit.vercel.app"
    }
  ],
  "paths": {
    "/api/v1/health": {
      "get": {
        "summary": "Health",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/search": {
      "get": {
        "summary": "Search dorm essentials on a selected Amazon storefront",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "budgetBand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "marketplace",
            "in": "query",
            "description": "Amazon marketplace ID or domain; pass with locale for agent searches.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "description": "Student language/locale, e.g. en-US.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results"
          }
        }
      }
    },
    "/api/v1/catalog": {
      "get": {
        "summary": "Curated dorm starter catalog",
        "responses": {
          "200": {
            "description": "Catalog items"
          }
        }
      }
    },
    "/api/v1/wishlists": {
      "post": {
        "summary": "Create a student dorm wishlist",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "studentName": {
                    "type": "string"
                  },
                  "university": {
                    "type": "string"
                  },
                  "dormRules": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "roomType": {
                    "type": "string"
                  },
                  "budgetBand": {
                    "type": "string"
                  },
                  "marketplace": {
                    "type": "string"
                  },
                  "locale": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created with ownerUrl, roommateUrl, and shopUrl"
          }
        }
      }
    },
    "/api/v1/wishlists/{id}": {
      "get": {
        "summary": "Get wishlist",
        "responses": {
          "200": {
            "description": "Wishlist"
          }
        }
      },
      "patch": {
        "summary": "Update wishlist",
        "responses": {
          "200": {
            "description": "Updated"
          }
        }
      }
    },
    "/api/v1/wishlists/{id}/items": {
      "post": {
        "summary": "Add a dorm item",
        "responses": {
          "200": {
            "description": "Item added"
          }
        }
      }
    },
    "/api/v1/wishlists/{id}/items/{itemId}": {
      "delete": {
        "summary": "Delete a dorm item",
        "responses": {
          "200": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/agent/create-and-fill": {
      "post": {
        "summary": "Create and fill a dorm kit wishlist",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "studentName": {
                    "type": "string"
                  },
                  "university": {
                    "type": "string"
                  },
                  "dormRules": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "roomType": {
                    "type": "string"
                  },
                  "budgetBand": {
                    "type": "string"
                  },
                  "marketplace": {
                    "type": "string"
                  },
                  "locale": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/api/v1/products/resolve": {
      "post": {
        "summary": "Resolve a dorm product or search URL",
        "responses": {
          "200": {
            "description": "Resolved buy URL"
          }
        }
      }
    }
  },
  "x-tracking-note": "amazon.se uses NEXT_PUBLIC_AMAZON_TAGS_JSON tag sw-dormkit-21 on /dp/ buyUrls. Do not invent tags for other storefronts or reuse other verticals' tags."
}