Location

Get top open locations for a specific campaign.

Available methods

    • Get top open locations

      GET /reports/{campaign_id}/locations

      Get top open locations for a specific campaign.

      Path parameters

      campaign_id The unique id for the campaign.

      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.

      Response body parameters

      locations Type: Array Title: Lists Read only: false An array of objects, each representing a top location for opens.
      Show properties
      country_code Type: String Title: Country Code Read only: true The two-character code for a country.
      region Type: String Title: Region Read only: true A more specific location area such as city or state.
      opens Type: Integer Title: Opens Read only: true The number of unique campaign opens for a region.
      campaign_id Type: String Title: Campaign ID Read only: true The campaign id.
      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/reports/42694e9e57/locations' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Content-Type: application/json; charset=utf-8
      Content-Length: 483
      Vary: Accept-Encoding
      X-Request-Id: 09487d67-4ebe-47f8-babc-caf7c6743242
      Link: <https://api.mailchimp.com/schema/3.0/Reports/Locations/Collection.json>; rel="describedBy"
      Date: Thu, 17 Sep 2015 17:22:10 GMT
      Connection: keep-alive
      
      
      {
        "locations": [
          {
            "country_code": "US",
            "region": "CA",
            "opens": 42
          }
        ],
        "campaign_id": "42694e9e57",
        "_links": [
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/reports/42694e9e57",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/Instance.json"
          },
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/reports/42694e9e57/locations",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Reports/Locations/Collection.json"
          }
        ],
        "total_items": 1
      }
                                      

      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.