Skip to navigation

Retrieve an order line item

View as Markdown
Retrieve the details of a specific Order Line Item object.

Authentication

AuthorizationBearer

Use Bearer {{token}} in the Authorization header for authentication.

Path parameters

keystringRequired
Object ID or Number.

Headers

Idempotency-KeystringOptional<=255 characters
Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident.
Accept-EncodingstringOptional

Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.

If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it.

Content-EncodingstringOptional

Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.

Zuora-Track-IdstringOptional<=64 characters

A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.

The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote (').

Zuora-Entity-IdsstringOptional

An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header.

Zuora-Org-IdsstringOptional

Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header.

The IDs must be a sub-set of the user’s accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user’s accessible orgs.

Zuora-VersionstringOptional

The minor API version.

For a list of available minor versions, see API upgrades.

Query parameters

pageSizeintegerOptional1-99Defaults to 10

The maximum number of results to return in a single page. If the specified pageSize is less than 1 or greater than 99, Zuora will return a 400 error.

cursorstringOptional

A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with next_page=W3sib3JkZXJ=, your subsequent call can include cursor=W3sib3JkZXJ= in order to fetch the next page of the list.

sort[]list of stringsOptional

A case-insensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. accountnumber.ASC) or descending (e.g. accountnumber.DESC). You cannot sort on properties in arrays. If the array-type properties are specified for the sort[] parameter, they are ignored.

expand[]list of enumsOptional
Allows you to expand responses by including related object information in a single call.
Allowed values:
filter[]list of stringsOptional

A case-insensitive filter on the list.

fields[]list of stringsOptional

A case-insensitive query parameter that allows you to specify which fields are returned in the response.

includeNullFieldsbooleanOptionalDefaults to false

Specifies whether to include fields with the null value in the response.

  • If set to true, all fields will be returned in the response, including those with the null value.
  • If set to false, only fields with non-null values will be returned.

Response headers

Content-EncodingstringOptional

This header is returned if you specify the Accept-Encoding: gzip request header and the response contains over 1000 bytes of data.

Note that only the following MIME types support gzipped responses:

  • application/json
  • application/xml
  • text/html
  • text/csv
  • text/plain
RateLimit-LimitstringOptional

The request limit quota for the time window closest to exhaustion. See rate limits for more information.

RateLimit-Remainingdouble

The number of requests remaining in the time window closest to quota exhaustion. See rate limits for more information.

RateLimit-Resetdouble

The number of seconds until the quota resets for the time window closest to quota exhaustion. See rate limits for more information.

Zuora-Request-IdstringOptional
The Zuora internal identifier of the API call. You cannot control the value of this header.
Zuora-Track-IdstringOptional
A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
Concurrency-Limit-TypestringOptional

The type of the concurrency limit, which can be Default, High-volume transactions, or Object Query.

For more information, see Concurrent request limits.

Concurrency-Limit-Limitinteger

The total number of the permitted concurrent requests.

For more information, see Concurrent request limits.

Concurrency-Limit-Remaininginteger

The remaining number of the permitted concurrent requests.

For more information, see Concurrent request limits.

Response

OK
idstringOptional
The unique identifier of the order line item.
createdByIdstringOptional
The unique identifier of the user who created the order line item.
createdDatedatetimeOptional

The time that the order line item gets created in the system, in the YYYY-MM-DD HH:MM:SS format.

updatedByIdstringOptional
The unique identifier of the user who last updated the order line item.
updatedDatedatetimeOptional
The date and time when the order line item was last updated.
accountingCodestring or nullOptional

The accountingCode for the Order Line Item (OLI).

You can update this field only for a sales OLI and only when the sales OLI is in the Executing state (when the itemState field is set as Executing).

billTargetDatedateOptional

The target date for the Order Line Item (OLI) to be picked up by bill run for generating billing documents.

To generate billing documents for an OLI, you must set this field and set the itemState field to SentToBilling.

You can update this field for a sales or return OLI only when the OLI is in the Executing state (when the itemState field is set as Executing).

amountPerUnitdoubleOptional

The actual charged amount per unit for the Order Line Item (OLI).

You can update this field only for a sales OLI and only when the sales OLI is in the Executing state (when the itemState field is set as Executing).

descriptionstringOptional
The description of the Order Line Item.
amountdoubleOptional

The total amount for the Order Line Item (OLI).

amountWithoutTaxdoubleOptional

The total amount for the Order Line Item (OLI) excluding tax.

itemNamestringOptional

The name of the Order Line Item (OLI).

You can update this field for a sales or return OLI only when the OLI is in the Executing state (when the itemState field is set as Executing).

itemNumberstringOptional

The number for the Order Line Item (OLI).

You can update this field for a sales or return OLI only when the OLI is in the Executing state (when the itemState field is set as Executing).

itemStateenumOptional

The state of the Order Line Item (OLI). See State transitions for an order, order line item, and fulfillment for more information.

To generate invoice for an OLI, you must set this field to SentToBilling and set the billTargetDate field .

You can update this field for a sales or return OLI only when the OLI is in the Executing or ‘Booked’ or SentToBillingstate (when the itemState field is set as Executing or SentToBilling).

Allowed values:
itemTypeenumOptional

The type of the Order Line Item (OLI).

You can update this field only for a sales OLI and only when the sales OLI is in the Executing state (when the itemState field is set as Executing).

Allowed values:
listPricePerUnitdoubleOptional

The list price per unit for the Order Line Item (OLI).

You can update this field only for a sales OLI and only when the sales OLI is in the Executing state (when the itemState field is set as Executing).

listPricedoubleOptional

The extended list price for an order line item, calculated by the formula: listPrice = listPricePerUnit * quantity

orderIdstringOptional
The ID of the order that the order line item belongs to.
orderNumberstringOptional
The number of the order that the order line item belongs to.
productCodestringOptional

The product code for the Order Line Item (OLI).

You can update this field only for a sales OLI and only when the sales OLI is in the Executing state (when the itemState field is set as Executing).

purchaseOrderNumberstringOptional

Used by customers to specify the Purchase Order Number provided by the buyer.

You can update this field only for a sales OLI and only when the sales OLI is in the Executing state (when the itemState field is set as Executing).

quantitydoubleOptional

The quantity of units, such as the number of authors in a hosted wiki service.

You can update this field for a sales or return OLI only when the OLI in the Executing state (when the itemState field is set as Executing).

revenueRecognitionRulestringOptional
The Revenue Recognition rule for the Order Line Item.
productRatePlanChargeIdstringOptional

ID of a Product Rate Plan Charge. Only one-time charges are supported.

billToIdstringOptional

The ID of a contact that belongs to the billing account of the order line item. Use this field to assign an existing account as the bill-to contact of an order line item.

billToSnapshotIdstringOptional

The snapshot of the ID for an account used as the bill-to contact of an order line item. This field is used to store the original information about the account, in case the information about the account is changed after the creation of the order line item. The billToSnapshotId field is exposed while retrieving the order line item details.

shipTostringOptional

The ID of a contact that belongs to the owner acount or billing account of the order line item. Use this field to assign an existing account as the ship-to contact of an order line item.

shipToSnapshotIdstringOptional

The snapshot of the ID for an account used as the ship-to contact of an order line item. This field is used to store the original information about the account, in case the information about the account is changed after the creation of the order line item. The shipToSnapshotId field is exposed while retrieving the order line item details.

soldTostringOptional

The ID of a contact that belongs to the owner acount or billing account of the order line item. Use this field to assign an existing account as the sold-to contact of an order line item.

soldToSnapshotIdstringOptional

The snapshot of the ID for an account used as the sold-to contact of an order line item. This field is used to store the original information about the account, in case the information about the account is changed after the creation of the order line item. The soldToSnapshotId field is exposed while retrieving the order line item details.

soldToOrderContactIdstringOptional

The ID of the sold-to contact for the order.

ownerAccountIdstringOptional
The account ID of the owner of the order line item.
invoiceOwnerAccountIdstringOptional
The account ID of the invoice owner of the order line item.
taxCodestringOptional

The tax code for the Order Line Item (OLI).

You can update this field only for a sales OLI and only when the sales OLI is in the Executing state (when the itemState field is set as Executing).

taxModeenumOptional

The tax mode for the Order Line Item (OLI).

You can update this field only for a sales OLI and only when the sales OLI is in the Executing state (when the itemState field is set as Executing).

Allowed values:
transactionDatedateOptional
The date when the transaction occurs.
uOMstringOptional

Specifies the units to measure usage.

You can update this field only for a sales OLI and only when the sales OLI is in the Executing state (when the itemState field is set as Executing).

relatedSubscriptionNumberstringOptional

This field is used to relate an order line item to an subscription.

You can update this field only for a sales OLI and only when the sales OLI is in the Executing state (when the itemState field is set as Executing).

transactionEndDatedateOptional

The date a transaction is completed. The default value of this field is the transaction start date. Also, the value of this field should always equal or be later than the value of the transactionStartDate field.

You can update this field for a sales or return OLI only when the OLI is in the Executing state (when the itemState field is set as Executing).

transactionStartDatedateOptional

The date a transaction starts. The default value of this field is the order date.

You can update this field for a sales or return OLI only when the OLI is in the Executing state (when the itemState field is set as Executing).

excludeItemBillingFromRevenueAccountingbooleanOptional

Indicates whether to exclude the related invoice items, invoice item adjustments, credit memo items, and debit memo items from revenue accounting.

Note: This field is only available if you have the Order to Revenue or Billing - Revenue Integration feature enabled.

excludeItemBookingFromRevenueAccountingbooleanOptional

Indicates whether to exclude the related rate plan charges and order line items from revenue accounting.

Note: This field is only available if you have the Order to Revenue or Billing - Revenue Integration feature enabled.

originalOrderDatedateOptional
The date of the original sale order for a return order line item.
amendedByOrderOndateOptional
The date of the amended order for a return order line item.
itemCategoryenumOptionalDefaults to Sales
The category of the Order Line Item, to indicate a product sale or return.
Allowed values:
originalOrderIdstringOptional
The ID of the original sale order for a return order line item.
originalOrderLineItemIdstringOptional
The ID of the original sale order line item for a return order line item.
originalOrderLineItemNumberstringOptional
The number of the original sale order line item for a return order line item.
originalOrderNumberstringOptional
The number of the original sale order for a return order line item.
quantityAvailableForReturndoubleOptional
The quantity that can be returned for an order line item.
quantityFulfilleddoubleOptional
The fulfilled quantity for an order line item.
quantityPendingFulfillmentdoubleOptional
The quantity to fulfill for an order line item.
requiresFulfillmentbooleanOptional
The flag to show whether fulfillment is needed or not. It's derived from billing rule of the Order Line Item.
billingRuleenumOptional
The billing rule of the Order Line Item.
Allowed values:
inlineDiscountPerUnitdoubleOptional

This field is used in accordance with the inlineDiscountType field, in the following manner:

  • If the inlineDiscountType field is set as Percentage, this field specifies the discount percentage for each unit of the order line item. For exmaple, if you specify 5 in this field, the discount percentage is 5%.
  • If the inlineDiscountType field is set as FixedAmount, this field specifies the discount amount on each unit of the order line item. For exmaple, if you specify 10 in this field, the discount amount on each unit of the order line item is 10.

Once you set the inlineDiscountType, inlineDiscountPerUnit, and listPricePerUnit fields, the system will automatically generate the amountPerUnit field. You shall not set the amountPerUnit field by yourself.

inlineDiscountTypeenumOptional

This field is used to specify the inline discount type, which can be Percentage, FixedAmount, or None. The default value is Percentage.

This field is used together with the inlineDiscountPerUnit field to specify inline discounts for order line items. The inline discount is applied to the list price of an order line item.

Once you set the inlineDiscountType, inlineDiscountPerUnit, and listPricePerUnit fields, the system will automatically generate the amountPerUnit field. You shall not set the amountPerUnit field by yourself.

Allowed values:
discountdoubleOptional

This field shows the total discount amount that is applied to an order line item after the inlineDiscountType, inlineDiscountPerUnit and quantity fields are set.

The inline discount is applied to the list price of an order line item.

recognizedRevenueAccountingCodeIdstringOptional
The recognized revenue accounting code for the Order Line Item.
deferredRevenueAccountingCodeIdstringOptional
The deferred revenue accounting code for the Order Line Item.
contractAssetAccountingCodestringOptional

The accounting code on the Order Line Item object for customers using Zuora Billing - Revenue Integration.

contractLiabilityAccountingCodestringOptional

The accounting code on the Order Line Item object for customers using Zuora Billing - Revenue Integration.

contractRecognizedRevenueAccountingCodeIdstringOptional

The accounting code on the Order Line Item object for customers using Zuora Billing - Revenue Integration.

unbilledReceivablesAccountingCodeIdstringOptional

The accounting code on the Order Line Item object for customers using Zuora Billing - Revenue Integration.

adjustmentRevenueAccountingCodeIdstringOptional

The accounting code on the Order Line Item object for customers using Zuora Billing - Revenue Integration.

adjustmentLiabilityAccountingCodeIdstringOptional

The accounting code on the Order Line Item object for customers using Zuora Billing - Revenue Integration.

billToobjectOptional
invoiceItemslist of objectsOptional
invoiceOwnerAccountobjectOptional
ownerAccountobjectOptional
soldToInfoobjectOptional

Errors

4XX
Client Request Error
500
Internal Server Error