younifyd
Menu

List Subscription Line Items

List a subscription's line items

GET/subscriptions/{subscription_id}/line_items

Use it in a workflow

  1. Add a step and choose the Recurly connector.
  2. Pick the List Subscription Line Items action (under line_item).
  3. Fill in the fields below, then reference the result from later steps as {{listSubscriptionLineItems.response.data}}.

Request

Path parameters

subscription_idstringrequired

Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`.

Query parameters

idsarray<string>

Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. **Important notes:** * The `ids` parameter cannot be used with any other ordering or filtering parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request. * Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.

limitinteger

Limit number of records 1-200.

Default 20

orderstring

Sort order.

One ofascdescDefault "desc"

sortstring

Sort field. You *really* only want to sort by `updated_at` in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.

One ofcreated_atupdated_atDefault "created_at"

begin_timestring (date-time)

Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.

end_timestring (date-time)

Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.

originalstring

Filter by original field.

One oftrue

statestring

Filter by state field.

One ofinvoicedpending

typestring

Filter by type field.

One ofchargecredit

Response

Returns 200 with an object. Read it in later steps with {{listSubscriptionLineItems.response.data.<field>}}.

objectstring

Will always be List.

has_moreboolean

Indicates there are more results on subsequent pages.

nextstring

Path to subsequent page of results.

dataarray<object>
idstring
objectstring
uuidstring

The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.

typestring

Charges are positive line items that debit the account. Credits are negative line items that credit the account.

One ofchargecredit

item_codestring

Unique code to identify an item. Available when the Credit Invoices feature is enabled.

item_idstring

System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.

external_skustring

Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled.

revenue_schedule_typestring

One ofat_invoiceat_range_endat_range_startevenlynever

statestring

Pending line items are charges or credits on an account that have not been applied to an invoice yet. Invoiced line items will always have an `invoice_id` value.

One ofinvoicedpending

legacy_categorystring

Category to describe the role of a line item on a legacy invoice: - "charges" refers to charges being billed for on this invoice. - "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo. - "applied_credits" refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated. - "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account.

One ofapplied_creditcarryforwardchargecredit

accountobject10 fields
bill_for_account_idstring

The UUID of the account responsible for originating the line item.

subscription_idstring

If the line item is a charge or credit for a subscription, this is its ID.

plan_idstring

If the line item is a charge or credit for a plan or add-on, this is the plan's ID.

plan_codestring

If the line item is a charge or credit for a plan or add-on, this is the plan's code.

add_on_idstring

If the line item is a charge or credit for an add-on this is its ID.

add_on_codestring

If the line item is a charge or credit for an add-on, this is its code.

invoice_idstring

Once the line item has been invoiced this will be the invoice's ID.

invoice_numberstring

Once the line item has been invoiced this will be the invoice's number. If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.

previous_line_item_idstring

Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund.

original_line_item_invoice_idstring

The invoice where the credit originated. Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund.

originstring

A credit created from an original charge will have the value of the charge's origin.

One ofadd_onadd_on_trialcarryforwardcouponcreditdebitone_timeplanplan_trialsetup_feeprepayment

accounting_codestring

Internal accounting code to help you reconcile your revenue to the correct ledger. Line items created as part of a subscription invoice will use the plan or add-on's accounting code, otherwise the value will only be present if you define an accounting code when creating the line item.

product_codestring

For plan-related line items this will be the plan's code, for add-on related line items it will be the add-on's code. For item-related line items it will be the item's `external_sku`.

credit_reason_codestring

The reason the credit was given when line item is `type=credit`.

One ofgeneralgift_cardpromotionalrefundservicewrite_offDefault "general"

currencystring

3-letter ISO 4217 currency code.

amountnumber (float)

`(quantity * unit_amount) - discount + tax`

descriptionstring

Description that appears on the invoice. For subscription related items this will be filled in automatically.

quantityinteger

This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.

Default 1

quantity_decimalstring

A floating-point alternative to Quantity. If this value is present, it will be used in place of Quantity for calculations, and Quantity will be the rounded integer value of this number. This field supports up to 9 decimal places. The Decimal Quantity feature must be enabled to utilize this field.

unit_amountnumber (float)

Positive amount for a charge, negative amount for a credit.

unit_amount_decimalstring

Positive amount for a charge, negative amount for a credit.

tax_inclusiveboolean

Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag.

subtotalnumber (float)

`quantity * unit_amount`

discountnumber (float)

The sum of all discounts applied to the line item.

discountsarray<object>6 fields

The breakdown of discounts applied to the line item by coupon redemption.

liability_gl_account_codestring

Unique code to identify the ledger account. Each code must start with a letter or number. The following special characters are allowed: `-_.,:`

revenue_gl_account_codestring

Unique code to identify the ledger account. Each code must start with a letter or number. The following special characters are allowed: `-_.,:`

performance_obligation_idstring

The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.

taxnumber (float)

The tax amount for the line item.

json
{
  "object": "string",
  "has_more": false,
  "next": "string",
  "data": [
    {
      "id": "string",
      "object": "string",
      "uuid": "string",
      "type": "charge",
      "item_code": "string",
      "item_id": "string",
      "external_sku": "string",
      "revenue_schedule_type": "at_invoice",
      "state": "invoiced",
      "legacy_category": "applied_credit",
      "account": {
        "id": "string",
        "object": "string",
        "code": "string",
        "email": "name@example.com",
        "first_name": "string",
        "last_name": "string",
        "company": "string",
        "parent_account_id": "string",
        "bill_to": "string",
        "dunning_campaign_id": "string"
      },
      "bill_for_account_id": "string"
    }
  ]
}

Need more? See the Recurly guide for connection setup and behaviour shared by every action.