Create an order
POST
/v1/orders
Creates a new order in Appmax. An order must always be linked to a customer created beforehand.
Prerequisite
To create an order, you need the customer's customer_id. If you don't
have it yet, see
Create or update customer.
Store the returned order_id, since it is required to make the payment
or to query the order status. To understand how the total amount is
calculated, see
Total amount calculation.
Authorizations
bearerAuth
Bearer token of the merchant obtained via POST /oauth2/token using the
merchant's credentials (not the app's). See
Authentication.
Type
HTTP (bearer)
Request Body
application/json
JSON "customer_id": 29, "products_value": 12300, "discount_value": 0, "shipping_value": 3999, "products": [ { "sku": "9000010", "name": "Livro de receitas", "quantity": 1, "unit_value": 12300, "type": "digital" } ], "metadata": { "shopify_order_id": "5123456789", "shopify_checkout_id": "abc123" }
{
}
Responses
Order created successfully. The order is created with status pendente until the payment is processed.
application/json
JSON "data": { "order": { "id": 1, "status": "pendente", "metadata": { "shopify_order_id": "5123456789", "shopify_checkout_id": "abc123" } } }
{
}
POST
/v1/orders