{
  "openapi": "3.0.3",
  "info": {
    "title": "Travel Packing – curated gift wishlist API",
    "version": "0.1.0",
    "description": "Build trip packing lists and gift lists from curated Amazon products — amazon.com for the United States (English, USD) and amazon.se for Sweden (SEK) — with shareable owner + shopper links. Curated by us (no customer reviews or ratings). Quickstart: POST /api/v1/agent/create-and-fill → shopUrl. MCP at /api/mcp. Prefer buyUrl / trackingTag. CORS *. Storefront selection: (1) marketplace or store param (marketplace=amazon.com for United States users), (2) country (US → amazon.com), (3) Accept-Language starting with en-US → amazon.com, (4) default amazon.se (sv and everything else). Missing or unknown values fall back to amazon.se — never a 400. amazon.com results are English only (English titles, USD priceUsd or no price, amazon.com /dp links, English search links)."
  },
  "servers": [
    {
      "url": "https://travel-packing-zeta.vercel.app"
    }
  ],
  "paths": {
    "/api/v1/health": {
      "get": {
        "summary": "Health",
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "description": "Returns storefronts (amazon.com, amazon.se), catalogCounts and marketplaceSelection rules."
      }
    },
    "/api/v1/search": {
      "get": {
        "summary": "Open Amazon packing search",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tripType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "climate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "durationBand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          },
          {
            "name": "occasion",
            "in": "query",
            "description": "Deprecated alias for tripType",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "budgetBand",
            "in": "query",
            "description": "Deprecated alias for durationBand",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "styleTag",
            "in": "query",
            "description": "Deprecated alias for climate",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "marketplace",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "amazon.com"
            },
            "description": "Amazon storefront: amazon.com (or us) for United States users, amazon.se (or se) for Sweden. Optional; unknown values fall back to amazon.se. Storefront selection: (1) marketplace or store param (marketplace=amazon.com for United States users), (2) country (US → amazon.com), (3) Accept-Language starting with en-US → amazon.com, (4) default amazon.se (sv and everything else). Missing or unknown values fall back to amazon.se — never a 400. amazon.com results are English only (English titles, USD priceUsd or no price, amazon.com /dp links, English search links)."
          },
          {
            "name": "store",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Alias of marketplace."
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "US"
            },
            "description": "ISO country of the end user; used when marketplace is omitted. US → amazon.com, anything else → amazon.se."
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "en-US,en;q=0.9"
            },
            "description": "Used when marketplace and country are omitted: a value starting with en-US selects amazon.com; otherwise amazon.se."
          }
        ],
        "responses": {
          "200": {
            "description": "Search results"
          }
        },
        "description": "Storefront selection: (1) marketplace or store param (marketplace=amazon.com for United States users), (2) country (US → amazon.com), (3) Accept-Language starting with en-US → amazon.com, (4) default amazon.se (sv and everything else). Missing or unknown values fall back to amazon.se — never a 400. amazon.com results are English only (English titles, USD priceUsd or no price, amazon.com /dp links, English search links)."
      }
    },
    "/api/v1/catalog": {
      "get": {
        "summary": "Curated packing starter catalog",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tripType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "climate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "durationBand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "marketplace",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "amazon.com"
            },
            "description": "Amazon storefront: amazon.com (or us) for United States users, amazon.se (or se) for Sweden. Optional; unknown values fall back to amazon.se. Storefront selection: (1) marketplace or store param (marketplace=amazon.com for United States users), (2) country (US → amazon.com), (3) Accept-Language starting with en-US → amazon.com, (4) default amazon.se (sv and everything else). Missing or unknown values fall back to amazon.se — never a 400. amazon.com results are English only (English titles, USD priceUsd or no price, amazon.com /dp links, English search links)."
          },
          {
            "name": "store",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Alias of marketplace."
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "US"
            },
            "description": "ISO country of the end user; used when marketplace is omitted. US → amazon.com, anything else → amazon.se."
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "en-US,en;q=0.9"
            },
            "description": "Used when marketplace and country are omitted: a value starting with en-US selects amazon.com; otherwise amazon.se."
          }
        ],
        "responses": {
          "200": {
            "description": "Catalog items"
          }
        },
        "description": "With marketplace=amazon.com the response uses the US catalog (catalog=\"us\", currency=\"USD\", items carry priceUsd). Storefront selection: (1) marketplace or store param (marketplace=amazon.com for United States users), (2) country (US → amazon.com), (3) Accept-Language starting with en-US → amazon.com, (4) default amazon.se (sv and everything else). Missing or unknown values fall back to amazon.se — never a 400. amazon.com results are English only (English titles, USD priceUsd or no price, amazon.com /dp links, English search links)."
      }
    },
    "/api/v1/wishlists": {
      "post": {
        "summary": "Create packing list",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tripName": {
                    "type": "string"
                  },
                  "destination": {
                    "type": "string"
                  },
                  "tripType": {
                    "type": "string"
                  },
                  "climate": {
                    "type": "string"
                  },
                  "durationBand": {
                    "type": "string"
                  },
                  "durationDays": {
                    "type": "integer"
                  },
                  "travelers": {
                    "type": "string"
                  },
                  "season": {
                    "type": "string"
                  },
                  "marketplace": {
                    "type": "string",
                    "example": "amazon.com",
                    "description": "amazon.com for United States users; amazon.se (default) for Sweden. Unknown values fall back to amazon.se."
                  },
                  "locale": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "country": {
                    "type": "string",
                    "example": "US",
                    "description": "Used when marketplace is omitted (US → amazon.com)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (ownerUrl + listUrl + shopUrl)"
          }
        },
        "parameters": [
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "en-US,en;q=0.9"
            },
            "description": "Used when marketplace and country are omitted: a value starting with en-US selects amazon.com; otherwise amazon.se."
          }
        ],
        "description": "Storefront selection: (1) marketplace or store param (marketplace=amazon.com for United States users), (2) country (US → amazon.com), (3) Accept-Language starting with en-US → amazon.com, (4) default amazon.se (sv and everything else). Missing or unknown values fall back to amazon.se — never a 400. amazon.com results are English only (English titles, USD priceUsd or no price, amazon.com /dp links, English search links)."
      }
    },
    "/api/v1/wishlists/{id}": {
      "get": {
        "summary": "Get packing list",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Packing list"
          }
        }
      },
      "patch": {
        "summary": "Patch packing list",
        "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 packing item",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Edit-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Item added"
          }
        }
      }
    },
    "/api/v1/wishlists/{id}/items/{itemId}": {
      "delete": {
        "summary": "Delete packing 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 packing list and fill items",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tripName": {
                    "type": "string"
                  },
                  "tripType": {
                    "type": "string"
                  },
                  "climate": {
                    "type": "string"
                  },
                  "durationBand": {
                    "type": "string"
                  },
                  "durationDays": {
                    "type": "integer"
                  },
                  "travelers": {
                    "type": "string"
                  },
                  "marketplace": {
                    "type": "string",
                    "example": "amazon.com",
                    "description": "amazon.com for United States users; amazon.se (default) for Sweden. Unknown values fall back to amazon.se."
                  },
                  "locale": {
                    "type": "string"
                  },
                  "itemAsins": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "itemKeywords": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "itemQueries": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "country": {
                    "type": "string",
                    "example": "US",
                    "description": "Used when marketplace is omitted (US → amazon.com)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created"
          }
        },
        "description": "marketplace=amazon.com fills itemQueries from the US catalog (amazon.com /dp links). Storefront selection: (1) marketplace or store param (marketplace=amazon.com for United States users), (2) country (US → amazon.com), (3) Accept-Language starting with en-US → amazon.com, (4) default amazon.se (sv and everything else). Missing or unknown values fall back to amazon.se — never a 400. amazon.com results are English only (English titles, USD priceUsd or no price, amazon.com /dp links, English search links).",
        "parameters": [
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "en-US,en;q=0.9"
            },
            "description": "Used when marketplace and country are omitted: a value starting with en-US selects amazon.com; otherwise amazon.se."
          }
        ]
      }
    },
    "/api/v1/products/resolve": {
      "post": {
        "summary": "Resolve ASIN/URL/keywords to buy link",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "asin": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "keywords": {
                    "type": "string"
                  },
                  "tripType": {
                    "type": "string"
                  },
                  "climate": {
                    "type": "string"
                  },
                  "durationBand": {
                    "type": "string"
                  },
                  "marketplace": {
                    "type": "string",
                    "example": "amazon.com",
                    "description": "amazon.com for United States users; amazon.se (default) for Sweden. Unknown values fall back to amazon.se."
                  },
                  "locale": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string",
                    "example": "US",
                    "description": "Used when marketplace is omitted (US → amazon.com)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resolved buy link"
          }
        },
        "description": "marketplace=amazon.com: ASIN → https://www.amazon.com/dp/ASIN?tag=sw-travelpack-20; keywords → best matching US catalog product (title, imageUrl, priceUsd, catalogId) when one exists. Storefront selection: (1) marketplace or store param (marketplace=amazon.com for United States users), (2) country (US → amazon.com), (3) Accept-Language starting with en-US → amazon.com, (4) default amazon.se (sv and everything else). Missing or unknown values fall back to amazon.se — never a 400. amazon.com results are English only (English titles, USD priceUsd or no price, amazon.com /dp links, English search links).",
        "parameters": [
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "example": "en-US,en;q=0.9"
            },
            "description": "Used when marketplace and country are omitted: a value starting with en-US selects amazon.com; otherwise amazon.se."
          }
        ]
      }
    },
    "/api/cron/refresh-catalog": {
      "get": {
        "summary": "Weekly catalog refresh stub",
        "responses": {
          "200": {
            "description": "Stub health"
          }
        }
      }
    }
  }
}