All URIs are relative to https://secure.ultracart.com/rest/v2
Method | HTTP request | Description |
---|---|---|
city_state | POST /checkout/city_state | City/State for Zip |
finalize_order | POST /checkout/cart/finalizeOrder | Finalize Order |
get_affirm_checkout | GET /checkout/cart/{cart_id}/affirmCheckout | Get affirm checkout (by cart id) |
get_allowed_countries | POST /checkout/allowedCountries | Allowed countries |
get_cart | GET /checkout/cart | Get cart |
get_cart_by_cart_id | GET /checkout/cart/{cart_id} | Get cart (by cart id) |
get_cart_by_return_code | GET /checkout/return/{return_code} | Get cart (by return code) |
get_cart_by_return_token | GET /checkout/return_token | Get cart (by return token) |
get_state_provinces_for_country | POST /checkout/stateProvincesForCountry/{country_code} | Get state/province list for a country code |
handoff_cart | POST /checkout/cart/handoff | Handoff cart |
login | POST /checkout/cart/profile/login | Profile login |
logout | POST /checkout/cart/profile/logout | Profile logout |
register | POST /checkout/cart/profile/register | Profile registration |
register_affiliate_click | POST /checkout/affiliateClick/register | Register affiliate click |
related_items_for_cart | POST /checkout/related_items | Related items |
related_items_for_item | POST /checkout/relatedItems/{item_id} | Related items (specific item) |
setup_browser_key | PUT /checkout/browser_key | Setup Browser Application |
update_cart | PUT /checkout/cart | Update cart |
validate_cart | POST /checkout/cart/validate | Validate |
CityStateZip city_state(cart)
City/State for Zip
Look up the city and state for the shipping zip code. Useful for building an auto complete for parts of the shipping address
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
cart = UltracartClient::Cart.new # Cart | Cart
begin
#City/State for Zip
result = api_instance.city_state(cart)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->city_state: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
cart | Cart | Cart |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CartFinalizeOrderResponse finalize_order(finalize_request)
Finalize Order
Finalize the cart into an order. This method can not be called with browser key authentication. It is ONLY meant for server side code to call.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
finalize_request = UltracartClient::CartFinalizeOrderRequest.new # CartFinalizeOrderRequest | Finalize request
begin
#Finalize Order
result = api_instance.finalize_order(finalize_request)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->finalize_order: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
finalize_request | CartFinalizeOrderRequest | Finalize request |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CartAffirmCheckoutResponse get_affirm_checkout(cart_id)
Get affirm checkout (by cart id)
Get a Affirm checkout object for the specified cart_id parameter.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
cart_id = 'cart_id_example' # String | Cart ID to retrieve
begin
#Get affirm checkout (by cart id)
result = api_instance.get_affirm_checkout(cart_id)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->get_affirm_checkout: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
cart_id | String | Cart ID to retrieve |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CheckoutAllowedCountriesResponse get_allowed_countries
Allowed countries
Lookup the allowed countries for this merchant id
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
begin
#Allowed countries
result = api_instance.get_allowed_countries
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->get_allowed_countries: #{e}"
end
This endpoint does not need any parameter.
CheckoutAllowedCountriesResponse
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CartResponse get_cart(opts)
Get cart
If the cookie is set on the browser making the request then it will return their active cart. Otherwise it will create a new cart.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
opts = {
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
}
begin
#Get cart
result = api_instance.get_cart(opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->get_cart: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CartResponse get_cart_by_cart_id(cart_id, opts)
Get cart (by cart id)
Get a cart specified by the cart_id parameter.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
cart_id = 'cart_id_example' # String | Cart ID to retrieve
opts = {
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
}
begin
#Get cart (by cart id)
result = api_instance.get_cart_by_cart_id(cart_id, opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->get_cart_by_cart_id: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
cart_id | String | Cart ID to retrieve | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CartResponse get_cart_by_return_code(return_code, opts)
Get cart (by return code)
Get a cart specified by the return code parameter.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
return_code = 'return_code_example' # String | Return code to lookup cart ID by
opts = {
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
}
begin
#Get cart (by return code)
result = api_instance.get_cart_by_return_code(return_code, opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->get_cart_by_return_code: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
return_code | String | Return code to lookup cart ID by | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CartResponse get_cart_by_return_token(opts)
Get cart (by return token)
Get a cart specified by the encrypted return token parameter.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
opts = {
return_token: 'return_token_example', # String | Return token provided by StoreFront Communications
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
}
begin
#Get cart (by return token)
result = api_instance.get_cart_by_return_token(opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->get_cart_by_return_token: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
return_token | String | Return token provided by StoreFront Communications | [optional] |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CheckoutStateProvinceResponse get_state_provinces_for_country(country_code)
Get state/province list for a country code
Lookup a state/province list for a given country code
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
country_code = 'country_code_example' # String | Two letter ISO country code
begin
#Get state/province list for a country code
result = api_instance.get_state_provinces_for_country(country_code)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->get_state_provinces_for_country: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
country_code | String | Two letter ISO country code |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CheckoutHandoffResponse handoff_cart(handoff_request, opts)
Handoff cart
Handoff the browser to UltraCart for view cart on StoreFront, transfer to PayPal, transfer to Affirm, transfer to Sezzle or finalization of the order (including upsell processing).
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
handoff_request = UltracartClient::CheckoutHandoffRequest.new # CheckoutHandoffRequest | Handoff request
opts = {
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
}
begin
#Handoff cart
result = api_instance.handoff_cart(handoff_request, opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->handoff_cart: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
handoff_request | CheckoutHandoffRequest | Handoff request | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CartProfileLoginResponse login(login_request, opts)
Profile login
Login in to the customer profile specified by cart.billing.email and password
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
login_request = UltracartClient::CartProfileLoginRequest.new # CartProfileLoginRequest | Login request
opts = {
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
}
begin
#Profile login
result = api_instance.login(login_request, opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->login: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
login_request | CartProfileLoginRequest | Login request | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CartResponse logout(cart, opts)
Profile logout
Log the cart out of the current profile. No error will occur if they are not logged in.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
cart = UltracartClient::Cart.new # Cart | Cart
opts = {
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
}
begin
#Profile logout
result = api_instance.logout(cart, opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->logout: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
cart | Cart | Cart | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CartProfileRegisterResponse register(register_request, opts)
Profile registration
Register a new customer profile. Requires the cart.billing object to be populated along with the password.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
register_request = UltracartClient::CartProfileRegisterRequest.new # CartProfileRegisterRequest | Register request
opts = {
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
}
begin
#Profile registration
result = api_instance.register(register_request, opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->register: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
register_request | CartProfileRegisterRequest | Register request | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
RegisterAffiliateClickResponse register_affiliate_click(register_affiliate_click_request, opts)
Register affiliate click
Register an affiliate click. Used by custom checkouts that are completely API based and do not perform checkout handoff.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
register_affiliate_click_request = UltracartClient::RegisterAffiliateClickRequest.new # RegisterAffiliateClickRequest | Register affiliate click request
opts = {
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
}
begin
#Register affiliate click
result = api_instance.register_affiliate_click(register_affiliate_click_request, opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->register_affiliate_click: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
register_affiliate_click_request | RegisterAffiliateClickRequest | Register affiliate click request | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
RegisterAffiliateClickResponse
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
ItemsResponse related_items_for_cart(cart, opts)
Related items
Retrieve all the related items for the cart contents. Expansion is limited to content, content.assignments, content.attributes, content.multimedia, content.multimedia.thumbnails, options, pricing, and pricing.tiers.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
cart = UltracartClient::Cart.new # Cart | Cart
opts = {
_expand: '_expand_example' # String | The object expansion to perform on the result. See item resource documentation for examples
}
begin
#Related items
result = api_instance.related_items_for_cart(cart, opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->related_items_for_cart: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
cart | Cart | Cart | |
_expand | String | The object expansion to perform on the result. See item resource documentation for examples | [optional] |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
ItemsResponse related_items_for_item(item_id, cart, opts)
Related items (specific item)
Retrieve all the related items for the cart contents. Expansion is limited to content, content.assignments, content.attributes, content.multimedia, content.multimedia.thumbnails, options, pricing, and pricing.tiers.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
item_id = 'item_id_example' # String | Item ID to retrieve related items for
cart = UltracartClient::Cart.new # Cart | Cart
opts = {
_expand: '_expand_example' # String | The object expansion to perform on the result. See item resource documentation for examples
}
begin
#Related items (specific item)
result = api_instance.related_items_for_item(item_id, cart, opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->related_items_for_item: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
item_id | String | Item ID to retrieve related items for | |
cart | Cart | Cart | |
_expand | String | The object expansion to perform on the result. See item resource documentation for examples | [optional] |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CheckoutSetupBrowserKeyResponse setup_browser_key(browser_key_request)
Setup Browser Application
Setup a browser key authenticated application with checkout permissions. This REST call must be made with an authentication scheme that is not browser key. The new application will be linked to the application that makes this call. If this application is disabled / deleted, then so will the application setup by this call. The purpose of this call is to allow an OAuth application, such as the Wordpress plugin, to setup the proper browser based authentication for the REST checkout API to use.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
browser_key_request = UltracartClient::CheckoutSetupBrowserKeyRequest.new # CheckoutSetupBrowserKeyRequest | Setup browser key request
begin
#Setup Browser Application
result = api_instance.setup_browser_key(browser_key_request)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->setup_browser_key: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
browser_key_request | CheckoutSetupBrowserKeyRequest | Setup browser key request |
CheckoutSetupBrowserKeyResponse
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CartResponse update_cart(cart, opts)
Update cart
Update the cart.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
cart = UltracartClient::Cart.new # Cart | Cart
opts = {
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
}
begin
#Update cart
result = api_instance.update_cart(cart, opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->update_cart: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
cart | Cart | Cart | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
CartValidationResponse validate_cart(validation_request, opts)
Validate
Validate the cart for errors. Specific checks can be passed and multiple validations can occur throughout your checkout flow.
# load the gem
require 'ultracart_api'
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
api_instance = UltracartClient::CheckoutApi.new_using_api_key(simple_key, false, false)
validation_request = UltracartClient::CartValidationRequest.new # CartValidationRequest | Validation request
opts = {
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
}
begin
#Validate
result = api_instance.validate_cart(validation_request, opts)
p result
rescue UltracartClient::ApiError => e
puts "Exception when calling CheckoutApi->validate_cart: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
validation_request | CartValidationRequest | Validation request | |
_expand | String | The object expansion to perform on the result. See documentation for examples | [optional] |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json