> ## Documentation Index
> Fetch the complete documentation index at: https://docs.osaconnection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check a roof without building it

> Runs the checks that `POST /v1/esx-exports` runs, on the same body, and answers with every
problem found. No export is recorded and the roof is not kept; nothing is sent to the
export provider or charged, so check as often as you like. The `reference` is not checked
for duplicates.

**The request's shape comes first.** A misspelt or unknown field, a wrong type or a value
out of range answers `422 validation_failed`, with `errors` pointing at each field, and the
roof checks do not run. Rules the schema cannot express (a scale missing or not allowed, a
repeated id, heights given two ways or on some points only, an overhang on an edge that is
not an eave or a rake, a coordinate more than 1,000,000 plan units either way) are roof
problems of check 1, critical, and answer `200` with `buildable: false`.

**Severities.** `error` is critical: the roof cannot be built and would be refused, so
`buildable` is `false`. `major` and `minor` are warnings: the roof would be built anyway,
and `detail` says what OSA would do. A critical problem can stop the later checks on its
structure, so check again after correcting it.

**Checking first is optional.** `POST /v1/esx-exports` always runs the checks again.




## OpenAPI

````yaml POST /v1/esx-exports/checks
openapi: 3.1.0
info:
  title: OSA Partner API
  version: 1.0.0
  summary: Send claims to adjusters in the OSA app and follow their acceptance.
  description: >
    The OSA Partner API lets a partner's claims system invite adjusters to its
    organisation,

    send them claims, and see whether each claim was accepted or rejected in the
    OSA app.


    **Conventions**

    - All requests and responses are JSON (`application/json`); errors use RFC
    9457 problem
      details (`application/problem+json`).
    - Field names are `snake_case`. Enum values are lowercase (for example
    `flood`,
      `pending_acceptance`), except US state and territory codes, which are the standard
      two-letter USPS codes, and flood zones, which are written as FEMA writes them (for
      example `AE`).
    - Enums are **open**: new values may be added to responses at any time, so
    your code must
      tolerate values it doesn't recognise.
    - Additive changes (new endpoints, new optional request fields, new response
    fields, new
      enum values) are made within `/v1`. Breaking changes go to a new version.
    - Requests are strict: an unknown or misspelled body field or query
    parameter is
      rejected with `422 validation_failed`, so typos can't be silently ignored.
    - Your own claim id (`external_id`) is stored on every claim and returned on
    every claim
      response, so you can match claims without keeping OSA's id.
    - Timestamps are RFC 3339 date-times in UTC. Dates that are calendar dates
    (such as the
      date of loss) are `YYYY-MM-DD` and are never converted between time zones.

    **Keys.** Every request except `GET /v1/health` needs an API key sent as

    `Authorization: Bearer <key>`. Live keys start with `osa_live_`; test keys
    start with

    `osa_test_` and only reach test claims and test accounts.
  contact:
    name: OSA API support
    email: info@osaconnection.com
    url: https://docs.osaconnection.com
servers:
  - url: https://api.osaconnection.com
    description: >-
      Production. Live and test keys both use this host; the key decides which
      data you reach.
security:
  - apiKey: []
tags:
  - name: Claims
    description: >
      Send claims to adjusters, offer them to another adjuster, and poll for
      acceptance.

      `/v1/claims` is always the claims you sent through the API.
  - name: Members
    description: >-
      Invite people to your organisation by their OSAID, with a role, and track
      their invitations.
  - name: ESX exports
    description: >
      Send measurements and get an Xactimate ESX back: check a roof, send it to
      be built, poll

      until it is ready, then ask for the file.
  - name: Account
    description: Check which partner and permissions your API key carries.
  - name: Health
    description: Service availability. No key needed.
paths:
  /v1/esx-exports/checks:
    post:
      tags:
        - ESX exports
      summary: Check a roof without building it
      description: >
        Runs the checks that `POST /v1/esx-exports` runs, on the same body, and
        answers with every

        problem found. No export is recorded and the roof is not kept; nothing
        is sent to the

        export provider or charged, so check as often as you like. The
        `reference` is not checked

        for duplicates.


        **The request's shape comes first.** A misspelt or unknown field, a
        wrong type or a value

        out of range answers `422 validation_failed`, with `errors` pointing at
        each field, and the

        roof checks do not run. Rules the schema cannot express (a scale missing
        or not allowed, a

        repeated id, heights given two ways or on some points only, an overhang
        on an edge that is

        not an eave or a rake, a coordinate more than 1,000,000 plan units
        either way) are roof

        problems of check 1, critical, and answer `200` with `buildable: false`.


        **Severities.** `error` is critical: the roof cannot be built and would
        be refused, so

        `buildable` is `false`. `major` and `minor` are warnings: the roof would
        be built anyway,

        and `detail` says what OSA would do. A critical problem can stop the
        later checks on its

        structure, so check again after correcting it.


        **Checking first is optional.** `POST /v1/esx-exports` always runs the
        checks again.
      operationId: checkEsxExport
      requestBody:
        required: true
        description: The roof and its property, exactly as you would send them to be built.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EsxExportCreate'
            examples:
              gable:
                summary: A gable roof and its property
                value:
                  reference: ORDER-1042
                  input:
                    type: roof
                    format: osa-roof/1
                    plan:
                      units: ft
                      y_axis: up
                      north_deg: 0
                    structures:
                      - id: house
                        points:
                          - id: a
                            x: -20
                            'y': -15
                          - id: b
                            x: 20
                            'y': -15
                          - id: c
                            x: 20
                            'y': 15
                          - id: d
                            x: -20
                            'y': 15
                          - id: e
                            x: -20
                            'y': 0
                          - id: f
                            x: 20
                            'y': 0
                        edges:
                          - id: eave-s
                            from: a
                            to: b
                            type: eave
                          - id: eave-n
                            from: c
                            to: d
                            type: eave
                          - id: ridge
                            from: e
                            to: f
                            type: ridge
                          - id: rake-sw
                            from: a
                            to: e
                            type: rake
                          - id: rake-se
                            from: b
                            to: f
                            type: rake
                          - id: rake-ne
                            from: c
                            to: f
                            type: rake
                          - id: rake-nw
                            from: d
                            to: e
                            type: rake
                        faces:
                          - id: south
                            edges:
                              - eave-s
                              - rake-se
                              - ridge
                              - rake-sw
                            pitch: 6
                            eave_height_ft: 9
                          - id: north
                            edges:
                              - eave-n
                              - rake-nw
                              - ridge
                              - rake-ne
                            pitch: 6
                            eave_height_ft: 9
                  property:
                    street: 740 Canyon View Drive
                    city: Lehi
                    state: UT
                    zip: '84043'
                    lat: 40.4358
                    lon: -111.8683
      responses:
        '200':
          description: >
            The roof checks ran. `buildable` says whether the roof would be
            built; `problems` lists

            every problem found, critical or not.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EsxExportCheck'
              examples:
                clean:
                  summary: Buildable, with no problems
                  value:
                    buildable: true
                    problems: []
                warnings:
                  summary: Buildable, with one major and one minor warning
                  value:
                    buildable: true
                    problems:
                      - pointer: /input/structures/0/edges/0
                        check: 4
                        severity: major
                        detail: >-
                          eave `eave-s` is not level (its ends are 1 ft 3 in
                          apart); it would be built as drawn
                      - pointer: /input/structures/0/points/4
                        check: 5
                        severity: minor
                        detail: >-
                          point `e`, the faces that meet there put it at
                          different heights (1.7 in apart); it would be built at
                          their average, 16 ft 6.9 in
                not_buildable:
                  summary: Not buildable, with one critical problem and a warning
                  value:
                    buildable: false
                    problems:
                      - pointer: /input/structures/0/edges/2
                        check: 2
                        severity: error
                        detail: edge `ridge` joins point `g`, which does not exist
                      - pointer: /input/structures/0/edges/7
                        check: 3
                        severity: minor
                        detail: >-
                          Edge `stray` (unclassified) lies on no face. It is
                          left out of the roof.
        '400':
          $ref: '#/components/responses/MalformedRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - apiKey:
            - esx-exports:create
components:
  schemas:
    EsxExportCreate:
      type: object
      description: >
        A roof to build into an ESX, with the property it belongs to. The check
        call takes the

        same body.
      additionalProperties: false
      required:
        - reference
        - input
        - property
      properties:
        reference:
          type: string
          minLength: 1
          maxLength: 100
          pattern: ^\S(.*\S)?$
          description: >
            Your own id for the order. One export per reference, in the key's
            environment (test

            or live): a second export with a reference you have already used is
            refused with

            `409 duplicate_export`; send a corrected roof as a new version of
            the existing

            export instead. Returned on the export, never changed. No leading or
            trailing

            whitespace.
          examples:
            - ORDER-1042
        input:
          $ref: '#/components/schemas/RoofInput'
        property:
          $ref: '#/components/schemas/EsxExportProperty'
        claim_number:
          type: string
          minLength: 1
          maxLength: 100
          pattern: ^\S(.*\S)?$
          description: >
            The carrier's claim number, when there is one. Returned on the
            export. No leading or

            trailing whitespace.
          examples:
            - FL-2026-0091832
        end_user:
          $ref: '#/components/schemas/EsxExportEndUser'
        metadata:
          $ref: '#/components/schemas/EsxExportMetadata'
    EsxExportCheck:
      type: object
      description: >
        The result of checking a roof. No export is recorded and the roof is not
        kept, and

        nothing is charged.
      required:
        - buildable
        - problems
      properties:
        buildable:
          type: boolean
          description: '`false` when any problem is an `error`: the roof would be refused.'
        problems:
          type: array
          description: >
            Every problem the checks found, critical or not, each with its
            severity. A critical problem can stop the later checks on that
            structure, so check again after correcting it.
          items:
            $ref: '#/components/schemas/EsxExportProblem'
    RoofInput:
      type: object
      description: >
        A roof, in OSA's roof format version 1 (`osa-roof/1`): one or more roofs
        as seen from above,

        with enough to build each in three dimensions. You are responsible for
        the roof being

        right. OSA checks it: a roof that cannot be built is refused with exact
        reasons, and any

        other problem is a warning, with the roof built anyway. Lengths and
        areas are not sent: OSA

        works them out from the points and the faces' pitches. Ids everywhere
        are 1 to 64 letters,

        digits, `-`, `_` or `.`, unique within their list; problems name them.
      additionalProperties: false
      required:
        - type
        - format
        - plan
        - structures
      properties:
        type:
          type: string
          description: What the input describes. Always `roof`.
          enum:
            - roof
        format:
          type: string
          description: The format and version of the input. Always `osa-roof/1`.
          enum:
            - osa-roof/1
        plan:
          $ref: '#/components/schemas/RoofPlan'
        structures:
          type: array
          description: >
            The separate buildings, such as a house and a detached garage. Each
            is a roof that

            touches no other structure's roof. Most roofs have one. At most 10.
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/RoofStructure'
      examples:
        - type: roof
          format: osa-roof/1
          plan:
            units: ft
            y_axis: up
            north_deg: 0
          structures:
            - id: house
              points:
                - id: a
                  x: -20
                  'y': -15
                - id: b
                  x: 20
                  'y': -15
                - id: c
                  x: 20
                  'y': 15
                - id: d
                  x: -20
                  'y': 15
                - id: e
                  x: -20
                  'y': 0
                - id: f
                  x: 20
                  'y': 0
              edges:
                - id: eave-s
                  from: a
                  to: b
                  type: eave
                - id: eave-n
                  from: c
                  to: d
                  type: eave
                - id: ridge
                  from: e
                  to: f
                  type: ridge
                - id: rake-sw
                  from: a
                  to: e
                  type: rake
                - id: rake-se
                  from: b
                  to: f
                  type: rake
                - id: rake-ne
                  from: c
                  to: f
                  type: rake
                - id: rake-nw
                  from: d
                  to: e
                  type: rake
              faces:
                - id: south
                  edges:
                    - eave-s
                    - rake-se
                    - ridge
                    - rake-sw
                  pitch: 6
                  eave_height_ft: 9
                - id: north
                  edges:
                    - eave-n
                    - rake-nw
                    - ridge
                    - rake-ne
                  pitch: 6
                  eave_height_ft: 9
    EsxExportProperty:
      type: object
      description: The property the roof is on.
      additionalProperties: false
      required:
        - street
        - city
        - state
        - zip
        - lat
        - lon
      properties:
        street:
          type: string
          minLength: 1
          maxLength: 100
          description: Street address, including any unit number.
          examples:
            - 740 Canyon View Drive
        city:
          type: string
          minLength: 1
          maxLength: 60
          description: City.
          examples:
            - Lehi
        state:
          $ref: '#/components/schemas/State'
        zip:
          $ref: '#/components/schemas/Zip'
        lat:
          type: number
          minimum: -90
          maximum: 90
          description: Latitude of the property, in degrees.
          examples:
            - 40.4358
        lon:
          type: number
          minimum: -180
          maximum: 180
          description: Longitude of the property, in degrees.
          examples:
            - -111.8683
    EsxExportEndUser:
      type: object
      description: >
        Who in your system asked for the export, for your own records. Send at
        least one of

        `id` and `email`. Returned on the export as sent.
      additionalProperties: false
      minProperties: 1
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 100
          description: Your own id for the user.
        email:
          $ref: '#/components/schemas/Email'
    EsxExportMetadata:
      type: object
      description: >
        Your own key-value pairs, returned on the export as sent. Up to 20 keys,
        each 1 to 40

        characters of `a` to `z`, `0` to `9` and `_`; each value text of up to
        200 characters.
      maxProperties: 20
      propertyNames:
        pattern: ^[a-z0-9_]{1,40}$
      additionalProperties:
        type: string
        maxLength: 200
      examples:
        - branch: north
          job_type: reroof
    EsxExportProblem:
      type: object
      description: >
        One problem with a roof: where it is, which check found it, how serious
        it is and what

        it means. The same shape in the check call's answer and an export's
        `warnings`.
      required:
        - pointer
        - check
        - severity
        - detail
      properties:
        pointer:
          type: string
          description: >-
            JSON Pointer to the place in the request, for example
            `/input/structures/0/faces/8`.
        check:
          type: integer
          minimum: 1
          description: >
            The number of the check that found the problem: 1, the request
            matches the roof

            format; 2, edges and faces refer to things that exist and faces
            close; 3, how edges

            sit on faces; 4, eaves and slope direction; 5, heights where faces
            meet; 6, heights

            given for every section; 7, the property's ZIP and location. More
            checks may be

            added.
        severity:
          type: string
          description: >
            `error`: critical, the roof cannot be built and is refused. `major`
            and `minor`:

            warnings; the roof is built and `detail` says what OSA did. Open
            list: new values

            may be added; treat an unknown value as `major`.
          enum:
            - error
            - major
            - minor
        detail:
          type: string
          description: >-
            What is wrong, naming your own ids, and for a warning what OSA did
            about it.
    Problem:
      type: object
      description: >
        An RFC 9457 problem details object. Match on `code`, which is stable;
        `title` and

        `detail` are for people and may change. Quote `request_id` when
        contacting support.
      required:
        - type
        - title
        - status
        - detail
        - code
        - request_id
      properties:
        type:
          type: string
          format: uri
          description: A link to this error's documentation.
        title:
          type: string
          description: A short summary of the error.
        status:
          type: integer
          description: The HTTP status code.
        detail:
          type: string
          description: What went wrong in this request.
        code:
          type: string
          description: >
            The stable error code. `malformed_request` (400); `invalid_key`
            (401);

            `insufficient_scope`, `not_in_plan` (403); `not_found` (404);
            `duplicate_claim`,

            `claim_already_accepted`, `already_member`, `invitation_pending`,
            `duplicate_export`,

            `export_not_ready` (409); `payload_too_large` (413);
            `validation_failed`,

            `idempotency_key_reused`, `unknown_osaid`, `adjuster_not_a_member`,

            `adjuster_not_accepting`, `environment_mismatch` (422);
            `rate_limited` (429);

            `internal_error` (500); `export_provider_unavailable` (503). Open
            list:

            new values may be added; treat an unknown value as an error you
            don't specifically

            handle, by its HTTP `status`.
          enum:
            - malformed_request
            - invalid_key
            - insufficient_scope
            - not_in_plan
            - not_found
            - duplicate_claim
            - claim_already_accepted
            - already_member
            - invitation_pending
            - duplicate_export
            - export_not_ready
            - payload_too_large
            - validation_failed
            - idempotency_key_reused
            - unknown_osaid
            - adjuster_not_a_member
            - adjuster_not_accepting
            - environment_mismatch
            - rate_limited
            - internal_error
            - export_provider_unavailable
        request_id:
          type: string
          description: The id of this request. Quote it when contacting support.
        errors:
          type: array
          description: For `validation_failed`, each invalid field, parameter or header.
          items:
            type: object
            description: >-
              One problem. Exactly one of `pointer`, `parameter` or `header`
              says where.
            required:
              - detail
            properties:
              pointer:
                type: string
                description: >-
                  JSON Pointer to a body field, for example `/loss/date`. Empty
                  for the whole body.
              parameter:
                type: string
                description: The name of a query or path parameter, for example `limit`.
              header:
                type: string
                description: The name of a request header, for example `Idempotency-Key`.
              detail:
                type: string
                description: What is wrong with it.
              check:
                type: integer
                description: For a roof problem, the number of the check.
              severity:
                type: string
                description: >
                  For a roof problem, how serious it is; a request is refused
                  only when at least

                  one is `error`. Open list: new values may be added; treat an
                  unknown value as

                  `major`.
                enum:
                  - error
                  - major
                  - minor
        existing_claim_id:
          type: string
          format: uuid
          description: >-
            For `duplicate_claim`, the id of the claim that already exists.
            Always a claim your key can read.
        existing_claim_url:
          type: string
          format: uri
          description: >-
            For `duplicate_claim`, the API link to the claim that already
            exists. Always a claim your key can read.
        existing_export_id:
          type: string
          format: uuid
          description: >-
            For `duplicate_export`, the id of the export that already exists.
            Always an export your key can read.
        existing_export_url:
          type: string
          format: uri
          description: >-
            For `duplicate_export`, the API link to the export that already
            exists. Always an export your key can read.
    RoofPlan:
      type: object
      description: >
        How to read every `x` and `y` in the roof. Heights are always in feet,
        whatever the plan

        units; fields that carry a height end in `_ft`. The origin can be
        anywhere: OSA moves it

        to the middle of each structure.
      additionalProperties: false
      required:
        - units
        - y_axis
      properties:
        units:
          type: string
          description: >
            `ft`: `x` and `y` are feet. `px`: `x` and `y` are pixels of an
            image, and

            `feet_per_pixel` is required.
          enum:
            - ft
            - px
        feet_per_pixel:
          type: number
          description: >
            Horizontal (plan) feet per pixel, one scale for the whole plan.
            Required when `units`

            is `px`, and not allowed otherwise; a roof that breaks this has a
            critical problem of

            check 1 and is refused. More than 0, at most 10.
          exclusiveMinimum: 0
          maximum: 10
        y_axis:
          type: string
          description: >
            `up`: `y` grows upward on the drawing, as on a map. `down`: `y`
            grows downward, as

            in an image.
          enum:
            - up
            - down
        north_deg:
          type: number
          description: >
            The compass direction the top of the drawing faces, in degrees
            clockwise from north:

            at least 0, less than 360. Leave it out for 0, which means the top
            of the drawing is

            north, as in most aerial imagery.
          minimum: 0
          exclusiveMaximum: 360
    RoofStructure:
      type: object
      description: >
        One building's roof: its corners (`points`), the lines between them
        (`edges`) and its

        flat surfaces (`faces`). Give heights one way per structure: none at all
        (the roof is

        built with its lowest eave at 0 ft, so Xactimate gets a correctly shaped
        roof but no

        height above the ground), `eave_height_ft` on faces (recommended: at
        least one face of

        each section of roof, where a section is a group of faces that share
        points), or `z_ft`

        on every point.
      additionalProperties: false
      required:
        - id
        - points
        - edges
        - faces
      properties:
        id:
          type: string
          description: Your name for the structure, unique in the roof.
          pattern: ^[A-Za-z0-9._-]{1,64}$
          examples:
            - house
        name:
          type: string
          description: A label, such as "Detached garage".
          minLength: 1
          maxLength: 100
          examples:
            - Detached garage
        points:
          type: array
          description: >-
            Every corner of the roof as seen from above. At least 3, at most
            1,000.
          minItems: 3
          maxItems: 1000
          items:
            $ref: '#/components/schemas/RoofPoint'
        edges:
          type: array
          description: >-
            Every line between two points that bounds a face. At least 3, at
            most 2,000.
          minItems: 3
          maxItems: 2000
          items:
            $ref: '#/components/schemas/RoofEdge'
        faces:
          type: array
          description: Every flat surface of the roof. At least 1, at most 300.
          minItems: 1
          maxItems: 300
          items:
            $ref: '#/components/schemas/RoofFace'
        features:
          $ref: '#/components/schemas/RoofFeatures'
    State:
      type: string
      description: >
        Two-letter USPS code: the 50 states, `DC`, and the US territories `AS`
        (American Samoa),

        `GU` (Guam), `MP` (Northern Mariana Islands), `PR` (Puerto Rico) and
        `VI` (US Virgin

        Islands).
      enum:
        - AL
        - AK
        - AZ
        - AR
        - CA
        - CO
        - CT
        - DE
        - DC
        - FL
        - GA
        - HI
        - ID
        - IL
        - IN
        - IA
        - KS
        - KY
        - LA
        - ME
        - MD
        - MA
        - MI
        - MN
        - MS
        - MO
        - MT
        - NE
        - NV
        - NH
        - NJ
        - NM
        - NY
        - NC
        - ND
        - OH
        - OK
        - OR
        - PA
        - RI
        - SC
        - SD
        - TN
        - TX
        - UT
        - VT
        - VA
        - WA
        - WV
        - WI
        - WY
        - AS
        - GU
        - MP
        - PR
        - VI
      examples:
        - FL
    Zip:
      type: string
      description: Five-digit ZIP code, optionally ZIP+4.
      pattern: ^\d{5}(-\d{4})?$
      examples:
        - '33606'
        - 33606-1234
    Email:
      type: string
      format: email
      maxLength: 255
      description: An email address.
      examples:
        - maria.delgado@example.com
    RoofPoint:
      type: object
      description: >
        A corner of the roof as seen from above. A point is one place in three
        dimensions: where

        two parts of a roof pass over the same spot at different heights, such
        as a porch roof

        meeting the wall below a higher eave, that spot needs two points, one
        for each roof.
      additionalProperties: false
      required:
        - id
        - x
        - 'y'
      properties:
        id:
          type: string
          description: The point's id, unique in the structure.
          pattern: ^[A-Za-z0-9._-]{1,64}$
          examples:
            - a
        x:
          type: number
          description: Position across the drawing, in plan units.
        'y':
          type: number
          description: >-
            Position along the drawing, in plan units, in the direction `y_axis`
            gives.
        z_ft:
          type: number
          description: >
            Height above the ground, in feet, from -50 to 300. Either every
            point in the

            structure has one or none does; a structure with some has a critical
            problem of

            check 1 and is refused. With a height on every point, each point is
            built as you gave

            it; a face that is then not flat or does not match its pitch is a
            check 5 warning.

            Nothing is averaged in that case.
          minimum: -50
          maximum: 300
    RoofEdge:
      type: object
      description: >
        A line between two points that bounds a face. Lengths are not sent: OSA
        works out each

        edge's true length from the points and the faces' pitches.
      additionalProperties: false
      required:
        - id
        - from
        - to
        - type
      properties:
        id:
          type: string
          description: The edge's id, unique in the structure.
          pattern: ^[A-Za-z0-9._-]{1,64}$
          examples:
            - eave-s
        from:
          type: string
          description: The id of one of the edge's two points. Order does not matter.
          pattern: ^[A-Za-z0-9._-]{1,64}$
          examples:
            - a
        to:
          type: string
          description: The id of the edge's other point, different from `from`.
          pattern: ^[A-Za-z0-9._-]{1,64}$
          examples:
            - b
        type:
          type: string
          description: >
            What the edge is. `eave`: the low, level edge of a face, where water
            runs off.

            `rake`: the sloped outer edge at a gable end. `ridge`: where two
            faces meet at the

            top. `hip`: where two faces meet at an outward corner, sloping down.
            `valley`: where

            two faces meet at an inward corner, sloping down. `apron_flashing`:
            where the top of

            a face meets a wall that rises above it (also called headwall).
            `step_flashing`:

            where the side of a face runs along a wall that rises beside it
            (also called

            sidewall). `pitch_break`: where a face changes pitch without a
            ridge, as on a

            gambrel or mansard roof. `unclassified`: an edge whose kind is not
            known; allowed,

            but it adds nothing to the estimate.
          enum:
            - eave
            - rake
            - ridge
            - hip
            - valley
            - apron_flashing
            - step_flashing
            - pitch_break
            - unclassified
          examples:
            - eave
        overhang_ft:
          type: number
          description: >
            How far the roof overhangs the wall, in feet, from 0 to 10. Only on
            an `eave` or a

            `rake`; on any other edge it is a critical problem of check 1, and
            the roof is

            refused.
          minimum: 0
          maximum: 10
    RoofFace:
      type: object
      description: >
        A flat surface of the roof. Every point of a face should lie on one
        plane: the plane its

        pitch, slope direction and height give it. A face slopes down toward its
        `eave` edges,

        at right angles to them; all of a face's eaves should be parallel and on
        the same side

        of it. A face with eaves on opposite sides is built sloping toward its
        longest group of

        eaves, with a warning. Areas are not sent: OSA works out each face's
        true area.
      additionalProperties: false
      required:
        - id
        - edges
        - pitch
      properties:
        id:
          type: string
          description: The face's id, unique in the structure.
          pattern: ^[A-Za-z0-9._-]{1,64}$
          examples:
            - south
        edges:
          type: array
          description: >
            The ids of the edges around the face, in order around it, at least 3
            and at most

            200. Each consecutive pair shares a point and the last joins the
            first.
          minItems: 3
          maxItems: 200
          items:
            type: string
            description: An edge id in the structure.
            pattern: ^[A-Za-z0-9._-]{1,64}$
        pitch:
          type: number
          description: >
            Rise in inches per 12 inches of run, as a number: `6` for 6/12,
            `6.5` for 6.5/12,

            `0` for flat. At most 24.
          minimum: 0
          maximum: 24
          examples:
            - 6
        eave_height_ft:
          type: number
          description: >
            Height above the ground of the face's eave edges, in feet, from -50
            to 300. Faces

            that share a ridge, hip or valley take their heights from each
            other, so one face per

            section of roof is enough. Where two faces both carry one, they
            should agree with

            the geometry; where faces disagree on a shared point's height by
            more than 1 inch,

            the point is built at their average, with a warning.
          minimum: -50
          maximum: 300
          examples:
            - 9
        low_edge:
          type: string
          description: >
            The id of the edge the face slopes down toward. Should be sent when
            the face has no

            `eave` edge and a pitch above 0, such as the upper face of a gambrel
            above its

            `pitch_break`. Without it the face is built from the faces around
            it, with a major

            warning.
          pattern: ^[A-Za-z0-9._-]{1,64}$
    RoofFeatures:
      type: object
      description: >
        Counts of things on the structure's roof that the estimate needs and the
        drawing does not

        show. Each is a whole number from 1 to 100,000; leave out what is not
        there, and leave

        out `features` if nothing is. They apply to the structure's whole roof;
        they cannot be

        placed on one face.
      additionalProperties: false
      minProperties: 1
      properties:
        pipe_jack_vents:
          type: integer
          description: Plumbing vent pipes.
          minimum: 1
          maximum: 100000
        exhaust_vents:
          type: integer
          description: Exhaust vents.
          minimum: 1
          maximum: 100000
        attic_vents:
          type: integer
          description: Attic vents.
          minimum: 1
          maximum: 100000
        reflective_tubes:
          type: integer
          description: Tubular skylights.
          minimum: 1
          maximum: 100000
        satellite_dishes:
          type: integer
          description: Satellite dishes.
          minimum: 1
          maximum: 100000
        ac_units:
          type: integer
          description: Air conditioning units on the roof.
          minimum: 1
          maximum: 100000
        skylights:
          type: integer
          description: Skylights.
          minimum: 1
          maximum: 100000
        roofing_panels:
          type: integer
          description: Roofing panels.
          minimum: 1
          maximum: 100000
        gutter_ft:
          type: integer
          description: Gutter, in whole feet.
          minimum: 1
          maximum: 100000
  headers:
    RequestId:
      description: >
        The id of this request. Quote it to OSA support. On error responses it
        equals

        `request_id` in the body.
      required: true
      schema:
        type: string
      examples:
        request_id:
          summary: A request id
          value: 7f3e9a1c2b4d6e8f0a1b3c5d7e9f1a2b
    RetryAfter:
      description: Seconds to wait before retrying.
      required: true
      schema:
        type: integer
        minimum: 1
      examples:
        seconds:
          summary: Retry in 12 seconds
          value: 12
  responses:
    MalformedRequest:
      description: The body isn't valid JSON or can't be read (`malformed_request`).
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          examples:
            malformed_request:
              summary: malformed_request
              value:
                type: https://docs.osaconnection.com/errors#malformed_request
                title: Malformed request
                status: 400
                detail: The request body isn't valid JSON.
                code: malformed_request
                request_id: 0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d
    Unauthorized:
      description: >
        The key is missing, malformed, unknown, revoked or expired
        (`invalid_key`).
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          examples:
            invalid_key:
              summary: invalid_key
              value:
                type: https://docs.osaconnection.com/errors#invalid_key
                title: Invalid API key
                status: 401
                detail: The API key is missing, malformed, revoked or expired.
                code: invalid_key
                request_id: 7f3e9a1c2b4d6e8f0a1b3c5d7e9f1a2b
    Forbidden:
      description: >
        The key is valid but can't do this. `not_in_plan`: the operation is not
        included in your

        organisation's plan and add-ons, whatever the key's own permissions.
        `insufficient_scope`:

        your plan and add-ons include the operation, but the key doesn't have
        the permission it

        needs.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          examples:
            insufficient_scope:
              summary: insufficient_scope
              value:
                type: https://docs.osaconnection.com/errors#insufficient_scope
                title: Insufficient scope
                status: 403
                detail: This key doesn't have the claims:write permission.
                code: insufficient_scope
                request_id: 0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e
            not_in_plan:
              summary: not_in_plan
              value:
                type: https://docs.osaconnection.com/errors#not_in_plan
                title: Not in plan
                status: 403
                detail: >-
                  Member invitations are not included in your organisation's
                  plan and add-ons.
                code: not_in_plan
                request_id: 1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f
    PayloadTooLarge:
      description: The body is larger than 1 MB (`payload_too_large`).
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          examples:
            payload_too_large:
              summary: payload_too_large
              value:
                type: https://docs.osaconnection.com/errors#payload_too_large
                title: Payload too large
                status: 413
                detail: Request bodies are limited to 1 MB.
                code: payload_too_large
                request_id: 1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e
    ValidationFailed:
      description: >
        The request is invalid (`validation_failed`): a missing, unknown or
        invalid body field,

        query parameter, path parameter or header. `errors` lists each problem:
        `pointer` for a

        body field, `parameter` for a query or path parameter, `header` for a
        header.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          examples:
            validation_failed:
              summary: validation_failed
              value:
                type: https://docs.osaconnection.com/errors#validation_failed
                title: Validation failed
                status: 422
                detail: The request has 1 invalid field.
                code: validation_failed
                request_id: 8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a
                errors:
                  - parameter: limit
                    detail: must be <= 200
    RateLimited:
      description: >
        Too many requests for this key (`rate_limited`). Wait for the number of
        seconds in

        `Retry-After`, then retry.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          examples:
            rate_limited:
              summary: rate_limited
              value:
                type: https://docs.osaconnection.com/errors#rate_limited
                title: Rate limited
                status: 429
                detail: This key has exceeded 300 requests per minute.
                code: rate_limited
                request_id: 9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f
    InternalError:
      description: >
        Something failed on OSA's side (`internal_error`). Retry with
        exponential backoff; for

        `POST` requests, reuse the same `Idempotency-Key`. If it persists,
        contact OSA with the

        `request_id`.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          examples:
            internal_error:
              summary: internal_error
              value:
                type: https://docs.osaconnection.com/errors#internal_error
                title: Internal error
                status: 500
                detail: Something went wrong on our side. Retry later.
                code: internal_error
                request_id: 2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: osa_live_… or osa_test_…
      description: >
        Send your API key as a bearer token: `Authorization: Bearer osa_live_…`.

        Keys are opaque; each belongs to exactly one partner. Keys starting with
        `osa_test_`

        reach only test claims and test accounts. The scopes listed on each
        operation are the

        permissions the key needs. A key's permissions are set when it is issued
        and can be

        changed by OSA on request, never beyond what your plan and add-ons
        include.

        `GET /v1/me` always shows the current set.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.