Retrieve a revenue contract
Operation ID: getRevenueContract
Group: Accounting › Revenue Contracts
Open in the interactive reference
GET /accounting/revenue-contracts/{id}
Read-only: Reads and returns; changes nothing.
Retrieves a revenue contract. Use the revenue contract's id, not its revenueContractNumber.
The response includes the contract's revenue lines, each with its revenue plan and the plan's periods. POST accounting/revenue-contracts/search returns the same fields for each revenue contract.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Api-Version |
header | string · v1 | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1. |
id |
path | string | yes | The unique identifier of the revenue contract you want to retrieve. |
Response
200 Success
Under data (getRevenueContractOutput):
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the revenue contract. |
revenueContractNumber |
string | no | The revenue contract number, unique within the tenant. |
approvalStatus |
string | yes | The approval status of the contract. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. |
generalStatus |
string | no | The overall status of the contract, combining approval and any active revenue hold. Possible values: 'approved', 'approvedOnHold', 'pendingApproval', 'pendingApprovalOnHold'. |
revenueStatus |
string | no | The revenue-recognition progress across the contract's lines. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'. |
isContractClosed |
boolean | yes | Whether the contract has been closed, with its open revenue moved to a new combined revenue contract. |
isContractCombined |
boolean | yes | Whether the contract is the combination target that absorbed a closed contract's open revenue. |
isLongTermContract |
boolean | no | Whether the recognition window from revenueStartDate to revenueEndDate exceeds 366 days. |
sspCompliant |
boolean | no | Whether every line not excluded from allocation is standalone-selling-price compliant. Absent when every line is excluded from allocation. |
currency |
string | yes | The currency the contract is denominated in. Every amount on the contract is in this currency. Format ISO 4217, for example 'USD'. |
functionalCurrency |
string | no | The owning entity's functional currency. Present only when it differs from the contract currency. Format ISO 4217, for example 'USD'. |
exchangeRate |
decimal | yes | The rate used to convert the contract currency to the entity's functional currency. A ratio, not an amount, with no currency of its own. |
entityId |
string | no | The legal entity that owns this contract. See id on GET base/entities. |
entityName |
string | no | The name of the legal entity that owns this contract. |
customerId |
string | no | The customer this contract is with. See id on GET accounting/customers/:id. |
customerName |
string | no | The display name of the customer this contract is with. |
salesOrderId |
string | no | The sales order this contract was created from. See id on GET accounting/sales-orders/:id. |
salesOrderNumber |
string | no | The number of the sales order this contract was created from. |
modifiedRevenueContractId |
string | no | The revenue contract this one was combined or modified into. Absent when there is no such successor. See id on GET accounting/revenue-contracts/:id. |
closeContractDate |
date-time | no | The date and time the contract was closed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent on an open contract. |
migrationDate |
date | no | The date this contract's opening balances were migrated from a prior system. Format YYYY-MM-DD. Absent on a contract created natively. |
revenueStartDate |
date | no | The earliest revenue-recognition start date across the contract's lines. Format YYYY-MM-DD. |
revenueEndDate |
date | no | The latest revenue-recognition end date across the contract's lines. Format YYYY-MM-DD. |
salesEffectiveDate |
date | no | The book date of the sales order this contract was created from. Format YYYY-MM-DD. |
totalContractValue |
decimal | no | The total contract value, in the contract currency. It is the total price of the sales order this contract was created from, less the contract's cost-of-contract-value. |
totalContractAmount |
decimal | no | The total contract amount across the contract's open lines, in the contract currency. |
totalCostOfContractValue |
decimal | no | The total cost-of-contract-value excluded from the revenue calculation, in the contract currency. |
totalCostOfRevenue |
decimal | no | The total cost of revenue recognized, in the contract currency. |
totalEstimatedTransactionPrice |
decimal | no | The total estimated transaction price used in allocation, in the contract currency. |
totalFairValueAmount |
decimal | no | The total fair value used in allocation, in the contract currency. |
totalVariableConsideration |
decimal | no | The total variable consideration across the contract's lines, in the contract currency. |
deferredRevenue |
decimal | no | The deferred revenue not yet recognized, in the contract currency. Zero once the contract is closed. |
revenueAmount |
decimal | no | The total revenue across the contract's lines, in the contract currency. |
revenueRecognized |
decimal | no | The cumulative revenue recognized to date, in the contract currency. |
revenueRemaining |
decimal | no | The revenue remaining to be recognized, in the contract currency. |
remainingPerformanceObligation |
decimal | no | The remaining performance obligation, in the contract currency. It is contract value plus returns and variable consideration, less committed recognized revenue. Zero once the contract is closed. |
unbilledReceivables |
decimal | no | The sum of unbilled journal entries for this contract, in the contract currency. |
returnedAmount |
decimal | no | The amount returned against the contract's revenue plan, in the contract currency. |
oneTimeDiscountAmount |
decimal | no | The one-time discount allocated across the contract's lines, in the contract currency. |
pctRevenueRecognized |
decimal | no | The fraction of total contract value recognized to date, from 0 to 1. 1 once the contract is closed. A ratio, not an amount, with no currency of its own. |
externalIdentifiers |
array<object> | no | The contract's identifiers in other systems, one per configured field name. An empty array or absent when the contract has none. |
externalIdentifiers[].fieldName |
string | yes | The configured field name of the identifier, for example 'netsuiteRevenueContractId'. |
externalIdentifiers[].value |
string | yes | The identifier in the other system. |
externalIdentifiers[].externalUrl |
string | no | A link to the record in the other system. Absent when none is set. |
lines |
array<object> | no | The contract's revenue lines, in line order, each with its revenue plan nested. An empty array when the contract has no lines. |
lines[].id |
string | yes | The unique identifier for the revenue contract line. |
lines[].revenueContractLineNumber |
string | no | The revenue contract line number, unique within the contract. |
lines[].type |
string | yes | The kind of line. Possible values: 'standard', 'thresholdIncrement', 'overage'. |
lines[].currency |
string | yes | The currency the line is denominated in. Every amount on the line and its revenue plan is in this currency. Format ISO 4217, for example 'USD'. |
lines[].functionalCurrency |
string | no | The owning entity's functional currency. Present only when it differs from the line currency. Format ISO 4217, for example 'USD'. |
lines[].exchangeRate |
decimal | no | The rate used to convert the line currency to the functional currency. A ratio, not an amount, with no currency of its own. |
lines[].generalStatus |
string | no | The overall status of the line, combining approval and any active revenue hold. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'. |
lines[].revenueStatus |
string | no | The revenue-recognition progress for the line. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'. |
lines[].isClosed |
boolean | yes | Whether the line has been closed, with its open revenue moved to a combined contract. |
lines[].isLongTerm |
boolean | no | Whether the line's recognition window exceeds 366 days. |
lines[].isEvergreen |
boolean | no | Whether the line has no fixed end date and recognizes indefinitely. |
lines[].sspCompliant |
boolean | no | Whether the line is standalone-selling-price compliant. |
lines[].isAllocationExcluded |
boolean | no | Whether the line is excluded from the contract's revenue allocation. |
lines[].productCode |
string | no | The code of the product the line covers, as it stood when the line was created. |
lines[].unitOfMeasure |
string | no | The unit the line's quantity is measured in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'. |
lines[].performanceObligationName |
string | no | The name of the performance obligation the line satisfies. |
lines[].operationalPerformanceObligationNumber |
string | no | The number of the operational performance obligation the line is tracked under. |
lines[].revenueSchedulingTemplateName |
string | no | The name of the revenue scheduling template that generated the line's plan. |
lines[].revenueRecognitionPattern |
string | no | How revenue is recognized over the line's term. Possible values: 'upfront', 'overTime', 'asDelivered', 'asConsumed'. |
lines[].amortizationMethod |
string | no | How the line's amount is spread across periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'. |
lines[].revenueSchedulingEvent |
string | yes | The event that starts recognition on the line. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'. |
lines[].revenueAccount |
string | no | The name of the revenue account the line recognizes into. |
lines[].deferredRevenueAccount |
string | no | The name of the deferred-revenue account the line defers into. |
lines[].revRecStartDate |
date | no | The first day of the line's revenue-recognition window. Format YYYY-MM-DD. |
lines[].revRecEndDate |
date | no | The last day of the line's revenue-recognition window, inclusive. Format YYYY-MM-DD. |
lines[].salesOrderBookingDate |
date | no | The book date of the sales order line this line was created from. Format YYYY-MM-DD. |
lines[].revenueTerm |
decimal | no | The length of the line's revenue term, in the line's scheduling unit. A count, not an amount. |
lines[].salesOrderProductLine |
string | no | The number of the sales order product line this line was created from. |
lines[].contractAmount |
decimal | no | The contract amount booked on the line, in the line currency. |
lines[].adjustedContractAmount |
decimal | no | The contract amount after modifications, in the line currency. |
lines[].listPrice |
decimal | no | The undiscounted list price of the line, in the line currency. |
lines[].totalContractValue |
decimal | no | The total contract value attributed to the line, in the line currency. |
lines[].totalCostOfContractValue |
decimal | no | The cost-of-contract-value excluded from the line's revenue calculation, in the line currency. |
lines[].costOfRevenueAmount |
decimal | no | The cost of revenue booked on the line, in the line currency. |
lines[].costOfRevenueRecognized |
decimal | no | The cost of revenue recognized to date on the line, in the line currency. |
lines[].estimatedTransactionPrice |
decimal | no | The estimated transaction price used for the line in allocation, in the line currency. |
lines[].fairValueAmount |
decimal | no | The fair value used for the line in allocation, in the line currency. |
lines[].variableConsideration |
decimal | no | The variable consideration on the line, in the line currency. |
lines[].extendedSSP |
decimal | no | The extended standalone selling price of the line, unit standalone selling price times quantity, in the line currency. |
lines[].revenueAmount |
decimal | no | The revenue allocated to the line, in the line currency. |
lines[].revenueRecognized |
decimal | no | The revenue recognized to date on the line, in the line currency. |
lines[].revenueRemaining |
decimal | no | The revenue still to be recognized on the line, in the line currency. |
lines[].deferredRevenueAmount |
decimal | no | The deferred revenue outstanding on the line, in the line currency. |
lines[].remainingPerformanceObligation |
decimal | no | The remaining performance obligation on the line, in the line currency. |
lines[].unbilledReceivables |
decimal | no | The unbilled receivables on the line, in the line currency. |
lines[].unscheduledRevenue |
decimal | no | The revenue on the line not yet scheduled into a plan period, in the line currency. |
lines[].totalInvoicedAmount |
decimal | no | The total invoiced against the line to date, in the line currency. |
lines[].oneTimeDiscountAllocationAmount |
decimal | no | The one-time discount allocated to the line, in the line currency. |
lines[].fvAllocationRatio |
decimal | no | The share of the contract's fair value allocated to the line, from 0 to 1. A ratio, not an amount, with no currency of its own. |
lines[].revenuePlanHeader |
object | no | The line's revenue plan, the schedule revenue is recognized against. At most one per line. Absent when no plan has been generated for the line yet. |
lines[].revenuePlanHeader.id |
string | yes | The unique identifier for the revenue plan header. |
lines[].revenuePlanHeader.revenuePlanHeaderNumber |
string | no | The revenue plan header number. |
lines[].revenuePlanHeader.status |
string | no | The status of the plan. Possible values: 'notStarted', 'pendingRecognition', 'inProgress', 'complete', 'completeModified'. |
lines[].revenuePlanHeader.currency |
string | yes | The currency the plan is denominated in. Every amount on the plan and its plan lines is in this currency. Format ISO 4217, for example 'USD'. |
lines[].revenuePlanHeader.amortizationMethod |
string | no | How the plan spreads its amount across periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'. |
lines[].revenuePlanHeader.revenueSchedulingEvent |
string | yes | The event that starts recognition on the plan. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'. |
lines[].revenuePlanHeader.isContractClosed |
boolean | yes | Whether the contract behind the plan has been closed. |
lines[].revenuePlanHeader.revRecStartDate |
date | no | The first day of the plan's recognition window. Format YYYY-MM-DD. |
lines[].revenuePlanHeader.revRecEndDate |
date | no | The last day of the plan's recognition window, inclusive. Format YYYY-MM-DD. |
lines[].revenuePlanHeader.comments |
string | no | Free-form comments recorded on the plan. |
lines[].revenuePlanHeader.amount |
decimal | no | The total amount the plan schedules, in the plan currency. |
lines[].revenuePlanHeader.totalRecognized |
decimal | no | The total recognized across the plan's lines to date, in the plan currency. |
lines[].revenuePlanHeader.remainingDeferred |
decimal | no | The amount still deferred on the plan, in the plan currency. |
lines[].revenuePlanHeader.returnedAmount |
decimal | no | The amount returned against the plan, in the plan currency. |
lines[].revenuePlanHeader.unscheduledRevenue |
decimal | no | The plan amount not yet scheduled into a period, in the plan currency. |
lines[].revenuePlanHeader.revenuePlanLines |
array<object> | no | The plan's period rows, the recognition schedule, one entry per planned period, earliest planned period first. An empty array when the plan has not been scheduled yet. |
lines[].revenuePlanHeader.revenuePlanLines[].id |
string | yes | The unique identifier for the revenue plan line. |
lines[].revenuePlanHeader.revenuePlanLines[].lineId |
string | no | The line identifier within the plan. |
lines[].revenuePlanHeader.revenuePlanLines[].revenuePlanType |
string | yes | What the plan line schedules. Possible values: 'revenueRecognition', 'returnRevenueRecognition', 'unCommittedRevenueRecognition', 'modificationDeferredRevenueAdjustment', 'allowance', 'overage', 'usageExpiration', 'costOfRevenue', 'unholdRevenuePeriod', 'retrospectiveAdjustment'. |
lines[].revenuePlanHeader.revenuePlanLines[].currency |
string | yes | The currency the plan line is denominated in. Format ISO 4217, for example 'USD'. |
lines[].revenuePlanHeader.revenuePlanLines[].plannedPeriod |
string | no | The name of the accounting period this row is planned for. |
lines[].revenuePlanHeader.revenuePlanLines[].plannedPeriodDate |
date | no | The start date of the planned accounting period. Format YYYY-MM-DD. Plan lines are returned in ascending order of this date. |
lines[].revenuePlanHeader.revenuePlanLines[].postingPeriod |
string | no | The name of the accounting period the row was posted in, when it differs from the planned one. |
lines[].revenuePlanHeader.revenuePlanLines[].isPosted |
boolean | no | Whether the row has been posted to the general ledger. |
lines[].revenuePlanHeader.revenuePlanLines[].holdStatus |
string | no | Whether revenue on the row is held back. Possible values: 'notHold', 'holdPlaced', 'holdRemoved'. |
lines[].revenuePlanHeader.revenuePlanLines[].releaseUnit |
string | no | The unit the release amount is expressed in. Possible values: 'quantity', 'percent', 'amount'. |
lines[].revenuePlanHeader.revenuePlanLines[].releaseAmount |
decimal | no | The amount or quantity released in this period, in the unit given by releaseUnit. |
lines[].revenuePlanHeader.revenuePlanLines[].pctRecognizedInPeriod |
decimal | no | The fraction of the plan recognized in this period, from 0 to 1. A ratio, not an amount, with no currency of its own. |
lines[].revenuePlanHeader.revenuePlanLines[].cumulativePercentage |
decimal | no | The fraction of the plan recognized cumulatively through this period, from 0 to 1. A ratio, not an amount, with no currency of its own. |
lines[].revenuePlanHeader.revenuePlanLines[].revenueAccount |
string | no | The name of the revenue account this row recognizes into. |
lines[].revenuePlanHeader.revenuePlanLines[].deferredRevenueAccount |
string | no | The name of the deferred-revenue account this row releases from. |
lines[].revenuePlanHeader.revenuePlanLines[].journalEntry |
string | no | The number of the journal entry this row posted through, once posted. |
lines[].revenuePlanHeader.revenuePlanLines[].amount |
decimal | no | The amount scheduled for this period, in the plan line currency. |
lines[].revenuePlanHeader.revenuePlanLines[].revenueAmount |
decimal | no | The revenue scheduled for this period, in the plan line currency. |
lines[].revenuePlanHeader.revenuePlanLines[].revenueRecognized |
decimal | no | The revenue recognized in this period, in the plan line currency. |
lines[].revenuePlanHeader.revenuePlanLines[].cumulativeRecognition |
decimal | no | The revenue recognized cumulatively through this period, in the plan line currency. |
lines[].revenuePlanHeader.revenuePlanLines[].unscheduledRevenue |
decimal | no | The amount on this row not yet scheduled, in the plan line currency. |
lines[].revenuePlanHeader.revenuePlanLines[].postedAmount |
decimal | no | The amount actually posted to the ledger for this row, in the plan line currency. |
lastModifiedDate |
date-time | yes | The date and time the revenue contract last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"revenueContractNumber": "<revenueContractNumber>",
"approvalStatus": "<approvalStatus>",
"generalStatus": "<generalStatus>",
"revenueStatus": "<revenueStatus>",
"isContractClosed": true,
"isContractCombined": true,
"isLongTermContract": true,
"sspCompliant": true,
"currency": "<currency>",
"functionalCurrency": "<functionalCurrency>",
"exchangeRate": "19.99",
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityName": "<entityName>",
"customerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"customerName": "<customerName>",
"salesOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"salesOrderNumber": "<salesOrderNumber>",
"modifiedRevenueContractId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"closeContractDate": "2026-01-15T09:30:00.000Z",
"migrationDate": "2026-01-15",
"revenueStartDate": "2026-01-15",
"revenueEndDate": "2026-01-15",
"salesEffectiveDate": "2026-01-15",
"totalContractValue": "19.99",
"totalContractAmount": "19.99",
"totalCostOfContractValue": "19.99",
"totalCostOfRevenue": "19.99",
"totalEstimatedTransactionPrice": "19.99",
"totalFairValueAmount": "19.99",
"totalVariableConsideration": "19.99",
"deferredRevenue": "19.99",
"revenueAmount": "19.99",
"revenueRecognized": "19.99",
"revenueRemaining": "19.99",
"remainingPerformanceObligation": "19.99",
"unbilledReceivables": "19.99",
"returnedAmount": "19.99",
"oneTimeDiscountAmount": "19.99",
"pctRevenueRecognized": "19.99",
"externalIdentifiers": [
{
"fieldName": "<fieldName>",
"value": "<value>",
"externalUrl": "<externalUrl>"
}
],
"lines": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"revenueContractLineNumber": "<revenueContractLineNumber>",
"type": "<type>",
"currency": "<currency>",
"functionalCurrency": "<functionalCurrency>",
"exchangeRate": "19.99",
"generalStatus": "<generalStatus>",
"revenueStatus": "<revenueStatus>",
"isClosed": true,
"isLongTerm": true,
"isEvergreen": true,
"sspCompliant": true,
"isAllocationExcluded": true,
"productCode": "<productCode>",
"unitOfMeasure": "<unitOfMeasure>",
"performanceObligationName": "<performanceObligationName>",
"operationalPerformanceObligationNumber": "<operationalPerformanceObligationNumber>",
"revenueSchedulingTemplateName": "<revenueSchedulingTemplateName>",
"revenueRecognitionPattern": "<revenueRecognitionPattern>",
"amortizationMethod": "<amortizationMethod>",
"revenueSchedulingEvent": "<revenueSchedulingEvent>",
"revenueAccount": "<revenueAccount>",
"deferredRevenueAccount": "<deferredRevenueAccount>",
"revRecStartDate": "2026-01-15",
"revRecEndDate": "2026-01-15",
"salesOrderBookingDate": "2026-01-15",
"revenueTerm": "19.99",
"salesOrderProductLine": "<salesOrderProductLine>",
"contractAmount": "19.99",
"adjustedContractAmount": "19.99",
"listPrice": "19.99",
"totalContractValue": "19.99",
"totalCostOfContractValue": "19.99",
"costOfRevenueAmount": "19.99",
"costOfRevenueRecognized": "19.99",
"estimatedTransactionPrice": "19.99",
"fairValueAmount": "19.99",
"variableConsideration": "19.99",
"extendedSSP": "19.99",
"revenueAmount": "19.99",
"revenueRecognized": "19.99",
"revenueRemaining": "19.99",
"deferredRevenueAmount": "19.99",
"remainingPerformanceObligation": "19.99",
"unbilledReceivables": "19.99",
"unscheduledRevenue": "19.99",
"totalInvoicedAmount": "19.99",
"oneTimeDiscountAllocationAmount": "19.99",
"fvAllocationRatio": "19.99",
"revenuePlanHeader": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"revenuePlanHeaderNumber": "<revenuePlanHeaderNumber>",
"status": "<status>",
"currency": "<currency>",
"amortizationMethod": "<amortizationMethod>",
"revenueSchedulingEvent": "<revenueSchedulingEvent>",
"isContractClosed": true,
"revRecStartDate": "2026-01-15",
"revRecEndDate": "2026-01-15",
"comments": "<comments>",
"amount": "19.99",
"totalRecognized": "19.99",
"remainingDeferred": "19.99",
"returnedAmount": "19.99",
"unscheduledRevenue": "19.99",
"revenuePlanLines": [
{
"id": null,
"lineId": null,
"revenuePlanType": null,
"currency": null,
"plannedPeriod": null,
"plannedPeriodDate": null,
"postingPeriod": null,
"isPosted": null,
"holdStatus": null,
"releaseUnit": null,
"releaseAmount": null,
"pctRecognizedInPeriod": null,
"cumulativePercentage": null,
"revenueAccount": null,
"deferredRevenueAccount": null,
"journalEntry": null,
"amount": null,
"revenueAmount": null,
"revenueRecognized": null,
"cumulativeRecognition": null,
"unscheduledRevenue": null,
"postedAmount": null
}
]
}
}
],
"lastModifiedDate": "2026-01-15T09:30:00.000Z"
},
"diagnostics": [
{
"code": "<code>",
"message": "<message>",
"severity": "error",
"path": [
"<path>"
],
"details": "<details>"
}
]
}
Errors
| Code | Status |
|---|---|
NOT_FOUND |
400 |
Statuses
400— Invalid request or business failure. Codes: NOT_FOUND401— The request carries no valid access token.403— Not authorized404— Not found429— Too many requests from this client address. The response has no body and noRetry-Afterheader.500— Internal server error