Template Docs Commerce APIs Webhooks Tools
Get Started
Get Started

Retrieve specific profiles

GET api.squarespace.com/{api-version}/profiles/{ids}

Retrieves information for specific profiles.

The response contains profile information in a Profile and up to 50 Profiles. Read the Overview to learn more about this resource.

Parameters

{api-version} string
required

See the Profiles API Overview page for the current API version.


{ids} string
required

Specifies the profiles to retrieve.

Multiple Profiles can be retrieved by providing a comma-separated list of profile ids: {id1},{id2}..., though the same sequence is not guaranteed in the response.

Request example

Read the Making requests guide to learn why specific headers are necessary, and why some are omitted. Every request should also abide by Squarespace rate limits.

curl "https://api.squarespace.com/1.0/profiles/5fc7b8f18b4dc33dc818aeba,5ede64464561317766bdc632" \
  -H "Authorization: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" \
  -H "User-Agent: YOUR_CUSTOM_APP_DESCRIPTION"

Response example

A successful request generates a JSON response with an array of the requested Profiles.

Note: For easier reference between response fields and descriptions, comments were added in the example, though this makes the JSON invalid.

{
  // Array of Profile resources.
  // If the site doesn't have any user profiles, this array is empty.
  "profiles" : [ {
    // Unique Profile id.
    "id" : "5ede64464561317766bdc632",
    // Profile first name.
    "firstName" : "Gregory",
    // Profile last name.
    "lastName" : "Jones",
    // Profile email address.
    "email" : "gregory_jones@example.com",
    // Indicates whether the profile has an account with the website.
    "hasAccount" : false,
    // Indicates whether the profile has any commerce orders or donations with the website.
    "isCustomer" : true,
    // ISO 8601 UTC date and time string; represents when the profile was created.
    "createdOn" : "2020-06-08T16:16:06.573518Z",
    // Profile’s address.
    // An approximate address for the user based on existing data;
    // it should not be used for shipping or billing purposes.
    // Field is `null` if an approximate address can't be determined.
    "address" : {
      // Address first name.
      "firstName" : "Gregory",
      // Address last name. 
      "lastName" : "Jones",
      // Address line 1.
      "address1" : "450 North End Avenue",
      // Address line 2.
      "address2" : null,
      // Address city.
      "city" : "New York",
      // Address state or region.
      "state" : "NY",
      // Address postal code.
      "countryCode" : "US",
      // ISO 3166 alpha-2 country code string.
      "postalCode" : "10282",
      // Address phone number.
      "phone" : "5553334444"
    },
    // Indicates whether the profile opted to receive marketing.
    "acceptsMarketing" : false,
    // Summary of profile’s commerce transactions.
    // If a profile has no commerce transactions, the object is still returned with `null` or `0` values.
    // This information is calculated asynchronously; there may be a slight delay between 
    // when an order is created, and when it's reflected in the object.
    "transactionsSummary" : {
      // ISO 8601 UTC date and time string; represents when the profile’s first order was submitted.
      "firstOrderSubmittedOn" : "2020-06-04T10:46:05.245Z",
      // ISO 8601 UTC date and time string; represents when the profile’s latest order was submitted.
      "lastOrderSubmittedOn" : "2020-06-04T10:46:05.245Z",
      // Count of orders submitted.
      "orderCount" : 4,
      // Grand total of all orders.
      "totalOrderAmount" : {
        // Monetary amount with 1,000,000 limit and no markers for the dollar amount. 
        // Conforms to the selected ISO currency's precision. 
        // (E.g., JPY uses 123, but USD uses 123.00 or 123.)
        "value" : "674.00",
        // ISO 4217 currency code string.
        "currency" : "USD"
      },
      // Total of all order refunds.
      "totalRefundAmount" : {
        // Monetary amount with 1,000,000 limit and no markers for the dollar amount. 
        // Conforms to the selected ISO currency's precision. 
        // (E.g., JPY uses 123, but USD uses 123.00 or 123.)
        "value" : "45.00",
        // ISO 4217 currency code string.
        "currency" : "USD"
      },
      // ISO 8601 UTC date and time string; represents when the profile’s first donation was submitted.
      "firstDonationSubmittedOn" : null,
      // ISO 8601 UTC date and time string; represents when the profile’s latest donation was submitted.
      "lastDonationSubmittedOn" : null,
      // Count of donations submitted.
      "donationCount" : 1,
      // Grand total of all donations.
      "totalDonationAmount" : {
        // Monetary amount with 1,000,000 limit and no markers for the dollar amount. 
        // Conforms to the selected ISO currency's precision. 
        // (E.g., JPY uses 123, but USD uses 123.00 or 123.)
        "value" : "10.00",
        // ISO 4217 currency code string.
        "currency" : "USD"
      }
    }
  }, {
    "id" : "5fc7b8f18b4dc33dc818aeba",
    "firstName" : "Janice",
    "lastName" : "Jones",
    "email" : "janice.jones@example.com",
    "hasAccount" : false,
    "isCustomer" : false,
    "createdOn" : "2020-12-02T15:55:29.013064Z",
    "address" : null,
    "acceptsMarketing" : true,
    "transactionsSummary" : {
      "firstOrderSubmittedOn" : null,
      "lastOrderSubmittedOn" : null,
      "orderCount" : 0,
      "totalOrderAmount" : null,
      "totalRefundAmount" : null,
      "firstDonationSubmittedOn" : null,
      "lastDonationSubmittedOn" : null,
      "donationCount" : 0,
      "totalDonationAmount" : null
    }
  } ]
}

Status codes and error conditions

200 OK

The request was successful. The message body contains data in the format specified above.


400 BAD REQUEST

Type: INVALID_REQUEST_ERROR

Subtype: null
ids specifies greater than 50 profiles.


404 NOT FOUND

Type: INVALID_REQUEST_ERROR

Subtype: INVALID_ARGUMENT
One or more profiles were not found.