Skip to main content

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": "2f9d1cae954d3f31bc6483e7",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1747248877454,
"modified": 1753306868552,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1753679601438,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1723437909540,
"refundDate": 1754857451036
},
"orderId": "example",
"notes": [
{
"date": 1743010916009,
"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": "c16ff67e8a827dd42e3b7f89",
"quantity": 1,
"unavailable": true,
"added": 1755001446531
}
],
"messages": [
{
"_id": "2217619d10af52809ff757b0",
"created": 1740405422375,
"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": "c9668a93c25b92b2a6ae4997",
"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": 1724975229827,
"ip": "example"
}
],
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "783f1b144aaf4c3c5cc95060"
},
"updated": 1707155460887,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"mergeableOrders": [
{
"_id": "a92e45e80f33b449cfcb0d3f",
"id": "example",
"created": 1751639123133,
"total": 29.99,
"description": "example"
}
],
"path": "/release/1763553751/release-artist-release-name"
}
]
}

Arguments

NameTypeDescription
termString!

Returns

[Order]!