UltraCart REST API V2 SDK for Java
Switch branches/tags
Nothing to show
Clone or download
Latest commit beaf9bc Oct 4, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.swagger-codegen Dec 2017 version Nov 29, 2017
docs item import methods Oct 4, 2018
gradle/wrapper first commit Aug 31, 2016
src item import methods Oct 4, 2018
.gitignore first commit Aug 31, 2016
.swagger-codegen-ignore first commit Aug 31, 2016
.travis.yml Dec 2017 version Nov 29, 2017
LICENSE first commit Aug 31, 2016
README.md updated for maven repositories Dec 5, 2017
build.gradle Dec 2017 version Nov 29, 2017
build.sbt first commit Aug 31, 2016
git_push.sh first commit Aug 31, 2016
gradle.properties first commit Aug 31, 2016
gradlew first commit Aug 31, 2016
gradlew.bat first commit Aug 31, 2016
pom.xml first commit Aug 31, 2016
settings.gradle Dec 2017 version Nov 29, 2017




Building the API client library requires Maven to be installed.


To install the API client library to your local Maven repository, simply execute:

mvn install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn deploy

Refer to the official documentation for more information.

Maven users

Add this dependency to your project's POM:


Gradle users

Add this dependency to your project's build file:

compile "com.ultracart:rest-sdk:1.0.4"


At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/rest-sdk-1.0.4.jar
  • target/lib/*.jar

Getting Started

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

import com.ultracart.admin.v2.FulfillmentApi;
import com.ultracart.admin.v2.models.Order;
import com.ultracart.admin.v2.models.OrdersResponse;
import com.ultracart.admin.v2.swagger.ApiClient;
import com.ultracart.admin.v2.swagger.ApiException;
import com.ultracart.admin.v2.swagger.Configuration;
import com.ultracart.admin.v2.swagger.auth.ApiKeyAuth;

import java.util.List;

public class FulfillmentSample {

  private static final String API_KEY = "4256aaf6dfedfa01582fe9a961ab0100216d737b874a4801582fe9a961ab0100";

  private static void initClient(){
    ApiClient defaultClient = Configuration.getDefaultApiClient();

    ApiKeyAuth ultraCartSimpleApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ultraCartSimpleApiKey");

    defaultClient.addDefaultHeader("X-UltraCart-Api-Version", "2017-03-01");


  public static void main(String ... args) {

    FulfillmentApi api = new FulfillmentApi();
    String distributionCenterCode = "DFLT";

    try {
      OrdersResponse ordersResponse = api.getDistributionCenterOrders(distributionCenterCode);
      List<Order> orders = ordersResponse.getOrders();
      System.out.println("There are " + orders.size() + " in distribution center [" + distributionCenterCode + "]");
      for (Order order : orders) {

    } catch (ApiException e) {
        System.err.println("Exception when calling FulfillmentApi#getDistributionCenterOrders");

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
AutoOrderApi getAutoOrderByCode GET /auto_order/auto_orders/code/{auto_order_code} Retrieve an auto order
AutoOrderApi getAutoOrderByReferenceOrderId GET /auto_order/auto_orders/reference_order_id/{reference_order_id} Retrieve an auto order
AutoOrderApi getAutoOrders GET /auto_order/auto_orders Retrieve auto orders
AutoOrderApi updateAutoOrder PUT /auto_order/auto_orders/{auto_order_oid} Update an auto order
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 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 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 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 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 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 updateCoupon PUT /coupon/coupons/{coupon_oid} Update 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 getCustomers GET /customer/customers Retrieve customers
CustomerApi getCustomersByQuery GET /customer/customers/query Retrieve customers by query
CustomerApi getEditorValues GET /customer/editor_values Retrieve values needed for a customer profile editor
CustomerApi insertCustomer POST /customer/customers Insert a customer
CustomerApi updateCustomer PUT /customer/customers/{customer_profile_oid} Update a customer
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 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 cancelOrder POST /order/orders/{order_id}/cancel Cancel an order
OrderApi deleteOrder DELETE /order/orders/{order_id} Delete an order
OrderApi getOrder GET /order/orders/{order_id} Retrieve an order
OrderApi getOrders GET /order/orders Retrieve orders
OrderApi getOrdersByQuery POST /order/orders/query Retrieve orders
OrderApi refundOrder PUT /order/orders/{order_id}/refund Refund an 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 updateOrder PUT /order/orders/{order_id} Update an order
WebhookApi deleteWebhook DELETE /webhook/webhooks/{webhookOid} Delete a webhook
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

Authentication schemes defined for the API:


  • 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


It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.