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
where string
package_status_state:EQUALS:a
order string
package_id:ASC
limit string
2
offset string
8
Responses
- 200
- 400
- 401
Object was fetched successfully
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
code integer
status string
message stringnullable
details objectnullable
response object
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": {}
}
{
"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 integer
status string
message stringnullable
details objectnullable
response boolean
{
"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 integer
status string
message stringnullable
details objectnullable
response boolean
{
"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
}
Loading...