POST
/
checkoutCart_oncreate_v2
/
Create a checkout cart.
curl --request POST \
  --url https://api.ekhodealer.com/checkoutCart_oncreate_v2/ \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "<string>",
  "variants": [
    {
      "variantConfigId": "variantConfigId",
      "metadata": {
        "randomField": "randomValue"
      }
    }
  ],
  "cancelUrl": "www.ekhodealer.com",
  "oemKey": "example-key",
  "oemId": "example-oem-id",
  "nativeDefaultCheckoutUrl": "https://www.rideoem.com/checkout",
  "registrationState": "AL",
  "items": {
    "itemId": [
      {
        "name": "Example Name",
        "price": 123
      }
    ]
  },
  "ecommUserId": "<string>",
  "ecommOrderId": "<string>",
  "ekhoCheckoutCartId": "<string>",
  "orderCreationType": "ORGANIC",
  "source": "facebook",
  "linkUseType": "SINGLE_USE",
  "customLinkConfig": {
    "linkName": "<string>",
    "checkoutPaymentOverride": {
      "STANDARD_RESERVATION": {
        "paymentTypeEnum": "STANDARD_RESERVATION"
      },
      "CHECKOUT_FULL_PAYMENT": {
        "paymentTypeEnum": "CHECKOUT_FULL_PAYMENT",
        "fullPaymentDiscountPerc": 123
      },
      "LOAN_DOWNPAYMENT": {
        "paymentTypeEnum": "LOAN_DOWNPAYMENT",
        "checkoutDownPaymentPerc": 123
      }
    },
    "salespersonEmail": "<string>",
    "prefilledInfo": {
      "buyerFullName": "<string>",
      "buyerPhone": "<string>",
      "buyerEmail": "<string>",
      "selectedPaymentOption": "STANDARD_RESERVATION",
      "selectedDeliveryOption": "PICK_UP",
      "selectedRegistrationOption": "EKHO",
      "selectedPickUpLocationId": "<string>",
      "shippingAddress": {
        "addressString": "<string>",
        "addressLineOne": "<string>",
        "addressLineTwo": "<string>",
        "city": "<string>",
        "county": "<string>",
        "state": "<string>",
        "zip": "<string>"
      },
      "registrationAddress": {
        "addressString": "<string>",
        "addressLineOne": "<string>",
        "addressLineTwo": "<string>",
        "city": "<string>",
        "county": "<string>",
        "state": "<string>",
        "zip": "<string>"
      },
      "mailingAddress": {
        "addressString": "<string>",
        "addressLineOne": "<string>",
        "addressLineTwo": "<string>",
        "city": "<string>",
        "county": "<string>",
        "state": "<string>",
        "zip": "<string>"
      },
      "regAddressSameAsShipping": true,
      "mailingAddressSameAsShipping": true
    }
  },
  "preorderId": "<string>",
  "brandKey": "<string>",
  "metadata": {
    "randomField": "randomValue"
  }
}'
{
  "checkoutUrl": "<string>",
  "ekhoCheckoutCartId": "<string>",
  "message": "<string>"
}

Body

application/json

The schema of the payload our checkoutCart_oncreate/ endpoint receives and enriches to create a CheckoutCart object

variants
object[]
required

An array representing the configured vehicles in the cart. Add multiple vehicles to a cart by inserting multiple variant objects.

Example:
[
{
"variantConfigId": "variantConfigId",
"metadata": { "randomField": "randomValue" }
}
]
cancelUrl
string
required

The url to redirect to if the user cancels the checkout process

Example:

"www.ekhodealer.com"

oemKey
string
required

The oemKey of the OEM that this checkout cart belongs to

Example:

"example-key"

nativeDefaultCheckoutUrl
string
required

The OEMs native checkout page URL, which we will route the buyer to if a) the buyer doesn't have vehicles in their cart, or b) we don't support the state they want to register their vehicle in (if included)

Example:

"https://www.rideoem.com/checkout"

id
string

The id of the checkout cart. If an ID is included, then we will use this ID for the newly created checkout cart (and overwrite any existing cart with the same ID)

oemId
string

The oemId of the OEM that this checkout cart belongs to (optional -- if not provided we will grab need to default to the main oemId)

Example:

"example-oem-id"

registrationState
enum<string>

The state (abbreviation) the buyer wants to register their vehicle in. Helps us determine whether or not we can facilitate this sale

Available options:
AL,
AK,
AZ,
AR,
CA,
CO,
CT,
DE,
FL,
GA,
HI,
ID,
IL,
IN,
IA,
KS,
KY,
LA,
ME,
MD,
MA,
MI,
MN,
MS,
MO,
MT,
NE,
NV,
NH,
NJ,
NM,
NY,
NC,
ND,
OH,
OK,
OR,
PA,
RI,
SC,
SD,
TN,
TX,
UT,
VT,
VA,
WA,
WV,
WI,
WY
items
object

A map of items that represent accessories that are not financed with the vehicle. For example, branded merchandise like clothing or equipment. To add multiple of the same item, add multiple objects to the array at the same key.

Example:
{
"itemId": [{ "name": "Example Name", "price": 123 }]
}
ecommUserId
string

Optional. The id of the user in the ecomm system

ecommOrderId
string

Optional. The id of the order in the ecomm system

ekhoCheckoutCartId
string

Optional. If you would like for us to overwrite an existing checkoutCart with the same id, provide the id here. If you don't provide this, we will create a new checkoutCart with a new id

orderCreationType
enum<string>

Determines the type of order being created. If not provided, we will default to "ORGANIC". ANTE_PREORDER -> cart for a preorder, PREORDER -> cart created from a preorder, EXISTINGORDER -> cart created for an existing order, OEMORIGINATED -> cart created by OEM sales rep, ORGANIC -> cart created by buyer on OEM website

Available options:
ORGANIC,
ANTE_PREORDER,
PREORDER,
EXISTINGORDER,
OEMORIGINATED,
ABANDONEDCART,
ANTE_PREORDER
source
string

The source of the checkout cart. Useful for tacking purposes to know where the OEM is placing this link - and thus where buyers are coming from

Example:

"facebook"

The type of link that we're creating. If not provided, we will default to "MULTI_USE". SINGLE_USE -> link can only be used once, MULTI_USE -> link can be used multiple times

Available options:
SINGLE_USE,
MULTI_USE

Custom configuration for this checkout cart

preorderId
string

The id of the preorder. Only relevant for carts created from Ekho preorders

brandKey
string

The brand key of the branded vehicle(s) that exist in this checkout cart

metadata
object

This object stores misc data that will be passed along to the placedOrder object resulting from this checkout cart. Allows up to 10 keys and up to 2 levels of nested depth.

Example:
{ "randomField": "randomValue" }

Response

Successfully processed the checkout cart. Returns the checkoutUrl to redirect the user to to complete the checkout process. Can either be the OEMs native checkout page or our own checkout page, depending on whether or not Ekho is "turned on" in state the user wants to title their vehicle in AND whether or not there is at least 1 vehicle among the items

checkoutUrl
string

The url to redirect the user to to complete the checkout process. If we're checking the buyer out via Ekho Dealer's checkout out, this url will whatever we were sent as the nativeDefaultCheckoutUrl in the request body.

ekhoCheckoutCartId
string

The id of the checkout cart we created. This will be null if we aren't redirecting the buyer to Ekho Dealer's checkout page.

message
string

A human readable message describing why we're redirecting the buyer to the checkoutUrl we return