---
title: "Create a revenue item for a lead"
method: POST
path: "/leads/{lead_identifier}/revenue_items"
tags: ["Leads"]
---

# Create a revenue item for a lead

`POST /leads/{lead_identifier}/revenue_items`

## Request

- Base URL: `https://api.lassotech.com/api/v1/rest`
- URL: `https://api.lassotech.com/api/v1/rest/leads/{lead_identifier}/revenue_items`
- Auth: API key in header `x-lasso-access-token`

Record revenue against a referral. Supports upsert via `external_identifier`: sending the same
value again for the same referral updates that revenue item instead of adding another, and also
returns `201`. Unpaid commission invoices on the referral are recalculated straight away.

Look up the referral by slug (default), id, email, company_name, or external ID using the
`?by=` query param. Requires `payment_write` permission.

## Path parameters

- `lead_identifier` string, required

## Query parameters

- `by` 'slug' | 'id' | 'email' | 'company_name' | 'external'
- `external_system_type` string
- `external_object_type` string

## Request body

- object
  - `amount` number, float, required: Revenue amount, as a plain decimal number or string (`1000`, `"1000.50"`, `-250`). Negative amounts are accepted for refunds and credit memos, and reduce the revenue share earned in the period they are recorded in. Missing is a `422` with `REQUIRED`; anything else that is not a plain decimal (`"1,000"`, `"1e3"`) is a `422` with `INVALID`.
  - `currency` string: ISO currency code. Defaults to the account currency for a new item; an updated item keeps its currency unless you send one.
  - `description` string, nullable: Optional description. On an update, omitting it keeps the existing description and null clears it.
  - `external_identifier` string, nullable: Your identifier for this revenue record (e.g. the billing system's invoice or credit memo id). Re-sending the same value for the same referral updates the existing revenue item instead of creating a duplicate, so the call is safe to retry.
  - `external_sub_identifier` string, nullable: A secondary reference stored with the item, such as a line ID. Not used for matching.
  - `recorded_at` string, date, nullable: The date the revenue belongs to, as an ISO 8601 date (defaults to now). An invalid date is a `422` with `INVALID`.

## Response `201`

Revenue item created, or updated when `external_identifier` matched an existing one

- object
  - `revenue_item` RevenueItem
    - `id` integer
    - `amount` number, float
    - `currency` string
    - `description` string, nullable
    - `recorded_at` string, date-time, nullable
    - `external_identifier` string, nullable
    - `external_sub_identifier` string, nullable
    - `lead_slug` string
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `401`: Missing or invalid API key
- `403`: API key lacks required permission
- `404`: Resource not found
- `422`: Validation error
- `429`: Rate limit exceeded. Wait the number of seconds in `Retry-After`, then retry.

---

[API](https://skmtc.dev/onelasso/apis/lasso-rest-api.md) · [All operations](https://skmtc.dev/onelasso/apis/lasso-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/onelasso/apis/lasso-rest-api/revisions/bbc328f5e2d1?raw)
