All URIs are relative to https://api.api2cart.com/v1.1
Method | HTTP request | Description |
---|---|---|
SubscriberList | GET /subscriber.list.json | subscriber.list |
ModelResponseSubscriberList SubscriberList (int? start = null, int? count = null, string? pageCursor = null, bool? subscribed = null, string? storeId = null, string? email = null, string? createdFrom = null, string? createdTo = null, string? modifiedFrom = null, string? modifiedTo = null, string? responseFields = null, string? varParams = null, string? exclude = null)
subscriber.list
Get subscribers list
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class SubscriberListExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.api2cart.com/v1.1";
// Configure API key authorization: StoreKeyAuth
config.AddApiKey("x-store-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-store-key", "Bearer");
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new SubscriberApi(config);
var start = 0; // int? | This parameter sets the number from which you want to get entities (optional) (default to 0)
var count = 20; // int? | This parameter sets the entity amount that has to be retrieved. Max allowed count=250 (optional) (default to 10)
var pageCursor = ; // string? | Used to retrieve entities via cursor-based pagination (it can't be used with any other filtering parameter) (optional)
var subscribed = false; // bool? | Filter by subscription status (optional)
var storeId = 1; // string? | Store Id (optional)
var email = mail@example.com; // string? | Filter subscribers by email (optional)
var createdFrom = 2010-07-29 13:45:52; // string? | Retrieve entities from their creation date (optional)
var createdTo = 2100-08-29 13:45:52; // string? | Retrieve entities to their creation date (optional)
var modifiedFrom = 2010-07-29 13:45:52; // string? | Retrieve entities from their modification date (optional)
var modifiedTo = 2100-08-29 13:45:52; // string? | Retrieve entities to their modification date (optional)
var responseFields = {return_code,return_message,pagination,result}; // string? | Set this parameter in order to choose which entity fields you want to retrieve (optional)
var varParams = id,model,price,images; // string? | Set this parameter in order to choose which entity fields you want to retrieve (optional) (default to "force_all")
var exclude = false; // string? | Set this parameter in order to choose which entity fields you want to ignore. Works only if parameter `params` equal force_all (optional)
try
{
// subscriber.list
ModelResponseSubscriberList result = apiInstance.SubscriberList(start, count, pageCursor, subscribed, storeId, email, createdFrom, createdTo, modifiedFrom, modifiedTo, responseFields, varParams, exclude);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SubscriberApi.SubscriberList: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// subscriber.list
ApiResponse<ModelResponseSubscriberList> response = apiInstance.SubscriberListWithHttpInfo(start, count, pageCursor, subscribed, storeId, email, createdFrom, createdTo, modifiedFrom, modifiedTo, responseFields, varParams, exclude);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SubscriberApi.SubscriberListWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
start | int? | This parameter sets the number from which you want to get entities | [optional] [default to 0] |
count | int? | This parameter sets the entity amount that has to be retrieved. Max allowed count=250 | [optional] [default to 10] |
pageCursor | string? | Used to retrieve entities via cursor-based pagination (it can't be used with any other filtering parameter) | [optional] |
subscribed | bool? | Filter by subscription status | [optional] |
storeId | string? | Store Id | [optional] |
string? | Filter subscribers by email | [optional] | |
createdFrom | string? | Retrieve entities from their creation date | [optional] |
createdTo | string? | Retrieve entities to their creation date | [optional] |
modifiedFrom | string? | Retrieve entities from their modification date | [optional] |
modifiedTo | string? | Retrieve entities to their modification date | [optional] |
responseFields | string? | Set this parameter in order to choose which entity fields you want to retrieve | [optional] |
varParams | string? | Set this parameter in order to choose which entity fields you want to retrieve | [optional] [default to "force_all"] |
exclude | string? | Set this parameter in order to choose which entity fields you want to ignore. Works only if parameter `params` equal force_all | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]