Gus Arisna
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # API Documentation v1.0 ## API Endpoint Responses Every API endponts has standard API response looks like this: ```json { "data": {}, // Response data "message": "Success" // Response message } ``` This documentation only focus on the response data ### Initialize SDK #### Endpoint ``` POST /initialize ``` #### Response (in `data` field) | Field | Type | Nullable | Description | | ----------------- | ----------------------------- | -------- | ---------------------------------------------- | | publisherApp | [PublisherApp](#publisherapp) | No | Publisher app information | | user | [User](#user) | No | User information | | newRegisteredUser | Boolean | No | Indicates if the user is a new registered user | | newDevice | Boolean | No | Indicates if the device is a new device | ### Create Publisher User #### Endpoint ``` POST /publisher-user ``` #### Response (in `data` field) | Field | Type | Nullable | Description | | --------------- | ------ | -------- | ------------------------ | | publisherUserId | String | No | The ID of publisher user | ### Update User #### Endpoint ``` PUT /update-user ``` #### Response (in `data` field) | Field | Type | Nullable | Description | | ----- | ------------- | -------- | ---------------- | | user | [User](#user) | No | User information | ### Targeted Campaigns #### Endpoint ``` GET /campaigns ``` #### Response | Field | Type | Nullable | Description | | ----- | ----------------------- | -------- | -------------------------- | | data | [Campaign[]](#campaign) | No | List of targeted campaigns | ### Targeted Campaign Detail #### Endpoint ``` GET /campaigns/:campaignId ``` #### Response | Field | Type | Nullable | Description | | ----- | --------------------------------- | -------- | -------------------- | | data | [CampaignDetail](#campaigndetail) | No | Campaign detail data | ### Activa A Campaign #### Endpoint ``` POST /campaigns/active/:campaignId ``` ### Response (in `data` field) | Field | Type | Nullable | Description | | ------------------- | ------- | -------- | -------------------------------------- | | isCampaignActivated | Boolean | No | Indicates if the campaign is activated | ### Activated Campaigns #### Endpoint ``` GET /activated-campaigns ``` #### Response | Field | Type | Nullable | Description | | ----- | ----------------------- | -------- | --------------------------- | | data | [Campaign[]](#campaign) | No | List of activated campaigns | ### Campaign Support Ticket #### Endpoint ``` GET /campaigns/:campaignId/tickets ``` #### Response | Field | Type | Nullable | Description | | ----- | ----------------------------------------------------- | -------- | -------------------------- | | data | [SupportTicketCategories[]](#supportticketcategories) | No | The list of support ticket | ### Submit Support Ticket #### Endpoint ``` GET /campaigns/:campaignId/tickets ``` #### Response (in `data` field) | Field | Type | Nullable | Description | | ----------------- | ------- | -------- | ------------------------------------ | | isTicketSubmitted | boolean | No | Indicates if the ticket is submitted | ## API References ### User | Field | Type | Nullable | Description | | --------------- | -------- | -------- | ---------------------------------------------------- | | id | Int | No | ID | | publisherUserId | String | Yes | Publisher user ID | | publisherAppId | Int | No | PublisherApp ID | | adUnitId | Int | No | AdUnit ID | | email | String | Yes | Email address of the user | | phoneNumber | String | Yes | Phone number of the user | | platform | String | Yes | Platform used by the user. Enum: `Android`,`iOS` | | country | String | Yes | Country of the user | | age | Int | Yes | Age of the user | | gender | Int | Yes | Gender of the user | | highRisk | Boolean | Yes | Indicates if the user is high risk. Default: `false` | | createdAt | DateTime | No | Timestamp of when the record was created | | modifiedAt | DateTime | Yes | Timestamp of when the record was last modified | ### PublisherApp | Field | Type | Nullable | Description | | ------------------ | ------------------------------------- | -------- | ----------- | | id | Int | No | | | publisherId | Int | No | | | platform | String | No | | | packageName | String | No | | | baseUrl | String | No | | | title | String | Yes | | | summary | String | Yes | | | thumbnail | String | Yes | | | rating | Float | Yes | | | downloadsMin | Int | Yes | | | downloadsMax | Int | Yes | | | website | String | Yes | | | size | Int | Yes | | | containsAds | Boolean | Yes | | | developer | String | Yes | | | userRatingsCount | Int | Yes | | | iapMin | Float | Yes | | | iapMax | Float | Yes | | | privacyPolicyUrl | String | Yes | | | contentRating | String | Yes | | | releaseDate | DateTime | Yes | | | r1 | Int | Yes | | | r2 | Int | Yes | | | r3 | Int | Yes | | | r4 | Int | Yes | | | r5 | Int | Yes | | | catKeys | String | Yes | | | description | String | Yes | | | similar | String | Yes | | | screenshots | String | Yes | | | promoVideo | String | Yes | | | availableIn | String | Yes | | | appStoreCategoryId | Int | Yes | | | addUnits | [AdUnit[]](#adunit) | No | | | appStoreCategory | [AppStoreCategory](#appstorecategory) | No | | ### AppStoreCategory | Field | Type | Nullable | Description | | ----- | ------ | -------- | ------------------------------------------------ | | id | Int | No | ID | | name | String | No | Name of the app store category | | store | String | No | Associated app store. Enum: `googlePlay`,`apple` | ### AdUnit | Field | Type | Nullable | Description | | ------------------ | ------------------------- | -------- | ------------------------------ | | id | Int | No | ID | | publisherId | Int | No | Publisher's ID | | publisherAppId | Int | No | Publisher's application ID | | identifier | String | No | Identifier for the ad unit | | name | String | No | Name of the ad unit | | adUnitTypeId | Int | No | Ad unit type ID | | currencyIcon | String | Yes | Icon representing the currency | | currencyName | String | Yes | Name of the currency | | currencyConversion | Decimal | No | Currency conversion rate | | adUnitType | [AdUnitType](#adunittype) | No | Ad unit type information | ### AdUnitType | Field | Type | Nullable | Description | | ----- | ------ | -------- | ------------------------ | | id | Int | No | ID | | name | String | No | Name of the ad unit type | ### Campaign | Field | Type | Nullable | Description | | ------------------- | --------------------------------------- | -------- | ----------------------------------------------------------- | | campaignId | Int | No | ID | | campaignName | String | No | Name of the campaign | | campaignDescription | String | Yes | Description of the campaign | | status | String | No | Status of the campaign. Enum: `active`,`paused`,`suspended` | | app | [CampaignApp](#campaignapp) | No | App associated with the campaign | | currency | [CampaignCurrency](#campaigncurrency) | No | Currency associated with the campaign | | campaignPayout | [CampaignPayout](#campaignpayout) | No | Payout of the campaign | | tracking | [CampaignTracking](#campaigntracking) | No | Tracking information of the campaign | | targeting | [CampaignTargeting](#campaigntargeting) | No | Targeting information of the campaign | | creative | [CampaignCreative](#campaigncreative) | No | Creative information of the campaign | ### CampaignDetail | Field | Type | Nullable | Description | | ------------------- | --------------------------------------- | -------- | ----------------------------------------------------------- | | campaignId | Int | No | ID | | campaignName | String | No | Name of the campaign | | campaignDescription | String | Yes | Description of the campaign | | status | String | No | Status of the campaign. Enum: `active`,`paused`,`suspended` | | app | [CampaignApp](#campaignapp) | No | App associated with the campaign | | currency | [CampaignCurrency](#campaigncurrency) | No | Currency associated with the campaign | | campaignPayout | [CampaignPayout](#campaignpayout) | No | Payout of the campaign | | tracking | [CampaignTracking](#campaigntracking) | No | Tracking information of the campaign | | targeting | [CampaignTargeting](#campaigntargeting) | No | Targeting information of the campaign | | creative | [CampaignCreative](#campaigncreative) | No | Creative information of the campaign | | payoutEvents | [PayoutEvent[]](#payoutevent) | No | List of payout events of the campaign | | isInstalled | Boolean | No | Indicates if the app is installed | #### CampaignApp | Field | Type | Nullable | Description | | ---------------- | ------ | -------- | ------------------------------------------------ | | id | Int | No | ID | | title | String | Yes | Title of the app | | packageName | String | No | Package name of the app | | rating | Float | Yes | Rating of the app | | shortDescription | String | Yes | Short description of the app | | store | String | Yes | Associated app store. Enum: `googlePlay`,`apple` | | storeCategory | String | Yes | Category of the app on store | | previewUrl | String | No | Preview URL of the app | | thumbnail | String | Yes | Thumbnail of the app | ### CampaignCurrency | Field | Type | Nullable | Description | | ------------------------ | ------- | -------- | -------------------------------- | | name | String | No | Name of the currency | | symbol | String | No | Symbol of the currency | | adUnitName | String | No | Ad unit name | | adUnitCurrencyName | String | No | Ad unit currency name | | adUnitCurrencyIcon | String | No | Ad unit currency icon | | adUnitCurrencyConversion | Decimal | No | Ad unit currency conversion rate | ### CampaignPayout | Field | Type | Nullable | Description | | -------------------- | ---- | -------- | --------------------------------------------------------------- | | totalEvents | Int | No | Total count of campaign events | | totalPayout | Int | No | Total payout amount of the campaign | | totalPayoutConverted | Int | No | `totalPayout` \* `adUnitCurrencyConversion` of CampaignCurrency | ### CampaignTracking | Field | Type | Nullable | Description | | --------------- | ------ | -------- | ------------------------------------- | | attributionTool | String | No | Attribution tool used by the campaign | | clickUrl | String | No | Click URL of the campaign | | impressionUrl | String | No | Impression URL of the campaign | ### CampaignTargeting | Field | Type | Nullable | Description | | ------------- | --------------------------------------------------- | -------- | -------------------------------------------------------------------- | | os | String | Yes | Platform of the campaign. Enum: `Android`,`iOS` | | targetingType | String | Yes | Targeting type of the campaign. Enum: `incent`, `non-incent`, `both` | | reward | [CampaignTargetingReward](#campaigntargetingreward) | Yes | Reward of the campaign | ### CampaignTargetingReward | Field | Type | Nullable | Description | | ----------------------- | ------ | -------- | ------------------------- | | rewardDifficulty | String | No | Difficulty of the reward | | incentRewardDescription | String | Yes | Description of the reward | ### CampaignCreative | Field | Type | Nullable | Description | | ------------- | --------------------------------------- | -------- | ------------------------------- | | creativeUrl | String | Yes | Cloud drive URL of the creative | | creativePacks | [CampaignCreativePack[]](#creativepack) | Yes | Creative packs of the campaign | ### CreativePack | Field | Type | Nullable | Description | | ---------------- | ----------------------- | -------- | ------------------------- | | creativePackName | String | No | Name of the creative pack | | languageName | String | Yes | Name of the language | | languageCode | String | Yes | Code of the language | | creatives | [Creative[]](#creative) | No | Creatives of the pack | ### Creative | Field | Type | Nullable | Description | | ------------ | ----------------------------- | -------- | -------------------------------------------------------- | | creativeName | String | No | Creative name | | callToAction | String | Yes | The text of the ad button for the Call to Action (CTA) | | text | String | Yes | Creative text | | byteSize | String | Yes | The size of the creative file in bytes | | fileUrl | String | Yes | Creative file URL | | duration | String | Yes | The duration of the ad (mainly used for video creatives) | | creativeType | [CreativeType](#creativetype) | No | The type of the creative | ### CreativeType | Field | Type | Nullable | Description | | -------------------- | ------ | -------- | ------------------------------------------------ | | name | String | No | The creative type name | | type | String | Yes | The creative file type. Enum: `images`, `videos` | | width | String | Yes | The width of the creative | | height | String | Yes | The height of the creative | | creativeCategoryType | String | No | The category type of the creative | ### PayoutEvent | Field | Type | Nullable | Description | | ------------------------ | ------- | -------- | --------------------------------------------------------------------------------------------------- | | id | Int | No | ID | | conversionStatus | String | Yes | Conversion status. Enum: `approved`, `rejected`, `pending` | | identifier | String | No | The identifier of event | | eventName | String | Yes | The name of the event | | eventDescription | String | Yes | The description of the event | | eventCategory | String | Yes | The category of the event | | payoutAmount | Decimal | No | The payout amount of event | | payoutAmountConverted | Decimal | No | The converted payout amount. Calc: `payoutAmount` \* `adUnitCurrencyConversion` of CampaignCurrency | | payoutTypeId | Int | No | The payout type ID of event | | payoutType | String | Yes | The payout type of event | | allowDuplicateEvents | Boolean | Yes | If `true` the duplicate event will count | | maxTime | String | Yes | The maximum time amount of the event to be count | | maxTimeMetric | String | Yes | The maximum time metric. Enum: `seconds`, `minutes`, `hours`, or `days` | | maxTimeRemainSeconds | String | No | The remaining time of the event to be count in seconds | | enforceMaxTimeCompletion | Boolean | No | If `true` the event need to follow the `maxTime` and `maxTimeMetric` to be count | ### SupportTicketCategories | Field | Type | Nullable | Description | | ------ | ------------------------------------------- | -------- | ---------------------------------- | | name | String | No | The name of the category | | events | [SupportTicketEvent[]](#supportticketevent) | No | The list of events of the category | ### SupportTicketEvent | Field | Type | Nullable | Description | | --------------------- | ------- | -------- | ------------------------------------------------------------------------- | | id | Int | No | ID | | identifier | String | Yes | The identifier of event | | eventName | String | Yes | The name of the event | | eventDescription | String | Yes | The description of the event | | currencyName | String | No | The name of the currency | | currencyIcon | String | No | The icon of the currency | | currencyConversion | Decimal | No | The conversion rate of the currency | | payoutTypeId | Int | No | The payout type ID of event | | payoutType | String | No | The payout type name of event | | payoutAmount | Decimal | No | The payout amount of event | | payoutAmountConverted | Decimal | No | The converted payout amount. Calc: `payoutAmount` \* `currencyConversion` | | isTicketSubmitted | Boolean | No | The status of the ticket. If `true` the ticket is submitted |

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully