API 가이드
User GuideDeveloper GuideAPI Guide🏠
English
English
  • Get started
  • API
    • Import API
      • Event
        • POST: Loading an event
      • Identity
        • POST: Create and update a unified profile
      • Profile
        • Get started
        • POST: Create and update user properties
      • Detailed response
    • Export API
      • Export
        • POST: Extracting an event
        • POST: Extract user profile
      • Detailed response
  • Data Type
  • Certification
  • Request Limit
  • Best Practices
Powered by GitBook
On this page
  • Query Parameters
  • Header
  • Request Body
  • Common
  • Identity
  • Events
  • Event_items
  • Event_properties
  • Example request
  • Example response
  • Normal response
Export as PDF
  1. API
  2. Import API
  3. Event

POST: Loading an event

PreviousEventNextIdentity

Last updated 3 months ago

POST /api/v1/events

You can load one or more events at once via the event loading API. The events you want to load must have been registered in advance in the console.

You can load up to 100 events in one request. Also, you can load up to 100 event items in one request.

If you need to load many events, it is better to collect multiple events and call the event loading API at once rather than calling the event loading API individually, in terms of speed and request limits. should always be considered when linking.

Query Parameters

Name
Whether required
Type
Explanation

service_id

Essential

String

Service ID

Header

Field name
Whether Required
Type
Value
Explanation

Content-Type

Essential

String

application/json

-

access_token

Essential

String

your-api-token-key

API Authentication Token

Request Body

Field Name
Whether Required
Type
Explanation
Essential

Object

Common properties for event loading

Essential

Array of Object

Event Information

Common

Field Name
Whether Required
Type
Explanation
Essential

Object

User identifier

Identity

User identifier information. You must enter a value in at least one of the fields below.

Field Name
Whether Required
Type
Explanation

external_id

Select

String

External ID

phone_no

Select

String

Phone Number

email

Select

String

Email

kakao_user_id

Select

String

Kakao ID

line_user_id

Select

String

Line ID

Events

Field Name
Whether required
Type
Explanation

event_log_id

Essential

String

Event Identification ID, UUID Format, xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx

event_name

Essential

String

Event name

event_datetime

Essential

Datetime

Event occurrence time

Select

Array of Object

Product Information

Select

Object

Event properties

Event_items

This is an event item attribute. The field name should be the sub-attribute name of the item pre-registered in the console (df_item), and the value should be the value of the corresponding attribute. Up to 100 event items can be loaded at a time.

Field Name
Whether Required
Type
Explanation

${your-df-item-property-key}

Select

String, Long, Double, Boolean, Datetime, Array

Pre-registered event item attribute information

Event_properties

This is an event attribute. The field name must be the attribute name of an event attribute pre-registered in the console, excluding items ( df_item), and the value must be the value of the attribute.

Name
Whether required
Type
Explanation

${your-event-property-key}

Select

String, Long, Double, Boolean, Datetime, Array

Pre-registered event attribute information

Example request

curl -L \
  -X POST \
  -H 'access_token: ${your-import-api-token}' \
  -H 'Content-Type: application/json' \
  'https://openapi.dfinery.ai/api/v1/events?service_id=${your-service-id}' \
  -d '{
  "common": {
    "identity": {
      "external_id": "dfn-user-123",
      "email": "dfn@gmail.com"
    }
  },
  "events": [
    {
      "event_log_id": "b0c9cf18-f3c0-4879-bb2e-92c65858dabc",
      "event_name": "df_login",
      "event_datetime": "2024-06-24T06:01:48.501Z",
      "event_properties": null,
      "event_items": null
    },
    {
      "event_log_id": "464bc021-9c56-481e-8ee8-3bf06de7c418",
      "event_name": "df_purchase",
      "event_datetime": "2024-06-24T06:42:25.394Z",
      "event_properties": {
        "df_order_id": "dwtfmoe",
        "df_delivery_charge": 1000,
        "df_payment_method": "card",
        "df_total_purchase_amount": 4000
      },
      "event_items": [
        {
          "df_item_id": "1",
          "df_item_name": "item1",
          "df_price": 3000,
          "df_quantity": 1,
          "df_discount": 0
        }
      ]
    }
  ]
}'

Example response

Normal response

Content-Type: application/json
access_token: ${your-api-token}
{
  "status": true,
  "code": "20000",
  "message": "OK",
  "data": true
}

Failure response

40402 TOO_MANY_EVENTS

When the number of events exceeds 100 or the number of event items exceeds 100.

Content-Type: application/json
access_token: ${your-api-token}
{
  "status": false,
  "code": "40402",
  "message": "TOO_MANY_EVENTS",
  "data": true
}

This is the event information. The event you want to load must be pre-registered in the console. For more information about standard events and event properties, see

Please refer to for more details .

Request limits
Designing Event Taxonomies in the User Guide.
the detailed response
common
events
identity
event_items
event_properties