Orders
Mutation
addOrderReviewComment — Returns OrderActivity
No scope required
Add a comment to the provided review
| Arguments | Type | Description |
|---|---|---|
|
review |
The ID of the order review the comment is being added to |
|
|
to |
What the comment should be applied to, if PRODUCT is specified, |
|
|
id |
The ID of the product to apply the comment to, should only be provided when PRODUCT is specified in |
|
|
comment |
String! |
The comment to add to the review |
Example Mutation
mutation AddOrderReviewComment($review: ID!, $to: OrderActivityCommentToEnum!, $comment: String!) {
addOrderReviewComment(review: $review, to: $to, comment: $comment) {
processTime
}
}
# Example variables
{
"review": "<REVIEW>",
"to": "ORDER",
"comment": "<COMMENT>"
}Mutation
cancelOrder — Returns Order
Scopes Required: stock_delete
Cancel an existing order, this won't adjust any inventory
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the order to cancel |
Example Mutation
mutation CancelOrder($id: ID!) {
cancelOrder(id: $id) {
id,
type,
status,
completed,
undergoingReview
}
}
# Example variables
{
"id": "<ID>"
}Mutation
createOrder — Returns Order
No scope required
Create a new order, you can also generate orders through this mutation
| Arguments | Type | Description |
|---|---|---|
|
type |
The type of order to create |
|
|
from |
Where the order is from, or null if from all suppliers (orders only) |
|
|
to |
Who the order is to |
|
|
orderDate |
The date of the order / invoice / transfer, defaults to today's date |
|
|
dueDate |
The date that the order is due to be received / paid |
|
|
invoiceNumber |
String |
The invoice / order number of the order |
|
feePercentage |
Float |
The order fee percentage |
|
enteredAs |
How the costs should be displayed on the order page (Does not represent how the cost values are actually stored) |
|
|
reference |
String |
The reference number of the order |
|
notes |
String |
Any public notes about this order, this can be printed out on the order |
|
internalNotes |
String |
Any internal notes about this order, this will not be displayed outside Shopfront |
|
includeFreight |
Boolean |
Whether the invoice includes freight or not, defaults to true |
|
mergeable |
Boolean |
Whether the order should be able to be merged, note this does not affect merging through the API, only through the UI, defaults to TRUE except for when order type is set to RECEIVE |
|
products |
The products on the order, not valid to use when generating an order |
|
|
generate |
How the order should be generated, not valid to use when providing a list of products |
Example Mutation
mutation CreateOrder($type: OrderTypeEnum!, $to: ID!) {
createOrder(type: $type, to: $to) {
id,
type,
status,
completed,
undergoingReview
}
}
# Example variables
{
"type": "ORDER",
"to": "<TO>"
}Mutation
createOrderByMatch — Returns Order
No scope required
Create a new order
| Arguments | Type | Description |
|---|---|---|
|
type |
The type of order to create |
|
|
from |
Where the order is from |
|
|
to |
Who the order is to |
|
|
orderDate |
The date of the order / invoice / return, defaults to today's date |
|
|
dueDate |
The date that the order is due to be received / paid |
|
|
invoiceNumber |
String |
The invoice / order number of the order |
|
feePercentage |
Float |
The order fee percentage |
|
enteredAs |
How the costs should be displayed on the order page (Does not represent how the cost values are actually stored) |
|
|
reference |
String |
The reference number of the order |
|
notes |
String |
Any public notes about this order, this can be printed out on the order |
|
internalNotes |
String |
Any internal notes about this order, this will not be displayed outside Shopfront |
|
attachments |
A list of URL attachments to add to the order |
|
|
includeFreight |
Boolean |
Whether the invoice includes freight or not, defaults to true |
|
expectedTotal |
Float |
The expected total of the invoice |
|
totalFees |
Float |
The total fees, this will be automatically distributed across each product as per the supplier settings, this cannot be used when specifying fees individually |
|
totalFreight |
Float |
The total freight, this will be automatically distributed across each product as per the supplier settings, this cannot be used when specifying freight individually |
|
mergeable |
Boolean |
Whether the order should be able to be merged, note this does not affect merging through the API, only through the UI, defaults to TRUE except for when order type is set to RECEIVE |
|
products |
The products on the order, not valid to use when generating an order |
Example Mutation
mutation CreateOrderByMatching($type: OrderTypeEnum!, $from: ID!, $to: ID!) {
createOrderByMatch(type: $type, from: $from, to: $to) {
id,
type,
status,
completed,
undergoingReview
}
}
# Example variables
{
"type": "ORDER",
"from": "<FROM>",
"to": "<TO>"
}Mutation
createOrderReview — Returns OrderReview
No scope required
Create a new review for an existing order, reviews can also be automatically created on the store's settings
Example Mutation
mutation CreateOrderReview($order: ID!) {
createOrderReview(order: $order) {
id,
status,
orderStatus,
createdAt
}
}
# Example variables
{
"order": "<ORDER>"
}Mutation
deleteOrderAttachment — Returns MediaAttachment
Scopes Required: stock_edit_order delete_order_attachment
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the order attachment to delete |
Example Mutation
mutation DeleteOrderAttachment($id: ID!) {
deleteOrderAttachment(id: $id) {
id,
name,
url,
mimeType,
thumbnail
}
}
# Example variables
{
"id": "<ID>"
}Mutation
deleteOrderReviewAttachment — Returns MediaAttachment
Scopes Required: review_order delete_order_attachment
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the order review attachment to delete |
Example Mutation
mutation DeleteOrderReviewAttachment($id: ID!) {
deleteOrderReviewAttachment(id: $id) {
id,
name,
url,
mimeType,
thumbnail
}
}
# Example variables
{
"id": "<ID>"
}Mutation
markOrdersAsRelated — Returns boolean
Scopes Required: stock_edit_order
This marks multiple orders as being related to a single invoice, it doesn't affect the invoice in any way
Example Mutation
mutation MarkOrdersAsRelated($orders: [ID!]!, $relateTo: ID!) {
markOrdersAsRelated(orders: $orders, relateTo: $relateTo)
}
# Example variables
{
"orders": [
"<ORDERS>"
],
"relateTo": "<RELATE_TO>"
}Mutation
markReviewAsCancelled — Returns OrderReview
Scopes Required: review_order
Mark a review as cancelled, a new review will need to be created before processing the order
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the review to cancel |
Example Mutation
mutation MarkReviewAsCancelled($id: ID!) {
markReviewAsCancelled(id: $id) {
id,
status,
orderStatus,
createdAt
}
}
# Example variables
{
"id": "<ID>"
}Mutation
markReviewAsCompleted — Returns OrderReview
Scopes Required: review_order
Mark a review as completed, this will then allow you to continue to process the order
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the review to complete |
Example Mutation
mutation MarkReviewAsCompleted($id: ID!) {
markReviewAsCompleted(id: $id) {
id,
status,
orderStatus,
createdAt
}
}
# Example variables
{
"id": "<ID>"
}Mutation
receiveOrder — Returns OrderReceiveResults
Scopes Required: stock_receive
Receive an order, this will update inventory and costs for all products on the order
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the order to receive |
Example Mutation
mutation ReceiveOrder($id: ID!) {
receiveOrder(id: $id) {
__typename
}
}
# Example variables
{
"id": "<ID>"
}Mutation
reopenOrder — Returns Order
Scopes Required: stock_edit_order
Reopen an order that has been sent
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the sent order to reopen |
Example Mutation
mutation ReopenOrder($id: ID!) {
reopenOrder(id: $id) {
id,
type,
status,
completed,
undergoingReview
}
}
# Example variables
{
"id": "<ID>"
}Mutation
reopenReview — Returns OrderReview
Scopes Required: review_order
Reopen a completed review, marking as in progress
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the review to reopen |
Example Mutation
mutation ReopenReview($id: ID!) {
reopenReview(id: $id) {
id,
status,
orderStatus,
createdAt
}
}
# Example variables
{
"id": "<ID>"
}Mutation
sendOrder — Returns OrderSendResults
Scopes Required: stock_send
This will mark an order as sent, if this order is from multiple suppliers, it will split into several orders
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the order to send |
Example Mutation
mutation SendOrder($id: ID!) {
sendOrder(id: $id) {
__typename
}
}
# Example variables
{
"id": "<ID>"
}Mutation
updateOrder — Returns Order
No scope required
Update an existing order
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the order to update |
|
|
from |
Where the order is from, if not specified it won't change where the order is from |
|
|
to |
Where the order is to, if not specified it won't change where the order is to |
|
|
status |
What status the order is at when the update was expected, this is used just for validation |
|
|
orderDate |
The date of the order / invoice / transfer |
|
|
dueDate |
The date that the order is due to be received / paid |
|
|
invoiceNumber |
String |
The invoice / order number |
|
reference |
String |
The reference for this order |
|
enteredAs |
How the costs should be displayed on the order page (Does not represent how the cost values are actually stored) |
|
|
notes |
String |
Any public notes about the order, this can be printed |
|
internalNotes |
String |
Any internal notes about this order, this will not be displayed outside Shopfront |
|
includeFreight |
Boolean |
Whether the invoice includes freight or not |
|
expectedTotal |
Float |
The total that the invoice is expected to match to |
|
feePercentage |
Float |
The order fee percentage |
|
products |
The products on the order |
Example Mutation
mutation UpdateOrder($id: ID!) {
updateOrder(id: $id) {
id,
type,
status,
completed,
undergoingReview
}
}
# Example variables
{
"id": "<ID>"
}Mutation
updateOrderReviewerStatus — Returns OrderReviewer
Scopes Required: review_order
Modify a user's review on an in progress review
| Arguments | Type | Description |
|---|---|---|
|
review |
The ID of the review to modify the reviewers on |
|
|
reviewer |
The reviewer to change the review status for |
|
|
status |
The status to change to |
Example Mutation
mutation UpdateOrderReviewerStatus($review: ID!, $reviewer: ID!, $status: OrderReviewerStatusEnum!) {
updateOrderReviewerStatus(review: $review, reviewer: $reviewer, status: $status) {
status
}
}
# Example variables
{
"review": "<REVIEW>",
"reviewer": "<REVIEWER>",
"status": "NO_REVIEW"
}Mutation
updateOrderReviewers — Returns [OrderReviewer]
Scopes Required: modify_order_reviewers
Modify who the reviewers are for an order review, any reviewer who has already reviewed cannot be removed
Example Mutation
mutation UpdateOrderReviewers($review: ID!, $reviewers: [ID!]!) {
updateOrderReviewers(review: $review, reviewers: $reviewers) {
status
}
}
# Example variables
{
"review": "<REVIEW>",
"reviewers": [
"<REVIEWERS>"
]
}