{"openapi":"3.1.0","info":{"title":"Casy API","version":"1.0.0","description":"Public catalog search for Casy, an iPhone-case shop in Georgia. No API key. v1 stays until a removal is announced with a Sunset header at least 90 days ahead. See https://casy.ge/developers#deprecation."},"servers":[{"url":"https://casy.ge"}],"components":{"schemas":{"Hit":{"type":"object","required":["title","url","price","models"],"properties":{"title":{"type":"string"},"url":{"type":"string"},"price":{"type":"string"},"models":{"type":"array","items":{"type":"string"}}}},"Problem":{"type":"object","required":["type","title","status","code","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"}}}},"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://casy.ge/oauth/token","scopes":{"catalog:read":"Read the public catalog"}}}}}},"paths":{"/api/v1/products":{"get":{"operationId":"searchProducts","summary":"Search the Casy catalog","description":"Cursor page of products. Works with no token. Optional scope catalog:read.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Design or iPhone model"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"One page of matches","headers":{"RateLimit":{"schema":{"type":"string"},"description":"RFC RateLimit. 60 requests per 60 seconds."},"RateLimit-Policy":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["results","nextCursor","hasMore"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Hit"}},"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}}}}}},"400":{"description":"Missing query","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit","headers":{"RateLimit":{"schema":{"type":"string"},"description":"RFC RateLimit. 60 requests per 60 seconds."},"RateLimit-Policy":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/ask":{"post":{"operationId":"ask","summary":"NLWeb ask","description":"Same catalog search. Safe to retry: the result depends only on the question.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Caller key. Repeated calls with the same key return the same search result."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}}}}}}},"responses":{"200":{"description":"Results","headers":{"RateLimit":{"schema":{"type":"string"},"description":"RFC RateLimit. 60 requests per 60 seconds."},"RateLimit-Policy":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["_meta","results"],"properties":{"_meta":{"type":"object","required":["response_type","version"],"properties":{"response_type":{"type":"string"},"version":{"type":"string"}}},"results":{"type":"array","items":{"type":"object","required":["url","name","description"],"properties":{"url":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}}}}}}}},"400":{"description":"Missing question","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}}}