GET /api/v2/server-side-api/profile/

Get profile

Retrieves the details of an existing end user of your app.

Header parameters

adapty-customer-user-idstring

The unique ID of the customer in your system. Either adapty-customer-user-id or adapty-profile-id is required.

adapty-profile-idstring

The unique ID of the profile in your system. Your best option if you are working with anonymous profiles. Either adapty-customer-user-id or adapty-profile-id is required.

Responses

Profile retrieved successfully

Schema
dataobjectrequired
app_idstringrequired

The internal ID of your app

profile_idstringrequired

Adapty profile ID

customer_user_idstringrequired

The ID of your user in your system

total_revenue_usdnumberrequired

A float value representing the total revenue in USD earned in the profile

segment_hashstringrequired

Internal parameter

timestampintegerrequired

Response time in milliseconds, needs for resolve a race condition

custom_attributesarray of objectrequired

A maximum of 30 custom attributes to the profile are allowed to be set

keystringrequired

The key must be a string with no more than 30 characters. Only letters, numbers, dashes, points, and underscores allowed

valuestring | numberrequired

The attribute value must be no more than 50 characters. Only strings and floats are allowed as values

access_levelsarray of objectrequired

Array of Access level objects. Empty array if the customer has no access levels

access_level_idstring

Access level identifier

storestring

Store where the access level was purchased

store_product_idstring

Product ID in the store

store_base_plan_idstring

Base plan ID in the store

store_transaction_idstring

Transaction ID in the store

store_original_transaction_idstring

Original transaction ID in the store

offerallOf

Offer details, if a promotional or introductory offer was applied

categorystring

Offer category

One of: "introductory", "promotional", "offer_code", "win_back"

typestring

Offer type

One of: "free_trial", "pay_as_you_go", "pay_up_front"

idstring

Offer ID

starts_atstring

When the access level starts

purchased_atstring

When the access level was purchased

originally_purchased_atstring

When the access level was originally purchased

expires_atstring

When the access level expires

renewal_cancelled_atstring

When renewal was cancelled

billing_issue_detected_atstring

When billing issue was detected

is_in_grace_periodboolean

Whether the access level is in grace period

cancellation_reasonstring

Reason for cancellation

subscriptionsarray of objectrequired

Array of Subscription objects. Empty array if the customer has no subscriptions

storestring

Store where the subscription was purchased

store_product_idstring

Product ID in the store

store_base_plan_idstring

Base plan ID in the store

store_transaction_idstring

Transaction ID in the store

store_original_transaction_idstring

Original transaction ID in the store

offerallOf

Offer details, if a promotional or introductory offer was applied

categorystring

Offer category

One of: "introductory", "promotional", "offer_code", "win_back"

typestring

Offer type

One of: "free_trial", "pay_as_you_go", "pay_up_front"

idstring

Offer ID

environmentstring

Environment (Sandbox, Production)

purchased_atstring

When the subscription was purchased

originally_purchased_atstring

When the subscription was originally purchased

expires_atstring

When the subscription expires

renewal_cancelled_atstring

When renewal was cancelled

billing_issue_detected_atstring

When billing issue was detected

is_in_grace_periodboolean

Whether the subscription is in grace period

cancellation_reasonstring

Reason for cancellation

non_subscriptionsarray of objectrequired

Array of Non-Subscription objects. Empty array if the customer has no purchases

purchase_idstring

Unique purchase identifier

storestring

Store where the purchase was made

store_product_idstring

Product ID in the store

store_base_plan_idstring

Base plan ID in the store

store_transaction_idstring

Transaction ID in the store

store_original_transaction_idstring

Original transaction ID in the store

purchased_atstring

When the purchase was made

environmentstring

Environment (Sandbox, Production)

is_refundboolean

Whether this is a refund

is_consumableboolean

Whether this is a consumable purchase

Example
{
  "data": {
    "app_id": "14c3d333-2f3a-455a-aa86-ef83dff6913b",
    "profile_id": "d8533a10-bcce-4e33-8c9d-88b05ac56559",
    "customer_user_id": "77B14FB4-FD2A-4D38-AA3A-4C433F79863C",
    "total_revenue_usd": 9.99,
    "segment_hash": "fdaeef7f8aaa33c9",
    "timestamp": 1733324566777,
    "custom_attributes": [
      {
        "key": "favourite_sport",
        "value": "yoga"
      }
    ],
    "access_levels": [
      {
        "access_level_id": "premium",
        "store": "app_store",
        "store_product_id": "unlimited.9999",
        "store_base_plan_id": null,
        "store_transaction_id": "2000000335013007",
        "store_original_transaction_id": "2000000335013007",
        "offer": null,
        "starts_at": null,
        "purchased_at": "2024-12-24T10:50:23+00:00",
        "originally_purchased_at": "2024-12-24T10:50:23+00:00",
        "expires_at": null,
        "renewal_cancelled_at": "2025-01-05T13:27:47.461425+00:00",
        "billing_issue_detected_at": null,
        "is_in_grace_period": false,
        "cancellation_reason": null
      }
    ],
    "subscriptions": [
      {
        "store": "app_store",
        "store_product_id": "unlimited.9999",
        "store_base_plan_id": null,
        "store_transaction_id": "2000000815013007",
        "store_original_transaction_id": "2000000815013007",
        "offer": null,
        "environment": "Sandbox",
        "purchased_at": "2024-12-24T10:50:23+00:00",
        "originally_purchased_at": "2024-12-24T10:50:23+00:00",
        "expires_at": null,
        "renewal_cancelled_at": null,
        "billing_issue_detected_at": null,
        "is_in_grace_period": false,
        "cancellation_reason": null
      }
    ],
    "non_subscriptions": [
      {
        "purchase_id": "7a5f9a7d-e236-33e6-96d8-53a3c59c5562",
        "store": "app_store",
        "store_product_id": "1year.premium",
        "store_base_plan_id": null,
        "store_transaction_id": "30002109551456",
        "store_original_transaction_id": "30002109551456",
        "purchased_at": "2022-10-12T09:42:50+00:00",
        "environment": "Production",
        "is_refund": false,
        "is_consumable": false
      }
    ]
  }
}

Unauthorized

Schema
errorsarray of objectrequired
sourcestring

Source of the error

errorsarray of string

Array of error messages

error_codestringrequired

Short error name

status_codeintegerrequired

HTTP status code

Example
{
  "errors": [
    {
      "source": "non_field_errors",
      "errors": [
        "Authentication credentials were not provided."
      ]
    }
  ],
  "error_code": "not_authenticated",
  "status_code": 401
}

Profile not found

Schema
errorsarray of objectrequired
sourcestring

Source of the error

errorsarray of string

Array of error messages

error_codestringrequired

Short error name

status_codeintegerrequired

HTTP status code

Example
{
  "errors": [
    {
      "source": null,
      "errors": [
        "Profile not found"
      ]
    }
  ],
  "error_code": "profile_does_not_exist",
  "status_code": 404
}

Internal server error