Search products
Use the searchProducts method to extract information about the subscription plan/products you configured for your account.
Pagination
Use pagination to decrease the request loading time, while better handling the returning responses.
Pagination works on all the search methods existing on 2Checkout API 5.0. The default pagination behavior is to display page 1 with 10 results. The maximum number of items displayed on a single page is 200.
To use pagination, include the Pagination object inside the search method call, using the parameters below:
Pagination
Object Details below.
Pagination.Page
Int Set the number of pages that should be returned.
Pagination.Limit
Int Set a limit for the number of results that should be returned.
Request parameters
sessionID
Required (string)
Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes.
SearchOptions
Object
SearchOptions.Name
Optional (string) Product name. Can be NULL.
SearchOptions.Codes
Optional (StringArray) Array of product codes.
SearchOptions.Types
Optional (StringArray) Array of the values representing the type of products. Possible values:
REGULAR
BUNDLE
Leave empty to have all product types returned to the search.
Can be NULL. If NULL, 2Checkout returns both regular and bundle products.
SearchOptions.Enabled
Optional (boolean) True or false. Can be NULL.
SearchOptions.GroupName
Optional (string) The name of the group that the product is associated with.
Can be NULL.
SearchOptions.Limit
Optional (integer) Number of results (products) displayed per page. Default value is 10.
Can be NULL.
SearchOptions.Page
Optional (integer) A specific page of search results. Default value is 1.
Can be NULL.
SearchOptions.OrderBy
Object Defines the order of the returned results.
SearchOptions.Field
Optional (string) The name of the field to order the results by. Allowed values: 'ProductStatus', 'ProductName', 'ProductCode', 'UpdateDatetime', 'AvangateId'. Can be NULL.
SearchOptions.Direction
Optional (string) Sort results ascending or descending. Allowed values:
asc
desc (default)
Can be NULL (defaults to desc).
Request sample
Response parameters
Object
Last updated
Was this helpful?