Skip to main content

Retrieve placement info

Retrieves information about paywall or onboarding placements: paywalls, segments, audiences, and A/B tests. This can help you ensure everything is set up correctly without having to open each placement you have separately.

note

As an alternative, you can export the same data from the dashboard.

Endpoint and method

POST https://api-admin.adapty.io/api/v1/client-api/exports/placements/

Example request

curl -X POST --location "https://api-admin.adapty.io/api/v1/client-api/exports/placements/" \
-H "Authorization: Api-Key <YOUR_SECRET_API_KEY>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"filters": {
"placement_type": "paywall"
}
}'

Placeholders:

  • <YOUR_SECRET_API_KEY>: Your secret API key for authorization.
tip

Depending on how you are going to use the response, you can set Accept to text/csv to get it as CSV or application/json to get a JSON file.

Parameters

ParameterTypeRequired in requestNullable in requestDescription
filtersObjectFilter which placements will be sent in the response.
Currently, you can only filter by placement_type: paywall or onboarding. So, the filters parameter value will be an object with one key-value pair.
{
"filters": {
"placement_type": "paywall"
}
}

Successful response: 200: OK

ParameterTypeDescription
developer_idStringPlacement ID.
placement_nameStringPlacement name.
audience_nameStringAudience name.
segment_nameStringAudience ID.
cross_placement_ab_test_nameStringCross-placement A/B test name. Can be null in JSON or empty in CSV.
ab_test_nameStringA/B test name. Can be null in JSON or empty in CSV.
paywall_nameStringPaywall name (only returned if placement_type is paywall).
onboarding_nameStringOnboarding name (only returned if placement_type is onboarding).
{
"data": [
{
"developer_id": "monthly",
"placement_name": "Monthly",
"audience_name": "USA",
"segment_name": "USA",
"cross_placement_ab_test_name": "Monthly cross A/B",
"ab_test_name": "Monthly A/B",
"paywall_name": "Monthly USA"
},
{
"developer_id": "weekly",
"placement_name": "Weekly",
"audience_name": "USA",
"segment_name": "USA",
"cross_placement_ab_test_name": "Weekly cross A/B",
"ab_test_name": "Weekly A/B",
"paywall_name": "Weekly USA"
}
]
}

Errors

401: Unauthorized

The request failed due to missing or incorrect authorization. Check the Authorization page, paying close attention to the Authorization header.

The request also failed because the specified profile wasn’t found.

Body

ParameterTypeDescription
errorsObject
  • source: (string) Always non_field_errors.
  • errors: A description of the error.
error_codeStringShort error name. Always not_authenticated.
status_codeIntegerHTTP status. Always 401.

Response example

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