Subscriptions

List all purchase orders for a subscription

Changed on

List all the purchase orders for the given subscription

get/billing/v1/subscriptions/{subscriptionId}/orders

Request

Path parameters

subscriptionIdstring required

Subscription ID.

Query parameters

startDateFromstring

Filters results to only include subscriptions where billing starts on or after the specified date (format: Mon March 01 00:00:00 EDT 2015)

startDateTostring

Filters results to only include subscriptions where billing starts on or before the specified date (format: Mon March 01 00:00:00 EDT 2015)

status'INITIALIZED' | 'PENDING_USER_APPROVAL' | 'PENDING_REMOTE_CREATION' | 'PENDING_MANUAL_RECOVERY' | 'PENDING_ASYNCHRONOUS_CREATION' | 'FREE_TRIAL' | 'ACTIVE' | 'FINISHED' | 'ONE_TIME' | 'CANCELLED' | 'SUSPENDED' | 'FREE_TRIAL_EXPIRED' | 'FREE_TRIAL_CANCELLED' | 'DELETED' | 'FAILED' | 'UPCOMING' | 'PENDING_MIGRATION_ACTIVATION' | 'PENDING_DELAYED_PROVISIONING'

Filters subscriptions by order status

currency'USD' | 'CAD' | 'EUR' | 'JPY' | 'GBP' | 'KRW' | 'CHF' | 'SEK' | 'SGD' | 'MYR' | 'AUD' | 'MXN' | 'INR' | 'BRL' | 'DKK' | 'NZD' | 'NOK' | 'ZAR' | 'PHP' | 'CNY' | 'SAR' | 'GTQ' | 'IDR' | 'ARS' | 'COP' | 'PEN'

Filters subscriptions by currency

type'NEW' | 'MIGRATION' | 'ADOPTION' | 'FREE_TRIAL_ACTIVATION' | 'TERMINATION_FEE' | 'END_OF_CONTRACT_MIGRATION' | 'REFUND' | 'CREDIT' | 'ONE_TIME_FEE' | 'ADDITIONAL_FEE' | 'END_OF_DISCOUNT_MIGRATION' | 'METERED_USAGE'

Filters subscriptions by order type.<br/>NEW: The first order of a subscription. The order contains flat fees (one time or recurring) for this subscription. It is active until the subscription is updated or canceled.<br/>MIGRATION: The order created after a subscription change. The order includes flat fees for both one-time and recurring editions.<br/>ADOPTION: The order created by an administrator who has taken ownership of an application from another user within the same company.<br/>FREE_TRIAL_ACTIVATION: Created when a free trial is manually upgraded to a paid subscription. Any subscription that is updated from free trial to paid automatically keeps its NEW status purchase order.<br/>TERMINATION_FEE: A subscription is canceled that had a termination fee. This purchase order represents the fees incurred as a result of the cancellation.<br/>END_OF_CONTRACT_MIGRATION: Created when a subscription update takes place as a result of a contract extension. If the contract autorenewal is set to either continue without a contract or renew the contract with the same pricing plan, then no migration occurs and the original purchase order is updated to include the new end date for the contract.<br/>REFUND: Created when a refund is performed. The refund purchase order is created for only on-platform refunds. Off-platform refunds do not generate this type of purchase order.<br/>CREDIT: Created during subscription update events. Any subscription update calculates a paid period and a credit period. The credit is then provided to the user to prorate the subscription.<br/>ONE_TIME_FEE: Created if an edition includes one-time setup fees.<br/>ADDITIONAL_FEE: Used for off-order charges. A developer change creates an off-order charge and charges their customer a custom amount outside of the normal subscription cycle.<br/>END_OF_DISCOUNT_MIGRATION: Created after a discount of limited duration expires. This purchase order is created to represent the updated costs without the discount.<br/>METERED_USAGE: A purchase order created to accumulate usage fees during a billing period. The order is only valid for the billing period but it is updated with usage lines over the course of the billing period. A metered purchase order is invoiced in arrears at the end of the billing cycle.

frequency'ONE_TIME' | 'MONTHLY' | 'QUARTERLY' | 'SIX_MONTHS' | 'YEARLY' | 'TWO_YEARS' | 'THREE_YEARS' | 'DAILY'

Filters subscriptions by pricing frequency

orderReferenceCodestring

Filters subscriptions by order reference code

applicationIdsnumber

Filters subscriptions by internal application ID

fromCreationDatenumber

Filters results to only include subscriptions that were created on or after the specified date

toCreationDatenumber

Filters results to only include subscriptions that were created on or before the specified date

countinteger

Number of results to fetch. Used for paging.

sortField'DATE' | 'ORDER_ID' | 'TOTAL'

Sort field.

sortOrder'ASC' | 'DESC'

Sort order.

startinteger

First result index. Used for paging.

Response

OK

totalnumber nullable

Example response

{
  "orders": [
    {
      "_embedded": {
        "property1": {},
        "property2": {}
      },
      "activated": true,
      "company": {
        "href": "...",
        "id": "..."
      },
      "contract": {},
      "currency": "...",
      "customAttribute": [
        {
          "attributeType": "MULTISELECT",
          "name": "...",
          "value": "...",
          "valueKeys": [
            "...",
            "..."
          ]
        },
        {
          "attributeType": "MULTISELECT",
          "name": "...",
          "value": "...",
          "valueKeys": [
            "...",
            "..."
          ]
        }
      ],
      "discount": {
        "href": "...",
        "id": "..."
      },
      "discountId": 12345,
      "endDate": 12345,
      "endOfDiscountDate": 12345,
      "frequency": "...",
      "id": 12345,
      "links": [
        {
          "href": "...",
          "rel": "..."
        },
        {
          "href": "...",
          "rel": "..."
        }
      ],
      "nextBillingDate": 12345,
      "nextOrder": {
        "href": "...",
        "id": "..."
      },
      "oneTimeOrder": [
        {
          "_embedded": {
            "property1": {},
            "property2": {}
          },
          "company": {},
          "currency": "...",
          "endDate": 12345,
          "endOfDiscountDate": 12345,
          "frequency": "...",
          "id": 12345,
          "links": [
            {},
            {}
          ],
          "nextBillingDate": 12345,
          "paymentPlan": {},
          "referenceCode": "...",
          "salesSupportUser": {},
          "startDate": 12345,
          "status": "...",
          "totalPrice": 12345,
          "type": "...",
          "user": {}
        },
        {
          "_embedded": {
            "property1": {},
            "property2": {}
          },
          "company": {},
          "currency": "...",
          "endDate": 12345,
          "endOfDiscountDate": 12345,
          "frequency": "...",
          "id": 12345,
          "links": [
            {},
            {}
          ],
          "nextBillingDate": 12345,
          "paymentPlan": {},
          "referenceCode": "...",
          "salesSupportUser": {},
          "startDate": 12345,
          "status": "...",
          "totalPrice": 12345,
          "type": "...",
          "user": {}
        }
      ],
      "orderLine": [
        {},
        {}
      ],
      "parameter": [
        {
          "name": "...",
          "value": "..."
        },
        {
          "name": "...",
          "value": "..."
        }
      ],
      "paymentPlan": {
        "allowCustomUsage": true,
        "contract": {},
        "cost": [
          {},
          {}
        ],
        "discount": {},
        "frequency": "...",
        "href": "...",
        "id": 12345,
        "isPrimaryPrice": true,
        "keepBillDateOnUsageChange": true,
        "primaryPrice": true,
        "separatePrepaid": true,
        "tld": "...",
        "uuid": "..."
      },
      "paymentPlanId": 12345,
      "previousOrder": {
        "href": "...",
        "id": "..."
      },
      "referenceCode": "...",
      "salesSupportUser": {
        "href": "...",
        "id": "..."
      },
      "startDate": 12345,
      "status": "...",
      "totalPrice": 12345,
      "type": "...",
      "user": {
        "href": "...",
        "id": "..."
      }
    },
    {
      "_embedded": {
        "property1": {},
        "property2": {}
      },
      "activated": true,
      "company": {
        "href": "...",
        "id": "..."
      },
      "contract": {},
      "currency": "...",
      "customAttribute": [
        {
          "attributeType": "MULTISELECT",
          "name": "...",
          "value": "...",
          "valueKeys": [
            "...",
            "..."
          ]
        },
        {
          "attributeType": "TEXT",
          "name": "...",
          "value": "...",
          "valueKeys": [
            "...",
            "..."
          ]
        }
      ],
      "discount": {
        "href": "...",
        "id": "..."
      },
      "discountId": 12345,
      "endDate": 12345,
      "endOfDiscountDate": 12345,
      "frequency": "...",
      "id": 12345,
      "links": [
        {
          "href": "...",
          "rel": "..."
        },
        {
          "href": "...",
          "rel": "..."
        }
      ],
      "nextBillingDate": 12345,
      "nextOrder": {
        "href": "...",
        "id": "..."
      },
      "oneTimeOrder": [
        {
          "_embedded": {
            "property1": {},
            "property2": {}
          },
          "company": {},
          "currency": "...",
          "endDate": 12345,
          "endOfDiscountDate": 12345,
          "frequency": "...",
          "id": 12345,
          "links": [
            {},
            {}
          ],
          "nextBillingDate": 12345,
          "paymentPlan": {},
          "referenceCode": "...",
          "salesSupportUser": {},
          "startDate": 12345,
          "status": "...",
          "totalPrice": 12345,
          "type": "...",
          "user": {}
        },
        {
          "_embedded": {
            "property1": {},
            "property2": {}
          },
          "company": {},
          "currency": "...",
          "endDate": 12345,
          "endOfDiscountDate": 12345,
          "frequency": "...",
          "id": 12345,
          "links": [
            {},
            {}
          ],
          "nextBillingDate": 12345,
          "paymentPlan": {},
          "referenceCode": "...",
          "salesSupportUser": {},
          "startDate": 12345,
          "status": "...",
          "totalPrice": 12345,
          "type": "...",
          "user": {}
        }
      ],
      "orderLine": [
        {},
        {}
      ],
      "parameter": [
        {
          "name": "...",
          "value": "..."
        },
        {
          "name": "...",
          "value": "..."
        }
      ],
      "paymentPlan": {
        "allowCustomUsage": true,
        "contract": {},
        "cost": [
          {},
          {}
        ],
        "discount": {},
        "frequency": "...",
        "href": "...",
        "id": 12345,
        "isPrimaryPrice": true,
        "keepBillDateOnUsageChange": true,
        "primaryPrice": true,
        "separatePrepaid": true,
        "tld": "...",
        "uuid": "..."
      },
      "paymentPlanId": 12345,
      "previousOrder": {
        "href": "...",
        "id": "..."
      },
      "referenceCode": "...",
      "salesSupportUser": {
        "href": "...",
        "id": "..."
      },
      "startDate": 12345,
      "status": "...",
      "totalPrice": 12345,
      "type": "...",
      "user": {
        "href": "...",
        "id": "..."
      }
    }
  ],
  "total": 12345
}

Changes