With Ecwid API, you can easily place new orders to the store by specifying all their details and sending an API call.
Call the request with order details in JSON format to place a new order.
Create order request does not calculate any order details. Use request before placing an order.
Specify order statuses
You can make a call with both public and secret access tokens.
However, the public_token only allows you to place orders with INCOMPLETE payment status and AWAITING_PROCESSING shipping status.
Use secret_token to place orders with PAID and SHIPPED payment and shipping statuses.
Change customer's number of orders and product stock
Orders placed with API calls automatically change product stock and customer's number of orders if:
A new order is placed with the PAID payment status
Order request JSON contains valid product and/or combination IDs.
Order request JSON contains the customer's email and/or ID.
If a customer with a specified email does not yet exist, the account will be automatically created upon placing an order. The new order will also automatically be assigned to this account.
In response, you receive a JSON with order ID and internal order ID (for old apps):
{
"id": 547872251,
"orderId": "TL3E4"
}
You can use any of the IDs for API calls. However, we don't recommend sharing the internal ID with customers or store owners, as they can't see it anywhere in Ecwid admin or notifications.