getDeal
Fetch one deal by id.
Fetch one deal by id: title, value, close date, stage, pipeline, COMMISSION AND TEAM SPLIT, CUSTOM-FIELD VALUES, assigned users (empty = unassigned), linked contacts (id + name), and linked deals (linkedItems). It does NOT return who is on those contacts: this op also reaches deals on pipelines another org SHARED with yours, whose contacts belong to that org, and the participant read is scoped to your own org: it would come back empty for them and read as "nobody is on this contact" when someone is. To see who is on a contact, call getContact with that contactId: it is guarded to your org, so a contact you cannot see fails loudly instead of answering empty. MONEY: priceFormatted/commissionFormatted are the price and GCI in dollars: quote them. Commission, team split and participant splits are now READABLE here, and they are the answer to GCI questions. commissionCents is the DERIVED total commission on the deal: quote THAT as the deal’s GCI. The other four are the stored write SOURCES, and each side is amount-XOR-percent, so exactly one of a pair is ever non-null: commissionAmountCents (a fixed dollar figure, in cents) or commissionPercentBps (basis points: 300 bps = 3%, applied to priceCents); and teamSplitAmountCents or teamSplitPercentBps (basis points applied to the COMMISSION, not the price). So when commissionPercentBps is set, commissionCents is priceCents x bps/10000 and changing the price silently changes the commission; when commissionAmountCents is set, commissionCents equals it and the price is irrelevant. All four sources null with commissionCents null means no commission has been recorded: NOT zero commission; do not report $0 for a deal nobody has filled in. participantSplits is the per-teammate allocation of what is left after the team fee (each row: user, splitAmountCents or splitPercentBps). Write all of these through updateDeal / createDeal, which echo them back. CUSTOM FIELDS: customFieldValues is the read-back for the customFieldValues input on createDeal / updateDeal (INT-907; there was no read path before). It carries ONLY the fields this deal actually has a value for: a defined field the deal has never been given a value for is ABSENT from the list, not present-and-null, which is the opposite of a contact’s customFields. So an empty list means nothing is filled in, never that the pipeline has no fields: get the pipeline’s full definition set from listDealCustomFields(pipelineId). Each entry names its definition under dealCustomField (id, name, type) and carries the value in the ONE sub-field matching that type: TEXT/LINK -> textValue, NUMBER/DOLLAR -> numberValue (a plain number, NOT cents), DATE -> dateValue (ISO 8601), DROPDOWN -> dropdownSelectedValues (the option LABEL strings, not option ids; more than one only when the definition’s allowMultiple is true).
curl https://server.goliathdata.com/api/v1/call \
-H "Authorization: Bearer $GOLIATH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operationId": "getDeal",
"variables": {
"dealId": "<dealId>"
}
}'import { GoliathClient } from '@goliath-data/sdk'
const goliath = new GoliathClient({
apiKey: process.env.GOLIATH_API_KEY!,
baseUrl: 'https://server.goliathdata.com',
})
const result = await goliath.deals.getDeal({
dealId: '<dealId>'
})const res = await fetch('https://server.goliathdata.com/api/v1/call', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GOLIATH_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
operationId: 'getDeal',
variables: {
dealId: '<dealId>'
}
}),
})
const { data, errors } = await res.json()Variables
The example sends only what the schema requires. Some operations also need one of several optional variables (one filter or another, say); the description above says which.
Response
What comes back under data: a list shows as one entry, and a value as its type.
{
"data": {
"dealQuery": {
"getDeal": {
"id": "<ID>",
"title": "…",
"description": "…",
"priceCents": "…",
"priceFormatted": "…",
"closeDate": "2026-01-01T00:00:00.000Z",
"isArchived": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"lastStageChangeAt": "2026-01-01T00:00:00.000Z",
"commissionCents": "…",
"commissionFormatted": "…",
"commissionAmountCents": "…",
"commissionPercentBps": 0,
"teamSplitAmountCents": "…",
"teamSplitPercentBps": 0,
"participantSplits": [
{
"user": {
"id": "<ID>",
"firstName": "…",
"lastName": "…"
},
"splitAmountCents": "…",
"splitPercentBps": 0
}
],
"stage": {
"id": "<ID>",
"name": "…"
},
"externalLinks": [
{
"id": "<ID>",
"title": "…",
"url": "…"
}
],
"linkedItems": [
{
"id": "<ID>",
"label": "…",
"item": {
"id": "<ID>",
"title": "…"
}
}
],
"pipeline": {
"id": "<ID>",
"name": "…"
},
"users": [
{
"id": "<ID>",
"firstName": "…",
"lastName": "…"
}
],
"contacts": [
{
"id": "<ID>",
"name": "…"
}
],
"tasks": [
{
"id": "<ID>",
"title": "…",
"dueDate": "2026-01-01T00:00:00.000Z",
"completedAt": "2026-01-01T00:00:00.000Z"
}
],
"customFieldValues": [
{
"id": "<ID>",
"textValue": "…",
"dateValue": "2026-01-01T00:00:00.000Z",
"numberValue": 0,
"dropdownSelectedValues": [
"…"
],
"dealCustomField": {
"id": "<ID>",
"name": "…",
"type": "DROPDOWN"
}
}
]
}
}
}
}Errors
unknown_variableA variable the operation does not declare. A typo is refused rather than silently dropped.
unauthorizedNo bearer header, or the key is invalid or revoked.
insufficient_scopeThe key lacks the scope the operation requires.
forbiddenA referenced record does not exist, was deleted, or is outside your organization. The gateway cannot tell those apart.
Behaviour
A read. It rejects an Idempotency-Key header with 400 bad_request.