UltraCart REST API V2 SDK for Python
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.



UltraCart REST API Version 2

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

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


Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/UltraCart/rest_api_v2_sdk_python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/UltraCart/rest_api_v2_sdk_python.git)

Then import the package:

import ultracart 


Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import ultracart

Getting Started

Please follow the installation procedure and then run the following:

# retrieve an auto order
import ultracart
from ultracart.rest import ApiException
from ultracart import ApiClient
from pprint import pprint

ultracart.configuration.api_key['x-ultracart-simple-key'] \
    = '508052342b482a015d85c69048030a0005a9da7cea5afe015d85c69048030a00'
ultracart.configuration.debug = True

api_client = ApiClient(header_name='X-UltraCart-Api-Version', header_value='2017-03-01')
api_instance = ultracart.AutoorderApi(api_client)

auto_order_oid = 3268342  # int | The auto order oid to retrieve.
expand = 'items'  # str | The object expansion to perform on the result.  See documentation for examples (optional)


    auto_order_response = api_instance.get_auto_order(auto_order_oid, expand=expand)
    auto_order = auto_order_response.auto_order

except ApiException as e:
    print ("Exception when calling AutoorderApi->get_auto_order: %s\n" % e)

Retrieve all distribution centers

import time
import ultracart
from ultracart.rest import ApiException
from pprint import pprint

ultracart.configuration.api_key['x-ultracart-simple-key'] \
    = '508052342b482a015d85c69048030a0005a9da7cea5afe015d85c69048030a00'

# create an instance of the API class
api_instance = ultracart.FulfillmentApi()

# Set the version header
api_instance.api_client.set_default_header('X-UltraCart-Api-Version', '2017-03-01')

    # Retrieve distribution centers
    api_response = api_instance.get_distribution_centers()
except ApiException as e:
    print ("Exception when calling FulfillmentApi->get_distribution_centers: %s\n" % e)

Documentation for API Endpoints

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

Class Method HTTP request Description
AffiliateApi get_clicks_by_query POST /affiliate/clicks/query Retrieve clicks
AffiliateApi get_ledgers_by_query POST /affiliate/ledgers/query Retrieve ledger entries
AutoOrderApi get_auto_order GET /auto_order/auto_orders/{auto_order_oid} Retrieve an auto order
AutoOrderApi get_auto_order_by_code GET /auto_order/auto_orders/code/{auto_order_code} Retrieve an auto order
AutoOrderApi get_auto_order_by_reference_order_id GET /auto_order/auto_orders/reference_order_id/{reference_order_id} Retrieve an auto order
AutoOrderApi get_auto_orders GET /auto_order/auto_orders Retrieve auto orders
AutoOrderApi update_auto_order PUT /auto_order/auto_orders/{auto_order_oid} Update an auto order
ChargebackApi delete_chargeback DELETE /chargeback/chargebacks/{chargeback_dispute_oid} Delete a chargeback
ChargebackApi get_chargeback_dispute GET /chargeback/chargebacks/{chargeback_dispute_oid} Retrieve a chargeback
ChargebackApi get_chargeback_disputes GET /chargeback/chargebacks Retrieve chargebacks
ChargebackApi insert_chargeback POST /chargeback/chargebacks Insert a chargeback
ChargebackApi update_chargeback PUT /chargeback/chargebacks/{chargeback_dispute_oid} Update a chargeback
CheckoutApi city_state POST /checkout/city_state City/State for Zip
CheckoutApi finalize_order POST /checkout/cart/finalizeOrder Finalize Order
CheckoutApi get_cart GET /checkout/cart Get cart
CheckoutApi get_cart_by_cart_id GET /checkout/cart/{cart_id} Get cart (by cart id)
CheckoutApi get_cart_by_return_code GET /checkout/return/{return_code} Get cart (by return code)
CheckoutApi handoff_cart 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 related_items_for_cart POST /checkout/related_items Related items
CheckoutApi related_items_for_item POST /checkout/relatedItems/{item_id} Related items (specific item)
CheckoutApi setup_browser_key PUT /checkout/browser_key Setup Browser Application
CheckoutApi update_cart PUT /checkout/cart Update cart
CheckoutApi validate_cart POST /checkout/cart/validate Validate
CouponApi delete_coupon DELETE /coupon/coupons/{coupon_oid} Delete a coupon
CouponApi generate_coupon_codes POST /coupon/coupons/{coupon_oid}/generate_codes Generates one time codes for a coupon
CouponApi generate_one_time_codes_by_merchant_code POST /coupon/coupons/merchant_code/{merchant_code}/generate_codes Generates one time codes by merchant code
CouponApi get_coupon GET /coupon/coupons/{coupon_oid} Retrieve a coupon
CouponApi get_coupon_by_merchant_code GET /coupon/coupons/merchant_code/{merchant_code} Retrieve a coupon by merchant code
CouponApi get_coupons GET /coupon/coupons Retrieve coupons
CouponApi get_coupons_by_query GET /coupon/coupons/query Retrieve coupons by query
CouponApi get_editor_values GET /coupon/editor_values Retrieve values needed for a coupon editor
CouponApi insert_coupon POST /coupon/coupons Insert a coupon
CouponApi update_coupon PUT /coupon/coupons/{coupon_oid} Update a coupon
CustomerApi delete_customer DELETE /customer/customers/{customer_profile_oid} Delete a customer
CustomerApi get_customer GET /customer/customers/{customer_profile_oid} Retrieve a customer
CustomerApi get_customers GET /customer/customers Retrieve customers
CustomerApi get_customers_by_query GET /customer/customers/query Retrieve customers by query
CustomerApi get_customers_for_data_tables POST /customer/customers/dataTables Retrieve customers for DataTables plugin
CustomerApi get_editor_values GET /customer/editor_values Retrieve values needed for a customer profile editor
CustomerApi insert_customer POST /customer/customers Insert a customer
CustomerApi update_customer PUT /customer/customers/{customer_profile_oid} Update a customer
FulfillmentApi acknowledge_orders PUT /fulfillment/distribution_centers/{distribution_center_code}/acknowledgements Acknowledge receipt of orders.
FulfillmentApi get_distribution_center_orders GET /fulfillment/distribution_centers/{distribution_center_code}/orders Retrieve orders queued up for this distribution center.
FulfillmentApi get_distribution_centers GET /fulfillment/distribution_centers Retrieve distribution centers
FulfillmentApi ship_orders POST /fulfillment/distribution_centers/{distribution_center_code}/shipments Mark orders as shipped
FulfillmentApi update_inventory POST /fulfillment/distribution_centers/{distribution_center_code}/inventory Update inventory
ItemApi delete_item DELETE /item/items/{merchant_item_oid} Delete an item
ItemApi get_item GET /item/items/{merchant_item_oid} Retrieve an item
ItemApi get_item_by_merchant_item_id GET /item/items/merchant_item_id/{merchant_item_id} Retrieve an item by item id
ItemApi get_items GET /item/items Retrieve items
ItemApi get_pricing_tiers GET /item/pricing_tiers Retrieve pricing tiers
ItemApi insert_item POST /item/items Create an item
ItemApi update_item PUT /item/items/{merchant_item_oid} Update an item
ItemApi update_items PUT /item/items/batch Update multiple items
ItemApi upload_temporary_multimedia POST /item/temp_multimedia Upload an image to the temporary multimedia.
OauthApi oauth_access_token POST /oauth/token Exchange authorization code for access token.
OauthApi oauth_revoke POST /oauth/revoke Revoke this OAuth application.
OrderApi cancel_order POST /order/orders/{order_id}/cancel Cancel an order
OrderApi delete_order DELETE /order/orders/{order_id} Delete an order
OrderApi format POST /order/orders/{order_id}/format Format order
OrderApi get_order GET /order/orders/{order_id} Retrieve an order
OrderApi get_orders GET /order/orders Retrieve orders
OrderApi get_orders_by_query POST /order/orders/query Retrieve orders
OrderApi refund_order PUT /order/orders/{order_id}/refund Refund an order
OrderApi resend_receipt POST /order/orders/{order_id}/resend_receipt Resend receipt
OrderApi resend_shipment_confirmation POST /order/orders/{order_id}/resend_shipment_confirmation Resend shipment confirmation
OrderApi update_order PUT /order/orders/{order_id} Update an order
WebhookApi delete_webhook DELETE /webhook/webhooks/{webhookOid} Delete a webhook
WebhookApi get_webhook_log GET /webhook/webhooks/{webhookOid}/logs/{requestId} Retrieve an individual log
WebhookApi get_webhook_log_summaries GET /webhook/webhooks/{webhookOid}/logs Retrieve the log summaries
WebhookApi get_webhooks GET /webhook/webhooks Retrieve webhooks
WebhookApi insert_webhook POST /webhook/webhooks Add a webhook
WebhookApi resend_event POST /webhook/webhooks/{webhookOid}/reflow/{eventName} Resend events to the webhook endpoint.
WebhookApi update_webhook 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.
  • 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