Body
The schema of the payload our checkoutCart_oncreate/ endpoint receives and enriches to create a CheckoutCart object
An array representing the configured vehicles in the cart. Add multiple vehicles to a cart by inserting multiple variant objects.
[
{
"variantConfigId": "variantConfigId",
"metadata": { "randomField": "randomValue" }
}
]
The url to redirect to if the user cancels the checkout process
"www.ekhodealer.com"
The oemKey of the OEM that this checkout cart belongs to
"example-key"
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)
"https://www.rideoem.com/checkout"
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)
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-oem-id"
The state (abbreviation) the buyer wants to register their vehicle in. Helps us determine whether or not we can facilitate this sale
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
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.
{
"itemId": [{ "name": "Example Name", "price": 123 }]
}
Optional. The id of the user in the ecomm system
Optional. The id of the order in the ecomm system
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
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
ORGANIC
, ANTE_PREORDER
, PREORDER
, EXISTINGORDER
, OEMORIGINATED
, ABANDONEDCART
, ANTE_PREORDER
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
"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
SINGLE_USE
, MULTI_USE
Custom configuration for this checkout cart
The id of the preorder. Only relevant for carts created from Ekho preorders
The brand key of the branded vehicle(s) that exist in this checkout cart
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.
{ "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
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.
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.
A human readable message describing why we're redirecting the buyer to the checkoutUrl we return