При оформлении заказа по ссылкам которые были зарегистрированы как получатели данных при событии When placing an order, the order_created будут отправляться JSON данные методом PUT в теле запросаПример данных:event will send JSON data using the PUT method in the body of the query to the links that were registered as data recipients.
Info | ||
---|---|---|
| ||
Starting from 4.26, new parameters are added to the product data array:
|
Data example
Code Block | ||||
---|---|---|---|---|
| ||||
{ "order_id": 115, "user": 99, "delivery_name": "sdbgdasgdasg", "delivery_email": "dasgdsga@zz.cc", "delivery_phone": "+38 (012) 421-42-14", "delivery_city": "КиевKyiv", "delivery_address": "", "delivery_type": { "id": 42, "title": "СамовывозLocal pickup" }, "delivery_price": 0, "comment": "", "payment_type": { "id": 13, "title": "НаличнымиIn cash" }, "payed": 0, "total_default": 31799, "total_sum": 31799, "total_quantity": 1, "discount_percent": 0, "discount_value": 0, "coupon_code": "", "coupon_percent": 0, "coupon_discount_value": 0, "coupon_type": 0, "stat_status": 1, "stat_created": "2016-12-05 15:46:40", "currency": "UAH", "order_without_callback": true, "products": [ { "title": "MacBook Air 11.6\" 128 ГБGB, ЗеленыйGreen", "article": "MJVM2UAA", "price": 31799, "quantity": 1, "discount_marker": "DISCOUNT_CARD", "total_price": 31799, "url": "https://site.com.ua/ru/kupit/batut-atleto-140-sm-z-sitkoyu-synii", "photo_url": "https://site.com.ua/content/images/1/21893202338603_+09372ea19e.jpg" } ] } |
Поля (аналогичные полям функции ordersFields (similar to order/get function fields)
order_id - Номер заказаorder number
user - идентификатор пользователя в системе (уникален для каждого пользователя user ID in the system (unique for each user)
delivery_name - ФИО получателя recipient's full name
delivery_email - Email (уникален для каждого пользователя внутри системы, дублирование невозможноemail (is unique for each user within the system, duplication is impossible)
delivery_phone - Номер телефонаphone number
delivery_city - Городcity
delivery_address - Адрес (при выборе варианта доставки УкрПочтой поля разбиваются символом @address (if UkrPoshta delivery option is selected, fields are separated by @ symbol)
delivery_type - Тип доставки delivery type
delivery_type.id - идентификатор доставки в delivery identifier in API
2 - Курьером по ЛуцкуBy courier in Lutsk
3 - Новой ПочтойNova Posta
7 - Мист ЭкспрессMist Express
8 - Self- Самовывозdelivery
9 - УкрПочтойUkrPoshta
delivery_type.title - название варианта доставки строкой delivery option name (of a string type)
delivery_price - Стоимость доставки (Прим. Если shipping cost (Note: If delivery.price=-1; то это обозначает что стоимость доставки расчитывается по тарифам перевозчика it means that the shipping cost is calculated according to the carrier's rates )
payment_type - Тип оплаты payment type
payment_type.id - идентификатор оплаты в payment identifier in API
11 - Оплата курьеруPayment to courier
12 - Безналичный расчетCashless payment
13 - НаличнымиCash
14 - Онлайн-оплата кредитной картойOnline payment by credit card
15 - Оплата при получении (наложенный платежPayment on receipt (cash on delivery)
payment_type.title - название варианта оплаты строкой payment option name (of a string type)
payed - Оплачено whether the order is paid (1 - даyes; 0 - нетno)
total_default - Стоимость товаров (без учета скидокproducts cost (excluding discounts)
total_sum - Итоговая стоимость (с учетом всех скидок но без учета стоимости доставкиtotal cost (including all discounts, but excluding shipping costs)
total_quantity - Общее количество товаровtotal number of items
discount_percent - Относительная скидкаrelative discount
discount_value - Сумма скидкиdiscount amount
coupon_code - Код купона на скидкуdiscount coupon code
coupon_percent - Относительная скидка купонаrelative coupon discount
coupon_discount_value - Сумма скидки по купонуcoupon discount amount
coupon_type - Тип купона coupon type
0 - без купонаno coupon;
1 - сертификат на суммуcertificate for the amount;
2 - многоразовый купон на скидкуreusable discount coupon
stat_status - Статусstatus
1 - новыйnew
2 - в обработкеin process
3 - доставленdelivered
4 - не доставленnot delivered
stat_created -
...
date and time of order placement (e.g. 2014-11-21 17:38:51)
- currency -
...
- currency in which the user made the order, in ISO format (for example: UAH -
...
- hryvnia, USD -
...
- dollar, EUR -
...
- euro, etc.)
- order_without_callback (true/false) -
...
- do not call back after order placement (yes/no) (added in version 3.32)
products[i] -
...
products in an order
title -
...
product name
article -
...
product SKU
price -
...
product unit cost for the user
quantity -
...
number of units ordered
- total_price -
...
- total cost of product unit considering the ordered quantity
- discount_marker -
...
- marker for used discount on product
- PRICE_OLD -
...
- old price/relative discount for the product
- PAGE_DISCOUNT -
...
- category discount
- DISCOUNT_CARD -
...
- cumulative discount
- DISCOUNT_NONE -
...
- without discount (under conditions of promotions, etc.)
- NONE -
...
- without discount
- url - link to the product on the website
- photo_url - link to the product photo