---
title: "Add commission referral"
method: POST
path: "/api/files/sales/{saleGuid}/commissionReferral"
tags: ["Sale Commission Referral"]
---

# Add commission referral

`POST /api/files/sales/{saleGuid}/commissionReferral`

Adds commission-referral details to the specified sale. Returns 422 if referral type is unknown, required referral type is missing, percent and amount are both set, values are out of range (percent 0-100; amount >= 0), brokerName exceeds 50 characters, or contact fields are invalid (first/last name required when contact is provided, email format/length, phone must be 10 digits).

### Validation & Requirements
#### Required Parameters
- `saleGuid` (path, string, format=guid)
- `form` (body, object)

#### Required JSON Body Fields
- None

#### Validations
- Invalid GUID values in `*Guid`/`*Guids` fields return `422 Unprocessable Entity`.
- Invalid date values in `*date*` fields return `422 Unprocessable Entity`.
- Missing required request body returns `422 Unprocessable Entity` with `Missing request body.`.
- Additional business-rule validation may return `422` with details in the `errors` array.
- Commission referral values must satisfy domain commission rules; invalid percentages/amounts return 422.

#### Integration Requirement
- Retrieve the corresponding `...Form` endpoint immediately before write operations to get current dynamic required fields and allowed values.

## Path parameters

- `saleGuid` string, guid, required

## Request body

- AddCommissionReferralToSaleForm
  - `contact` CommissionReferralContactForm2
    - `firstName` string, nullable
    - `lastName` string, nullable
    - `email` string, nullable
    - `phoneNumber` string, nullable
  - `typeId` integer, nullable
  - `brokerName` string, nullable
  - `amount` number, nullable
  - `percent` number, nullable

## Response `200`

- LinkedResponseOfAddCommissionReferralToSale
  - `value` AddCommissionReferralToSale
    - `subscriberGuid` string, guid
    - `userGuid` string, guid
    - `saleGuid` string, guid
    - `form` AddCommissionReferralToSaleForm
      - `contact` CommissionReferralContactForm2
        - `firstName` string, nullable
        - `lastName` string, nullable
        - `email` string, nullable
        - `phoneNumber` string, nullable
      - `typeId` integer, nullable
      - `brokerName` string, nullable
      - `amount` number, nullable
      - `percent` number, nullable
  - `warnings` string[], nullable
  - `links` Link[], nullable
    - `href` string, nullable
    - `rel` string, nullable
    - `method` string, nullable

## Other responses

- `404`
- `422`

---

[API](https://skmtc.net/skyslope/apis/skyslope-api.md) · [All operations](https://skmtc.net/skyslope/apis/skyslope-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/skyslope/skyslope-api/revisions/bad0d2db9b7a/schema)
