openapi: 3.2.0 info: title: Street Open Solicitors 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: Solicitors description: Solicitors endpoints for this API. paths: /solicitors: get: operationId: get-solicitors summary: Get all Solicitors description: This endpoint retrieves multiple paginated solicitors along with `meta` and `pagination` information. tags: - Solicitors parameters: - schema: type: string format: email in: query name: filter[email_address] description: Filter enquiries by the provided email address - schema: type: array uniqueItems: true minItems: 1 items: type: string enum: - solicitorFirm - applicantSolicitorSale - ownerSolicitorSale in: query name: include description: Optional related entities to include in the results. style: form explode: false responses: '200': description: OK. content: application/vnd.api+json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Solicitor' included: type: array items: anyOf: - $ref: '#/components/schemas/IncludedSolicitorFirm' - $ref: '#/components/schemas/IncludedApplicantSolicitorSale' - $ref: '#/components/schemas/IncludedOwnerSolicitorSale' 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' /solicitors/{solicitor_id}: parameters: - schema: type: string format: uuid name: solicitor_id in: path required: true description: The UUID of the Solicitor. get: operationId: get-solicitors-solicitorID summary: Get a single Solicitor description: This endpoint retrieves a single solicitor by its `UUID`. tags: - Solicitors parameters: - schema: type: array uniqueItems: true minItems: 1 items: type: string enum: - solicitorFirm - applicantSolicitorSale - ownerSolicitorSale in: query name: include description: Optional related entities to include in the results. style: form explode: false responses: '200': description: OK. content: application/vnd.api+json: schema: type: object properties: data: $ref: '#/components/schemas/Solicitor' included: type: array items: anyOf: - $ref: '#/components/schemas/IncludedSolicitorFirm' - $ref: '#/components/schemas/IncludedApplicantSolicitorSale' - $ref: '#/components/schemas/IncludedOwnerSolicitorSale' links: $ref: '#/components/schemas/IncludedLinks' meta: type: object 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' 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' '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' '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' '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' '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' schemas: IncludedResource: title: Included Resource type: object examples: [] required: - type - id properties: type: type: string id: type: string format: uuid attributes: type: object relationships: type: - object - 'null' meta: $ref: '#/components/schemas/Meta' EmailAddressSimple: title: Email Address (simple) description: An email address, can be related to a person and/or a company. type: object properties: value: type: string example: john@johndoe.com format: email notes: type: - string - 'null' primary: type: boolean 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 SaleAttributes: title: Sale (attributes) type: object properties: address: $ref: '#/components/schemas/AddressSimple' status: type: string enum: - Completed - Fallen Through - Offer Accepted - Exchanged - Under Offer sale_price: type: number dates: type: object properties: expected_exchange_date: type: - string - 'null' format: date-time exchanged_date: type: - string - 'null' format: date-time expected_completion_date: type: - string - 'null' format: date-time completed_date: type: - string - 'null' format: date-time SolicitorFirmAttributes: title: Solicitor Firm (attributes) type: object properties: name: type: string address: type: string firm_contact_number: type: string firm_email_address: type: string created_at: type: string format: date-time updated_at: type: string format: date-time RelationshipSingular: title: Relationship Singular description: Inheritable schema for 1:1 relationships. Data may be null if the relationship is empty. type: object properties: data: oneOf: - type: object properties: type: type: string id: type: string format: uuid example: a827a3ae-4c74-4c32-8b42-42248d4010d3 required: - type - id - type: 'null' links: type: object properties: self: $ref: '#/components/schemas/Link' related: $ref: '#/components/schemas/Link' SolicitorAttributes: title: Solicitor (attributes) type: object properties: title: type: string position: type: string first_name: type: string last_name: type: string full_name: type: string telephone_numbers: type: array items: $ref: '#/components/schemas/TelephoneNumberSimple' email_addresses: type: array items: $ref: '#/components/schemas/EmailAddressSimple' address: type: string created_at: type: string format: date-time updated_at: type: string format: date-time 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 TelephoneNumberSimple: title: Telephone Number (simple) description: An telephone number, can be related to a person and/or a company. type: object properties: value: type: string example: '+441632960911' notes: type: - string - 'null' primary: type: boolean Link: title: Link oneOf: - description: a string containing the link's URL type: string format: uri-reference - type: object required: - href properties: href: description: a string containing the link's URL type: string format: uri-reference meta: $ref: '#/components/schemas/Meta' IncludedOwnerSolicitorSale: allOf: - $ref: '#/components/schemas/IncludedResource' - type: object properties: type: type: string enum: - owner_solicitor_sale attributes: allOf: - $ref: '#/components/schemas/SaleAttributes' title: Solicitor Firm (included) IncludedApplicantSolicitorSale: allOf: - $ref: '#/components/schemas/IncludedResource' - type: object properties: type: type: string enum: - applicant_solicitor_sale attributes: allOf: - $ref: '#/components/schemas/SaleAttributes' title: Solicitor Firm (included) IncludedSolicitorFirm: allOf: - $ref: '#/components/schemas/IncludedResource' - type: object properties: type: type: string enum: - solicitorFirm attributes: allOf: - $ref: '#/components/schemas/SolicitorFirmAttributes' title: Solicitor Firm (included) Solicitor: title: Solicitor allOf: - $ref: '#/components/schemas/BaseModel' - type: object properties: type: type: string enum: - solicitor attributes: $ref: '#/components/schemas/SolicitorAttributes' relationships: type: object properties: solicitorFirm: allOf: - $ref: '#/components/schemas/RelationshipSingular' - type: object properties: data: type: object properties: type: type: string enum: - solicitorFirm applicantSolicitorSale: allOf: - $ref: '#/components/schemas/RelationshipPlural' - type: object properties: data: type: array items: type: object properties: type: type: string enum: - applicant_solicitor_sale ownerSolicitorSale: allOf: - $ref: '#/components/schemas/RelationshipPlural' - type: object properties: data: type: array items: type: object properties: type: type: string enum: - owner_solicitor_sale AddressSimple: title: Address (simple) type: object properties: single_line: type: string example: 19 Lansdowne Road, Monton, Manchester anon_single_line: type: string example: Lansdowne Road, Monton, Manchester building_number: type: - string - 'null' example: '19' building_name: type: - string - 'null' street: type: - string - 'null' line_1: type: string example: 19 Lansdowne Road line_2: type: - string - 'null' example: Monton line_3: type: - string - 'null' example: Manchester line_4: type: - string - 'null' town: type: - string - 'null' example: Manchester country: type: string example: United Kingdom postcode: type: string example: M30 9PA udprn: type: - string - 'null' example: '28327204' geo: type: object properties: lat: type: - number - 'null' example: 0.2365698 format: float lng: type: - number - 'null' example: 53.023654 format: float royal_mail: type: - object - 'null' properties: postcode: type: string post_town: type: string thoroughfare: type: string building_name: type: - string - 'null' building_number: type: - string - 'null' department_name: type: - string - 'null' organisation_name: type: - string - 'null' sub_building_name: type: - string - 'null' dependent_locality: type: - string - 'null' dependent_thoroughfare: type: - string - 'null' double_dependent_locality: type: - string - 'null' street_group_property_id: type: - string - 'null' 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 RelationshipPlural: title: Relationship Plural description: This is a inheritable schema to allow you to easily add relationships to your main schemas. This should be used for `1:n` relationships. type: object properties: data: type: array items: type: object properties: type: type: string id: type: string example: a827a3ae-4c74-4c32-8b42-42248d4010d3 links: type: object properties: self: $ref: '#/components/schemas/Link' related: $ref: '#/components/schemas/Link' 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 IncludedLinks: title: Included Links type: object properties: self: $ref: '#/components/schemas/Link' related: $ref: '#/components/schemas/Link' examples: [] securitySchemes: your-api-token: type: http scheme: bearer x-ext-urls: {}