SAAS saas_sea_plat openapi batch_create - nxtele/nxcloud-doc-en GitHub Wiki

Batch Create Customers

Batch create customers.

  • URL: https://api-hk.nxlink.ai/saas/sea/cdp/openapi/customers/batch_create
  • Method: POST
  • Content-Type: application/json
  • Requires authentication: Yes

Request Parameters

Header Parameters

Parameter Type Required Example Description
accessKey String Yes fme2na3kdi3ki User identity key
ts String Yes 1655710885431 Timestamp in milliseconds. Max allowed time drift is 60 seconds.
bizType String Yes 2 WhatsApp business type, fixed value "2"
action String Yes mt WhatsApp action, fixed value "mt"
sign String Yes 6e9506557d1f289501d333ee2c365826 Signature, see common auth rules

Body Parameters

Parameter Type Required Example Description
type integer Yes 1 0: drop old data, use new; 1: update/add based on old; 2: keep old, drop new
tenant_id integer Yes 123 Tenant ID
app_key string Yes 46oKF=os App key
customers array Yes customers Batch customers, max 100 per request

Message Types

  • customers parameters:
Parameter Type Required Example Description
first_name String Yes - First name, max 128 chars
last_name String Yes - Last name, max 128 chars
sms_phone String No - SMS phone, max 30 chars
whats_app_phone String No - WhatsApp phone, max 30 chars
country String No - Country, max 50 chars
email String No - Email, max 50 chars
address String No - Address, max 100 chars
birthday String No - Birthday, format yyyy-MM-dd
tagStr String No - Tags
remark String No - Remark, max 100 chars
time_zone String No - Time zone
gender integer No - Gender, 1 male, 0 female
customize_field String No - Custom fields JSON
belong_seat_user String No - Assigned seat, max 128 chars

Request Example

Batch Request Example

body (application/json) parameters:

{
    "type": 0,
    "tenant_id": 144,
    "customers": [
        {
            "first_name": "Zhang",
            "last_name": "San",
            "sms_phone": "18163725558",
            "whats_app_phone": "18667728886",
            "country": "China",
            "email": "[email protected]",
            "address": "Guizhou, Weihai, Dongpo",
            "birthday": "1976-04-12",
            "source": "voluptate Excepteur",
            "remark": "nisi amet",
            "tagStr": "test,99",
            "time_zone": "GMT+8",
            "gender": 0,
            "customize_field": "{\"customize_1_14\": \"aa\"}"
        },
        {
            "first_name": "Li",
            "last_name": "Si",
            "sms_phone": "18135539411",
            "whats_app_phone": "18178516529",
            "country": "China",
            "email": "[email protected]",
            "address": "Fujian, Taian, Wujin",
            "birthday": "2015-08-19",
            "source": "aliquip laboris dolore",
            "remark": "ut",
            "time_zone": "GMT+8",
            "tagStr": "88,99",
            "gender": 1
        }
    ]
}

Response Parameters

Parameter Type Description
code Integer Result code
data JsonObject Result data
message String Message
traceId String Trace ID

Response Example

Success Example

{
    "code": 0,
    "message": "",
    "data": "",
    "traceId": "56bf81643292cd6a89ecde64ae00db13"
}