Orders

Query

order — Returns Order

Scopes Required: see_stock_management

Arguments Type Description

id

ID!

The ID of the order to retrieve

Example Query
query GetOrder($id: ID!) {
    order(id: $id) {
        id,
        type,
        status,
        completed,
        undergoingReview
    }
}

# Example variables
{
    "id": "<ID>"
}

Query

orderReview — Returns OrderReview

Scopes Required: see_stock_management

Arguments Type Description

id

ID!

The ID of the order review to retrieve

Example Query
query GetOrderReview($id: ID!) {
    orderReview(id: $id) {
        id,
        status,
        orderStatus,
        createdAt
    }
}

# Example variables
{
    "id": "<ID>"
}

Query

orders — Returns ConnectionType of Order

Scopes Required: see_stock_management

Sortable Fields

Fields from Order that can be used to sort the connection items

  • createdAt
  • sentAt
  • receivedAt
  • createdBy
  • sentBy
  • receivedBy
  • orderDate
  • dueDate
Arguments Type Description

status

OrderStatusEnum

The status of the order

type

OrderTypeEnum

The type of order

invoiceNumber

String

The invoice number / order number of the order

orderDateStart

Date

Get order that have an order date since this date (inclusive)

orderDateEnd

Date

Get orders that have an order date before this date (inclusive)

dueDateStart

Date

Get orders that have a due date since this date (inclusive)

dueDateEnd

Date

Get orders that have a due date before this date (inclusive)

reference

String

The reference for the order

supplier

ID

The supplier of the order

outlet

ID

The outlet to search for

product

ID

Get orders that contain this product

createdBy

ID

Who created the order

sentBy

ID

Who sent the order

receivedBy

ID

Who received the order

transferee

ID

The transferee the order is for

vendorConnection

ID

The vendor connection to search for

includeMerged

Boolean

Whether to include orders that have been merged into other orders (defaults to false), when used with mergedInto, true will display orders that have no merge, false will display only orders that have the specified id

mergedInto

ID

The ID of the order to get other orders that have been merged into (can be used with includeMerged)

mergeable

Boolean

Get orders that are mergeable (true is to get only mergeable orders, false is no mergeable orders, null is all orders)

Example Query
query GetOrders($status: OrderStatusEnum) {
    orders(status: $status) {
        edges {
            node {
                id,
                type,
                status,
                completed,
                undergoingReview
            }
        },
        pageInfo {
            hasNextPage,
            endCursor
        }
    }
}

# Example variables
{
    "status": "OUTSTANDING"
}