Mailchimp Customers API

The Customers API from Mailchimp — 3 operation(s) for customers.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

mailchimp-customers-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  version: 3.0.55
  title: Mailchimp Marketing Abuse Customers API
  contact:
    name: Mailchimp API Support
    email: apihelp@mailchimp.com
  x-permalink: https://github.com/mailchimp/mailchimp-client-lib-codegen/blob/main/spec/marketing.json
  description: '

    The Mailchimp Marketing API provides programmatic access to Mailchimp data

    and functionality, allowing developers to build custom features to do

    things like sync email activity and campaign analytics with their

    database, manage audiences and campaigns, and more.'
host: server.api.mailchimp.com
basePath: /3.0
schemes:
- https
consumes:
- application/json
produces:
- application/json
- application/problem+json
security:
- basicAuth: []
tags:
- name: Customers
paths:
  /customer-journeys/journeys/{journey_id}/steps/{step_id}/actions/trigger:
    post:
      summary: Mailchimp Customer Journeys Api Trigger for a Contact
      description: A step trigger in a Customer Journey. To use it, create a starting point or step from the Customer Journey builder in the app using the Customer Journeys API condition. Well provide a url during the process that includes the {journey_id} and {step_id}. Youll then be able to use this endpoint to trigger the condition for the posted contact.
      operationId: postCustomerJourneysJourneysIdStepsIdActionsTrigger
      parameters:
      - in: path
        name: journey_id
        x-title: Journey ID
        type: integer
        required: true
        description: The id for the Journey.
        example: '500123'
      - in: path
        name: step_id
        x-title: Step ID
        type: integer
        required: true
        description: The id for the Step.
        example: '500123'
      - name: body
        in: body
        description: ''
        required: true
        schema:
          type: object
          title: Subscriber in Customer Journey's audience
          description: Information about subscribers in a Customer Journey's audience.
          required:
          - email_address
          properties:
            email_address:
              type: string
              title: Email Address
              description: The list member's email address.
        example: example_value
      responses:
        '204':
          description: An empty response
          schema:
            description: Empty Response
        default:
          description: An error generated by the Mailchimp API.
          schema:
            type: object
            title: Problem Detail Document
            description: An error generated by the Mailchimp API. Conforms to IETF draft 'draft-nottingham-http-problem-06'.
            required:
            - type
            - title
            - status
            - detail
            - instance
            properties:
              type:
                type: string
                title: Problem Type
                description: An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
                example: https://mailchimp.com/developer/marketing/docs/errors/
              title:
                type: string
                title: Error Title
                description: A short, human-readable summary of the problem type. It shouldn't change based on the occurrence of the problem, except for purposes of localization.
                example: Resource Not Found
              status:
                type: integer
                title: HTTP Status Code
                description: The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
                example: 404
              detail:
                type: string
                title: Error Message
                description: A human-readable explanation specific to this occurrence of the problem. [Learn more about errors](/developer/guides/get-started-with-mailchimp-api-3/#Errors).
                example: The requested resource could not be found.
              instance:
                type: string
                title: Instance ID
                description: A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
                example: 995c5cb0-3280-4a6e-808b-3b096d0bb219
      deprecated: false
      tags:
      - Customers
      x-custom-config:
        methodNameSnake: trigger
        methodNameCamel: trigger
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /ecommerce/stores/{store_id}/customers:
    get:
      summary: Mailchimp List Customers
      description: Get information about a store's customers.
      operationId: getEcommerceStoresIdCustomers
      parameters:
      - name: fields
        x-title: Fields
        in: query
        description: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
        required: false
        type: array
        collectionFormat: csv
        items:
          type: string
        example: example_value
      - name: exclude_fields
        x-title: Exclude Fields
        in: query
        description: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
        required: false
        type: array
        collectionFormat: csv
        items:
          type: string
        example: example_value
      - name: count
        x-title: Count
        in: query
        description: The number of records to return. Default value is 10. Maximum value is 1000
        required: false
        default: 10
        maximum: 1000
        type: integer
        example: example_value
      - name: offset
        x-title: Offset
        in: query
        description: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
        required: false
        default: 0
        type: integer
        example: example_value
      - name: store_id
        x-title: Store ID
        description: The store id.
        in: path
        required: true
        type: string
        example: '500123'
      - name: email_address
        x-title: Customer Email Address
        in: query
        description: Restrict the response to customers with the email address.
        type: string
        required: false
        example: user@example.com
      responses:
        '200':
          description: ''
          schema:
            type: object
            title: Customers
            description: A collection of the store's customers.
            properties:
              store_id:
                type: string
                title: Store ID
                description: The store id.
              customers:
                type: array
                title: Customers
                description: An array of objects, each representing a customer of a store.
                items:
                  type: object
                  title: E-commerce Customer
                  description: Information about a specific customer.
                  properties:
                    id:
                      type: string
                      title: Customer Foreign ID
                      description: A unique identifier for the customer.
                      readOnly: true
                    email_address:
                      type: string
                      title: Email Address
                      description: The customer's email address.
                      readOnly: true
                    opt_in_status:
                      type: boolean
                      title: Opt-in Status
                      description: The customer's opt-in status. This value will never overwrite the opt-in status of a pre-existing Mailchimp list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don't opt in to your Mailchimp list [will be added as `Transactional` members](https://mailchimp.com/developer/marketing/docs/e-commerce/#customers).
                    company:
                      type: string
                      title: Company
                      description: The customer's company.
                    first_name:
                      type: string
                      title: First Name
                      description: The customer's first name.
                    last_name:
                      type: string
                      title: Last Name
                      description: The customer's last name.
                    orders_count:
                      type: integer
                      title: Orders Count
                      description: The customer's total order count.
                      readOnly: true
                      example: 4
                    total_spent:
                      type: number
                      title: Total Spent
                      description: The total amount the customer has spent.
                      readOnly: true
                      example: 100
                    address:
                      type: object
                      title: Address
                      description: The customer's address.
                      properties:
                        address1:
                          type: string
                          title: Address Field 1
                          description: The mailing address of the customer.
                          example: 675 Ponce de Leon Ave NE
                        address2:
                          type: string
                          title: Address Field 2
                          description: An additional field for the customer's mailing address.
                          example: Suite 5000
                        city:
                          type: string
                          title: 'City '
                          description: The city the customer is located in.
                          example: Atlanta
                        province:
                          type: string
                          title: Province
                          description: The customer's state name or normalized province.
                          example: Georgia
                        province_code:
                          type: string
                          title: Province Code
                          description: The two-letter code for the customer's province or state.
                          example: GA
                        postal_code:
                          type: string
                          title: Postal Code
                          description: The customer's postal or zip code.
                          example: '30308'
                        country:
                          type: string
                          title: Country Code
                          description: The customer's country.
                          example: United States
                        country_code:
                          type: string
                          title: Country Code
                          description: The two-letter code for the customer's country.
                          example: US
                    created_at:
                      type: string
                      title: Creation Time
                      format: date-time
                      description: The date and time the customer was created in ISO 8601 format.
                      readOnly: true
                      example: '2015-07-15T19:28:00+00:00'
                    updated_at:
                      type: string
                      title: Update Time
                      format: date-time
                      description: The date and time the customer was last updated in ISO 8601 format.
                      readOnly: true
                      example: '2015-07-15T19:28:00+00:00'
                    _links:
                      title: Links
                      description: A list of link types and descriptions for the API schema documents.
                      type: array
                      items:
                        type: object
                        title: Resource Link
                        description: This object represents a link from the resource where it is found to another resource or action that may be performed.
                        properties:
                          rel:
                            type: string
                            title: Rel
                            description: As with an HTML 'rel' attribute, this describes the type of link.
                            readOnly: true
                          href:
                            type: string
                            title: Href
                            description: This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
                            readOnly: true
                          method:
                            type: string
                            title: Method
                            description: The HTTP method that should be used when accessing the URL defined in 'href'.
                            enum:
                            - GET
                            - POST
                            - PUT
                            - PATCH
                            - DELETE
                            - OPTIONS
                            - HEAD
                            readOnly: true
                          targetSchema:
                            type: string
                            title: Target Schema
                            description: For GETs, this is a URL representing the schema that the response should conform to.
                            readOnly: true
                          schema:
                            type: string
                            title: Schema
                            description: For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
                            readOnly: true
                      readOnly: true
              total_items:
                type: integer
                title: Item Count
                description: The total number of items matching the query regardless of pagination.
                readOnly: true
              _links:
                title: Links
                description: A list of link types and descriptions for the API schema documents.
                type: array
                items:
                  type: object
                  title: Resource Link
                  description: This object represents a link from the resource where it is found to another resource or action that may be performed.
                  properties:
                    rel:
                      type: string
                      title: Rel
                      description: As with an HTML 'rel' attribute, this describes the type of link.
                      readOnly: true
                    href:
                      type: string
                      title: Href
                      description: This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
                      readOnly: true
                    method:
                      type: string
                      title: Method
                      description: The HTTP method that should be used when accessing the URL defined in 'href'.
                      enum:
                      - GET
                      - POST
                      - PUT
                      - PATCH
                      - DELETE
                      - OPTIONS
                      - HEAD
                      readOnly: true
                    targetSchema:
                      type: string
                      title: Target Schema
                      description: For GETs, this is a URL representing the schema that the response should conform to.
                      readOnly: true
                    schema:
                      type: string
                      title: Schema
                      description: For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
                      readOnly: true
                readOnly: true
        default:
          description: An error generated by the Mailchimp API.
          schema:
            type: object
            title: Problem Detail Document
            description: An error generated by the Mailchimp API. Conforms to IETF draft 'draft-nottingham-http-problem-06'.
            required:
            - type
            - title
            - status
            - detail
            - instance
            properties:
              type:
                type: string
                title: Problem Type
                description: An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
                example: https://mailchimp.com/developer/marketing/docs/errors/
              title:
                type: string
                title: Error Title
                description: A short, human-readable summary of the problem type. It shouldn't change based on the occurrence of the problem, except for purposes of localization.
                example: Resource Not Found
              status:
                type: integer
                title: HTTP Status Code
                description: The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
                example: 404
              detail:
                type: string
                title: Error Message
                description: A human-readable explanation specific to this occurrence of the problem. [Learn more about errors](/developer/guides/get-started-with-mailchimp-api-3/#Errors).
                example: The requested resource could not be found.
              instance:
                type: string
                title: Instance ID
                description: A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
                example: 995c5cb0-3280-4a6e-808b-3b096d0bb219
      deprecated: false
      tags:
      - Customers
      x-custom-config:
        methodNameSnake: get_all_store_customers
        methodNameCamel: getAllStoreCustomers
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: Mailchimp Add Customer
      description: Add a new customer to a store.
      operationId: postEcommerceStoresIdCustomers
      parameters:
      - name: store_id
        x-title: Store ID
        description: The store id.
        in: path
        required: true
        type: string
        example: '500123'
      - name: body
        in: body
        description: ''
        required: true
        schema:
          type: object
          title: E-commerce Customer
          description: Information about a specific customer.
          required:
          - id
          - email_address
          - opt_in_status
          properties:
            id:
              type: string
              title: Customer Foreign ID
              description: A unique identifier for the customer. Limited to 50 characters.
              maxLength: 50
            email_address:
              type: string
              title: Email Address
              description: The customer's email address.
            opt_in_status:
              type: boolean
              title: Opt-in Status
              description: The customer's opt-in status. This value will never overwrite the opt-in status of a pre-existing Mailchimp list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don't opt in to your Mailchimp list [will be added as `Transactional` members](https://mailchimp.com/developer/marketing/docs/e-commerce/#customers).
            company:
              type: string
              title: Company
              description: The customer's company.
            first_name:
              type: string
              title: First Name
              description: The customer's first name.
            last_name:
              type: string
              title: Last Name
              description: The customer's last name.
            address:
              type: object
              title: Address
              description: The customer's address.
              properties:
                address1:
                  type: string
                  title: Address Field 1
                  description: The mailing address of the customer.
                  example: 675 Ponce de Leon Ave NE
                address2:
                  type: string
                  title: Address Field 2
                  description: An additional field for the customer's mailing address.
                  example: Suite 5000
                city:
                  type: string
                  title: 'City '
                  description: The city the customer is located in.
                  example: Atlanta
                province:
                  type: string
                  title: Province
                  description: The customer's state name or normalized province.
                  example: Georgia
                province_code:
                  type: string
                  title: Province Code
                  description: The two-letter code for the customer's province or state.
                  example: GA
                postal_code:
                  type: string
                  title: Postal Code
                  description: The customer's postal or zip code.
                  example: '30308'
                country:
                  type: string
                  title: Country Code
                  description: The customer's country.
                  example: United States
                country_code:
                  type: string
                  title: Country Code
                  description: The two-letter code for the customer's country.
                  example: US
        example: example_value
      responses:
        '200':
          description: ''
          schema:
            type: object
            title: E-commerce Customer
            description: Information about a specific customer.
            properties:
              id:
                type: string
                title: Customer Foreign ID
                description: A unique identifier for the customer.
                readOnly: true
              email_address:
                type: string
                title: Email Address
                description: The customer's email address.
                readOnly: true
              opt_in_status:
                type: boolean
                title: Opt-in Status
                description: The customer's opt-in status. This value will never overwrite the opt-in status of a pre-existing Mailchimp list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don't opt in to your Mailchimp list [will be added as `Transactional` members](https://mailchimp.com/developer/marketing/docs/e-commerce/#customers).
              company:
                type: string
                title: Company
                description: The customer's company.
              first_name:
                type: string
                title: First Name
                description: The customer's first name.
              last_name:
                type: string
                title: Last Name
                description: The customer's last name.
              orders_count:
                type: integer
                title: Orders Count
                description: The customer's total order count.
                readOnly: true
                example: 4
              total_spent:
                type: number
                title: Total Spent
                description: The total amount the customer has spent.
                readOnly: true
                example: 100
              address:
                type: object
                title: Address
                description: The customer's address.
                properties:
                  address1:
                    type: string
                    title: Address Field 1
                    description: The mailing address of the customer.
                    example: 675 Ponce de Leon Ave NE
                  address2:
                    type: string
                    title: Address Field 2
                    description: An additional field for the customer's mailing address.
                    example: Suite 5000
                  city:
                    type: string
                    title: 'City '
                    description: The city the customer is located in.
                    example: Atlanta
                  province:
                    type: string
                    title: Province
                    description: The customer's state name or normalized province.
                    example: Georgia
                  province_code:
                    type: string
                    title: Province Code
                    description: The two-letter code for the customer's province or state.
                    example: GA
                  postal_code:
                    type: string
                    title: Postal Code
                    description: The customer's postal or zip code.
                    example: '30308'
                  country:
                    type: string
                    title: Country Code
                    description: The customer's country.
                    example: United States
                  country_code:
                    type: string
                    title: Country Code
                    description: The two-letter code for the customer's country.
                    example: US
              created_at:
                type: string
                title: Creation Time
                format: date-time
                description: The date and time the customer was created in ISO 8601 format.
                readOnly: true
                example: '2015-07-15T19:28:00+00:00'
              updated_at:
                type: string
                title: Update Time
                format: date-time
                description: The date and time the customer was last updated in ISO 8601 format.
                readOnly: true
                example: '2015-07-15T19:28:00+00:00'
              _links:
                title: Links
                description: A list of link types and descriptions for the API schema documents.
                type: array
                items:
                  type: object
                  title: Resource Link
                  description: This object represents a link from the resource where it is found to another resource or action that may be performed.
                  properties:
                    rel:
                      type: string
                      title: Rel
                      description: As with an HTML 'rel' attribute, this describes the type of link.
                      readOnly: true
                    href:
                      type: string
                      title: Href
                      description: This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
                      readOnly: true
                    method:
                      type: string
                      title: Method
                      description: The HTTP method that should be used when accessing the URL defined in 'href'.
                      enum:
                      - GET
                      - POST
                      - PUT
                      - PATCH
                      - DELETE
                      - OPTIONS
                      - HEAD
                      readOnly: true
                    targetSchema:
                      type: string
                      title: Target Schema
                      description: For GETs, this is a URL representing the schema that the response should conform to.
                      readOnly: true
                    schema:
                      type: string
                      title: Schema
                      description: For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
                      readOnly: true
                readOnly: true
        default:
          description: An error generated by the Mailchimp API.
          schema:
            type: object
            title: Problem Detail Document
            description: An error generated by the Mailchimp API. Conforms to IETF draft 'draft-nottingham-http-problem-06'.
            required:
            - type
            - title
            - status
            - detail
            - instance
            properties:
              type:
                type: string
                title: Problem Type
                description: An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
                example: https://mailchimp.com/developer/marketing/docs/errors/
              title:
                type: string
                title: Error Title
                description: A short, human-readable summary of the problem type. It shouldn't change based on the occurrence of the problem, except for purposes of localization.
                example: Resource Not Found
              status:
                type: integer
                title: HTTP Status Code
                description: The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
                example: 404
              detail:
                type: string
                title: Error Message
                description: A human-readable explanation specific to this occurrence of the problem. [Learn more about errors](/developer/guides/get-started-with-mailchimp-api-3/#Errors).
                example: The requested resource could not be found.
              instance:
                type: string
                title: Instance ID
                description: A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
                example: 995c5cb0-3280-4a6e-808b-3b096d0bb219
      deprecated: false
      tags:
      - Customers
      x-custom-config:
        methodNameSnake: add_store_customer
        methodNameCamel: addStoreCustomer
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /ecommerce/stores/{store_id}/customers/{customer_id}:
    get:
      summary: Mailchimp Get Customer Info
      description: Get information about a specific customer.
      operationId: getEcommerceStoresIdCustomersId
      parameters:
      - name: fields
        x-title: Fields
        in: query
        description: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
        required: false
        type: array
        collectionFormat: csv
        items:
          type: string
        example: example_value
      - name: exclude_fields
        x-title: Exclude Fields
        in: query
        description: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
        required: false
        type: array
        collectionFormat: csv
        items:
          type: string
        example: example_value
      - name: store_id
        x-title: Store ID
        description: The store id.
        in: path
        required: true
        type: string
        example: '500123'
      - name: customer_id
        x-title: Customer ID
        description: The id for the customer of a store.
        in: path
        required: true
        type: string
        example: '500123'
      responses:
        '200':
          description: ''
          schema:
            type: object
            title: E-commerce Customer
     

# --- truncated at 32 KB (93 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/mailchimp/refs/heads/main/openapi/mailchimp-customers-api-openapi.yml