Server To Server Event

    Send In-App/In-Web events in a server to server method.


    Send In-web Events

    POST

    https://api.airbridge.io/events/v1/apps/{app_name}/web/9320

    Send In-Web events in a server-to-server method.

    Delivery Methods

    Use when attribution based on Cookie ID in the Web SDK is required. [Data fetching guide].

    2. Sending events based on User ID (user.externalUserID).

    Use when you need attribution based on User ID rather than attribution via Cookie ID. Airbridge attributes based on the browser.clientID that is already matched to user.externalUserID in the internal ID table. When matching using User ID, you do not need to send the Client ID, and the fields below become optional parameters.

    Parameter

    Description

    eventData.shortID

    Attribution campaign parameter ID

    eventData.trackingData.channel

    Attribution campaign parameter channel

    eventData.trackingData.params

    Attribution campaign parameter

    Request

    Headers

    Accept-Language
    string

    You can specify the language to use for API requests and result returns. It follows the ISO-639-1 format.

    Content-Type
    string

    Represents the media type of the resource. Defaults to application/json.

    Authorization
    string

    The key value to use for API requests. You can get it by checking out .

    X-Forwarded-For
    Requiredstring

    You can send the user's IP in the X-Forwarded-For header. Without X-Forwarded-For, user behavior is logged with the IP of the server that requested the Server To Server API, not the user's IP (client request IP).

    We accept values in the form of ipv4 (123.123.123.123), ipv6 (2001:e60:87e3:81d4:cd57:5d52:ee2e:ff8d).

    Path Params

    app_name
    Requiredstring

    Airbridge App Name. (Unique ID)

    Body Params

    eventUUID
    string

    Random UUID v4 string.

    Accepts a random string in UUID4 format.

    The event uuid is used for duplication as a unique ID for the event, and will be generated automatically by the event api if not provided.

    eventTimestamp
    number

    The time the event occurred.

    A Unix timestamp in milliseconds (13 digits in Unixtime).

    If the eventTimestamp is older than 24 hours from the time the event was sent, it will not be processed by the server. Please use a timestamp within 24 hours from the time it was sent.

    user
    object

    User information.

    browser
    object

    Browser Information.

    eventData
    object

    Event information.

    Request
    123456
    curl -X POST 'https://api.airbridge.io/events/v1/apps/{app_name}/web/9320' \
      -H 'Accept-Language: ko' \
      -H 'Content-Type: application/json' \
      -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}' \
      -H 'X-Forwarded-For: 2001:e60:87e3:81d4:cd57:5d52:ee2e:ff8d' \
      -d '{"eventUUID":"9b4b3e4e-2162-4ae6-8986-91ee84644262","user":{"externalUserID":"19443","externalUserEmail":"example@ab180.co","externalUserPhone":"821012341234"},"browser":{"clientID":"05609013-bb5a-4594-bbc3-832cb1b87072","userAgent":"Mozilla/5.0 (iPhone; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E302"},"eventData":{"shortID":"aef04","trackingData":{"channel":"blog"},"goal":{"category":"add-to-cart","action":"shoes","label":"nike","semanticAttributes":{"query":"나이키","productListID":"list-id-1","cartID":"cart-id-1","transactionID":"12939172","inAppPurchased":true,"products":[{"position":"1","productID":"30372425","name":"나이키 커스텀","price":1000,"quantity":"1","currency":"KRW"}]}}}}'
    Payload
    12345678910111213141516171819202122232425262728293031323334353637383940
    {
      "eventUUID": "9b4b3e4e-2162-4ae6-8986-91ee84644262",
      "user": {
        "externalUserID": "19443",
        "externalUserEmail": "example@ab180.co",
        "externalUserPhone": "821012341234"
      },
      "browser": {
        "clientID": "05609013-bb5a-4594-bbc3-832cb1b87072",
        "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E302"
      },
      "eventData": {
        "shortID": "aef04",
        "trackingData": {
          "channel": "blog"
        },
        "goal": {
          "category": "add-to-cart",
          "action": "shoes",
          "label": "nike",
          "semanticAttributes": {
            "query": "나이키",
            "productListID": "list-id-1",
            "cartID": "cart-id-1",
            "transactionID": "12939172",
            "inAppPurchased": true,
            "products": [
              {
                "position": "1",
                "productID": "30372425",
                "name": "나이키 커스텀",
                "price": 1000,
                "quantity": "1",
                "currency": "KRW"
              }
            ]
          }
        }
      }
    }

    Response

    200SUCCESS

    Response
    1234
    {
      "at": "2020-02-06 16:06:49",
      "data": "Event(9320) is successfully proccessed."
    }

    Send In-app Events

    POST

    https://api.airbridge.io/events/v1/apps/{app_name}/mobile-app/9360

    Send In-App events in a server-to-server method.

    Delivery Methods

    1. Sending events based on device ID (device.deviceUUID).

    Use when attribution based on the SDK's Device ID. [Data fetching guide]

    2. Sending events based on User ID (user.externalUserID).

    Use when attribution based on the User ID. Airbridge attributes based on devices that already have a match to user.externalUserID in its internal ID table. When matching using User ID, you do not need to send the Device ID.

    Request

    Headers

    Accept-Language
    string

    You can specify the language to use for API requests and result returns. It follows the ISO-639-1 format.

    Content-Type
    string

    Represents the media type of the resource. Defaults to application/json.

    Authorization
    string

    The key value to use for API requests. You can get it by checking out .

    X-Forwarded-For
    Requiredstring

    You can send the user's IP in the X-Forwarded-For header. Without X-Forwarded-For, user behavior is logged with the IP of the server that requested the Server To Server API, not the user's IP (client request IP).

    We accept values in the form of ipv4 (123.123.123.123), ipv6 (2001:e60:87e3:81d4:cd57:5d52:ee2e:ff8d).

    Path Params

    app_name
    Requiredstring

    Airbridge App Name. (Unique ID)

    Body Params

    eventUUID
    string

    Random UUID v4 string.

    Accepts a random string in UUID4 format.

    The event uuid is used for duplication as a unique ID for the event, and will be generated automatically by the event api if not provided.

    eventTimestamp
    number

    The time the event occurred.

    A Unix timestamp in milliseconds (13 digits in Unixtime).

    If the eventTimestamp is older than 24 hours from the time the event was sent, it will not be processed by the server. Please use a timestamp within 24 hours from the time it was sent.

    user
    object

    User information.

    device
    object

    Device Information.

    app
    Requiredobject

    User app information.

    eventData
    object

    Event information.

    Request
    123456
    curl -X POST 'https://api.airbridge.io/events/v1/apps/{app_name}/mobile-app/9360' \
      -H 'Accept-Language: ko' \
      -H 'Content-Type: application/json' \
      -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}' \
      -H 'X-Forwarded-For: 2001:e60:87e3:81d4:cd57:5d52:ee2e:ff8d' \
      -d '{"eventUUID":"9b4b3e4e-2162-4ae6-8986-91ee84644262","user":{"externalUserID":"19443","externalUserEmail":"example@ab180.co","externalUserPhone":"821012341234"},"device":{"deviceUUID":"2dfca632-86f3-4d22-9746-cdfe7985c471","gaid":"2dfca632-86f3-4d22-9746-cdfe7985c471","ifa":"542177F1-5C23-438B-8088-82D34C94F6D7","ifv":"37EEC3E0-BF15-412E-ADBA-7D2E82E7A75F","deviceModel":"LG-H542","deviceIdentifier":"iPhone11,2","manufacturer":"Samsung","osName":"Android","osVersion":"5.0.2","locale":"ko-KR","timezone":"Asia/Seoul","orientation":"portrait","screen":{"width":123},"location":{"latitude":120.103,"speed":"12"},"network":{"carrier":"SKTelecom","cellular":true,"wifi":true}},"app":{"packageName":"com.ab180.co","version":"1.2.3"},"eventData":{"goal":{"category":"add-to-cart","action":"shoes","label":"nike","semanticAttributes":{"productListID":"list-id-1","cartID":"cart-id-1","transactionID":"12939172","inAppPurchased":true,"products":[{"position":"1","productID":"30372425","name":"나이키 커스텀","price":1000,"quantity":"1","currency":"KRW"}]}}}}'
    Payload
    12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
    {
      "eventUUID": "9b4b3e4e-2162-4ae6-8986-91ee84644262",
      "user": {
        "externalUserID": "19443",
        "externalUserEmail": "example@ab180.co",
        "externalUserPhone": "821012341234"
      },
      "device": {
        "deviceUUID": "2dfca632-86f3-4d22-9746-cdfe7985c471",
        "gaid": "2dfca632-86f3-4d22-9746-cdfe7985c471",
        "ifa": "542177F1-5C23-438B-8088-82D34C94F6D7",
        "ifv": "37EEC3E0-BF15-412E-ADBA-7D2E82E7A75F",
        "deviceModel": "LG-H542",
        "deviceIdentifier": "iPhone11,2",
        "manufacturer": "Samsung",
        "osName": "Android",
        "osVersion": "5.0.2",
        "locale": "ko-KR",
        "timezone": "Asia/Seoul",
        "orientation": "portrait",
        "screen": {
          "width": 123
        },
        "location": {
          "latitude": 120.103,
          "speed": "12"
        },
        "network": {
          "carrier": "SKTelecom",
          "cellular": true,
          "wifi": true
        }
      },
      "app": {
        "packageName": "com.ab180.co",
        "version": "1.2.3"
      },
      "eventData": {
        "goal": {
          "category": "add-to-cart",
          "action": "shoes",
          "label": "nike",
          "semanticAttributes": {
            "productListID": "list-id-1",
            "cartID": "cart-id-1",
            "transactionID": "12939172",
            "inAppPurchased": true,
            "products": [
              {
                "position": "1",
                "productID": "30372425",
                "name": "나이키 커스텀",
                "price": 1000,
                "quantity": "1",
                "currency": "KRW"
              }
            ]
          }
        }
      }
    }

    Response

    200SUCCESS

    Response
    1234
    {
      "at": "2020-02-06 16:06:49",
      "data": "Event(9360) is successfully proccessed."
    }

    Was this page helpful?

    Have any questions or suggestions?