Skip to content

Latest commit

 

History

History
1023 lines (661 loc) · 31.5 KB

CheckoutApi.md

File metadata and controls

1023 lines (661 loc) · 31.5 KB

UltracartClient::CheckoutApi

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

city_state

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

Example

# 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

Parameters

Name Type Description Notes
cart Cart Cart

Return type

CityStateZip

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

finalize_order

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.

Example

# 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

Parameters

Name Type Description Notes
finalize_request CartFinalizeOrderRequest Finalize request

Return type

CartFinalizeOrderResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_affirm_checkout

CartAffirmCheckoutResponse get_affirm_checkout(cart_id)

Get affirm checkout (by cart id)

Get a Affirm checkout object for the specified cart_id parameter.

Example

# 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

Parameters

Name Type Description Notes
cart_id String Cart ID to retrieve

Return type

CartAffirmCheckoutResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_allowed_countries

CheckoutAllowedCountriesResponse get_allowed_countries

Allowed countries

Lookup the allowed countries for this merchant id

Example

# 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

Parameters

This endpoint does not need any parameter.

Return type

CheckoutAllowedCountriesResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_cart

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.

Example

# 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

Parameters

Name Type Description Notes
_expand String The object expansion to perform on the result. See documentation for examples [optional]

Return type

CartResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_cart_by_cart_id

CartResponse get_cart_by_cart_id(cart_id, opts)

Get cart (by cart id)

Get a cart specified by the cart_id parameter.

Example

# 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

Parameters

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]

Return type

CartResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_cart_by_return_code

CartResponse get_cart_by_return_code(return_code, opts)

Get cart (by return code)

Get a cart specified by the return code parameter.

Example

# 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

Parameters

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]

Return type

CartResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_cart_by_return_token

CartResponse get_cart_by_return_token(opts)

Get cart (by return token)

Get a cart specified by the encrypted return token parameter.

Example

# 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

Parameters

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]

Return type

CartResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_state_provinces_for_country

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

Example

# 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

Parameters

Name Type Description Notes
country_code String Two letter ISO country code

Return type

CheckoutStateProvinceResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

handoff_cart

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

Example

# 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

Parameters

Name Type Description Notes
handoff_request CheckoutHandoffRequest Handoff request
_expand String The object expansion to perform on the result. See documentation for examples [optional]

Return type

CheckoutHandoffResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

login

CartProfileLoginResponse login(login_request, opts)

Profile login

Login in to the customer profile specified by cart.billing.email and password

Example

# 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

Parameters

Name Type Description Notes
login_request CartProfileLoginRequest Login request
_expand String The object expansion to perform on the result. See documentation for examples [optional]

Return type

CartProfileLoginResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

logout

CartResponse logout(cart, opts)

Profile logout

Log the cart out of the current profile. No error will occur if they are not logged in.

Example

# 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

Parameters

Name Type Description Notes
cart Cart Cart
_expand String The object expansion to perform on the result. See documentation for examples [optional]

Return type

CartResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

register

CartProfileRegisterResponse register(register_request, opts)

Profile registration

Register a new customer profile. Requires the cart.billing object to be populated along with the password.

Example

# 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

Parameters

Name Type Description Notes
register_request CartProfileRegisterRequest Register request
_expand String The object expansion to perform on the result. See documentation for examples [optional]

Return type

CartProfileRegisterResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

register_affiliate_click

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.

Example

# 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

Parameters

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]

Return type

RegisterAffiliateClickResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

related_items_for_cart

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.

Example

# 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

Parameters

Name Type Description Notes
cart Cart Cart
_expand String The object expansion to perform on the result. See item resource documentation for examples [optional]

Return type

ItemsResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

related_items_for_item

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.

Example

# 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

Parameters

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]

Return type

ItemsResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

setup_browser_key

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.

Example

# 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

Parameters

Name Type Description Notes
browser_key_request CheckoutSetupBrowserKeyRequest Setup browser key request

Return type

CheckoutSetupBrowserKeyResponse

Authorization

ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

update_cart

CartResponse update_cart(cart, opts)

Update cart

Update the cart.

Example

# 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

Parameters

Name Type Description Notes
cart Cart Cart
_expand String The object expansion to perform on the result. See documentation for examples [optional]

Return type

CartResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

validate_cart

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.

Example

# 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

Parameters

Name Type Description Notes
validation_request CartValidationRequest Validation request
_expand String The object expansion to perform on the result. See documentation for examples [optional]

Return type

CartValidationResponse

Authorization

ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json