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>",
  "discount_codes": [
    {
      "code": "<string>",
      "amount": "<string>"
    }
  ],
  "claimed_reward_ids": [
    123
  ],
  "date": "<string>",
  "ip_address": "<string>",
  "user_agent": "<string>",
  "referral_id": "<string>",
  "tracking_id": "<string>",
  "guest": true
}'
""
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

The body is of type object.

Response

201
application/json

201

The response is of type enum<string>.

Available options: