Elocuenti Carts API
The carts API from Elocuenti — 1 operation(s) for carts.
The carts API from Elocuenti — 1 operation(s) for carts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/elocuenti-com:elocuenti-com-carts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Elocuenti Carts API
version: 1.0.0
description: 'The public REST API of Elocuenti: contacts, conversations, funnels, WhatsApp templates, knowledge base, automations, events, AI calls, webhooks and charges (Colombia).
Authenticate every request with `Authorization: Bearer `. A key that starts with `eloc_live_` acts in production; one that starts with `eloc_sand_` is a sandbox key: it never messages or calls your customers, and the **Sandbox** line of each operation says what it does instead. Create keys in Settings → API Keys.
Guides and reference: https://www.elocuenti.com/api/docs'
servers:
- url: https://www.elocuenti.com
tags:
- name: Carts
paths:
/api/v1/carts/abandoned:
post:
tags:
- Carts
summary: Recover an abandoned cart
description: 'Saves an abandoned cart and writes to the buyer by WhatsApp with your cart template; then the AI follows the conversation in your recovery funnel until they buy. Sending the same `cart_id` again within the waiting window writes nothing. Phones of the United States and Canada (+1) and contacts who opted out of marketing get no message: the cart is saved and nothing is sent.
It answers `202` with `status`: `cart_recovery_triggered` (sent), `cart_recovery_queued` (with `wait: false`, sent in the background) or `cart_saved_template_failed` (saved, the template failed: see `hint`), and `200` with `cart_saved_template_deduplicated` when the buyer was already written to recently.
**Permission:** `messages:write` · **Sandbox:** checked, nothing is saved or sent (`simulated: true`) · **Idempotency:** `cart_id` in the body · **Max body:** 5 MB'
operationId: create_abandoned_cart
security:
- ApiKey: []
x-access:
permission: messages:write
sandbox: simulate
idempotencyField: cart_id
maxBody: 5 MB
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AbandonedCartRequest'
examples:
cart:
summary: Abandoned cart
value:
phone: '+573001234567'
cart_id: cart-1042
customer_name: Ana Gómez
customer_email: ana@example.com
items:
- name: Running shoes
price: 189900
quantity: 1
sku: SH-42
total: 189900
currency: COP
template_name: abandoned_cart
recovery_url: https://shop.example.com/cart/1042
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AbandonedCartResponse'
'202':
description: 'Accepted: the request is valid and the work finishes asynchronously. It does not mean the effect already happened.'
content:
application/json:
schema:
$ref: '#/components/schemas/AbandonedCartResponse'
'400':
description: 'Malformed request: a rule the JSON Schema cannot express (between fields, a required signature header that is missing) or a body that is not UTF-8. Broken JSON in UTF-8 answers **422** `json_invalid` instead.'
'401':
description: 'Not authenticated: the API key is missing, invalid or expired.'
'403':
description: Authenticated, but without permission for this resource or business.
'422':
description: The body or the parameters fail the schema's validation.
'429':
description: The API key or the IP went over its request limit.
'500':
description: 'Internal error: there is nothing the client can change to fix it.'
components:
schemas:
CartItem:
type: object
properties:
name:
type: string
minLength: 1
title: Name
price:
type: number
minimum: 0
title: Price
quantity:
default: 1
type: integer
minimum: 1
title: Quantity
sku:
anyOf:
- type: string
- type: 'null'
title: Sku
image_url:
anyOf:
- type: string
- type: 'null'
title: Image Url
variant_title:
anyOf:
- type: string
- type: 'null'
title: Variant Title
required:
- name
- price
description: A single item in the abandoned cart.
title: CartItem
AbandonedCartRequest:
type: object
properties:
phone:
type: string
minLength: 10
title: Phone
items:
minItems: 1
maxItems: 100
type: array
items:
$ref: '#/components/schemas/CartItem'
title: Items
total:
type: number
minimum: 0
title: Total
template_name:
type: string
minLength: 1
title: Template Name
template_params:
anyOf:
- type: object
additionalProperties: true
- type: 'null'
title: Template Params
cart_id:
anyOf:
- type: string
- type: 'null'
title: Cart Id
customer_name:
anyOf:
- type: string
- type: 'null'
title: Customer Name
customer_email:
anyOf:
- type: string
- type: 'null'
title: Customer Email
subtotal:
anyOf:
- type: number
minimum: 0
- type: 'null'
title: Subtotal
currency:
default: MXN
type: string
minLength: 3
maxLength: 3
title: Currency
recovery_url:
anyOf:
- type: string
- type: 'null'
title: Recovery Url
checkout_url:
anyOf:
- type: string
- type: 'null'
title: Checkout Url
source:
default: custom
type: string
enum:
- shopify
- vtex
- tiendanube
- woocommerce
- magento
- custom
- sdk
title: Source
abandoned_at:
anyOf:
- type: string
- type: 'null'
title: Abandoned At
metadata:
anyOf:
- type: object
additionalProperties: true
- type: 'null'
title: Metadata
from:
anyOf:
- type: string
- type: 'null'
description: Optional. The business WhatsApp number to send from, in E.164 (e.g. `+573001234567`). Omit it to send from the business default. A number that is not one of the business's active numbers is refused with 422 `from_number_not_available`.
title: From
wait:
default: true
type: boolean
title: Wait
required:
- phone
- items
- total
- template_name
description: Request body for POST /api/v1/carts/abandoned.
title: AbandonedCartRequest
AbandonedCart:
type: object
properties:
cart_id:
anyOf:
- type: string
- type: 'null'
title: Cart Id
conversation_id:
anyOf:
- type: string
- type: 'null'
title: Conversation Id
status:
type: string
enum:
- cart_recovery_triggered
- cart_recovery_queued
- cart_saved_template_failed
- cart_saved_template_deduplicated
title: Status
cart_saved:
type: boolean
title: Cart Saved
template_sent:
type: boolean
title: Template Sent
pipeline_instance_id:
anyOf:
- type: string
- type: 'null'
title: Pipeline Instance Id
queued:
anyOf:
- type: boolean
- type: 'null'
description: Present when `wait` was false.
title: Queued
template_used:
anyOf:
- type: string
- type: 'null'
title: Template Used
template_error:
anyOf:
- type: string
- type: 'null'
title: Template Error
warning:
anyOf:
- type: string
- type: 'null'
title: Warning
hint:
anyOf:
- type: string
- type: 'null'
description: What to fix when the template failed.
title: Hint
last_sent_at:
anyOf:
- type: string
- type: 'null'
description: 'Dedup: when the last message went out.'
title: Last Sent At
cooldown_hours:
anyOf:
- type: number
- type: 'null'
title: Cooldown Hours
next_allowed_at:
anyOf:
- type: string
- type: 'null'
description: 'Dedup: earliest next message.'
title: Next Allowed At
from:
anyOf:
- type: string
- type: 'null'
description: The business number the notice left from, in E.164. Present only when it already went out (not when it is queued, delegated to a workflow or saved without sending).
title: From
required:
- cart_id
- conversation_id
- status
- cart_saved
- template_sent
description: '`data` of the answer: 202 once saved (sent, queued or template failed), 200 on dedup.'
title: AbandonedCart
AbandonedCartResponse:
type: object
properties:
data:
$ref: '#/components/schemas/AbandonedCart'
request_id:
anyOf:
- type: string
- type: 'null'
examples:
- 3f9a1c07d2b4
title: Request Id
simulated:
description: '`true` only with a sandbox key: the request was checked in full and nothing was sent or saved.'
type: boolean
title: Simulated
required:
- data
title: AbandonedCartResponse
securitySchemes:
ApiKey:
type: http
scheme: bearer
bearerFormat: API key