Skip to content

Latest commit

 

History

History
1341 lines (1098 loc) · 56.5 KB

CustomerApi.md

File metadata and controls

1341 lines (1098 loc) · 56.5 KB

Org.OpenAPITools.Api.CustomerApi

All URIs are relative to https://api.api2cart.com/v1.1

Method HTTP request Description
CustomerAdd POST /customer.add.json customer.add
CustomerAddressAdd POST /customer.address.add.json customer.address.add
CustomerAttributeList GET /customer.attribute.list.json customer.attribute.list
CustomerCount GET /customer.count.json customer.count
CustomerDelete DELETE /customer.delete.json customer.delete
CustomerFind GET /customer.find.json customer.find
CustomerGroupAdd POST /customer.group.add.json customer.group.add
CustomerGroupList GET /customer.group.list.json customer.group.list
CustomerInfo GET /customer.info.json customer.info
CustomerList GET /customer.list.json customer.list
CustomerUpdate PUT /customer.update.json customer.update
CustomerWishlistList GET /customer.wishlist.list.json customer.wishlist.list

CustomerAdd

CustomerAdd200Response CustomerAdd (CustomerAdd customerAdd)

customer.add

Add customer into store.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CustomerAddExample
    {
        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 CustomerApi(config);
            var customerAdd = new CustomerAdd(); // CustomerAdd | 

            try
            {
                // customer.add
                CustomerAdd200Response result = apiInstance.CustomerAdd(customerAdd);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CustomerApi.CustomerAdd: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CustomerAddWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // customer.add
    ApiResponse<CustomerAdd200Response> response = apiInstance.CustomerAddWithHttpInfo(customerAdd);
    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 CustomerApi.CustomerAddWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
customerAdd CustomerAdd

Return type

CustomerAdd200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CustomerAddressAdd

AttributeAdd200Response CustomerAddressAdd (CustomerAddressAdd customerAddressAdd)

customer.address.add

Add customer address.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CustomerAddressAddExample
    {
        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 CustomerApi(config);
            var customerAddressAdd = new CustomerAddressAdd(); // CustomerAddressAdd | 

            try
            {
                // customer.address.add
                AttributeAdd200Response result = apiInstance.CustomerAddressAdd(customerAddressAdd);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CustomerApi.CustomerAddressAdd: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CustomerAddressAddWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // customer.address.add
    ApiResponse<AttributeAdd200Response> response = apiInstance.CustomerAddressAddWithHttpInfo(customerAddressAdd);
    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 CustomerApi.CustomerAddressAddWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
customerAddressAdd CustomerAddressAdd

Return type

AttributeAdd200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CustomerAttributeList

ModelResponseCustomerAttributeList CustomerAttributeList (string customerId, int? count = null, string? pageCursor = null, string? storeId = null, string? langId = null, string? varParams = null, string? exclude = null, string? responseFields = null)

customer.attribute.list

Get attributes for specific customer

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CustomerAttributeListExample
    {
        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 CustomerApi(config);
            var customerId = 5;  // string | Retrieves orders specified by customer id
            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 storeId = 1;  // string? | Store Id (optional) 
            var langId = 3;  // string? | Language id (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) 
            var responseFields = {return_code,return_message,pagination,result};  // string? | Set this parameter in order to choose which entity fields you want to retrieve (optional) 

            try
            {
                // customer.attribute.list
                ModelResponseCustomerAttributeList result = apiInstance.CustomerAttributeList(customerId, count, pageCursor, storeId, langId, varParams, exclude, responseFields);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CustomerApi.CustomerAttributeList: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CustomerAttributeListWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // customer.attribute.list
    ApiResponse<ModelResponseCustomerAttributeList> response = apiInstance.CustomerAttributeListWithHttpInfo(customerId, count, pageCursor, storeId, langId, varParams, exclude, responseFields);
    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 CustomerApi.CustomerAttributeListWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
customerId string Retrieves orders specified by customer id
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]
storeId string? Store Id [optional]
langId string? Language id [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]
responseFields string? Set this parameter in order to choose which entity fields you want to retrieve [optional]

Return type

ModelResponseCustomerAttributeList

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CustomerCount

CustomerCount200Response CustomerCount (string? groupId = null, string? createdFrom = null, string? createdTo = null, string? modifiedFrom = null, string? modifiedTo = null, string? storeId = null, string? customerListId = null, bool? avail = null, string? findValue = null, string? findWhere = null, string? ids = null, string? sinceId = null)

customer.count

Get number of customers from store.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CustomerCountExample
    {
        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 CustomerApi(config);
            var groupId = 3;  // string? | Customer group_id (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 storeId = 1;  // string? | Counts customer specified by store id (optional) 
            var customerListId = exampleListId;  // string? | The numeric ID of the customer list in Demandware. (optional) 
            var avail = false;  // bool? | Defines category's visibility status (optional)  (default to true)
            var findValue = mail@gmail.com;  // string? | Entity search that is specified by some value (optional) 
            var findWhere = email;  // string? | Counts customers that are searched specified by field (optional) 
            var ids = 24,25;  // string? | Counts customers specified by ids (optional) 
            var sinceId = 56;  // string? | Retrieve entities starting from the specified id. (optional) 

            try
            {
                // customer.count
                CustomerCount200Response result = apiInstance.CustomerCount(groupId, createdFrom, createdTo, modifiedFrom, modifiedTo, storeId, customerListId, avail, findValue, findWhere, ids, sinceId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CustomerApi.CustomerCount: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CustomerCountWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // customer.count
    ApiResponse<CustomerCount200Response> response = apiInstance.CustomerCountWithHttpInfo(groupId, createdFrom, createdTo, modifiedFrom, modifiedTo, storeId, customerListId, avail, findValue, findWhere, ids, sinceId);
    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 CustomerApi.CustomerCountWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
groupId string? Customer group_id [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]
storeId string? Counts customer specified by store id [optional]
customerListId string? The numeric ID of the customer list in Demandware. [optional]
avail bool? Defines category's visibility status [optional] [default to true]
findValue string? Entity search that is specified by some value [optional]
findWhere string? Counts customers that are searched specified by field [optional]
ids string? Counts customers specified by ids [optional]
sinceId string? Retrieve entities starting from the specified id. [optional]

Return type

CustomerCount200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CustomerDelete

CustomerDelete200Response CustomerDelete (string id)

customer.delete

Delete customer from store.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CustomerDeleteExample
    {
        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 CustomerApi(config);
            var id = 10;  // string | Identifies customer specified by the id

            try
            {
                // customer.delete
                CustomerDelete200Response result = apiInstance.CustomerDelete(id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CustomerApi.CustomerDelete: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CustomerDeleteWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // customer.delete
    ApiResponse<CustomerDelete200Response> response = apiInstance.CustomerDeleteWithHttpInfo(id);
    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 CustomerApi.CustomerDeleteWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id string Identifies customer specified by the id

Return type

CustomerDelete200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CustomerFind

CustomerFind200Response CustomerFind (string findValue, string? findWhere = null, string? findParams = null, string? storeId = null)

customer.find

Find customers in store.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CustomerFindExample
    {
        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 CustomerApi(config);
            var findValue = mail@gmail.com;  // string | Entity search that is specified by some value
            var findWhere = email;  // string? | Entity search that is specified by the comma-separated unique fields (optional)  (default to "email")
            var findParams = regex;  // string? | Entity search that is specified by comma-separated parameters (optional)  (default to "whole_words")
            var storeId = 1;  // string? | Store Id (optional) 

            try
            {
                // customer.find
                CustomerFind200Response result = apiInstance.CustomerFind(findValue, findWhere, findParams, storeId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CustomerApi.CustomerFind: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CustomerFindWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // customer.find
    ApiResponse<CustomerFind200Response> response = apiInstance.CustomerFindWithHttpInfo(findValue, findWhere, findParams, storeId);
    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 CustomerApi.CustomerFindWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
findValue string Entity search that is specified by some value
findWhere string? Entity search that is specified by the comma-separated unique fields [optional] [default to "email"]
findParams string? Entity search that is specified by comma-separated parameters [optional] [default to "whole_words"]
storeId string? Store Id [optional]

Return type

CustomerFind200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CustomerGroupAdd

CustomerGroupAdd200Response CustomerGroupAdd (string name, string? storeId = null, string? storesIds = null)

customer.group.add

Create customer group.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CustomerGroupAddExample
    {
        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 CustomerApi(config);
            var name = new_group;  // string | Customer group name
            var storeId = 1;  // string? | Store Id (optional) 
            var storesIds = 1,2;  // string? | Assign customer group to the stores that is specified by comma-separated stores' id (optional) 

            try
            {
                // customer.group.add
                CustomerGroupAdd200Response result = apiInstance.CustomerGroupAdd(name, storeId, storesIds);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CustomerApi.CustomerGroupAdd: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CustomerGroupAddWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // customer.group.add
    ApiResponse<CustomerGroupAdd200Response> response = apiInstance.CustomerGroupAddWithHttpInfo(name, storeId, storesIds);
    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 CustomerApi.CustomerGroupAddWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
name string Customer group name
storeId string? Store Id [optional]
storesIds string? Assign customer group to the stores that is specified by comma-separated stores' id [optional]

Return type

CustomerGroupAdd200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CustomerGroupList

ModelResponseCustomerGroupList CustomerGroupList (bool? disableCache = null, string? pageCursor = null, int? start = null, int? count = null, string? storeId = null, string? langId = null, string? groupIds = null, string? varParams = null, string? exclude = null, string? responseFields = null)

customer.group.list

Get list of customers groups.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CustomerGroupListExample
    {
        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 CustomerApi(config);
            var disableCache = false;  // bool? | Disable cache for current request (optional)  (default to false)
            var pageCursor = ;  // string? | Used to retrieve entities via cursor-based pagination (it can't be used with any other filtering parameter) (optional) 
            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 storeId = 1;  // string? | Store Id (optional) 
            var langId = 3;  // string? | Language id (optional) 
            var groupIds = 1,2,3;  // string? | Groups that will be assigned to a customer (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 "id,name,additional_fields")
            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) 
            var responseFields = {return_code,return_message,pagination,result};  // string? | Set this parameter in order to choose which entity fields you want to retrieve (optional) 

            try
            {
                // customer.group.list
                ModelResponseCustomerGroupList result = apiInstance.CustomerGroupList(disableCache, pageCursor, start, count, storeId, langId, groupIds, varParams, exclude, responseFields);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CustomerApi.CustomerGroupList: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CustomerGroupListWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // customer.group.list
    ApiResponse<ModelResponseCustomerGroupList> response = apiInstance.CustomerGroupListWithHttpInfo(disableCache, pageCursor, start, count, storeId, langId, groupIds, varParams, exclude, responseFields);
    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 CustomerApi.CustomerGroupListWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
disableCache bool? Disable cache for current request [optional] [default to false]
pageCursor string? Used to retrieve entities via cursor-based pagination (it can't be used with any other filtering parameter) [optional]
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]
storeId string? Store Id [optional]
langId string? Language id [optional]
groupIds string? Groups that will be assigned to a customer [optional]
varParams string? Set this parameter in order to choose which entity fields you want to retrieve [optional] [default to "id,name,additional_fields"]
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]
responseFields string? Set this parameter in order to choose which entity fields you want to retrieve [optional]

Return type

ModelResponseCustomerGroupList

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CustomerInfo

CustomerInfo200Response CustomerInfo (string id, string? varParams = null, string? responseFields = null, string? exclude = null, string? storeId = null)

customer.info

Get customers' details from store.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CustomerInfoExample
    {
        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 CustomerApi(config);
            var id = 10;  // string | Retrieves customer's info specified by customer id
            var varParams = id,email;  // string? | Set this parameter in order to choose which entity fields you want to retrieve (optional)  (default to "id,email,first_name,last_name")
            var responseFields = {result{id,parent_id,sku,upc,images,combination}};  // string? | Set this parameter in order to choose which entity fields you want to retrieve (optional) 
            var exclude = id,email;  // string? | Set this parameter in order to choose which entity fields you want to ignore. Works only if parameter `params` equal force_all (optional) 
            var storeId = 1;  // string? | Retrieves customer info specified by store id (optional) 

            try
            {
                // customer.info
                CustomerInfo200Response result = apiInstance.CustomerInfo(id, varParams, responseFields, exclude, storeId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CustomerApi.CustomerInfo: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CustomerInfoWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // customer.info
    ApiResponse<CustomerInfo200Response> response = apiInstance.CustomerInfoWithHttpInfo(id, varParams, responseFields, exclude, storeId);
    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 CustomerApi.CustomerInfoWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id string Retrieves customer's info specified by customer id
varParams string? Set this parameter in order to choose which entity fields you want to retrieve [optional] [default to "id,email,first_name,last_name"]
responseFields string? Set this parameter in order to choose which entity fields you want to retrieve [optional]
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]
storeId string? Retrieves customer info specified by store id [optional]

Return type

CustomerInfo200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CustomerList

ModelResponseCustomerList CustomerList (string? pageCursor = null, int? start = null, int? count = null, string? createdFrom = null, string? createdTo = null, string? modifiedFrom = null, string? modifiedTo = null, string? varParams = null, string? responseFields = null, string? exclude = null, string? groupId = null, string? storeId = null, string? customerListId = null, bool? avail = null, string? findValue = null, string? findWhere = null, string? sortBy = null, string? sortDirection = null, string? ids = null, string? sinceId = null)

customer.list

Get list of customers from store.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CustomerListExample
    {
        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 CustomerApi(config);
            var pageCursor = ;  // string? | Used to retrieve entities via cursor-based pagination (it can't be used with any other filtering parameter) (optional) 
            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 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 varParams = id,email;  // string? | Set this parameter in order to choose which entity fields you want to retrieve (optional)  (default to "id,email,first_name,last_name")
            var responseFields = {result{customer}};  // string? | Set this parameter in order to choose which entity fields you want to retrieve (optional) 
            var exclude = id,email;  // string? | Set this parameter in order to choose which entity fields you want to ignore. Works only if parameter `params` equal force_all (optional) 
            var groupId = 3;  // string? | Customer group_id (optional) 
            var storeId = 1;  // string? | Retrieves customers specified by store id (optional) 
            var customerListId = exampleListId;  // string? | The numeric ID of the customer list in Demandware. (optional) 
            var avail = false;  // bool? | Defines category's visibility status (optional)  (default to true)
            var findValue = mail@gmail.com;  // string? | Entity search that is specified by some value (optional) 
            var findWhere = email;  // string? | Customer search that is specified by field (optional) 
            var sortBy = value_id;  // string? | Set field to sort by (optional)  (default to "created_time")
            var sortDirection = asc;  // string? | Set sorting direction (optional)  (default to "asc")
            var ids = 24,25;  // string? | Retrieves customers specified by ids (optional) 
            var sinceId = 56;  // string? | Retrieve entities starting from the specified id. (optional) 

            try
            {
                // customer.list
                ModelResponseCustomerList result = apiInstance.CustomerList(pageCursor, start, count, createdFrom, createdTo, modifiedFrom, modifiedTo, varParams, responseFields, exclude, groupId, storeId, customerListId, avail, findValue, findWhere, sortBy, sortDirection, ids, sinceId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CustomerApi.CustomerList: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CustomerListWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // customer.list
    ApiResponse<ModelResponseCustomerList> response = apiInstance.CustomerListWithHttpInfo(pageCursor, start, count, createdFrom, createdTo, modifiedFrom, modifiedTo, varParams, responseFields, exclude, groupId, storeId, customerListId, avail, findValue, findWhere, sortBy, sortDirection, ids, sinceId);
    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 CustomerApi.CustomerListWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
pageCursor string? Used to retrieve entities via cursor-based pagination (it can't be used with any other filtering parameter) [optional]
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]
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]
varParams string? Set this parameter in order to choose which entity fields you want to retrieve [optional] [default to "id,email,first_name,last_name"]
responseFields string? Set this parameter in order to choose which entity fields you want to retrieve [optional]
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]
groupId string? Customer group_id [optional]
storeId string? Retrieves customers specified by store id [optional]
customerListId string? The numeric ID of the customer list in Demandware. [optional]
avail bool? Defines category's visibility status [optional] [default to true]
findValue string? Entity search that is specified by some value [optional]
findWhere string? Customer search that is specified by field [optional]
sortBy string? Set field to sort by [optional] [default to "created_time"]
sortDirection string? Set sorting direction [optional] [default to "asc"]
ids string? Retrieves customers specified by ids [optional]
sinceId string? Retrieve entities starting from the specified id. [optional]

Return type

ModelResponseCustomerList

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CustomerUpdate

AccountConfigUpdate200Response CustomerUpdate (CustomerUpdate customerUpdate)

customer.update

Update information of customer in store.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CustomerUpdateExample
    {
        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 CustomerApi(config);
            var customerUpdate = new CustomerUpdate(); // CustomerUpdate | 

            try
            {
                // customer.update
                AccountConfigUpdate200Response result = apiInstance.CustomerUpdate(customerUpdate);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CustomerApi.CustomerUpdate: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CustomerUpdateWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // customer.update
    ApiResponse<AccountConfigUpdate200Response> response = apiInstance.CustomerUpdateWithHttpInfo(customerUpdate);
    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 CustomerApi.CustomerUpdateWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
customerUpdate CustomerUpdate

Return type

AccountConfigUpdate200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CustomerWishlistList

ModelResponseCustomerWishlistList CustomerWishlistList (string customerId, string? id = null, string? storeId = null, int? start = null, int? count = null, string? pageCursor = null, string? responseFields = null)

customer.wishlist.list

Get a Wish List of customer from the store.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CustomerWishlistListExample
    {
        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 CustomerApi(config);
            var customerId = 5;  // string | Retrieves orders specified by customer id
            var id = 10;  // string? | Entity id (optional) 
            var storeId = 1;  // string? | Store Id (optional) 
            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 responseFields = {return_code,return_message,pagination,result};  // string? | Set this parameter in order to choose which entity fields you want to retrieve (optional)  (default to "{return_code,return_message,pagination,result}")

            try
            {
                // customer.wishlist.list
                ModelResponseCustomerWishlistList result = apiInstance.CustomerWishlistList(customerId, id, storeId, start, count, pageCursor, responseFields);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CustomerApi.CustomerWishlistList: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CustomerWishlistListWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // customer.wishlist.list
    ApiResponse<ModelResponseCustomerWishlistList> response = apiInstance.CustomerWishlistListWithHttpInfo(customerId, id, storeId, start, count, pageCursor, responseFields);
    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 CustomerApi.CustomerWishlistListWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
customerId string Retrieves orders specified by customer id
id string? Entity id [optional]
storeId string? Store Id [optional]
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]
responseFields string? Set this parameter in order to choose which entity fields you want to retrieve [optional] [default to "{return_code,return_message,pagination,result}"]

Return type

ModelResponseCustomerWishlistList

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]