openapi: 3.2.0 info: title: Street Open Areas API description: Build on top of the UKs most advanced Estate Agency software. version: '1.0' contact: name: Street API Development Team url: https://street.co.uk email: apis@street.co.uk servers: - url: https://street.co.uk/open-api/v1 description: Production. - url: https://demo.street.co.uk/open-api/v1 description: Testing. security: - your-api-token: [] tags: - name: Areas description: Area endpoints for this API. paths: /areas: get: summary: Get all Areas tags: - Areas responses: '200': description: OK. content: application/vnd.api+json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Area' links: $ref: '#/components/schemas/Links' meta: allOf: - $ref: '#/components/schemas/Pagination' jsonapi: $ref: '#/components/schemas/JsonApi' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' '406': $ref: '#/components/responses/406' '415': $ref: '#/components/responses/415' '500': $ref: '#/components/responses/500' operationId: get-areas description: This endpoint retrieves multiple paginated areas along with `meta` and `pagination` information. parameters: - $ref: '#/components/parameters/filter_trashed' - $ref: '#/components/parameters/page_size' - $ref: '#/components/parameters/page_number' components: responses: '406': description: The HTTP 406 Not Acceptable client error response code indicates that the server cannot produce a response matching the list of acceptable values defined in the request's proactive content negotiation headers, and that the server is unwilling to supply a default representation. content: application/vnd.api+json: schema: $ref: '#/components/schemas/jsonApiErrorResponseBody' '400': description: The HTTP 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error. content: application/vnd.api+json: schema: $ref: '#/components/schemas/jsonApiMultiErrorResponseBody' '404': description: The HTTP 404 Not Found response status code indicates that the server cannot find the requested resource. content: application/vnd.api+json: schema: $ref: '#/components/schemas/jsonApiErrorResponseBody' '403': description: The HTTP 403 Forbidden response status code indicates that the server understands the request but refuses to authorize it. content: application/vnd.api+json: schema: $ref: '#/components/schemas/jsonApiErrorResponseBody' '500': description: The HTTP 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. content: application/vnd.api+json: schema: $ref: '#/components/schemas/jsonApiMultiErrorResponseBody' '401': description: The HTTP 401 Unauthorized response status code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource. content: application/vnd.api+json: schema: $ref: '#/components/schemas/jsonApiErrorResponseBody' '415': description: The HTTP 415 Unsupported Media Type client error response code indicates that the server refuses to accept the request because the payload format is in an unsupported format. content: application/vnd.api+json: schema: $ref: '#/components/schemas/jsonApiErrorResponseBody' schemas: Area: allOf: - $ref: '#/components/schemas/BaseModel' - type: object properties: type: type: string enum: - area attributes: $ref: '#/components/schemas/AreaAttributes' title: Area x-tags: - Areas jsonApiErrorResponseBody: title: JSON:API Error Response Body description: Response body for JSON:API errors, containing an array of `errors` in place of the `data` property provided in JSON:API success responses. Used for non-400/500 error codes where only a single error is expected. type: object properties: meta: type: object source: type: object description: The primary source of the conflict for 409 responses. properties: pointer: type: string description: JSON Pointer to the conflicting request value. parameter: type: string description: URI parameter related to the conflict. errors: description: An array of error objects providing additional information about problems encountered while processing the request. type: array maxItems: 1 items: $ref: '#/components/schemas/jsonApiError' required: - errors Pagination: title: Pagination description: Pagination object - JSON:API Standard. type: object properties: pagination: type: object properties: total: type: integer example: 226 count: type: integer example: 10 per_page: type: integer example: 10 current_page: type: integer example: 1 total_pages: type: integer example: 23 x-examples: example-1: pagination: total: 226 count: 10 per_page: 10 current_page: 1 total_pages: 23 examples: - pagination: total: 226 count: 10 per_page: 10 current_page: 1 total_pages: 23 Links: title: Links description: Links object - JSON:API Standard. type: object x-examples: example-1: self: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=2 first: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=1 prev: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=1 next: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=3 last: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=9 examples: - self: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=2 first: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=1 next: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=1 prev: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=3 last: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=9 properties: self: type: string example: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=2 first: type: string example: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=1 next: type: string example: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=1 prev: type: string example: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=3 last: type: string example: http://localhost:3000/users?page[number]=2&page[size]=25&page[number]=9 Meta: title: Meta Information description: The server's implementation. type: object jsonApiError: title: JSON:API Error Object description: A JSON:API object representing a single error. type: object properties: title: type: string detail: type: string code: type: string source: type: object description: An object containing references to the primary source of the error. properties: pointer: type: string description: A JSON Pointer to the value in the request document that caused the error. parameter: type: string description: A string indicating which URI query parameter caused the error. required: - title examples: - title: 401 Unauthorized detail: The requester is not authorized to access the resource. code: '401' BaseModel: title: Base Model type: object properties: id: type: string format: uuid type: type: string attributes: type: object relationships: type: object JsonApi: title: API Details description: The server's implementation. type: object properties: version: type: string meta: $ref: '#/components/schemas/Meta' jsonApiMultiErrorResponseBody: title: JSON:API Multi-Error Response Body description: Response body for JSON:API errors that may contain multiple error objects (400 Bad Request and 500 Internal Server Error). type: object properties: meta: type: object errors: description: An array of error objects providing additional information about problems encountered while processing the request. type: array items: $ref: '#/components/schemas/jsonApiError' required: - errors AreaAttributes: type: object title: Area (attributes) properties: name: type: - string created_at: type: string format: date-time updated_at: type: string format: date-time parameters: filter_trashed: name: filter[trashed] in: query required: false schema: type: string enum: - with - only description: Optionally return result WITH deleted results or return ONLY deleted results. page_size: name: page[size] description: Set the number of results per page. in: query required: false schema: type: number minimum: 1 maximum: 250 example: 25 page_number: name: page[number] description: Set the page number. in: query required: false schema: type: number minimum: 1 example: 3 securitySchemes: your-api-token: type: http scheme: bearer x-ext-urls: {}