========================= API Endpoints ========================= The main URL path: `https://settings.adjust.com/api/` Trailing slash is required when specified! Endpoint Status =============== .. csv-table:: :header: "Path", "Status", "Description" :widths: 30, 10, 30 `POST /app`_, **LIVE**, "" `GET /app/`_, **LIVE**, "" `GET /app?store_id=<>&platform=<>`_, **LIVE**, "" `POST /campaign`_, **LIVE**, "" `GET /signature?bundle_id=`_, **LIVE**, "" `GET /app//channels`_, **LIVE**, "" `GET /status/{ticket_token}`_, **BETA**, "The endpoint is available with status and sections migration details" `POST /app/{app_token}`_, **BETA**, "The endpoint is available" `POST /signature`_, **BETA**, "The endpoint is available" API Endpoints ============= .. _post-app: POST /app --------- This endpoint triggers “Get OR Create” operation for an App in Adjust/Acquired. This endpoint IS safe to be invoked multiple times for the same app. If more data is provided with the subsequent requests, it WILL be stored and processed by Adjust in addition to what was there previously. User is expected to send ``android_signature_hash`` for Android apps This endpoint has two part of process. The first is synchronous part. Due HTTP-request it will create an app in Adjust Dash and register a job to process the second asynchronous part, see :ref:`background-jobs`. :: +---------------------+ | HTTP - Request | Update Ticket Status regarding | | Job result (success or failure) +---------------------+ +-----------------------+ ↓ ↓ | +---------------------+ +-----------+ +------------------+ +~~~~~~~~~~~~+ | New App | | Ticket | | Background Job | ! Migration ! | | ----> | | ----> | | <---> ! Process ! +---------------------+ +-----------+ +------------------+ +~~~~~~~~~~~~+ ↓ +---------------------+ | HTTP - Response | | | +---------------------+ .. csv-table:: Request Parameters :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "store_id", "R", "string", "Bundle ID for Android iTunes Store ID for iOS" "platform", "R", ``android`` or ``ios``, "" "name", "R", "string", "App name" "bundle_id", "R", "string", "Bundle ID for Android or iOS app" "verification", "O", "bool", "Request verification for IOS apps" "android_signature_hash", "O", "string", "SHA1 hash, generated from the keystore file to build the SDK signature" "channel_setup", "OB", "object", "Partner-specific parameters, see :ref:`channel-setup`" "editors", "O", "emails list", "List of users(emails) which should have access to an app" "template_app_token", "O", "string", "Adjust app token to use as a template (if differs from the pre-agreed default)" "ios_pv_shared_secret", "O", "string", "iOS Purchase Verification secret which will be populated to the target app." "sections", "O", "string list", "List sections to update only, see :ref:`sections`" .. csv-table:: Response Structure :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "adjust_app_token", "R", "string", "**Adjust App Token** to be used in SDK integration and another API requests" "ticket_token", "R", "uuid", "Ticket id to check the current job status see :ref:`background-jobs` and `GET /status/{ticket_token}`_" .. _get-app-adjust_app_token: GET /app/ --------------------------- .. csv-table:: Request Parameters :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "adjust_app_token (URL)", "R", "string", "Adjust App Token as received from `POST /app`_ or manually from Adjust dashboard." .. csv-table:: Response Structure :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "adjust_app_token", "R", "string", "Echo of the requested token (provided for convenience when requesting an app :ref:`by store_id and platform `)" "store_id", "R", "string", "Bundle ID for Android iTunes Store ID for iOS" "platform", "R", "``android`` or ``ios``", "" "name", "R", "string", "Display name from Adjust dashboard" "cross_promo_token", "O", "string", "Adjust Tracker token to be used for CrossPromotion (once available)" "additional_info", "O", "object", "All app details previously received by Acquired." "android_signature_hash", "O", "string", "SHA1 hash, generated from the keystore file to build the SDK signature" "channel_setup", "O", "object", "Partner-specific parameters, see :ref:`Channel Setup `" .. _get-app-store_id_platform: GET /app?store_id=<>&platform=<> --------------------------------- .. csv-table:: Request Parameters :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "store_id", "R", "string", "Bundle ID for Android iTunes Store ID for iOS" "platform", "R", "``android``,``ios``", "" If app is found, the request gets redirected to the corresponding `GET /app/`_ yielding the same response. .. _post-campaign: POST /campaign --------------- Endpoint allows to request App+Channel specific Click and Impression URLs to be used in campaigns. For those channels that require Partner Setup to be complete, channel setup parameters must be provided in advance, otherwise ``/campaign`` endpoint will fail. .. csv-table:: Request Parameters :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "store_id", "R", "string", "Bundle ID for Android iTunes Store ID for iOS" "platform", "R", "``android``,``ios``", "" "channel", "R", "string", "Acquired :ref:`ad-network-slugs`" "campaign_name", "O", "string", "IGNORED since dynamic Network-level URLs are used for campaigns. Left in to be compatible with existing APIs." "channel_setup", "OB", "object", "Partner-specific parameters, see :ref:`channel-setup`." "android_signature_hash", "O", "string", "SHA1 hash, generated from the keystore file to build the SDK signature" .. csv-table:: Response Structure :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "click_url", "R", "string", "App+Channel specific URL to be used as Click URL for the new Campaign" "impression_url", "R", "string", "App+Channel specific URL to be used as Impression URL for the new Campaign" .. _get-signature_bundle_id: GET /signature?bundle_id= ------------------------------------- This endpoint exposes SDK signature libraries for the bundle_id specified. Endpoint becomes available as soon as bundle_id is registered in Adjust/Acquired (at least one of two apps is created). Response URLs will be set to null until the libraries are available to download. .. csv-table:: Request Parameters :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "bundle_id (URL)", "R", "string", "Bundle ID" .. csv-table:: Response Structure :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "android_app_token", "OB", "string", "Adjust app token for the Android app (if available)" "ios_app_token", "OB", "string", "Adjust app token for the iOS app (if available)" "android_lib_url", "OB", "string", "Direct link to download signed adjust-android.aar (if available)" "ios_lib_url", "OB", "string", "Direct link to download signed AdjustSdk.a (if available)" "android_doctor_url", "OB", "string", "Direct link to download .zip archive with available tools to debug signature" "ios_doctor_url", "OB", "string", "Direct link to download .zip archive with available tools to debug signature" "ios_md5_sum", "OB", "string", "MD5 checksum for ios signature" "android_md5_sum", "OB", "string", "MD5 checksum for android signature" "library_type", "OB", "string", "The signature library type for both OS, for now returns only ``plugin`` value" .. _get-channels: GET /app//channels ------------------------------------ Show channels that have trackers in Adjust. .. csv-table:: Request Parameters :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "adjust_app_token (URL)", "R", "string", "Adjust App Token as received from `POST /app`_ or manually from Adjust dashboard." .. csv-table:: Response Structure :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "channels", "R", "list", "Acquired Ad Network slug for Network Trackers created for this App" .. _get-ticket-status: GET /status/{ticket_token} -------------------------- This endpoint shows the status of the :ref:`background-jobs` which would run regarding the `POST /app`_ request. .. csv-table:: Request Parameters :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "ticket_token", "R", "string", "Ticket unique token in uuid format, received from `POST /app`_ endpoint" .. csv-table:: Response Structure :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "status", "R", "string", "Ticket current status can be: * NEW - the ticket was created, but the migration job is not started * OPENED - the job for this ticket has been started * FAILED - the job was failed * COMPLETED - the job was completed successfully" .. _update-app-settings: POST /app/{app_token} --------------------- This endpoint allows to change ``name``, ``store_id`` and ``bundle_id`` for existing apps, and in addition, ``android_signature_hash`` for Android Apps . Usually the reason to update these is if the client cannot provide them at the time the app is created on Adjust. Because of the ``store_id`` or ``bundle_id`` are important values for app and could be used in many places Automation API takes responsibility to change all of them after endpoint has been called. For example the current ``store_id`` is used in Snapchat Partner as ``app_id`` value so it also must be changed. For android apps, when changing ``store_id`` we will automatically update ``bundle_id`` so if the app contains already generated signature, the new signature should be generated too. .. NOTE:: To update signatures client **must** send special Signature Authorization Token. See: :ref:`info-authorization-signature-token` Example of updating Android apps with new store_id: .. code-block:: bash $ curl \ --header "AdjustAuthorization: Token " \ --header "Content-Type: application/json" \ --data '{"store_id":"test.bundle.newstoreid.app"}' \ -X POST https://settings.adjust.com/api/app/p77yk727r18g Example of updating IOS apps with new store_id: .. code-block:: bash $ curl \ --header "AdjustAuthorization: Token " \ --header "Content-Type: application/json" \ --data '{ "store_id":"999999999", "bundle_id": "test.bundle.newstoreid.app" }' -X POST https://settings.adjust.com/api/app/p77yk727r18g .. csv-table:: Request Parameters :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "name", "O", "string", "New name" "store_id", "O", "string", "New ``store_id``, Android apps will automatically have ``bundle_id`` set to this value." "bundle_id", "O", "string", "New ``bundle_id``, used only for iOS app and ignored for Andoroid apps." "android_signature_hash", "O", "string", "New android signature hash, mandatory create a new signature when the app ``store_id`` changes." .. csv-table:: Response Structure :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "store_id", "R", "string", "Current or updated store_id" "name", "R", "string", "App name" "ticket_token", "R", "string", "Ticket token to check status for background job. See: get-ticket-status_" .. _create-signature: POST /signature --------------- This endpoint can be used to create or update signatures for the apps added to Adjust. It's possible to generate signatures only for Unity-based apps running on ``android`` and ``ios`` platforms. .. NOTE:: Adjust app can be multiplatform. For more information see: `Adjust Multiplatform Apps`_ Generating signatures flow is similar to app migration, see :ref:`post-app`. All work is done in background tasks, see :ref:`background-jobs`. The endpoint has some limitations on the number of requests. It is impossible to send more than one request for one app if There are already scheduled (or working) jobs for it. .. NOTE:: Both authentication tokens must be sent, for more information see :ref:`auth-adjust-token` and :ref:`info-authorization-signature-token`. .. csv-table:: Request Parameters :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "app_token", "R", "string", "Adjust App Token" "platform", "R", "enum", "App platform to generate signatures, possible values: * ``android`` * ``ios`` * ``both`` (shortcut to generate ``android`` and ``ios``)" "android_signature_hash", "O", "string", "Android signature hashes, might be more than one, so should split by comma with no spaces" "force_sdk_signature", "O", "boolean", "The flag to enable/disable Force SDK Signature flag in Adjust App Settings" .. csv-table:: Response Structure :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "ticket_token", "R", "string", "Unique ID to check a scheduled job status, see :ref:`get-ticket-status`" :ref:`get-ticket-status` can be used to get status of the background job: .. csv-table:: Signature Ticket Info :header: "Name", "Required", "Type", "Description" :widths: 10, 10, 10, 30 "app_token", "R", "object", "JSON with info divided by platforms (android, ios)" "app_token.", "R", "object", "Detailed info about generated signature" "app_token..success", "R", "boolean", "Was operation by generate signature successfully or not" "app_token..msg", "R", "string", "Short message with operation status, like: 'Signature has been generated successfully'" "force_sdk_signature", "R", "object | null", "Information about changing SDK Signature flag in the app. If the body was not contained ``force_sdk_signature`` the value will be ``null``" "force_sdk_signature.", "O", "string", "It will be available if the request body had ``force_sdk_signature`` flag. The value contains short info about operation, if everything was ok, then the value will be ``updated`` "