Quick Guide¶
- To start using the API you need:
an active and properly configured account on Adjust App Automation;
a configured Template app on the Adjust account;
working Adjust API Token.
For further information on initial setup please contact your Account Manager.
Create or update an app¶
First step is to create a new app in the account. For that we need to provide
proper AdjustAuthorization
token and the required data about the app as show
in the cURL example below:
$ curl \
--header "AdjustAuthorization: Token <Adjust API Token>" \
--header "Content-Type: application/json" \
--data '{
"name":"Test App Name",
"bundle_id":"test.bundle.app",
"store_id":"test.bundle.app",
"platform":"android",
"channel_setup": { "facebook": {"app_id": "123456789"} }
}' \
-X POST https://settings.adjust.com/api/app
This request will create a ticket on Adjust App Automation which will be worked on in the background. If everything is correct response should look like following:
{
"adjust_app_token": "p77yk727r18g",
"name": "Test App Name",
"sk_app_id": null,
"store_id": "test.bundle.app",
"bundle_id": "test.bundle.app",
"ticket_token": "af7702a9-ba95-6ba2-bdac-3f83e55ed8d3"
}
Ticket status can be fetched with GET /status/{ticket_token}
endpoint using the ticket_token
received in the response from POST /app.
For more information about managing apps please see Creating new Apps.
Fetch settings using Adjust app token¶
Once the app is created on the Adjust account we can the app settings using the adjust app token, for example:
$ curl \
--header "AdjustAuthorization: Token <Adjust API Token>" \
-X GET https://settings.adjust.com/api/app/p77yk727r18g
And the response should contain all the data Adjust App Automation has for the app:
{
"name" : "Test App Name",
"adjust_app_token" : "p77yk727r18g",
"platform" : "android",
"store_id" : "test.bundle.app",
"channel_setup" : {
"facebook" : { "app_id" : "123456789" },
"snapchat" : { "app_id" : "test.bundle.app" }
},
"additional_info" : {
"overrides" : {}
}
}
For more information please see GET /app/<adjust_app_token>.
Fetch settings using Store ID and Platform¶
$ curl \
--header "AdjustAuthorization: Token <Adjust API Token>" \
-L -X GET 'https://settings.adjust.com/api/app?store_id=test.bundle.app&platform=android'
# response is app details
For more information please see GET /app?store_id=<>&platform=<>.
Create Campaign Tracker URLs¶
$ curl \
--header "AdjustAuthorization: Token <Adjust API Token>" \
--header "Content-Type: application/json" \
--data '{
"store_id": "test.bundle.app",
"platform": "ios",
"channel": "unityads"
}' \
-X POST https://settings.adjust.com/api/campaign
# response is tracker URLs
For more information please see POST /campaign.
Ticket status¶
Once the app creation or update were requested the status of the background jobs can be tracked using GET /status/{ticket_token} endpoint.
In the response JSON, key status
is used to describe the status of the current ticket.
If status is completed
or failed
all the jobs have been finished.
Any other status means the ticket is still being processed.
Response will be in format similar to this:
{
"status" : "completed",
"events": {
"successes": [
<List of tasks for specific section which were completed successfully>
],
"failures": [
<List of tasks which were failed>
],
},
# if a section migration has failed before we started migration process,
# the reponse structure will contain details about the error
"partners": {
"section": "partners",
"detail": "Could not be start, because {events} sections has failed"
}
}