{
  "openapi": "3.0.3",
  "info": {
    "title": "Pet Welcome Box – curated gift wishlist API",
    "version": "0.1.0",
    "description": "Create a gift wishlist for new puppy / kitten 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, ny valp eller kattunge. Quickstart: POST /api/v1/agent/create-and-fill → shopUrl. Gift inspiration for pet shopping lists and first-30-days pet welcome boxes. Always pass marketplace + locale. ownerUrl builds the kit; shopUrl shops. Search-primary; curated catalog has 150+ amazon.se ASINs. amazon.se uses Associates tag sw-petbox-21 when configured. Never invent placeholder tags. Prefer buyUrl / trackingTag. UI may show a short may-earn disclosure."
  },
  "servers": [
    {
      "url": "https://pet-welcome-box.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": "stage",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "budgetBand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kitCategory",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results"
          }
        }
      }
    },
    "/api/v1/catalog": {
      "get": {
        "summary": "Curated starter catalog",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stage",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "budgetBand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kitCategory",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kitCategories",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Catalog items"
          }
        }
      }
    },
    "/api/v1/wishlists": {
      "post": {
        "summary": "Create wishlist",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "petName": {
                    "type": "string"
                  },
                  "stage": {
                    "type": "string"
                  },
                  "budgetBand": {
                    "type": "string"
                  },
                  "kitCategories": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "species": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (ownerUrl + shopUrl)"
          }
        }
      }
    },
    "/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"
          }
        }
      }
    },
    "/api/v1/products/resolve": {
      "post": {
        "summary": "Resolve ASIN/URL/keywords to buy URL",
        "responses": {
          "200": {
            "description": "Resolved"
          }
        }
      }
    },
    "/api/cron/refresh-catalog": {
      "get": {
        "summary": "Weekly catalog refresh stub (Bearer CRON_SECRET)",
        "responses": {
          "200": {
            "description": "Stub status"
          }
        }
      }
    }
  }
}