{ "swagger": "2.0", "info": { "description": Exchange web app", "version": "1.0.0", "title": "Exchange web app" }, "host": "{{request()->getHttpHost()}}", "basePath": "/api/v1", "tags": [ { "name": "Address", "description": "Endpoints related to address module, e.g. create, district." } ], "schemes": [ "http", "https" ], "paths": { "/address/create": { "post": { "tags": [ "Address" ], "produces": [ "application/json" ], "operationId": "createAddress", "summary": "Create address", "description": "", "parameters": [ { "name": "company_id", "in": "query", "description": "Company id", "required": true, "type": "integer" }, { "name": "district_id", "in": "query", "description": "District id", "required": true, "type": "integer" }, { "name": "street_one", "in": "query", "description": "Address line 1", "required": true, "type": "string" }, { "name": "street_two", "in": "query", "description": "Address line 2", "required": true, "type": "string" }, { "name": "post_code", "in": "query", "description": "Postcode of the address", "required": true, "type": "string" } ], "responses": { "200": { "description": "successful operation", "headers": { "X-Expires-After": { "type": "string", "format": "date-time", "description": "date in UTC when token expires" }, "X-Rate-Limit": { "type": "integer", "format": "int32", "description": "calls per hour allowed by the user" } }, "schema": { "type": "string" } }, "422": { "description": "Invalid input supplied" } } } }, "/address/delete/{id}": { "delete": { "tags": [ "Address" ], "produces": [ "application/json" ], "operationId": "deleteAddress", "summary": "Delete address", "description": "", "parameters": [ { "name": "id", "in": "path", "description": "District id", "required": true, "type": "string" } ], "responses": { "200": { "description": "successful operation", "headers": { "X-Expires-After": { "type": "string", "format": "date-time", "description": "date in UTC when token expires" }, "X-Rate-Limit": { "type": "integer", "format": "int32", "description": "calls per hour allowed by the user" } }, "schema": { "type": "string" } }, "422": { "description": "Invalid input supplied" } } } }, "/address/list": { "get": { "tags": [ "Address" ], "produces": [ "application/json" ], "operationId": "listAddress", "summary": "List addresses of logged in user", "description": "", "parameters": [ { "name": "filter", "in": "query", "description": "Filters", "required": false, "type": "array", "items": { "type": "string" } } ], "responses": { "200": { "description": "successful operation", "headers": { "X-Expires-After": { "type": "string", "format": "date-time", "description": "date in UTC when token expires" }, "X-Rate-Limit": { "type": "integer", "format": "int32", "description": "calls per hour allowed by the user" } }, "schema": { "type": "string" } }, "422": { "description": "Invalid input supplied" } } } }, "/address/{id}/show": { "get": { "tags": [ "Address" ], "produces": [ "application/json" ], "operationId": "showAddress", "summary": "List addresses of logged in user", "description": "", "parameters": [ { "name": "id", "in": "path", "description": "Address id", "required": true, "type": "integer" } ], "responses": { "200": { "description": "successful operation", "headers": { "X-Expires-After": { "type": "string", "format": "date-time", "description": "date in UTC when token expires" }, "X-Rate-Limit": { "type": "integer", "format": "int32", "description": "calls per hour allowed by the user" } }, "schema": { "type": "string" } }, "422": { "description": "Invalid input supplied" } } } }, "/address/update/{id}": { "put": { "tags": [ "Address" ], "produces": [ "application/json" ], "operationId": "updateAddress", "summary": "Set default address", "description": "", "parameters": [ { "name": "id", "in": "path", "description": "Address id", "required": true, "type": "integer" } ], "responses": { "200": { "description": "successful operation", "headers": { "X-Expires-After": { "type": "string", "format": "date-time", "description": "date in UTC when token expires" }, "X-Rate-Limit": { "type": "integer", "format": "int32", "description": "calls per hour allowed by the user" } }, "schema": { "type": "string" } }, "422": { "description": "Invalid input supplied" } } } } }, "securityDefinitions": { "Authorization": { "type": "apiKey", "name": "api_key", "in": "header" }, "petstore_auth": { "type": "oauth2", "authorizationUrl": "https://petstore.swagger.io/oauth/authorize", "flow": "implicit", "scopes": { "read:pets": "read your pets", "write:pets": "modify pets in your account" } } } }