Create Members Import Request
Pending
POST
https://api.mpc.dev.placewise.com/v3/{loyalty_club_slug}/members/imports
API Permit:BL:Api:Members:Imports:Create
API Context:Loyalty Club
Authorizations:Token
msisdn
and e-mail
identifiers).that, you may want to identify all bulks with the same
import_id
and pass consequent request_number
to each of them.Body Parameters
Parameter | Required? | Default | Description | Type |
---|---|---|---|---|
import_id | no | auto-generated | When you're making more than one call you can consider adding it. Otherwise it will be auto-generated | String |
request_number | no | - | A number that you can use for bulk identification in "Status" endpoint. It's up to you to provide it's uniqueness. Useless without specifying import_id | Integer |
members | yes | - | Array with members payloads - See below | object[] |
operation | no | "create" | Should members be created or updated | enum: ['create', 'update'] |
member_identifier_type | no | "id" | (for "update" operation) Which member property should be used to identify member for update | enum: ['id', 'email', 'msisdn'] |
multi_values_update_mode | no | "replace" | (for "update" operation) When "append" is given, multi-value member attributes (like arrays) are appended to existing ones. In other case, they're replaced | enum: ['update', 'append'] |
Members Array
msisdn
or email
)Key | Required? | Default | Description | Type |
---|---|---|---|---|
properties | yes | - | JSON with properties for member (see: Member model | JSON Object |
properties['msisdn'] | yes* | none | Unique member's msisdn as defined here) Example: 4740769126 . | string |
properties['email'] | yes* | none | Member's email | string |
password | no | null | Member’s password. Not required, but user may not be able to log in without this | String |
sms_enabled | no | true | Should SMS channel be enabled for member? | Boolean |
email_enabled | no | true | Should email channel be enabled for member? | Boolean |
push_enabled | no | true | Should push channel be enabled for member? | Boolean |
optin_channel | no | "import"** | Source of member | String |
optin_subchannel | no | import's id** | Subsource of member | String |
consents | no | {} | Members consents | See Member's consents JSON model |
Response Body
Key | Description | Type |
---|---|---|
import_id | Identifier for import status checking (either provided by you or auto-generated) | String |
Error Responses
Status | Reason | Description |
---|---|---|
422 | Invalid payload | Returns error object - see below |
Invalid Payload Error (JSON object)
{"error" => <reason>}
Code | Description |
---|---|
duplicated_emails | At least two members in payload share same email |
duplicated_msisdns | At least two members in payload share same msisdn |
members_size_incorrect | Members number in payload exceeds maximum (1000) |
members_empty | Payload is empty |
missing_identifier | At least one member in payload misses required identifier (depends on Loyalty Club) |
invalid_operation | Specified operation is not supported |
invalid_member_identifier_type | Specified identifier type is invalid or unavailable in Loyalty Club |
Example
{
"import_id": "a9a00143-6488-4d4f-87d4-29c2da02d678"
}
{
"error": "duplicated_msisdns"
}
Request
Path Params
loyalty_club_slug
stringÂ
required
Example:
infinity-mall
Header Params
X-Loyalty-Club-Slug
stringÂ
required
Default:
{{LOYALTY_CLUB_SLUG}}
X-Client-Authorization
stringÂ
optional
Default:
{{API_TOKEN}}
Request samples
Responses
Modified at 2024-05-07 15:48:35