Customers

Add Customers to your Store to track their orders and to view E-Commerce Data for your MailChimp lists and campaigns. Each Customer is connected to a MailChimp list member, so adding a Customer can also add or update a list member.

Available methods

    • POST /ecommerce/stores/{store_id}/customers Add a new customer to a store

      Add a new customer to a store

      POST /ecommerce/stores/{store_id}/customers

      Add a new customer to a store.

      Path parameters

      store_id The store id.

      Request body parameters

      id Type: String Title: Customer Foreign ID Read only: false A unique identifier for the customer.
      email_address Type: String Title: Email Address Read only: false The customer’s email address.
      opt_in_status Type: Boolean Title: Opt-in Status Read only: false 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.
      company Type: String Title: Company Read only: false The customer’s company.
      first_name Type: String Title: First Name Read only: false The customer’s first name.
      last_name Type: String Title: Last Name Read only: false The customer’s last name.
      orders_count Type: Integer Title: Orders Count Read only: false The customer’s total order count. Learn More about using this data.
      total_spent Type: Number Title: Total Spent Read only: false The total amount the customer has spent. Learn More about using this data.
      address Type: Object Title: Address Read only: false The customer’s address.
      Show properties
      address1 Type: String Title: Address Field 1 Read only: false The mailing address of the customer.
      address2 Type: String Title: Address Field 2 Read only: false An additional field for the customer’s mailing address.
      city Type: String Title: City Read only: false The city the customer is located in.
      province Type: String Title: Province Read only: false The customer’s state name or normalized province.
      province_code Type: String Title: Province Code Read only: false The two-letter code for the customer’s province or state.
      postal_code Type: String Title: Postal Code Read only: false The customer’s postal or zip code.
      country Type: String Title: Country Code Read only: false The customer’s country.
      country_code Type: String Title: Country Code Read only: false The two-letter code for the customer’s country.

      Response body parameters

      id Type: String Title: Customer Foreign ID Read only: true A unique identifier for the customer.
      email_address Type: String Title: Email Address Read only: true The customer’s email address.
      opt_in_status Type: Boolean Title: Opt-in Status Read only: false 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.
      company Type: String Title: Company Read only: false The customer’s company.
      first_name Type: String Title: First Name Read only: false The customer’s first name.
      last_name Type: String Title: Last Name Read only: false The customer’s last name.
      orders_count Type: Integer Title: Orders Count Read only: false The customer’s total order count. Learn More about using this data.
      total_spent Type: Number Title: Total Spent Read only: false The total amount the customer has spent. Learn More about using this data.
      address Type: Object Title: Address Read only: false The customer’s address.
      Show properties
      address1 Type: String Title: Address Field 1 Read only: false The mailing address of the customer.
      address2 Type: String Title: Address Field 2 Read only: false An additional field for the customer’s mailing address.
      city Type: String Title: City Read only: false The city the customer is located in.
      province Type: String Title: Province Read only: false The customer’s state name or normalized province.
      province_code Type: String Title: Province Code Read only: false The two-letter code for the customer’s province or state.
      postal_code Type: String Title: Postal Code Read only: false The customer’s postal or zip code.
      country Type: String Title: Country Code Read only: false The customer’s country.
      country_code Type: String Title: Country Code Read only: false The two-letter code for the customer’s country.
      created_at Type: String Title: Creation Time Read only: true The date and time the customer was created.
      updated_at Type: String Title: Update Time Read only: true The date and time the customer was last updated.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request POST \
      --url 'https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers' \
      --user 'anystring:apikey' \
      --header 'content-type: application/json' \
      --data '{"id" : "cust0001", "email_address" : "freddie@freddiesjokes.com", "opt_in_status" : true, "company" : "MailChimp", "first_name" : "Freddie", "last_name" : "Von Chimpenheimer", "orders_count" : 1, "total_spent" : 10.25, "address" : {"address1" : "675 Ponce de Leon Ave NE", "address2" : "Suite 5000", "city" : "Atlanta", "province" : "GA", "province_code" : "30033", "country_code" : ""}}' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Date: Wed, 10 Feb 2016 13:31:36 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 1433
      Connection: keep-alive
      Vary: Accept-Encoding
      X-Request-Id: b507ec7c-8727-40ee-9166-7a340bba628a
      Link: <https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json>; rel="describedBy"
      
      {
        "id": "cust0001",
        "email_address": "freddie@freddiesjokes.com",
        "opt_in_status": true,
        "company": "MailChimp",
        "first_name": "Freddie",
        "last_name": "Von Chimpenheimer",
        "orders_count": 1,
        "total_spent": 10.25,
        "address": {
          "address1": "675 Ponce de Leon Ave NE",
          "address2": "Suite 5000",
          "city": "Atlanta",
          "province": "GA",
          "province_code": "30033",
          "postal_code": "",
          "country": "",
          "country_code": ""
        },
        "created_at": "2016-02-10T13:31:35+00:00",
        "updated_at": "2016-02-10T13:31:35+00:00",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Collection.json"
          },
          {
            "rel": "update",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001",
            "method": "PATCH",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          },
          {
            "rel": "upsert",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001",
            "method": "PUT",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001",
            "method": "DELETE"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false 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.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
    • GET /ecommerce/stores/{store_id}/customers Get information about a store’s customers
      GET /ecommerce/stores/{store_id}/customers/{customer_id} Get information about a specific customer

      Get information about a store's customers

      GET /ecommerce/stores/{store_id}/customers

      Get information about a store’s customers.

      Path parameters

      store_id The store id.

      Query string parameters

      fields Type: Array Title: Fields Read only: false A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
      exclude_fields Type: Array Title: Exclude Fields Read only: false A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
      count Type: Integer Title: Count Read only: true The number of records to return. Default value is 10.
      offset Type: Integer Title: Offset Read only: false The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. Default value is 0.
      email_address Type: String Title: Customer Email Address Read only: false Restrict the response to customers with the email address.

      Response body parameters

      store_id Type: String Title: Store ID Read only: false The store id.
      customers Type: Array Title: Customers Read only: false An array of objects, each representing a customer of a store.
      Show properties
      id Type: String Title: Customer Foreign ID Read only: true A unique identifier for the customer.
      email_address Type: String Title: Email Address Read only: true The customer’s email address.
      opt_in_status Type: Boolean Title: Opt-in Status Read only: false 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.
      company Type: String Title: Company Read only: false The customer’s company.
      first_name Type: String Title: First Name Read only: false The customer’s first name.
      last_name Type: String Title: Last Name Read only: false The customer’s last name.
      orders_count Type: Integer Title: Orders Count Read only: false The customer’s total order count. Learn More about using this data.
      total_spent Type: Number Title: Total Spent Read only: false The total amount the customer has spent. Learn More about using this data.
      address Type: Object Title: Address Read only: false The customer’s address.
      Show properties
      address1 Type: String Title: Address Field 1 Read only: false The mailing address of the customer.
      address2 Type: String Title: Address Field 2 Read only: false An additional field for the customer’s mailing address.
      city Type: String Title: City Read only: false The city the customer is located in.
      province Type: String Title: Province Read only: false The customer’s state name or normalized province.
      province_code Type: String Title: Province Code Read only: false The two-letter code for the customer’s province or state.
      postal_code Type: String Title: Postal Code Read only: false The customer’s postal or zip code.
      country Type: String Title: Country Code Read only: false The customer’s country.
      country_code Type: String Title: Country Code Read only: false The two-letter code for the customer’s country.
      created_at Type: String Title: Creation Time Read only: true The date and time the customer was created.
      updated_at Type: String Title: Update Time Read only: true The date and time the customer was last updated.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
      total_items Type: Integer Title: Item Count Read only: false The total number of items matching the query regardless of pagination.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request GET \
      --url 'https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Date: Wed, 10 Feb 2016 13:34:15 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 3519
      Connection: keep-alive
      Vary: Accept-Encoding
      X-Request-Id: 77463d58-8e8b-468e-9974-c1e234ef5071
      Link: <https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Collection.json>; rel="describedBy"
      
      {
        "store_id": "MC001",
        "customers": [
          {
            "id": "cust0001",
            "email_address": "freddie@freddiesjokes.com",
            "opt_in_status": true,
            "company": "MailChimp",
            "first_name": "Freddie",
            "last_name": "Von Chimpenheimer",
            "orders_count": 1,
            "total_spent": 10.25,
            "address": {
              "address1": "675 Ponce de Leon Ave NE",
              "address2": "Suite 5000",
              "city": "Atlanta",
              "province": "GA",
              "province_code": "30033",
              "postal_code": "",
              "country": "",
              "country_code": ""
            },
            "created_at": "2016-02-10T13:31:35+00:00",
            "updated_at": "2016-02-10T13:31:35+00:00",
            "_links": [
              {
                "rel": "self",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
              },
              {
                "rel": "parent",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Collection.json"
              },
              {
                "rel": "update",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001",
                "method": "PATCH",
                "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
              },
              {
                "rel": "upsert",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001",
                "method": "PUT",
                "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
              },
              {
                "rel": "delete",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001",
                "method": "DELETE"
              }
            ]
          },
          {
            "id": "cust0002",
            "email_address": "fred@freddiesjokes.com",
            "opt_in_status": true,
            "company": "MailChimp",
            "first_name": "Fred",
            "last_name": "Von Chimpenheimer",
            "orders_count": 1,
            "total_spent": 10.25,
            "address": {
              "address1": "675 Ponce de Leon Ave NE",
              "address2": "Suite 5000",
              "city": "Atlanta",
              "province": "GA",
              "province_code": "30033",
              "postal_code": "",
              "country": "",
              "country_code": ""
            },
            "created_at": "2016-02-10T13:34:08+00:00",
            "updated_at": "2016-02-10T13:34:08+00:00",
            "_links": [
              {
                "rel": "self",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0002",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
              },
              {
                "rel": "parent",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Collection.json"
              },
              {
                "rel": "update",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0002",
                "method": "PATCH",
                "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
              },
              {
                "rel": "upsert",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0002",
                "method": "PUT",
                "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
              },
              {
                "rel": "delete",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0002",
                "method": "DELETE"
              }
            ]
          }
        ],
        "total_items": 2,
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Collection.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Instance.json"
          },
          {
            "rel": "create",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers",
            "method": "POST",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false 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.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

      Get information about a specific customer

      GET /ecommerce/stores/{store_id}/customers/{customer_id}

      Get information about a specific customer.

      Path parameters

      store_id The store id.
      customer_id The id for the customer of a store.

      Query string parameters

      fields Type: Array Title: Fields Read only: false A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
      exclude_fields Type: Array Title: Exclude Fields Read only: false A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

      Response body parameters

      id Type: String Title: Customer Foreign ID Read only: true A unique identifier for the customer.
      email_address Type: String Title: Email Address Read only: true The customer’s email address.
      opt_in_status Type: Boolean Title: Opt-in Status Read only: false 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.
      company Type: String Title: Company Read only: false The customer’s company.
      first_name Type: String Title: First Name Read only: false The customer’s first name.
      last_name Type: String Title: Last Name Read only: false The customer’s last name.
      orders_count Type: Integer Title: Orders Count Read only: false The customer’s total order count. Learn More about using this data.
      total_spent Type: Number Title: Total Spent Read only: false The total amount the customer has spent. Learn More about using this data.
      address Type: Object Title: Address Read only: false The customer’s address.
      Show properties
      address1 Type: String Title: Address Field 1 Read only: false The mailing address of the customer.
      address2 Type: String Title: Address Field 2 Read only: false An additional field for the customer’s mailing address.
      city Type: String Title: City Read only: false The city the customer is located in.
      province Type: String Title: Province Read only: false The customer’s state name or normalized province.
      province_code Type: String Title: Province Code Read only: false The two-letter code for the customer’s province or state.
      postal_code Type: String Title: Postal Code Read only: false The customer’s postal or zip code.
      country Type: String Title: Country Code Read only: false The customer’s country.
      country_code Type: String Title: Country Code Read only: false The two-letter code for the customer’s country.
      created_at Type: String Title: Creation Time Read only: true The date and time the customer was created.
      updated_at Type: String Title: Update Time Read only: true The date and time the customer was last updated.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request GET \
      --url 'https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Date: Wed, 10 Feb 2016 14:10:30 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 1433
      Connection: keep-alive
      Vary: Accept-Encoding
      X-Request-Id: 17aacae8-028f-4267-9291-8ef9814133f5
      Link: <https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json>; rel="describedBy"
      
      {
        "id": "cust0001",
        "email_address": "freddie@freddiesjokes.com",
        "opt_in_status": true,
        "company": "MailChimp",
        "first_name": "Freddie",
        "last_name": "Von Chimpenheimer",
        "orders_count": 1,
        "total_spent": 10.25,
        "address": {
          "address1": "675 Ponce de Leon Ave NE",
          "address2": "Suite 5000",
          "city": "Atlanta",
          "province": "GA",
          "province_code": "30033",
          "postal_code": "",
          "country": "",
          "country_code": ""
        },
        "created_at": "2016-02-10T13:31:35+00:00",
        "updated_at": "2016-02-10T13:31:35+00:00",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Collection.json"
          },
          {
            "rel": "update",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001",
            "method": "PATCH",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          },
          {
            "rel": "upsert",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001",
            "method": "PUT",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0001",
            "method": "DELETE"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false 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.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
    • Update a customer

      PATCH /ecommerce/stores/{store_id}/customers/{customer_id}

      Update a customer.

      Path parameters

      store_id The store id.
      customer_id The id for the customer of a store.

      Request body parameters

      opt_in_status Type: Boolean Title: Opt-in Status Read only: false 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.
      company Type: String Title: Company Read only: false The customer’s company.
      first_name Type: String Title: First Name Read only: false The customer’s first name.
      last_name Type: String Title: Last Name Read only: false The customer’s last name.
      orders_count Type: Integer Title: Orders Count Read only: false The customer’s total order count. Learn More about using this data.
      total_spent Type: Number Title: Total Spent Read only: false The total amount the customer has spent. Learn More about using this data.
      address Type: Object Title: Address Read only: false The customer’s address.
      Show properties
      address1 Type: String Title: Address Field 1 Read only: false The mailing address of the customer.
      address2 Type: String Title: Address Field 2 Read only: false An additional field for the customer’s mailing address.
      city Type: String Title: City Read only: false The city the customer is located in.
      province Type: String Title: Province Read only: false The customer’s state name or normalized province.
      province_code Type: String Title: Province Code Read only: false The two-letter code for the customer’s province or state.
      postal_code Type: String Title: Postal Code Read only: false The customer’s postal or zip code.
      country Type: String Title: Country Code Read only: false The customer’s country.
      country_code Type: String Title: Country Code Read only: false The two-letter code for the customer’s country.

      Response body parameters

      id Type: String Title: Customer Foreign ID Read only: true A unique identifier for the customer.
      email_address Type: String Title: Email Address Read only: true The customer’s email address.
      opt_in_status Type: Boolean Title: Opt-in Status Read only: false 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.
      company Type: String Title: Company Read only: false The customer’s company.
      first_name Type: String Title: First Name Read only: false The customer’s first name.
      last_name Type: String Title: Last Name Read only: false The customer’s last name.
      orders_count Type: Integer Title: Orders Count Read only: false The customer’s total order count. Learn More about using this data.
      total_spent Type: Number Title: Total Spent Read only: false The total amount the customer has spent. Learn More about using this data.
      address Type: Object Title: Address Read only: false The customer’s address.
      Show properties
      address1 Type: String Title: Address Field 1 Read only: false The mailing address of the customer.
      address2 Type: String Title: Address Field 2 Read only: false An additional field for the customer’s mailing address.
      city Type: String Title: City Read only: false The city the customer is located in.
      province Type: String Title: Province Read only: false The customer’s state name or normalized province.
      province_code Type: String Title: Province Code Read only: false The two-letter code for the customer’s province or state.
      postal_code Type: String Title: Postal Code Read only: false The customer’s postal or zip code.
      country Type: String Title: Country Code Read only: false The customer’s country.
      country_code Type: String Title: Country Code Read only: false The two-letter code for the customer’s country.
      created_at Type: String Title: Creation Time Read only: true The date and time the customer was created.
      updated_at Type: String Title: Update Time Read only: true The date and time the customer was last updated.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request PATCH \
      --url 'https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0003' \
      --user 'anystring:apikey' \
      --header 'content-type: application/json' \
      --data '{"id" : "cust0003", "email_address" : "frederick@freddiesjokes.com", "company" : "Freddie'\''s Jokes"}' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Date: Wed, 10 Feb 2016 14:06:02 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 1443
      Connection: keep-alive
      Vary: Accept-Encoding
      X-Request-Id: d0c6d3a3-4468-4ef6-816d-1894409051ce
      Link: <https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json>; rel="describedBy"
      
      {
        "id": "cust0003",
        "email_address": "frederick@freddiesjokes.com",
        "opt_in_status": true,
        "company": "Freddie's Jokes",
        "first_name": "Frederick",
        "last_name": "Von Chimpenheimer",
        "orders_count": 1,
        "total_spent": 10.25,
        "address": {
          "address1": "675 Ponce de Leon Ave NE",
          "address2": "Suite 5000",
          "city": "Atlanta",
          "province": "GA",
          "province_code": "30033",
          "postal_code": "",
          "country": "",
          "country_code": ""
        },
        "created_at": "2016-02-10T13:53:25+00:00",
        "updated_at": "2016-02-10T14:06:02+00:00",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0003",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Collection.json"
          },
          {
            "rel": "update",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0003",
            "method": "PATCH",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          },
          {
            "rel": "upsert",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0003",
            "method": "PUT",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0003",
            "method": "DELETE"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false 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.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

      Add or update a customer

      PUT /ecommerce/stores/{store_id}/customers/{customer_id}

      Add or update a customer.

      Path parameters

      store_id The store id.
      customer_id The id for the customer of a store.

      Request body parameters

      id Type: String Title: Customer Foreign ID Read only: false A unique identifier for the customer.
      email_address Type: String Title: Email Address Read only: false The customer’s email address.
      opt_in_status Type: Boolean Title: Opt-in Status Read only: false 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.
      company Type: String Title: Company Read only: false The customer’s company.
      first_name Type: String Title: First Name Read only: false The customer’s first name.
      last_name Type: String Title: Last Name Read only: false The customer’s last name.
      orders_count Type: Integer Title: Orders Count Read only: false The customer’s total order count. Learn More about using this data.
      total_spent Type: Number Title: Total Spent Read only: false The total amount the customer has spent. Learn More about using this data.
      address Type: Object Title: Address Read only: false The customer’s address.
      Show properties
      address1 Type: String Title: Address Field 1 Read only: false The mailing address of the customer.
      address2 Type: String Title: Address Field 2 Read only: false An additional field for the customer’s mailing address.
      city Type: String Title: City Read only: false The city the customer is located in.
      province Type: String Title: Province Read only: false The customer’s state name or normalized province.
      province_code Type: String Title: Province Code Read only: false The two-letter code for the customer’s province or state.
      postal_code Type: String Title: Postal Code Read only: false The customer’s postal or zip code.
      country Type: String Title: Country Code Read only: false The customer’s country.
      country_code Type: String Title: Country Code Read only: false The two-letter code for the customer’s country.

      Response body parameters

      id Type: String Title: Customer Foreign ID Read only: true A unique identifier for the customer.
      email_address Type: String Title: Email Address Read only: true The customer’s email address.
      opt_in_status Type: Boolean Title: Opt-in Status Read only: false 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.
      company Type: String Title: Company Read only: false The customer’s company.
      first_name Type: String Title: First Name Read only: false The customer’s first name.
      last_name Type: String Title: Last Name Read only: false The customer’s last name.
      orders_count Type: Integer Title: Orders Count Read only: false The customer’s total order count. Learn More about using this data.
      total_spent Type: Number Title: Total Spent Read only: false The total amount the customer has spent. Learn More about using this data.
      address Type: Object Title: Address Read only: false The customer’s address.
      Show properties
      address1 Type: String Title: Address Field 1 Read only: false The mailing address of the customer.
      address2 Type: String Title: Address Field 2 Read only: false An additional field for the customer’s mailing address.
      city Type: String Title: City Read only: false The city the customer is located in.
      province Type: String Title: Province Read only: false The customer’s state name or normalized province.
      province_code Type: String Title: Province Code Read only: false The two-letter code for the customer’s province or state.
      postal_code Type: String Title: Postal Code Read only: false The customer’s postal or zip code.
      country Type: String Title: Country Code Read only: false The customer’s country.
      country_code Type: String Title: Country Code Read only: false The two-letter code for the customer’s country.
      created_at Type: String Title: Creation Time Read only: true The date and time the customer was created.
      updated_at Type: String Title: Update Time Read only: true The date and time the customer was last updated.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request PUT \
      --url 'https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0003' \
      --user 'anystring:apikey' \
      --header 'content-type: application/json' \
      --data '{"id" : "cust0003", "email_address" : "frederick@freddiesjokes.com", "opt_in_status" : true, "company" : "MailChimp", "first_name" : "Frederick", "last_name" : "Von Chimpenheimer", "orders_count" : 1, "total_spent" : 10.25, "address" : {"address1" : "675 Ponce de Leon Ave NE", "address2" : "Suite 5000", "city" : "Atlanta", "province" : "GA", "province_code" : "30033", "country_code" : ""}}' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Date: Wed, 10 Feb 2016 14:03:51 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 1437
      Connection: keep-alive
      Vary: Accept-Encoding
      X-Request-Id: eeb64863-7e2f-486b-9d66-d8ca00fee760
      Link: <https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json>; rel="describedBy"
      
      {
        "id": "cust0003",
        "email_address": "frederick@freddiesjokes.com",
        "opt_in_status": true,
        "company": "MailChimp",
        "first_name": "Frederick",
        "last_name": "Von Chimpenheimer",
        "orders_count": 1,
        "total_spent": 10.25,
        "address": {
          "address1": "675 Ponce de Leon Ave NE",
          "address2": "Suite 5000",
          "city": "Atlanta",
          "province": "GA",
          "province_code": "30033",
          "postal_code": "",
          "country": "",
          "country_code": ""
        },
        "created_at": "2016-02-10T13:53:25+00:00",
        "updated_at": "2016-02-10T14:03:51+00:00",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0003",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Collection.json"
          },
          {
            "rel": "update",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0003",
            "method": "PATCH",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          },
          {
            "rel": "upsert",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0003",
            "method": "PUT",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Customers/Instance.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0003",
            "method": "DELETE"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false 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.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
    • Delete a customer

      DELETE /ecommerce/stores/{store_id}/customers/{customer_id}

      Delete a customer from a store.

      Path parameters

      store_id The store id.
      customer_id The id for the customer of a store.

      Example request

      
      curl --request DELETE \
      --url 'https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/customers/cust0003' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 204 No Content
      Server: nginx
      Date: Wed, 10 Feb 2016 14:12:19 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 0
      Connection: keep-alive
      X-Request-Id: 0666421e-c862-480c-9018-9ae25120b78e
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false 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.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.