openapi: 3.1.0 info: title: Shopify Admin REST Collections Customers API description: 'The Shopify Admin REST API lets you build apps and integrations that extend and enhance the Shopify admin. It provides access to products, customers, orders, inventory, fulfillment, shipping, and store configuration. All requests require a valid Shopify access token. Note: Shopify is deprecating the REST Admin API in favor of GraphQL. New development should use the GraphQL Admin API.' version: 2024-10 termsOfService: https://www.shopify.com/legal/api-terms contact: name: Shopify Developer Support url: https://shopify.dev/docs/api/admin-rest license: name: API Terms of Service url: https://www.shopify.com/legal/api-terms servers: - url: https://{store_name}.myshopify.com/admin/api/2024-10 description: Shopify Admin REST API variables: store_name: description: The name of the Shopify store default: mystore security: - AccessToken: [] tags: - name: Customers paths: /customers.json: get: operationId: listCustomers summary: List Customers description: Retrieves a list of customers from the store. tags: - Customers parameters: - name: limit in: query description: The maximum number of results to show schema: type: integer minimum: 1 maximum: 250 default: 50 - name: email in: query description: Filter customers by email address schema: type: string responses: '200': description: Successful response with list of customers content: application/json: schema: type: object properties: customers: type: array items: $ref: '#/components/schemas/Customer' post: operationId: createCustomer summary: Create Customer description: Creates a new customer account. tags: - Customers requestBody: required: true content: application/json: schema: type: object properties: customer: $ref: '#/components/schemas/CustomerInput' responses: '201': description: Customer created successfully content: application/json: schema: type: object properties: customer: $ref: '#/components/schemas/Customer' /customers/{customer_id}.json: get: operationId: getCustomer summary: Get Customer description: Retrieves a single customer by ID. tags: - Customers parameters: - name: customer_id in: path required: true description: The ID of the customer schema: type: integer format: int64 responses: '200': description: Customer details content: application/json: schema: type: object properties: customer: $ref: '#/components/schemas/Customer' put: operationId: updateCustomer summary: Update Customer description: Updates an existing customer. tags: - Customers parameters: - name: customer_id in: path required: true description: The ID of the customer schema: type: integer format: int64 requestBody: required: true content: application/json: schema: type: object properties: customer: $ref: '#/components/schemas/CustomerInput' responses: '200': description: Customer updated successfully content: application/json: schema: type: object properties: customer: $ref: '#/components/schemas/Customer' components: schemas: Customer: type: object properties: id: type: integer format: int64 email: type: string format: email first_name: type: string last_name: type: string phone: type: string verified_email: type: boolean accepts_marketing: type: boolean created_at: type: string format: date-time updated_at: type: string format: date-time orders_count: type: integer total_spent: type: string note: type: string nullable: true tags: type: string addresses: type: array items: $ref: '#/components/schemas/Address' default_address: $ref: '#/components/schemas/Address' CustomerInput: type: object properties: email: type: string format: email first_name: type: string last_name: type: string phone: type: string accepts_marketing: type: boolean note: type: string tags: type: string password: type: string password_confirmation: type: string addresses: type: array items: type: object Address: type: object properties: id: type: integer format: int64 customer_id: type: integer format: int64 first_name: type: string last_name: type: string company: type: string nullable: true address1: type: string address2: type: string nullable: true city: type: string province: type: string country: type: string zip: type: string phone: type: string nullable: true default: type: boolean securitySchemes: AccessToken: type: apiKey in: header name: X-Shopify-Access-Token description: Shopify access token for authentication