First or Last parameter is required.
External DocumentationTo learn more, visit the Shopify documentation.
Basic Parameters
| Parameter | Description |
|---|---|
| First | The first n elements from the paginated list. To use this action, either the First or Last parameter is required. |
| Last | The last n elements from the paginated list. To use this action, either the First or Last parameter is required.Note: When using the Last parameter, Before parameter is required. |
| Query | A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. The valid filters are: * Case-insensitive search of multiple fields in a document, for example: Bob Norman, title:green hoodie.* id* email* phone* updated_atFor example: * Get all users from Canada: country:canada* Get all users created after 2019-12-01: updated_at:>2019-12-01* Get all users from Canada that created after 2019-12-01: country:canada AND updated_at:>2019-12-01Note: For more information about the query parameter, visit Shopify API search syntax. |
| Reverse | When checked, the underlying list order is reversed. |
| Sort Key | Sort the underlying list using a key. Note: If your query is slow or returns an error, try specifying a sort key that matches the field used in the Query parameter. |
Advanced Parameters
| Parameter | Description |
|---|---|
| After | Get elements after a specific cursor. Cursor values are available in the pageInfo object of each paginated response. |
| Before | Get elements before a specific cursor. Cursor values are available in the pageInfo object of each paginated response. |
Example Output
{
"customers": {
"nodes": [
{
"id": "gid://shopify/Customer/56501169",
"firstName": "Jenny",
"lastName": "Test",
"email": "jennytest@b2b.example.com",
"phone": "+13125551219",
"createdAt": "2024-11-04T18:56:43Z",
"updatedAt": "2024-11-04T18:56:43Z",
"numberOfOrders": "0",
"state": "DISABLED",
"amountSpent": {
"amount": "0.0",
"currencyCode": "USD"
},
"lastOrder": null,
"note": null,
"verifiedEmail": true,
"multipassIdentifier": null,
"taxExempt": false,
"tags": [],
"addresses": [],
"defaultAddress": null,
"taxExemptions": [],
"emailMarketingConsent": {
"marketingState": "SUBSCRIBED",
"marketingOptInLevel": "SINGLE_OPT_IN",
"consentUpdatedAt": "2005-06-16T15:00:11Z"
},
"smsMarketingConsent": null
},
{
"id": "gid://shopify/Customer/105906728",
"firstName": "John",
"lastName": "Smith",
"email": "johnsmith@example.com",
"phone": "+16134504532",
"createdAt": "2024-11-04T18:56:43Z",
"updatedAt": "2024-11-04T18:56:43Z",
"numberOfOrders": "0",
"state": "DISABLED",
"amountSpent": {
"amount": "0.0",
"currencyCode": "USD"
},
"lastOrder": null,
"note": null,
"verifiedEmail": true,
"multipassIdentifier": null,
"taxExempt": false,
"tags": [],
"addresses": [
{
"id": "gid://shopify/MailingAddress/105906728?model_name=CustomerAddress",
"firstName": "John",
"lastName": "Smith",
"company": null,
"address1": "124 Big Green St",
"address2": "",
"city": "Ottawa",
"province": "Ontario",
"country": "Canada",
"zip": "K2H7A8",
"phone": "+1(613)555-1212",
"name": "John Smith",
"provinceCode": "ON",
"countryCodeV2": "CA"
}
],
"defaultAddress": {
"id": "gid://shopify/MailingAddress/105906728?model_name=CustomerAddress",
"firstName": "John",
"lastName": "Smith",
"company": null,
"address1": "124 Big Green St",
"address2": "",
"city": "Ottawa",
"province": "Ontario",
"country": "Canada",
"zip": "K2H7A8",
"phone": "+1(613)555-1212",
"name": "John Smith",
"provinceCode": "ON",
"countryCodeV2": "CA"
},
"taxExemptions": [
"CA_STATUS_CARD_EXEMPTION",
"US_CO_RESELLER_EXEMPTION"
],
"emailMarketingConsent": {
"marketingState": "NOT_SUBSCRIBED",
"marketingOptInLevel": null,
"consentUpdatedAt": "2004-06-13T15:57:11Z"
},
"smsMarketingConsent": {
"consentCollectedFrom": "OTHER",
"consentUpdatedAt": "2021-06-16T17:31:44Z",
"marketingOptInLevel": "SINGLE_OPT_IN",
"marketingState": "SUBSCRIBED"
}
}
]
}
}