Orders

Overview

The Orders API abstracts the Orders API from Woocommerce.

Creating a new order

It is possible to create an order for a logged in customer. The following squence diagram shows the required calls to successfully create an order.

The customer_id is the data.user.data.ID from the login response.

Create an order.

POST https://console.flecs.tech/api/v2/my/orders

Creates a new order.

Headers

NameTypeDescription

Authorization*

String

Bearer token

Request Body

NameTypeDescription

customer_id*

Number

payment_method*

String

"b2bking-invoice-gateway"

payment_method_title

String

"Payment on account"

billing*

Object

{ first_name: String, last_name: String, company: String, address: String, city: String, postcode: String, state: String, country: String, email: String,

vat: String }

line_items*

Array

[ { product_id: Number, quantity: Number } ]

set_paid*

Boolean

True

Last updated