Spectre API

The public API for the Spectre products, documented on the Street.co.uk developer portal and integrated into the Street CRM. Covers Spectre Property Reports (create and retrieve property reports, retrieve report leads) and Spectre email marketing (contacts and segments). Six paths documented in a published OpenAPI 3.1 contract; tokens are issued by the Spectre team on email request.

OpenAPI Specification

street-co-spectre-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Spectre API
  description: Public API for the Spectre products
  version: '1.0'
  contact:
    name: Spectre API Development Team
    url: https://spectre.uk.com
    email: apis@spectre.uk.com
servers:
- url: https://api.spectre.uk.com/v1
  description: production
paths:
  /property-reports/user:
    get:
      summary: Get current user
      tags:
      - Property Reports
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    $ref: '#/components/schemas/User'
                  included:
                    type: array
                    items:
                      anyOf:
                      - $ref: '#/components/schemas/IncludedAccount'
                      - $ref: '#/components/schemas/IncludedCompany'
                      - $ref: '#/components/schemas/IncludedReportTemplate'
              examples:
                Get current user response:
                  value:
                    data:
                      id: uuid
                      type: user
                      attributes:
                        email: string
                      relationships:
                        accounts:
                          data:
                          - type: account
                            id: uuid
                        company:
                          data:
                            type: company
                            id: uuid
                      included:
                      - id: uuid
                        type: account
                        attributes:
                          name: string
                      - id: uuid
                        type: company
                        attributes:
                          name: string
                        relationships:
                          data:
                          - type: reportTemplate
                            id: uuid
                      - id: uuid
                        type: reportTemplate
                        attributes:
                          name: string
        '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-property-reports-user
      description: This endpoint retrieves the current user.
      parameters:
      - schema:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            type: string
            enum:
            - accounts
            - company
            - company.reportTemplates
        in: query
        name: include
        description: Optional related entities to include in the results
        explode: false
        style: form
    parameters: []
  /property-reports/reports:
    get:
      summary: Get all reports
      tags:
      - Property Reports
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Report'
                  included:
                    type: array
                    items:
                      anyOf:
                      - $ref: '#/components/schemas/IncludedMedia'
              examples:
                Get all reports response:
                  value:
                    data:
                    - id: uuid
                      type: report
                      attributes:
                        title: string
                        description: string
                        state: string
                        reportUrl: url
                        imageUrl: url
                        imageSource: string
                      relationships:
                        pdf:
                          data:
                          - type: medium
                            id: uuid
                    included:
                    - id: uuid
                      type: medium
                      attributes:
                        id: uuid
                        url: url
        '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-property-reports-reports
      parameters:
      - schema:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            type: string
            enum:
            - pdf
        in: query
        name: include
        description: Optional related entities to include in the results
        explode: false
        style: form
      description: This endpoint retrieves all the reports the current user.
    post:
      summary: Create a new report
      tags:
      - Property Reports
      responses:
        '201':
          description: Created
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Report'
                  included:
                    type: array
                    items:
                      anyOf:
                      - $ref: '#/components/schemas/IncludedMedia'
              examples:
                Create a report response:
                  value:
                    data:
                      id: uuid
                      type: report
                      attributes:
                        title: string
                        description: string
                        state: string
                        reportUrl: url
                        imageUrl: url
                        imageSource: string
                      relationships:
                        pdf:
                          data:
                          - type: medium
                            id: uuid
                    included:
                    - id: uuid
                      type: medium
                      attributes:
                        id: uuid
                        url: url
        '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: post-property-reports-reports
      parameters:
      - schema:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            type: string
            enum:
            - pdf
        in: query
        name: include
        description: Optional related entities to include in the results
        explode: false
        style: form
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              allOf:
              - type: object
                properties:
                  account_id:
                    type: string
                    format: uuid
                  report_template_id:
                    type: string
                    format: uuid
                anyOf:
                - $ref: '#/components/schemas/PropertyAddress'
                - $ref: '#/components/schemas/PropertyBarcode'
  /property-reports/reports/{reportId}:
    get:
      summary: Get a single report
      tags:
      - Property Reports
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    $ref: '#/components/schemas/Report'
                  included:
                    type: array
                    items:
                      anyOf:
                      - $ref: '#/components/schemas/IncludedMedia'
              examples:
                Get single report response:
                  value:
                    data:
                      id: uuid
                      type: report
                      attributes:
                        title: string
                        description: string
                        state: string
                        reportUrl: url
                        imageUrl: url
                        imageSource: string
                      relationships:
                        pdf:
                          data:
                          - type: medium
                            id: uuid
                    included:
                    - id: uuid
                      type: medium
                      attributes:
                        id: uuid
                        url: url
        '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-property-reports-report
      parameters:
      - schema:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            type: string
            enum:
            - pdf
        in: query
        name: include
        description: Optional related entities to include in the results
        explode: false
        style: form
      description: This endpoint retrieves a single report by UUID for the current user.
  /property-reports/leads:
    get:
      summary: Get all leads
      tags:
      - Property Reports
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Lead'
              examples:
                Get all leads response:
                  value:
                    data:
                    - id: uuid
                      type: lead
                      attributes:
                        contactName: string
                        contactEmail: email
                        contactNumber: phone
                        contactAddress: string
                        preferredValuationDate: date
                        emailConsent: boolean
                        closedAt: date
        '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-property-reports-leads
      description: This endpoint retrieves all the leads the current user.
    post:
      summary: Create a new lead
      tags:
      - Property Reports
      responses:
        '201':
          description: Created
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Lead'
              examples:
                Create a lead response:
                  value:
                    data:
                      id: uuid
                      type: report
                      attributes:
                        contactName: string
                        contactEmail: string
                        contactNumber: string
                        contactAddress: string
                        preferredValuationDate: string
                        emailConsent: string
                        closedAt: string
        '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: post-property-reports-leads
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              allOf:
              - required:
                - email
                properties:
                  account_id:
                    type: string
                    format: uuid
                  report_id:
                    type: string
                    format: uuid
                  first_name:
                    type: string
                  last_name:
                    type: string
                  email:
                    type: string
                    format: email
                  contact_number:
                    type: string
                  has_marketing_consent:
                    type: boolean
              type: object
  /email/contacts:
    post:
      summary: Create a new contact
      operationId: post-email-contacts
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    $ref: '#/components/schemas/Contact'
      tags:
      - Email
      description: This endpoint creates a new contact.
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              allOf:
              - required:
                - email
                properties:
                  title:
                    type: string
                    maxLength: 255
                  first_name:
                    type: string
                    maxLength: 255
                  last_name:
                    type: string
                    maxLength: 255
                  email:
                    type: string
                    format: email
                    maxLength: 255
                  phone:
                    type: string
                    maxLength: 255
                  subscription_status:
                    $ref: '#/components/schemas/SubsciptionStatus'
                  segment_id:
                    type: string
                    format: uuid
                    description: Optional ID of a segment with type 'uploaded' to send contacts to.
              type: object
        description: ''
  /email/segments:
    get:
      summary: Get all segments
      operationId: get-email-segments
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    $ref: '#/components/schemas/Segment'
      tags:
      - Email
      description: This endpoint gets all segments.
      requestBody:
        content: {}
        description: ''
      parameters:
      - $ref: '#/components/parameters/segment_type'
    post:
      summary: Create a new uploaded segment
      operationId: post-email-segments
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    $ref: '#/components/schemas/Segment'
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              allOf:
              - properties:
                  name:
                    type: string
                    maxLength: 255
                  description:
                    type: string
                    maxLength: 255
                required:
                - name
              type: object
        description: ''
      tags:
      - Email
      description: This endpoint creates a new uploaded segment.
components:
  schemas:
    User:
      title: User
      allOf:
      - $ref: '#/components/schemas/BaseModel'
      - type: object
        properties:
          type:
            type: string
            default: user
          attributes:
            $ref: '#/components/schemas/UserAttributes'
          relationships:
            type: object
            properties:
              accounts:
                allOf:
                - $ref: '#/components/schemas/RelationshipPlural'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                            - account
              company:
                allOf:
                - $ref: '#/components/schemas/RelationshipSingular'
                - type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          default: company
    UserAttributes:
      title: User (attributes)
      type: object
      properties:
        email:
          type: string
          format: email
      x-tags:
      - Users
      description: ''
    RelationshipPlural:
      title: Relationship Plural
      x-tags:
      - JSON:API Structures
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              id:
                type: string
                example: a827a3ae-4c74-4c32-8b42-42248d4010d3
      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.
    RelationshipSingular:
      title: Relationship Singular
      x-tags:
      - JSON:API Structures
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
            id:
              type: string
              example: a827a3ae-4c74-4c32-8b42-42248d4010d3
      description: This is a inheritable schema to allow you to easily add relationships to your main
        schemas. This should be used for `1:1` relationships.
    BaseModel:
      title: Base Model
      type: object
      properties:
        type:
          type: string
        id:
          type: string
          format: uuid
        attributes:
          type: object
      required:
      - type
      - id
      - attributes
      description: This is a base schema that can be inherited by your main schemas to prevent duplicating
        boilerplate. You should use this for 'models' such as `User` or `Profile`
      x-tags:
      - JSON:API Structures
    BaseError:
      discriminator:
        propertyName: errorType
        mapping:
          '401': '#/components/responses/401'
          '403': '#/components/responses/403'
          '404': '#/components/responses/404'
          '406': '#/components/responses/406'
          '415': '#/components/responses/415'
          '500': '#/components/responses/500'
      title: Basic Error
      type: object
      x-tags:
      - Errors
      - JSON:API Structures
      properties:
        title:
          type: string
        code:
          type: string
      required:
      - title
      - code
      description: This is a inheritable schema to allow you to easily extend when you need add new error
        responses.
    IncludedLinks:
      title: Included Links
      type: object
      properties:
        self:
          $ref: '#/components/schemas/Link'
        related:
          $ref: '#/components/schemas/Link'
      examples: []
      x-tags:
      - JSON:API Structures
    Links:
      title: Links
      type: object
      description: Links object - JSON:API Standard
      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
      x-tags:
      - JSON:API Structures
      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
    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'
      x-tags:
      - JSON:API Structures
    JsonApi:
      title: API Details
      description: The server's implementation
      type: object
      properties:
        version:
          type: string
        meta:
          $ref: '#/components/schemas/Meta'
      additionalProperties: false
      x-tags:
      - JSON:API Structures
    Meta:
      title: Meta Information
      description: The server's implementation
      type: object
      additionalProperties: true
      x-tags:
      - JSON:API Structures
    Pagination:
      title: Pagination
      type: object
      description: Pagination object - JSON:API Standard
      x-tags:
      - JSON:API Structures
      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
    IncludedResource:
      title: Included Resource
      type: object
      additionalProperties: false
      properties:
        type:
          type: string
        id:
          type: string
          format: uuid
        attributes:
          type: object
        relationships:
          type: object
        links:
          $ref: '#/components/schemas/IncludedLinks'
        meta:
          $ref: '#/components/schemas/Meta'
      required:
      - type
      - id
      examples: []
      x-tags:
      - JSON:API Structures
    IncludedUser:
      allOf:
      - $ref: '#/components/schemas/IncludedResource'
      - type: object
        properties:
          type:
            type: string
            enum:
            - user
          attributes:
            $ref: '#/components/schemas/UserAttributes'
      title: User (included)
      x-tags:
      - Users
    Account:
      title: Account
      allOf:
      - $ref: '#/components/schemas/BaseModel'
      - type: object
        properties:
          type:
            type: string
            default: account
          attributes:
            $ref: '#/components/schemas/AccountAttributes'
      x-tags:
      - Accounts
    AccountAttributes:
      title: Account (attributes)
      type: object
      properties:
        name:
          type: string
      x-tags:
      - Accounts
    IncludedAccount:
      allOf:
      - $ref: '#/components/schemas/IncludedResource'
      - type: object
        properties:
          type:
            type: string
            enum:
            - account
          attributes:
            $ref: '#/components/schemas/AccountAttributes'
      title: Account (included)
      x-tags:
      - Accounts
    Company:
      title: Company
      allOf:
      - $ref: '#/components/schemas/BaseModel'
      - type: object
        properties:
          type:
            type: string
            default: account
          attributes:
            $ref: '#/components/schemas/CompanyAttributes'
          relationships:
            type: object
            properties:
              reportTemplates:
                allOf:
                - $ref: '#/components/schemas/RelationshipPlural'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                            - reportTemplate
      x-tags:
      - Companies
    CompanyAttributes:
      title: Company (attributes)
      type: object
      properties:
        name:
          type: string
      x-tags:
      - Companies
    IncludedCompany:
      allOf:
      - $ref: '#/components/schemas/IncludedResource'
      - type: object
        properties:
          type:
            type: string
            enum:
            - company
          attributes:
            $ref: '#/components/schemas/CompanyAttributes'
          relationships:
            type: object
            properties:
              reportTemplates:
                allOf:
                - $ref: '#/components/schemas/RelationshipPlural'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                            - reportTemplate
      title: Company (included)
      x-tags:
      - Companies
    ReportTemplate:
      title: Report Templates
      allOf:
      - $ref: '#/components/schemas/BaseModel'
      - type: object
        properties:
          type:
            type: string
            default: reportTemplates
          attributes:
            $ref: '#/components/schemas/ReportTemplateAttributes'
      x-tags:
      - Report Templates
    ReportTemplateAttributes:
      title: Report Template (attributes)
      type: object
      properties:
        name:
          type: string
      x-tags:
      - Report Templates
    IncludedReportTemplate:
      allOf:
      - $ref: '#/components/schemas/IncludedResource'
      - type: object
        properties:
          type:
            type: string
            enum:
            - reportTemplate
          attributes:
            $ref: '#/components/schemas/ReportTemplateAttributes'
      title: Report Templates (included)
      x-tags:
      - Report Templates
    Report:
      title: Report
      allOf:
      - $ref: '#/components/schemas/BaseModel'
      - type: object
        properties:
          type:
            type: string
            default: report
          attributes:
            $ref: '#/components/schemas/ReportAttributes'
      x-tags:
      - Reports
    ReportAttributes:
      title: Report (attributes)
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        state:
          type: string
        reportUrl:
          type: string
        imageUrl:
          type: string
        imageSource:
          type: string
      x-tags:
      - Reports
    IncludedMedia:
      allOf:
      - $ref: '#/components/schemas/IncludedResource'
      - type: object
        properties:
          type:
            type: string
            enum:
            - media
          attributes:
            $ref: '#/components/schemas/MediaAttributes'
      title: Media (Included)
      x-tags:
      - Media
    MediaAttributes:
      title: Media (attributes)
      type: object
      properties:
        id:
          type: string
        url:
          type: string
      x-tags:
      - Media
    Lead:
      title: Lead
      allOf:
      - $ref: '#/components/schemas/BaseModel'
      - type: object
        properties:
          type:
            type: string
            default: lead
          attributes:
            $ref: '#/components/schemas/LeadAttributes'
      x-tags:
      - Leads
    LeadAttributes:
      title: Lead (attributes)
      type: object
      x-tags:
      - Leads
      properties:
        contactName:
          type: string
        contactEmail:
          type: string
        contactNumber:
          type: string
        contactAddress:
          type: string
        preferredValuationDate:
          type: string
          format: date-time
        emailConsent:
          type: boolean
        closedAt:
          type: string
          format: date-time
    PropertyAddress:
      title: PropertyAddress
      type: object
      properties:
        property_address:
          type: string
        property_postcode:
          type: string
      x-tags:
      - Reports
      description: ''
    PropertyBarcode:
      title: PropertyBarcode
      type: object
      x-tags:
      - Reports
      properties:
        property_barcode:
          type: string
    Contact:
      title: Contact
      allOf:
      - $ref: '#/components/schemas/BaseModel'
      - type: object
        properties:
          type:
            type: string
            default: contact
          attributes:
            $ref: '#/components/schemas/ContactAttributes'
    ContactAttributes:
      title: ContactAttributes
      type: object
      properties:
        title:
          type: string
        firstName:
          type: strin

# --- truncated at 32 KB (40 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/street-co/refs/heads/main/openapi/street-co-spectre-api-openapi.yml