Create Activity

Create Activity

POST https://t.ocmhood.com/v2/activity

Request schema

body
POST https://t.ocmhood.com/v2/activity HTTP/1.1
Host: t.ocmhood.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
{
  "j": {
    "u": {
      "utm_campaign": "fbm_fbl_hotel_es_esla_fb_hh_10730_worldwide_an_bbm4c_19_ml_hh_su1\",\"utm_ht\":\"NTY4PXN0Mg0nHifhqAoxO3u8MjE0Ns3J\",\"utm_source\":\"fbm_fbl_hotel_es_esla_fb_hh_10730_worldwide_an_bbm4c_19_ml_hh_su1",
      "utm_ab": null,
      "utm_hid": null,
      "utm_ht": "NjY4bL90Nma9sTQ2PpoxNDY1MjE0NtoQ"
    },
    "utm": "NTY4UsYjNLBa535aMFAxO3CuMjE0Ng51",
    "code": 205,
    "app": "www.example.info",
    "e": "{\n\"target_name\": \"example-push\"\n\"click_id\": \"1698018801.266686-229217183-82251\"\n\"target_id\": \"229117785\"\n}",
    "ver": "2.1.12",
    "msg": "Notification is not defined",
    "cs": {
      "sid": "1698718403",
      "cid": "1698718403.5448211947",
      "scn": 1,
      "ns": 1
    },
    "ua": {
      "de": "UTF-8",
      "dt": "Click Allow if you are not a robot",
      "sd": 24,
      "sr": "2560x1440",
      "vp": "384x854"
    },
    "dr": "https:\\/\\/example.com\\/",
    "dl": "https:\\/\\/www.example.com\\/test\\/?utm_medium=native&utm_source=test"
  },
  "m": {
    "app": "com.example.app",
    "sdk_version": "20.0.0",
    "u": {
      "utm_campaign": "example-link-tw",
      "utm_ht": "NTY4PXN0Mg0nHnMb1JIxO1jhMjD0Nm-2"
    },
    "utm": "NTY4PXN0Mg0nHuo2bdQxO37xMjE0NrsK",
    "code": 205,
    "os": "android",
    "msg": "failed to delete file: /example/com.ume.browser.euas/test"
  },
  "s": {
    "ip": "167.120.141.101",
    "ref": "https:\\/\\/m.example.co.kr\\/",
    "lang": "en",
    "ori": "https:\\/\\/www.example.com",
    "cou": "MX",
    "osv": 12,
    "version": "1",
    "asn": "8151",
    "city": "3522210",
    "region": "3527115",
    "osmv": "10",
    "bmv": "0"
  }
}
curl -X POST "https://t.ocmhood.com/v2/activity" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"j":{"u":{"utm_campaign":"fbm_fbl_hotel_es_esla_fb_hh_10730_worldwide_an_bbm4c_19_ml_hh_su1\",\"utm_ht\":\"NTY4PXN0Mg0nHifhqAoxO3u8MjE0Ns3J\",\"utm_source\":\"fbm_fbl_hotel_es_esla_fb_hh_10730_worldwide_an_bbm4c_19_ml_hh_su1","utm_ab":null,"utm_hid":null,"utm_ht":"NjY4bL90Nma9sTQ2PpoxNDY1MjE0NtoQ"},"utm":"NTY4UsYjNLBa535aMFAxO3CuMjE0Ng51","code":205,"app":"www.example.info","e":"{\n\"target_name\": \"example-push\"\n\"click_id\": \"1698018801.266686-229217183-82251\"\n\"target_id\": \"229117785\"\n}","ver":"2.1.12","msg":"Notification is not defined","cs":{"sid":"1698718403","cid":"1698718403.5448211947","scn":1,"ns":1},"ua":{"de":"UTF-8","dt":"Click Allow if you are not a robot","sd":24,"sr":"2560x1440","vp":"384x854"},"dr":"https:\\/\\/example.com\\/","dl":"https:\\/\\/www.example.com\\/test\\/?utm_medium=native&utm_source=test"},"m":{"app":"com.example.app","sdk_version":"20.0.0","u":{"utm_campaign":"example-link-tw","utm_ht":"NTY4PXN0Mg0nHnMb1JIxO1jhMjD0Nm-2"},"utm":"NTY4PXN0Mg0nHuo2bdQxO37xMjE0NrsK","code":205,"os":"android","msg":"failed to delete file: /example/com.ume.browser.euas/test"},"s":{"ip":"167.120.141.101","ref":"https:\\/\\/m.example.co.kr\\/","lang":"en","ori":"https:\\/\\/www.example.com","cou":"MX","osv":12,"version":"1","asn":"8151","city":"3522210","region":"3527115","osmv":"10","bmv":"0"}}'
fetch("https://t.ocmhood.com/v2/activity", {
  method: "POST",
  headers: { Authorization: `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify(
    {
      "j": {
        "u": {
          "utm_campaign": "fbm_fbl_hotel_es_esla_fb_hh_10730_worldwide_an_bbm4c_19_ml_hh_su1\",\"utm_ht\":\"NTY4PXN0Mg0nHifhqAoxO3u8MjE0Ns3J\",\"utm_source\":\"fbm_fbl_hotel_es_esla_fb_hh_10730_worldwide_an_bbm4c_19_ml_hh_su1",
          "utm_ab": null,
          "utm_hid": null,
          "utm_ht": "NjY4bL90Nma9sTQ2PpoxNDY1MjE0NtoQ"
        },
        "utm": "NTY4UsYjNLBa535aMFAxO3CuMjE0Ng51",
        "code": 205,
        "app": "www.example.info",
        "e": "{\n\"target_name\": \"example-push\"\n\"click_id\": \"1698018801.266686-229217183-82251\"\n\"target_id\": \"229117785\"\n}",
        "ver": "2.1.12",
        "msg": "Notification is not defined",
        "cs": {
          "sid": "1698718403",
          "cid": "1698718403.5448211947",
          "scn": 1,
          "ns": 1
        },
        "ua": {
          "de": "UTF-8",
          "dt": "Click Allow if you are not a robot",
          "sd": 24,
          "sr": "2560x1440",
          "vp": "384x854"
        },
        "dr": "https:\\/\\/example.com\\/",
        "dl": "https:\\/\\/www.example.com\\/test\\/?utm_medium=native&utm_source=test"
      },
      "m": {
        "app": "com.example.app",
        "sdk_version": "20.0.0",
        "u": {
          "utm_campaign": "example-link-tw",
          "utm_ht": "NTY4PXN0Mg0nHnMb1JIxO1jhMjD0Nm-2"
        },
        "utm": "NTY4PXN0Mg0nHuo2bdQxO37xMjE0NrsK",
        "code": 205,
        "os": "android",
        "msg": "failed to delete file: /example/com.ume.browser.euas/test"
      },
      "s": {
        "ip": "167.120.141.101",
        "ref": "https:\\/\\/m.example.co.kr\\/",
        "lang": "en",
        "ori": "https:\\/\\/www.example.com",
        "cou": "MX",
        "osv": 12,
        "version": "1",
        "asn": "8151",
        "city": "3522210",
        "region": "3527115",
        "osmv": "10",
        "bmv": "0"
      }
    }
  )
}).then(r => r.json());
$ch = curl_init("https://t.ocmhood.com/v2/activity");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer $token",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "j" => [
      "u" => [
        "utm_campaign" => "fbm_fbl_hotel_es_esla_fb_hh_10730_worldwide_an_bbm4c_19_ml_hh_su1\",\"utm_ht\" =>\"NTY4PXN0Mg0nHifhqAoxO3u8MjE0Ns3J\",\"utm_source\" =>\"fbm_fbl_hotel_es_esla_fb_hh_10730_worldwide_an_bbm4c_19_ml_hh_su1",
        "utm_ab" => null,
        "utm_hid" => null,
        "utm_ht" => "NjY4bL90Nma9sTQ2PpoxNDY1MjE0NtoQ"
      ],
      "utm" => "NTY4UsYjNLBa535aMFAxO3CuMjE0Ng51",
      "code" => 205,
      "app" => "www.example.info",
      "e" => "[\n\"target_name\" => \"example-push\"\n\"click_id\" => \"1698018801.266686-229217183-82251\"\n\"target_id\" => \"229117785\"\n]",
      "ver" => "2.1.12",
      "msg" => "Notification is not defined",
      "cs" => [
        "sid" => "1698718403",
        "cid" => "1698718403.5448211947",
        "scn" => 1,
        "ns" => 1
      ],
      "ua" => [
        "de" => "UTF-8",
        "dt" => "Click Allow if you are not a robot",
        "sd" => 24,
        "sr" => "2560x1440",
        "vp" => "384x854"
      ],
      "dr" => "https:\\/\\/example.com\\/",
      "dl" => "https:\\/\\/www.example.com\\/test\\/?utm_medium=native&utm_source=test"
    ],
    "m" => [
      "app" => "com.example.app",
      "sdk_version" => "20.0.0",
      "u" => [
        "utm_campaign" => "example-link-tw",
        "utm_ht" => "NTY4PXN0Mg0nHnMb1JIxO1jhMjD0Nm-2"
      ],
      "utm" => "NTY4PXN0Mg0nHuo2bdQxO37xMjE0NrsK",
      "code" => 205,
      "os" => "android",
      "msg" => "failed to delete file: /example/com.ume.browser.euas/test"
    ],
    "s" => [
      "ip" => "167.120.141.101",
      "ref" => "https:\\/\\/m.example.co.kr\\/",
      "lang" => "en",
      "ori" => "https:\\/\\/www.example.com",
      "cou" => "MX",
      "osv" => 12,
      "version" => "1",
      "asn" => "8151",
      "city" => "3522210",
      "region" => "3527115",
      "osmv" => "10",
      "bmv" => "0"
    ]
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

201 Created

HTTP/1.1 201 Created
Content-Type: application/json
Responses