{
  "openapi": "3.0.3",
  "info": {
    "title": "Studentpresenter – curated gift wishlist API",
    "version": "1.0.0",
    "description": "Create a gift wishlist for Swedish high-school graduation (studenten) 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, studenten. Quickstart: POST /api/v1/agent/create-and-fill → shopUrl. Student gift shopping lists and Studenten / studentexamen recommendation lists (owner + shopper wishlists). Gift inspiration tool. Agents MUST pass marketplace + locale. amazon.se product buyUrl links use trackingTag sw-student-21; other storefronts are untagged search links. Prefer buyUrl / trackingTag. Remote MCP at /api/mcp. CORS *."
  },
  "servers": [
    {
      "url": "https://studenten-gifts.vercel.app"
    }
  ],
  "paths": {
    "/api/v1/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Health & marketplaces",
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/api/v1/search": {
      "get": {
        "operationId": "searchAmazon",
        "summary": "Search Studenten gifts",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "marketplace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "occasion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "budgetBand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "giftCategory",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "relationship",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "search results"
          }
        }
      }
    },
    "/api/v1/catalog": {
      "get": {
        "operationId": "getCatalog",
        "summary": "Curated student gift catalog",
        "parameters": [
          {
            "name": "marketplace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "occasion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "giftCategory",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "giftCategories",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "budgetBand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "catalog items"
          }
        }
      }
    },
    "/api/v1/products/resolve": {
      "post": {
        "operationId": "resolveProduct",
        "summary": "Resolve buy link",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "marketplace",
                  "locale"
                ],
                "properties": {
                  "marketplace": {
                    "type": "string"
                  },
                  "locale": {
                    "type": "string"
                  },
                  "asin": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "keywords": {
                    "type": "string"
                  },
                  "occasion": {
                    "type": "string"
                  },
                  "giftCategory": {
                    "type": "string"
                  },
                  "budgetBand": {
                    "type": "string"
                  },
                  "relationship": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "friend",
                      "relative",
                      "partner"
                    ],
                    "description": "Giver relationship"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "resolved link"
          }
        }
      }
    },
    "/api/v1/wishlists": {
      "post": {
        "operationId": "createWishlist",
        "summary": "Create wishlist",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "studentName": {
                    "type": "string"
                  },
                  "occasion": {
                    "type": "string"
                  },
                  "budgetBand": {
                    "type": "string"
                  },
                  "giftCategories": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "relationship": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "friend",
                      "relative",
                      "partner"
                    ],
                    "description": "Giver relationship"
                  },
                  "marketplace": {
                    "type": "string"
                  },
                  "locale": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "created"
          }
        }
      }
    },
    "/api/v1/wishlists/{id}": {
      "get": {
        "operationId": "getWishlist",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "wishlist"
          }
        }
      },
      "patch": {
        "operationId": "patchWishlist",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Edit-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "updated"
          }
        }
      }
    },
    "/api/v1/wishlists/{id}/items": {
      "post": {
        "operationId": "addWishlistItem",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Edit-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "item added"
          }
        }
      }
    },
    "/api/v1/agent/create-and-fill": {
      "post": {
        "operationId": "agentCreateAndFill",
        "summary": "One-shot create and fill",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "studentName": {
                    "type": "string"
                  },
                  "occasion": {
                    "type": "string"
                  },
                  "budgetBand": {
                    "type": "string"
                  },
                  "giftCategories": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "relationship": {
                    "type": "string",
                    "enum": [
                      "parent",
                      "friend",
                      "relative",
                      "partner"
                    ],
                    "description": "Giver relationship"
                  },
                  "marketplace": {
                    "type": "string"
                  },
                  "locale": {
                    "type": "string"
                  },
                  "itemAsins": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "itemKeywords": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "itemQueries": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "created"
          }
        }
      }
    },
    "/api/mcp": {
      "get": {
        "summary": "Remote MCP (Streamable HTTP)",
        "responses": {
          "200": {
            "description": "MCP"
          }
        }
      },
      "post": {
        "summary": "Remote MCP",
        "responses": {
          "200": {
            "description": "MCP"
          }
        }
      },
      "options": {
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "ok"
          }
        }
      }
    }
  }
}