orderSearch Query
Description
Searches for orders by search term. Performs a case-insensitive search on order descriptions and related fields. Returns a list of matching orders.
query orderSearch($term: String!) {
orderSearch(term: $term) {
_id
id
incId
origin
created
modified
shipping {
status
fulfilled
date
method
freeShippingThreshold
tracking
shopCollection
weight
packingSlip
}
billing {
status
fulfilled
paymentDate
refundDate
}
orderId
notes {
date
content
}
instructions
totals {
subtotal
subtotalBeforeTaxes
tax
grand
leftToPay
itemQuantity
discount
shipping
creditNote
balance
}
items {
_id
quantity
unavailable
added
}
messages {
_id
created
subject
message
fromBuyer
flagged
content
read
orderId
orderIncId
uri
via
}
buyer {
_id
firstName
lastName
email
name
path
telephone
organisation
taxNumber
}
logs {
action
description
date
ip
}
seller {
type
name
email
ref
}
updated
status
discogsStatus
buyerWasContacted
unreadMessagesCount
mergeableOrders {
_id
id
created
total
description
}
path
}
}
Variables
{
"term": "term"
}
Response
{
"orderSearch": [
{
"_id": "08ccf545351a1d998d13a8f3",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1720316183957,
"modified": 1729090702342,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1767470016281,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1715721454017,
"refundDate": 1738470119878
},
"orderId": "example",
"notes": [
{
"date": 1727061166339,
"content": "example"
}
],
"instructions": "example",
"totals": {
"subtotal": 1.23,
"subtotalBeforeTaxes": 1.23,
"tax": 1.23,
"grand": 1.23,
"leftToPay": 1.23,
"itemQuantity": 1.23,
"discount": 0.1,
"shipping": 1.23,
"creditNote": 1.23,
"balance": 1.23
},
"items": [
{
"_id": "a7a3ad08da3b58ed3282c5e0",
"quantity": 1,
"unavailable": true,
"added": 1735176906211
}
],
"messages": [
{
"_id": "1d747656c7e4eab8bd931c86",
"created": 1756776640362,
"subject": "example",
"message": "example",
"fromBuyer": true,
"flagged": true,
"content": "example",
"read": true,
"orderId": "example",
"orderIncId": 42,
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name",
"via": "example"
}
],
"buyer": {
"_id": "be1ac6157be3a8795abc76ea",
"firstName": "example",
"lastName": "example",
"email": "email@example.com",
"name": "example",
"path": "/release/1763553751/release-artist-release-name",
"telephone": "example",
"organisation": "example",
"taxNumber": "example"
},
"logs": [
{
"action": "example",
"description": "example",
"date": 1761505542985,
"ip": "example"
}
],
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "4567380f3f83c1c078af5d74"
},
"updated": 1748614990649,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"mergeableOrders": [
{
"_id": "9257c14bc877c66dd71925a7",
"id": "example",
"created": 1714532309761,
"total": 29.99,
"description": "example"
}
],
"path": "/release/1763553751/release-artist-release-name"
}
]
}
Arguments
| Name | Type | Description |
|---|---|---|
term | String! | — |
Returns
[Order]!