Create Order

This endpoint records an order made by a customer. It will apply the order to all matching active campaigns and award the necessary points and/or discounts.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

The email address of the customer who placed the order.

string

The identifier used to uniquely identify the customer in your system. Required if implementing a generic e-commerce integration.

int32
required

The total amount the customer spent in cents.

string
required

The currency used (e.g. 'USD')

string
required

An identifier that uniquely identifies the order in your database. The string cannot exceed 255 characters.

string

Sometimes you might want to separate the removal of points for using a discount code at checkout and the rewarding of points for the order. We will use an order status to determine what we should do.

string

A timestamp describing when this order was placed. Defaults to the current time if not provided.

string

A comma separated list of coupon codes used on this order.

string
required

The ip address of the customer when they placed the order. This is a fraud prevention measure and required for referral program to work.

string
required

The user agent of the customer's browser when they placed the order. This is a fraud prevention measure and is required for the referral program to work.

boolean
Defaults to false

If set to true, this will ignore the ip_address & user_agent fraud checks, allowing a referral to be completed even if no ip_address or user_agent are provided. If these params are provided while set to true, the fraud checks will be ignored.

int32

The total amount the customer saved using a discount in cents.

string

This parameter should include a comma-separated list of order tags. The string cannot be longer than 255 characters

string

The employee identification number of the store clerk who processed the this transaction.

string

The first and last name of the store clerk who processed the this transaction.

string

The street name and number of the store's physical location e.g. 123 Main Street

string

The city name of the store address.

string

The state abbreviation of the store address. e.g. CA

string

The channel through which this order was processed. Values can be online (off-premise) or offline (on-premise brick and mortar store).

items
array of objects

An array of items purchased. Required if you want to run a campaign that requires certain products or collections to be purchased.

items
customer
object

Required only if you're excluding or including customers through the Swell admin.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain