Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 

SwaggerClient-php

UltraCart REST API Version 2

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 2.0.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen For more information, please visit http://www.ultracart.com

Requirements

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/ultracart/rest_api_v2_sdk_php.git"
    }
  ],
  "require": {
    "ultracart/rest_api_v2_sdk_php": "*@dev",
    "guzzlehttp/guzzle": "~6.0"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/vendor/whatever_you_named_your_ultracart_sdk_directory/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?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\OrderApi::usingApiKey($simple_key);

// The UltraCart objects are large.  Very large.  So we have encapsulated the fields in sub objects allowing you to
// only request the sub objects you need.  This is done via the expansion object.   The API docs on the main web site
// have more details about expansions:  https://www.ultracart.com/api/#expansion.html
$_expand = "affiliate,affiliate.ledger,auto_order,billing,buysafe,channel_partner,checkout,coupon,customer_profile,digital_order,edi,fraud_score,gift,gift_certificate,internal,item,linked_shipment,marketing,payment,payment.transaction,quote,salesforce,shipping,summary,taxes"; // string | The object expansion to perform on the result.

// this is a detailed example that includes chunking to illustrate how to fetch large record sets from UltraCart.
$_limit = 100;
$counter = 1;
$order_query = new \ultracart\v2\models\OrderQuery();
// we are essentially setting the dates to 'forever' to get all records.
$order_query->setPaymentDateBegin("2010-01-01T00:00:00.0000000-05:00");
$order_query->setPaymentDateEnd("2021-01-01T00:00:00.0000000-05:00");
// there are multiple stages for order flow.  when doing analysis, you almost always want *only* completed orders.
$order_query->setCurrentStage(\ultracart\v2\models\OrderQuery::CURRENT_STAGE_COMPLETED_ORDER);

$order_response = null;

echo "<html><body><pre>";
try {
    do {
        if ($order_response == null) {
            $order_response = $api_instance->getOrdersByQuery($order_query, $_limit, 0, null, $_expand);
        } else {
            $order_response = $api_instance->getOrdersByQuery($order_query, $_limit, $order_response->getMetadata()->getResultSet()->getNextOffset(), null, $_expand);
        }

        echo "order_response.Orders.length: " . sizeof($order_response->getOrders()) . "\n";
        // print out a line for each order *item*
        // notice, email is within the billing child object.
        foreach ($order_response->getOrders() as $order) {
            $order_id = $order->getOrderId();
            $email = $order->getBilling()->getEmail(); // notice the email is part of the billing sub object.
            foreach($order->getItems() as $item){
                echo $order_id . ',' . $email . ',' . $item->getMerchantItemId() . ',' . $item->getQuantity() . "\n";
            }
        }
    } while ($order_response->getMetadata()->getResultSet()->getMore());

} catch (Exception $e) {
    echo 'Exception when calling OrderApi->getOrdersByQuery: ', $e->getMessage(), PHP_EOL;
}
echo "</pre></body></html>";
?>

Automatic Retry (v3.0.62, January 2021)

Starting with 3.0.62, we have modified the standard SDK to include retry logic. This logic was handled to allow client code to automatically retry if it trips the server side rate limiter

Usage

Set the MaxRetyAfter (seconds) within the Configuration object. This is a failsafe to avoid having client code hang forever if the retry-after header returns a large number. If you don't mind your code waiting for an hour, then you may set the retry to 3600, etc.

ultracart\v2\Configuration::getDefaultConfiguration()->setMaxRetrySeconds(30);

This is the actual logic used to determine if a retry should be attempted:

try {
    $response = $this->client->send($request, $options);
} catch (RequestException $e) {

    // BEGIN Retry Logic
    if($e->getResponse()) {
        $retryAfter = 0;
        if (array_key_exists('Retry-After', $headers)) {
            $retryAfter = intval($headers['Retry-After'][0]);
        }

        if ($statusCode == 429 && $retry && $retryAfter > 0 && $retryAfter <= $this->config->getMaxRetrySeconds()) {
            sleep($retryAfter);
            return $this->getCustomersByQueryWithHttpInfoRetry(false, $customer_query, $_limit, $_offset, $_since, $_sort, $_expand);
        }
    }
    // End Retry Logic

    throw new ApiException(
        "[{$e->getCode()}] {$e->getMessage()}",
        $e->getCode(),
        $e->getResponse() ? $e->getResponse()->getHeaders() : null,
        $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
    );
}

Documentation for API Endpoints

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

Class Method HTTP request Description
AffiliateApi getClicksByQuery POST /affiliate/clicks/query Retrieve clicks
AffiliateApi getLedgersByQuery POST /affiliate/ledgers/query Retrieve ledger entries
AutoOrderApi getAutoOrder GET /auto_order/auto_orders/{auto_order_oid} Retrieve an auto order by oid
AutoOrderApi getAutoOrderByCode GET /auto_order/auto_orders/code/{auto_order_code} Retrieve an auto order by code
AutoOrderApi getAutoOrderByReferenceOrderId GET /auto_order/auto_orders/reference_order_id/{reference_order_id} Retrieve an auto order by order id
AutoOrderApi getAutoOrders GET /auto_order/auto_orders Retrieve auto orders
AutoOrderApi getAutoOrdersBatch POST /auto_order/auto_orders/batch Retrieve auto order batch
AutoOrderApi getAutoOrdersByQuery POST /auto_order/auto_orders/query Retrieve auto orders by query
AutoOrderApi updateAutoOrder PUT /auto_order/auto_orders/{auto_order_oid} Update an auto order
AutoOrderApi updateAutoOrdersBatch PUT /auto_order/auto_orders/batch Update multiple auto orders
ChargebackApi deleteChargeback DELETE /chargeback/chargebacks/{chargeback_dispute_oid} Delete a chargeback
ChargebackApi getChargebackDispute GET /chargeback/chargebacks/{chargeback_dispute_oid} Retrieve a chargeback
ChargebackApi getChargebackDisputes GET /chargeback/chargebacks Retrieve chargebacks
ChargebackApi insertChargeback POST /chargeback/chargebacks Insert a chargeback
ChargebackApi updateChargeback PUT /chargeback/chargebacks/{chargeback_dispute_oid} Update a chargeback
CheckoutApi cityState POST /checkout/city_state City/State for Zip
CheckoutApi finalizeOrder POST /checkout/cart/finalizeOrder Finalize Order
CheckoutApi getAffirmCheckout GET /checkout/cart/{cart_id}/affirmCheckout Get affirm checkout (by cart id)
CheckoutApi getAllowedCountries POST /checkout/allowedCountries Allowed countries
CheckoutApi getCart GET /checkout/cart Get cart
CheckoutApi getCartByCartId GET /checkout/cart/{cart_id} Get cart (by cart id)
CheckoutApi getCartByReturnCode GET /checkout/return/{return_code} Get cart (by return code)
CheckoutApi getCartByReturnToken GET /checkout/return_token Get cart (by return token)
CheckoutApi getStateProvincesForCountry POST /checkout/stateProvincesForCountry/{country_code} Get state/province list for a country code
CheckoutApi handoffCart POST /checkout/cart/handoff Handoff cart
CheckoutApi login POST /checkout/cart/profile/login Profile login
CheckoutApi logout POST /checkout/cart/profile/logout Profile logout
CheckoutApi register POST /checkout/cart/profile/register Profile registration
CheckoutApi registerAffiliateClick POST /checkout/affiliateClick/register Register affiliate click
CheckoutApi relatedItemsForCart POST /checkout/related_items Related items
CheckoutApi relatedItemsForItem POST /checkout/relatedItems/{item_id} Related items (specific item)
CheckoutApi setupBrowserKey PUT /checkout/browser_key Setup Browser Application
CheckoutApi updateCart PUT /checkout/cart Update cart
CheckoutApi validateCart POST /checkout/cart/validate Validate
CouponApi deleteCoupon DELETE /coupon/coupons/{coupon_oid} Delete a coupon
CouponApi deleteCouponsByCode DELETE /coupon/coupons/by_code Deletes multiple coupons
CouponApi deleteCouponsByOid DELETE /coupon/coupons/by_oid Deletes multiple coupons
CouponApi doesCouponCodeExist GET /coupon/coupons/merchant_code/{merchant_code}/exists Determines if a coupon merchant code already exists
CouponApi generateCouponCodes POST /coupon/coupons/{coupon_oid}/generate_codes Generates one time codes for a coupon
CouponApi generateOneTimeCodesByMerchantCode POST /coupon/coupons/merchant_code/{merchant_code}/generate_codes Generates one time codes by merchant code
CouponApi getAutoApply GET /coupon/auto_apply Retrieve auto apply rules and conditions
CouponApi getCoupon GET /coupon/coupons/{coupon_oid} Retrieve a coupon
CouponApi getCouponByMerchantCode GET /coupon/coupons/merchant_code/{merchant_code} Retrieve a coupon by merchant code
CouponApi getCoupons GET /coupon/coupons Retrieve coupons
CouponApi getCouponsByQuery GET /coupon/coupons/query Retrieve coupons by query
CouponApi getEditorValues GET /coupon/editor_values Retrieve values needed for a coupon editor
CouponApi insertCoupon POST /coupon/coupons Insert a coupon
CouponApi insertCoupons POST /coupon/coupons/batch Insert multiple coupons
CouponApi searchItems GET /coupon/searchItems Searches for items to display within a coupon editor and assign to coupons
CouponApi updateAutoApply POST /coupon/auto_apply Update auto apply rules and conditions
CouponApi updateCoupon PUT /coupon/coupons/{coupon_oid} Update a coupon
CouponApi updateCoupons PUT /coupon/coupons/batch Update multiple coupons
CouponApi uploadCouponCodes POST /coupon/coupons/{coupon_oid}/upload_codes Upload one-time codes for a coupon
CustomerApi deleteCustomer DELETE /customer/customers/{customer_profile_oid} Delete a customer
CustomerApi getCustomer GET /customer/customers/{customer_profile_oid} Retrieve a customer
CustomerApi getCustomerByEmail GET /customer/customers/by_email/{email} Retrieve a customer by Email
CustomerApi getCustomers GET /customer/customers Retrieve customers
CustomerApi getCustomersByQuery POST /customer/customers/query Retrieve customers by query
CustomerApi getCustomersForDataTables POST /customer/customers/dataTables Retrieve customers for DataTables plugin
CustomerApi getEditorValues GET /customer/editor_values Retrieve values needed for a customer profile editor
CustomerApi getEmailLists GET /customer/email_lists Retrieve all email lists across all storefronts
CustomerApi getEmailVerificationToken POST /customer/customers/email_verify/get_token Create a token that can be used to verify a customer email address
CustomerApi insertCustomer POST /customer/customers Insert a customer
CustomerApi updateCustomer PUT /customer/customers/{customer_profile_oid} Update a customer
CustomerApi updateCustomerEmailLists POST /customer/customers/{customer_profile_oid}/email_lists Update email list subscriptions for a customer
CustomerApi validateEmailVerificationToken POST /customer/customers/email_verify/validate_token Validate a token that can be used to verify a customer email address
FulfillmentApi acknowledgeOrders PUT /fulfillment/distribution_centers/{distribution_center_code}/acknowledgements Acknowledge receipt of orders.
FulfillmentApi getDistributionCenterOrders GET /fulfillment/distribution_centers/{distribution_center_code}/orders Retrieve orders queued up for this distribution center.
FulfillmentApi getDistributionCenters GET /fulfillment/distribution_centers Retrieve distribution centers
FulfillmentApi shipOrders POST /fulfillment/distribution_centers/{distribution_center_code}/shipments Mark orders as shipped
FulfillmentApi updateInventory POST /fulfillment/distribution_centers/{distribution_center_code}/inventory Update inventory
ItemApi deleteItem DELETE /item/items/{merchant_item_oid} Delete an item
ItemApi getItem GET /item/items/{merchant_item_oid} Retrieve an item
ItemApi getItemByMerchantItemId GET /item/items/merchant_item_id/{merchant_item_id} Retrieve an item by item id
ItemApi getItems GET /item/items Retrieve items
ItemApi getPricingTiers GET /item/pricing_tiers Retrieve pricing tiers
ItemApi insertItem POST /item/items Create an item
ItemApi updateItem PUT /item/items/{merchant_item_oid} Update an item
ItemApi updateItems PUT /item/items/batch Update multiple items
ItemApi uploadTemporaryMultimedia POST /item/temp_multimedia Upload an image to the temporary multimedia.
OauthApi oauthAccessToken POST /oauth/token Exchange authorization code for access token.
OauthApi oauthRevoke POST /oauth/revoke Revoke this OAuth application.
OrderApi adjustOrderTotal POST /order/orders/{order_id}/adjust_order_total/{desired_total} Adjusts an order total
OrderApi cancelOrder POST /order/orders/{order_id}/cancel Cancel an order
OrderApi deleteOrder DELETE /order/orders/{order_id} Delete an order
OrderApi format POST /order/orders/{order_id}/format Format order
OrderApi generateOrderToken GET /order/orders/token/{order_id} Generate an order token for a given order id
OrderApi getAccountsReceivableRetryConfig GET /order/accountsReceivableRetryConfig Retrieve A/R Retry Configuration
OrderApi getAccountsReceivableRetryStats GET /order/accountsReceivableRetryConfig/stats Retrieve A/R Retry Statistics
OrderApi getOrder GET /order/orders/{order_id} Retrieve an order
OrderApi getOrderByToken POST /order/orders/token Retrieve an order using a token
OrderApi getOrders GET /order/orders Retrieve orders
OrderApi getOrdersBatch POST /order/orders/batch Retrieve order batch
OrderApi getOrdersByQuery POST /order/orders/query Retrieve orders by query
OrderApi insertOrder POST /order/orders Insert an order
OrderApi processPayment POST /order/orders/{order_id}/process_payment Process payment
OrderApi refundOrder PUT /order/orders/{order_id}/refund Refund an order
OrderApi replacement POST /order/orders/{order_id}/replacement Replacement order
OrderApi resendReceipt POST /order/orders/{order_id}/resend_receipt Resend receipt
OrderApi resendShipmentConfirmation POST /order/orders/{order_id}/resend_shipment_confirmation Resend shipment confirmation
OrderApi updateAccountsReceivableRetryConfig POST /order/accountsReceivableRetryConfig Update A/R Retry Configuration
OrderApi updateOrder PUT /order/orders/{order_id} Update an order
StorefrontApi addToLibrary POST /storefront/code_library Add to library
StorefrontApi applyToStoreFront POST /storefront/code_library/apply Apply library item to storefront.
StorefrontApi archiveEmailList POST /storefront/{storefront_oid}/email/lists/{email_list_uuid}/archive Archive email list
StorefrontApi archiveEmailSegment POST /storefront/{storefront_oid}/email/segments/{email_segment_uuid}/archive Archive email segment
StorefrontApi backPopulateEmailFlow POST /storefront/{storefront_oid}/email/flows/{email_flow_uuid}/backfill Back populate email flow
StorefrontApi checkDownloadEmailSegment POST /storefront/{storefront_oid}/email/segments/{email_segment_uuid}/downloadPrepare/{email_segment_rebuild_uuid} Check download of email segment
StorefrontApi cloneEmailCampaign POST /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/clone Clone email campaign
StorefrontApi cloneEmailFlow POST /storefront/{storefront_oid}/email/flows/{email_flow_uuid}/clone Clone email flow
StorefrontApi createEmailSendingDomain POST /storefront/email/sending_domains/{domain}/create Create email campaign
StorefrontApi deleteEmailCampaignFolder DELETE /storefront/{storefront_oid}/email/campaign_folders/{email_campaign_folder_uuid} Delete email campaignFolder
StorefrontApi deleteEmailCommseqStat DELETE /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/stat Delete communication sequence stats
StorefrontApi deleteEmailEmail DELETE /storefront/{storefront_oid}/email/emails/{commseq_email_uuid} Delete email email
StorefrontApi deleteEmailFlowFolder DELETE /storefront/{storefront_oid}/email/flow_folders/{email_flow_folder_uuid} Delete email flowFolder
StorefrontApi deleteEmailListCustomer DELETE /storefront/{storefront_oid}/email/lists/{email_list_uuid}/customers/{email_customer_uuid} Delete email list customer
StorefrontApi deleteEmailPostcard DELETE /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid} Delete email postcard
StorefrontApi deleteEmailSendingDomain DELETE /storefront/email/sending_domains/{domain} delete email campaign
StorefrontApi deleteExperiment DELETE /storefront/{storefront_oid}/experiments/{storefront_experiment_oid} Delete experiment
StorefrontApi deleteLibraryItem DELETE /storefront/code_library/{library_item_oid} Delete library item
StorefrontApi deleteLibraryItemPublishedVersions DELETE /storefront/code_library/{library_item_oid}/published_versions Delete all published versions for a library item, including anything in review.
StorefrontApi deleteScreenRecordingSegment DELETE /storefront/{storefront_oid}/screen_recordings/segments/{screen_recording_segment_oid} Delete screen recording segment
StorefrontApi duplicateLibraryItem POST /storefront/code_library/{library_item_oid}/duplicate Duplicate library item.
StorefrontApi favoriteScreenRecording POST /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/favorite Update favorite flag on screen recording
StorefrontApi geocodeAddress POST /storefront/{storefront_oid}/email/geocode Obtain lat/long for an address
StorefrontApi getCountries GET /storefront/{storefront_oid}/email/countries Get countries
StorefrontApi getEditorToken GET /storefront/{storefront_oid}/editor_token Gets editor token
StorefrontApi getEmailBaseTemplates GET /storefront/{storefront_oid}/email/baseTemplates Get email communication base templates
StorefrontApi getEmailCampaign GET /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid} Get email campaign
StorefrontApi getEmailCampaignFolder GET /storefront/{storefront_oid}/email/campaign_folders/{email_campaign_folder_uuid} Get email campaign folder
StorefrontApi getEmailCampaignFolders GET /storefront/{storefront_oid}/email/campaign_folders Get email campaign folders
StorefrontApi getEmailCampaignScreenshots GET /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/screenshots Get email campaign screenshots
StorefrontApi getEmailCampaigns GET /storefront/{storefront_oid}/email/campaigns Get email campaigns
StorefrontApi getEmailCampaignsWithStats GET /storefront/{storefront_oid}/email/campaignsWithStats/{stat_days} Get email campaigns with stats
StorefrontApi getEmailCommseq GET /storefront/{storefront_oid}/email/commseqs/{commseq_uuid} Get email commseq
StorefrontApi getEmailCommseqEmailStats POST /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/emailStats Get email communication sequence emails stats
StorefrontApi getEmailCommseqPostcardStats POST /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/postcardStats Get email communication sequence postcard stats
StorefrontApi getEmailCommseqStatOverall GET /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/stat Get communication sequence stats overall
StorefrontApi getEmailCommseqStepStats POST /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/stepStats Get email communication sequence step stats
StorefrontApi getEmailCommseqStepWaiting POST /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/waiting Get email communication sequence customers waiting at each requested step
StorefrontApi getEmailCommseqs GET /storefront/{storefront_oid}/email/commseqs Get email commseqs
StorefrontApi getEmailCustomerEditorUrl GET /storefront/{storefront_oid}/email/customers/{email_customer_uuid}/editor_url Get customers editor URL
StorefrontApi getEmailCustomers GET /storefront/{storefront_oid}/email/customers Get email customers
StorefrontApi getEmailDashboardActivity GET /storefront/{storefront_oid}/email/dashboard_activity Get email dashboard activity
StorefrontApi getEmailDashboardStats GET /storefront/{storefront_oid}/email/dashboard_stats Get dashboard stats
StorefrontApi getEmailEmail GET /storefront/{storefront_oid}/email/emails/{commseq_email_uuid} Get email email
StorefrontApi getEmailEmailClicks GET /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/steps/{commseq_step_uuid}/emails/{commseq_email_uuid}/clicks Get email email clicks
StorefrontApi getEmailEmailCustomerEditorUrl GET /storefront/{storefront_oid}/email/emails/{commseq_email_uuid}/orders/{order_id}/editor_url Get email order customer editor url
StorefrontApi getEmailEmailOrders GET /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/steps/{commseq_step_uuid}/emails/{commseq_email_uuid}/orders Get email email orders
StorefrontApi getEmailEmails GET /storefront/{storefront_oid}/email/emails Get email emails
StorefrontApi getEmailEmailsMultiple POST /storefront/{storefront_oid}/email/emails/multiple Get email emails multiple
StorefrontApi getEmailFlow GET /storefront/{storefront_oid}/email/flows/{email_flow_uuid} Get email flow
StorefrontApi getEmailFlowFolder GET /storefront/{storefront_oid}/email/flow_folders/{email_flow_folder_uuid} Get email flow folder
StorefrontApi getEmailFlowFolders GET /storefront/{storefront_oid}/email/flow_folders Get email flow folders
StorefrontApi getEmailFlowScreenshots GET /storefront/{storefront_oid}/email/flows/{email_flow_uuid}/screenshots Get email flow screenshots
StorefrontApi getEmailFlows GET /storefront/{storefront_oid}/email/flows Get email flows
StorefrontApi getEmailGlobalSettings GET /storefront/email/global_settings Get email globalsettings
StorefrontApi getEmailList GET /storefront/{storefront_oid}/email/lists/{email_list_uuid} Get email list
StorefrontApi getEmailListCustomerEditorUrl GET /storefront/{storefront_oid}/email/lists/{email_list_uuid}/customers/{email_customer_uuid}/editor_url Get email list customer editor url
StorefrontApi getEmailListCustomers GET /storefront/{storefront_oid}/email/lists/{email_list_uuid}/customers Get email list customers
StorefrontApi getEmailLists GET /storefront/{storefront_oid}/email/lists Get email lists
StorefrontApi getEmailPerformance GET /storefront/{storefront_oid}/email/performance Get email performance
StorefrontApi getEmailPlan GET /storefront/{storefront_oid}/email/plan Get email plan
StorefrontApi getEmailPostcard GET /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid} Get email postcard
StorefrontApi getEmailPostcards GET /storefront/{storefront_oid}/email/postcards Get email postcards
StorefrontApi getEmailPostcardsMultiple POST /storefront/{storefront_oid}/email/postcards/multiple Get email postcards multiple
StorefrontApi getEmailSegment GET /storefront/{storefront_oid}/email/segments/{email_segment_uuid} Get email segment
StorefrontApi getEmailSegmentCustomerEditorUrl GET /storefront/{storefront_oid}/email/segments/{email_segment_uuid}/customers/{email_customer_uuid}/editor_url Get email segment customers editor URL
StorefrontApi getEmailSegmentCustomers GET /storefront/{storefront_oid}/email/segments/{email_segment_uuid}/customers Get email segment customers
StorefrontApi getEmailSegments GET /storefront/{storefront_oid}/email/segments Get email segments
StorefrontApi getEmailSendingDomain GET /storefront/email/sending_domain/{domain} Get email sending domain
StorefrontApi getEmailSendingDomainStatus POST /storefront/email/sending_domains/{domain}/status Get email sending domain status
StorefrontApi getEmailSendingDomains GET /storefront/email/sending_domains Get email sending domains
StorefrontApi getEmailSettings GET /storefront/{storefront_oid}/email/settings Get email settings
StorefrontApi getEmailTemplate GET /storefront/{storefront_oid}/email/templates/{email_template_oid} Get email template
StorefrontApi getEmailTemplates GET /storefront/{storefront_oid}/email/templates Get email templates
StorefrontApi getEmailThirdPartyProviders GET /storefront/{storefront_oid}/email/third_party_providers Get a list of third party email providers
StorefrontApi getExperiments GET /storefront/{storefront_oid}/experiments Get experiments
StorefrontApi getHistogramPropertyNames GET /storefront/{storefront_oid}/email/histogram/property_names Get histogram property names
StorefrontApi getHistogramPropertyValues GET /storefront/{storefront_oid}/email/histogram/property_values Get histogram property values
StorefrontApi getLibraryFilterValues GET /storefront/code_library/filter_values Get library values used to populate drop down boxes for filtering.
StorefrontApi getLibraryItem GET /storefront/code_library/{library_item_oid} Get library item.
StorefrontApi getLibraryItemPublishedVersions GET /storefront/code_library/{library_item_oid}/published_versions Get all published versions for a library item.
StorefrontApi getPricingTiers GET /storefront/pricing_tiers Retrieve pricing tiers
StorefrontApi getScreenRecording GET /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid} Get screen recording
StorefrontApi getScreenRecordingPageViewData GET /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/page_view_data/{screen_recording_page_view_uuid} Get screen recording page view data
StorefrontApi getScreenRecordingSegment GET /storefront/{storefront_oid}/screen_recordings/segments/{screen_recording_segment_oid} Get screen recording segment
StorefrontApi getScreenRecordingSegments GET /storefront/{storefront_oid}/screen_recordings/segments Get screen recording segments
StorefrontApi getScreenRecordingSettings GET /storefront/{storefront_oid}/screen_recordings/settings Get screen recording settings
StorefrontApi getScreenRecordingTags POST /storefront/{storefront_oid}/screen_recordings/tags Get tags used by screen recording
StorefrontApi getScreenRecordingsByQuery POST /storefront/{storefront_oid}/screen_recordings/query Query screen recordings
StorefrontApi getScreenRecordingsBySegment POST /storefront/{storefront_oid}/screen_recordings/segments/{screen_recording_segment_oid}/query Get screen recordings by segment
StorefrontApi getThumbnailParameters POST /storefront/thumbnailParameters Get thumbnail parameters
StorefrontApi getTransactionEmail GET /storefront/{storefront_oid}/transaction_email/list/{email_id} Gets a transaction email object
StorefrontApi getTransactionEmailList GET /storefront/{storefront_oid}/transaction_email/list Gets a list of transaction email names
StorefrontApi getTransactionEmailScreenshots GET /storefront/{storefront_oid}/transaction_email/list/{email_id}/screenshots Get transactional email screenshots
StorefrontApi globalUnsubscribe POST /storefront/{storefront_oid}/email/globalUnsubscribe Globally unsubscribe a customer
StorefrontApi importEmailThirdPartyProviderList POST /storefront/{storefront_oid}/email/third_party_providers/import Import a third party provider list
StorefrontApi insertEmailCampaign POST /storefront/{storefront_oid}/email/campaigns Insert email campaign
StorefrontApi insertEmailCampaignFolder POST /storefront/{storefront_oid}/email/campaign_folders Insert email campaign folder
StorefrontApi insertEmailCommseq POST /storefront/{storefront_oid}/email/commseqs Insert email commseq
StorefrontApi insertEmailEmail POST /storefront/{storefront_oid}/email/emails Insert email email
StorefrontApi insertEmailFlow POST /storefront/{storefront_oid}/email/flows Insert email flow
StorefrontApi insertEmailFlowFolder POST /storefront/{storefront_oid}/email/flow_folders Insert email flow folder
StorefrontApi insertEmailList POST /storefront/{storefront_oid}/email/lists Insert email list
StorefrontApi insertEmailPostcard POST /storefront/{storefront_oid}/email/postcards Insert email postcard
StorefrontApi insertEmailSegment POST /storefront/{storefront_oid}/email/segments Insert email segment
StorefrontApi insertScreenRecordingSegment POST /storefront/{storefront_oid}/screen_recordings/segments Insert screen recording segment
StorefrontApi prepareDownloadEmailSegment POST /storefront/{storefront_oid}/email/segments/{email_segment_uuid}/downloadPrepare Prepare download of email segment
StorefrontApi publishLibraryItem POST /storefront/code_library/{library_item_oid}/publish Publish library item.
StorefrontApi purchaseLibraryItem POST /storefront/code_library/{library_item_oid}/purchase Purchase public library item, which creates a copy of the item in your personal code library
StorefrontApi releaseEmailCommseqStepWaiting POST /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/waiting/{commseq_step_uuid} Release email communication sequence customers waiting at the specified step
StorefrontApi review POST /storefront/{storefront_oid}/email/emails/{commseq_email_uuid}/review Request a review of an email
StorefrontApi search GET /storefront/search Searches for all matching values
StorefrontApi search2 POST /storefront/search Searches for all matching values (using POST)
StorefrontApi searchEmailListCustomers GET /storefront/{storefront_oid}/email/lists/{email_list_uuid}/search Search email list customers
StorefrontApi searchEmailSegmentCustomers GET /storefront/{storefront_oid}/email/segments/{email_segment_uuid}/search Search email segment customers
StorefrontApi searchLibraryItems POST /storefront/code_library/search Retrieve library items
StorefrontApi searchPublishedItems POST /storefront/code_library/search_published Retrieve library items
StorefrontApi searchReviewItems POST /storefront/code_library/search_review Retrieve library items needing review or rejected
StorefrontApi searchSharedItems POST /storefront/code_library/search_shared Retrieve library items
StorefrontApi sendEmailTest POST /storefront/{storefront_oid}/email/emails/{commseq_email_uuid}/test Send email test
StorefrontApi sendPostcardTest POST /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid}/test Send postcard test
StorefrontApi startEmailCampaign PUT /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/start Start email campaign
StorefrontApi subscribeToEmailList POST /storefront/{storefront_oid}/email/lists/{email_list_uuid}/subscribe Subscribe customers to email list
StorefrontApi unfavoriteScreenRecording DELETE /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/favorite Remove favorite flag on screen recording
StorefrontApi updateEmailCampaign PUT /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid} Update email campaign
StorefrontApi updateEmailCampaignFolder PUT /storefront/{storefront_oid}/email/campaign_folders/{email_campaign_folder_uuid} Update email campaign folder
StorefrontApi updateEmailCommseq PUT /storefront/{storefront_oid}/email/commseqs/{commseq_uuid} Update email commseq
StorefrontApi updateEmailCustomer PUT /storefront/{storefront_oid}/email/customers/{email_customer_uuid} Update email customer
StorefrontApi updateEmailEmail PUT /storefront/{storefront_oid}/email/emails/{commseq_email_uuid} Update email email
StorefrontApi updateEmailFlow PUT /storefront/{storefront_oid}/email/flows/{email_flow_uuid} Update email flow
StorefrontApi updateEmailFlowFolder PUT /storefront/{storefront_oid}/email/flow_folders/{email_flow_folder_uuid} Update email flow folder
StorefrontApi updateEmailGlobalSettings POST /storefront/email/global_settings Update email global settings
StorefrontApi updateEmailList PUT /storefront/{storefront_oid}/email/lists/{email_list_uuid} Update email list
StorefrontApi updateEmailPlan POST /storefront/{storefront_oid}/email/plan Update email plan
StorefrontApi updateEmailPostcard PUT /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid} Update email postcard
StorefrontApi updateEmailSegment PUT /storefront/{storefront_oid}/email/segments/{email_segment_uuid} Update email segment
StorefrontApi updateEmailSettings POST /storefront/{storefront_oid}/email/settings Update email settings
StorefrontApi updateExperiment PUT /storefront/{storefront_oid}/experiments/{storefront_experiment_oid} Update experiment
StorefrontApi updateLibraryItem PUT /storefront/code_library/{library_item_oid} Update library item. Note that only certain fields may be updated via this method.
StorefrontApi updateScreenRecordingMerchantNotes POST /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/merchant_notes Update merchant notes on a screen recording
StorefrontApi updateScreenRecordingSegment POST /storefront/{storefront_oid}/screen_recordings/segments/{screen_recording_segment_oid} Update screen recording segment
StorefrontApi updateScreenRecordingSettings POST /storefront/{storefront_oid}/screen_recordings/settings Update screen recording settings
StorefrontApi updateScreenRecordingTags POST /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/tags Update tags on a screen recording
StorefrontApi updateTransactionEmail PUT /storefront/{storefront_oid}/transaction_email/list/{email_id} Updates a transaction email object
TaxApi deleteTaxProviderSelfCity DELETE /tax/providers/self/city/{city} Deletes a Self tax provider city
TaxApi deleteTaxProviderSelfCountry DELETE /tax/providers/self/country/{countryCode} Deletes a Self tax provider country
TaxApi deleteTaxProviderSelfCounty DELETE /tax/providers/self/county/{county} Deletes a Self tax provider county
TaxApi deleteTaxProviderSelfPostalCode DELETE /tax/providers/self/postalCode/{postal_code} Deletes a Self tax provider postalCode
TaxApi deleteTaxProviderSelfState DELETE /tax/providers/self/state/{stateCode} Deletes a Self tax provider state
TaxApi getTaxProviderAvalara GET /tax/providers/avalara Retrieve the Avalara tax provider
TaxApi getTaxProviderAvalaraCompanies POST /tax/providers/avalara/companies Returns Avalara Tax companies configured by the merchant
TaxApi getTaxProviderAvalaraTest GET /tax/providers/avalara/test Attempts to connect to Avalara and returns back the response
TaxApi getTaxProviderSelf GET /tax/providers/self Retrieve the Self tax provider
TaxApi getTaxProviderSelfCountries GET /tax/providers/self/countries Retrieve the Self tax provider countries
TaxApi getTaxProviderSelfRegionsByCountryCode GET /tax/providers/self/regions/{countryCode} Retrieve the Self tax provider regions for a given country code
TaxApi getTaxProviderSovos GET /tax/providers/sovos Retrieve the Sovos tax provider
TaxApi getTaxProviderSovosTest GET /tax/providers/sovos/test Attempts to connect to Sovos and returns back the response
TaxApi getTaxProviderTaxJar GET /tax/providers/taxjar Retrieve the TaxJar tax provider
TaxApi getTaxProviderTaxJarTest GET /tax/providers/taxjar/test Attempts to connect to TaxJar and returns back the response
TaxApi getTaxProviderUltraCart GET /tax/providers/ultracart Retrieve the UltraCart tax provider
TaxApi getTaxProviders GET /tax/providers Retrieve tax methods
TaxApi setActiveTaxProvider POST /tax/providers/setActive/{providerName} Toggle a tax provider to active
TaxApi updateTaxProviderAvalara POST /tax/providers/avalara Update the Avalara tax provider
TaxApi updateTaxProviderSelf POST /tax/providers/self Update the Self tax provider
TaxApi updateTaxProviderSelfCity POST /tax/providers/self/city/{city} Updates a Self tax provider city
TaxApi updateTaxProviderSelfCountry POST /tax/providers/self/country/{countryCode} Updates a Self tax provider country
TaxApi updateTaxProviderSelfCounty POST /tax/providers/self/county/{county} Updates a Self tax provider county
TaxApi updateTaxProviderSelfPostalCode POST /tax/providers/self/postalCode/{postal_code} Updates a Self tax provider postalCode
TaxApi updateTaxProviderSelfState POST /tax/providers/self/state/{stateCode} Updates a Self tax provider state
TaxApi updateTaxProviderSovos POST /tax/providers/sovos Update the Sovos tax provider
TaxApi updateTaxProviderTaxJar POST /tax/providers/taxjar Update the TaxJar tax provider
TaxApi updateTaxProviderUltraCart POST /tax/providers/ultracart Update the UltraCart tax provider
UserApi deleteGroup DELETE /user/groups/{group_oid} Delete a group
UserApi deleteUser DELETE /user/users/{user_id} Delete a user
UserApi getGroup GET /user/groups/{group_oid} Retrieve a group
UserApi getGroups GET /user/groups Get groups
UserApi getUser GET /user/users/{user_id} Retrieve a user
UserApi getUserLogins GET /user/users/{user_id}/logins Retrieve a user's login history
UserApi getUsers GET /user/users Get users
UserApi insertGroup POST /user/groups Insert a group
UserApi insertUser POST /user/users Insert a user
UserApi updateGroup PUT /user/groups/{group_oid} Update a group
UserApi updateUser PUT /user/users/{user_id} Update a user
WebhookApi deleteWebhook DELETE /webhook/webhooks/{webhookOid} Delete a webhook
WebhookApi deleteWebhookByUrl DELETE /webhook/webhooks Delete a webhook by URL
WebhookApi getWebhookLog GET /webhook/webhooks/{webhookOid}/logs/{requestId} Retrieve an individual log
WebhookApi getWebhookLogSummaries GET /webhook/webhooks/{webhookOid}/logs Retrieve the log summaries
WebhookApi getWebhooks GET /webhook/webhooks Retrieve webhooks
WebhookApi insertWebhook POST /webhook/webhooks Add a webhook
WebhookApi resendEvent POST /webhook/webhooks/{webhookOid}/reflow/{eventName} Resend events to the webhook endpoint.
WebhookApi updateWebhook PUT /webhook/webhooks/{webhookOid} Update a webhook

Documentation For Models

Documentation For Authorization

ultraCartBrowserApiKey

  • Type: API key
  • API key parameter name: x-ultracart-browser-key
  • Location: HTTP header

ultraCartOauth

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://secure.ultracart.com/rest/v2/oauth/authorize
  • Scopes:
  • affiliate_read: Allows you to read affiliate information.
  • affiliate_write: Allows you to write affiliate information.
  • auto_order_read: Allows you to read auto order information.
  • auto_order_write: Allows you to write auto order information.
  • chargeback_read: Allows you to read chargeback information.
  • chargeback_write: Allows you to write chargeback information.
  • checkout_read: Allows you to read checkout information.
  • checkout_write: Allows you to write checkout information.
  • coupon_read: Allows you to read coupon information.
  • coupon_write: Allows you to write coupon information.
  • customer_read: Allows you to read customer information.
  • customer_write: Allows you to write customer information.
  • fulfillment_read: Allows you to read fulfillment information.
  • fulfillment_write: Allows you to write fulfillment information.
  • order_read: Allows you to read order information.
  • order_write: Allows you to write order information.
  • item_read: Allows you to read item information.
  • item_write: Allows you to write item information.
  • storefront_read: Allows you to read storefront information.
  • storefront_write: Allows you to write storefront information.
  • tax_read: Allows you to read tax configuration information.
  • tax_write: Allows you to write tax configuration information.
  • webhook_read: Allows you to read webhook information.
  • webhook_write: Allows you to write webhook information.
  • ultrabooks_read: 1 of 2 required to use UltraBooks
  • ultrabooks_write: 2 of 2 required to use UltraBooks
  • user_read: Allows you to read user information.
  • user_write: Allows you to write user information.

ultraCartSimpleApiKey

  • Type: API key
  • API key parameter name: x-ultracart-simple-key
  • Location: HTTP header

Author

support@ultracart.com

CHANGE LOG

Not every change is committed to every SDK.

Version Date Comments
3.1.30 04/27/2021 OrderApi.processPayment now allows a specific amount to be billed
3.1.29 04/26/2021 screen recording language iso code
3.1.28 04/26/2021 screen recording statistics on the setting object
3.1.27 04/20/2021 bug fix - annotation misspell on new email campaign property
3.1.26 04/20/2021 StoreFront Connumications - flag to end campaign or flow once purchase happens anywhere
3.1.25 04/19/2021 Screen recording UTM campaign and source fields
3.1.24 04/16/2021 Screen recording aggregations on communications campaign/flows
3.1.22 04/09/2021 Move URL filter values into page level view for screen recordings
3.1.18 03/17/2021 Added order query by ship on date
3.1.17 03/17/2021 New coupon - percent off MSRP item
3.1.16 03/16/2021 screen recording filter page parameter names
3.1.15 03/15/2021 fix response from deleteScreenRecordingSegment that should have been void
3.1.14 03/15/2021 sort screen recordings by favorite flag
3.1.13 03/02/2021 new webhook order_payment_failed
3.1.12 02/25/2021 added screen recording visitor_first_seen property
3.1.11 02/24/2021 Added Screen recording visitor number
3.1.10 02/24/2021 Added Screen recording merchant notes
3.1.9 02/24/2021 Allow coupons to be configured as unique with expiration on cart step within StoreFront Communications
3.1.8 02/24/2021 Add flag: screen recording missing event boolean
3.1.5 02/12/2021 Bug Fix: PHP retry logic missing a closing brace. Also screen recording page view data response refactor
3.1.3 02/11/2021 Bug Fix: wrong return type on CustomerApi.validateEmailVerificationToken
3.1.2 02/11/2021 CustomerApi.getEmailVerificationToken, CustomerApi.validateEmailVerificationToken added to allow for custom email verification. Also added favorite flag to screen recording object
3.1.1 02/10/2021 CustomerApi.getCustomerByEmail() method added
3.1.0 02/10/2021 Minor revision jump. Added new convenience methods for simple_key use to all api calls. Updated docs
3.0.75 02/01/2021 StoreFront Communication plan revision (internal use)
3.0.71 01/28/2021 BugFix: PHP SDK retry logic NPE
3.0.70 01/26/2021 Checkout return URL support
3.0.66 01/22/2021 code library attributes (mostly internal dev)
3.0.65 01/22/2021 Added folder support for email campaigns and flows
3.0.64 01/20/2021 Bug fix on revenue per customer field incorrectly named.
3.0.63 01/20/2021 CouponAPI: bug fixes and new method doesCouponCodeExist
3.0.62 01/19/2021 Added retry ability when rate limit is triggered (PHP SDK only) only) Other sdk to follow.
3.0.60 01/14/2021 Working with Ruby SDK
3.0.57 12/17/2020 CouponAPI: Added Buy one get one free coupon
3.0.53 12/14/2020 StoreFrontAPI: added a duplicate method to load the pricing tiers on the StoreFront
3.0.51 12/09/2020 UserAPI: internal bug preventing proper usage of user group creation
3.0.45 12/03/2020 CouponAPI: added partial searches to getCoupon params, added deleteCoupons method, fixed bugs
3.0.44 12/03/2020 Code library updates, intended for internal use
3.0.43 12/02/2020 Added fields to code library to handle versions of published items
3.0.42 12/02/2020 Added display values to CouponApi.getEditorValues to make type dropdowns easy
3.0.41 11/17/2020 New modify cart step option for StoreFront communications
3.0.39 11/12/2020 Added Customer.tax_codes.taxjar_exemption_type
3.0.38 11/09/2020 Added TaxProviderTaxJar.configuration.send_outside_nexus flag
3.0.37 11/06/2020 Added transactional email screenshots for code library
3.0.36 11/03/2020 Added missing constant for pre-order stage
3.0.34 10/26/2020 UserAPI initial release
3.0.33 10/23/2020 Added library_item_oid to StoreFront Communications email object for upcoming code library
3.0.32 10/21/2020 Added new StoreFrontApi.search method that takes a POST instead of a GET
3.0.31 10/16/2020 more dev work on code library (internal)
3.0.30 10/08/2020 development work on code library (internal), first version of UserAPI. The UserAPI is not live yet.
3.0.29 09/29/2020 new boolean field on coupon: bug fix
3.0.28 09/29/2020 new boolean field on coupon: free item with purchase of another item
3.0.27 09/29/2020 Refactored the code library applyToStoreFront to provide support for marketing emails
3.0.26 09/25/2020 Expose actual shipping and fulfillment costs in the order summary object
3.0.25 09/16/2020 New method: OrderApi.adjustOrderTotal
3.0.24 09/10/2020 Bugfix: incorrect response type on CheckoutAPI.registerAffiliateClick
3.0.23 09/02/2020 Added flag to email plan object. allow_tracking_emails
3.0.22 09/02/2020 Order object - added tracking details
3.0.21 09/01/2020 break fix in php sdk due to bad namespace
3.0.20 09/01/2020 Added OrderApi.processPayment method
3.0.19 08/28/2020 Code Library development: added kraken parameters for thumbnail image generation.
3.0.17 08/26/2020 cont. development work on Code Library
3.0.14 08/19/2020 development work on Code Library
3.0.13 08/18/2020 development work on Code Library
3.0.12 08/13/2020 screenshot urls for campaigns and flows (storefront communications)
3.0.11 08/12/2020 Refactoring and development for Code Library (not released yet)
3.0.10 08/10/2020 Method for registering an affliate click via the SDK, found within CheckoutAPI
3.0.8 08/05/2020 stub for code library 'getLibraryFilterValues' for populating drop down lists
3.0.4 08/05/2020 fixed misspell of 'version' in LibraryItem object.
3.0.3 08/04/2020 added description to addToLibrary call to allow for initial description
3.0.2 08/03/2020 added option on email render step config to allow override of subject, added flow/campaign flag to end once customer purchases
3.0.1 07/27/2020 added init_json to storefront communication email objects
3.0.0 07/01/2020 upgraded our swagger-codegen fork to the latest swagger source code. this was a major changes so we jumped version numbers. please test all code.

Some changes jump version numbers due to multiple commits for bug fixes, omissions, and errors. At UltraCart, we eat our own dog food, and we increment the version number for every commit in order to generate a new javascript npm. For this reason, version gaps will be found in the change log above.