Plan a template
curl --request POST \
--url https://api.getlurk.com/v1/templates/{id}/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"settings": {}
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({settings: {}})
};
fetch('https://api.getlurk.com/v1/templates/{id}/plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getlurk.com/v1/templates/{id}/plan"
payload = { "settings": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"template": "<string>",
"units": [
{
"key": "<string>",
"name": "<string>",
"exists": true
}
],
"rules": [
{
"key": "<string>",
"name": "<string>",
"exists": true,
"conflict": true
}
],
"views": [
{
"key": "<string>",
"name": "<string>",
"exists": true
}
],
"test_week": {
"users": 1,
"events": 1,
"receipts": 1,
"given": [
{
"unit": "<string>",
"amount": 123
}
],
"skipped": 1
},
"notes": [
"<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>"
}
}Templates
Plan a template
What adding a template with these settings would do, and a test week: a fixed, made-up week of visits, orders and sign-ups run through the real engine against the template’s own rules. Nothing is written. Say what already exists (it is reused, not added again) and what to check.
POST
/
v1
/
templates
/
{id}
/
plan
Plan a template
curl --request POST \
--url https://api.getlurk.com/v1/templates/{id}/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"settings": {}
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({settings: {}})
};
fetch('https://api.getlurk.com/v1/templates/{id}/plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getlurk.com/v1/templates/{id}/plan"
payload = { "settings": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"template": "<string>",
"units": [
{
"key": "<string>",
"name": "<string>",
"exists": true
}
],
"rules": [
{
"key": "<string>",
"name": "<string>",
"exists": true,
"conflict": true
}
],
"views": [
{
"key": "<string>",
"name": "<string>",
"exists": true
}
],
"test_week": {
"users": 1,
"events": 1,
"receipts": 1,
"given": [
{
"unit": "<string>",
"amount": 123
}
],
"skipped": 1
},
"notes": [
"<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
Body
application/json
Response
Plan a template