Resource Reference Guide
Cortex resources model the fundamental aspects of ecommerce with each resource encapsulating a single part of the ecommerce process. For example, Cortex has resources for: items, prices, carts, orders, purchases, profiles and many more that are listed below.
Resources are linked together with other related resources into workflows that can be used to perform an action. For example, the workflow to create a new address for a shopper involves retrieving the default profile resource, following the addresses link, and then following the link to the addressform link which is used to create the new address. By following these workflows, you can perform actions such as add an item to a cart, purchase, register a shopper account, perform a search and so on.
addresses
The Addresses resource is responsible for the customer's shipping and billing address. This resource allows you to retrieve a logged in customer's addresses, edit existing addresses, and create new addresses.
Shipping Address vs. Billing Addresses
A shipping address is where you ship the physical goods that you purchased in the store. A billing address is the address associated with the paymentmethods used for a purchase. For example, the billing address would be the address on the credit card that is being used for a purchase. Customers choose which billing and shipping address to use for a purchase through the orders resources.
Currently you cannot create an address and label it as a shipping only address or label it as a billing only address. Cortex does not make a distinction between the shipping and billing addresses. Read Billing Address billing addresses retrieves a list of all the customer's addresses; similarly, Read Shipping Address retrieves a list of all the customer's addresses. Future versions of the API may allow the possibility to label what the address is for, but out of the box this API version does not support this functionality.
Read an address from a list of addresses.
Workflow
- Start with profile.
- Read link following rel: addresses.
- Read link following rel: element.
- Render response.
Response Fields
Type: addresses.address
Name |
Description |
Type |
"name": |
The customer name. |
object
|
"given-name": |
The person's given name. |
string
|
"family-name": |
The person's family name. |
string
|
"address": |
The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. |
object
|
"street-address": |
The street address. |
string
|
"extended-address": |
Extra field for address information. This field is optional. |
string
|
"locality": |
The city name. |
string
|
"region": |
Valid region codes for this field can be retrieved using the Geographies Resource. |
string
|
"postal-code": |
Postal code or zip code. |
string
|
"country-name": |
Valid country codes for this field can be retrieved using the Geographies Resource. |
string
|
"phone-number": |
Phone number |
string
|
"organization": |
The organization |
string
|
Read a shipping address from a list of shipping addresses.
Workflow
- Start with profile.
- Read link following rel: addresses.
- Read link following rel: shippingaddresses.
- Read link following rel: element.
- Render response.
Response Fields
Type: addresses.address
Name |
Description |
Type |
"name": |
The customer name. |
object
|
"given-name": |
The person's given name. |
string
|
"family-name": |
The person's family name. |
string
|
"address": |
The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. |
object
|
"street-address": |
The street address. |
string
|
"extended-address": |
Extra field for address information. This field is optional. |
string
|
"locality": |
The city name. |
string
|
"region": |
Valid region codes for this field can be retrieved using the Geographies Resource. |
string
|
"postal-code": |
Postal code or zip code. |
string
|
"country-name": |
Valid country codes for this field can be retrieved using the Geographies Resource. |
string
|
"phone-number": |
Phone number |
string
|
"organization": |
The organization |
string
|
Read the profile linked to the shipping address. The workflow starts with the shipping address and then links to the profile.
Workflow
- Start with shipping-addresses.
- Read link following rel: profile.
- Render response.
Response Fields
Type: profiles.profile
Name |
Description |
Type |
"given-name": |
Customer's first name. |
string
|
"family-name": |
Customer's last name. |
string
|
Read the customer's default shipping addresses.
Workflow
- Start with profile.
- Read link following rel: addresses.
- Read link following rel: shippingaddresses.
- Read link following rel: default.
- Render response.
Response Fields
Type: addresses.address
Name |
Description |
Type |
"name": |
The customer name. |
object
|
"given-name": |
The person's given name. |
string
|
"family-name": |
The person's family name. |
string
|
"address": |
The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. |
object
|
"street-address": |
The street address. |
string
|
"extended-address": |
Extra field for address information. This field is optional. |
string
|
"locality": |
The city name. |
string
|
"region": |
Valid region codes for this field can be retrieved using the Geographies Resource. |
string
|
"postal-code": |
Postal code or zip code. |
string
|
"country-name": |
Valid country codes for this field can be retrieved using the Geographies Resource. |
string
|
"phone-number": |
Phone number |
string
|
"organization": |
The organization |
string
|
Read billing addresses from the list of billing addresses.
Workflow
- Start with profile.
- Read link following rel: addresses.
- Read link following rel: billingaddresses.
- Read link following rel: element.
- Render response.
Response Fields
Type: addresses.address
Name |
Description |
Type |
"name": |
The customer name. |
object
|
"given-name": |
The person's given name. |
string
|
"family-name": |
The person's family name. |
string
|
"address": |
The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. |
object
|
"street-address": |
The street address. |
string
|
"extended-address": |
Extra field for address information. This field is optional. |
string
|
"locality": |
The city name. |
string
|
"region": |
Valid region codes for this field can be retrieved using the Geographies Resource. |
string
|
"postal-code": |
Postal code or zip code. |
string
|
"country-name": |
Valid country codes for this field can be retrieved using the Geographies Resource. |
string
|
"phone-number": |
Phone number |
string
|
"organization": |
The organization |
string
|
Read the profile linked to the billing address. The workflow starts with the billing address and then links to the profile.
Workflow
- Start with billing-addresses.
- Read link following rel: profile.
- Render response.
Response Fields
Type: profiles.profile
Name |
Description |
Type |
"given-name": |
Customer's first name. |
string
|
"family-name": |
Customer's last name. |
string
|
Read the customer's default billing addresses.
Workflow
- Start with profile.
- Read link following rel: addresses.
- Read link following rel: billingaddresses.
- Read link following rel: default.
- Render response.
Response Fields
Type: addresses.address
Name |
Description |
Type |
"name": |
The customer name. |
object
|
"given-name": |
The person's given name. |
string
|
"family-name": |
The person's family name. |
string
|
"address": |
The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. |
object
|
"street-address": |
The street address. |
string
|
"extended-address": |
Extra field for address information. This field is optional. |
string
|
"locality": |
The city name. |
string
|
"region": |
Valid region codes for this field can be retrieved using the Geographies Resource. |
string
|
"postal-code": |
Postal code or zip code. |
string
|
"country-name": |
Valid country codes for this field can be retrieved using the Geographies Resource. |
string
|
"phone-number": |
Phone number |
string
|
"organization": |
The organization |
string
|
Delete an address.
If the address was selected to use in an order and the address is deleted, the order will show a NeedInfo link.
Workflow
- Start with profile.
- Read link following rel: addresses.
- Read link following rel: element.
- Delete address.
Update an address.
Workflow
- Start with profile.
- Read link following rel: addresses.
- Read link following rel: element.
- Edit the address object with new detail(s).
- Update address.
Create an address.
Workflow
- Start with profile.
- Read link following rel: addresses.
- Read link following rel: addressform.
- Fill out the form.
- Create form to link rel: createaddressaction.
Display the item and line item's availability. The availability identifies the item's purchasability. For example, in Elastic Path Commerce Engine the following states are available:
- ALWAYS
- NOT_AVAILABLE
- AVAILABLE_FOR_BACK_ORDER
- AVAILABLE_FOR_PRE_ORDER
Read a line item's availability. The availability rule identifies the purchasable state of the item(s) in the line item.
Workflow
- Start with cart.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: availability.
- Render response.
Response Fields
Type: availabilities.availability
Name |
Description |
Type |
"state": |
The state of availability for an item or line item. In Elastic Path Commerce Engine, the states are:
- ALWAYS
- NOT_AVAILABLE
- AVAILABLE_FOR_BACK_ORDER
- AVAILABLE_FOR_PRE_ORDER
|
string
|
"release-date": |
Optional property. This is the date the item becomes available for purchase. In Elastic Path Commerce Engine, release-date is only visible when the item is available for pre-order. |
object
|
"value": |
The millisecond value of the date in Epoch time. |
long
|
"display-value": |
The formatted date value to display on the client application. |
string
|
Read an item's availability. The availability rule identifies the item's purchasability.
Workflow
- Start with item.
- Read link following rel: availability.
- Render response.
Response Fields
Type: availabilities.availability
Name |
Description |
Type |
"state": |
The state of availability for an item or line item. In Elastic Path Commerce Engine, the states are:
- ALWAYS
- NOT_AVAILABLE
- AVAILABLE_FOR_BACK_ORDER
- AVAILABLE_FOR_PRE_ORDER
|
string
|
"release-date": |
Optional property. This is the date the item becomes available for purchase. In Elastic Path Commerce Engine, release-date is only visible when the item is available for pre-order. |
object
|
"value": |
The millisecond value of the date in Epoch time. |
long
|
"display-value": |
The formatted date value to display on the client application. |
string
|
Entry Point: /carts/{scope}/default
A cart is basically a basket that customers put items into that they want to purchase. While Cortex API's shopping cart has this as its core functionality, there is much more to this shopping cart than just that.
Key concepts developers should know about carts:
You can't delete a cart, you can only empty a cart of its contents.
The do not need to instantiate the cart, a cart is always available.
The do not need to create an order for the cart, an order is always available.
Cortex automatically persists carts between customer sessions so a customer can log on through a mobile phone and then log on through another device to complete the purchase
Cart memberships resource
A cart's line items is a collection of items that have been added to a cart. A line item can have one or more of the same items in it. For example, one line item can have seven Rocker T-Shirt or a single Rocker T-Shirt, but it won't have one Rocker T-Shirt and a song track. The song track and T-shirt would be in separate line items.
Items are added to the user's default cart by using a form.
Retrieve a single line item from a shopper's cart.
Workflow
- Start with cart.
- Read link following rel: lineitems.
- Read link following rel: element.
- Render response.
Response Fields
Type: carts.line-item
Name |
Description |
Type |
"quantity": |
The total number of items in the line item. |
integer
|
"configuration": |
The details of the line item configuration. |
object
|
Update the number of items in a line item. For example, if you have 4 Rockstar T-Shirts in a line item, you can use this method to remove 3 of the t-shirts and leave 1 T-shirt in the cart.
Workflow
- Start with cart.
- Read link following rel: lineitems.
- Read link following rel: element.
- Edit the line-item object with new detail(s).
- Update line-item.
Delete a line item from the cart.
Workflow
- Start with cart.
- Read link following rel: lineitems.
- Read link following rel: element.
- Delete line-item.
Remove all line items from the cart.
Workflow
- Start with cart.
- Read link following rel: lineitems.
- Delete line-items.
Add an item to the user's default cart.
Workflow
- Start with item.
- Read link following rel: addtocartform.
- Fill out the form.
- Create form to link rel: addtodefaultcartaction.
Retrieve the cart that has the given line item. This workflow is useful when you need to determine which cart the line item belongs to.
Workflow
- Start with [line-item][line-item].
- Read link following rel: cart.
- Render response.
Response Fields
Type: carts.cart
Name |
Description |
Type |
"total-quantity": |
Lists the total number of items in the cart. |
integer
|
Retrieve the shopper's default cart. When using default in the cart's URI, default evaluates to the logged in shopper's cart I.D. See the main Cortex documentation for more information on default.
Workflow
- Start with default-cart.
- Render response.
Response Fields
Type: carts.cart
Name |
Description |
Type |
"total-quantity": |
Lists the total number of items in the cart. |
integer
|
Retrieve a cart with a specific cart identifier.
Workflow
- Start with cart.
- Render response.
Response Fields
Type: carts.cart
Name |
Description |
Type |
"total-quantity": |
Lists the total number of items in the cart. |
integer
|
Retrieves the list of carts that the item has been added to.
GET:{cortex}/carts/memberships/{item_uri}
The list is empty if the item is not in your cart.
Workflow
- Start with item.
- Read link following rel: cartmemberships.
- Render response.
Response Fields
A coupon is a code, consisting of letters or numbers that a shopper can apply to an order. When a coupon is applied to an order, it can trigger a promotion which inturn discounts or adds additional incentives to the order.
Coupons for an order can be managed through the coupon info resource. This is where coupons that are applied to an order are listed, as well as a form to apply new coupons. Each coupon is linked to the promotions it triggered. If no promotions were triggered then no promotion link will be present.
Coupons for a purchase are coupons that were applied to the shopper's purchase.
Read coupons applied to the order.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: couponinfo.
- Read link following rel: coupon.
- Render response.
Response Fields
Type: coupons.coupon
Name |
Description |
Type |
"code": |
The coupon code. |
string
|
Apply a coupon to the order.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: couponinfo.
- Read link following rel: couponform.
- Fill out the form.
- Create form to link rel: applycouponaction.
Remove an applied coupon from the order.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: couponinfo.
- Read link following rel: coupon.
- Delete order-coupon.
Read a coupon applied to the purchase.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: coupons.
- Read link following rel: element.
- Render response.
Response Fields
Type: coupons.coupon
Name |
Description |
Type |
"code": |
The coupon code. |
string
|
The Discounts resource provides the discount amount for a cart or the discount amount for a purchase.
Retrieve the discount amount applied to a cart total, excluding line item discounts.
Workflow
- Start with cart.
- Read link following rel: discount.
- Render response.
Response Fields
Type: discounts.discount
Name |
Description |
Type |
"discount": |
The amount of the discount. Similar to prices, discount is an array because the total may be a combination of amounts in multiple currencies, for example $20 CAD + 20000 points. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Retrieve the discount amount applied to a purchase.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: discount.
- Render response.
Response Fields
Type: discounts.discount
Name |
Description |
Type |
"discount": |
The amount of the discount. Similar to prices, discount is an array because the total may be a combination of amounts in multiple currencies, for example $20 CAD + 20000 points. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
The emails resource stores a customer's emails.
Add an email to a logged in customer.
Out of the box, customers can have only one email, which is their user name. If you create a new email for a registered customer, this changes the customer's user name.
Read an email from a list of the customer's emails.
Workflow
- Start with profile.
- Read link following rel: emails.
- Read link following rel: element.
- Render response.
Response Fields
Type: emails.email
Name |
Description |
Type |
"email": |
The email address. |
string
|
Add an email to a logged in customer. Out of the box, customers can have only one email, which is their user name. If you create a new email for a registered customer, this changes the customer's user name.
Workflow
- Start with profile.
- Read link following rel: emails.
- Read link following rel: emailform.
- Fill out the form.
- Create form to link rel: createemailaction.
Entry Point: /geographies/{scope}/countries
The geographies resource provides access to location related data, including lists of countries, and lists of regions by country.
Retrieve a list of countries available to a scope.
Workflow
- Start with countries.
- Render response.
Response Fields
Read a single country.
Workflow
- Start with countries.
- Read link following rel: element.
- Render response.
Response Fields
Type: geographies.country
Name |
Description |
Type |
"name": |
The name or code of the country. |
string
|
"display-name": |
The localized country name, intended for display in the client application. |
string
|
Read a single region in a country.
Workflow
- Start with countries.
- Read link following rel: element.
- Read link following rel: regions.
- Read link following rel: element.
- Render response.
Response Fields
Type: geographies.region
Name |
Description |
Type |
"name": |
The name or code of the region. |
string
|
"display-name": |
The localized region name, intended for display in the client application. |
string
|
An item definition describes the item. The item's name, media assets (pictures of the item), options, components, from price, and details describing the item's characteristics are all part of the item definitions. Not every item definition contains assets, options, components, etc. What is available on the item definition depends on the item and how your storefront has implemented Cortex API. Some resources may be customized for your implementation, so more, or even less details may exist.
Read the item definition component from the list of available components.
Workflow
- Start with item.
- Read link following rel: definition.
- Read link following rel: components.
- Read link following rel: element.
- Render response.
Response Fields
Type: elasticpath.itemdefinitions.component
Name |
Description |
Type |
"display-name": |
The localized name of the item definition component, intended for display in the client application. |
string
|
"details": |
The details of the item definition component. |
array
|
"display-name": |
The formatted string to display on the client. |
string
|
"name": |
The name used by the Cortex system. |
string
|
"display-value": |
The formatted string to display on the client. |
string
|
"value": |
The raw value. |
any
|
"quantity": |
The quantity of components. |
integer
|
Read an single nested item definition component.
Workflow
- Start with item.
- Read link following rel: definition.
- Read link following rel: components.
- Read link following rel: element.
- Read link following rel: components.
- Read link following rel: element.
- Render response.
Response Fields
Type: elasticpath.itemdefinitions.component
Name |
Description |
Type |
"display-name": |
The localized name of the item definition component, intended for display in the client application. |
string
|
"details": |
The details of the item definition component. |
array
|
"display-name": |
The formatted string to display on the client. |
string
|
"name": |
The name used by the Cortex system. |
string
|
"display-value": |
The formatted string to display on the client. |
string
|
"value": |
The raw value. |
any
|
"quantity": |
The quantity of components. |
integer
|
Read the component's stand alone item. Some components can be purchased separately.
Workflow
- Start with item.
- Read link following rel: definition.
- Read link following rel: components.
- Read link following rel: element.
- Read link following rel: standaloneitem.
- Render response.
Response Fields
None.
Read the item definition from the item.
Workflow
- Start with item.
- Read link following rel: definition.
- Render response.
Response Fields
Type: elasticpath.itemdefinitions.item-definition
Name |
Description |
Type |
"display-name": |
The localized name of the item definition, intended for display in the client application. |
string
|
"details": |
The details of the item definition. |
array
|
"display-name": |
The formatted string to display on the client. |
string
|
"name": |
The name used by the Cortex system. |
string
|
"display-value": |
The formatted string to display on the client. |
string
|
"value": |
The raw value. |
any
|
Read the item definition option from the list of available options.
Workflow
- Start with item.
- Read link following rel: definition.
- Read link following rel: options.
- Read link following rel: element.
- Render response.
Response Fields
Type: elasticpath.itemdefinitions.option
Name |
Description |
Type |
"display-name": |
The localized name of the item definition option, intended for display in the client application. |
string
|
"name": |
The name of the item definition option. |
string
|
Read the item definition option value.
Workflow
- Start with item.
- Read link following rel: definition.
- Read link following rel: options.
- Read link following rel: element.
- Read link following rel: value.
- Render response.
Response Fields
Type: elasticpath.itemdefinitions.value
Name |
Description |
Type |
"display-name": |
The localized name of the item definition option value, intended for display in the client application. |
string
|
"name": |
The name of the item definition option value. |
string
|
An item is a purchasable good like a T-shirt, a movie, a song, a subscription, etc. The Items resource's responsibility is to simply identify an item. This should not be confused with itemdefinitions, which are descriptions of the item.
Items can be discovered by using the following resources:
Retrieve an item with a specific item ID.
Workflow
- Start with item.
- Render response.
Response Fields
None.
The Items selections resource provides Selectors to allow customers to select item options.
The Items selections resource provides a selector to allow customers to select item options.
Select an item definition option.
Workflow
- Start with item.
- Read link following rel: definition.
- Read link following rel: options.
- Read link following rel: element.
- Read link following rel: selector.
- Read link following rel: chosen.
- Create choice to link rel: selectaction.
A lookup is a means of looking up an item.
Search for an item by item code.
Workflow
- Start with lookups.
- Read link following rel: itemlookupform.
- Fill out the form.
- Create form to link rel: itemlookupaction.
Read the code of an item.
Workflow
- Start with item.
- Read link following rel: code.
- Render response.
Response Fields
Type: elasticpath.lookups.code
Name |
Description |
Type |
"code": |
The sku code. |
string
|
Look up a batch of items with a list of codes.
Workflow
- Start with lookups.
- Read link following rel: batchitemslookupform.
- Fill out the form.
- Create form to link rel: batchlookupaction.
Entry Point: /navigations/{scope}
Navigation nodes organize your store's catalogs by providing containers to group related items into. Each navigation node can contain details (attributes), any number of items, and other child nodes. Your company's marketers create these navigation nodes, also known as categories, using the Commerce Manager. You may need to coordinate with your marketers for how the navigation nodes should be used in your client application.
Read a single navigation node.
Workflow
- Start with navigations.
- Read link following rel: element.
- Render response.
Response Fields
Type: elasticpath.navigations.node
Name |
Description |
Type |
"name": |
The Cortex system's name for the node. |
string
|
"display-name": |
The localized name of the node, intended for display in the client application. |
string
|
"details": |
An array of the navigation node's attributes. Attributes describe the details of the navigation node, like the node's name, description, associated subcategories, etc. Attributes are different each store. To get a list of navigation attributes, you'll need to coordinate with your store marketer who creates these navigation nodes and attributes. |
array
|
"display-name": |
The formatted string to display on the client. |
string
|
"name": |
The name used by the Cortex system. |
string
|
"display-value": |
The formatted string to display on the client. |
string
|
"value": |
The raw value. |
any
|
Retrieve a paginated list of items associated with the navigation node.
Workflow
- Start with [navigation][navigation].
- Read link following rel: items.
- Read link following rel: element.
- Render response.
Response Fields
None.
Read a navigation node's child node.
Workflow
- Start with [navigation][navigation].
- Read link following rel: child.
- Render response.
Response Fields
Type: elasticpath.navigations.node
Name |
Description |
Type |
"name": |
The Cortex system's name for the node. |
string
|
"display-name": |
The localized name of the node, intended for display in the client application. |
string
|
"details": |
An array of the navigation node's attributes. Attributes describe the details of the navigation node, like the node's name, description, associated subcategories, etc. Attributes are different each store. To get a list of navigation attributes, you'll need to coordinate with your store marketer who creates these navigation nodes and attributes. |
array
|
"display-name": |
The formatted string to display on the client. |
string
|
"name": |
The name used by the Cortex system. |
string
|
"display-value": |
The formatted string to display on the client. |
string
|
"value": |
The raw value. |
any
|
Read a navigation node's parent node.
Workflow
- Start with [navigation][navigation].
- Read link following rel: parent.
- Render response.
Response Fields
Type: elasticpath.navigations.node
Name |
Description |
Type |
"name": |
The Cortex system's name for the node. |
string
|
"display-name": |
The localized name of the node, intended for display in the client application. |
string
|
"details": |
An array of the navigation node's attributes. Attributes describe the details of the navigation node, like the node's name, description, associated subcategories, etc. Attributes are different each store. To get a list of navigation attributes, you'll need to coordinate with your store marketer who creates these navigation nodes and attributes. |
array
|
"display-name": |
The formatted string to display on the client. |
string
|
"name": |
The name used by the Cortex system. |
string
|
"display-value": |
The formatted string to display on the client. |
string
|
"value": |
The raw value. |
any
|
An order is a list of intentions Cortex API will undertake to complete a purchase. For example, an order lists the billing and shipping address to use for the purchase, shipping options (Canada Post, FedEx, etc), paymentmethods to use for the purchase, the cart containing the items to purchase, and the taxes to pay for the purchase. Once the order is POSTed to a purchase, Cortex API executes the purchase based on the intentions in the order.
Just like the cart, an order is always available, persisted between sessions, and is updated automatically. For example, if a customer removes an item from their cart, the order is updated to remove the item. Once the order is POSTed to a purchase, the order is cleared and a new order is created for the customer.
The order contains NeedInfo links if the billing address, shipping address, shipping option or the payment methods haven't been selected.
Advisors for the order
Billing Address Info:
The Billing address info resource provides the customer with a selector to select the billing address to use for the purchase and an addressform to create a billing address to use for the purchase. The billing address is the address that is related to the payment means, which in some cases is the address your credit card uses.
Deliveries:
The deliveries resource groups the shipment details, which are the how and where your goods are being shipped, for your orders. Out of the box, you can't split orders into different shipments, so when you get the list of delivery elements for an order only one element appears in the list. The order's shipment details are specified through the shipmentdetails resource.
Use a selector to select the billing address to use for the purchase. Follow the workflow to read the billing address info and then create a choice to select the billing address to use for the purchase.
Read a delivery from a list of deliveries
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: deliveries.
- Read link following rel: element.
- Render response.
Response Fields
Type: orders.delivery
Name |
Description |
Type |
"delivery-type": |
The delivery type for an order. |
string
|
Use a selector to select the billing address to use for the purchase. Follow the workflow to read the billing address info and then create a choice to select the billing address to use for the purchase.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: billingaddressinfo.
- Read link following rel: selector.
- Read link following rel: chosen.
- Create choice to link rel: selectaction.
Read the currently selected billingaddress for the order.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: billingaddressinfo.
- Read link following rel: billingaddress.
- Render response.
Response Fields
Type: addresses.address
Name |
Description |
Type |
"name": |
The customer name. |
object
|
"given-name": |
The person's given name. |
string
|
"family-name": |
The person's family name. |
string
|
"address": |
The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. |
object
|
"street-address": |
The street address. |
string
|
"extended-address": |
Extra field for address information. This field is optional. |
string
|
"locality": |
The city name. |
string
|
"region": |
Valid region codes for this field can be retrieved using the Geographies Resource. |
string
|
"postal-code": |
Postal code or zip code. |
string
|
"country-name": |
Valid country codes for this field can be retrieved using the Geographies Resource. |
string
|
"phone-number": |
Phone number |
string
|
"organization": |
The organization |
string
|
When a billingaddress needinfo appears on the order, it means the billingaddress has not been selected for the purchase. Follow the workflow to read the billingaddress needinfo.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Read billingaddress needinfo.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: purchaseform.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Retrieves the cart's order. An order may have NeedInfos. Needinfos identify a condition that must be satisfied before a transaction can complete. Needinfos link to a selector where the customer can select the missing condition. Once the Needinfos are satisfied the order can be submitted to a purchase.
Workflow
- Start with cart.
- Read link following rel: order.
- Render response.
Response Fields
None.
Read email address associated with order.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: emailinfo.
- Read link following rel: email.
- Render response.
Response Fields
Type: emails.email
Name |
Description |
Type |
"email": |
The email address. |
string
|
Read the order's email needinfo. When an email needinfo appears on the order, it means the customer's email has not been selected for the purchase. Likely, this customer does not have an account. Follow the workflow to read the email needinfo.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Read order email needinfo. When an email needinfo appears on the purchase form, it means the customer's email has not been selected for the purchase. Likely, this customer does not have an account. Follow the workflow to read the email needinfo.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: purchaseform.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
The Payment Methods resource is responsible for the customer's paymentmethods. This resource lists all the paymentmethods defined for the customer either credit cards or payment tokens. Selecting a payment method for a purchase is set during the purchase's order phase.
Use a selector to select paymentmethod to use for the purchase. Follow the workflow to read the paymentmethodsinfo and then create a choice to select the paymentmethod to use for the purchase.
Use a selector to select paymentmethod to use for the purchase. Follow the workflow to read the paymentmethodsinfo and then create a choice to select the paymentmethod to use for the purchase.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: paymentmethodinfo.
- Read link following rel: selector.
- Read link following rel: chosen.
- Create choice to link rel: selectaction.
Read the payment method currently selected for the order.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: paymentmethodinfo.
- Read link following rel: paymentmethod.
- Render response.
Response Fields
Type: elasticpath.paymentmethods.credit-card
Name |
Description |
Type |
"card-type": |
The credit card type. |
string
|
"cardholder-name": |
The credit card holder name. |
string
|
"card-number": |
The card number. |
string
|
"start-month": |
The start month. |
string
|
"start-year": |
The start year. |
string
|
"issue-number": |
The issue number. |
integer
|
"expiry-month": |
The month of the expiration date. |
string
|
"expiry-year": |
The year of the expiration date. |
string
|
Read payment-needinfo from order. When a paymentmethod needinfo is on the order, it means the payment method has not been selected for the purchase. Follow the workflow to read the needinfo.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Read payment needinfo from the purchase form. When a payment method needinfo is on the purchase form, it means the payment method has not been selected for the purchase. Follow the workflow to read the needinfo.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: purchaseform.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Read a payment method from the list of available customer payment methods.
Workflow
- Start with profile.
- Read link following rel: paymentmethods.
- Read link following rel: element.
- Render response.
Response Fields
Type: elasticpath.paymentmethods.credit-card
Name |
Description |
Type |
"card-type": |
The credit card type. |
string
|
"cardholder-name": |
The credit card holder name. |
string
|
"card-number": |
The card number. |
string
|
"start-month": |
The start month. |
string
|
"start-year": |
The start year. |
string
|
"issue-number": |
The issue number. |
integer
|
"expiry-month": |
The month of the expiration date. |
string
|
"expiry-year": |
The year of the expiration date. |
string
|
Read the customer's default payment method. The default payment method is the first payment method the customer created.
Workflow
- Start with profile.
- Read link following rel: paymentmethods.
- Read link following rel: default.
- Render response.
Response Fields
Type: elasticpath.paymentmethods.credit-card
Name |
Description |
Type |
"card-type": |
The credit card type. |
string
|
"cardholder-name": |
The credit card holder name. |
string
|
"card-number": |
The card number. |
string
|
"start-month": |
The start month. |
string
|
"start-year": |
The start year. |
string
|
"issue-number": |
The issue number. |
integer
|
"expiry-month": |
The month of the expiration date. |
string
|
"expiry-year": |
The year of the expiration date. |
string
|
Read payment method associated with an order.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: paymentmethodinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Delete a payment method from a shopper's profile. If you delete a payment method that has already been selected for an order, that payment method will be deleted from the profile but not from the order. The payment method will remain selected on the order until that order is purchased.
Workflow
- Start with profile.
- Read link following rel: paymentmethods.
- Read link following rel: element.
- Delete paymentmethod.
Read payment-needinfo from order. When a paymentmethod needinfo is on the order, it means the payment method has not been selected for the purchase. Follow the workflow to read the needinfo.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Read payment needinfo from the purchase form. When a payment method needinfo is on the purchase form, it means the payment method has not been selected for the purchase. Follow the workflow to read the needinfo.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: purchaseform.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
The Payment Tokens resource is responsible for saving payment tokens to a shopper's profile and order.The Payment Tokens resource is responsible for saving payment tokens to a shopper's profile and order.The Payment Tokens resource is responsible for saving payment tokens to a shopper's profile and order.
Create a new payment token for an order. The payment token created will only exist for this order and will not be saved to the shopper's profile. The newly created payment token will be automatically selected for the order.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: paymentmethodinfo.
- Read link following rel: paymenttokenform.
- Fill out the form.
- Create form to link rel: createpaymenttokenaction.
Create a new payment token for a profile. If the profile does not have default payment method then this payment token will become the default payment method.
Workflow
- Start with profile.
- Read link following rel: paymentmethods.
- Read link following rel: paymenttokenform.
- Fill out the form.
- Create form to link rel: createpaymenttokenaction.
Prices describe the amount of money required to purchase an item or items. The prices resource server links prices to: items, cart line items and item definitions
Read the unit price of an item. The unit price of an item is the price for one unit (quantity = 1)
Workflow
- Start with item.
- Read link following rel: price.
- Render response.
Response Fields
Type: elasticpath.prices.item-price
Name |
Description |
Type |
"list-price": |
The unit price of an item before catalog discounts are applied. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
"purchase-price": |
The unit price of an item after catalog discounts are applied. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Read the unit price of a cart line item. The unit price of a cart line item is the price for one unit when a given quantity is purchased (the line item quantity).
Workflow
- Start with cart.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: price.
- Render response.
Response Fields
Type: elasticpath.prices.cart-line-item-price
Name |
Description |
Type |
"list-price": |
The unit price of an item in the shopperâs cart before shopping cart discounts are applied. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
"purchase-price": |
The unit price of an item in the shopperâs cart after shopping cart discounts are applied. This represents the price the shopper will actually pay for each unit. If no discounts have been applied, the list and purchase price will be the same. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Read the price of the item option with the lowest price. This link will only appear if the item has options.
Workflow
- Start with item.
- Read link following rel: definition.
- Read link following rel: fromprice.
- Render response.
Response Fields
Type: elasticpath.prices.price-range
Name |
Description |
Type |
"from-price": |
The price of the item's least expensive option. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Retrieves the price of a shipment line item.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: price.
- Render response.
Response Fields
Type: elasticpath.prices.shipment-line-item-price
Name |
Description |
Type |
"list-price": |
The price of a shipment line item before discounts are applied. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
"purchase-price": |
The price of a shipment line item after discounts are applied. If no discounts have been applied, the list and purchase price will be the same. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Entry Point: /profiles/{scope}/default
The profiles resource provides access to the currently logged in customer and his/her details. Using the resource you can retrieve and update a customer's first name, last name, username, addresses. You can also retrieve the customer's purchases and paymentmethods through this resource.
Retrieve the customer's default profile.
Workflow
- Start with default-profile.
- Render response.
Response Fields
Type: profiles.profile
Name |
Description |
Type |
"given-name": |
Customer's first name. |
string
|
"family-name": |
Customer's last name. |
string
|
Retrieve the customer's first name, last name, username, addresses, and link to the customer's paymentmethods.
Workflow
- Start with profile.
- Render response.
Response Fields
Type: profiles.profile
Name |
Description |
Type |
"given-name": |
Customer's first name. |
string
|
"family-name": |
Customer's last name. |
string
|
Retrieve a list of purchases for the logged in customer.
Workflow
- Start with profile.
- Read link following rel: purchases.
- Render response.
Response Fields
Update the customer's profile.
Workflow
- Start with profile.
- Edit the profile object with new detail(s).
- Update profile.
Promotions are incentives offered to shoppers to promote the purchase of items in a store. A storeâs marketer creates promotions and defines a set of conditions that must be met before the promotion is applied to a given shopper. Promotions may trigger discounts or may trigger other incentives such as free items. When a promotion triggers a discount, the discounts are automatically applied to the item price, cart line item price, shipping option cost, line items total, cart total, and the order total.
Promotions are linked to a number of different resources:
- Promotions - The promotions resource provides a list of all the promotions available for the store.
- Items - Promotions are linked to items when a promotion exists for that item and the shopper is eligible to receive the promotion.
- Carts - Promotions are linked to carts when the contents of the shopperâs cart meet the conditions of the promotion.
- Cart line items - Promotions are linked to cart line items when the line item meets the conditions of the promotion.
- Shipping options - Promotions are linked to shipping options on an order shipment when the option meets the conditions of the promotion.
- Purchases - Promotions are linked to purchases when the purchase had promotions applied to it.
- Coupons - Promotion are linked to a coupon when the coupon triggered the promotions to apply.
Retrieve promotions applied to an item.
Workflow
- Start with item.
- Read link following rel: appliedpromotions.
- Read link following rel: element.
- Render response.
Response Fields
Type: promotions.promotion
Name |
Description |
Type |
"name": |
The promotion identifier. |
string
|
"display-name": |
The promotion's localized name, intended for display in the client application. |
string
|
"display-description": |
The promotion's localized marketing description, intended for display in the client application. |
string
|
"display-conditions": |
The promotion's localized terms and conditions, intended for display in the client application. |
string
|
Retrieve promotions applied to a cart.
Workflow
- Start with cart.
- Read link following rel: appliedpromotions.
- Read link following rel: element.
- Render response.
Response Fields
Type: promotions.promotion
Name |
Description |
Type |
"name": |
The promotion identifier. |
string
|
"display-name": |
The promotion's localized name, intended for display in the client application. |
string
|
"display-description": |
The promotion's localized marketing description, intended for display in the client application. |
string
|
"display-conditions": |
The promotion's localized terms and conditions, intended for display in the client application. |
string
|
Retrieve the promotions applied to a cart line item.
Workflow
- Start with cart.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: appliedpromotions.
- Read link following rel: element.
- Render response.
Response Fields
Type: promotions.promotion
Name |
Description |
Type |
"name": |
The promotion identifier. |
string
|
"display-name": |
The promotion's localized name, intended for display in the client application. |
string
|
"display-description": |
The promotion's localized marketing description, intended for display in the client application. |
string
|
"display-conditions": |
The promotion's localized terms and conditions, intended for display in the client application. |
string
|
Retrieve promotions applied to a shipping option.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: deliveries.
- Read link following rel: element.
- Read link following rel: shippingoptioninfo.
- Read link following rel: shippingoption.
- Read link following rel: appliedpromotions.
- Read link following rel: element.
- Render response.
Response Fields
Type: promotions.promotion
Name |
Description |
Type |
"name": |
The promotion identifier. |
string
|
"display-name": |
The promotion's localized name, intended for display in the client application. |
string
|
"display-description": |
The promotion's localized marketing description, intended for display in the client application. |
string
|
"display-conditions": |
The promotion's localized terms and conditions, intended for display in the client application. |
string
|
Retrieve a promotion trigged by a coupon on an order.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: couponinfo.
- Read link following rel: coupon.
- Read link following rel: promotion.
- Render response.
Response Fields
Type: promotions.promotion
Name |
Description |
Type |
"name": |
The promotion identifier. |
string
|
"display-name": |
The promotion's localized name, intended for display in the client application. |
string
|
"display-description": |
The promotion's localized marketing description, intended for display in the client application. |
string
|
"display-conditions": |
The promotion's localized terms and conditions, intended for display in the client application. |
string
|
Retrieve promotions applied to a purchase.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: appliedpromotions.
- Read link following rel: element.
- Render response.
Response Fields
Type: promotions.promotion
Name |
Description |
Type |
"name": |
The promotion identifier. |
string
|
"display-name": |
The promotion's localized name, intended for display in the client application. |
string
|
"display-description": |
The promotion's localized marketing description, intended for display in the client application. |
string
|
"display-conditions": |
The promotion's localized terms and conditions, intended for display in the client application. |
string
|
Retrieve a promotion trigged by a coupon on a purchase.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: coupons.
- Read link following rel: element.
- Read link following rel: promotion.
- Render response.
Response Fields
Type: promotions.promotion
Name |
Description |
Type |
"name": |
The promotion identifier. |
string
|
"display-name": |
The promotion's localized name, intended for display in the client application. |
string
|
"display-description": |
The promotion's localized marketing description, intended for display in the client application. |
string
|
"display-conditions": |
The promotion's localized terms and conditions, intended for display in the client application. |
string
|
Retrieve possible promotions for an item. This API is currently not available.
Workflow
- Start with item.
- Read link following rel: possiblepromotions.
- Read link following rel: element.
- Render response.
Response Fields
Type: promotions.promotion
Name |
Description |
Type |
"name": |
The promotion identifier. |
string
|
"display-name": |
The promotion's localized name, intended for display in the client application. |
string
|
"display-description": |
The promotion's localized marketing description, intended for display in the client application. |
string
|
"display-conditions": |
The promotion's localized terms and conditions, intended for display in the client application. |
string
|
Retrieve possible promotions for a cart. This API is currently not available.
Workflow
- Start with cart.
- Read link following rel: possiblepromotions.
- Read link following rel: element.
- Render response.
Response Fields
Type: promotions.promotion
Name |
Description |
Type |
"name": |
The promotion identifier. |
string
|
"display-name": |
The promotion's localized name, intended for display in the client application. |
string
|
"display-description": |
The promotion's localized marketing description, intended for display in the client application. |
string
|
"display-conditions": |
The promotion's localized terms and conditions, intended for display in the client application. |
string
|
Entry Point: /purchases/{scope}
A purchase is a receipt of an executed order. A Purchase lists the order's total cost, purchase date, purchase status (COMPLETE or FAILED), tax paid, paymentmeans, which lists the billing and shipping details as well as customer's paymentmethods, and line items, which are lists of the items the customer purchased.
Each time customers make successful purchases, Cortex API records them in its database. Using the purchases resource, client developers can retrieve the customer's purchase history, which allows customers to inspect their previous purchases, check for correctness, and track the purchase's status. Cortex API records each successful purchase and the last failed purchase. Cortex API does not track each failed purchase, it only records the last failed purchase. Once the purchase completes, the failed purchase is removed from the record and a successful purchase is recorded.
Advisors on the purchase form
The Paymentmeans resource is responsible for recording a purchase's billing details, such as a customer's billing address and paymentmethod.
Purchase line items are collections of items the customer purchased. Each line item can contain one or more of the same item, but will not have two different items. For example, one line item can have 7 Rock-Star t-shirts or one Rock-Star t-shirt, but it won't have one Rock-Star t-shirt and a Song track. The Song track and t-shirt would be in separate line items.
Submit the purchase form to complete the purchase.
Retrieve a customer's purchase.
Workflow
- Start with purchases.
- Read link following rel: element.
- Render response.
Response Fields
Type: purchases.purchase
Name |
Description |
Type |
"purchase-number": |
Purchase number associated with the purchase. This is the reference customers use if they need to communicate with the store's customer service representative. |
string
|
"status": |
Indicates the status of the purchase. The following are possible status values:
- IN_PROGRESS - The purchase is being processed.
- COMPLETED - The purchase is processed.
- CANCELLED - The purchase is cancelled.
|
string
|
"monetary-total": |
The total cost paid for the purchase, including taxes. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
"taxes": |
The taxes for the purchase |
array
|
"title": |
The name of the tax. |
string
|
"tax-total": |
The total amount of tax paid for the purchase. |
object
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
"purchase-date": |
The date on which the purchase was made. |
object
|
"value": |
The millisecond value of the date in Epoch time. |
long
|
"display-value": |
The formatted date value to display on the client application. |
string
|
Read the billing address for the purchase.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: billingaddress.
- Render response.
Response Fields
Type: addresses.address
Name |
Description |
Type |
"name": |
The customer name. |
object
|
"given-name": |
The person's given name. |
string
|
"family-name": |
The person's family name. |
string
|
"address": |
The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. |
object
|
"street-address": |
The street address. |
string
|
"extended-address": |
Extra field for address information. This field is optional. |
string
|
"locality": |
The city name. |
string
|
"region": |
Valid region codes for this field can be retrieved using the Geographies Resource. |
string
|
"postal-code": |
Postal code or zip code. |
string
|
"country-name": |
Valid country codes for this field can be retrieved using the Geographies Resource. |
string
|
"phone-number": |
Phone number |
string
|
"organization": |
The organization |
string
|
Submit the purchase form to complete the purchase.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: purchaseform.
- Fill out the form.
- Create form to link rel: submitorderaction.
Retrieve a purchase's line item, which includes details on the item that was purchased such as item name, quantity purchased, and cost.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: lineitems.
- Read link following rel: element.
- Render response.
Response Fields
Type: purchases.line-item
Name |
Description |
Type |
"name": |
The name of the item that was purchased. |
string
|
"quantity": |
The number of items that were purchased. |
integer
|
"configuration": |
The Fields associated with the purchase line item (Dictionary of String/Strings) |
object
|
"line-extension-tax": |
The tax paid for the purchased item(s). |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
"line-extension-amount": |
The purchase price of the item(s), excluding taxes. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
"line-extension-total": |
The total amount paid for the item(s), including taxes. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Read the option for the item purchased by the customer.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: options.
- Read link following rel: element.
- Render response.
Response Fields
Type: purchases.option
Name |
Description |
Type |
"name": |
The name of the item option. |
string
|
"display-name": |
The localized name of the item option, intended for display in the client application. |
string
|
"selected-value-id": |
The id of the selected value. |
string
|
"option-id": |
The id of the option. |
string
|
The purchase line item option value.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: options.
- Read link following rel: element.
- Read link following rel: value.
- Render response.
Response Fields
Type: purchases.value
Name |
Description |
Type |
"name": |
The name of the item option. |
string
|
"display-name": |
The localized name of the option name, intended for display in the client application. |
string
|
Read the component for the item purchased by the customer.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: components.
- Read link following rel: element.
- Render response.
Response Fields
Type: purchases.line-item
Name |
Description |
Type |
"name": |
The name of the item that was purchased. |
string
|
"quantity": |
The number of items that were purchased. |
integer
|
"configuration": |
The Fields associated with the purchase line item (Dictionary of String/Strings) |
object
|
"line-extension-tax": |
The tax paid for the purchased item(s). |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
"line-extension-amount": |
The purchase price of the item(s), excluding taxes. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
"line-extension-total": |
The total amount paid for the item(s), including taxes. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Read a payment mean from a list of payment means.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: paymentmeans.
- Read link following rel: element.
- Render response.
Response Fields
None.
Recommendations suggest additional items that may interest shoppers. For example, if a shopper is viewing an iPod, you may want to display related items such as iPod accessories. If the shopper is viewing items in a Digital Camera navigation node then you can use recommendations to highlight a set of featured digital cameras in that node.
Recommendations are lists of items, accessible through item for item recommendations, navigation nodes for navigation recommendations, and the recommendations entry point for store recommendations. The recommendation's rel name reflects the type of recommendation. For example, when accessing an item's recommendations a rel name could be "crosssells", which indicates the rel links to a list of "cross-sell" items.
Read recommended items for a scope. This API is currently not available.
Workflow
- Start with [navigation][navigation].
- Read link following rel: recommendations.
- Read link following rel: {recommendation-group-rel}.
- Render response.
Response Fields
Read other items recommended for an item.
Workflow
- Start with item.
- Read link following rel: recommendations.
- Read link following rel: {recommendation-group-rel}.
- Render response.
Response Fields
Read recommended items for a navigation node. This API is currently not available.
Workflow
- Start with [navigation][navigation].
- Read link following rel: recommendations.
- Read link following rel: {recommendation-group-rel}.
- Render response.
Response Fields
Entry Point: /registrations/{scope}/newaccount
The registrations resource enables you to create new customers.
Register a new account for a customer.
You cannot create a new customer if a customer is already logged into Cortex API. For example, if a customer logged on through a web browser, the customer cannot create a new customer until the customer logs out. If you attempt to create a customer when a customer is logged in, Cortex API throws an error.
All the fields in the registration form must be filled out to create a customer.
Workflow
- Start with [root][root].
- Read link following rel: newaccountform.
- Fill out the form.
- Create form to link rel: registeraction.
Entry Point: /searches/{scope}
The search resource uses the Elastic Path Search Server to perform searches. Cortex API sends the search keywords entered by the customer to the search server for processing. Once the search server processes the search, the results are returned to Cortex API.
Client developers can think of search as a three-part process. First, you get the search form and fill it out with the search keywords. Second, you POST the search form to create the search. Then, you follow the link returned by Cortex API to retrieve the search results. Search results are paginated and ordered according to how relevant the results are to the search keywords.
Submit a search query for items matching search criteria and read the result.
Workflow
- Start with searches.
- Read link following rel: keywordsearchform.
- Fill out the form.
- Create form to link rel: itemkeywordsearchaction.
The shipmentdetails resource defines how and where the physical goods you're purchasing are shipped. The where you're shipping is the shipping address, while the how are the shipping options (i.e. Canada Post, FedEx, etc) available for your store.
Shipmentdetails advisors.
Uses a Selector to choose the shipping option for the order. The shipping option is how the order will be shipped, i.e. (FedEx, Canada Post, etc). The shipping options available for your shipment depend on which shipping regions and shipping service levels are configured for your store. Check with your store's administrator for more information on these options.
Retrieves the order's destinationinfo, which contains links to:
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: deliveries.
- Read link following rel: element.
- Read link following rel: destinationinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Retrieve the shipping address that is currently selected for the order.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: deliveries.
- Read link following rel: element.
- Read link following rel: destinationinfo.
- Read link following rel: destination.
- Render response.
Response Fields
Type: addresses.address
Name |
Description |
Type |
"name": |
The customer name. |
object
|
"given-name": |
The person's given name. |
string
|
"family-name": |
The person's family name. |
string
|
"address": |
The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. |
object
|
"street-address": |
The street address. |
string
|
"extended-address": |
Extra field for address information. This field is optional. |
string
|
"locality": |
The city name. |
string
|
"region": |
Valid region codes for this field can be retrieved using the Geographies Resource. |
string
|
"postal-code": |
Postal code or zip code. |
string
|
"country-name": |
Valid country codes for this field can be retrieved using the Geographies Resource. |
string
|
"phone-number": |
Phone number |
string
|
"organization": |
The organization |
string
|
Uses a Selector to select a shipping option (i.e. FedEx, Canada Post, etc) to use for the order.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: deliveries.
- Read link following rel: element.
- Read link following rel: destinationinfo.
- Read link following rel: selector.
- Read link following rel: chosen.
- Create choice to link rel: selectaction.
Retrieve the address form to create a new shipping address for the order.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: deliveries.
- Read link following rel: element.
- Read link following rel: destinationinfo.
- Read link following rel: addressform.
- Render response.
Response Fields
Retrieves the order's shippingoptioninfo, which contains links to:
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: deliveries.
- Read link following rel: element.
- Read link following rel: shippingoptioninfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Retrieves the shipping option that is currently selected for the order. The shipping option is how the order will be shipped, i.e. (FedEx, Canada Post, etc). If a shipping option has not been selected for the order, the shipping option link will not appear on the shippingoptioninfo. For information on how to select the shippingoption, see Select Shipping Choice
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: deliveries.
- Read link following rel: element.
- Read link following rel: shippingoptioninfo.
- Read link following rel: shippingoption.
- Render response.
Response Fields
Type: shipmentdetails.shipping-option
Name |
Description |
Type |
"name": |
Name of the shipping option. |
string
|
"display-name": |
The localized name of the carrier, intended for display in the client application. |
string
|
"carrier": |
Name of the carrier. |
string
|
"cost": |
The shipping costs for shipping the item(s) to the selected shipping address. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Uses a Selector to choose the shipping option for the order. The shipping option is how the order will be shipped, i.e. (FedEx, Canada Post, etc). The shipping options available for your shipment depend on which shipping regions and shipping service levels are configured for your store. Check with your store's administrator for more information on these options.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: deliveries.
- Read link following rel: element.
- Read link following rel: shippingoptioninfo.
- Read link following rel: selector.
- Read link following rel: chosen.
- Create choice to link rel: selectaction.
Read the needinfo link for the shipping address. If this link appears on the order, it means the shipping address has not been selected or created for the order. Needinfo links can appear on the order, the purchase form, and the delivery.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Read the needinfo link for the shipping address from the delivery. Needinfo links can appear on the order, the purchase form, and the delivery.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: deliveries.
- Read link following rel: element.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Read the needinfo link for the shipping address from the purchase form. Needinfo links can appear on the order, the purchase form, and the delivery.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: purchaseform.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Read the needinfo for the shipping option from the order. This needinfo appears when a shipping option has not been selected for the order. Needinfo links can appear on the order, the purchase form, and the delivery.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Read the needinfo for the shipping option from the order. This needinfo appears when a shipping option has not been selected for the order. Needinfo links can appear on the order, the purchase form, and the delivery.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: deliveries.
- Read link following rel: element.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
Read the needinfo for the shipping option from the purchaseform. This needinfo appears when a shiping option has not been selected for the order. Needinfo links can appear on the order, the purchase form, and the delivery.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: purchaseform.
- Read link following rel: needinfo.
- Render response.
Response Fields
Type: elasticpath.controls.info
Name |
Description |
Type |
"name": |
The info object's name. |
string
|
A shipment lists the shipments created by a purchase.Represents shipment line items.
Retrieve the shipment options associated with a shipment.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Read link following rel: shippingoption.
- Render response.
Response Fields
Type: shipmentdetails.shipping-option
Name |
Description |
Type |
"name": |
Name of the shipping option. |
string
|
"display-name": |
The localized name of the carrier, intended for display in the client application. |
string
|
"carrier": |
Name of the carrier. |
string
|
"cost": |
The shipping costs for shipping the item(s) to the selected shipping address. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Retrieve the shipment line items associated with a shipment.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Read link following rel: lineitems.
- Render response.
Response Fields
Read a shipment line item.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Read link following rel: lineitems.
- Read link following rel: element.
- Render response.
Response Fields
Type: shipments.line-item
Name |
Description |
Type |
"name": |
The name. |
string
|
"quantity": |
The quantity. |
integer
|
Retrieve the options associated with a shipment line item.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: options.
- Render response.
Response Fields
Read a shipment line item option.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: options.
- Read link following rel: element.
- Render response.
Response Fields
Type: shipments.option
Name |
Description |
Type |
"name": |
The name. |
string
|
"display-name": |
The display name. |
string
|
Retrieve the option value associated with a shipment line item.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: options.
- Read link following rel: element.
- Read link following rel: value.
- Render response.
Response Fields
Type: shipments.value
Name |
Description |
Type |
"name": |
The name. |
string
|
"display-name": |
The display name. |
string
|
Retrieve the shipment address associated with a shipment.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Read link following rel: destination.
- Render response.
Response Fields
Type: addresses.address
Name |
Description |
Type |
"name": |
The customer name. |
object
|
"given-name": |
The person's given name. |
string
|
"family-name": |
The person's family name. |
string
|
"address": |
The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. |
object
|
"street-address": |
The street address. |
string
|
"extended-address": |
Extra field for address information. This field is optional. |
string
|
"locality": |
The city name. |
string
|
"region": |
Valid region codes for this field can be retrieved using the Geographies Resource. |
string
|
"postal-code": |
Postal code or zip code. |
string
|
"country-name": |
Valid country codes for this field can be retrieved using the Geographies Resource. |
string
|
"phone-number": |
Phone number |
string
|
"organization": |
The organization |
string
|
Retrieve the shipments associated with a purchase.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Render response.
Response Fields
Type: shipments.shipment
Name |
Description |
Type |
"status": |
Indicates the status of the shipment. |
object
|
"code": |
The status code. |
string
|
Taxes describe the amount of tax owing for orders, shipments and shipment lineitems.
Retrieves the total tax for an order, which includes the order's tax amount, currency, and type of tax (VAT, HST, etc.).
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: tax.
- Render response.
Response Fields
Type: taxes.taxes
Name |
Description |
Type |
"total": |
The total tax. |
object
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
"cost": |
The cost of the tax(es). |
array
|
"title": |
The name of the tax. |
string
|
Retrieves the total tax for a shipment, which includes the shipments' tax amount, currency, and type of tax (VAT, HST, etc.).
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Read link following rel: tax.
- Render response.
Response Fields
Type: taxes.taxes
Name |
Description |
Type |
"total": |
The total tax. |
object
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
"cost": |
The cost of the tax(es). |
array
|
"title": |
The name of the tax. |
string
|
Retrieve the tax amount for a shipment line item.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: tax.
- Render response.
Response Fields
Type: taxes.taxes
Name |
Description |
Type |
"total": |
The total tax. |
object
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
"cost": |
The cost of the tax(es). |
array
|
"title": |
The name of the tax. |
string
|
The totals resource calculates the total costs for:
Retrieve the total cost of all cart line items before cart total discounts are applied.
Workflow
- Start with cart.
- Read link following rel: total.
- Render response.
Response Fields
Type: totals.total
Name |
Description |
Type |
"cost": |
The total costs. This is an array because the total cost have multiple currencies. For example, $20 USD + 20,000 loyalty points. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Retrieve the total cost of a single cart line item for a requested quantity, after cart line item discounts are applied.
Workflow
- Start with cart.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: total.
- Render response.
Response Fields
Type: totals.total
Name |
Description |
Type |
"cost": |
The total costs. This is an array because the total cost have multiple currencies. For example, $20 USD + 20,000 loyalty points. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Retrieve the total cost of the shopper's order including taxes and shipping costs.
Workflow
- Start with cart.
- Read link following rel: order.
- Read link following rel: total.
- Render response.
Response Fields
Type: totals.total
Name |
Description |
Type |
"cost": |
The total costs. This is an array because the total cost have multiple currencies. For example, $20 USD + 20,000 loyalty points. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Retrieve the total cost for a shipment.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Read link following rel: total.
- Render response.
Response Fields
Type: totals.total
Name |
Description |
Type |
"cost": |
The total costs. This is an array because the total cost have multiple currencies. For example, $20 USD + 20,000 loyalty points. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Retrieve the total cost for a shipment line item.
Workflow
- Start with purchases.
- Read link following rel: element.
- Read link following rel: shipments.
- Read link following rel: element.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: total.
- Render response.
Response Fields
Type: totals.total
Name |
Description |
Type |
"cost": |
The total costs. This is an array because the total cost have multiple currencies. For example, $20 USD + 20,000 loyalty points. |
array
|
"currency": |
The currency the cost is in. |
string
|
"amount": |
The decimal value of the cost. |
decimal
|
"display": |
Formatted currency string that can be displayed on the client application. |
string
|
Entry Point: /wishlists/{scope}/default
A wishlist is list that customers build up containing items that they are interested in, or desire to purchase. This applies even to items which are out of stock, which allows a customer to track the item and to be notified when the item becomes available. A wishlist is similar to a cart in that items can be added or removed. Items can also be moved between the wishlist and the cart. Only one wishlist is available per shopper. This default wishlist is automatically available and cannot be deleted.
Returns a list of links to the shopperâs wishlists. Only the default wishlist is currently supported, so responses will contain only one link..
Workflow
- Start with wishlists.
- Render response.
Response Fields
Retrieves a collection of links to wishlist lineitems.
Workflow
- Start with wishlist.
- Render response.
Response Fields
None.
Retrieves the shopperâs default wishlist.
Workflow
- Start with default-wishlist.
- Render response.
Response Fields
None.
Retrieves a collection of links to wishlist items and a link to the wishlist.
Workflow
- Start with wishlist-line-items.
- Render response.
Response Fields
Retrieves wishlist item details, which include: - A link to the list of wishlist items - A link to the wishlist - A link to the item in the items resource - A link to the movetocart form
Workflow
- Start with wishlist.
- Read link following rel: lineitems.
- Read link following rel: element.
- Render response.
Response Fields
Type: wishlists.wishlist-line-item
Name |
Description |
Type |
"configuration": |
The details of the line item configuration. |
object
|
Deletes the items from a shopperâs wishlist.
Workflow
- Start with wishlist.
- Read link following rel: lineitems.
- Delete wishlist-line-items.
Delete item from wishlist.
Workflow
- Start with wishlist.
- Read link following rel: lineitems.
- Read link following rel: element.
- Delete wishlist-line-item.
Adds an item to the default wishlist. After executing the add item to default wishlist action a redirect link is provided to the newly added item on the wishlist.
Workflow
- Start with item.
- Read link following rel: addtowishlistform.
- Fill out the form.
- Create form to link rel: addtodefaultwishlistaction.
Moves a line item from the wishlist to the cart. You must specify the quantity in the request body.
Once posted, the item deletes from the wishlist and adds to the cart. Then Cortex returns a redirect link to the newly added cart line item. You can also get to the movetocart form by following the link in a wishlist line item. The movetocart form contains an action link to move the item to the cart. Note that the action link will only be present if the wishlist line item is purchasable. If the wishlist line item is not purchasable, the action link will not appear on the form. Only purchasable items can be moved from wishlists into a cart.
Workflow
- Start with wishlist.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: movetocartform.
- Fill out the form.
- Create form to link rel: movetocartaction.
Moves a line item from the cart to the wishlist.
Once posted, Cortex will return a redirect link to the newly added wishlist line item. You can also get to the movetowishlist form by following the link in a cart line item. The movetowishlist form contains an action link to move the item to the wishlist.
Workflow
- Start with cart.
- Read link following rel: lineitems.
- Read link following rel: element.
- Read link following rel: movetowishlistform.
- Fill out the form.
- Create form to link rel: movetowishlistaction.
Retrieves the list of wishlists that the item has been added to.
GET:{cortex}/wishlists/memberships/{item_uri}
The list is empty if the item is not in your wishlist.
Workflow
- Start with item.
- Read link following rel: wishlistmemberships.
- Render response.
Response Fields