Order placement

When placing an order, the order_created event will send JSON data using the PUT method in the body of the query to the links that were registered as data recipients

Data example:

JSON
{
  "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
    }
  ]
}


Fields (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 (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

    • 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

    • 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