Search Subscriptions API
Introduction
The Search Subscriptions API endpoint returns a paginated, filterable list of Subscriptions for the Seller's centralized Subscription Management workspace. It supports free-text search, multi-field filtering, and expiration/Renewal windows via NDaysCount, making it the programmatic equivalent of the Subscription grid in the Platform UI.
This endpoint powers the same data that backs the Seller View and Channel View grids, including Subscription status, Renewals, costs, pricing, Commitment Periods, Billing Cycles, scheduled changes, and cancellation policies.
In this article
Overview of the endpoint
The POST /subscriptions/search endpoint retrieves a paginated list of Subscriptions with support for:
- Free-text search — search across Subscription name, Offer name, Vendor name, External Subscription ID, Subscription ID, Domain Name, and Tenant.
- Multi-field filtering — filter by status, Customer, Offer and Seller, using enum values and GUIDs. The available filter values can be retrieved with the filters endpoint.
- Expiration and Renewal windows — limit results to Subscriptions expiring or auto-renewing within a specified number of days via the NDaysCount parameter.
- Pagination — page through large result sets using Page and PageSize parameters (up to 1000 results per page). The Total field in the response indicates the full count of matching Subscriptions across all pages.
Request details
Method and route:
POST https://api.appxite.com/subscription/subscriptions/search
Headers
| Name | Required | Description |
|---|---|---|
Authorization |
Yes | Bearer token (existing authentication) |
X-On-Behalf-Of |
No | CustomerId. Unique identifier for a Customer. When passed, only the Subscriptions that belong to this Customer are returned. Do not send this header for channel-wide queries (see Result scope). |
X-Referer |
Yes |
Platform URL. Identifies the current platform. Must be a full URL including the scheme, for example https://<your-platform-domain>/. A value without https:// is not valid. |
Api-Version |
Yes | API version (for example, 3.0) |
Environment |
Yes | Environment (Sandbox or Production) |
Ocp-Apim-Subscription-Key |
Yes | Subscription Key generated upon subscribing for a relevant product. |
Result scope
The set of Subscriptions returned depends on the headers and on whether DistributorId is passed in the request body:
| Request | Headers and body | Result |
|---|---|---|
| Channel-wide query (Distributor) |
X-Referer set to the platform URL, no X-On-Behalf-Of, and DistributorId in the request body. |
Subscriptions of the whole channel of the specified Distributor. If the X-Referer platform is a Distributor platform with 2-tier Sellers, the results also include their (Indirect) Subscriptions. |
| Own subscriptions | No X-On-Behalf-Of and no DistributorId. |
Only the Subscriptions of the calling organization. |
| Customer-level query |
X-On-Behalf-Of set to a CustomerId. |
Only the Subscriptions that belong to this Customer. |
The SubscriptionTier of each returned Subscription shows where it comes from: Direct means a Subscription from the current platform (the platform identified by X-Referer); Indirect means a Subscription from the platform of 2-tier Sellers, which is returned only when X-Referer is a Distributor platform.
Request body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Page |
Integer | Yes | Page number for pagination (starts at 1). Use together with PageSize to page through results. |
PageSize |
Integer | Yes | Number of results per page (for example, 20). The maximum supported value is 1000. |
Query |
String | No | Free-text search string. Searches across Subscription name, Offer name, Vendor name, External Subscription ID, Subscription ID, Domain Name, and Tenant — the same fields available in the grid search bar. Pass an empty string or omit to skip free-text search. |
Filters |
Array | No | An array of filter objects. Each object contains a Field (the column to filter on) and Filters (an array of accepted values for that field). Multiple filter objects can be combined in a single request — results must match all filters (AND logic across filters). Within a single filter, multiple values act as OR (match any). Pass an empty array or omit to return all Subscriptions in the requested scope. Filters use enum values and GUIDs, not descriptive names. The available values can be retrieved with the filters endpoint (see Retrieving filter values); see also the request examples. |
DistributorId |
String (GUID) | No |
Distributor identifier. Used for channel-wide queries at the Distributor level: pass it together with X-Referer and without X-On-Behalf-Of to retrieve the Subscriptions of the whole channel. If omitted, only the calling organization's own Subscriptions are returned. When X-Referer is a Distributor platform, the results also include Indirect Subscriptions (those of 2-tier Sellers). See Result scope. |
NDaysCount |
Integer | No | When set, limits results to Subscriptions that either expire or auto-renew within the specified number of days from today. This mirrors the "Expire within # of days" and "Auto-renews within # of days" filters in the Platform UI. For example, setting NDaysCount to 30 returns Subscriptions expiring or auto-renewing within the next 30 days. |
Retrieving filter values
To find out which values can be used in the Filters array, call the Retrieve subscription search filters endpoint. It returns the filter values available for the Subscription grid:
POST https://api.appxite.com/subscription/subscriptions/search/filters
The endpoint uses the same headers as the search endpoint: X-Referer (the current platform) is required, and X-On-Behalf-Of is optional; when it is passed, the values are scoped to that Customer's Subscriptions. In the request body, pass DistributorId to get the filter values for the Channel View. The other body parameters (Page, PageSize, Query, Filters, NDaysCount) are optional.
{
"DistributorId": "d4e5f6a7-b8c9-0123-def0-555555555555"
}
The response lists the available values for each filter. Name is the display name and Value is the value to use in the Filters array of the search request. For example, the status "Enabled" has the value 1. The example below is shortened:
{
"FiltersValues": {
"Status": [
{ "Name": "Disabled", "Value": "0" },
{ "Name": "Enabled", "Value": "1" }
],
"ScheduledActionType": [
{ "Name": "RenewToNewTerm", "Value": "0" },
{ "Name": "Cancel", "Value": "1" },
{ "Name": "RenewToExtendedServiceTerm", "Value": "2" }
]
}
}Request examples
OfferId, CustomerId or ResellerId. To see the available filter values, use the filters endpoint (see Retrieving filter values).
Example 1 — Single filter by Offer
This request retrieves page 1 with 20 results, filtering Subscriptions by two specific Offers (field value 2), with an expiration/Renewal window of 30 days.
{
"Page": 1,
"PageSize": 20,
"Query": "",
"Filters": [
{
"Field": 2,
"Filters": [
"f6f6f6f6-a7a7-b8b8-c9c9-d0d0d0d0d0d0",
"d5d5d5d5-e6e6-f7f7-a8a8-b9b9b9b9b9b9"
]
}
],
"NDaysCount": 30
}
Example 2 — Multiple filters combined (Offer + Status)
This request combines two filters: only active Subscriptions (Status 1 = Enabled) of a specific Offer (field value 2). Both conditions must be met (AND logic).
{
"Page": 1,
"PageSize": 20,
"Query": "",
"Filters": [
{
"Field": 2,
"Filters": ["f6f6f6f6-a7a7-b8b8-c9c9-d0d0d0d0d0d0"]
},
{
"Field": "Status",
"Filters": [1]
}
]
}
Example 3 — Free-text search using Query
This request searches for Subscriptions matching the keyword "Office 365" across searchable fields (Subscription name, Offer name, Vendor name, Domain Name, Tenant, and Subscription IDs). Filters can be combined with Query for further refinement.
{
"Page": 1,
"PageSize": 20,
"Query": "Office 365",
"Filters": []
}
Example 4 — Combining Query with filters and NDaysCount
This request searches for "Azure" within active Subscriptions (Status 1 = Enabled) of a specific Customer (field value 18) that are expiring or auto-renewing within 60 days.
{
"Page": 1,
"PageSize": 20,
"Query": "Azure",
"Filters": [
{
"Field": "Status",
"Filters": [1]
},
{
"Field": 18,
"Filters": ["b2c3d4e5-f6a7-8901-bcde-333333333333"]
}
],
"NDaysCount": 60
}
Example 5 — Channel View: filter by Seller
This request filters Subscriptions managed by a specific Seller (field value 26) in the channel. This is useful for Distributors who want to view Subscriptions of a particular Seller programmatically, matching the Channel View functionality in the UI. The Distributor is identified by DistributorId in the request body; do not send the X-On-Behalf-Of header.
{
"Page": 1,
"PageSize": 20,
"Query": "",
"Filters": [
{
"Field": 26,
"Filters": ["c3d4e5f6-a7b8-9012-cdef-444444444444"]
},
{
"Field": "Status",
"Filters": [1]
}
],
"DistributorId": "d4e5f6a7-b8c9-0123-def0-555555555555"
}Response structure
A successful request returns a 200 OK response containing a paginated list of Subscriptions.
| Field | Type | Description |
|---|---|---|
Total |
Integer | Total number of matching Subscriptions across all pages. Use this value together with PageSize to determine how many pages of results are available. |
Items |
Array | Array of Subscription objects for the current page. |
Subscription object fields
Each Subscription object in the Items array contains the following fields:
| Field | Type | Description |
|---|---|---|
Id |
String (GUID) | Unique Subscription identifier. |
Status |
String | Subscription status ("Enabled" or "Disabled"). Note that in the Filters array the status is filtered by numeric value (1 = Enabled, 0 = Disabled). |
Name |
String | Subscription name. |
OfferId |
String (GUID) | Offer identifier. |
OfferName |
String | Offer name. |
VendorId |
String (GUID) | Vendor identifier. |
Vendor |
String | Vendor name. |
Tenant |
String (GUID) or null | Tenant identifier. |
DomainName |
String | Domain name associated with the Subscription. |
VendorWithTenant |
String | Combined display value of Vendor, Tenant, and Domain Name. |
ExpirationTimestamp |
DateTime (UTC) | Expiration date of the Subscription. A value of "9999-12-31T23:59:59.997Z" indicates a Subscription with no end date. |
Quantity |
Integer | Number of Licenses. |
AddonsQuantity |
Integer | Number of Add-on Subscriptions. |
OfferType |
String | Type of the Offer (for example, "LicenceBasedSubscription", "UsageBasedSubscription", "QuantityBasedOneTimeBilledOffer", "Bundle"). This field is returned in the response but cannot be used as a filter. |
IsTrial |
Boolean | Whether the Subscription is a trial. |
IsSubscriptionAutoRenewEnabled |
Boolean | Whether auto-Renewal is enabled. |
SubscriptionRenewConfigStatus |
String | Renewal configuration status. |
ExternalSubscriptionId |
String | External Subscription identifier. |
CustomerId |
String (GUID) | Customer identifier. |
CustomerName |
String | Customer name. |
CustomerExternalId |
String or null | Customer external identifier. |
CustomerReferenceNumber |
Integer | Customer reference number. |
CatalogMarkup Admin only
|
Decimal or null | Catalog Markup percentage. Visible to Seller Admin and above only. |
SubscriptionMarkup Admin only
|
Decimal or null | Subscription Markup percentage. Visible to Seller Admin and above only. |
PriceSource Admin only
|
String or null | Source of the Price applied. Visible to Seller Admin and above only. |
ExpirationStatus |
String | Expiration status. |
SubscriptionTier |
String | Distribution model ("Direct" or "Indirect"). Direct = a Subscription from the current platform (the platform identified by X-Referer). Indirect = a Subscription from the platform of 2-tier Sellers, returned only when X-Referer is a Distributor platform. |
ScheduledActionType |
String | Scheduled action type. |
ResellerId |
String (GUID) | Seller identifier. Maps to the Seller Organization ID column in the Channel View grid. |
ResellerShortName |
String | Seller short name. |
ResellerFullName |
String | Seller full name. |
ResellerCountryName |
String | Seller country. Maps to the Seller Country column in the Channel View grid. |
DistributorId |
String (GUID) or null | Distributor identifier. Populated in Channel View scenarios. |
CustomerUsageCost |
Decimal or null | Customer usage cost (for Usage-Based Subscriptions). |
ResellerId, ResellerShortName, ResellerFullName, ResellerCountryName) which correspond to Seller in the Platform terminology. In the Channel View context, these fields map to the Seller Name, Seller Organization ID, and Seller Country columns.Example response
{
"Total": 2,
"Items": [
{
"Id": "a1a1a1a1-b2b2-c3c3-d4d4-e5e5e5e5e5e5",
"Status": "Enabled",
"Name": "Enterprise Cloud Suite",
"OfferId": "f6f6f6f6-a7a7-b8b8-c9c9-d0d0d0d0d0d0",
"OfferName": "Enterprise Cloud Suite",
"VendorId": "a1b2c3d4-e5f6-7890-abcd-111111111111",
"Vendor": "Microsoft",
"Tenant": "e1e1e1e1-f2f2-a3a3-b4b4-c5c5c5c5c5c5",
"DomainName": "contoso.onmicrosoft.com",
"IncludeTenants": [],
"MinimumCommitmentMonths": 0,
"VendorWithTenant": "Microsoft | e1e1e1e1-f2f2-a3a3-b4b4-c5c5c5c5c5c5 | contoso.onmicrosoft.com",
"ExpirationTimestamp": "2027-06-15T00:00:00Z",
"Quantity": 25,
"AddonsQuantity": 2,
"OfferType": "LicenceBasedSubscription",
"IsTrial": false,
"IsSubscriptionAutoRenewEnabled": true,
"SubscriptionNameOfferTooltipLabel": null,
"SubscriptionRenewConfigStatus": "Active",
"ExternalSubscriptionId": "EXT-0001-ABCD-1234",
"CustomerId": "b2c3d4e5-f6a7-8901-bcde-333333333333",
"CustomerName": "Contoso Ltd",
"CustomerExternalId": null,
"CustomerReferenceNumber": 10042,
"CatalogMarkup": 8.50,
"SubscriptionMarkup": 0,
"PriceSource": "ResellerInPrice",
"ExpirationStatus": "None",
"SubscriptionTier": "Direct",
"ScheduledActionType": "RenewToNewTerm",
"ResellerId": "c3d4e5f6-a7b8-9012-cdef-444444444444",
"ResellerShortName": "Northwind Traders",
"ResellerFullName": "Northwind Traders Ltd",
"ResellerCountryName": "Germany",
"DistributorId": null,
"CustomerUsageCost": null
},
{
"Id": "b2b2b2b2-c3c3-d4d4-e5e5-f6f6f6f6f6f6",
"Status": "Enabled",
"Name": "Cloud Security Platform",
"OfferId": "d5d5d5d5-e6e6-f7f7-a8a8-b9b9b9b9b9b9",
"OfferName": "Cloud Security Platform",
"VendorId": "a1b2c3d4-e5f6-7890-abcd-222222222222",
"Vendor": "Bitdefender",
"Tenant": null,
"DomainName": "sec-contoso-001",
"IncludeTenants": [],
"MinimumCommitmentMonths": 0,
"VendorWithTenant": "Bitdefender | sec-contoso-001",
"ExpirationTimestamp": "2027-09-30T00:00:00Z",
"Quantity": 50,
"AddonsQuantity": 0,
"OfferType": "QuantityBasedOneTimeBilledOffer",
"IsTrial": false,
"IsSubscriptionAutoRenewEnabled": true,
"SubscriptionNameOfferTooltipLabel": null,
"SubscriptionRenewConfigStatus": "Active",
"ExternalSubscriptionId": "EXT-0002-EFGH-5678",
"CustomerId": "b2c3d4e5-f6a7-8901-bcde-333333333333",
"CustomerName": "Contoso Ltd",
"CustomerExternalId": null,
"CustomerReferenceNumber": 10042,
"CatalogMarkup": 0,
"SubscriptionMarkup": 0,
"PriceSource": "VendorRetailPrice",
"ExpirationStatus": "None",
"SubscriptionTier": "Direct",
"ScheduledActionType": "RenewToNewTerm",
"ResellerId": "c3d4e5f6-a7b8-9012-cdef-444444444444",
"ResellerShortName": "Northwind Traders",
"ResellerFullName": "Northwind Traders Ltd",
"ResellerCountryName": "Germany",
"DistributorId": null,
"CustomerUsageCost": null
}
]
}Error handling
Errors are returned using standard HTTP status codes.
| Status | When | Detail |
|---|---|---|
| 200 | Successful request | Returns the paginated list of Subscriptions. An empty Items array with Total: 0 is a valid result when no Subscriptions match the criteria. |
| 400 | Invalid request body (for example, missing required parameters) | Describes which parameter is invalid. |
| 401 | No or invalid authentication token | — |
| 403 | Caller does not have permission to access the requested data | Caller has no access to this scope. |
| 406 | Not acceptable value, for example a Field in the Filters array that is not a valid filter field (such as OfferId, CustomerId or ResellerId) |
The response describes the value that could not be converted. Use enum values and GUIDs in filters, as shown in the request examples. |
Best practices
Follow these recommendations to get the most out of the Search Subscriptions endpoint and avoid common issues.
Use pagination for large datasets
Always implement pagination rather than requesting all Subscriptions in a single call. The maximum PageSize is 1000. For interactive use, start with a smaller PageSize (for example, 20–50); for bulk extraction, larger pages (up to 1000) reduce the number of calls. Use the Total value in the response to calculate how many pages you need to iterate through.
Combine filters to narrow results early
Rather than retrieving all Subscriptions and filtering client-side, use the Filters array to narrow results at the API level. Combining multiple filters (for example, Status + Customer) reduces the payload size and improves response times. This is especially important for Distributors with large sales channels where unfiltered results can contain thousands of records.
Use Query for user-driven search, Filters for automated workflows
The Query parameter is designed for broad, keyword-based searches — ideal when a user types a search term and expects results across multiple fields. For automated integrations and scheduled reporting, prefer Filters with exact identifiers (GUIDs) for precise, repeatable results. You can combine both when needed: for example, use a Query to search by name within a specific Offer filter.
Use NDaysCount for renewal and expiration monitoring
The NDaysCount parameter is the most efficient way to build automated Renewal alerts or expiration reports. Instead of retrieving all Subscriptions and comparing dates client-side, set NDaysCount to your desired window (for example, 30 or 60 days) and let the API return only the Subscriptions that need attention. Combine with the Status filter set to 1 (Enabled) to exclude already suspended Subscriptions from renewal reports.
Use enum values and GUIDs in filters, not strings
Filters are based on enum values (numbers) and GUIDs. Use the values exactly as shown in the request examples. For example, filter the status with 1 (Enabled) or 0 (Disabled); string values such as "Enabled", "Active" or "Suspended" are not supported and do not return the expected result. To get the current list of available values for each filter, call the filters endpoint (see Retrieving filter values). GUID values are not case-sensitive.
Handle empty results gracefully
A response with Total: 0 and an empty Items array is not an error — it means no Subscriptions match the given criteria. Your integration should handle this as a valid state rather than treating it as a failure. Similarly, null values for optional fields (such as CatalogMarkup, Tenant, or DistributorId) are expected and should not cause parsing errors.
Map API field names to Platform terminology
The API uses "Reseller" in its field names (ResellerId, ResellerFullName, ResellerCountryName) while the Platform UI and documentation use Seller. When building user-facing features or reports on top of this API, map these fields to their Platform equivalents to keep terminology consistent for your users. Similarly, the API returns "Enabled"/"Disabled" for status while the UI displays "Active"/"Suspended."
Summary
The POST /subscriptions/search endpoint provides a programmatic way to retrieve, search, and filter Subscriptions from the Subscription Management workspace. It supports free-text search across multiple fields, multi-field filtering with AND/OR logic using enum values and GUIDs, and expiration/Renewal windows via NDaysCount. Distributors can query their whole channel by passing DistributorId in the request body, and the available filter values can be retrieved with the dedicated filters endpoint. The response includes all data fields visible in the Seller View and Channel View grids, including Seller-specific fields for channel-wide Subscription management. For full API reference and interactive testing, visit the Search Subscriptions endpoint on the Developer Portal.
Add comment
Please sign in to leave a comment.