Querying for subscriptions
GET/api/v3/package
Available query parameter values for filtering:
package_id
customer_id
token
brand_id
custom_N
- Example:custom_1
,custom_2
, etc.paymethod
paycycle
nickname
bill_state
ship_state
package_status_str
package_status_state
external_key
write_datetime
- date/time createdmod_datetime
- date/time last modifiedcancel_datetime
quote.quote_id
- Get the subscription that originated from a specific quoteline_items.external_key
line_items.custom_1
line_items.item_id
- Get subscriptions that contain a specific product/discountcustomer.superuser_email
- Get subscriptions for a specific primary contact email addresscustomer.users.email
- Get subscriptions with this email address
Valid values for package_status_state
:
a
(for active packages)c
(for cancelled packages)e
(for expired packages)s
(for suspended packages)
Valid values for package_status_str
:
- active-trial
- active-current
- active-overdue
- canceled-nonpayment
- canceled-manual
- expired-expired
- expired-trial
- suspended-suspended
Request
Query Parameters
package_status_state:EQUALS:a
package_id:ASC
2
8
Responses
- 200
- 400
- 401
Object was fetched successfully
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
Array [
Array [
]
]
response
object[]
Subscription ID #
Customer ID #
Brand ID #
Brand name
Class ID #
Class name
External key value
Unique token
Nickname for the subscription
Payment method for the subscription, one of: crd, inv, ach, tok
Payment method for the subscription (e.g. Credit Card)
Payment method details (e.g. "Visa x1111")
Credit card ID # (if the subscription is paid by credit card)
ACH ID # (if the subscription is paid by ACH)
Tokenized ID # (if the subscription is paid by an external service token)
Admin/worker ID #
Admin/worker name
Billing address line 1
Billing address line 2
(Deprecated)
Billing address city
Billing address state
Billing address postal code
Billing address country
(Deprecated)
Shipping address line 1
Shipping address line 2
(Deprecated)
Shipping address city
Shipping address state
Shipping address postal code
Shipping address country
(Deprecated)
Memo/notes to customer
Currency ID #
Currency ISO 4217 code
Currency symbol
Total amount collected so far for this subscription
Total amount invoiced so far
Total amount due (invoiced - collected)
Total amount past due
Date/time this subscription was suspended from
Date/time this subscription was suspended to
The date the next invoice will be generated
Whether or not the subscription is overdue
Number of days overdue the subscription is
Date/time this subscription was started/effective
Date/time this subscription was cancelled
Date/time this subscription was created
Date/time this subscription was last updated, upgraded, downgraded, etc.)
Date/time invoicing for this subscription is being delayed until
Subscription status ID #
Human-friendly subscription status
Status string
Status code
Current monthly recurring revenue of the subscription
Current annual recurring revenue of the subscription
Reason for cancellation
Terms ID #
Payment terms
Terms number of days
Payment cycle
Payment cycle name
Custom field #1
Custom field #2
Custom field #3
Custom field #4
Custom field #5
Custom field #6
Custom field #7
Custom field #8
Custom field #9
Custom field #10
Custom field #11
Custom field #12
Custom field #13
Custom field #14
Custom field #15
Custom field #16
Custom field #17
Custom field #18
Custom field #19
Custom field #20
Payment schedule to use for the first invoice generated
Payment schedule to use for subsequent generated invoices
line_items
object[]
A list of line items for the subscription
Line item ID #
Package ID #
External key value
Item ID #
Admin worker ID # (sales rep)
Item name
Item external key
Item accounting SKU
Item token
Item type
Whether or not the item is usage-based/metered
Item bundle ID #
Nickname for this line of the subscription
Description
(Deprecated - see trial_recurs)
Number of free trial cycles/cycles to skip
Number of invoices to occur on before expiring
Quantity
The date/time this line item was last upgraded, downgraded, or added
The date/time this line item was cancelled
Custom field #1
Custom field #2
Custom field #3
Custom field #4
Custom field #5
Custom field #6
Custom field #7
Custom field #8
Custom field #9
Custom field #10
Custom field #11
Custom field #12
Custom field #13
Custom field #14
Custom field #15
Custom field #16
Custom field #17
Custom field #18
Custom field #19
Custom field #20
The pricing for the line item
A list of tags
URL for viewing the subscription in the GUI
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": [
{
"package_id": 0,
"customer_id": 0,
"brand_id": 0,
"brand_name": "string",
"class_id": 0,
"class_name": "string",
"external_key": "string",
"token": "string",
"nickname": "string",
"paymethod": "string",
"paymethod_name": "string",
"paymethod_detail": "string",
"creditcard_id": 0,
"ach_id": 0,
"tokenized_id": 0,
"admin_id": 0,
"admin_name": "string",
"bill_addr1": "string",
"bill_addr2": "string",
"bill_addr3": "string",
"bill_city": "string",
"bill_state": "string",
"bill_postcode": "string",
"bill_country": "string",
"bill_notes": "string",
"ship_addr1": "string",
"ship_addr2": "string",
"ship_addr3": "string",
"ship_city": "string",
"ship_state": "string",
"ship_postcode": "string",
"ship_country": "string",
"ship_notes": "string",
"memo": "string",
"currency_id": 0,
"currency_iso4217": "string",
"currency_symbol": "string",
"amount_collected": 0,
"amount_invoiced": 0,
"amount_due": 0,
"amount_overdue": 0,
"suspendfrom_datetime": "string",
"suspendto_datetime": "string",
"next_invoice_datetime": "string",
"is_overdue": true,
"days_overdue": 0,
"start_datetime": "string",
"cancel_datetime": "string",
"write_datetime": "string",
"mod_datetime": "string",
"holduntil_datetime": "string",
"package_status_id": 0,
"package_status_name": "string",
"package_status_str": "string",
"package_status_state": "string",
"mrr": 0,
"arr": 0,
"cancel_reason": "string",
"terms_id": 0,
"terms_name": "string",
"terms_days": 0,
"paycycle": "string",
"paycycle_name": "string",
"custom_1": "string",
"custom_2": "string",
"custom_3": "string",
"custom_4": "string",
"custom_5": "string",
"custom_6": "string",
"custom_7": "string",
"custom_8": "string",
"custom_9": "string",
"custom_10": "string",
"custom_11": "string",
"custom_12": "string",
"custom_13": "string",
"custom_14": "string",
"custom_15": "string",
"custom_16": "string",
"custom_17": "string",
"custom_18": "string",
"custom_19": "string",
"custom_20": "string",
"first_invoice_schedule_template_id": 0,
"recurring_invoice_schedule_template_id": 0,
"line_items": [
{
"line_item_id": 0,
"package_id": 0,
"external_key": "string",
"item_id": 0,
"admin_id": 0,
"item_name": "string",
"item_external_key": "string",
"item_accounting_sku": "string",
"item_token": "string",
"item_units": 0,
"item_type": "string",
"line_item_bundle_id": 0,
"tierset_id": 0,
"nickname": "string",
"descrip": "string",
"trial_days": 0,
"trial_units": 0,
"trial_recurs": 0,
"expire_datetime": "string",
"expire_recurs": 0,
"line_quantity": 0,
"subscribe_datetime": "string",
"subscribe_prorate_from_datetime": "string",
"subscribe_prorate_to_datetime": "string",
"cancel_datetime": "string",
"custom_1": "string",
"custom_2": "string",
"custom_3": "string",
"custom_4": "string",
"custom_5": "string",
"custom_6": "string",
"custom_7": "string",
"custom_8": "string",
"custom_9": "string",
"custom_10": "string",
"custom_11": "string",
"custom_12": "string",
"custom_13": "string",
"custom_14": "string",
"custom_15": "string",
"custom_16": "string",
"custom_17": "string",
"custom_18": "string",
"custom_19": "string",
"custom_20": "string",
"tierset": [
null
]
}
],
"tags": [
"string"
],
"url_self": "string"
}
]
}
{
"code": 200,
"status": "OK",
"message": "",
"response": [
{
"terms_id": 3,
"currency_id": 1,
"external_key": "adlink_5901",
"nickname": "",
"paymethod": "crd",
"paycycle": "mon",
"bill_addr1": null,
"bill_addr2": null,
"bill_addr3": null,
"bill_city": null,
"bill_state": null,
"bill_postcode": null,
"bill_country": null,
"bill_notes": null,
"ship_addr1": null,
"ship_addr2": null,
"ship_addr3": null,
"ship_city": null,
"ship_state": null,
"ship_postcode": null,
"ship_country": null,
"ship_notes": null,
"creditcard_id": 53,
"ach_id": null,
"custom_1": null,
"custom_2": null,
"custom_3": null,
"write_datetime": "2014-06-20 15:52:47",
"mod_datetime": "2014-06-20 15:52:57",
"suspendfrom_datetime": null,
"suspendto_datetime": null,
"cancel_datetime": null,
"holduntil_datetime": null,
"currency_symbol": "$",
"currency_iso4217": "USD",
"amount_collected": 0,
"amount_invoiced": 0,
"amount_due": 0,
"next_invoice_datetime": "2014-09-01 00:00:01",
"package_id": 16,
"customer_id": 16,
"package_status_id": 2,
"package_status_name": "Current",
"package_status_str": "active-current",
"package_status_state": "a"
}
]
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 400,
"status": "Error",
"message": "Missing or invalid parameter.",
"details": {},
"response": false
}
Authentication error
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 401,
"status": "Error",
"message": "Invalid or incorrect authorization [Missing (basic) authorization header.]",
"details": {},
"response": false
}