shop.order.getInfo

Returns order details.

Parameters

  • id GET

    Order ID.

  • format GET Optional

    Sets response format. Available options: json (default), xml.

Return value

Order data array with the following keys:

  • id int Order ID.
  • contact_id int Customer contact ID.
  • create_datetime datetime Order creation date and time.
  • update_datetime datetime Last order update date and time.
  • state_id string Order status ID. The list of IDs of all order statuses set up in the store can be obtained using method shop.settings.get returning them in the order_states response field.
  • total float Order total cost, expressed in the order currency, in the decimal(15,4) format.
  • currency string 3-letter order currency ID in the ISO 4217 format.
  • rate float Order currency rate towards the main store currency.
  • tax float Amount of the applied taxes, expressed in the order currency, in the decimal(15,4) format.
  • shipping float Shipping cost, expressed in the order currency, in the decimal(15,4) format.
  • discount float Discount amount, expressed in the order currency, in the decimal(15,4) format.
  • paid_year int Number of year from the order payment date.
  • paid_quarter int Number of quarter from the order payment date.
  • paid_month int Number of month from the order payment date.
  • paid_date date Order payment date in the yyyy-mm-dd format.
  • auth_date date Funds authorization date in the yyyy-mm-dd format.
  • is_first int Flag (0 or 1) denoting customer’s first paid order.
  • unsettled int Flag (0 or 1) denoting whether this is a unsettled order.
  • comment string Comment to order left by the customer.
  • shipping_datetime datetime Date and time corresponding to the end of the period selected in the Courier shipping when order action Edit shipping details.
  • params array Order parameters array with the following keys:
  • params['shipping_id'] int Selected shipping option ID.
  • params['payment_id'] int Selected payment method ID.
  • params['referer_host'] string Domain name of the referring website from which the customer visited the storefront.
  • params['departure_datetime'] datetime Date and time since which the order is considered ready for shipping.
  • params['coupon_id'] int ID of the applied discount coupon.
  • params['sales_channel'] string Sales channel information — 'backend:' (order was created in the store backend), 'storefront:...' (order was placed in the storefront), 'buy_button:' (order was placed via a “Buy button” widget).
  • params['shipping_address...>'] string Shipping address fields.
  • params['shipping_name'] string Shipping method name.
  • params['payment_plugin'] string Payment plugin ID.
  • params['payment_name'] string Payment method name.
  • params['shipping_currency'] string 3-letter code of the order currency in the ISO 4217 format.
  • params['reduced'] int Flag (0 or 1) denoting that ordered products’ stock quantities were reduced during the order processing history.
  • params['reduce_times'] int Number of times that ordered products’ stock quantities were reduced during the order processing history.
  • contact array Customer data array with the following keys:
  • contact['id'] int Customer contact ID.
  • contact['name'] string Full name.
  • contact['email'] string Email address.
  • contact['phone'] string Phone number.
  • contact['registered'] bool Whether the customer is registered and is allowed to sign into their account with a password.
  • contact['photo_50x50'] string Customer’s photo URL or a link to their Gravatar image.
  • items array Array of ordered products and services:
  • items[]['id'] int Order item ID.
  • items[]['order_id'] string Order ID.
  • items[]['name'] string Order item name.
  • items[]['product_id'] int ID of the ordered product.
  • items[]['sku_id'] int ID the ordered product variant.
  • items[]['sku_code'] string Code of the ordered product variant.
  • items[]['type'] string Order item type — 'product' or 'service'.
  • items[]['service_id'] int Service ID if the order item is a service.
  • items[]['service_variant_id'] int Service variant ID if the order item is a service.
  • items[]['price'] float Order item price, expressed in the order currency, in the decimal(15,4) format.
  • items[]['quantity'] float Order item quantity in the decimal(15,3) format.
  • items[]['quantity_denominator'] int Available precision for stock quantities. Acceptable values: 1 (whole pieces), 10 (precision to tenths), 100 (precision to hundredths), 1000 (precision to thousandths).
  • items[]['stock_id'] int ID of the stock from which ordered product’s quantity must be withdrawn.
  • items[]['virtual_stock_id'] int ID of the virtual stock from which ordered product’s quantity must be withdrawn.
  • items[]['purchase_price'] float Ordered product’s purchase price, expressed in the order currency, in the decimal(15,4) format.
  • items[]['total_discount'] float Discount amount calculated for the entire quantity of the ordered product, expressed in the order currency, in the decimal(15,4) format.
  • items[]['tax_percent'] float Percentage of the applied tax in the decimal(15,4) format.
  • items[]['tax_included'] int Flag (0 or 1) denoting whether the tax amount is included in the product price.
  • items[]['stock_unit_id'] int Ordered product’s stock quantity unit ID.
  • items[]['image_id'] int Product image ID from the ordered.

Example

https://demo1.webasyst.com/api.php/shop.order.getInfo?