All URIs are relative to https://secure.ultracart.com/rest/v2
Method | HTTP request | Description |
---|---|---|
CityState | POST /checkout/city_state | City/State for Zip |
FinalizeOrder | POST /checkout/cart/finalizeOrder | Finalize Order |
GetAffirmCheckout | GET /checkout/cart/{cart_id}/affirmCheckout | Get affirm checkout (by cart id) |
GetAllowedCountries | POST /checkout/allowedCountries | Allowed countries |
GetCart | GET /checkout/cart | Get cart |
GetCartByCartId | GET /checkout/cart/{cart_id} | Get cart (by cart id) |
GetCartByReturnCode | GET /checkout/return/{return_code} | Get cart (by return code) |
GetCartByReturnToken | GET /checkout/return_token | Get cart (by return token) |
GetStateProvincesForCountry | POST /checkout/stateProvincesForCountry/{country_code} | Get state/province list for a country code |
HandoffCart | 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 |
RegisterAffiliateClick | POST /checkout/affiliateClick/register | Register affiliate click |
RelatedItemsForCart | POST /checkout/related_items | Related items |
RelatedItemsForItem | POST /checkout/relatedItems/{item_id} | Related items (specific item) |
SetupBrowserKey | PUT /checkout/browser_key | Setup Browser Application |
UpdateCart | PUT /checkout/cart | Update cart |
ValidateCart | POST /checkout/cart/validate | Validate |
CityStateZip CityState (Cart 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
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class CityStateExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var cart = new Cart(); // Cart | Cart
try
{
// City/State for Zip
CityStateZip result = apiInstance.CityState(cart);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.CityState: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
cart | Cart | Cart |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CartFinalizeOrderResponse FinalizeOrder (CartFinalizeOrderRequest finalizeRequest)
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.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class FinalizeOrderExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var finalizeRequest = new CartFinalizeOrderRequest(); // CartFinalizeOrderRequest | Finalize request
try
{
// Finalize Order
CartFinalizeOrderResponse result = apiInstance.FinalizeOrder(finalizeRequest);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.FinalizeOrder: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
finalizeRequest | CartFinalizeOrderRequest | Finalize request |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CartAffirmCheckoutResponse GetAffirmCheckout (string cartId)
Get affirm checkout (by cart id)
Get a Affirm checkout object for the specified cart_id parameter.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class GetAffirmCheckoutExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var cartId = cartId_example; // string | Cart ID to retrieve
try
{
// Get affirm checkout (by cart id)
CartAffirmCheckoutResponse result = apiInstance.GetAffirmCheckout(cartId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.GetAffirmCheckout: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
cartId | string | Cart ID to retrieve |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CheckoutAllowedCountriesResponse GetAllowedCountries ()
Allowed countries
Lookup the allowed countries for this merchant id
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class GetAllowedCountriesExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
try
{
// Allowed countries
CheckoutAllowedCountriesResponse result = apiInstance.GetAllowedCountries();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.GetAllowedCountries: " + e.Message );
}
}
}
}
This endpoint does not need any parameter.
CheckoutAllowedCountriesResponse
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CartResponse GetCart (string expand = null)
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.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class GetCartExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var expand = expand_example; // string | The object expansion to perform on the result. See documentation for examples (optional)
try
{
// Get cart
CartResponse result = apiInstance.GetCart(expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.GetCart: " + e.Message );
}
}
}
}
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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CartResponse GetCartByCartId (string cartId, string expand = null)
Get cart (by cart id)
Get a cart specified by the cart_id parameter.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class GetCartByCartIdExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var cartId = cartId_example; // string | Cart ID to retrieve
var expand = expand_example; // string | The object expansion to perform on the result. See documentation for examples (optional)
try
{
// Get cart (by cart id)
CartResponse result = apiInstance.GetCartByCartId(cartId, expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.GetCartByCartId: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
cartId | 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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CartResponse GetCartByReturnCode (string returnCode, string expand = null)
Get cart (by return code)
Get a cart specified by the return code parameter.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class GetCartByReturnCodeExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var returnCode = returnCode_example; // string | Return code to lookup cart ID by
var expand = expand_example; // string | The object expansion to perform on the result. See documentation for examples (optional)
try
{
// Get cart (by return code)
CartResponse result = apiInstance.GetCartByReturnCode(returnCode, expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.GetCartByReturnCode: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
returnCode | 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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CartResponse GetCartByReturnToken (string returnToken = null, string expand = null)
Get cart (by return token)
Get a cart specified by the encrypted return token parameter.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class GetCartByReturnTokenExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var returnToken = returnToken_example; // string | Return token provided by StoreFront Communications (optional)
var expand = expand_example; // string | The object expansion to perform on the result. See documentation for examples (optional)
try
{
// Get cart (by return token)
CartResponse result = apiInstance.GetCartByReturnToken(returnToken, expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.GetCartByReturnToken: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
returnToken | 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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CheckoutStateProvinceResponse GetStateProvincesForCountry (string countryCode)
Get state/province list for a country code
Lookup a state/province list for a given country code
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class GetStateProvincesForCountryExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var countryCode = countryCode_example; // string | Two letter ISO country code
try
{
// Get state/province list for a country code
CheckoutStateProvinceResponse result = apiInstance.GetStateProvincesForCountry(countryCode);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.GetStateProvincesForCountry: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
countryCode | string | Two letter ISO country code |
ultraCartBrowserApiKey, ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CheckoutHandoffResponse HandoffCart (CheckoutHandoffRequest handoffRequest, string expand = null)
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).
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class HandoffCartExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var handoffRequest = new CheckoutHandoffRequest(); // CheckoutHandoffRequest | Handoff request
var expand = expand_example; // string | The object expansion to perform on the result. See documentation for examples (optional)
try
{
// Handoff cart
CheckoutHandoffResponse result = apiInstance.HandoffCart(handoffRequest, expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.HandoffCart: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
handoffRequest | 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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CartProfileLoginResponse Login (CartProfileLoginRequest loginRequest, string expand = null)
Profile login
Login in to the customer profile specified by cart.billing.email and password
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class LoginExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var loginRequest = new CartProfileLoginRequest(); // CartProfileLoginRequest | Login request
var expand = expand_example; // string | The object expansion to perform on the result. See documentation for examples (optional)
try
{
// Profile login
CartProfileLoginResponse result = apiInstance.Login(loginRequest, expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.Login: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
loginRequest | 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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CartResponse Logout (Cart cart, string expand = null)
Profile logout
Log the cart out of the current profile. No error will occur if they are not logged in.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class LogoutExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var cart = new Cart(); // Cart | Cart
var expand = expand_example; // string | The object expansion to perform on the result. See documentation for examples (optional)
try
{
// Profile logout
CartResponse result = apiInstance.Logout(cart, expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.Logout: " + e.Message );
}
}
}
}
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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CartProfileRegisterResponse Register (CartProfileRegisterRequest registerRequest, string expand = null)
Profile registration
Register a new customer profile. Requires the cart.billing object to be populated along with the password.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class RegisterExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var registerRequest = new CartProfileRegisterRequest(); // CartProfileRegisterRequest | Register request
var expand = expand_example; // string | The object expansion to perform on the result. See documentation for examples (optional)
try
{
// Profile registration
CartProfileRegisterResponse result = apiInstance.Register(registerRequest, expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.Register: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
registerRequest | 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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RegisterAffiliateClickResponse RegisterAffiliateClick (RegisterAffiliateClickRequest registerAffiliateClickRequest, string expand = null)
Register affiliate click
Register an affiliate click. Used by custom checkouts that are completely API based and do not perform checkout handoff.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class RegisterAffiliateClickExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var registerAffiliateClickRequest = new RegisterAffiliateClickRequest(); // RegisterAffiliateClickRequest | Register affiliate click request
var expand = expand_example; // string | The object expansion to perform on the result. See documentation for examples (optional)
try
{
// Register affiliate click
RegisterAffiliateClickResponse result = apiInstance.RegisterAffiliateClick(registerAffiliateClickRequest, expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.RegisterAffiliateClick: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
registerAffiliateClickRequest | 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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ItemsResponse RelatedItemsForCart (Cart cart, string expand = null)
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.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class RelatedItemsForCartExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var cart = new Cart(); // Cart | Cart
var expand = expand_example; // string | The object expansion to perform on the result. See item resource documentation for examples (optional)
try
{
// Related items
ItemsResponse result = apiInstance.RelatedItemsForCart(cart, expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.RelatedItemsForCart: " + e.Message );
}
}
}
}
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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ItemsResponse RelatedItemsForItem (string itemId, Cart cart, string expand = null)
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.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class RelatedItemsForItemExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var itemId = itemId_example; // string | Item ID to retrieve related items for
var cart = new Cart(); // Cart | Cart
var expand = expand_example; // string | The object expansion to perform on the result. See item resource documentation for examples (optional)
try
{
// Related items (specific item)
ItemsResponse result = apiInstance.RelatedItemsForItem(itemId, cart, expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.RelatedItemsForItem: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
itemId | 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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CheckoutSetupBrowserKeyResponse SetupBrowserKey (CheckoutSetupBrowserKeyRequest browserKeyRequest)
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.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class SetupBrowserKeyExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var browserKeyRequest = new CheckoutSetupBrowserKeyRequest(); // CheckoutSetupBrowserKeyRequest | Setup browser key request
try
{
// Setup Browser Application
CheckoutSetupBrowserKeyResponse result = apiInstance.SetupBrowserKey(browserKeyRequest);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.SetupBrowserKey: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
browserKeyRequest | CheckoutSetupBrowserKeyRequest | Setup browser key request |
CheckoutSetupBrowserKeyResponse
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CartResponse UpdateCart (Cart cart, string expand = null)
Update cart
Update the cart.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class UpdateCartExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var cart = new Cart(); // Cart | Cart
var expand = expand_example; // string | The object expansion to perform on the result. See documentation for examples (optional)
try
{
// Update cart
CartResponse result = apiInstance.UpdateCart(cart, expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.UpdateCart: " + e.Message );
}
}
}
}
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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CartValidationResponse ValidateCart (CartValidationRequest validationRequest, string expand = null)
Validate
Validate the cart for errors. Specific checks can be passed and multiple validations can occur throughout your checkout flow.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class ValidateCartExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new CheckoutApi(simpleKey);
var validationRequest = new CartValidationRequest(); // CartValidationRequest | Validation request
var expand = expand_example; // string | The object expansion to perform on the result. See documentation for examples (optional)
try
{
// Validate
CartValidationResponse result = apiInstance.ValidateCart(validationRequest, expand);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CheckoutApi.ValidateCart: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
validationRequest | 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
[Back to top] [Back to API list] [Back to Model list] [Back to README]