- Customers
- Customer Address
- Retrieves a list of addresses for a customer
- Creates a new address for a customer
- Retrieves details for a single customer address
- Updates an existing customer address
- Removes an address from a customer’s address list
- Performs bulk operations for multiple customer addresses
- Sets the default address for a customer
- CustomerSavedSearch
- Customer
- Retrieves a list of customersGET
- Creates a customerPOST
- Searches for customers that match a supplied queryGET
- Retrieves a single customerGET
- Updates a customerPUT
- Deletes a customerDELETE
- Creates an account activation URL for a customerPOST
- Sends an account invite to a customerPOST
- Retrieves a count of customersGET
- Retrieves all orders that belong to a customerGET
- Sales channels
- Checkout
- CollectionListing
- Retrieve collection listings that are published to your app
- Retrieve product_ids that are published to a collection_id
- Retrieve a specific collection listing that is published to your app
- Create a collection listing to publish a collection to your app
- Delete a collection listing to unpublish a collection from your app
- Product ResourceFeedback
- MobilePlatformApplication
- ProductListing
- Retrieve product listings that are published to your app
- Retrieve product_ids that are published to your app
- Retrieve a count of products that are published to your app
- Retrieve a specific product listing that is published to your app
- Create a product listing to publish a product to your app
- Delete a product listing to unpublish a product from your app
- ResourceFeedback
- Payment
- Products
- Collect
- Collection
- CustomCollection
- Product
- Product Image
- Product Variant
- SmartCollection
- Orders
- Access
- Billing
- Online store
- Asset
- Blog
- Article
- Retrieves a list of all articles from a blog
- Creates an article for a blog
- Retrieves a count of all articles from a blog
- Receive a single Article
- Updates an article
- Deletes an article
- Retrieves a list of all article authors
- Retrieves a list of all article tags
- Retrieves a list of all article tags from a specific blog
- Redirect
- Comment
- ScriptTag
- Page
- Theme
- Shipping and fulfillment
- CancellationRequest
- CarrierService
- AssignedFulfillmentOrder
- FulfillmentEvent
- Fulfillment
- Retrieves fulfillments associated with an order
- Retrieves fulfillments associated with a fulfillment order
- Retrieves a count of fulfillments associated with a specific order
- Receive a single Fulfillment
- Creates a fulfillment for one or many fulfillment orders
- Updates the tracking information for a fulfillment
- Cancels a fulfillment
- FulfillmentOrder
- Retrieves a list of fulfillment orders for a specific order
- Retrieves a specific fulfillment order
- Cancel a fulfillment order
- Marks a fulfillment order as incomplete
- Moves a fulfillment order to a new location
- Marks the fulfillment order as open
- Reschedules the fulfill_at time of a scheduled fulfillment order
- Applies a fulfillment hold on an open fulfillment order
- Sets deadline for fulfillment orders
- Releases the fulfillment hold on a fulfillment order
- LocationsForMove
- FulfillmentRequest
- FulfillmentService
- Shopify Payments
- Analytics
- Deprecated API calls
- Discounts
- DiscountCode
- Creates a discount code
- Retrieves a list of discount codes
- Updates an existing discount code
- Retrieves a single discount code
- Deletes a discount code
- Retrieves the location of a discount code
- Retrieves a count of discount codes for a shop
- Creates a discount code creation job
- Retrieves a discount code creation job
- Retrieves a list of discount codes for a discount code creation job
- PriceRule
- DiscountCode
- Inventory
- Events
- MarketingEvent
- Metafield
- Plus
- Store properties
- TenderTransaction
Searches for customers that match a supplied query
GET
/admin/api/{api_version}/customers/search.json
page
parameter will return an error. To learn more, see Make paginated requests to the REST Admin API.请求参数
Path 参数
api_version
string
必需
Query 参数
fields
string
可选
limit
string
可选
order
string
可选
query
string
可选
Note: Supported queries:
accepts_marketing
,activation_date
, address1
, address2
, city
,company
, country
, customer_date
, customer_first_name
,customer_id
, customer_last_name
, customer_tag
, email
,email_marketing_state
, first_name
, first_order_date
, id
,last_abandoned_order_date
, last_name
, multipass_identifier
,orders_count
, order_date
, phone
, province
,shop_id
, state
, tag
, total_spent
,updated_at
, verified_email
, product_subscriber_status
. All other queriesreturns all customers.
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://demo.myshopify.com//admin/api//customers/search.json'
返回响应
🟢200Searches for customers that match a supplied query
application/json
Body
customers
array [object {25}]
可选
id
number
可选
email
string
可选
accepts_marketing
boolean
可选
created_at
string
可选
updated_at
string
可选
first_name
string
可选
last_name
string
可选
orders_count
number
可选
state
string
可选
total_spent
string
可选
last_order_id
number
可选
note
null
可选
verified_email
boolean
可选
multipass_identifier
null
可选
tax_exempt
boolean
可选
tags
string
可选
last_order_name
string
可选
currency
string
可选
phone
string
可选
addresses
array [object {17}]
可选
accepts_marketing_updated_at
string
可选
marketing_opt_in_level
null
可选
tax_exemptions
array
可选
admin_graphql_api_id
string
可选
default_address
object
可选
示例
{
"customers": [
{
"id": 207119551,
"email": "bob.norman@mail.example.com",
"accepts_marketing": false,
"created_at": "2023-01-03T12:13:43-05:00",
"updated_at": "2023-01-03T12:13:43-05:00",
"first_name": "Bob",
"last_name": "Norman",
"orders_count": 1,
"state": "disabled",
"total_spent": "199.65",
"last_order_id": 450789469,
"note": null,
"verified_email": true,
"multipass_identifier": null,
"tax_exempt": false,
"tags": "",
"last_order_name": "#1001",
"currency": "USD",
"phone": "+16136120707",
"addresses": [
{
"id": 207119551,
"customer_id": 207119551,
"first_name": null,
"last_name": null,
"company": null,
"address1": "Chestnut Street 92",
"address2": "",
"city": "Louisville",
"province": "Kentucky",
"country": "United States",
"zip": "40202",
"phone": "555-625-1199",
"name": "",
"province_code": "KY",
"country_code": "US",
"country_name": "United States",
"default": true
}
],
"accepts_marketing_updated_at": "2005-06-12T11:57:11-04:00",
"marketing_opt_in_level": null,
"tax_exemptions": [],
"admin_graphql_api_id": "gid://shopify/Customer/207119551",
"default_address": {
"id": 207119551,
"customer_id": 207119551,
"first_name": null,
"last_name": null,
"company": null,
"address1": "Chestnut Street 92",
"address2": "",
"city": "Louisville",
"province": "Kentucky",
"country": "United States",
"zip": "40202",
"phone": "555-625-1199",
"name": "",
"province_code": "KY",
"country_code": "US",
"country_name": "United States",
"default": true
}
}
]
}
修改于 2023-01-29 12:00:31