openapi: 3.0.3
info:
title: ActiveCampaign SMS Broadcast Accounts Ecommerce API
description: API for managing SMS broadcasts, lists, metrics, and AI-powered content generation in ActiveCampaign
version: 3.0.0
contact:
name: ActiveCampaign Support
url: https://www.activecampaign.com
x-generated-from: documentation
servers:
- url: https://{yourAccountName}.api-us1.com/api/3
description: US-based Users
variables:
yourAccountName:
default: yourAccountName
security:
- ApiToken: []
tags:
- name: Ecommerce
paths:
/ecomCustomers:
post:
summary: ActiveCampaign Create a Customer
description: Create a new e-commerce customer resource.
operationId: create-customer
requestBody:
content:
application/json:
schema:
type: object
properties:
ecomCustomer:
properties:
connectionid:
type: string
description: The id of the connection object for the service where the customer originates.
externalid:
type: string
description: The id of the customer in the external service.
email:
type: string
description: The email address of the customer.
acceptsMarketing:
type: string
description: Indication of whether customer has opt-ed in to marketing communications. 0 = not opted-in, 1 = opted-in. A value of 0 means the contact will match the "Has not opted in to marketing" segment condition and a value of 1 means the contact will match the "Has opted in to marketing" segment condition.
required:
- connectionid
- externalid
- email
type: object
examples:
JSON:
value:
ecomCustomer:
connectionid: '1'
externalid: '56789'
email: alice@example.com
acceptsMarketing: '1'
responses:
'201':
description: '201'
content:
application/json:
examples:
Result:
value: "{\n \"ecomCustomer\": {\n \"connectionid\": \"1\",\n \"externalid\": \"56789\",\n \"email\": \"alice@example.com\",\n \"links\": {\n \"connection\": \"/api/3/ecomCustomers/1/connection\",\n \"orders\": \"/api/3/ecomCustomers/1/orders\"\n },\n \"id\": \"1\",\n \"connection\": \"1\"\n }\n}"
schema:
type: object
properties:
ecomCustomer:
type: object
properties:
connectionid:
type: string
example: '1'
externalid:
type: string
example: '56789'
email:
type: string
example: alice@example.com
links:
type: object
properties:
connection:
type: string
example: /api/3/ecomCustomers/1/connection
orders:
type: string
example: /api/3/ecomCustomers/1/orders
id:
type: string
example: '1'
connection:
type: string
example: '1'
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Ecommerce
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
summary: ActiveCampaign List All Customers
description: List all e-commerce customer resources.
operationId: list-all-customers
parameters:
- name: filters[email]
in: query
description: Filter by the email address of a customer.
schema:
type: string
- name: filters[externalid]
in: query
description: Filter by the id of the customer in the external service.
schema:
type: string
- name: filters[connectionid]
in: query
description: Filter by the id of the connection object for the service where the customer originates.
schema:
type: string
responses:
'200':
description: '200'
content:
application/json:
examples:
GET /ecomCustomers (Example RESPONSE):
value: "{\n \"ecomCustomers\": [\n {\n \"connectionid\": \"1\",\n \"externalid\": \"56789\",\n \"email\": \"alice@example.com\",\n \"totalRevenue\": \"3280\",\n \"totalOrders\": \"2\",\n \"totalProducts\": \"2\",\n \"avgRevenuePerOrder\": \"2285\",\n \"avgProductCategory\": \"Electronics\",\n \"tstamp\": \"2017-02-06T14:05:31-06:00\",\n \"links\": {\n \"connection\": \"/api/3/ecomCustomers/1/connection\",\n \"orders\": \"/api/3/ecomCustomers/1/orders\"\n },\n \"id\": \"1\",\n \"connection\": \"1\"\n },\n {\n \"connectionid\": \"2\",\n \"externalid\": \"44322\",\n \"email\": \"alice@example.com\",\n \"totalRevenue\": \"7599\",\n \"totalOrders\": \"1\",\n \"totalProducts\": \"1\",\n \"avgRevenuePerOrder\": \"7599\",\n \"avgProductCategory\": \"Books\",\n \"tstamp\": \"2016-12-13T18:02:07-06:00\",\n \"links\": {\n \"connection\": \"/api/3/ecomCustomers/3/connection\",\n \"orders\": \"/api/3/ecomCustomers/3/orders\"\n },\n \"id\": \"3\",\n \"connection\": \"2\"\n },\n {\n \"connectionid\": \"0\",\n \"externalid\": \"0\",\n \"email\": \"alice@example.com\",\n \"totalRevenue\": \"10879\",\n \"totalOrders\": \"3\",\n \"totalProducts\": \"3\",\n \"avgRevenuePerOrder\": \"3626\",\n \"avgProductCategory\": \"Electronics\",\n \"tstamp\": \"2017-02-06T14:05:31-06:00\",\n \"links\": {\n \"connection\": \"/api/3/ecomCustomers/2/connection\",\n \"orders\": \"/api/3/ecomCustomers/2/orders\"\n },\n \"id\": \"2\",\n \"connection\": null\n }\n ],\n \"meta\": {\n \"total\": \"3\"\n }\n}"
schema:
type: object
properties:
ecomCustomers:
type: array
items:
type: object
properties:
connectionid:
type: string
example: '1'
externalid:
type: string
example: '56789'
email:
type: string
example: alice@example.com
totalRevenue:
type: string
example: '3280'
totalOrders:
type: string
example: '2'
totalProducts:
type: string
example: '2'
avgRevenuePerOrder:
type: string
example: '2285'
avgProductCategory:
type: string
example: Electronics
tstamp:
type: string
example: '2017-02-06T14:05:31-06:00'
links:
type: object
properties:
connection:
type: string
example: /api/3/ecomCustomers/1/connection
orders:
type: string
example: /api/3/ecomCustomers/1/orders
id:
type: string
example: '1'
connection:
type: string
example: '1'
meta:
type: object
properties:
total:
type: string
example: '3'
deprecated: false
tags:
- Ecommerce
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/ecomCustomers/{id}:
get:
summary: ActiveCampaign Retrieve a Customer
description: Retrieve an existing e-commerce customer resource.
operationId: get-customer
parameters:
- name: id
in: path
description: The id of the customer to retrieve
schema:
type: string
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"ecomCustomer\": {\n \"connectionid\": \"3\",\n \"externalid\": \"1440117293120\",\n \"email\": \"john.doe@example.com\",\n \"totalRevenue\": \"150761\",\n \"totalOrders\": \"1\",\n \"totalProducts\": \"3\",\n \"avgRevenuePerOrder\": \"150761\",\n \"avgProductCategory\": \"Musical Instrument\",\n \"tstamp\": \"2019-01-01T10:23:22-06:00\",\n \"acceptsMarketing\": \"0\",\n \"links\": {\n \"connection\": \"https://:account.api-us1.com/api/:version/ecomCustomers/15/connection\",\n \"orders\": \"https://:account.api-us1.com/api/:version/ecomCustomers/15/orders\"\n },\n \"id\": \"15\",\n \"connection\": \"3\"\n }\n}"
schema:
type: object
properties:
ecomCustomer:
type: object
properties:
connectionid:
type: string
example: '3'
externalid:
type: string
example: '1440117293120'
email:
type: string
example: john.doe@example.com
totalRevenue:
type: string
example: '150761'
totalOrders:
type: string
example: '1'
totalProducts:
type: string
example: '3'
avgRevenuePerOrder:
type: string
example: '150761'
avgProductCategory:
type: string
example: Musical Instrument
tstamp:
type: string
example: '2019-01-01T10:23:22-06:00'
acceptsMarketing:
type: string
example: '0'
links:
type: object
properties:
connection:
type: string
example: https://:account.api-us1.com/api/:version/ecomCustomers/15/connection
orders:
type: string
example: https://:account.api-us1.com/api/:version/ecomCustomers/15/orders
id:
type: string
example: '15'
connection:
type: string
example: '3'
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Ecommerce
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
summary: ActiveCampaign Update a Customer
description: Update an existing e-commerce customer resource.
operationId: update-customer
parameters:
- name: id
in: path
description: The id of the customer to update
schema:
type: string
required: true
requestBody:
content:
application/json:
schema:
type: object
properties:
ecomCustomer:
properties:
externalid:
type: string
description: The id of the customer in the external service.
connectionid:
type: string
description: The id of the connection object for the service where the customer originates.
email:
type: string
description: The email address of the customer.
acceptsMarketing:
type: string
description: Indication of whether customer has opt-ed in to marketing communications. 0 = not opted-in, 1 = opted-in. A value of 0 means the contact will match the "Has not opted in to marketing" segment condition and a value of 1 means the contact will match the "Has opted in to marketing" segment condition.
required: []
type: object
examples:
JSON:
value:
ecomCustomer:
externalid: '98765'
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"ecomCustomer\": {\n \"connectionid\": \"1\",\n \"externalid\": \"98765\",\n \"email\": \"alice@example.com\",\n \"totalRevenue\": \"3280\",\n \"totalOrders\": \"2\",\n \"totalProducts\": \"2\",\n \"avgRevenuePerOrder\": \"2285\",\n \"avgProductCategory\": \"Electronics\",\n \"tstamp\": \"2017-02-06T14:05:31-06:00\",\n \"links\": {\n \"connection\": \"/api/3/ecomCustomers/1/connection\",\n \"orders\": \"/api/3/ecomCustomers/1/orders\"\n },\n \"id\": \"1\",\n \"connection\": \"1\"\n }\n}"
schema:
type: object
properties:
ecomCustomer:
type: object
properties:
connectionid:
type: string
example: '1'
externalid:
type: string
example: '98765'
email:
type: string
example: alice@example.com
totalRevenue:
type: string
example: '3280'
totalOrders:
type: string
example: '2'
totalProducts:
type: string
example: '2'
avgRevenuePerOrder:
type: string
example: '2285'
avgProductCategory:
type: string
example: Electronics
tstamp:
type: string
example: '2017-02-06T14:05:31-06:00'
links:
type: object
properties:
connection:
type: string
example: /api/3/ecomCustomers/1/connection
orders:
type: string
example: /api/3/ecomCustomers/1/orders
id:
type: string
example: '1'
connection:
type: string
example: '1'
deprecated: false
tags:
- Ecommerce
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
delete:
summary: ActiveCampaign Delete a Customer
description: Delete an existing e-commerce customer resource.
operationId: delete-customer
parameters:
- name: id
in: path
description: The id of the customer to delete.
schema:
type: string
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Ecommerce
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/ecomOrders:
post:
summary: ActiveCampaign Create an Order
description: Create a new e-commerce order resource.
operationId: create-order
requestBody:
content:
application/json:
schema:
type: object
properties:
ecomOrder:
properties:
externalid:
type: string
description: The id of the order in the external service. ONLY REQUIRED IF EXTERNALCHECKOUTID NOT INCLUDED.
externalcheckoutid:
type: string
description: The id of the cart in the external service. ONLY REQUIRED IF EXTERNALID IS NOT INCLUDED.
source:
type: integer
description: The order source code. 0 - historical, 1 - real-time. Only real-time orders (source = 1) will show up on your Ecommerce Dashboard and trigger the “Makes a purchase” automation start, abandoned cart actions, customer conversions, or revenue attributions.
format: int32
email:
type: string
description: The email address of the customer who placed the order.
orderProducts:
properties:
name:
type: string
description: The name of the product
price:
type: integer
description: The price of the product, in cents. (i.e. $456.78 => 45678). Must be greater than or equal to zero.
format: int32
quantity:
type: integer
description: The quantity ordered.
format: int32
externalid:
type: string
description: The id of the product in the external service.
category:
type: string
description: The category of the product.
sku:
type: string
description: The SKU for the product
description:
type: string
description: The description of the product
imageUrl:
type: string
description: An Image URL that displays an image of the product
productUrl:
type: string
description: A URL linking to the product in your store
required:
- name
- price
- quantity
- externalid
type: object
totalPrice:
type: integer
description: The total price of the order in cents, including tax and shipping charges. (i.e. $456.78 => 45678). Must be greater than or equal to zero.
format: int32
shippingAmount:
type: integer
description: The total shipping amount in cents for the order
format: int32
taxAmount:
type: integer
description: The total tax amount for the order in cents
format: int32
discountAmount:
type: integer
description: The total discount amount for the order in cents
format: int32
currency:
type: string
description: The currency of the order (3-digit ISO code, e.g., 'USD').
connectionid:
type: integer
description: The id of the connection from which this order originated.
format: int32
customerid:
type: integer
description: The id of the customer associated with this order.
format: int32
orderUrl:
type: string
description: The URL for the order in the external service.
externalCreatedDate:
type: string
description: The date the order was placed.
format: date
externalUpdatedDate:
type: string
description: The date the order was updated.
abandonedDate:
type: string
description: The date the cart was abandoned. REQUIRED ONLY IF INCLUDING EXTERNALCHECKOUTID.
shippingMethod:
type: string
description: The shipping method of the order.
orderNumber:
type: string
description: The order number. This can be different than the externalid.
orderDiscounts:
properties:
name:
type: string
description: The discount code or name of the discount
type:
type: string
description: The type of discount, either 'order' for discount on the order, or 'shipping' for free shipping.
discountAmount:
type: integer
description: The amount of the discount in cents.
format: int32
required: []
type: object
required:
- externalid
- externalcheckoutid
- source
- email
- totalPrice
- currency
- connectionid
- customerid
- externalCreatedDate
- abandonedDate
type: object
examples:
Request Example:
value:
ecomOrder:
externalid: '3246315233'
source: '1'
email: alice@example.com
orderProducts:
- externalid: PROD12345
name: Pogo Stick
price: 4900
quantity: 1
category: Toys
sku: POGO-12
description: lorem ipsum...
imageUrl: https://example.com/product.jpg
productUrl: https://store.example.com/product12345
- externalid: PROD23456
name: Skateboard
price: 3000
quantity: 1
category: Toys
sku: SK8BOARD145
description: lorem ipsum...
imageUrl: https://example.com/product.jpg
productUrl: https://store.example.com/product45678
orderDiscounts:
- name: 1OFF
type: order
discountAmount: 100
orderUrl: https://example.com/orders/3246315233
externalCreatedDate: '2016-09-13T17:41:39-04:00'
externalUpdatedDate: '2016-09-14T17:41:39-04:00'
shippingMethod: UPS Ground
totalPrice: 9111
shippingAmount: 200
taxAmount: 500
discountAmount: 100
currency: USD
orderNumber: myorder-123
connectionid: '1'
customerid: '1'
responses:
'201':
description: '201'
content:
application/json:
examples:
Result:
value: "{\n \"connections\": [\n {\n \"service\": \"example\",\n \"externalid\": \"examplestore\",\n \"name\": \"My Example Store\",\n \"isInternal\": \"0\",\n \"connectionType\": \"ecommerce\",\n \"status\": \"1\",\n \"syncStatus\": \"0\",\n \"sync_request_time\": null,\n \"sync_start_time\": null,\n \"lastSync\": null,\n \"logoUrl\": \"https://myexamplestore.com/images/logo.jpg\",\n \"linkUrl\": \"https://myexamplestore.com\",\n \"cdate\": \"2018-01-12T13:13:53-06:00\",\n \"udate\": \"2018-01-12T13:13:53-06:00\",\n \"credentialExpiration\": null,\n \"links\": {\n \"options\": \"https://exampleaccount.api-us1.com/api/3/connections/1/options\",\n \"customers\": \"https://exampleaccount.api-us1.com.api-us1.com/api/3/connections/1/customers\"\n },\n \"id\": \"1\",\n \"serviceName\": \"shopify\"\n }\n ],\n \"ecomOrderProducts\": [\n {\n \"externalid\": \"PROD12345\",\n \"name\": \"Pogo Stick\",\n \"price\": 4900,\n \"quantity\": 1,\n \"category\": \"Toys\",\n \"sku\": \"POGO-12\",\n \"description\": \"lorem ipsum...\",\n \"imageUrl\": \"https://example.com/product.jpg\",\n \"productUrl\": \"https://store.example.com/product12345\"\n },\n {\n \"externalid\": \"PROD23456\",\n \"name\": \"Skateboard\",\n \"price\": 3000,\n \"quantity\": 1,\n \"category\": \"Toys\",\n \"sku\": \"SK8BOARD145\",\n \"description\": \"lorem ipsum...\",\n \"imageUrl\": \"https://example.com/product.jpg\",\n \"productUrl\": \"https://store.example.com/product45678\"\n }\n ],\n \"ecomOrderDiscounts\": [\n {\n \"name\": \"1OFF\",\n \"type\": \"order\",\n \"orderid\": \"5355\",\n \"discountAmount\": \"100\",\n \"id\": \"1\",\n \"createdDate\": \"2019-09-05T12:16:18-05:00\",\n \"updatedDate\": \"2019-09-05T12:16:18-05:00\"\n }\n ],\n \"ecomOrder\": {\n \"externalid\": \"3246315234\",\n \"source\": \"1\",\n \"email\": \"alice@example.com\",\n \"currency\": \"USD\",\n \"connectionid\": \"1\",\n \"customerid\": \"1\",\n \"orderUrl\": \"https://example.com/orders/3246315233\",\n \"shippingMethod\": \"UPS Ground\",\n \"totalPrice\": 9111,\n \"shippingAmount\": 200,\n \"taxAmount\": 500,\n \"discountAmount\": 100,\n \"externalCreatedDate\": \"2016-09-13T16:41:39-05:00\",\n \"totalProducts\": 2,\n \"createdDate\": \"2019-09-05T12:16:18-05:00\",\n \"updatedDate\": \"2019-09-05T12:16:18-05:00\",\n \"state\": 1,\n \"connection\": \"1\",\n \"orderProducts\": [\n \"1\",\n \"2\"\n ],\n \"orderDiscounts\": [\n \"1\"\n ],\n \"customer\": \"1\",\n \"orderDate\": \"2016-09-13T16:41:39-05:00\",\n \"tstamp\": \"2019-09-05T12:16:18-05:00\",\n \"links\": {\n \"connection\": \"https://exampleaccount.api-us1.com/api/3/ecomOrders/1/connection\",\n \"customer\": \"https://exampleaccount.api-us1.com/api/3/ecomOrders/1/customer\",\n \"orderProducts\": \"https://exampleaccount.api-us1.com/api/3/ecomOrders/1/orderProducts\",\n \"orderDiscounts\": \"https://exampleaccount.api-us1.com/api/3/ecomOrders/1/orderDiscounts\",\n \"orderActivities\": \"https://exampleaccount.api-us1.com/api/3/ecomOrders/1/orderActivities\"\n },\n \"id\": \"1\"\n }\n}"
schema:
type: object
properties:
connections:
type: array
items:
type: object
properties:
service:
type: string
example: example
externalid:
type: string
example: examplestore
name:
type: string
example: My Example Store
isInternal:
type: string
example: '0'
connectionType:
type: string
example: ecommerce
status:
type: string
example: '1'
syncStatus:
type: string
example: '0'
sync_request_time: {}
sync_start_time: {}
lastSync: {}
logoUrl:
type: string
example: https://myexamplestore.com/images/logo.jpg
linkUrl:
type: string
example: https://myexamplestore.com
cdate:
type: string
example: '2018-01-12T13:13:53-06:00'
udate:
type: string
example: '2018-01-12T13:13:53-06:00'
credentialExpiration: {}
links:
type: object
properties:
options:
type: string
example: https://exampleaccount.api-us1.com/api/3/connections/1/options
customers:
type: string
example: https://exampleaccount.api-us1.com.api-us1.com/api/3/connections/1/customers
id:
type: string
# --- truncated at 32 KB (83 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/activecampaign/refs/heads/main/openapi/activecampaign-ecommerce-api-openapi.yml