POST
/
v2
/
orders
cURL
curl --request POST \
  --url https://api.loyaltylion.com/v2/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer_id": "<string>",
  "customer_email": "<string>",
  "merchant_id": "<string>",
  "total": "<string>",
  "total_shipping": "<string>",
  "total_paid": "<string>",
  "payment_status": "not_paid",
  "merchant_number": "<string>",
  "number": "<any>",
  "discount_codes": "<any>",
  "claimed_reward_ids": [
    123
  ],
  "date": "<string>",
  "ip_address": "<string>",
  "user_agent": "<string>",
  "referral_id": "<string>",
  "tracking_id": "<string>",
  "guest": true
}'
"<string>"
Add a new order to LoyaltyLion. This may trigger rules and award points to a customer. Merchants using a supported platform such as Shopify should usually not use this endpoint, as LoyaltyLion will retrieve orders from the platform via webhooks instead.

Authorizations

Authorization
string
header
required

An API key linked to a Program in LoyaltyLion, with a set of permissions (scopes). API keys can be created manually, or acquired through an OAuth2 flow. The API key should be provided as a Bearer token in the Authorization header

Query Parameters

site_id
number

Create the order in the specified site. This is only required for programs that have multiple sites. Programs with only a single site can omit this parameter, and the order will be created in the program's only site

Body

application/json

Body

customer_id
string
required

The ID of the customer in your platform or ecommerce store who placed the order

customer_email
string

The email address of the customer who placed the order

merchant_id

The ID of the order in your platform or ecommerce store

total

The total amount of order as a decimal string without formatting, e.g. 99.99

total_shipping

The total shipping amount for the order as a decimal string without formatting, e.g. 3.49

total_paid
string

The total amount paid for the order as a decimal string without formatting, e.g. 9.99

payment_status
enum<string>
Available options:
not_paid,
partially_paid,
paid
merchant_number
string

A optional order number to identify this order in your system

number
null
discount_codes
object[]
claimed_reward_ids
number[]

A list of LoyaltyLion claimed reward IDs that were used with this order

date
string

An ISO 8601 timestamp representing the date of the order. Defaults to now if not provided

ip_address
string

The IP address of the customer who placed the order. Used to track referrals

user_agent
string

The user agent of the customer who placed the order. Used to track referrals

referral_id
string

A LoyaltyLion referral ID, used to link this order to a referral

tracking_id
string

A LoyaltyLion tracking ID, used to link this order to a tracking source

guest
boolean

Whether this order was placed by a guest customer

Response

201

The response is of type string.

Allowed value: ""