White-label API
Introduction
CARV's white-label APIs allow you to seamlessly integrate powerful features of CARV onto your sites while maintaining complete control over the user experience and branding. As CARV handles all the work on the backend, various APIs are readily provided to ensure smooth integration.
Features supported include user profile display, third-party account connection, campaign display and campaign NFT minting.
Getting Started
Contact CARV team via infra@carv.io to get an app ID issued to your organization. All your requests to the APIs must include the following headers:
Header Name | Header Value | Example Value |
---|---|---|
x-app-id | (String) app ID | carv |
authorization | (String) user authentication token | 7fcbe971-3fae-5988-946b-c25afae3a9b9 |
API Specifications
Get user token
Pass user identities to CARV to obtain authorization token, such that 3rd platforms could invoke carv authorized APIs. Note that this API is intend to be used by client servers rather than browsers, a user's old authorization token will be invalidated after a new one is generated.
POST
https://api.carv.io/auth/token
Headers
Name | Type | Description |
---|---|---|
x-app-id* | String | Client app ID issued by CARV |
x-app-request-time* | String | Millisecond timestamp when client sends the request, CARV only accept requests within 10s of this time. |
x-app-request-id* | String | Client request ID, must be unique within 30s. |
x-app-request-hmac* | String | Sha256-Hmac in hex format of combined string which is composed of request id, request time and & client API key.
Python sample code:
|
Request Body
Name | Type | Description |
---|---|---|
platform_user_id* | String | user ID on client's platform. |
identities* | Array of objects | user identity type and value |
raw_user_data* | Object | User information dictionary, any user properties could put here. |
Get user profile
Get current user's profile or another user's profile.
GET
https://api.carv.io/user/profile
Headers
Name | Type | Description |
---|---|---|
x-app-id* | String | Client app ID issued by CARV |
authorization* | String | user authentication token |
Request Body
Name | Type | Description |
---|---|---|
user_id* | String | Target user identifier. |
List Campaigns
List campaigns in descending order by end date.
GET
https://api.carv.io/campaigns/list
Headers
Name | Type | Description |
---|---|---|
x-app-id* | String | Client app ID issued by CARV |
authorization* | String | user authentication token |
Get campaign details
Get campaign details from campaign ID.
GET
https://api.carv.io/campaigns/{campaign_id}
Headers
Name | Type | Description |
---|---|---|
x-app-id* | String | Client app ID issued by CARV |
authorization | String | user authentication token |
List user mints
POST
https://api.carv.io/mints/list
Headers
Name | Type | Description |
---|---|---|
x-app-id* | String | Client app ID issued by CARV |
authorization* | String | user authentication token |
Request Body
Name | Type | Description |
---|---|---|
user_id* | String | Target user identifier. |
source_ids | Array of strings | List mints from specified campaign IDs. |
states | Array of strings | List mints in given status. Status enum:
|
Start campaign mint
POST
https://api.carv.io/mints/list
Headers
Name | Type | Description |
---|---|---|
x-app-id* | String | Client app ID issued by CARV |
authorization* | String | user authentication token |
Request Body
Name | Type | Description |
---|---|---|
source_id | Array of strings | The campaign ID. |
mint_to_addr | Array of strings | The mint receiver address. |
Last updated