{"openapi":"3.0.1","info":{"title":"Foxdeli Customer Service API","description":"Foxdeli API implements JWT tokens as its chosen method of authentication, requiring that these tokens be included in the HTTP header X-API-Key for each request.","version":"8.72.2"},"externalDocs":{"description":"Foxdeli API documentation","url":"https://apidoc.foxdeli.com/"},"servers":[{"url":"https://api.foxdeli.com/customer","description":"Production API server for live data"},{"url":"https://api.sandbox.foxdeli.com/customer","description":"Sandbox API server for integration testing"}],"security":[{"ApiKeyAuth":[]}],"tags":[{"name":"Token","description":"Token operations"}],"paths":{"/api/v1/token/refresh":{"post":{"tags":["Token"],"summary":"Returns fresh API access token","description":"Finds an account with provided refresh token if exists and returns new API access token.","operationId":"refresh","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenCommand"}}}},"responses":{"400":{"description":"Constraint violation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Invalid API token provided","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"403":{"description":"AccessDeniedException","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"201":{"description":"Refresh successful, fresh access token created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPair"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/TokenPair"}}}}},"security":[]}},"/api/v1/token/authorize":{"post":{"tags":["Token"],"summary":"Authorize and return API access token","description":"Finds an account with provided username and password, if exists and returns new API access token.","operationId":"authorize","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authorization"}}},"required":true},"responses":{"400":{"description":"Constraint violation","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"description":"Invalid API token provided","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"403":{"description":"AccessDeniedException","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"409":{"description":"Account not active.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"201":{"description":"Login successful, access token created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPair"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/TokenPair"}}}},"404":{"description":"Account with provided credentials was not found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}}},"security":[]}}},"components":{"schemas":{"ProblemDetail":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer","format":"int32"},"detail":{"type":"string"},"instance":{"type":"string","format":"uri"},"properties":{"type":"object","additionalProperties":{"type":"object"}}}},"RefreshTokenCommand":{"type":"object","properties":{"refreshToken":{"type":"string","description":"Refresh token value."}},"description":"Refresh token value"},"TokenPair":{"required":["refreshToken","token"],"type":"object","properties":{"token":{"type":"string","description":"Auth token"},"refreshToken":{"type":"string","description":"Refresh token"}},"description":"Auth token pair"},"Authorization":{"required":["email","password"],"type":"object","properties":{"email":{"type":"string","description":"Email to authorize","example":"myuser@coolmail.com"},"password":{"type":"string","description":"Secret password to authorize","example":"supersecretpwd"}},"description":"Username and password to authorize"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}}}}