Skip to main content

Abandoned Checkout

The abandoned checkout is created when the customer reaches checkout's seconds step, but for some reason it does not finish the process.

Table of Contents

Get all abandoned checkout

Get an abandoned checkout

Create a discount coupon

Notes

Note: The application must have read_orders or write_orders permission (depends on whether they just want to do GET or POST).

Note: A cart can be created up to 6 hours after the purchase has been abandoned.

Note: The carts are accessible for 30 days after being created.

Note: A purchase is only converted into an abandoned cart if the customer has arrived to checkout's second step.

Properties

Abandoned Checkout

The Abandoned Checkout has the following contents:

PropertyTypeExplanation
idIntegerThe unique numeric identifier for the Abandoned Checkout
tokenStringSpecifies the location of the Order
store_idIntegerAbandoned Checkout store identifier
abandoned_checkout_urlStringRedirect URL for checkout
contact_emailStringCheckout consumer email
contact_nameStringCheckout consumer Name
contact_phoneStringCheckout consumer phone
contact_identificationStringContact identification
shipping_nameStringShipping name used at checkout
shipping_phoneStringShipping address phone used at checkout
shipping_addressStringShipping address used at checkout
shipping_numberStringShipping address number used at checkout
shipping_floorStringShipping address floor used at checkout
shipping_localityStringShipping address Locality used at checkout
shipping_zipcodeStringShipping zip code used at checkout
shipping_cityStringShipping City used at checkout
shipping_provinceStringShipping province used at checkout
shipping_countryStringShipping country used at checkout
shipping_min_daysIntegerThe minimum number of weekdays needed for the order to be delivered
shipping_max_daysIntegerThe maximum number of weekdays needed for the order to be delivered
billing_nameStringBilling name used at checkout
billing_phoneStringBilling phone used at checkout
billing_addressStringBilling address used at checkout
billing_numberStringBilling number used at checkout
billing_floorStringBilling floor used at checkout
billing_localityStringBilling Locality used at checkout
billing_zipcodeStringBilling zipcode used at checkout
billing_cityStringBilling City used at checkout
billing_provinceStringBilling province used at checkout
billing_countryStringBilling country used at checkout
shipping_cost_ownerStringThe shipping cost the store owner has to pay to the shipping company.
shipping_cost_customerStringThe shipping cost the customer has to pay to the store owner.
couponArray[Object]List of coupons applied to the order
promotional_discountObjectPromotional Discount applied to the draft order.
subtotalStringPrice of the order before shipping
discountStringTotal value of the discount applied to the price of the order
discount_couponStringDiscount applied by coupon
discount_gatewayStringDiscount applied by the payment gateway
totalStringTotal price of the order including shipping and discounts
total_usdStringTotal price of the order in US dollars
checkout_enabledBoolean
weightStringOrder's total weight, in kilograms
currencyStringThe total spent's currency in ISO 4217 format
languageStringOrder's language used by the customer during the checkout process
gatewayStringThe payment gateway used
gateway_idStringThe payment gateway identifier
shippingStringThe shipping method used
shipping_optionStringThe shipping option chosen by the customer during the checkout process.
shipping_option_codeStringThe shipping option code selected by the consumers.
shipping_option_referenceStringThe shipping option reference provided by a custom shipping carrier during the checkout process.
shipping_pickup_detailsStringThe shipping pickup details (address and/or business hours) of the selected pickup point.
shipping_tracking_numberStringThe order's shipping tracking number
shipping_tracking_urlStringThe shipping tracking URL where the customer can check for the shipment status.
shipping_store_branch_nameStringIf order is going to be picked up, shows the store branch name
shipping_pickup_typeString"ship" if the order is going to be shipped; "pickup" if it's going to be picked up from a store branch
shipping_suboptionStringList of suboptions chosen for the shipping method.
extraObjectA JSON object containing custom information. Can be set via the API or through custom form fields of name "extra[key]" on the cart's checkout form in the storefront
storefrontStringOrigin of the order. Possible values are "store" (order created in the storefront), "meli" (order imported from Mercado Libre), "api" (order created via API), "form" (order created in the admin panel with the draft orders feature) or "pos" (order created via point of sale app)
noteStringAn additional customer note for the order.
created_atStringDate when the Order was created in ISO 8601 format
updated_atStringDate when the Order was last updated in ISO 8601 format
completed_atStringDate when the Order was completed in ISO 8601 format
next_actionStringNext available operation in the orders flow
payment_detailsObjectA JSON object containing payment details.
attributesArrayLine item properties.
productsArrayList of the products purchased by the customer. Contents are explained below and values hold are the ones corresponding to the time the products were purchased

Property next_action can take one of the following values:

  • noop: no action to take
  • close: order should be closed
  • waiting_ipn: we are waiting for the gateway to update us on the order status, the seller just needs to wait
  • waiting_manual_confirmation: we are waiting for the seller to confirm the transaction

Promotional Discount

The promotional_discount field has the following contents:

PropertyTypeExplanation
idIntegerThe unique numeric identifier for the promotional discount.
store_idIntegerThe unique numeric identifier for the store.
order_idIntegerThe unique numeric identifier for the draft order.
created_atStringDate when the draft order was created in ISO 8601 format.
total_discount_amountStringTotal value of the promotions applied.
contentsArray[Object]A JSON object containing products discounts information.
promotions_appliedArray[Object]List of promotions applied to the draft order's products.

Products

The products field has the following contents:

PropertyTypeExplanation
idIntegerThe unique numeric identifier for the checkout cart.
depthStringProduct's depth at the time of purchase.
heightStringProduct's height at the time of purchase.
nameStringProduct's name at the time of purchase.
priceStringProduct's price at the time of purchase.
product_idIntegerProduct purchased.
imageObjectInformation about the product image.
quantityIntegerQuantity purchased.
free_shippingBooleanIndicates if the product has free shipping or not.
weightStringProduct's weight at the time of purchase.
widthStringProduct's width at the time of purchase.
variant_idIntegerProduct Variant purchased.
propertiesArray[Object]Line item properties.
skuStringProduct Variant sku number.
barcodeStringProduct Variant barcode number.

Payment Details

The payment_details field has the following contents:

PropertyTypeExplanation
methodStringPayment method selected.
credit_card_companyStringCredit card company.
installmentsIntegerThe unique numeric identifier for the promotional discount.

Endpoints

GET /checkouts

List all Abandoned Checkouts.

Query parameters

ParameterExplanation
since_idRestrict results to after the specified ID
created_at_maxShow Orders created before date (ISO 8601 format)
updated_at_maxShow Orders last updated before date (ISO 8601 format)
pagePage to show
per_pageAmount of results
fieldsComma-separated list of fields to include in the response

Return Status Code

CodeDescription
200The search was successful.
404Error finding result with the parameters entered.
500Internal error.

Examples

GET /checkouts

HTTP/1.1 200 OK

[
{
"id": 411335234,
"token": "d0e589b2ba4fef1a4155dc071c253dfk1j34198b9",
"store_id": 167985134,
"abandoned_checkout_url": "https://nuvemteste.lojavirtualnuvem.com.br/checkout/v3/order/proxy/411335234/d0e589b2ba4fef1a4155dc071c253dfk1j34198b9",
"contact_email": "teste@teste.com.br",
"contact_name": "Teste 12",
"contact_phone": "+551335593019",
"contact_identification": "78448385071",
"shipping_name": "Teste",
"shipping_phone": "+551335593019",
"shipping_address": "Rua Ali",
"shipping_number": "123",
"shipping_floor": "",
"shipping_locality": "Mundo Novo",
"shipping_zipcode": "29580000",
"shipping_city": "Dores do Rio Preto",
"shipping_province": "Espirito Santo",
"shipping_country": "BR",
"shipping_min_days": 0,
"shipping_max_days": 0,
"billing_name": "Teste",
"billing_phone": "+551335593019",
"billing_address": "Rua Ali",
"billing_number": "123",
"billing_floor": "",
"billing_locality": "Mundo Novo",
"billing_zipcode": "29580000",
"billing_city": "Dores do Rio Preto",
"billing_province": "Espirito Santo",
"billing_country": "BR",
"shipping_cost_owner": "1.00",
"shipping_cost_customer": "1.00",
"coupon": [],
"promotional_discount": {
"id": null,
"store_id": 1679854,
"order_id": 411335518,
"created_at": "2021-05-18T19:51:19+0000",
"total_discount_amount": "0.00",
"contents": [],
"promotions_applied": []
},
"subtotal": "290.35",
"discount": "0.00",
"discount_coupon": "0.00",
"discount_gateway": "0.00",
"total": "291.35",
"total_usd": "0.00",
"checkout_enabled": true,
"weight": "5.000",
"currency": "BRL",
"language": "pt",
"gateway": null,
"gateway_id": null,
"shipping": "api_128646",
"shipping_option": "Nimbus 2001",
"shipping_option_code": "nimbus-201",
"shipping_option_reference": null,
"shipping_pickup_details": null,
"shipping_tracking_number": null,
"shipping_tracking_url": null,
"shipping_store_branch_name": null,
"shipping_pickup_type": "ship",
"shipping_suboption": [],
"extra": {},
"storefront": "store",
"note": null,
"created_at": "2021-05-12T19:08:06+0000",
"updated_at": "2021-05-13T21:04:00+0000",
"completed_at": null,
"next_action": "noop",
"payment_details": {
"method": null,
"credit_card_company": null,
"installments": 1
},
"attributes": [],
"products": [
{
"id": 516763823,
"depth": "2.00",
"height": "20.00",
"name": "Varinha do Harry Potter (Preto)",
"price": "58.07",
"product_id": 87219151,
"image": {
"id": 171099852,
"product_id": 87219151,
"src": "https://d2r9epyceweg5n.cloudfront.net/stores/001/679/854/products/varinha-hp-luxo-21-5ebe5e31da8e2b693515728471178129-1024-10241-bc9b30adf4b178fabc16202348529015-1024-1024.jpeg",
"position": 1,
"alt": [],
"created_at": "2021-05-05T17:14:05+0000",
"updated_at": "2021-05-10T17:22:52+0000"
},
"quantity": 5,
"free_shipping": false,
"weight": "1.00",
"width": "4.00",
"variant_id": 332977991,
"variant_values": [
"Preto"
],
"properties": [],
"sku": null,
"barcode": null
}]
}]

GET /checkouts/{checkout_id}

Returns a specific abandoned checkout.

Parameters

ParameterExplanation
checkout_idCheckout identifier

Return Status Code

CodeDescription
200The search was successful.
404Error finding result with the parameters entered.
500Internal error.

Examples

GET /checkouts/411335234

HTTP/1.1 200 OK

    {
"id": 411335234,
"token": "d0e589b2ba4fef1a4155dc071c253dfk1j34198b9",
"store_id": 167985134,
"abandoned_checkout_url": "https://nuvemteste.lojavirtualnuvem.com.br/checkout/v3/order/proxy/411335234/d0e589b2ba4fef1a4155dc071c253dfk1j34198b9",
"contact_email": "teste@teste.com.br",
"contact_name": "Teste 12",
"contact_phone": "+551335593019",
"contact_identification": "78448385071",
"shipping_name": "Teste",
"shipping_phone": "+551335593019",
"shipping_address": "Rua Ali",
"shipping_number": "123",
"shipping_floor": "",
"shipping_locality": "Mundo Novo",
"shipping_zipcode": "29580000",
"shipping_city": "Dores do Rio Preto",
"shipping_province": "Espirito Santo",
"shipping_country": "BR",
"shipping_min_days": 0,
"shipping_max_days": 0,
"billing_name": "Teste",
"billing_phone": "+551335593019",
"billing_address": "Rua Ali",
"billing_number": "123",
"billing_floor": "",
"billing_locality": "Mundo Novo",
"billing_zipcode": "29580000",
"billing_city": "Dores do Rio Preto",
"billing_province": "Espirito Santo",
"billing_country": "BR",
"shipping_cost_owner": "1.00",
"shipping_cost_customer": "1.00",
"coupon": [],
"promotional_discount": {
"id": null,
"store_id": 1679854,
"order_id": 411335518,
"created_at": "2021-05-18T19:51:19+0000",
"total_discount_amount": "0.00",
"contents": [],
"promotions_applied": []
},
"subtotal": "290.35",
"discount": "0.00",
"discount_coupon": "0.00",
"discount_gateway": "0.00",
"total": "291.35",
"total_usd": "0.00",
"checkout_enabled": true,
"weight": "5.000",
"currency": "BRL",
"language": "pt",
"gateway": null,
"gateway_id": null,
"shipping": "api_128646",
"shipping_option": "Nimbus 2001",
"shipping_option_code": "nimbus-201",
"shipping_option_reference": null,
"shipping_pickup_details": null,
"shipping_tracking_number": null,
"shipping_tracking_url": null,
"shipping_store_branch_name": null,
"shipping_pickup_type": "ship",
"shipping_suboption": [],
"extra": {},
"storefront": "store",
"note": null,
"created_at": "2021-05-12T19:08:06+0000",
"updated_at": "2021-05-13T21:04:00+0000",
"completed_at": null,
"next_action": "noop",
"payment_details": {
"method": null,
"credit_card_company": null,
"installments": 1
},
"attributes": [],
"products": [
{
"id": 516763823,
"depth": "2.00",
"height": "20.00",
"name": "Varinha do Harry Potter (Preto)",
"price": "58.07",
"product_id": 87219151,
"image": {
"id": 171099852,
"product_id": 87219151,
"src": "https://d2r9epyceweg5n.cloudfront.net/stores/001/679/854/products/varinha-hp-luxo-21-5ebe5e31da8e2b693515728471178129-1024-10241-bc9b30adf4b178fabc16202348529015-1024-1024.jpeg",
"position": 1,
"alt": [],
"created_at": "2021-05-05T17:14:05+0000",
"updated_at": "2021-05-10T17:22:52+0000"
},
"quantity": 5,
"free_shipping": false,
"weight": "1.00",
"width": "4.00",
"variant_id": 332977991,
"variant_values": [
"Preto"
],
"properties": [],
"sku": null,
"barcode": null
}]
}

POST /checkouts/{cart_id}/coupons

Add a discount coupon to the cart.

ParameterDescriptionTypeRequired
coupon_idID of the Coupon that applies to this abandoned cart.IntegerYes
{
"coupon_id": 1029384756
}

HTTP/1.1 200 OK

{
"id": 987654321,
"token": "b5d911460455d44411c7f259da4309b3d099291e",
"store_id": 1234567,
"abandoned_checkout_url": "https://abandonedcheckouturl/checkout/v3/order/proxy/987654321/b5d911460455d44411c7f259da4309b3d099291e",
"contact_email": "hetoca2855@threepp.com",
"contact_name": "3245U67Jyhrtegf 23fewsdf",
"contact_phone": "",
"contact_identification": "83092433084",
"shipping_name": "3245U67Jyhrtegf",
"shipping_phone": "",
"shipping_address": null,
"shipping_number": null,
"shipping_floor": null,
"shipping_locality": null,
"shipping_zipcode": "75474567",
"shipping_city": "City",
"shipping_province": "State",
"shipping_country": "BR",
"shipping_min_days": -5,
"shipping_max_days": -4,
"billing_name": "3245U67Jyhrtegf",
"billing_phone": "",
"billing_address": "zewrtryewr",
"billing_number": "654",
"billing_floor": "",
"billing_locality": "aersrdgfd",
"billing_zipcode": "75474567",
"billing_city": "City",
"billing_province": "State",
"billing_country": "BR",
"shipping_cost_owner": "38.15",
"shipping_cost_customer": "38.15",
"coupon": [],
"promotional_discount": {
"id": null,
"store_id": 1234567,
"order_id": 987654321,
"created_at": "2021-05-18T16:28:17+0000",
"total_discount_amount": "0.00",
"contents": [],
"promotions_applied": []
},
"subtotal": "1999.99",
"discount": "0.00",
"discount_coupon": "0.00",
"discount_gateway": "0.00",
"total": "2038.14",
"total_usd": "766.71",
"checkout_enabled": true,
"weight": "13.000",
"currency": "BRL",
"language": "pt",
"gateway": null,
"gateway_id": null,
"shipping": "api_129734",
"shipping_option": "Express Delivery",
"shipping_option_code": "xp-dlv-1",
"shipping_option_reference": "ref123 xp dlv",
"shipping_pickup_details": null,
"shipping_tracking_number": null,
"shipping_tracking_url": null,
"shipping_store_branch_name": null,
"shipping_pickup_type": "ship",
"shipping_suboption": [],
"extra": {},
"storefront": "store",
"note": "",
"created_at": "2021-05-17T14:24:54+0000",
"updated_at": "2021-05-18T16:28:17+0000",
"completed_at": null,
"next_action": "noop",
"payment_details": {
"method": "redirect",
"credit_card_company": null,
"installments": 1
},
"attributes": [],
"customer": null,
"products": [
{
"id": 192837465,
"depth": "0.00",
"height": "0.00",
"name": "Product Abc123",
"price": "1999.99",
"product_id": 564738291,
"image": {
"id": 291837465,
"product_id": 564738291,
"src": "https://d2r9epyceweg5n.cloudfront.net/stores/001/679/811/products/bc123-757914__480-3bf9322c22a0206aee16202452236251-1024-1024.png",
"position": 2,
"alt": [],
"created_at": "2021-05-05T20:07:08+0000",
"updated_at": "2021-05-10T14:00:17+0000"
},
"quantity": 1,
"free_shipping": false,
"weight": "13.00",
"width": "0.00",
"variant_id": 344345678,
"variant_values": [
"Azul",
"17"
],
"properties": [],
"sku": null,
"barcode": null
}
]
}

HTTP Errors List - POST Examples

HTTP/1.1 401 Unauthorized

{
"code": 401,
"message": "Unauthorized",
"description": "Invalid access token"
}

HTTP/1.1 404 Not Found

{
"code": 404,
"message": "Not Found",
"description": null
}

HTTP/1.1 415 Unsupported Media Type

{
"code": 415,
"message": "Unsupported Media Type",
"description": "Content-Type should be application/json"
}

HTTP/1.1 422 Unprocessable Entity

{
"code": 422,
"message": "Unprocessable Entity",
"description": "Validation error",
"coupon_id": [
"The coupon id field is required."
]
}

HTTP/1.1 422 Unprocessable Entity

{
"code": 422,
"message": "Unprocessable Entity",
"description": "The checkout already has an assigned coupon."
}