{
  "openapi": "3.1.0",
  "info": {
    "title": "Gopuff API",
    "version": "1.0",
    "description": "Gopuff collections, products, product details and search (unverified)\n\nCalled through the ApiClay gateway with an ApiClay token or API key (https://apiclay.com/dashboard/keys). Pricing, trial, fees and full parameter notes: https://apiclay.com/api/gopuffapi/llms.txt",
    "x-apiclay-vendor": "gopuffapi",
    "x-apiclay-pricing": "0.0012 credits/request, 1 trial requests"
  },
  "externalDocs": {
    "description": "Full documentation for AI agents (Markdown)",
    "url": "https://apiclay.com/api/gopuffapi/llms.txt"
  },
  "servers": [
    {
      "url": "https://api.apiclay.com/v1/api/gopuffapi"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "tokenHeader": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "ApiClay API key (apiclay_…) or session token"
      },
      "tokenHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "token",
        "description": "ApiClay API key (apiclay_…) or session token"
      }
    }
  },
  "paths": {
    "/menus": {
      "post": {
        "operationId": "post_menus",
        "summary": "Menus (home page collections)",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/categories": {
      "post": {
        "operationId": "post_categories",
        "summary": "Categories (subcategory links)",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "variables": {
                  "apiVersion": "v2",
                  "contentParams": "1",
                  "route": "/us/c/txe0Kwob"
                }
              }
            }
          }
        }
      }
    },
    "/products": {
      "post": {
        "operationId": "post_products",
        "summary": "Products (category products)",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "variables": {
                  "apiVersion": "v2",
                  "contentParams": "434",
                  "fulfillmentType": "fulfillment_delivery",
                  "route": "/us/c/txe0Kwob"
                }
              }
            }
          }
        }
      }
    },
    "/product": {
      "post": {
        "operationId": "post_product",
        "summary": "Product (product details)",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "variables": {
                  "apiVersion": "v2",
                  "contentParams": "434",
                  "fulfillmentType": "fulfillment_delivery",
                  "route": "/us/p/p12345/p12345?contentSection=product"
                }
              }
            }
          }
        }
      }
    },
    "/search": {
      "post": {
        "operationId": "post_search",
        "summary": "Search (keyword)",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "variables": {
                  "contentParams": "432",
                  "route": "US/s?q=coke"
                }
              }
            }
          }
        }
      }
    },
    "/partner_products": {
      "get": {
        "operationId": "get_partner_products",
        "summary": "Partner products (stock and price by product id)",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Gopuff-Partner",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Gopuff-Access-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
