Function orders/get (<http://<DOMAIN>>/api/orders/get/)

Block customer_details in Getting order list only for b2b projects

note

dropshipping_details block and new ownTTNPicked parameter in the delivery_data array in the order list only for b2b projects

dropshipping_details block and new ownTTNPicked parameter in the delivery_data array in the order list only for b2b projects

Parameters:


Response:

Note: transfer of information about the order is carried out in the language of the version of the site on which it was made.

Block in analytics response - array of data about order source and client_id

customer_details block - only for b2b projects

Β In the Order List we add additional data about the customer - the group he belongs to and the type of price assigned to this group.

PUT query example

{
    "token": "c5bc0cd25647e701bc6427f3629b27b4",
    "from": "01.04.2021",
    "to": "03.04.2021",
    "additionalData": true
}

Response example

{
  "status": "OK",
  "response": {
    "orders": [
      {
        "order_id": 7,
        "user": 6,
        "delivery_name": "John Doe",
        "delivery_email": "john.doe@gmail.com",
        "delivery_phone": "+38 (055) 555-55-55",
        "delivery_city": "Kyiv",
        "delivery_address": "Branch β„–13: Dorohozhytska St, 4",
        "delivery_type": {
          "id": 3,
          "title": "Nova Poshta Branch"
        },
        "delivery_price": -1,
        "comment": "Order comment",
        "payment_type": {
          "id": 13,
          "title": "In cash"
        },
        "payment_price": 0,
        "payed": 0,
        "total_default": 3413,
        "total_sum": 3413,
        "total_quantity": 2,
        "discount_percent": 0,
        "discount_value": 0,
        "coupon_code": "",
        "coupon_percent": 0,
        "coupon_discount_value": 0,
        "coupon_type": 0,
        "stat_status": 2,
        "stat_created": "2021-04-09 12:09:01",
        "currency": "UAH",
        "order_without_callback": false,
        "products": [
          {
            "title": "Product 1",
            "article": "10000001",
            "price": 1001,
            "quantity": 1,
            "discount_marker": "PRICE_OLD",
            "type": "gift_parent",
            "storage_id": 41,
            "parent_storage_id": null,
            "total_price": 1001
          },
          {
            "title": "Product 13",
            "article": "10000013",
            "price": 0,
            "quantity": 1,
            "discount_marker": "DISCOUNT_NONE",
            "type": "gift",
            "storage_id": 42,
            "parent_storage_id": 41,
            "total_price": 0
          },
          {
            "title": "Test set",
            "article": "test_set_123",
            "price": 2412,
            "quantity": 1,
            "discount_marker": "PRODUCTS_SET",
            "type": "set_main",
            "storage_id": 43,
            "parent_storage_id": null,
            "total_price": 2412
          },
          {
            "title": "Product 1",
            "article": "10000001",
            "price": 1001,
            "quantity": 1,
            "discount_marker": "PRICE_OLD",
            "type": "set_item",
            "storage_id": 44,
            "parent_storage_id": 43,
            "total_price": 1001
          },
          {
            "title": "Product 5",
            "article": "10000005",
            "price": 1005,
            "quantity": 1,
            "discount_marker": "PRICE_OLD",
            "type": "set_item",
            "storage_id": 45,
            "parent_storage_id": 43,
            "total_price": 1005
          },
          {
            "title": "Product 9",
            "article": "10000009",
            "price": 1009,
            "quantity": 1,
            "discount_marker": "PRICE_OLD",
            "type": "set_item",
            "storage_id": 46,
            "parent_storage_id": 43,
            "total_price": 1009
          }
        ],
        "additional_data": {
          "np_ref": "8d8ecd29-9913-11eb-8513-b88303659df5",
          "np_number": 12345678912345,
          "sender_warehouse_ref": "0d545f63-e1c2-11e3-8c4a-0050568002cf",
          "recipient_warehouse_ref": "39931b8c-e1c2-11e3-8c4a-0050568002cf"
        }
         "analytics": {
          "utm_source": "google",
          "utm_medium": "google_cpc",
          "utm_campaign": "brand_1",
          "utm_term": (none),
          "utm_content": "banner_3",
          "google_client_id": "GA1.3.391577864.1662575866"
        }
      }
    ]
  }
}

Example of a response block with new delivery data

"delivery_data": 
{
    "deliveryOperatorType": "nova_poshta",
    "tnId": "a3a24ec9-632e-11ec-8513-b88303659df5",
    "tnNumber": "20450492106170",
    "tnStatusName": "Created",
    "tnTrackingUpdateDate": null,
    "estimatedDeliveryDate": "2021-12-24",
    "departure": {
        "sender": {
            "id": "60cd854f-580c-11eb-8513-b88303659df5",
            "title": "Private person",
            "contactPerson": {
                "id": "9bc4f232-580c-11eb-8513-b88303659df5",
                "name": "Alex J. Smith (380915554433)",
                "phone": "380915554433"
            }
        },
        "address": {
            "type": "warehouse",
            "geoObject": {
                "id": "db5c88e0-391c-11dd-90d9-001a92567626",
                "name": "Kharkiv"
            },
            "warehouse": {
                "id": "169227f4-e1c2-11e3-8c4a-0050568002cf",
                "name": "Branch β„–1: Pol'ova St, 67"
            }
        }
    },
    "destination": {
        "recipient": {
            "name": "Natalie",
            "surname": "Taylor",
            "patronymic": null,
            "phone": "380914443322"
        },
        "address": {
            "type": "warehouse",
            "geoObject": {
                "id": "f706237a-4078-11de-b509-001d92f78698",
                "name": "Yavoriv"
            },
            "warehouse": {
                "id": "16922828-e1c2-11e3-8c4a-0050568002cf",
                "name": "Branch β„–1: O. Makoveya St, 62"
            }
        }
    },
    "payment": {
        "type": "Cash",
        "payer": "Sender"
    },
    "redelivery": {
        "cost": "54000",
        "payer": "Sender"
    }
}

Example of sender address for type = doors

"address": 
{
    "type:" "doors",
    "geoObject": {
          "id": "f706237a-4078-11de-b509-001d92f78698",
          "name": "Yavoriv"
      },
     "street" : {
          "id"   : "16922828-e1c2-11e3-8c4a-0050568002cf", 
          "name" : "O. Makoveya St, 62" 
      },
      "houseNumber"   : "22/12", 
      "flatNumber"    : "16B"
}

Example of response for Ukrposhta delivery with warehouse-doors type

deliveryOperatorType=ukrposhta, departure.address=warehouse and destination.address=doors

{
    "deliveryOperatorType": "ukrposhta",
    "tnId": "d07d4f9a-444a-4da9-968f-349c50e028c0",
    "tnNumber": "0000003391590",
    "tnStatusName": "Not registred at the depot",
    "tnTrackingUpdateDate": null,
    "estimatedDeliveryDate": "2022-02-15",
    "departure": {
        "sender": {
            "type": "INDIVIDUAL",
            "id": "a4018a6e-8e86-40c4-8637-3eb71669d8ae",
            "title": "Petrov Ivan Gennadyovich",
            "phone": "380636511066"
        },
        "address": {
            "type": "warehouse",
            "geoObject": {
                "id": "10754",
                "name": "Lviv"
            },
            "warehouse": {
                "id": "79000",
                "name": "79000 Lviv, Slovats'koro St, 1"
            }
        }
    },
    "destination": {
        "recipient": {
            "name": "Tamara",
            "surname": "Perepelychko",
            "patronymic": "Anatoliivna",
            "phone": "380636511023"
        },
        "address": {
            "type": "doors",
            "geoObject": {
                "id": "10754",
                "name": "Lviv"
            },
            "street": {
                "id": "490046",
                "name": "Banakha St"
            },
            "buildingNumber": "2",
            "flatNumber": "3"
        }
    },
    "payment": {
        "payer": "Recipient"
    },
    "redelivery": {
        "cost": "43998",
        "payer": "Recipient"
    }
}

Example of a query body using offset and limit

{
    "token": "c5bc0cd25647e701bc6427f3629b27b4",
    "offset": 0,
    "limit": 2,
    "additionalData": true
}

Example of a query body for exporting individual orders

{
    "token": "c5bc0cd25647e701bc6427f3629b27b4",
    "ids": [
        5, 6
    ],
    "additionalData": true
}

Example of a query body for exporting orders by status

{
    "token": "c5bc0cd25647e701bc6427f3629b27b4",
    "status": [
        2
    ],
    "additionalData": true
}