Recurly SubscriptionLines API

The SubscriptionLines API API from Recurly — 7 operation(s) for subscriptionlines api.

Business capability
Subscription Modification BC-4240.40

Operations 11

GET /api/v1/subscriptionLines List Subscription Lines #
POST /api/v1/subscriptionLines Create Subscription Line #
GET /api/v1/subscriptionLines/{id} Get Subscription Line #
DELETE /api/v1/subscriptionLines/{id} Delete Subscription Line #
POST /api/v1/subscriptionLines/{id}/schedule Create Subscription Line Schedule #
PATCH /api/v1/subscriptionLines/{id}/schedule Update Subscription Line Schedule #
DELETE /api/v1/subscriptionLines/{id}/schedule Delete Subscription Line Schedule #
PATCH /api/v1/subscriptionLines/{id}/customAttributes Update Subscription Line Custom Attributes #
PATCH /api/v1/subscriptionLines/{id}/swap Swap Subscription Line #
PATCH /api/v1/subscriptionLines/{id}/price Update Subscription Line Price #
PATCH /api/v1/subscriptionLines/{id}/quantity Update Subscription Line Quantity #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-line-item-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscription-create-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-invoice-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscription-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-add-on-create-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-purchase-create-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscription-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-billing-attempt-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscription-create-request-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscription-line-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscription-offer-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscriber-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-transaction-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-recovery-invoice-create-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-dunning-campaign-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-invoice-collection-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-dunning-campaign-list-schema.json

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/recurly:recurly-subscriptionlines-api-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

recurly-subscriptionlines-api-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Recurly SubscriptionLines API
  version: '1.3'
  contact: {}
  description: 'Operations tagged SubscriptionLines API across 2 of this provider''s published API definitions: recurly-commerce-api.json, recurly-commerce-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://subs.api.recurlycommerce.com
tags:
- name: SubscriptionLines API
paths:
  /api/v1/subscriptionLines:
    get:
      operationId: listSubscriptionLines
      summary: List Subscription Lines
      description: Retrieve a list of subscription lines
      parameters:
      - name: page
        required: true
        in: query
        description: Page number
        schema:
          default: 1
          type: number
      - name: limit
        required: true
        in: query
        description: Items per page. Limit must be between 1 and 250.
        schema:
          default: 10
          type: number
      - name: sort
        required: false
        in: query
        description: Sort order. If not set, default is createdAt.
        schema:
          type: string
      - name: desc
        required: false
        in: query
        description: Sort direction. If not set, default is ASC.
        schema:
          type: boolean
      - name: minCreatedAt
        required: false
        in: query
        description: The min date of createdAt
        schema:
          format: date-time
          default: '2023-01-01T00:00:00.000Z'
          type: string
      - name: maxCreatedAt
        required: false
        in: query
        description: The max date of createdAt
        schema:
          format: date-time
          default: '2023-01-01T00:00:00.000Z'
          type: string
      - name: minUpdatedAt
        required: false
        in: query
        description: The min date of updatedAt
        schema:
          format: date-time
          default: '2023-01-01T00:00:00.000Z'
          type: string
      - name: maxUpdatedAt
        required: false
        in: query
        description: The min date of updatedAt
        schema:
          format: date-time
          default: '2023-01-01T00:00:00.000Z'
          type: string
      - name: includeDeleted
        required: false
        in: query
        description: If true, include deleted lines
        schema:
          default: false
          type: boolean
      - name: subscriptionId
        required: false
        in: query
        description: The subscription ID
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved subscription lines
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionLinesResultDto'
      security:
      - bearer: []
      tags:
      - SubscriptionLines API
    post:
      operationId: createSubscriptionLine
      summary: Create Subscription Line
      description: Create a subscription line
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionLineCreateRequestDto'
      responses:
        '200':
          description: Successfully create a subscription line
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionLineDto'
      security:
      - bearer: []
      tags:
      - SubscriptionLines API
    servers:
    - url: https://subs.api.recurlycommerce.com
  /api/v1/subscriptionLines/{id}:
    get:
      operationId: getSubscriptionLine
      summary: Get Subscription Line
      description: Get subscription line by id
      parameters:
      - name: id
        required: true
        in: path
        description: The id of the subscription line
        schema:
          example: subscription-line-id
          type: string
      responses:
        '200':
          description: Successfully retrieved subscription line
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionLineDto'
      security:
      - bearer: []
      tags:
      - SubscriptionLines API
    delete:
      operationId: deleteSubscriptionLine
      summary: Delete Subscription Line
      description: Delete a subscription line
      parameters:
      - name: id
        required: true
        in: path
        description: The id of the subscription subscription line
        schema:
          example: subscription-line-id
          type: string
      responses:
        '200':
          description: Successfully deleted subscription line
      security:
      - bearer: []
      tags:
      - SubscriptionLines API
    servers:
    - url: https://subs.api.recurlycommerce.com
  /api/v1/subscriptionLines/{id}/schedule:
    post:
      operationId: createSubscriptionLineSchedule
      summary: Create Subscription Line Schedule
      description: Create a schedule on a subscription line product variant
      parameters:
      - name: id
        required: true
        in: path
        description: The id of the subscription subscription line
        schema:
          example: subscription-line-id
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionLineScheduleCreateDto'
      responses:
        '200':
          description: Successfully created a schedule on a subscription line
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionLineScheduleDto'
      security:
      - bearer: []
      tags:
      - SubscriptionLines API
    patch:
      operationId: updateSubscriptionLineSchedule
      summary: Update Subscription Line Schedule
      description: Update the schedule on a subscription line product variant
      parameters:
      - name: id
        required: true
        in: path
        description: The id of the subscription subscription line
        schema:
          example: subscription-line-id
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionLineScheduleUpdateDto'
      responses:
        '200':
          description: Successfully updated the schedule on subscription line
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionLineScheduleDto'
      security:
      - bearer: []
      tags:
      - SubscriptionLines API
    delete:
      operationId: deleteSubscriptionLineSchedule
      summary: Delete Subscription Line Schedule
      description: Delete a schedule from a subscription line. This converts the line back to "every delivery" behavior.
      parameters:
      - name: id
        required: true
        in: path
        description: The id of the subscription line
        schema:
          example: subscription-line-id
          type: string
      responses:
        '200':
          description: Successfully deleted schedule from subscription line
      security:
      - bearer: []
      tags:
      - SubscriptionLines API
    servers:
    - url: https://subs.api.recurlycommerce.com
  /api/v1/subscriptionLines/{id}/customAttributes:
    patch:
      operationId: updateSubscriptionLineCustomAttributes
      summary: Update Subscription Line Custom Attributes
      description: 'Update customAttributes on a subscription line product variant. WARNING: If the subscription line contains a bundle, you must set upsert=true in the request body to avoid overwriting the bundle data.'
      parameters:
      - name: id
        required: true
        in: path
        description: The id of the subscription subscription line
        schema:
          example: subscription-line-id
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionLineCustomAttributesRequestDto'
      responses:
        '200':
          description: Successfully updated customAttributes on subscription line
      security:
      - bearer: []
      tags:
      - SubscriptionLines API
    servers:
    - url: https://subs.api.recurlycommerce.com
  /api/v1/subscriptionLines/{id}/swap:
    patch:
      operationId: swapSubscriptionLine
      summary: Swap Subscription Line
      description: Swap a subscription line product variant
      parameters:
      - name: id
        required: true
        in: path
        description: The id of the subscription subscription line
        schema:
          example: subscription-line-id
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionLineSwapRequestDto'
      responses:
        '200':
          description: Successfully swapped product variant on subscription line
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionLineDto'
      security:
      - bearer: []
      tags:
      - SubscriptionLines API
    servers:
    - url: https://subs.api.recurlycommerce.com
  /api/v1/subscriptionLines/{id}/price:
    patch:
      operationId: updateSubscriptionLinePrice
      summary: Update Subscription Line Price
      description: Update subscription line price
      parameters:
      - name: id
        required: true
        in: path
        description: The id of the subscription subscription line
        schema:
          example: subscription-line-id
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionLinePriceRequestDto'
      responses:
        '200':
          description: Successfully updated subscription line price
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionLineDto'
      security:
      - bearer: []
      tags:
      - SubscriptionLines API
    servers:
    - url: https://subs.api.recurlycommerce.com
  /api/v1/subscriptionLines/{id}/quantity:
    patch:
      operationId: updateSubscriptionLineQuantity
      summary: Update Subscription Line Quantity
      description: Update quantity on a subscription line
      parameters:
      - name: id
        required: true
        in: path
        description: The id of the subscription subscription line
        schema:
          example: subscription-line-id
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionLineUpdateQuantityRequestDto'
      responses:
        '200':
          description: Successfully update quantity on subscription line
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionLineDto'
      security:
      - bearer: []
      tags:
      - SubscriptionLines API
    servers:
    - url: https://subs.api.recurlycommerce.com
components:
  schemas:
    SubscriptionLineScheduleDto:
      type: object
      properties:
        id:
          type: string
        deliveryInterval:
          type: number
          description: 'The frequency multiplier that determines how often an add-on product is included with deliveries. Values: 1 (every delivery), 2 (every other delivery), 3 (every third delivery), etc'
        deliveryStartOffset:
          type: number
          description: How many orders to skip before starting the delivery cadence
        lastIncludedOrderNumber:
          type: number
        lastIncludedDate:
          format: date-time
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
      - id
      - deliveryInterval
      - deliveryStartOffset
      - lastIncludedOrderNumber
      - lastIncludedDate
      - createdAt
      - updatedAt
    SubscriptionLineCustomAttributesRequestDto:
      type: object
      properties:
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        upsert:
          type: boolean
          description: 'When true, merges new custom attributes with existing ones. When false, completely overwrites existing custom attributes. Default is false. WARNING: If you are setting custom attributes on a subscription line that has a bundle, you must set upsert=true to avoid overwriting the bundle data.'
      required:
      - customAttributes
    SubscriptionLinesResultDto:
      type: object
      properties:
        page:
          type: number
          description: Current page number
        limit:
          type: number
          description: Number of items per page
        totalItems:
          type: number
          description: Total number of items
        totalPages:
          type: number
          description: Total number of pages
        subscriptionLines:
          description: Array of subscription lines for the current page
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionLineDto'
      required:
      - page
      - limit
      - totalItems
      - totalPages
      - subscriptionLines
    SubscriptionLineDto:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        externalId:
          type: string
          description: The shopify contract line ID
        subscriptionId:
          type: string
        variant:
          $ref: '#/components/schemas/VariantDto'
        quantity:
          type: number
        currentPrice:
          type: number
        subscriptionOfferOptionId:
          type:
          - string
          - 'null'
        sellingPlanId:
          type:
          - string
          - 'null'
          description: The shopify selling plan ID of the subscription offer option
        productFulfillmentTypeRestriction:
          type:
          - string
          - 'null'
          enum:
          - PHYSICAL_ONLY
          - DIGITAL_ONLY
          - null
          description: Fulfillment type restriction declared on the subscription offer, if any
        schedule:
          allOf:
          - $ref: '#/components/schemas/SubscriptionLineScheduleDto'
        customAttributes:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/CustomAttribute'
        bundleItems:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/BundleItemDto'
        deletedAt:
          format: date-time
          type:
          - string
          - 'null'
      required:
      - id
      - createdAt
      - updatedAt
      - externalId
      - subscriptionId
      - variant
      - quantity
      - currentPrice
      - subscriptionOfferOptionId
      - sellingPlanId
      - productFulfillmentTypeRestriction
      - schedule
      - customAttributes
    VariantDto:
      type: object
      properties:
        id:
          type: string
        externalId:
          type: string
          description: The shopify variant ID
        status:
          type: string
          enum:
          - ACTIVE
          - DELETED
        currentPrice:
          type: number
        variantTitle:
          type: string
        sku:
          type:
          - string
          - 'null'
        requiresShipping:
          type: boolean
        product:
          allOf:
          - $ref: '#/components/schemas/ProductForVariantDto'
        subscriptionOffer:
          $ref: '#/components/schemas/SubscriptionOfferDto'
      required:
      - id
      - externalId
      - status
      - currentPrice
      - variantTitle
      - sku
      - requiresShipping
    SubscriptionOfferDto:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        externalId:
          type: string
          description: The shopify selling plan group ID
        type:
          type: string
          enum:
          - ONETIME_AND_SUBSCRIPTION
          - ONE_TIME_AND_PREPAID_SUBSCRIPTION
          - SUBSCRIPTION_ONLY
          - PREPAID_SUBSCRIPTION_ONLY
          - ONETIME_AND_SUBSCRIPTION_AND_PREPAID
          - SUBSCRIPTION_AND_PREPAID
          - MEMBERSHIP
        status:
          type: string
          enum:
          - ACTIVE
          - ARCHIVED
          - DRAFT
        name:
          type: string
        description:
          type:
          - string
          - 'null'
        subscriptionOfferOptions:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionOfferOptionDto'
        cancellationFlowId:
          type:
          - string
          - 'null'
          description: The ID of the associated cancellation flow, if any
        trialDurationValue:
          type:
          - number
          - 'null'
        trialDurationUnit:
          type:
          - string
          - 'null'
          enum:
          - DAYS
          - WEEKS
          - MONTHS
          - YEARS
          - null
      required:
      - id
      - createdAt
      - updatedAt
      - externalId
      - type
      - status
      - name
      - description
      - subscriptionOfferOptions
      - trialDurationValue
      - trialDurationUnit
    BundleItemDto:
      type: object
      properties:
        variant:
          allOf:
          - $ref: '#/components/schemas/VariantDto'
        quantity:
          type: number
        currentPrice:
          type: number
      required:
      - variant
      - quantity
      - currentPrice
    SubscriptionLineScheduleCreateDto:
      type: object
      properties:
        deliveryInterval:
          type: number
          description: 'The frequency multiplier that determines how often an add-on product is included with deliveries. Must be >= 2. Values: 2 (every other delivery), 3 (every third delivery), etc. Note: interval=1 (every delivery) does not require a schedule.'
        deliveryStartOffset:
          type: number
          description: How many orders to skip before starting the delivery cadence
      required:
      - deliveryInterval
      - deliveryStartOffset
    SubscriptionOfferOptionDto:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        externalId:
          type: string
          description: The shopify selling plan ID
        type:
          type:
          - string
          - 'null'
          enum:
          - ONETIME_AND_SUBSCRIPTION
          - ONE_TIME_AND_PREPAID_SUBSCRIPTION
          - SUBSCRIPTION_ONLY
          - PREPAID_SUBSCRIPTION_ONLY
          - ONETIME_AND_SUBSCRIPTION_AND_PREPAID
          - SUBSCRIPTION_AND_PREPAID
          - MEMBERSHIP
          - null
        name:
          type: string
        deliveryCadenceCount:
          type: number
        deliveryCadenceUnit:
          type: string
          enum:
          - HOUR
          - DAY
          - MONTH
          - WEEK
          - YEAR
        billingCadenceCount:
          type: number
        billingCadenceUnit:
          type: string
          enum:
          - HOUR
          - DAY
          - MONTH
          - WEEK
          - YEAR
        discount:
          type: number
        discountModifier:
          type: string
          enum:
          - PERCENTAGE
          - AMOUNT
          - FIXED_AMOUNT
        archived:
          type: boolean
      required:
      - id
      - createdAt
      - updatedAt
      - externalId
      - type
      - name
      - deliveryCadenceCount
      - deliveryCadenceUnit
      - billingCadenceCount
      - billingCadenceUnit
      - discount
      - discountModifier
      - archived
    SubscriptionLineUpdateQuantityRequestDto:
      type: object
      properties:
        quantity:
          type: number
          minimum: 1
      required:
      - quantity
    SubscriptionLinePriceRequestDto:
      type: object
      properties:
        currentPrice:
          type: number
      required:
      - currentPrice
    SubscriptionLineScheduleUpdateDto:
      type: object
      properties:
        deliveryInterval:
          type: number
          description: 'The frequency multiplier that determines how often an add-on product is included with deliveries. Must be >= 2. Values: 2 (every other delivery), 3 (every third delivery), etc. Note: To convert back to "every delivery" (interval=1), use DELETE /subscriptionLines/:id/schedule instead.'
        deliveryStartOffset:
          type: number
          description: How many orders to skip before starting the delivery cadence
      required:
      - deliveryInterval
      - deliveryStartOffset
    CustomAttribute:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
      required:
      - key
      - value
    SubscriptionLineCreateRequestDto:
      type: object
      properties:
        variantId:
          type: string
        quantity:
          type: number
        currentPrice:
          type: number
          description: The price of the variant before the subscription discount. Only use if you want to override the default price of the variant.
        sellingPlanId:
          type: string
          description: The shopify selling plan ID of the subscription offer option. The configured discount will be used to calculated the amount of the line.
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        subscriptionId:
          type: string
        schedule:
          description: The line item delivery schedule settings
          allOf:
          - $ref: '#/components/schemas/SubscriptionLineScheduleCreateDto'
      required:
      - variantId
      - quantity
      - sellingPlanId
      - subscriptionId
      - schedule
    SubscriptionLineSwapRequestDto:
      type: object
      properties:
        variantId:
          type: string
        subscriptionOfferOptionId:
          type: string
      required:
      - variantId
    ProductForVariantDto:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        externalId:
          type: string
          description: The shopify product ID
        imageUrl:
          type:
          - string
          - 'null'
        productTitle:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
      required:
      - id
      - createdAt
      - updatedAt
      - externalId
      - imageUrl
      - productTitle
      - description
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
x-refined-from:
- recurly-commerce-api.json
- recurly-commerce-openapi.yml
x-readme:
  explorer-enabled: false