openapi: 3.2.0 info: title: Street Open Notes 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: Notes description: Notes endpoints for this API. paths: /notes: post: operationId: post-notes summary: Create a Note responses: '201': description: Created. content: application/vnd.api+json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/Note' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '406': $ref: '#/components/responses/406' '409': $ref: '#/components/responses/409' '415': $ref: '#/components/responses/415' '500': $ref: '#/components/responses/500' requestBody: content: application/vnd.api+json: schema: type: object properties: data: type: object required: - type - attributes - relationships properties: type: type: string enum: - note attributes: type: object required: - body properties: body: type: string pinned: type: boolean default: false author: type: - string - 'null' format: uuid relationships: oneOf: - $ref: '#/components/schemas/CompanyRelated' - $ref: '#/components/schemas/PersonRelated' - $ref: '#/components/schemas/PropertyRelated' - $ref: '#/components/schemas/TenancyRelated' - $ref: '#/components/schemas/SalesApplicantRelated' - $ref: '#/components/schemas/LettingsApplicantRelated' - $ref: '#/components/schemas/LettingsApplicationRelated' - $ref: '#/components/schemas/EnquiryRelated' - $ref: '#/components/schemas/OwnerRelated' - $ref: '#/components/schemas/SaleRelated' - $ref: '#/components/schemas/SalesOfferRelated' - $ref: '#/components/schemas/LettingsOfferRelated' - $ref: '#/components/schemas/ViewingRelated' - $ref: '#/components/schemas/ValuationRelated' - $ref: '#/components/schemas/InspectionRelated' - $ref: '#/components/schemas/MaintenanceJobRelated' required: - data description: This endpoint allows you to create a `Note` record by providing core information such as the entity the `Note` relates to, the content/body of the `Note` and any related tags. tags: - Notes x-internal: false 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' '409': description: The HTTP 409 Conflict response status code indicates a request conflict with the current state of the target resource. 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' '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' '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' '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: SaleRelated: title: Sale (related) type: object additionalProperties: false properties: sale: type: object properties: data: type: object properties: type: type: string enum: - sale id: type: string format: uuid CompanyRelated: title: Company (related) type: object properties: company: type: object properties: data: type: object properties: type: type: string enum: - company id: type: string format: uuid 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 ViewingRelated: title: Viewing (related) type: object additionalProperties: false properties: viewing: type: object properties: data: type: object properties: type: type: string enum: - viewing id: type: string format: uuid ValuationRelated: title: Valuation (related) type: object additionalProperties: false properties: valuation: type: object properties: data: type: object properties: type: type: string enum: - valuation id: type: string format: uuid PersonRelated: title: Person (related) type: object properties: person: type: object properties: data: type: object properties: type: type: string enum: - person id: type: string format: uuid LettingsOfferRelated: title: Lettings Offer (related) type: object properties: lettings_offer: type: object properties: data: type: object properties: type: type: string enum: - lettingsOffer id: type: string format: uuid PropertyRelated: title: Property (related) type: object additionalProperties: false properties: property: type: object properties: data: type: object properties: type: type: string enum: - property id: type: string format: uuid EnquiryRelated: title: Enquiry (related) type: object properties: enquiry: type: object properties: data: type: object properties: type: type: string enum: - enquiry id: type: string format: uuid OwnerRelated: title: Owner (related) type: object properties: owner: type: object properties: data: type: object properties: type: type: string enum: - owner id: type: string format: uuid MaintenanceJobRelated: title: MaintenanceJob (related) type: object properties: maintenance: type: object properties: data: type: object properties: type: type: string enum: - maintenance id: type: string format: uuid LettingsApplicationRelated: title: Lettings Application (related) type: object properties: lettings_application: type: object properties: data: type: object properties: type: type: string enum: - lettingsApplication id: type: string format: uuid TenancyRelated: title: Tenancy (related) type: object properties: tenancy: type: object properties: data: type: object properties: type: type: string enum: - tenancy id: type: string format: uuid LettingsApplicantRelated: title: Lettings Applicant (related) type: object additionalProperties: false properties: lettings_applicant: type: object properties: data: type: object properties: type: type: string enum: - lettingsApplicant id: type: string format: uuid SalesApplicantRelated: title: Sales Applicant (related) type: object additionalProperties: false properties: sales_applicant: type: object properties: data: type: object properties: type: type: string enum: - salesApplicant id: type: string format: uuid 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' Note: title: Note x-tags: - Notes allOf: - $ref: '#/components/schemas/BaseModel' - type: object properties: type: type: string enum: - note attributes: $ref: '#/components/schemas/NoteAttributes' NoteAttributes: title: Note (attributes) type: object properties: body: type: - string - 'null' author: type: - string - 'null' pinned_at: type: - string - 'null' format: date-time created_at: type: string format: date-time updated_at: type: string format: date-time InspectionRelated: title: Inspection (related) type: object properties: inspection: type: object properties: data: type: object properties: type: type: string enum: - inspection id: type: string format: uuid BaseModel: title: Base Model type: object properties: id: type: string format: uuid type: type: string attributes: type: object relationships: type: object 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 SalesOfferRelated: title: Sales Offer (related) type: object properties: sales_offer: type: object properties: data: type: object properties: type: type: string enum: - salesOffer id: type: string format: uuid securitySchemes: your-api-token: type: http scheme: bearer x-ext-urls: {}