{
  "openapi": "3.0.3",
  "info": {
    "title": "Wedding Gift Board – curated gift wishlist API",
    "version": "0.2.0",
    "description": "Create a gift wishlist for wedding in seconds from curated amazon.se (Sweden) and amazon.com (United States) 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, bröllop. Quickstart: POST /api/v1/agent/create-and-fill → shopUrl. Wedding gift boards, shopping lists, and recommendation lists (couple + guest). Amazon.se product links with tracking tag sw-wedding-21. CORS *. US: pass marketplace=amazon.com (links https://www.amazon.com/dp/{ASIN}?tag=sw-wedding-20); default amazon.se (tag sw-wedding-21). US support: pass marketplace=amazon.com (or country=US) for English amazon.com /dp links tagged sw-wedding-20. Without marketplace/country, an Accept-Language header starting with en-US selects amazon.com; otherwise amazon.se (default). Missing or unknown marketplace falls back to the default, never a 400."
  },
  "servers": [
    {
      "url": "https://wedding-gift-board.vercel.app"
    }
  ],
  "paths": {
    "/api/v1/health": {
      "get": {
        "summary": "Health",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/search": {
      "get": {
        "summary": "Open Amazon gift search",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "occasion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "budgetBand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "styleTag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          },
          {
            "name": "marketplace",
            "in": "query",
            "required": false,
            "description": "Amazon storefront for the end user. amazon.se (default, Sweden, tag sw-wedding-21) or amazon.com / us (United States, curated catalog verified on amazon.com, tag sw-wedding-20). Other listed storefronts (see /api/v1/marketplaces) get untagged search deep-links; unknown values fall back to amazon.se.",
            "schema": {
              "type": "string",
              "examples": [
                "amazon.se",
                "amazon.com",
                "us",
                "se"
              ]
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "User locale, e.g. sv or en.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results"
          }
        }
      }
    },
    "/api/v1/catalog": {
      "get": {
        "summary": "Curated starter catalog",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "occasion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "budgetBand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "styleTag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "styleTags",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "marketplace",
            "in": "query",
            "required": false,
            "description": "Amazon storefront for the end user. amazon.se (default, Sweden, tag sw-wedding-21) or amazon.com / us (United States, curated catalog verified on amazon.com, tag sw-wedding-20). Other listed storefronts (see /api/v1/marketplaces) get untagged search deep-links; unknown values fall back to amazon.se.",
            "schema": {
              "type": "string",
              "examples": [
                "amazon.se",
                "amazon.com",
                "us",
                "se"
              ]
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "User locale, e.g. sv or en.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Catalog items"
          }
        }
      }
    },
    "/api/v1/wishlists": {
      "post": {
        "summary": "Create wishlist",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "recipientName": {
                    "type": "string"
                  },
                  "occasion": {
                    "type": "string"
                  },
                  "budgetBand": {
                    "type": "string"
                  },
                  "styleTags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "relationship": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (coupleUrl + guestUrl)"
          }
        }
      }
    },
    "/api/v1/wishlists/{id}": {
      "get": {
        "summary": "Get wishlist",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Wishlist"
          }
        }
      },
      "patch": {
        "summary": "Patch wishlist",
        "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": {
        "summary": "Add item",
        "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/wishlists/{id}/items/{itemId}": {
      "delete": {
        "summary": "Delete item",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Edit-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/agent/create-and-fill": {
      "post": {
        "summary": "One-shot create + fill",
        "responses": {
          "201": {
            "description": "Created"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "coupleNames": {
                    "type": "string"
                  },
                  "weddingDate": {
                    "type": "string"
                  },
                  "budgetBand": {
                    "type": "string",
                    "enum": [
                      "under-300",
                      "300-700",
                      "700-1500",
                      "1500-plus"
                    ]
                  },
                  "styleTags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "marketplace": {
                    "type": "string",
                    "description": "Amazon storefront: amazon.se (default) or amazon.com / us for United States users (amazon.com/dp links, tag sw-wedding-20).",
                    "examples": [
                      "amazon.se",
                      "amazon.com"
                    ]
                  },
                  "locale": {
                    "type": "string"
                  },
                  "itemAsins": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "itemKeywords": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "itemQueries": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "example": {
                "coupleNames": "Alex & Sam",
                "budgetBand": "300-700",
                "styleTags": [
                  "home"
                ],
                "marketplace": "amazon.com",
                "locale": "en",
                "itemQueries": [
                  "dutch oven"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/products/resolve": {
      "post": {
        "summary": "Resolve ASIN/URL/keywords to buy URL",
        "responses": {
          "200": {
            "description": "Resolved"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "asin": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "keywords": {
                    "type": "string"
                  },
                  "marketplace": {
                    "type": "string",
                    "description": "Amazon storefront: amazon.se (default) or amazon.com / us for United States users (amazon.com/dp links, tag sw-wedding-20).",
                    "examples": [
                      "amazon.se",
                      "amazon.com"
                    ]
                  },
                  "locale": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "asin": "B00C9Q47WU",
                "marketplace": "amazon.com",
                "locale": "en"
              }
            }
          }
        }
      }
    },
    "/api/cron/refresh-catalog": {
      "get": {
        "summary": "Weekly catalog refresh stub (Bearer CRON_SECRET)",
        "responses": {
          "200": {
            "description": "Stub status"
          }
        }
      }
    }
  }
}