This method creates an order with the given items and quantities for a user’s customer. The order will be dispatched, after user's payment, to the given recipient (user’s customer).

Use

Method Url
Post /restful/ghost/orders/0/dropshipping

Request Headers

This method works using JSON or XML format, set the following headers to choose the format you want to use:

Key Value
Accept application/xml or application/json
Content-type application/xml or application/json

Authentication

Remember to authenticate properly, using HTTP Basic Authentication with your API-Key as username and your password.

Request Body

The request body contains the order items informations and the recipient detail.

Conditions for autoConfirm: - One of the following must be true: - The user's ecredit is sufficient to cover the cost of the order - The user has enabled auto-confirmation in their settings - The carrier is valid for the order, or a default carrier can be assigned to the order, if no ID is provided

Example XML Request

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
    <order_list>
        <order>
            <key>2345</key>
            <date>2017/01/31 23:59:59 +0000</date>
            <carrierId>20</carrierId>
            <recipient_details>
                <recipient>ACME srl</recipient>
                <careof />
                <cfpiva>12345558</cfpiva>
                <customer_key>7777</customer_key>
                <notes></notes>
                <address>
                    <street_type>Via</street_type>
                    <street_name>Roma</street_name>
                    <address_number>1</address_number>
                    <zip>10100</zip>
                    <city>TORINO</city>
                    <province>TO</province>
                    <countrycode>IT</countrycode>
                </address>
                <phone>
                    <prefix>+39</prefix>
                    <number>0112838474</number>
                </phone>
            </recipient_details>
            <item_list>
                <item>
                    <stock_id>148148</stock_id>
                    <quantity>10</quantity>
                </item>
                <item>
                    <stock_id>148367</stock_id>
                    <quantity>15</quantity>
                </item>
            </item_list>
            <autoConfirm>true</autoConfirm>         
        </order>
    </order_list>
</root>

Example JSON Request

{
    "order_list": [
        {
            "key": "2357",
            "date": "2021/02/02 23:59:59 +0000",
            "carrierId": "20",
            "recipient_details": {
                "recipient": "ACME srl",
                "cfpiva": "12345558",
                "customer_key": "7777",
                "address": {
                    "street_type": "Via",
                    "street_name": "Roma",
                    "address_number": "1",
                    "zip": "10100",
                    "city": "TORINO",
                    "province": "TO",
                    "countrycode": "IT"
                },
                "phone": {
                    "prefix": "+39",
                    "number": "0112838474"
                }
            },
            "item_list": [
                {
                    "stock_id": "1578",
                    "quantity": "1"
                }
            ],
            "autoConfirm": "true"
        }
    ]
}

Response Body

The response body contains a list of the models remaining in your reservation. Each model has three attributes:

Example XML Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root order_id="1000">
    <model stock_id="148148" locked="10" available="5" />
</root>

Example JSON Response

{
"models": [
    {
        "stock_id": 1578,
        "locked": 1,
        "available": 0
    },
    {
        "stock_id": 1567,
        "locked": 1,
        "available": 0
    }
],
"order_id": 0
}

Notes