Skip to content

Latest commit

 

History

History
1276 lines (891 loc) · 52.7 KB

CustomerApi.md

File metadata and controls

1276 lines (891 loc) · 52.7 KB

ultracart\v2\CustomerApi

All URIs are relative to https://secure.ultracart.com/rest/v2

Method HTTP request Description
addCustomerStoreCredit POST /customer/customers/{customer_profile_oid}/store_credit Adds store credit to a customer
adjustInternalCertificate POST /customer/customers/{customer_profile_oid}/adjust_cashback_balance Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
deleteCustomer DELETE /customer/customers/{customer_profile_oid} Delete a customer
deleteWishListItem DELETE /customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid} Delete a customer wishlist item
getCustomer GET /customer/customers/{customer_profile_oid} Retrieve a customer
getCustomerByEmail GET /customer/customers/by_email/{email} Retrieve a customer by Email
getCustomerEditorValues GET /customer/editor_values Retrieve values needed for a customer profile editor
getCustomerEmailLists GET /customer/email_lists Retrieve all email lists across all storefronts
getCustomerStoreCredit GET /customer/customers/{customer_profile_oid}/store_credit Retrieve the customer store credit accumulated through loyalty programs
getCustomerWishList GET /customer/customers/{customer_profile_oid}/wishlist Retrieve wishlist items for customer
getCustomerWishListItem GET /customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid} Retrieve wishlist item for customer
getCustomers GET /customer/customers Retrieve customers
getCustomersByQuery POST /customer/customers/query Retrieve customers by query
getCustomersForDataTables POST /customer/customers/dataTables Retrieve customers for DataTables plugin
getEmailVerificationToken POST /customer/customers/email_verify/get_token Create a token that can be used to verify a customer email address
getMagicLink PUT /customer/customers/{customer_profile_oid}/magic_link/{storefront_host_name} getMagicLink
insertCustomer POST /customer/customers Insert a customer
insertWishListItem POST /customer/customers/{customer_profile_oid}/wishlist Insert a customer wishlist item
mergeCustomer PUT /customer/customers/{customer_profile_oid}/merge Merge customer into this customer
searchCustomerProfileValues POST /customer/search Searches for all matching values (using POST)
updateCustomer PUT /customer/customers/{customer_profile_oid} Update a customer
updateCustomerEmailLists POST /customer/customers/{customer_profile_oid}/email_lists Update email list subscriptions for a customer
updateWishListItem PUT /customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid} Update a customer wishlist item
validateEmailVerificationToken POST /customer/customers/email_verify/validate_token Validate a token that can be used to verify a customer email address

addCustomerStoreCredit

\ultracart\v2\models\BaseResponse addCustomerStoreCredit($customer_profile_oid, $store_credit_request)

Adds store credit to a customer

Adds store credit to a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer_profile_oid = 56; // int | The customer oid to credit.
$store_credit_request = new \ultracart\v2\models\CustomerStoreCreditAddRequest(); // \ultracart\v2\models\CustomerStoreCreditAddRequest | Store credit to add

try {
    $result = $apiInstance->addCustomerStoreCredit($customer_profile_oid, $store_credit_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->addCustomerStoreCredit: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_profile_oid int The customer oid to credit.
store_credit_request \ultracart\v2\models\CustomerStoreCreditAddRequest Store credit to add

Return type

\ultracart\v2\models\BaseResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

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

adjustInternalCertificate

\ultracart\v2\models\AdjustInternalCertificateResponse adjustInternalCertificate($customer_profile_oid, $adjust_internal_certificate_request)

Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.

Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer_profile_oid = 56; // int | The customer profile oid
$adjust_internal_certificate_request = new \ultracart\v2\models\AdjustInternalCertificateRequest(); // \ultracart\v2\models\AdjustInternalCertificateRequest | adjustInternalCertificateRequest

try {
    $result = $apiInstance->adjustInternalCertificate($customer_profile_oid, $adjust_internal_certificate_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->adjustInternalCertificate: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_profile_oid int The customer profile oid
adjust_internal_certificate_request \ultracart\v2\models\AdjustInternalCertificateRequest adjustInternalCertificateRequest

Return type

\ultracart\v2\models\AdjustInternalCertificateResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

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

deleteCustomer

deleteCustomer($customer_profile_oid)

Delete a customer

Delete a customer on the UltraCart account.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer_profile_oid = 56; // int | The customer_profile_oid to delete.

try {
    $apiInstance->deleteCustomer($customer_profile_oid);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->deleteCustomer: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_profile_oid int The customer_profile_oid to delete.

Return type

void (empty response body)

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

deleteWishListItem

\ultracart\v2\models\CustomerWishListItem deleteWishListItem($customer_profile_oid, $customer_wishlist_item_oid)

Delete a customer wishlist item

Delete a customer wishlist item

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer_profile_oid = 56; // int | The customer oid for this wishlist.
$customer_wishlist_item_oid = 56; // int | The wishlist oid for this wishlist item to delete.

try {
    $result = $apiInstance->deleteWishListItem($customer_profile_oid, $customer_wishlist_item_oid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->deleteWishListItem: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_profile_oid int The customer oid for this wishlist.
customer_wishlist_item_oid int The wishlist oid for this wishlist item to delete.

Return type

\ultracart\v2\models\CustomerWishListItem

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

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

getCustomer

\ultracart\v2\models\CustomerResponse getCustomer($customer_profile_oid, $_expand)

Retrieve a customer

Retrieves a single customer using the specified customer profile oid.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer_profile_oid = 56; // int | The customer oid to retrieve.
$_expand = "_expand_example"; // string | The object expansion to perform on the result.  See documentation for examples

try {
    $result = $apiInstance->getCustomer($customer_profile_oid, $_expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCustomer: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_profile_oid int The customer oid to retrieve.
_expand string The object expansion to perform on the result. See documentation for examples [optional]

Return type

\ultracart\v2\models\CustomerResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

getCustomerByEmail

\ultracart\v2\models\CustomerResponse getCustomerByEmail($email, $_expand)

Retrieve a customer by Email

Retrieves a single customer using the specified customer email address.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$email = "email_example"; // string | The email address of the customer to retrieve.
$_expand = "_expand_example"; // string | The object expansion to perform on the result.  See documentation for examples

try {
    $result = $apiInstance->getCustomerByEmail($email, $_expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCustomerByEmail: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
email string The email address of the customer to retrieve.
_expand string The object expansion to perform on the result. See documentation for examples [optional]

Return type

\ultracart\v2\models\CustomerResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

getCustomerEditorValues

\ultracart\v2\models\CustomerEditorValues getCustomerEditorValues()

Retrieve values needed for a customer profile editor

Retrieve values needed for a customer profile editor.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);


try {
    $result = $apiInstance->getCustomerEditorValues();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCustomerEditorValues: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\ultracart\v2\models\CustomerEditorValues

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

getCustomerEmailLists

\ultracart\v2\models\EmailListsResponse getCustomerEmailLists()

Retrieve all email lists across all storefronts

Retrieve all email lists across all storefronts

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);


try {
    $result = $apiInstance->getCustomerEmailLists();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCustomerEmailLists: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\ultracart\v2\models\EmailListsResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

getCustomerStoreCredit

\ultracart\v2\models\CustomerStoreCreditResponse getCustomerStoreCredit($customer_profile_oid)

Retrieve the customer store credit accumulated through loyalty programs

Retrieve the customer store credit accumulated through loyalty programs

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer_profile_oid = 56; // int | The customer oid to retrieve.

try {
    $result = $apiInstance->getCustomerStoreCredit($customer_profile_oid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCustomerStoreCredit: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_profile_oid int The customer oid to retrieve.

Return type

\ultracart\v2\models\CustomerStoreCreditResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

getCustomerWishList

\ultracart\v2\models\CustomerWishListItemsResponse getCustomerWishList($customer_profile_oid)

Retrieve wishlist items for customer

Retrieve wishlist items for customer.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer_profile_oid = 56; // int | The customer oid for this wishlist.

try {
    $result = $apiInstance->getCustomerWishList($customer_profile_oid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCustomerWishList: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_profile_oid int The customer oid for this wishlist.

Return type

\ultracart\v2\models\CustomerWishListItemsResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

getCustomerWishListItem

\ultracart\v2\models\CustomerWishListItemResponse getCustomerWishListItem($customer_profile_oid, $customer_wishlist_item_oid)

Retrieve wishlist item for customer

Retrieve wishlist item for customer.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer_profile_oid = 56; // int | The customer oid for this wishlist.
$customer_wishlist_item_oid = 56; // int | The wishlist oid for this wishlist item.

try {
    $result = $apiInstance->getCustomerWishListItem($customer_profile_oid, $customer_wishlist_item_oid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCustomerWishListItem: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_profile_oid int The customer oid for this wishlist.
customer_wishlist_item_oid int The wishlist oid for this wishlist item.

Return type

\ultracart\v2\models\CustomerWishListItemResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

getCustomers

\ultracart\v2\models\CustomersResponse getCustomers($email, $qb_class, $quickbooks_code, $last_modified_dts_start, $last_modified_dts_end, $signup_dts_start, $signup_dts_end, $billing_first_name, $billing_last_name, $billing_company, $billing_city, $billing_state, $billing_postal_code, $billing_country_code, $billing_day_phone, $billing_evening_phone, $shipping_first_name, $shipping_last_name, $shipping_company, $shipping_city, $shipping_state, $shipping_postal_code, $shipping_country_code, $shipping_day_phone, $shipping_evening_phone, $pricing_tier_oid, $pricing_tier_name, $_limit, $_offset, $_since, $_sort, $_expand)

Retrieve customers

Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$email = "email_example"; // string | Email
$qb_class = "qb_class_example"; // string | Quickbooks class
$quickbooks_code = "quickbooks_code_example"; // string | Quickbooks code
$last_modified_dts_start = "last_modified_dts_start_example"; // string | Last modified date start
$last_modified_dts_end = "last_modified_dts_end_example"; // string | Last modified date end
$signup_dts_start = "signup_dts_start_example"; // string | Signup date start
$signup_dts_end = "signup_dts_end_example"; // string | Signup date end
$billing_first_name = "billing_first_name_example"; // string | Billing first name
$billing_last_name = "billing_last_name_example"; // string | Billing last name
$billing_company = "billing_company_example"; // string | Billing company
$billing_city = "billing_city_example"; // string | Billing city
$billing_state = "billing_state_example"; // string | Billing state
$billing_postal_code = "billing_postal_code_example"; // string | Billing postal code
$billing_country_code = "billing_country_code_example"; // string | Billing country code
$billing_day_phone = "billing_day_phone_example"; // string | Billing day phone
$billing_evening_phone = "billing_evening_phone_example"; // string | Billing evening phone
$shipping_first_name = "shipping_first_name_example"; // string | Shipping first name
$shipping_last_name = "shipping_last_name_example"; // string | Shipping last name
$shipping_company = "shipping_company_example"; // string | Shipping company
$shipping_city = "shipping_city_example"; // string | Shipping city
$shipping_state = "shipping_state_example"; // string | Shipping state
$shipping_postal_code = "shipping_postal_code_example"; // string | Shipping postal code
$shipping_country_code = "shipping_country_code_example"; // string | Shipping country code
$shipping_day_phone = "shipping_day_phone_example"; // string | Shipping day phone
$shipping_evening_phone = "shipping_evening_phone_example"; // string | Shipping evening phone
$pricing_tier_oid = 56; // int | Pricing tier oid
$pricing_tier_name = "pricing_tier_name_example"; // string | Pricing tier name
$_limit = 100; // int | The maximum number of records to return on this one API call. (Max 200)
$_offset = 0; // int | Pagination of the record set.  Offset is a zero based index.
$_since = "_since_example"; // string | Fetch customers that have been created/modified since this date/time.
$_sort = "_sort_example"; // string | The sort order of the customers.  See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
$_expand = "_expand_example"; // string | The object expansion to perform on the result.  See documentation for examples

try {
    $result = $apiInstance->getCustomers($email, $qb_class, $quickbooks_code, $last_modified_dts_start, $last_modified_dts_end, $signup_dts_start, $signup_dts_end, $billing_first_name, $billing_last_name, $billing_company, $billing_city, $billing_state, $billing_postal_code, $billing_country_code, $billing_day_phone, $billing_evening_phone, $shipping_first_name, $shipping_last_name, $shipping_company, $shipping_city, $shipping_state, $shipping_postal_code, $shipping_country_code, $shipping_day_phone, $shipping_evening_phone, $pricing_tier_oid, $pricing_tier_name, $_limit, $_offset, $_since, $_sort, $_expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCustomers: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
email string Email [optional]
qb_class string Quickbooks class [optional]
quickbooks_code string Quickbooks code [optional]
last_modified_dts_start string Last modified date start [optional]
last_modified_dts_end string Last modified date end [optional]
signup_dts_start string Signup date start [optional]
signup_dts_end string Signup date end [optional]
billing_first_name string Billing first name [optional]
billing_last_name string Billing last name [optional]
billing_company string Billing company [optional]
billing_city string Billing city [optional]
billing_state string Billing state [optional]
billing_postal_code string Billing postal code [optional]
billing_country_code string Billing country code [optional]
billing_day_phone string Billing day phone [optional]
billing_evening_phone string Billing evening phone [optional]
shipping_first_name string Shipping first name [optional]
shipping_last_name string Shipping last name [optional]
shipping_company string Shipping company [optional]
shipping_city string Shipping city [optional]
shipping_state string Shipping state [optional]
shipping_postal_code string Shipping postal code [optional]
shipping_country_code string Shipping country code [optional]
shipping_day_phone string Shipping day phone [optional]
shipping_evening_phone string Shipping evening phone [optional]
pricing_tier_oid int Pricing tier oid [optional]
pricing_tier_name string Pricing tier name [optional]
_limit int The maximum number of records to return on this one API call. (Max 200) [optional] [default to 100]
_offset int Pagination of the record set. Offset is a zero based index. [optional] [default to 0]
_since string Fetch customers that have been created/modified since this date/time. [optional]
_sort string The sort order of the customers. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. [optional]
_expand string The object expansion to perform on the result. See documentation for examples [optional]

Return type

\ultracart\v2\models\CustomersResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

getCustomersByQuery

\ultracart\v2\models\CustomersResponse getCustomersByQuery($customer_query, $_limit, $_offset, $_since, $_sort, $_expand)

Retrieve customers by query

Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer_query = new \ultracart\v2\models\CustomerQuery(); // \ultracart\v2\models\CustomerQuery | Customer query
$_limit = 100; // int | The maximum number of records to return on this one API call. (Max 200)
$_offset = 0; // int | Pagination of the record set.  Offset is a zero based index.
$_since = "_since_example"; // string | Fetch customers that have been created/modified since this date/time.
$_sort = "_sort_example"; // string | The sort order of the customers.  See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
$_expand = "_expand_example"; // string | The object expansion to perform on the result.  See documentation for examples

try {
    $result = $apiInstance->getCustomersByQuery($customer_query, $_limit, $_offset, $_since, $_sort, $_expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCustomersByQuery: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_query \ultracart\v2\models\CustomerQuery Customer query
_limit int The maximum number of records to return on this one API call. (Max 200) [optional] [default to 100]
_offset int Pagination of the record set. Offset is a zero based index. [optional] [default to 0]
_since string Fetch customers that have been created/modified since this date/time. [optional]
_sort string The sort order of the customers. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. [optional]
_expand string The object expansion to perform on the result. See documentation for examples [optional]

Return type

\ultracart\v2\models\CustomersResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

getCustomersForDataTables

\ultracart\v2\models\DataTablesServerSideResponse getCustomersForDataTables($_expand)

Retrieve customers for DataTables plugin

Retrieves customers from the account. If no searches are specified, all customers will be returned.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$_expand = "_expand_example"; // string | The object expansion to perform on the result.  See documentation for examples

try {
    $result = $apiInstance->getCustomersForDataTables($_expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getCustomersForDataTables: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
_expand string The object expansion to perform on the result. See documentation for examples [optional]

Return type

\ultracart\v2\models\DataTablesServerSideResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

getEmailVerificationToken

\ultracart\v2\models\EmailVerifyTokenResponse getEmailVerificationToken($token_request)

Create a token that can be used to verify a customer email address

Create a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$token_request = new \ultracart\v2\models\EmailVerifyTokenRequest(); // \ultracart\v2\models\EmailVerifyTokenRequest | Token request

try {
    $result = $apiInstance->getEmailVerificationToken($token_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getEmailVerificationToken: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
token_request \ultracart\v2\models\EmailVerifyTokenRequest Token request

Return type

\ultracart\v2\models\EmailVerifyTokenResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

getMagicLink

\ultracart\v2\models\CustomerMagicLinkResponse getMagicLink($customer_profile_oid, $storefront_host_name)

getMagicLink

Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer_profile_oid = 56; // int | The customer_profile_oid of the customer.
$storefront_host_name = "storefront_host_name_example"; // string | The storefront to log into.

try {
    $result = $apiInstance->getMagicLink($customer_profile_oid, $storefront_host_name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->getMagicLink: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_profile_oid int The customer_profile_oid of the customer.
storefront_host_name string The storefront to log into.

Return type

\ultracart\v2\models\CustomerMagicLinkResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

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

insertCustomer

\ultracart\v2\models\CustomerResponse insertCustomer($customer, $_expand)

Insert a customer

Insert a customer on the UltraCart account.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer = new \ultracart\v2\models\Customer(); // \ultracart\v2\models\Customer | Customer to insert
$_expand = "_expand_example"; // string | The object expansion to perform on the result.  See documentation for examples

try {
    $result = $apiInstance->insertCustomer($customer, $_expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->insertCustomer: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer \ultracart\v2\models\Customer Customer to insert
_expand string The object expansion to perform on the result. See documentation for examples [optional]

Return type

\ultracart\v2\models\CustomerResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

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

insertWishListItem

\ultracart\v2\models\CustomerWishListItem insertWishListItem($wishlist_item, $customer_profile_oid)

Insert a customer wishlist item

Insert a customer wishlist item

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$wishlist_item = new \ultracart\v2\models\CustomerWishListItem(); // \ultracart\v2\models\CustomerWishListItem | Wishlist item to insert
$customer_profile_oid = 56; // int | The customer oid for this wishlist.

try {
    $result = $apiInstance->insertWishListItem($wishlist_item, $customer_profile_oid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->insertWishListItem: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
wishlist_item \ultracart\v2\models\CustomerWishListItem Wishlist item to insert
customer_profile_oid int The customer oid for this wishlist.

Return type

\ultracart\v2\models\CustomerWishListItem

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

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

mergeCustomer

mergeCustomer($customer, $customer_profile_oid, $_expand)

Merge customer into this customer

Merge customer into this customer.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer = new \ultracart\v2\models\CustomerMergeRequest(); // \ultracart\v2\models\CustomerMergeRequest | Customer to merge into this profile.
$customer_profile_oid = 56; // int | The customer_profile_oid to update.
$_expand = "_expand_example"; // string | The object expansion to perform on the result.  See documentation for examples

try {
    $apiInstance->mergeCustomer($customer, $customer_profile_oid, $_expand);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->mergeCustomer: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer \ultracart\v2\models\CustomerMergeRequest Customer to merge into this profile.
customer_profile_oid int The customer_profile_oid to update.
_expand string The object expansion to perform on the result. See documentation for examples [optional]

Return type

void (empty response body)

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

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

searchCustomerProfileValues

\ultracart\v2\models\LookupResponse searchCustomerProfileValues($lookup_request)

Searches for all matching values (using POST)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$lookup_request = new \ultracart\v2\models\LookupRequest(); // \ultracart\v2\models\LookupRequest | LookupRequest

try {
    $result = $apiInstance->searchCustomerProfileValues($lookup_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->searchCustomerProfileValues: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
lookup_request \ultracart\v2\models\LookupRequest LookupRequest

Return type

\ultracart\v2\models\LookupResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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

updateCustomer

\ultracart\v2\models\CustomerResponse updateCustomer($customer, $customer_profile_oid, $_expand)

Update a customer

Update a customer on the UltraCart account.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer = new \ultracart\v2\models\Customer(); // \ultracart\v2\models\Customer | Customer to update
$customer_profile_oid = 56; // int | The customer_profile_oid to update.
$_expand = "_expand_example"; // string | The object expansion to perform on the result.  See documentation for examples

try {
    $result = $apiInstance->updateCustomer($customer, $customer_profile_oid, $_expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->updateCustomer: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer \ultracart\v2\models\Customer Customer to update
customer_profile_oid int The customer_profile_oid to update.
_expand string The object expansion to perform on the result. See documentation for examples [optional]

Return type

\ultracart\v2\models\CustomerResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

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

updateCustomerEmailLists

\ultracart\v2\models\CustomerEmailListChanges updateCustomerEmailLists($customer_profile_oid, $list_changes)

Update email list subscriptions for a customer

Update email list subscriptions for a customer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$customer_profile_oid = 56; // int | The customer profile oid
$list_changes = new \ultracart\v2\models\CustomerEmailListChanges(); // \ultracart\v2\models\CustomerEmailListChanges | List changes

try {
    $result = $apiInstance->updateCustomerEmailLists($customer_profile_oid, $list_changes);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->updateCustomerEmailLists: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
customer_profile_oid int The customer profile oid
list_changes \ultracart\v2\models\CustomerEmailListChanges List changes

Return type

\ultracart\v2\models\CustomerEmailListChanges

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

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

updateWishListItem

\ultracart\v2\models\CustomerWishListItem updateWishListItem($wishlist_item, $customer_profile_oid, $customer_wishlist_item_oid)

Update a customer wishlist item

Update a customer wishlist item

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$wishlist_item = new \ultracart\v2\models\CustomerWishListItem(); // \ultracart\v2\models\CustomerWishListItem | Wishlist item to update
$customer_profile_oid = 56; // int | The customer oid for this wishlist.
$customer_wishlist_item_oid = 56; // int | The wishlist oid for this wishlist item.

try {
    $result = $apiInstance->updateWishListItem($wishlist_item, $customer_profile_oid, $customer_wishlist_item_oid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->updateWishListItem: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
wishlist_item \ultracart\v2\models\CustomerWishListItem Wishlist item to update
customer_profile_oid int The customer oid for this wishlist.
customer_wishlist_item_oid int The wishlist oid for this wishlist item.

Return type

\ultracart\v2\models\CustomerWishListItem

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json; charset=UTF-8
  • Accept: application/json

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

validateEmailVerificationToken

\ultracart\v2\models\EmailVerifyTokenValidateResponse validateEmailVerificationToken($validation_request)

Validate a token that can be used to verify a customer email address

Validate a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$validation_request = new \ultracart\v2\models\EmailVerifyTokenValidateRequest(); // \ultracart\v2\models\EmailVerifyTokenValidateRequest | Token validation request

try {
    $result = $apiInstance->validateEmailVerificationToken($validation_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerApi->validateEmailVerificationToken: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
validation_request \ultracart\v2\models\EmailVerifyTokenValidateRequest Token validation request

Return type

\ultracart\v2\models\EmailVerifyTokenValidateResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

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

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