# List subscriptions

Endpoint: GET /subscriptions
Version: 1.0.457.36910
Security: OAuth2

## Security:

  - `OAuth2` (unknown)
    oauth2 scopes: FullAccess, SubscriptionAdmin, SubscriptionReader

## Query parameters:

  - `search` (string)
    Word or phrase to search for.

  - `searchOn` (array)
    Comma-delimited list of fields to search on.

  - `sortBy` (array)
    Comma-delimited list of fields to sort by.

  - `page` (integer)
    Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

  - `pageSize` (integer)
    Number of results to return per page.

  - `filters` (object)
    An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

## Response 200 fields (application/json):

  - `Items` (array)

  - `Items.ID` (string)

  - `Items.Frequency` (integer)
    Used to define how often to process the subscription. The subscription will process once every {Frequency} {Interval}.

  - `Items.Interval` (string)
    Enum: "Days", "Weeks", "Months"

  - `Items.NextOrderDate` (string)
    Next order date of the subscription. The hourly process that creates subscription orders will query for subscriptions with a NextOrderDate between now and five hours ago.

  - `Items.LastOrderDate` (string)

  - `Items.NotificationDate` (string)
    Date that subscription order reminder message sender will be triggered if used. Value is the result of NextOrderDate less NotificationDays on the subscription integration.

  - `Items.DateCreated` (string)

  - `Items.EndDate` (string)

  - `Items.Active` (boolean)

  - `Items.FromCompanyID` (string)
    Only use when creating a subscription on behalf of another user. ID of the buyer or marketplace owner placing the order.

  - `Items.FromUserID` (string)
    Only use when creating a subscription on behalf of a another user.

  - `Items.ToCompanyID` (string)
    ID of the marketplace owner or supplier receiving the order created by this subscription, only writable on create.

  - `Items.Payment` (object)
    Example: {"Type":"PurchaseOrder","CreditCardID":"","SpendingAccountID":""}

  - `Items.Payment.Type` (string)
    Enum: "PurchaseOrder", "CreditCard", "SpendingAccount"

  - `Items.Payment.CreditCardID` (string)

  - `Items.Payment.SpendingAccountID` (string)

  - `Items.BillingAddressID` (string)

  - `Items.ShippingAddressID` (string)

  - `Items.ProjectedSubtotal` (number)
    Tentative subtotal of next subscription order. Based on current known pricing; avoid if product or pricing is provided by an external integration.

  - `Items.xp` (object)

  - `Meta` (object)

  - `Meta.Page` (integer)

  - `Meta.PageSize` (integer)

  - `Meta.TotalCount` (integer)

  - `Meta.TotalPages` (integer)

  - `Meta.ItemRange` (array)

  - `Meta.NextPageKey` (string)

## Response 4XX:

  - `4XX` (unknown)
    Expected errors range from 400-409. Anything in the 5XX range indicates a server issue and should be reported to support.

## Response 4XX fields (application/json):

  - `StatusCode` (integer)
    Example: 404

  - `ErrorCode` (string)
    Example: NotFoundError

  - `Message` (string)
    Example: Object not found

  - `Data` (object)
    Example: {"ObjectType":"","ObjectID":""}

