v1

latestOpenAPI 3.1.02026-08-061945115.8 KB
Purchase

Grant access level

Provides access level to your end-user without providing info on the transaction. This comes in handy if you have bonuses for referrals or other events related to your products. The access level provided by this method will not be reflected in your analytics. It will be sent to only webhook integration, and only in this case will appear in the Event Feed.

post/api/v2/server-side-api/purchase/profile/grant/access-level/

Headers

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.

Request body

access_level_idstring required

Paid access level ID configured in the Access Levels page

starts_atstring date-time nullable

The datetime when the access level will be active. Maybe in the future. The default value is null.

expires_atstring date-time nullable

The datetime when the access level will expire. It may be in the past and may be null for lifetime access. The default value is null.

Response

Access level granted successfully