The method allows importing order history or updating of orders previously imported or created by tracking, as well as changing order statuses.
Don't use this method to create new orders. The creation of new orders should be done by tracking user activity in a way that is appropriate for your platform. See REST API, JS SDK or Mobile SDKs.
Request
Endpoint
Request Type
Content-Type
https://api.personaclick.com/sync/orders
POST
application/json
Parameters
Name
Type
Requirement
Description
shop_id
string
required
Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
shop_secret
string
required
Store Secret Key in PersonaClick. Located there: Account > Settings > Store Settings
orders
Array
required
Array with orders. See the description below.
Order Object
Name
Type
Requirement
Description
id
string
required
Order ID. If the Order ID and Order Number aren't the same, it's recommended to use the Order Number value. This will allow for easy comparison of orders on both sides. Also, note that the source of this property must be the same as the one used in the User Activity Tracking (Purchase Event).
status
string
required
Order Status. The status matching must be set there in advance: Account > Settings > Order Statuses
channel
string
required
The name of the sales channel. Any string value, such as "website", "offline", "mobile_ios", "mobile_android", "infokiosk", "pos", "callcenter", etc.
date
number
required
Order date in UNIX timestamp format.
value
Object
required
Describes the parts from which the final cost of the order is calculated. See the description below.
items
Array
required in some cases
Describes the products of the order. See the description below.
This property should be missing if the synchronization of the status of an existing order is performed.
offline
boolean
optionally
Sets whether the order was created offline or not. Default: false.
email
string
optionally
User's email.
phone
string
optionally
User's phone.
loyalty_id
string
optionally
User's Loyalty ID.
location_id
string
optionally
User's Location. Should match the value from the previously given list of locations (HTTP API, XML feed).
promocode
string
optionally
The promo code that the user applied at checkout.
delivery_type
string
optionally
Delivery Type, e.g. "self_pickup", "delivery", "pickup_point", etc.
delivery_address
string
optionally
Shipping address.
delivery_date
string
optionally
Date of delivery, planned or completed. Format: YYYY-MM-DD.
delivery_time
string
optionally
Time of delivery, planned or completed. Format: hh:mm.
payment_type
string
optionally
The method of payment, such as "cash", "card", "wire", etc.
Value Object
Name
Type
Requirement
Description
total
number
required
Order's total value.
The "total" value should be equal to the "cash" plus the "bonuses" plus the "delivery" minus the "discount" values.
cash
number
optionally
Describes how much of the order's value was paid by cash.
bonuses
number
optionally
Describes how much of the order's value was paid by bonuses.
delivery
number
optionally
Describes the cost of delivery of the order.
discount
number
optionally
Describes the amount of discount (in money) applied to the order.
Items Array
Name
Type
Requirement
Description
id
string
required
Product ID.
price
number
required
Cost per unit of product.
quantity
number
required
The product quantity in the order.
API Response Code
HTTP status code
Description
200 OK
The request was successful.
403 Forbidden
The request was unsuccessful.
404 Not Found
There are no mandatory parameters in the query.
API Response Data
The response is JSON type with the following properties: