Merge one person into another
curl --request POST \
--url https://api.getlurk.com/v1/users/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"from": "guest-4417",
"into": "ben@example.com"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({from: 'guest-4417', into: 'ben@example.com'})
};
fetch('https://api.getlurk.com/v1/users/merge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getlurk.com/v1/users/merge"
payload = {
"from": "guest-4417",
"into": "ben@example.com"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"from": {
"id": "usr_01m6es2t9refr8kfbt871ed180",
"external_id": "guest-4417"
},
"into": {
"id": "usr_01m40d9ax0e2vrtmq9mk0z6t00",
"external_id": "ben@example.com"
},
"moved": [
{
"unit": "points",
"amount": 40,
"transfer": "act_01m6r6has0ex5r3jf0tphf71gg",
"receipt": "act_01m6r6has0fsg8temb2z29abr0"
}
]
}{
"error": {
"status": 403,
"code": "approval_required",
"message": "This needs a person: an owner or admin approves it in Lurk.",
"next_step": "A person has to approve this in the dashboard (an owner or admin). Do not retry and do not try to get around it: ask them.",
"request_id": "req_9f3b1c7ae2d84c0b8a56e1d07f42c9ab",
"doc_url": "https://docs.getlurk.com/errors#approval_required"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}People
Merge one person into another
Merges from into into: what from holds moves to into as receipts, and from’s later events count for into. Needs an owner or admin in person; keys and agents get approval_required. Looking up from afterwards returns not_found. Merging
POST
/
v1
/
users
/
merge
Merge one person into another
curl --request POST \
--url https://api.getlurk.com/v1/users/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"from": "guest-4417",
"into": "ben@example.com"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({from: 'guest-4417', into: 'ben@example.com'})
};
fetch('https://api.getlurk.com/v1/users/merge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getlurk.com/v1/users/merge"
payload = {
"from": "guest-4417",
"into": "ben@example.com"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"from": {
"id": "usr_01m6es2t9refr8kfbt871ed180",
"external_id": "guest-4417"
},
"into": {
"id": "usr_01m40d9ax0e2vrtmq9mk0z6t00",
"external_id": "ben@example.com"
},
"moved": [
{
"unit": "points",
"amount": 40,
"transfer": "act_01m6r6has0ex5r3jf0tphf71gg",
"receipt": "act_01m6r6has0fsg8temb2z29abr0"
}
]
}{
"error": {
"status": 403,
"code": "approval_required",
"message": "This needs a person: an owner or admin approves it in Lurk.",
"next_step": "A person has to approve this in the dashboard (an owner or admin). Do not retry and do not try to get around it: ask them.",
"request_id": "req_9f3b1c7ae2d84c0b8a56e1d07f42c9ab",
"doc_url": "https://docs.getlurk.com/errors#approval_required"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}Authorizations
Headers
Body
application/json
Response
Merge one person into another