Ta strona nie została jeszcze przetłumaczona na Twój język. Wyświetlamy wersję angielski (Wielka Brytania).

Deals

List, read, create and update deals, move them through the pipeline stages, and close them as won or lost through the Fondaro API.

A deal is a sale or rental you are working on a lead. Reading needs crm:read; every change needs crm:write and an active plan.

  • A member reaches only the deals they are assigned to. A deal that is not theirs answers 404 with "Deal not found.", the same as one that does not exist. Creating a deal on a lead needs access to that lead.
  • An admin reaches every deal and may reassign owners.

Money fields (amount, commissionAmount, commissionPercent) come back as decimal strings. The pipeline stages are, in order, qualified (shown to people as Interested), viewing, offer, reserved and under_contract. A deal's status is open, won or lost. A deal's opening stage, stage moves and reopens made through the API are recorded in the deal's history with the source value api, shown in Fondaro as an API change. Marking a deal won or lost writes no history row. Owner changes made through the API are recorded with api too.

List deals

GET /v1/deals

With leadId, every deal on that lead. Without it, up to 1,000 of the key's person's most recently active deals. An admin passes assigneeIds to read colleagues' deals. There is no paging: hasMore is true only when the 1,000-row limit cut the results, so narrow with filters.

ParameterInTypeRequiredDescription
leadIdQueryintegerNoEvery deal on this lead. You need access to it
statusQuerystringNoopen, won or lost
stageQuerystringNoOne stage. Meaningful when status is open
stagesQuerystring[]NoAny of these stages. Ignored when leadId is set
qQuerystringNoUp to 200 characters, matched against the deal title and the lead's name or email
assigneeIdsQuerystring or string[]NoAdmins only: read these people's deals
propertyListingIdQueryUUIDNoDeals tied to this listing
amountMin, amountMaxQuerynumberNoCompared in each deal's own currency, with no conversion
expectedCloseFrom, expectedCloseToQuerystringNoISO date or date-time. A plain date includes that whole day (UTC)
createdFrom, createdToQuerystringNoISO date or date-time
closedFrom, closedToQuerystringNoISO date or date-time. Uses wonAt for won deals and lostAt for lost ones
collectionStateQuerystringNoinvoiced_not_collected or collected
bash
curl "https://api.fondaro.com/v1/deals?leadId=1042" \  -H "Authorization: Bearer $FONDARO_API_KEY"
json
{  "data": [    {      "id": "3f6c2a10-0000-4000-8000-000000000010",      "leadId": 1042,      "assigneeIds": ["user_2abcDEF1234567890ghiJKL"],      "title": "Villa in Marbella",      "status": "open",      "stage": "qualified",      "amount": null,      "currency": "EUR",      "propertyListingId": null,      "expectedCloseAt": null,      "wonAt": null,      "lostAt": null,      "stageChangedAt": "2026-10-04T12:02:16.228Z",      "createdAt": "2026-10-04T12:02:16.730Z",      "updatedAt": "2026-10-04T12:02:16.730Z",      "participants": []    }  ],  "hasMore": false}

Get a deal

GET /v1/deals/{dealId}

One deal with its commission participants.

ParameterInTypeRequiredDescription
dealIdPathUUIDYesThe id of the deal
bash
curl https://api.fondaro.com/v1/deals/3f6c2a10-0000-4000-8000-000000000010 \  -H "Authorization: Bearer $FONDARO_API_KEY"

The response is the deal, in the shape shown above. Errors: 404 "Deal not found."

Create a deal

POST /v1/deals

Creates a deal on a lead. The stage defaults to the first stage, qualified. Accepts an Idempotency-Key header.

ParameterInTypeRequiredDescription
leadIdBodyintegerYesThe lead. A member must have access to it
titleBodystringYesThe deal title
amountBodynumberNo0 or more
stageBodystringNoOne of the five stages
expectedCloseAtBodystringNoYYYY-MM-DD or an ISO 8601 timestamp
propertyListingIdBodyUUIDNoA listing the deal is about
assigneeIdsBodystring or string[]NoOwners other than the key's person
teamIdsBodyUUID or UUID[]NoTeams to assign
commissionModeBodystringNoexact or percentage
commissionAmountBodynumberNo0 or more
commissionPercentBodynumberNo0 to 100
participantsBodyobject[]NoThe parties who share the commission, as described under "Commission participants" below
bash
curl -X POST https://api.fondaro.com/v1/deals \  -H "Authorization: Bearer $FONDARO_API_KEY" \  -H "Content-Type: application/json" \  -d '{ "leadId": 1042, "title": "Villa in Marbella" }'

The 201 response is the deal. Errors: 404 "Lead not found." for a lead you cannot reach.

Update a deal

PATCH /v1/deals/{dealId}

Changes the title, amount, listing link, expected close date, commission, invoice and collection fields, or the owner (admin only). It does not change the stage or status: use the stage, won, lost and reopen routes.

ParameterInTypeRequiredDescription
dealIdPathUUIDYesThe id of the deal
titleBodystringNoNew title
amountBodynumberNo0 or more
propertyListingIdBodyUUIDNoThe listing the deal is about
expectedCloseAtBodystringNoYYYY-MM-DD or an ISO 8601 timestamp
commissionModeBodystringNoexact or percentage
commissionAmountBodynumberNo0 or more
commissionPercentBodynumberNo0 to 100
invoiceNumberBodystringNoUp to 255 characters
estimatedCollectionAt, collectedAtBodystringNoYYYY-MM-DD or an ISO 8601 timestamp
participantsBodyobject[]NoReplaces the deal's whole set of parties, as described under "Commission participants" below. [] removes them all; leave it out to keep them
assigneeIds, teamIdsBodystring or string[]NoAdmins only
bash
curl -X PATCH https://api.fondaro.com/v1/deals/3f6c2a10-0000-4000-8000-000000000010 \  -H "Authorization: Bearer $FONDARO_API_KEY" \  -H "Content-Type: application/json" \  -d '{ "title": "Villa in Marbella, edited" }'

The response is the deal with the new values.

Commission participants

participants is a list of up to 50 parties. Each has a participantType and a role (buyer, seller, collaborator, internal_agent, lawyer or other):

FieldTypeDescription
participantTypestringcontact for a lead (send leadId) or agent for a teammate (send userId, a Clerk user id)
leadId, userIdinteger, stringWho the party is: a contact has a leadId and no userId, an agent the reverse
rolestringWhat the party is on this deal
sidestring or nullbuyer or seller. Left out, it keeps what the same party has now; null clears it
commissionMode, commissionPercent, commissionAmountstring, numberThe party's share. A percent is 100 or less
commissionPaidAt, agentInvoiceRef, notesstring or nullWhen the share was paid, the teammate's invoice reference, a note

A lead or teammate who is not in your agency is refused with a 400 that names them, and the deal is left as it was. A teammate named as a party also gets access to the deal.

Change a deal stage

PUT /v1/deals/{dealId}/stage

Moves a deal to another stage. If the deal is won or lost, this reopens it into the new stage.

ParameterInTypeRequiredDescription
dealIdPathUUIDYesThe id of the deal
stageBodystringYesqualified, viewing, offer, reserved or under_contract
bash
curl -X PUT https://api.fondaro.com/v1/deals/3f6c2a10-0000-4000-8000-000000000010/stage \  -H "Authorization: Bearer $FONDARO_API_KEY" \  -H "Content-Type: application/json" \  -d '{ "stage": "viewing" }'

The response is the deal with "stage": "viewing" and a new stageChangedAt.

Close a deal as won

POST /v1/deals/{dealId}/won

Marks the deal won and records wonAt. Any lost fields are cleared.

ParameterInTypeRequiredDescription
dealIdPathUUIDYesThe id of the deal
wonAtBodystringNoYYYY-MM-DD or an ISO 8601 timestamp. Now when omitted
bash
curl -X POST https://api.fondaro.com/v1/deals/3f6c2a10-0000-4000-8000-000000000010/won \  -H "Authorization: Bearer $FONDARO_API_KEY" \  -H "Content-Type: application/json" \  -d '{}'

The response is the deal with "status": "won" and wonAt set.

Close a deal as lost

POST /v1/deals/{dealId}/lost

Marks the deal lost, with an optional reason. Any won fields are cleared.

ParameterInTypeRequiredDescription
dealIdPathUUIDYesThe id of the deal
lostReasonBodystringNoUp to 2000 characters
lostAtBodystringNoYYYY-MM-DD or an ISO 8601 timestamp. Now when omitted
bash
curl -X POST https://api.fondaro.com/v1/deals/3f6c2a10-0000-4000-8000-000000000010/lost \  -H "Authorization: Bearer $FONDARO_API_KEY" \  -H "Content-Type: application/json" \  -d '{}'

The response is the deal with "status": "lost", lostAt set, and lostReason (null here, as none was sent).

Reopen a deal

POST /v1/deals/{dealId}/reopen

Reopens a won or lost deal into the stage you name, or into its previous stage when you omit it.

ParameterInTypeRequiredDescription
dealIdPathUUIDYesThe id of the deal
stageBodystringNoThe stage to reopen into
bash
curl -X POST https://api.fondaro.com/v1/deals/3f6c2a10-0000-4000-8000-000000000010/reopen \  -H "Authorization: Bearer $FONDARO_API_KEY" \  -H "Content-Type: application/json" \  -d '{}'

The response is the deal with "status": "open" and its stage.