v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Add Customer

Lets you register customers in the org’s loyalty program or just register their identifiers across sources such as InStore, Facebook,Webengage, WeChat, Martjack, TMall, Taobao, JD, ecommerce, Line, Website, and Mobile app. You can also add customer-level extended and custom field details.

You can also issue loyalty card to the customer using this API.

post/customers

Query parameters

rawSideEffectsboolean

Pass true to get complete details of incentives such as awardOn, expiryDate, strategyIds and so on. See rawSideEffects in response for more details.

mlp_single_enrollboolean

Pass true to enroll a customer in all the loyalty programs available for the org. Pass false to enroll in a specific program or the default program of the till.

source'INSTORE' | 'FACEBOOK' | 'WEB_ENGAGE' | 'WECHAT' | 'MARTJACK' | 'TMALL' | 'TAOBAO' | 'JD' | 'ECOMMERCE' | 'WEBSITE'

Source in which the customer needs to be added.

accountIdstring

Specific account ID of the source. Required for sources with multiple accounts.

Headers

X-CAP-API-OAUTH-TOKENstring
WAIT_FOR_DOWNSTREAMboolean

Pass true to wait for the loyalty activities to complete and then respond to the client with side effects in the API response; pass false to run Loyalty activities in the background. No side effects are returned in the API response.

X-CAP-DIRECT-REPLAYboolean

Pass true to add the customer but enable loyalty events to be executed at a later point of time. The events will be pushed to queue and will be executed in near real-time.

USER-CONTEXT-ENTITY-TYPEstring

If required, add entity information of the user who is adding or updating this info.

USER-CONTEXT-ENTITY-IDstring

Enter user ID

USER-CONTEXT-ENTITY-SOURCEstring

Enter user source.

USER-CONTEXT-ENTITY-SOURCE-IDstring

Enter user source ID.

Request body

RAW_BODYstring json

Response

200

createdIdinteger

Example response

{
  "createdId": 130713699,
  "sideEffects": [
    {
      "awardedPoints": 100,
      "type": "points"
    }
  ]
}