Skip to main content

⚠️ Deprecated: No longer supported

ordersConnection Query

Description

Retrieves a paginated list of orders with filtering and sorting options. This query is deprecated in favor of the orders query which uses OrdersFiltersInput for a more structured approach.

query ordersConnection(
$page: Int
$limit: Int
$sort: String
$order: Int
$from: Date
$to: Date
$dateFilter: String
$origin: [String]
$status: [String]
$billingStatus: [String]
$shippingStatus: [String]
$paymentMethods: [String]
$itemRef: ID
$buyerRef: ID
$term: String
) {
ordersConnection(
page: $page
limit: $limit
sort: $sort
order: $order
from: $from
to: $to
dateFilter: $dateFilter
origin: $origin
status: $status
billingStatus: $billingStatus
shippingStatus: $shippingStatus
paymentMethods: $paymentMethods
itemRef: $itemRef
buyerRef: $buyerRef
term: $term
) {
pagination {
limit
count
page
pages
hasMore
}
orders {
_id
id
incId
origin
created
modified
orderId
instructions
updated
status
discogsStatus
buyerWasContacted
unreadMessagesCount
path
}
stats {
total
}
}
}

Variables

{
"page": 1,
"limit": 20,
"sort": "sort",
"order": 42,
"from": 1714976627704,
"to": 1729909673613,
"dateFilter": "dateFilter",
"origin": [
"origin"
],
"status": [
"status"
],
"billingStatus": [
"billingStatus"
],
"shippingStatus": [
"shippingStatus"
],
"paymentMethods": [
"paymentMethods"
],
"itemRef": "fa47d9f94c6115ac31b055dd",
"buyerRef": "a8b5467f9ca604e89866536e",
"term": "term"
}

Response

{
"ordersConnection": {
"pagination": {
"limit": 20,
"count": 10,
"page": 1,
"pages": 1,
"hasMore": true
},
"orders": [
{
"_id": "b6f37b99dc306b35bc11fdae",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1732639927674,
"modified": 1749809944554,
"orderId": "example",
"instructions": "example",
"updated": 1704817932941,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"path": "/release/1763553751/release-artist-release-name"
}
],
"stats": {
"total": 29.99
}
}
}

Arguments

NameTypeDescription
pageIntThe requested page number. Defaults to 1 if not specified.
limitIntNumber of orders per page. You can request a specific page size, and it will be used if it does not exceed the server-enforced maximum. If your requested size exceeds the maximum, the server will enforce the maximum limit.
sortStringField name to sort results by. Valid values include "createdDate" (sorts by creation date), "paymentDate" (sorts by payment date), or "total" (sorts by grand total). Defaults to "createdDate" if not specified.
orderIntSort order: 1 for ascending, -1 for descending.
fromDateStart date for filtering orders. Used with the dateFilter field to specify which date field to filter by.
toDateEnd date for filtering orders. Used with the dateFilter field to specify which date field to filter by.
dateFilterStringDate field to use for filtering when from or to are specified. Valid values include "created" (default), "billing.paymentDate", or other order date fields.
origin[String]List of order origins to filter by. Valid values include "Online", "Shop", "Discogs", or "Bandcamp".
status[String]List of order statuses to filter by. Valid values include "New Order", "Buyer Contacted", "Invoice Sent", "Payment Pending", "Payment Received", "Shipped", "Refund Sent", "Cancelled", "Cancelled (Non-Paying Buyer)", "Cancelled (Item Unavailable)", "Cancelled (Per Buyer's Request)", "Merged", or "Quote". If not specified, excludes cancelled, refunded, and merged orders.
billingStatus[String]List of billing statuses to filter by. Valid values include "Pending", "Paid", "Partially Paid", "Refunded", or "Partially Refunded".
shippingStatus[String]List of shipping statuses to filter by. Valid values include "Pending", "Shipped", "Collected", or "Packed".
paymentMethods[String]List of payment methods to filter by. Valid values include "cash", "card", "stripe", "paypal", "cheque", "bankTransfer", or "creditNote".
itemRefIDReference ID of a specific item to filter orders that contain this item.
buyerRefIDReference ID of a specific buyer to filter orders by buyer.
termStringSearch term to filter orders by. If the term matches the pattern "number-number", it searches by exact order ID. Otherwise, it performs a case-insensitive search on order descriptions and related fields.

Returns

OrdersConnection