Add to member list
1 min
POST
https://api.b.preview.loyaltyservices.io/api/v4/members/{memberIdentifier}/lists/{memberListCode}
Path Parameters
- memberIdentifierstringrequiredDescriptionMin Length1Max Length200
- memberListCodestringrequiredDescriptionMin Length1Max Length100
Query Parameters
- asyncbooleanDescriptionDefaultfalse
Body Parameters
- bodyListMemberRequestDescription
- startDatestring<date>ExampleDescriptionFormatdate
- endDatestring<date>ExampleDescriptionFormatdate
Responses
200
- ListMemberDescription
- memberIdentifierstringDescription
- startDatestring<date>ExampleDescriptionFormatdate
- endDatestring<date>ExampleDescriptionFormatdate
- memberListMemberListDescription
- memberListIdinteger<int64>DescriptionFormatint64
- codestringDescription
- namestringDescription
- descriptionstringDescription
- statusCodestringDescription
- typeCodestringDescription
- memberNamestringExampleDescription
- memberSegmentStatusstring<Active | Inactive>ExampleDescriptionAllowedActiveInactive
202
- AsyncTask
- asyncTaskIdinteger<int64>Formatint64
- taskTypeCodestringExampleDescription
- taskCodestringExampleDescription
- requestDatestring<date-time>DescriptionFormatdate-time
- requestDataobjectDescription
- statusCodestringDescription
- responseDatestring<date-time>DescriptionFormatdate-time
- responseDataobjectDescription
- fileNamestringDescription
- lineNumberintegerDescription
- fileDatastringDescription
400
- ErrorResponse
- errorsValidationError[]Description
- codestringDescription
- fieldNamestringDescription
- messagestringDescription
- messageParametersobject[]Description
401
403
500
curl
curl --request POST \
--url 'https://api.b.preview.loyaltyservices.io/api/v4/members/{memberIdentifier}/lists/{memberListCode}?async=boolean' \
--header 'accept: application/json'ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.b.preview.loyaltyservices.io/api/v4/members/{memberIdentifier}/lists/{memberListCode}?async=boolean")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.b.preview.loyaltyservices.io/api/v4/members/{memberIdentifier}/lists/{memberListCode}?async=boolean"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.b.preview.loyaltyservices.io/api/v4/members/{memberIdentifier}/lists/{memberListCode}?async=boolean")
.method("POST", body)
.addHeader("accept", "application/json")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();200
// Success
{
"memberIdentifier": "",
"startDate": "2020-04-06",
"endDate": "2026-04-02",
"memberList": {
"memberListId": "",
"code": "",
"name": "",
"description": "",
"statusCode": "",
"typeCode": ""
},
"memberName": "John Doe",
"memberSegmentStatus": "Active"
}202
// Accepted
{
"asyncTaskId": "",
"taskTypeCode": "PlatformAPI",
"taskCode": "enrollMember",
"requestDate": "",
"requestData": {},
"statusCode": "",
"responseDate": "",
"responseData": {},
"fileName": "",
"lineNumber": 0,
"fileData": ""
}400
// Bad request
{
"errors": [
{
"code": "",
"fieldName": "",
"message": "",
"messageParameters": [
{}
]
}
]
}401
// Unauthorized
403
// Forbidden
500
// Internal error