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": "8cee1b5d511f9577825bdd2d",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1749208631653,
"modified": 1723195941136,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1766335565056,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1762954294361,
"refundDate": 1708854280761
},
"orderId": "example",
"notes": [
{
"date": 1747530225194,
"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": "61ebfd02538d0db68a5bf3a5",
"quantity": 1,
"unavailable": true,
"added": 1739096250234
}
],
"messages": [
{
"_id": "69b1b356ce391e5e84a7baf1",
"created": 1756326325998,
"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": "b0b32830d0e18642442308eb",
"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": 1762941477059,
"ip": "example"
}
],
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "f033041b312e7f2d8532859d"
},
"updated": 1722518904872,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"mergeableOrders": [
{
"_id": "49219e1836abfe46d753286c",
"id": "example",
"created": 1748374084685,
"total": 29.99,
"description": "example"
}
],
"path": "/release/1763553751/release-artist-release-name"
}
]
}
Arguments
| Name | Type | Description |
|---|---|---|
term | String! | — |
Returns
[Order]!