Skip to content
Nicolas-B06 edited this page Feb 15, 2022 · 9 revisions

/src/api/order/index.js

Functions

Get list of commands for a user

getOrders(lang, postBody)
  • lang - string? : current language ("fr" is the default value) - Optional
  • postBody - any : request body overload - Optional
Example
import { getOrders } from 'aquila-connector/api/order';
const orders = await getOrders();
import { getOrders } from 'aquila-connector/api/order';
const orders = await getOrders(lang, { PostBody: { page: selectPage, limit: 15 } });

Retrieves the data of an order

getOrderById(orderId, lang)
  • orderId - string : id of order
  • lang - string? : current language ("fr" is the default value) - Optional
Example
import { getOrderById } from '@aquilacms/aquila-connector/api/order';
const data = await getOrderById(orderId, 'fr');

Download the invoice / credit note of an order

downloadBillOrder(billId)
  • billId - string : Invoice / credit note ID
Example
import { downloadbillOrder } from '@aquilacms/aquila-connector/api/order';
const res = await downloadbillOrder(billId);

Request cancellation of an order

askCancelOrder(orderId)
  • orderId - string : Order ID
Example
import { askCancelOrder} from '@aquilacms/aquila-connector/api/order';
const res = await askCancelOrder(orderId);

Clone this wiki locally