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

# Record a decision

> Records the outcome of your review. An `offer` creates an Offer on the referral in your name, and the
borrower accepts it on O.J.'s screen, in the partner's product or on a hosted page. A `decline` records your
reasons for O.J.'s records; they are not shown to the partner or the borrower, who sees that you declined and
that you will send a notice. O.J. never makes this decision; it only records yours. Adverse-action notices are
yours to send.




## OpenAPI

````yaml /api-reference/openapi.yaml post /submissions/{submission_id}/decision
openapi: 3.1.0
info:
  title: O.J. Agent Development Kit (ADK)
  version: 0.5.1
  summary: >-
    Send O.J. a business. Get back named lender matches, what's needed, offers
    and funding status.
  description: >
    The O.J. ADK lets platforms with small-business customers offer financing
    without becoming a lender or a

    broker. You send a business as a **referral**. O.J. matches it to lender
    programs, collects documents,

    submits to lenders and tracks the deal to funding. You earn a share of the
    commission on every funded loan.


    Integrate with **O.J. Embed** (drop-in screens), the **REST API** with
    webhooks, or **MCP** for agents. All

    three read and write the same referral.


    Conventions: OAuth 2.0 client credentials, amounts in cents, prefixed ids,
    cursor pagination, an

    `Idempotency-Key` on every POST, RFC 9457 errors, and Standard Webhooks
    signatures.
  license:
    name: Proprietary — O.J. partner terms
    identifier: LicenseRef-OJ-Partner
  contact:
    name: O.J. Developer Support
    email: developers@meet-oj.com
servers:
  - url: https://sandbox.api.meet-oj.com/partner/v0
    description: Sandbox
  - url: https://api.meet-oj.com/partner/v0
    description: Production
security:
  - oauth2: []
tags:
  - name: Referrals
    description: >-
      A referral is one business you sent to O.J. Every other resource belongs
      to a referral.
  - name: Matches
    description: >-
      The lenders a business matches, named, with estimated limits. `POST
      /match_checks` screens raw numbers without creating a referral. A match is
      not a credit decision; the lender decides.
  - name: Documents
    description: >-
      Documents O.J. still needs, and uploads by API. Most integrations show the
      `next_action` button instead.
  - name: Offers
    description: >-
      Offers returned by lenders. Indicative terms computed before a lender
      replies are marked `binding: false`.
  - name: Sessions
    description: >-
      Create a session to open an O.J. screen: a `client_token` for Embed, or a
      hosted `url` to redirect to.
  - name: Events
    description: >-
      Every change to a referral is an event, delivered by webhook, streamed
      over SSE, and kept for 30 days at `GET /events`.
  - name: Payouts
    description: >-
      Your share of the commission on each funded referral. Match rows to your
      bank statement with `statement_descriptor`. Payout destinations are set
      during onboarding and cannot be changed by API.
  - name: Conversation
    description: >-
      The message thread between O.J., the borrower and your team on a referral,
      across every channel.
  - name: Channels
    description: >-
      Channel connectors let O.J. reach your borrowers through channels you own
      (in-app inbox, SMS, Apple Business Messages, email), in your brand.
  - name: Policy
    description: >-
      Account-level rules: send approval, allowed Embed origins, contact
      channels, default intent and reminder cadence.
  - name: Programs
    description: >-
      For lenders running a program on O.J.: receive submissions, record
      decisions and report funding.
  - name: Webhooks
    description: >-
      Register endpoints that receive signed events. Deliveries follow Standard
      Webhooks.
paths:
  /submissions/{submission_id}/decision:
    post:
      tags:
        - Programs
      summary: Record a decision
      description: >
        Records the outcome of your review. An `offer` creates an Offer on the
        referral in your name, and the

        borrower accepts it on O.J.'s screen, in the partner's product or on a
        hosted page. A `decline` records your

        reasons for O.J.'s records; they are not shown to the partner or the
        borrower, who sees that you declined and

        that you will send a notice. O.J. never makes this decision; it only
        records yours. Adverse-action notices are

        yours to send.
      operationId: recordDecision
      parameters:
        - name: submission_id
          in: path
          description: >-
            The submission id, from `GET /programs/{program_id}/submissions` or
            the `submission.awaiting_review` event.
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionCreate'
      responses:
        '200':
          description: The submission with the decision recorded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Submission'
        '400':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/Error'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      description: >
        IETF `Idempotency-Key` semantics
        (draft-ietf-httpapi-idempotency-key-header). Send a fresh unique value

        (a UUID) with every new request. A retry with the same key and the same
        payload returns the original

        response with the header `Idempotent-Replayed: true`. The same key with
        a different payload is rejected with

        422 and code `idempotency_key_reused`. Keys are kept for 24 hours.
      schema:
        type: string
        maxLength: 255
  schemas:
    DecisionCreate:
      type: object
      description: >-
        Your decision on a submission. For an `offer`, give the terms. O.J.
        creates the Offer and asks the borrower to accept it. For a `decline`,
        give your reasons, tied to your program's rules where they apply. They
        are kept for O.J.'s records and not shown to the partner or the
        borrower.
      required:
        - outcome
      properties:
        outcome:
          type: string
          enum:
            - offer
            - decline
        offer:
          type: object
          properties:
            items:
              type: array
              items:
                $ref: '#/components/schemas/OfferItem'
            conditions:
              type: array
              items:
                $ref: '#/components/schemas/DocumentType'
            expires_at:
              type: string
              format: date-time
        reasons:
          type: array
          items:
            type: object
            required:
              - reason
            properties:
              gate_key:
                type: string
                examples:
                  - min_dscr
              reason:
                type: string
                examples:
                  - >-
                    Historical DSCR 1.18 after our adjustment for the one-time
                    deposit in March
        decided_by:
          type: string
          description: The reviewer, for the audit record.
        note:
          type: string
          maxLength: 1000
    Submission:
      type: object
      description: >
        A referral that O.J. has submitted to your program, with the package
        your reviewer needs. `package` links

        to every document, the calculations and the evidence receipts, and names
        the rules version the file was

        checked against. `hosted_review_url` is a page where a reviewer can read
        the package and record the

        decision without any integration. `status` moves from `awaiting_review`
        to `offer` or `declined`, and then

        to `funded` when you report funding.
      required:
        - id
        - referral_id
        - program_id
        - status
        - submitted_at
      properties:
        id:
          type: string
          examples:
            - sub_01K5X9E5F6
        object:
          type: string
          const: submission
        referral_id:
          type: string
        program_id:
          type: string
        status:
          type: string
          enum:
            - awaiting_review
            - offer
            - declined
            - withdrawn
            - funded
        business:
          type: object
          properties:
            legal_name:
              type: string
            city:
              type: string
            state:
              type: string
        requested_amount:
          $ref: '#/components/schemas/Money'
        package:
          type: object
          properties:
            fit_id:
              type: string
              description: >-
                The rule-by-rule check the package was built from. It is in the
                package, for the program's reviewer only.
            playbook_version:
              type: integer
            documents:
              type: array
              items:
                type: object
                properties:
                  document_id:
                    type: string
                  type:
                    $ref: '#/components/schemas/DocumentType'
                  period:
                    type: string
                  url:
                    type: string
                    format: uri
            receipts_url:
              type: string
              format: uri
              description: Every metric with its evidence receipt, as one page.
            human_review:
              type: boolean
              description: >-
                True if O.J.'s reviewer resolved a conflict between sources. The
                receipt shows what was decided.
        hosted_review_url:
          type: string
          format: uri
          description: >-
            For your reviewer. A magic link that expires and is renewed on each
            read.
        decision:
          type: object
          properties:
            outcome:
              type: string
              enum:
                - offer
                - decline
            offer_id:
              type: string
            reasons:
              type: array
              items:
                type: object
                properties:
                  gate_key:
                    type: string
                  reason:
                    type: string
            decided_by:
              type: string
            decided_at:
              type: string
              format: date-time
        funded:
          type: object
          properties:
            amount:
              $ref: '#/components/schemas/Money'
            funded_at:
              type: string
              format: date-time
            lender_loan_id:
              type: string
        submitted_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    OfferItem:
      type: object
      description: >
        One set of terms inside an offer; most offers have one item, some
        lenders send two or three options. `rate`

        is read with `rate_type`: an `interest` rate is an annual percentage
        (11.5 means 11.5%), while a `factor` rate

        is a multiplier on the amount (1.28 means the business repays $1.28 for
        every $1.00 advanced), which is how

        revenue-based financing is priced. `total_payback` is the full amount
        the business will repay.
      required:
        - amount
        - rate
        - rate_type
        - term_months
        - payment_frequency
      properties:
        amount:
          $ref: '#/components/schemas/Money'
        rate:
          type: number
          description: Interest rate (e.g. 11.5) or factor (e.g. 1.28) per rate_type.
        rate_type:
          type: string
          enum:
            - interest
            - factor
        term_months:
          type: integer
        payment_frequency:
          type: string
          enum:
            - daily
            - weekly
            - monthly
        number_of_payments:
          type: integer
        payment_amount:
          $ref: '#/components/schemas/Money'
        total_payback:
          $ref: '#/components/schemas/Money'
        origination_fee:
          $ref: '#/components/schemas/Money'
        notes:
          type: string
    DocumentType:
      type: string
      description: >-
        The kinds of documents O.J. can request or accept. `cim` is a
        confidential information memorandum, the summary document a business
        broker prepares for a sale. `quality_of_earnings` is an accountant's
        review of reported earnings, required by the SBA for acquisitions of $3M
        or more. `funding_account_auth` is the funding account verified through
        Plaid; `voided_check` is the fallback when the bank can't be verified.
      enum:
        - bank_statement
        - processing_statement
        - voided_check
        - funding_account_auth
        - tax_return
        - profit_and_loss
        - balance_sheet
        - ar_aging
        - ap_aging
        - debt_schedule
        - business_license
        - government_id
        - lease
        - ownership_document
        - cim
        - purchase_agreement
        - quality_of_earnings
        - other
    Money:
      type: integer
      description: >-
        A dollar amount expressed in whole US cents, so $85,000.00 is `8500000`.
        Cents avoid rounding errors that decimals cause in some languages.
    Error:
      type: object
      description: >
        RFC 9457 Problem Details, returned as `application/problem+json` with
        any 4xx or 5xx status. `type` is a

        URI that identifies the kind of problem and doubles as a link to its
        documentation; `title` is the short

        human name for that kind; `status` repeats the HTTP status; `detail`
        explains this occurrence for a

        developer; `instance` is the request path. Three extension members:
        `code`, a stable snake_case reason to

        branch on; `param`, the offending field when the request was invalid;
        `request_id`, to quote to support.

        One code deserves a note: `awaiting_approval` (HTTP 409) is not a
        failure. It means the action you asked

        for needs a person at your company to confirm it first, and the referral
        shows `needs_partner` until they do.
      required:
        - type
        - title
        - status
        - code
        - request_id
      properties:
        type:
          type: string
          format: uri
          examples:
            - https://api.meet-oj.com/problems/duplicate-external-id
        title:
          type: string
          examples:
            - Referral already exists
        status:
          type: integer
          examples:
            - 409
        detail:
          type: string
          examples:
            - >-
              A referral with external_id cust_8842 was created on 2026-09-20 as
              ref_01K5X3K7Q2.
        instance:
          type: string
          examples:
            - /partner/v0/referrals
        code:
          type: string
          description: >-
            Stable machine-readable reason. Categories are the prefixes;
            specific codes follow.
          examples:
            - invalid_request
            - authentication_failed
            - permission_denied
            - not_found
            - duplicate_external_id
            - business_already_referred
            - missing_consent
            - required_documents_missing
            - idempotency_key_reused
            - rate_limited
            - awaiting_approval
            - internal_error
        param:
          type: string
          description: The field that caused an invalid_request, in dot notation.
        request_id:
          type: string
          examples:
            - req_01K5X4A9M2
  responses:
    Error:
      description: Problem Details (RFC 9457)
      headers:
        OJ-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
  headers:
    RequestId:
      description: >-
        Unique id for this request. Quote it to support; it is also in Problem
        Details as `request_id` and in O.J.'s traces.
      schema:
        type: string
        examples:
          - req_01K5X4A9M2
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        One client per partner per environment. Access tokens expire after 15
        minutes. Scopes are granted per client. Sandbox clients use
        https://sandbox.api.meet-oj.com/oauth/token.
      flows:
        clientCredentials:
          tokenUrl: https://api.meet-oj.com/oauth/token
          scopes:
            referrals:write: Create referrals and upload documents
            referrals:read: Read referrals, matches, document requests, offers, events
            match_checks:write: Run identity-free match checks
            sessions:write: Mint hosted-session links
            webhooks:manage: Register and list webhook endpoints
            payouts:read: >-
              Read payouts (your statement). There is no payouts:write;
              destinations are managed in hosted onboarding by a person.
            messages:read: Read a referral's conversation
            messages:write: >-
              Send messages into a referral's conversation on behalf of the
              partner or the borrower
            channels:manage: Register and remove channel connectors
            policy:manage: Read and change the partner policy
            submissions:read: >-
              For banks running a program. List and read submissions awaiting
              review
            submissions:write: For banks running a program. Record decisions and report funding

````