# List API clients

Endpoint: GET /apiclients
Version: 1.0.457.36910
Security: OAuth2

## Security:

  - `OAuth2` (unknown)
    oauth2 scopes: FullAccess, ApiClientAdmin, ApiClientReader

## 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)
    Used for OAuth 2.0 workflows and impersonation.

  - `Items.ClientSecret` (string)
    Enables the OAuth 2.0 client credentials grant type. Required on all OAuth workflows when present.

  - `Items.AccessTokenDuration` (integer)

  - `Items.Active` (boolean)
    All user authentication is prohibited if false.

  - `Items.AppName` (string)

  - `Items.RefreshTokenDuration` (integer)

  - `Items.AnonymousTokenDuration` (integer)
    Specifies the duration of anonymous tokens, expressed in minutes. This value is only used if the API Client is configured for anonymous shopping.

  - `Items.DefaultContextUserName` (string)
    Optionally define a user that will be used when authenticating with a client credentials grant type flow. This grant type is often used for anonymous browsing on buyer applications and authentication on server integration layers.

  - `Items.xp` (object)

  - `Items.AllowAnyBuyer` (boolean)
    Allow all buyer users in your organization access to authenticate using this API Client.

  - `Items.AllowAnySupplier` (boolean)
    Allow all supplier users in your organization access to authenticate using this API Client.

  - `Items.AllowSeller` (boolean)
    Allow all marketplace owner users in your organization access to authenticate using this API Client.

  - `Items.IsAnonBuyer` (boolean)
    Enables anonymous shopping when a buyer user is the DefaultContextUser.

  - `Items.AssignedBuyerCount` (integer)

  - `Items.AssignedSupplierCount` (integer)

  - `Items.OrderCheckoutIntegrationEventID` (string)
    If populated, an error will be thrown when attempting to submit an order that has not been processed through the OrderCheckout integration.

  - `Items.OrderCheckoutIntegrationEventName` (string)

  - `Items.OrderReturnIntegrationEventID` (string)
    If populated, and not overriden by an OrderAdmin, the integration event will be used to calculate ReturnAmount on the order return or each individual return item.

  - `Items.OrderReturnIntegrationEventName` (string)

  - `Items.AddToCartIntegrationEventID` (string)
    If populated, the integration event will be used to fetch product information from an external system when a line item is added to an unsubmitted order and the product does not exist in OrderCloud.

  - `Items.AddToCartIntegrationEventName` (string)

  - `Items.MinimumRequiredRoles` (array)

  - `Items.MinimumRequiredCustomRoles` (array)

  - `Items.MaximumGrantedRoles` (array)

  - `Items.MaximumGrantedCustomRoles` (array)

  - `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":""}

