Advertisement

You can retrieve promotions to advertise your services and manage end user’s behavior by reporting advertisement events.

Objects

Advertisement object

Attribute Description
walletId Unique identifier for your account.
serviceId Unique identifier for the advertisement service.
adId Unique identifier for the advertisement. Only currently published valid advertisement is returned.
clickActionTypeCd An enumerated value providing type of action to be occurred when the end user clicks the advertisement image in the application. Possible values are · DONOTHING : No action occurred · OPENURL: Open the URL in adLink in the browser · PHONECALL: Make a phone call to the phone number in adLink · SENDTEXT: Send text massage to the phone number in adLink.
adLink URL or Phone number referred by clkckActionTypeCd when the end user clicks the advertisement
imageDisplayTypeCd An enumerated value providing type of image to be displayed in end user’s mobile device. Possible values are FULLPAGE, and BANNER. The value FULLPAGE indicates the image displayed in the full screen of mobile device. The value BANNER indicates the image displayed as the banner form in the screen.
updDtim Last updated date and time of the advertisement. You should cache the value and compare it with the latest value from the server to determine if you need to refresh the advertisement data. If value remains same, no need to retrieve advertisement data.
Format is yyyy-MM-dd’T’HH:mm:ss.SZ
e.g. “2019-02-08T14:23:35.443-0500”
yyyy: Year, e.g. 1996 <br>MM: Month in year, e.g. 07
dd: day in month, e.g. 10
HH:hour in day(0-23), e.g.0
mm:Minute in hour, e.g. 30
ss: Second in minute, e.g. 50
S: Millisecond in the minute, e.g. 443
Z: Timezone offset in hours(RFC 822 pattern), e.g. -0800
imageInfoList A list of images associated with this Advertisement.
Child Attributes
Attribute Description
imageSize Full screen supports the following sizes.
• 640*960: Return value is F_PX_640X960.
• 640*1136: Return value is F_PX_640X1136.
• 720 * 1280: Return value is F_PX_720X1280.

Banner supports the following sizes.
• 640*100: Return value is B_PX_640X100.
• 720 * 100: Return value is B_PX_720X100.
imageUrl URL to download the image

APIs

Retrieve advertisement detail

Retrieves published advertisement and its detail information to display the advertisement to end users.

Precondition

Client logged in the service. Refer the section for registration/authentication.

Request

HTTP Method / URL
POST / http://api-dev.fintiv.co:8080/ad/{version}/getAd

Body parameters

Parameters Type Required Note
imageDisplayTypeCd String Optional An enumerated value providing type of image to be displayed in end user’s mobile device. Possible values are FULLPAGE, and BANNER. The value FULLPAGE indicates the image displayed in the full screen of mobile device. The value BANNER indicates the image displayed as the banner form in the screen.

Example request

curl -X POST "http://api-dev.fintiv.co:8080/ad/v2/getAd"
-H "accept: application/json;charset=UTF-8"
-H "api-key: <insert your APP Key here>"
-H "authorization: Bearer <insert your bearer token here>"
-H "Content-Type: application/json"
-d
‘{
                "imageDisplayTypeCd": "BANNER"
}’

Response

Returns advertisement object.
Example response

{
  "result": {
    "code": 0
  },
  "walletId": "JANUS",
  "adId": "FBDEA99C2F464C0BB9A78B766E43B95C",
  "adLink": "https://google.com",
  "clickActionTypeCd": "OPENURL",
  "imageDisplayTypeCd": "BANNER",
  "imageInfoList": [
    {
      "imageUrl": "http://api-dev.fintiv.co:8080/image/advrt/FBDEA99C2F464C0BB9A78B766E43B95C_B_PX_720X100.png",
      "imageSize": "B_PX_720X100"
    },
    {
      "imageUrl": "http://api-dev.fintiv.co:8080/image/advrt/FBDEA99C2F464C0BB9A78B766E43B95C_B_PX_640X100.png",
      "imageSize": "B_PX_640X100"
    }
  ],
  "updDtim": "2018-12-14T02:43:54.000+0000"
}


Report the user action when the link of advertisement is clicked

Store end user’s activity with the advertisement in the server when the user clicks the link of advertisement.

Precondition

Client logged in the service. Refer the section for registration/authentication.

Request

HTTP Method / URL
POST / http://api-dev.fintiv.co:8080/ad/{version}/reportAdClick

Body parameters

Parameters Type Required Note
adId String Required Unique identifier for the advertisement.
clickDtim Date Required Date and time the end user clicked the link of the advertisement.
Format is yyyy-MM-dd’T’HH:mm:ss.SZ
e.g. “2019-02-08T14:23:35.443-0500”
yyyy: Year, e.g. 1996 <br>MM: Month in year, e.g. 07
dd: day in month, e.g. 10
HH:hour in day(0-23), e.g.0
mm:Minute in hour, e.g. 30
ss: Second in minute, e.g. 50
S: Millisecond in the minute, e.g. 443
Z: Timezone offset in hours(RFC 822 pattern), e.g. -0800

Example request

curl -X POST "http://api-dev.fintiv.co:8080/ad/v2/reportAdClick"
-H "accept: application/json;charset=UTF-8"
-H "api-key: <insert your APP Key here>"
-H "authorization: Bearer <insert your bearer token here>"
-H "Content-Type: application/json"
-d
‘{
        "adId": "FBDEA99C2F464C0BB9A78B766E43B95C",
        "clickDtim": "2018-02-11T12:56:28.000-0500\"
}’

Response

Returns result of the request.

Example response

{
  "result": {
    "code": 0
  }
}

Report the user action when the end user views the advertisement

Store end user’s activity with the advertisement in the server when the user views the advertisement.

Precondition

Client logged in the service. Refer the section for registration/authentication.

Request

HTTP Method / URL
POST / http://api-dev.fintiv.co:8080/ad/{version}/reportAdView

Body parameters

Parameters Type Required Note
adId String Required Unique identifier for the advertisement.
viewDtim Date Required Date and time the end user clicked the link of the advertisement.
Format is yyyy-MM-dd’T’HH:mm:ss.SZ
e.g. “2019-02-08T14:23:35.443-0500”
yyyy: Year, e.g. 1996 <br>MM: Month in year, e.g. 07
dd: day in month, e.g. 10
HH:hour in day(0-23), e.g.0
mm:Minute in hour, e.g. 30
ss: Second in minute, e.g. 50
S: Millisecond in the minute, e.g. 443
Z: Timezone offset in hours(RFC 822 pattern), e.g. -0800

Example request

curl -X POST "http://api-dev.fintiv.co:8080/ad/v2/reportAdView"
-H "accept: application/json;charset=UTF-8"
-H "api-key: <insert your APP Key here>"
-H "authorization: Bearer <insert your bearer token here>"
-H "Content-Type: application/json"
-d
‘{
            "adId": "FBDEA99C2F464C0BB9A78B766E43B95C",
            "serviceId": 10516,
            "viewDtim": "2018-02-11T12:56:28.000-0500"
}’

Response

Returns result of the request.
Example response

{
  "result": {
    "code": 0
  }
}