UltraCart REST API V2 SDK for JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



UltraCartRestApiV2 - JavaScript client for ultra_cart_rest_api_v2 UltraCart REST API Version 2 This SDK is automatically generated by the Swagger Codegen project:

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


For Node.js


To install this SDK in your project, execute the following command:

npm install ultra_cart_rest_api_v2 --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your ultra_cart_rest_api_v2 from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('ultra_cart_rest_api_v2') in javascript files from the directory you ran the last command above from.


If the library is hosted at a git repository, e.g. https://github.com/UltraCart/rest_api_v2_sdk_javascript then install it via:

    npm install UltraCart/rest_api_v2_sdk_javascript --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
      parser: {
        amd: false

Getting Started

Please follow the installation instruction and execute the following JS code:

var UltraCartRestApiV2 = require('ultra_cart_rest_api_v2');

var defaultClient = UltraCartRestApiV2.ApiClient.instance;

// Configure OAuth2 access token for authorization: ultraCartOauth
var ultraCartOauth = defaultClient.authentications['ultraCartOauth'];
ultraCartOauth.accessToken = "YOUR ACCESS TOKEN"

// Configure API key authorization: ultraCartSimpleApiKey
var ultraCartSimpleApiKey = defaultClient.authentications['ultraCartSimpleApiKey'];
ultraCartSimpleApiKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ultraCartSimpleApiKey.apiKeyPrefix['x-ultracart-simple-key'] = "Token"

var api = new UltraCartRestApiV2.AffiliateApi()

var clickQuery = new UltraCartRestApiV2.AffiliateClickQuery(); // {AffiliateClickQuery} Click query

var opts = { 
  'limit': 10000, // {Number} The maximum number of records to return on this one API call. (Maximum 10000)
  'offset': 0, // {Number} Pagination of the record set.  Offset is a zero based index.
  'expand': "expand_example" // {String} The object expansion to perform on the result.  Only option is link.

var callback = function(error, data, response) {
  if (error) {
  } else {
    console.log('API called successfully. Returned data: ' + data);
api.getClicksByQuery(clickQuery, opts, callback);

Documentation for API Endpoints

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

Class Method HTTP request Description
UltraCartRestApiV2.AffiliateApi getClicksByQuery POST /affiliate/clicks/query Retrieve clicks
UltraCartRestApiV2.AffiliateApi getLedgersByQuery POST /affiliate/ledgers/query Retrieve ledger entries
UltraCartRestApiV2.AutoOrderApi getAutoOrder GET /auto_order/auto_orders/{auto_order_oid} Retrieve an auto order
UltraCartRestApiV2.AutoOrderApi getAutoOrderByCode GET /auto_order/auto_orders/code/{auto_order_code} Retrieve an auto order
UltraCartRestApiV2.AutoOrderApi getAutoOrderByReferenceOrderId GET /auto_order/auto_orders/reference_order_id/{reference_order_id} Retrieve an auto order
UltraCartRestApiV2.AutoOrderApi getAutoOrders GET /auto_order/auto_orders Retrieve auto orders
UltraCartRestApiV2.AutoOrderApi updateAutoOrder PUT /auto_order/auto_orders/{auto_order_oid} Update an auto order
UltraCartRestApiV2.ChargebackApi deleteChargeback DELETE /chargeback/chargebacks/{chargeback_dispute_oid} Delete a chargeback
UltraCartRestApiV2.ChargebackApi getChargebackDispute GET /chargeback/chargebacks/{chargeback_dispute_oid} Retrieve a chargeback
UltraCartRestApiV2.ChargebackApi getChargebackDisputes GET /chargeback/chargebacks Retrieve chargebacks
UltraCartRestApiV2.ChargebackApi insertChargeback POST /chargeback/chargebacks Insert a chargeback
UltraCartRestApiV2.ChargebackApi updateChargeback PUT /chargeback/chargebacks/{chargeback_dispute_oid} Update a chargeback
UltraCartRestApiV2.CheckoutApi cityState POST /checkout/city_state City/State for Zip
UltraCartRestApiV2.CheckoutApi finalizeOrder POST /checkout/cart/finalizeOrder Finalize Order
UltraCartRestApiV2.CheckoutApi getAffirmCheckout GET /checkout/cart/{cart_id}/affirmCheckout Get affirm checkout (by cart id)
UltraCartRestApiV2.CheckoutApi getAllowedCountries POST /checkout/allowedCountries Allowed countries
UltraCartRestApiV2.CheckoutApi getCart GET /checkout/cart Get cart
UltraCartRestApiV2.CheckoutApi getCartByCartId GET /checkout/cart/{cart_id} Get cart (by cart id)
UltraCartRestApiV2.CheckoutApi getCartByReturnCode GET /checkout/return/{return_code} Get cart (by return code)
UltraCartRestApiV2.CheckoutApi getStateProvincesForCountry POST /checkout/stateProvincesForCountry/{country_code} Get state/province list for a country code
UltraCartRestApiV2.CheckoutApi handoffCart POST /checkout/cart/handoff Handoff cart
UltraCartRestApiV2.CheckoutApi login POST /checkout/cart/profile/login Profile login
UltraCartRestApiV2.CheckoutApi logout POST /checkout/cart/profile/logout Profile logout
UltraCartRestApiV2.CheckoutApi register POST /checkout/cart/profile/register Profile registration
UltraCartRestApiV2.CheckoutApi relatedItemsForCart POST /checkout/related_items Related items
UltraCartRestApiV2.CheckoutApi relatedItemsForItem POST /checkout/relatedItems/{item_id} Related items (specific item)
UltraCartRestApiV2.CheckoutApi setupBrowserKey PUT /checkout/browser_key Setup Browser Application
UltraCartRestApiV2.CheckoutApi updateCart PUT /checkout/cart Update cart
UltraCartRestApiV2.CheckoutApi validateCart POST /checkout/cart/validate Validate
UltraCartRestApiV2.CouponApi deleteCoupon DELETE /coupon/coupons/{coupon_oid} Delete a coupon
UltraCartRestApiV2.CouponApi generateCouponCodes POST /coupon/coupons/{coupon_oid}/generate_codes Generates one time codes for a coupon
UltraCartRestApiV2.CouponApi generateOneTimeCodesByMerchantCode POST /coupon/coupons/merchant_code/{merchant_code}/generate_codes Generates one time codes by merchant code
UltraCartRestApiV2.CouponApi getCoupon GET /coupon/coupons/{coupon_oid} Retrieve a coupon
UltraCartRestApiV2.CouponApi getCouponByMerchantCode GET /coupon/coupons/merchant_code/{merchant_code} Retrieve a coupon by merchant code
UltraCartRestApiV2.CouponApi getCoupons GET /coupon/coupons Retrieve coupons
UltraCartRestApiV2.CouponApi getCouponsByQuery GET /coupon/coupons/query Retrieve coupons by query
UltraCartRestApiV2.CouponApi getEditorValues GET /coupon/editor_values Retrieve values needed for a coupon editor
UltraCartRestApiV2.CouponApi insertCoupon POST /coupon/coupons Insert a coupon
UltraCartRestApiV2.CouponApi updateCoupon PUT /coupon/coupons/{coupon_oid} Update a coupon
UltraCartRestApiV2.CustomerApi deleteCustomer DELETE /customer/customers/{customer_profile_oid} Delete a customer
UltraCartRestApiV2.CustomerApi getCustomer GET /customer/customers/{customer_profile_oid} Retrieve a customer
UltraCartRestApiV2.CustomerApi getCustomers GET /customer/customers Retrieve customers
UltraCartRestApiV2.CustomerApi getCustomersByQuery GET /customer/customers/query Retrieve customers by query
UltraCartRestApiV2.CustomerApi getCustomersForDataTables POST /customer/customers/dataTables Retrieve customers for DataTables plugin
UltraCartRestApiV2.CustomerApi getEditorValues GET /customer/editor_values Retrieve values needed for a customer profile editor
UltraCartRestApiV2.CustomerApi insertCustomer POST /customer/customers Insert a customer
UltraCartRestApiV2.CustomerApi updateCustomer PUT /customer/customers/{customer_profile_oid} Update a customer
UltraCartRestApiV2.FulfillmentApi acknowledgeOrders PUT /fulfillment/distribution_centers/{distribution_center_code}/acknowledgements Acknowledge receipt of orders.
UltraCartRestApiV2.FulfillmentApi getDistributionCenterOrders GET /fulfillment/distribution_centers/{distribution_center_code}/orders Retrieve orders queued up for this distribution center.
UltraCartRestApiV2.FulfillmentApi getDistributionCenters GET /fulfillment/distribution_centers Retrieve distribution centers
UltraCartRestApiV2.FulfillmentApi shipOrders POST /fulfillment/distribution_centers/{distribution_center_code}/shipments Mark orders as shipped
UltraCartRestApiV2.FulfillmentApi updateInventory POST /fulfillment/distribution_centers/{distribution_center_code}/inventory Update inventory
UltraCartRestApiV2.ItemApi deleteItem DELETE /item/items/{merchant_item_oid} Delete an item
UltraCartRestApiV2.ItemApi getItem GET /item/items/{merchant_item_oid} Retrieve an item
UltraCartRestApiV2.ItemApi getItemByMerchantItemId GET /item/items/merchant_item_id/{merchant_item_id} Retrieve an item by item id
UltraCartRestApiV2.ItemApi getItems GET /item/items Retrieve items
UltraCartRestApiV2.ItemApi getPricingTiers GET /item/pricing_tiers Retrieve pricing tiers
UltraCartRestApiV2.ItemApi insertItem POST /item/items Create an item
UltraCartRestApiV2.ItemApi updateItem PUT /item/items/{merchant_item_oid} Update an item
UltraCartRestApiV2.ItemApi updateItems PUT /item/items/batch Update multiple items
UltraCartRestApiV2.ItemApi uploadTemporaryMultimedia POST /item/temp_multimedia Upload an image to the temporary multimedia.
UltraCartRestApiV2.OauthApi oauthAccessToken POST /oauth/token Exchange authorization code for access token.
UltraCartRestApiV2.OauthApi oauthRevoke POST /oauth/revoke Revoke this OAuth application.
UltraCartRestApiV2.OrderApi cancelOrder POST /order/orders/{order_id}/cancel Cancel an order
UltraCartRestApiV2.OrderApi deleteOrder DELETE /order/orders/{order_id} Delete an order
UltraCartRestApiV2.OrderApi format POST /order/orders/{order_id}/format Format order
UltraCartRestApiV2.OrderApi getAccountsReceivableRetryConfig GET /order/accountsReceivableRetryConfig Retrieve A/R Retry Configuration
UltraCartRestApiV2.OrderApi getOrder GET /order/orders/{order_id} Retrieve an order
UltraCartRestApiV2.OrderApi getOrders GET /order/orders Retrieve orders
UltraCartRestApiV2.OrderApi getOrdersByQuery POST /order/orders/query Retrieve orders
UltraCartRestApiV2.OrderApi refundOrder PUT /order/orders/{order_id}/refund Refund an order
UltraCartRestApiV2.OrderApi resendReceipt POST /order/orders/{order_id}/resend_receipt Resend receipt
UltraCartRestApiV2.OrderApi resendShipmentConfirmation POST /order/orders/{order_id}/resend_shipment_confirmation Resend shipment confirmation
UltraCartRestApiV2.OrderApi updateAccountsReceivableRetryConfig POST /order/accountsReceivableRetryConfig Update A/R Retry Configuration
UltraCartRestApiV2.OrderApi updateOrder PUT /order/orders/{order_id} Update an order
UltraCartRestApiV2.TaxApi deleteTaxProviderSelfCity DELETE /tax/providers/self/city/{city} Deletes a Self tax provider city
UltraCartRestApiV2.TaxApi deleteTaxProviderSelfCountry DELETE /tax/providers/self/country/{countryCode} Deletes a Self tax provider country
UltraCartRestApiV2.TaxApi deleteTaxProviderSelfCounty DELETE /tax/providers/self/county/{county} Deletes a Self tax provider county
UltraCartRestApiV2.TaxApi deleteTaxProviderSelfPostalCode DELETE /tax/providers/self/postalCode/{postal_code} Deletes a Self tax provider postalCode
UltraCartRestApiV2.TaxApi deleteTaxProviderSelfState DELETE /tax/providers/self/state/{stateCode} Deletes a Self tax provider state
UltraCartRestApiV2.TaxApi getTaxProviderAvalara GET /tax/providers/avalara Retrieve the Avalara tax provider
UltraCartRestApiV2.TaxApi getTaxProviderAvalaraCompanies POST /tax/providers/avalara/companies Returns Avalara Tax companies configured by the merchant
UltraCartRestApiV2.TaxApi getTaxProviderAvalaraTest GET /tax/providers/avalara/test Attempts to connect to Avalara and returns back the response
UltraCartRestApiV2.TaxApi getTaxProviderSelf GET /tax/providers/self Retrieve the Self tax provider
UltraCartRestApiV2.TaxApi getTaxProviderSelfCountries GET /tax/providers/self/countries Retrieve the Self tax provider countries
UltraCartRestApiV2.TaxApi getTaxProviderSelfRegionsByCountryCode GET /tax/providers/self/regions/{countryCode} Retrieve the Self tax provider regions for a given country code
UltraCartRestApiV2.TaxApi getTaxProviderTaxJar GET /tax/providers/taxjar Retrieve the TaxJar tax provider
UltraCartRestApiV2.TaxApi getTaxProviderTaxJarTest GET /tax/providers/taxjar/test Attempts to connect to TaxJar and returns back the response
UltraCartRestApiV2.TaxApi getTaxProviderUltraCart GET /tax/providers/ultracart Retrieve the UltraCart tax provider
UltraCartRestApiV2.TaxApi getTaxProviders GET /tax/providers Retrieve tax methods
UltraCartRestApiV2.TaxApi setActiveTaxProvider POST /tax/providers/setActive/{providerName} Toggle a tax provider to active
UltraCartRestApiV2.TaxApi updateTaxProviderAvalara POST /tax/providers/avalara Update the Avalara tax provider
UltraCartRestApiV2.TaxApi updateTaxProviderSelf POST /tax/providers/self Update the Self tax provider
UltraCartRestApiV2.TaxApi updateTaxProviderSelfCity POST /tax/providers/self/city/{city} Updates a Self tax provider city
UltraCartRestApiV2.TaxApi updateTaxProviderSelfCountry POST /tax/providers/self/country/{countryCode} Updates a Self tax provider country
UltraCartRestApiV2.TaxApi updateTaxProviderSelfCounty POST /tax/providers/self/county/{county} Updates a Self tax provider county
UltraCartRestApiV2.TaxApi updateTaxProviderSelfPostalCode POST /tax/providers/self/postalCode/{postal_code} Updates a Self tax provider postalCode
UltraCartRestApiV2.TaxApi updateTaxProviderSelfState POST /tax/providers/self/state/{stateCode} Updates a Self tax provider state
UltraCartRestApiV2.TaxApi updateTaxProviderTaxJar POST /tax/providers/taxjar Update the TaxJar tax provider
UltraCartRestApiV2.TaxApi updateTaxProviderUltraCart POST /tax/providers/ultracart Update the UltraCart tax provider
UltraCartRestApiV2.WebhookApi deleteWebhook DELETE /webhook/webhooks/{webhookOid} Delete a webhook
UltraCartRestApiV2.WebhookApi getWebhookLog GET /webhook/webhooks/{webhookOid}/logs/{requestId} Retrieve an individual log
UltraCartRestApiV2.WebhookApi getWebhookLogSummaries GET /webhook/webhooks/{webhookOid}/logs Retrieve the log summaries
UltraCartRestApiV2.WebhookApi getWebhooks GET /webhook/webhooks Retrieve webhooks
UltraCartRestApiV2.WebhookApi insertWebhook POST /webhook/webhooks Add a webhook
UltraCartRestApiV2.WebhookApi resendEvent POST /webhook/webhooks/{webhookOid}/reflow/{eventName} Resend events to the webhook endpoint.
UltraCartRestApiV2.WebhookApi updateWebhook PUT /webhook/webhooks/{webhookOid} Update a webhook

Documentation for Models

Documentation for Authorization


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


  • 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.
    • 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


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