# \[#1375\] API issues

**URL:** https://tech-support.simplybook.me/t/1375-api-issues/1375
**Category:** Bug Reports
**Tags:** migrated, redmine-1375
**Created:** [February 21, 2025, 3:01pm UTC](https://tech-support.simplybook.me/t/1375-api-issues/1375 "2025-02-21T15:01:32Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [February 21, 2025, 3:01pm UTC](https://tech-support.simplybook.me/t/1375-api-issues/1375/1 "2025-02-21T15:01:32Z")

</div>

**Migrated from Redmine #1375** | _Author: huang Huang_  
_Status: New | Priority: Low, I can wait | Created: 2025-02-21_

* * *

async function handleBooking(request, env) {  
const { method, headers } = request;  
if (method !== “POST”) {  
return new Response(“\u4E0D\u652F\u63F4\u7684\u8ACB\u6C42\u65B9\u6CD5”, { status: 405 });  
}  
const signature = headers.get(“x-signature”);  
if (!signature) {  
console.warn(“\u7F3A\u5C11\u7C3D\u540D”);  
return new Response(“\u7F3A\u5C11\u7C3D\u540D”, { status: 400 });  
}  
const body = await request.text();  
console.log(“\u8ACB\u6C42\u4E3B\u9AD4:”, body);  
const isValid = await verifySignature(body, signature, env.SHARED\_SECRET);  
console.log(`\u7C3D\u540D\u9A57\u8B49\u7D50\u679C: ${isValid}`);  
if (!isValid) {  
console.warn(“\u7121\u6548\u7684\u7C3D\u540D”);  
return new Response(“\u7121\u6548\u7684\u7C3D\u540D”, { status: 403 });  
}  
try {  
const data = JSON.parse(body);  
const bookingId = data.booking\_id;  
if (!bookingId) {  
console.warn(“\u7F3A\u5C11 booking\_id”);  
return new Response(“\u7F3A\u5C11 booking\_id”, { status: 400 });  
}  
const bookingDetails = await fetchBookingDetails(bookingId, env);  
if (!bookingDetails) {  
console.error(“\u7372\u53D6\u9810\u7D04\u8A73\u60C5\u5931\u6557”);  
return new Response(“\u7372\u53D6\u9810\u7D04\u8A73\u60C5\u5931\u6557”, { status: 500 });  
}  
console.log(“\u9810\u7D04\u8A73\u60C5\uFF1A”, bookingDetails);  
await saveBookingDetails(bookingDetails, env.db);  
return new Response(“\u9810\u7D04\u8A73\u60C5\u5DF2\u7372\u53D6\u4E26\u8655\u7406”, { status: 200 });  
} catch (error) {  
console.error(“\u89E3\u6790 JSON \u6642\u767C\u751F\u932F\u8AA4\uFF1A”, error);  
return new Response(“\u7121\u6548\u7684 JSON \u683C\u5F0F”, { status: 400 });  
}  
}  
async function verifySignature(body, signature, secret) {  
const encoder = new TextEncoder();  
const keyData = encoder.encode(secret);  
const bodyData = encoder.encode(body);  
const cryptoKey = await crypto.subtle.importKey(  
“raw”,  
keyData,  
{ name: “HMAC”, hash: “SHA-256” },  
false,  
[“sign”]  
);  
const signatureArrayBuffer = await crypto.subtle.sign(“HMAC”, cryptoKey, bodyData);  
const computedSignature = bufferToHex(signatureArrayBuffer);  
console.log(“\u8A08\u7B97\u51FA\u7684\u7C3D\u540D:”, computedSignature);  
console.log(“\u63A5\u6536\u5230\u7684\u7C3D\u540D:”, signature);  
return computedSignature.toLowerCase() === signature.toLowerCase();  
}  
function bufferToHex(buffer) {  
return Array.from(new Uint8Array(buffer)).map((b) =\> b.toString(16).padStart(2, “0”)).join(“”);  
}  
async function fetchBookingDetails(bookingId, env) {  
const apiUrl = “[https://user-api.simplybook.me/admin](https://user-api.simplybook.me/admin)”;  
const loginUrl = “[https://user-api.simplybook.me/login](https://user-api.simplybook.me/login)”;  
const userTokenPayload = {  
jsonrpc: “2.0”,  
method: “getUserToken”,  
params: {  
companyLogin: env.COMPANY\_LOGIN,  
userLogin: env.USER\_LOGIN,  
userPassword: env.USER\_PASSWORD  
},  
id: 1  
};  
try {  
const tokenResponse = await fetch(loginUrl, {  
method: “POST”,  
headers: { “Content-Type”: “application/json” },  
body: JSON.stringify(userTokenPayload)  
});  
const tokenData = await tokenResponse.json();  
const userToken = tokenData.result;  
if (!userToken) {  
console.error(“\u7372\u53D6\u7528\u6236\u4EE4\u724C\u5931\u6557\uFF1A”, tokenData);  
return null;  
}  
console.log(“\u7372\u53D6\u7684\u7528\u6236\u4EE4\u724C\uFF1A”, userToken);  
const bookingDetailsPayload = {  
jsonrpc: “2.0”,  
method: “getBookingDetails”,  
params: {  
id: bookingId  
},  
id: 2  
};  
const response = await fetch(apiUrl, {  
method: “POST”,  
headers: {  
“Content-Type”: “application/json”,  
“X-Company-Login”: env.COMPANY\_LOGIN,  
“X-User-Token”: userToken  
},  
body: JSON.stringify(bookingDetailsPayload)  
});  
if (!response.ok) {  
console.error(“\u7372\u53D6\u9810\u7D04\u8A73\u60C5\u5931\u6557\uFF1A”, response.statusText);  
return null;  
}  
const responseData = await response.json();  
console.log(“\u7372\u53D6\u7684\u9810\u7D04\u8A73\u60C5\uFF1A”, responseData.result);  
return responseData.result;  
} catch (error) {  
console.error(“\u7372\u53D6\u9810\u7D04\u8A73\u60C5\u6642\u767C\u751F\u932F\u8AA4\uFF1A”, error);  
return null;  
}  
}

The above is the code I wrote. Every time I get the Webhook of simplybook, I use the obtained bookid to call the API to get the reservation information. There was no error for a year, but I have been refused to get the information in the past month. Is there a problem, such as frequent acquisition of tokens or the API exceeds the daily limit of 5,000? But I have confirmed that our reservation volume should not exceed 5,000.

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [February 21, 2025, 3:04pm UTC](https://tech-support.simplybook.me/t/1375-api-issues/1375/2 "2025-02-21T15:04:52Z")

</div>

**Redmine Admin** wrote:

hi, could you please provide the first request which gives you the error?

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [February 21, 2025, 3:07pm UTC](https://tech-support.simplybook.me/t/1375-api-issues/1375/3 "2025-02-21T15:07:28Z")

</div>

**huang Huang** wrote:

{  
“truncated”: false,  
“executionModel”: “stateless”,  
“outcome”: “canceled”,  
“scriptVersion”: {  
“id”: “7e76a9ab-35a0-4ce2-8d80-273ec8483262”  
},  
“scriptName”: “taihevllageauto”,  
“diagnosticsChannelEvents”: ,  
“exceptions”: ,  
“logs”: [  
{  
“message”: [  
“Received request from User-Agent: [simplybook.me](http://simplybook.me) API”  
],  
“level”: “log”,  
“timestamp”: 1740150375898  
},  
{  
“message”: [  
“User-Agent verified. Processing booking…”  
],  
“level”: “log”,  
“timestamp”: 1740150375898  
},  
{  
“message”: [  
“請求主體:”,  
“{"booking\_id":"75364","booking\_hash":"b70eb310db7843685daaddb983b47a59","company":"taihevillage","notification\_type":"change","webhook\_timestamp":1740150375,"signature\_algo":"sha256"}”  
],  
“level”: “log”,  
“timestamp”: 1740150375898  
},  
{  
“message”: [  
“計算出的簽名:”,  
“3f52e9aca497fd6c5dfe6a03542530c966781aad646c886e996f101ad5036c5e”  
],  
“level”: “log”,  
“timestamp”: 1740150375898  
},  
{  
“message”: [  
“接收到的簽名:”,  
“3f52e9aca497fd6c5dfe6a03542530c966781aad646c886e996f101ad5036c5e”  
],  
“level”: “log”,  
“timestamp”: 1740150375898  
},  
{  
“message”: [  
“簽名驗證結果: true”  
],  
“level”: “log”,  
“timestamp”: 1740150375898  
},  
{  
“message”: [  
“獲取的用戶令牌：”,  
“f0bf671a059d0f2344ce8be04fc0f0439609ed5543ac6c94cd08b3f09002dddc”  
],  
“level”: “log”,  
“timestamp”: 1740150378730  
}  
],  
“eventTimestamp”: 1740150375898,  
“event”: {  
“request”: {  
“url”: “[https://taihevllageauto.zas125314055.workers.dev/](https://taihevllageauto.zas125314055.workers.dev/)”,  
“method”: “POST”,  
“headers”: {  
“accept-encoding”: “gzip, br”,  
“cf-connecting-ip”: “2402:1f00:8001:2194::”,  
“cf-ipcountry”: “SG”,  
“cf-ray”: “9157a3a95c9a2ebc”,  
“cf-visitor”: “{"scheme":"https"}”,  
“connection”: “Keep-Alive”,  
“content-length”: “183”,  
“content-type”: “application/json”,  
“host”: “taihevllageauto.zas125314055.workers.dev”,  
“user-agent”: “[simplybook.me](http://simplybook.me) API”,  
“x-forwarded-proto”: “https”,  
“x-real-ip”: “2402:1f00:8001:2194::”,  
“x-signature”: “3f52e9aca497fd6c5dfe6a03542530c966781aad646c886e996f101ad5036c5e”  
},  
“cf”: {  
“clientTcpRtt”: 1,  
“requestHeaderNames”: {},  
“httpProtocol”: “HTTP/1.1”,  
“tlsCipher”: “AEAD-AES256-GCM-SHA384”,  
“continent”: “AS”,  
“asn”: 16276,  
“clientAcceptEncoding”: “gzip, deflate”,  
“country”: “SG”,  
“verifiedBotCategory”: “”,  
“tlsClientAuth”: {  
“certIssuerDNLegacy”: “”,  
“certIssuerSKI”: “”,  
“certSubjectDNRFC2253”: “”,  
“certSubjectDNLegacy”: “”,  
“certFingerprintSHA256”: “”,  
“certNotBefore”: “”,  
“certSKI”: “”,  
“certSerial”: “”,  
“certIssuerDN”: “”,  
“certVerified”: “NONE”,  
“certNotAfter”: “”,  
“certSubjectDN”: “”,  
“certPresented”: “0”,  
“certRevoked”: “0”,  
“certIssuerSerial”: “”,  
“certIssuerDNRFC2253”: “”,  
“certFingerprintSHA1”: “”  
},  
“tlsClientExtensionsSha1”: “cZTfz0G33jxhytWCjEfVzVcI6Z8=”,  
“tlsExportedAuthenticator”: {  
“clientFinished”: “6aad4a7b45fe3b62527f6ce46d7949931670816b204fc4540baab74bdc7fdd7604b39def1612e39a37da8358c5b29a13”,  
“clientHandshake”: “3849e8483292fdb62bcbe1667f2aebdc5414da1c60efe3b96637aee1d2b86a103a85beceec0a584c42bf03ca023ff741”,  
“serverHandshake”: “0c20b514c22f63cf03ce8180c49b6deff05dc39df7bb19276a722f2e8157327651c5cb6288f23011b7c53afcaeac2668”,  
“serverFinished”: “12650786dfd0b514b26cb28b018b5015dc14ec19d2464b7ca3a6b3716651a079d069f9515b8334ae1c503ceb42b131a3”  
},  
“tlsVersion”: “TLSv1.3”,  
“city”: “Singapore”,  
“timezone”: “Asia/Singapore”,  
“requestPriority”: “”,  
“edgeRequestKeepAliveStatus”: 1,  
“tlsClientRandom”: “WUNV3sRUQbofdDBywkRAoDvrdEfArRKk1oy8J9qQiEA=”,  
“longitude”: “103.84680”,  
“latitude”: “1.27670”,  
“postalCode”: “06”,  
“asOrganization”: “OVHcloud”,  
“tlsClientHelloLength”: “508”,  
“colo”: “SIN”  
}  
}  
},  
“id”: 0  
}  
這是我的log 看不出來是哪裡錯誤

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [February 21, 2025, 3:10pm UTC](https://tech-support.simplybook.me/t/1375-api-issues/1375/4 "2025-02-21T15:10:16Z")

</div>

**Redmine Admin** wrote:

this doesn’t look like an API request

please provide company login

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [February 21, 2025, 3:21pm UTC](https://tech-support.simplybook.me/t/1375-api-issues/1375/5 "2025-02-21T15:21:21Z")

</div>

**huang Huang** wrote:

You want my company account password? Or just log in  
My login information is taihevillage

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [February 21, 2025, 3:26pm UTC](https://tech-support.simplybook.me/t/1375-api-issues/1375/6 "2025-02-21T15:26:17Z")

</div>

**huang Huang** wrote:

{  
“truncated”: false,  
“executionModel”: “stateless”,  
“outcome”: “ok”,  
“scriptVersion”: {  
“id”: “7e76a9ab-35a0-4ce2-8d80-273ec8483262”  
},  
“scriptName”: “taihevllageauto”,  
“diagnosticsChannelEvents”: ,  
“exceptions”: ,  
“logs”: [  
{  
“message”: [  
“Received request from User-Agent: [simplybook.me](http://simplybook.me) API”  
],  
“level”: “log”,  
“timestamp”: 1740151375244  
},  
{  
“message”: [  
“User-Agent verified. Processing booking…”  
],  
“level”: “log”,  
“timestamp”: 1740151375244  
},  
{  
“message”: [  
“請求主體:”,  
“{"booking\_id":"75368","booking\_hash":"3d3af72de3247a5cfec44cdb357f525a","company":"taihevillage","notification\_type":"create","webhook\_timestamp":1740151375,"signature\_algo":"sha256"}”  
],  
“level”: “log”,  
“timestamp”: 1740151375244  
},  
{  
“message”: [  
“計算出的簽名:”,  
“ace8c385154ee68a12460f5e3d1108fc6a2c7080afdb2c3cefcee16a5490c7ad”  
],  
“level”: “log”,  
“timestamp”: 1740151375244  
},  
{  
“message”: [  
“接收到的簽名:”,  
“ace8c385154ee68a12460f5e3d1108fc6a2c7080afdb2c3cefcee16a5490c7ad”  
],  
“level”: “log”,  
“timestamp”: 1740151375244  
},  
{  
“message”: [  
“簽名驗證結果: true”  
],  
“level”: “log”,  
“timestamp”: 1740151375244  
},  
{  
“message”: [  
“獲取的用戶令牌：”,  
“b8a833ce6a7359c0f3558de13b25905daf2ce55cd6e429828c90475a031b4937”  
],  
“level”: “log”,  
“timestamp”: 1740151376634  
},  
{  
“message”: [  
“獲取的預約詳情：”,  
{  
“id”: “75368”,  
“code”: “3m51m5jz1n”,  
“is\_confirmed”: “1”,  
“comment”: null,  
“event\_id”: “540”,  
“event\_name”: “2H(老點)$1800”,  
“event\_duration”: “120”,  
“event\_buffertime\_before”: “0”,  
“event\_buffertime\_after”: “0”,  
“event\_description”: “”,  
“deposit\_is\_enabled”: 0,  
“deposit\_event\_price”: null,  
“event\_price”: “1800.0000”,  
“event\_currency”: “TWD”,  
“event\_tax\_id”: null,  
“invoice\_id”: null,  
“invoice\_number”: null,  
“invoice\_status”: null,  
“invoice\_currency”: null,  
“invoice\_line\_amount”: null,  
“invoice\_line\_id”: null,  
“invoice\_payment\_received”: null,  
“invoice\_amount”: “0.0000”,  
“invoice\_payment\_processor”: null,  
“invoice\_payment\_processor\_id”: null,  
“event\_image”: “”,  
“event\_image\_path”: “”,  
“unit\_id”: “10”,  
“unit\_name”: “18號老師”,  
“unit\_description”: “”,  
“unit\_email”: “[chungrose2023@gmail.com](mailto:chungrose2023@gmail.com),taihevillagemail@gmail.com”,  
“unit\_phone”: “”,  
“unit\_image”: “91ea5c8d3921ee6f5a520e142f7c0c8e.png”,  
“unit\_image\_path”: “/uploads/taihevillage91ea5c8d3921ee6f5a520e142f7c0c8e.png/preview/91ea5c8d3921ee6f5a520e142f7c0c8e.png”,  
“start\_date\_time”: “2025-03-02 10:00:00”,  
“end\_date\_time”: “2025-03-02 12:00:00”,  
“client\_timezone”: null,  
“record\_date”: “2025-02-21 15:22:52”,  
“client\_id”: “53365”,  
“client\_name”: “魏小姐”,  
“client\_email”: “[11212@taihevillage.com](mailto:11212@taihevillage.com)”,  
“client\_phone”: “+886988265836”,  
“client\_address1”: “”,  
“client\_address2”: “”,  
“client\_city”: “”,  
“client\_zip”: “”,  
“client\_country\_id”: “TW”,  
“online\_meeting\_id”: null,  
“company\_login”: “taihevillage”,  
“company\_name”: “泰和村養身美容SPA會館/怡然富足”,  
“company\_phone”: “02-26492333”,  
“company\_email”: “[zas125314055@gmail.com](mailto:zas125314055@gmail.com)”,  
“additional\_fields”: [  
{  
“value”: “未報到”,  
“field\_name”: “a0de0efe3ae0c2475c9794b82be2f776”,  
“field\_title”: “報到”,  
“field\_position”: “43”,  
“field\_type”: “select”,  
“field\_id”: “72”,  
“field\_pos”: “43”,  
“field\_values”: “已報到,未報到”  
},  
{  
“value”: “”,  
“field\_name”: “514b95cbc6379d29a397b28389edb26b”,  
“field\_title”: “顧客姓名”,  
“field\_position”: “44”,  
“field\_type”: “text”,  
“field\_id”: “120”,  
“field\_pos”: “44”,  
“field\_values”: null  
},  
{  
“value”: “”,  
“field\_name”: “cff185d0fe558a9a2fdb4dc23b3c9dc2”,  
“field\_title”: “顧客電話”,  
“field\_position”: “46”,  
“field\_type”: “digits”,  
“field\_id”: “121”,  
“field\_pos”: “46”,  
“field\_values”: null  
},  
{  
“value”: “不選擇房間”,  
“field\_name”: “330bd2bcd75687f22335f05c57ab50ae”,  
“field\_title”: “選擇房間”,  
“field\_position”: “47”,  
“field\_type”: “select”,  
“field\_id”: “122”,  
“field\_pos”: “47”,  
“field\_values”: “不選擇房間,推2,推3,推5,推6,油1,油2,油3,油5,油6,油7,油8,油9,油10,油11,油12,美1,美2,美3”  
},  
{  
“value”: “不選擇性別”,  
“field\_name”: “16e5d7633450f1c800bf5ebd0a056878”,  
“field\_title”: “選擇性別”,  
“field\_position”: “49”,  
“field\_type”: “select”,  
“field\_id”: “123”,  
“field\_pos”: “49”,  
“field\_values”: “不選擇性別,女師,男師”  
},  
{  
“value”: “不選擇國籍”,  
“field\_name”: “d08289c4e4f08980a9c415876c8720d2”,  
“field\_title”: “選擇國籍”,  
“field\_position”: “53”,  
“field\_type”: “select”,  
“field\_id”: “124”,  
“field\_pos”: “53”,  
“field\_values”: “不選擇國籍,台灣,泰國,越南,大陸”  
},  
{  
“value”: “現金”,  
“field\_name”: “f3ff8db69be2234759fe662b3fbbedc5”,  
“field\_title”: “付款方式”,  
“field\_position”: “63”,  
“field\_type”: “select”,  
“field\_id”: “99”,  
“field\_pos”: “63”,  
“field\_values”: “現金,line pay,藍新,轉帳,TWQR”  
},  
{  
“value”: “”,  
“field\_name”: “8ec4d524f9e54d12a088551b5b2c6d58”,  
“field\_title”: “付款方式金額”,  
“field\_position”: “67”,  
“field\_type”: “digits”,  
“field\_id”: “100”,  
“field\_pos”: “67”,  
“field\_values”: null  
},  
{  
“value”: “”,  
“field\_name”: “7481953881dcc0c3d281213f46c81b66”,  
“field\_title”: “額外付款方式”,  
“field\_position”: “72”,  
“field\_type”: “select”,  
“field\_id”: “117”,  
“field\_pos”: “72”,  
“field\_values”: “現金,line pay,藍新,轉帳,TWQR”  
},  
{  
“value”: “”,  
“field\_name”: “7cffd299c141f5c3e8e34cdef01bcc90”,  
“field\_title”: “額外付款方式金額”,  
“field\_position”: “78”,  
“field\_type”: “digits”,  
“field\_id”: “118”,  
“field\_pos”: “78”,  
“field\_values”: null  
},  
{  
“value”: “不用卷”,  
“field\_name”: “a71830558a1c356be06eb20172527024”,  
“field\_title”: “是否用卷”,  
“field\_position”: “327”,  
“field\_type”: “select”,  
“field\_id”: “101”,  
“field\_pos”: “327”,  
“field\_values”: “用卷,不用卷”  
},  
{  
“value”: “”,  
“field\_name”: “42f20d0a030f4f8fbf62c2caea9d266b”,  
“field\_title”: “(泰和村)用卷輸入”,  
“field\_position”: “328”,  
“field\_type”: “select”,  
“field\_id”: “102”,  
“field\_pos”: “328”,  
“field\_values”: “1100,1200,1300,1388,1500,1600”  
},  
{  
“value”: “”,  
“field\_name”: “9a17454f0246fdf6fba8239249ed0656”,  
“field\_title”: “(泰和村)卷號輸入”,  
“field\_position”: “335”,  
“field\_type”: “digits”,  
“field\_id”: “103”,  
“field\_pos”: “335”,  
“field\_values”: null  
},  
{  
“value”: “”,  
“field\_name”: “1a2936c72b87b881dc769dbf328dc5ee”,  
“field\_title”: “備註”,  
“field\_position”: “382”,  
“field\_type”: “text”,  
“field\_id”: “6”,  
“field\_pos”: “382”,  
“field\_values”: null  
},  
{  
“value”: “”,  
“field\_name”: “89d3ad08ef9e86cd0fda0daa6f1aed29”,  
“field\_title”: “支出”,  
“field\_position”: “383”,  
“field\_type”: “digits”,  
“field\_id”: “91”,  
“field\_pos”: “383”,  
“field\_values”: null  
},  
{  
“value”: “泰和村”,  
“field\_name”: “343d37b1594945ad851e7d947ef7902e”,  
“field\_title”: “泰和村”,  
“field\_position”: “384”,  
“field\_type”: “select”,  
“field\_id”: “112”,  
“field\_pos”: “384”,  
“field\_values”: “泰和村”  
}  
],  
“status”: {  
“id”: “6”,  
“name”: “代付款”,  
“description”: “”,  
“color”: “fac94e”,  
“is\_default”: “1”  
},  
“comments”: ,  
“history”: [  
{  
“id”: “205683”,  
“sheduler\_id”: “75368”,  
“datetime”: “2025-02-21 23:22:52”,  
“type”: “create”,  
“user\_id”: “1”,  
“agent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Safari/605.1.15”,  
“ip”: “211.76.58.170, 211.76.58.170:127.0.0.1”,  
“referer”: “[https://taihevillage.secure.simplybook.asia/](https://taihevillage.secure.simplybook.asia/)”,  
“login”: “zas125314055”,  
“firstname”: “泰和村”,  
“lastname”: “”  
}  
],  
“location”: null,  
“price”: ,  
“promo”: ,  
“client\_membership\_id”: null,  
“membership\_name”: null,  
“membership\_rest”: null,  
“membership\_limit”: null,  
“membership\_period\_start”: null,  
“membership\_period\_end”: null,  
“event\_category”: {  
“id”: “88”,  
“name”: “泰和村2H”,  
“description”: “”,  
“is\_default”: “0”,  
“position”: “45”,  
“file\_id”: null,  
“seo\_url”: null,  
“is\_visible”: “0”  
},  
“invoice”: null,  
“paid\_attributes”: ,  
“products”: ,  
“is\_google\_maps\_booking”: false  
}  
],  
“level”: “log”,  
“timestamp”: 1740151378136  
},  
{  
“message”: [  
“預約詳情：”,  
{  
“id”: “75368”,  
“code”: “3m51m5jz1n”,  
“is\_confirmed”: “1”,  
“comment”: null,  
“event\_id”: “540”,  
“event\_name”: “2H(老點)$1800”,  
“event\_duration”: “120”,  
“event\_buffertime\_before”: “0”,  
“event\_buffertime\_after”: “0”,  
“event\_description”: “”,  
“deposit\_is\_enabled”: 0,  
“deposit\_event\_price”: null,  
“event\_price”: “1800.0000”,  
“event\_currency”: “TWD”,  
“event\_tax\_id”: null,  
“invoice\_id”: null,  
“invoice\_number”: null,  
“invoice\_status”: null,  
“invoice\_currency”: null,  
“invoice\_line\_amount”: null,  
“invoice\_line\_id”: null,  
“invoice\_payment\_received”: null,  
“invoice\_amount”: “0.0000”,  
“invoice\_payment\_processor”: null,  
“invoice\_payment\_processor\_id”: null,  
“event\_image”: “”,  
“event\_image\_path”: “”,  
“unit\_id”: “10”,  
“unit\_name”: “18號老師”,  
“unit\_description”: “”,  
“unit\_email”: “[chungrose2023@gmail.com](mailto:chungrose2023@gmail.com),taihevillagemail@gmail.com”,  
“unit\_phone”: “”,  
“unit\_image”: “91ea5c8d3921ee6f5a520e142f7c0c8e.png”,  
“unit\_image\_path”: “/uploads/taihevillage91ea5c8d3921ee6f5a520e142f7c0c8e.png/preview/91ea5c8d3921ee6f5a520e142f7c0c8e.png”,  
“start\_date\_time”: “2025-03-02 10:00:00”,  
“end\_date\_time”: “2025-03-02 12:00:00”,  
“client\_timezone”: null,  
“record\_date”: “2025-02-21 15:22:52”,  
“client\_id”: “53365”,  
“client\_name”: “魏小姐”,  
“client\_email”: “[11212@taihevillage.com](mailto:11212@taihevillage.com)”,  
“client\_phone”: “+886988265836”,  
“client\_address1”: “”,  
“client\_address2”: “”,  
“client\_city”: “”,  
“client\_zip”: “”,  
“client\_country\_id”: “TW”,  
“online\_meeting\_id”: null,  
“company\_login”: “taihevillage”,  
“company\_name”: “泰和村養身美容SPA會館/怡然富足”,  
“company\_phone”: “02-26492333”,  
“company\_email”: “[zas125314055@gmail.com](mailto:zas125314055@gmail.com)”,  
“additional\_fields”: [  
{  
“value”: “未報到”,  
“field\_name”: “a0de0efe3ae0c2475c9794b82be2f776”,  
“field\_title”: “報到”,  
“field\_position”: “43”,  
“field\_type”: “select”,  
“field\_id”: “72”,  
“field\_pos”: “43”,  
“field\_values”: “已報到,未報到”  
},  
{  
“value”: “”,  
“field\_name”: “514b95cbc6379d29a397b28389edb26b”,  
“field\_title”: “顧客姓名”,  
“field\_position”: “44”,  
“field\_type”: “text”,  
“field\_id”: “120”,  
“field\_pos”: “44”,  
“field\_values”: null  
},  
{  
“value”: “”,  
“field\_name”: “cff185d0fe558a9a2fdb4dc23b3c9dc2”,  
“field\_title”: “顧客電話”,  
“field\_position”: “46”,  
“field\_type”: “digits”,  
“field\_id”: “121”,  
“field\_pos”: “46”,  
“field\_values”: null  
},  
{  
“value”: “不選擇房間”,  
“field\_name”: “330bd2bcd75687f22335f05c57ab50ae”,  
“field\_title”: “選擇房間”,  
“field\_position”: “47”,  
“field\_type”: “select”,  
“field\_id”: “122”,  
“field\_pos”: “47”,  
“field\_values”: “不選擇房間,推2,推3,推5,推6,油1,油2,油3,油5,油6,油7,油8,油9,油10,油11,油12,美1,美2,美3”  
},  
{  
“value”: “不選擇性別”,  
“field\_name”: “16e5d7633450f1c800bf5ebd0a056878”,  
“field\_title”: “選擇性別”,  
“field\_position”: “49”,  
“field\_type”: “select”,  
“field\_id”: “123”,  
“field\_pos”: “49”,  
“field\_values”: “不選擇性別,女師,男師”  
},  
{  
“value”: “不選擇國籍”,  
“field\_name”: “d08289c4e4f08980a9c415876c8720d2”,  
“field\_title”: “選擇國籍”,  
“field\_position”: “53”,  
“field\_type”: “select”,  
“field\_id”: “124”,  
“field\_pos”: “53”,  
“field\_values”: “不選擇國籍,台灣,泰國,越南,大陸”  
},  
{  
“value”: “現金”,  
“field\_name”: “f3ff8db69be2234759fe662b3fbbedc5”,  
“field\_title”: “付款方式”,  
“field\_position”: “63”,  
“field\_type”: “select”,  
“field\_id”: “99”,  
“field\_pos”: “63”,  
“field\_values”: “現金,line pay,藍新,轉帳,TWQR”  
},  
{  
“value”: “”,  
“field\_name”: “8ec4d524f9e54d12a088551b5b2c6d58”,  
“field\_title”: “付款方式金額”,  
“field\_position”: “67”,  
“field\_type”: “digits”,  
“field\_id”: “100”,  
“field\_pos”: “67”,  
“field\_values”: null  
},  
{  
“value”: “”,  
“field\_name”: “7481953881dcc0c3d281213f46c81b66”,  
“field\_title”: “額外付款方式”,  
“field\_position”: “72”,  
“field\_type”: “select”,  
“field\_id”: “117”,  
“field\_pos”: “72”,  
“field\_values”: “現金,line pay,藍新,轉帳,TWQR”  
},  
{  
“value”: “”,  
“field\_name”: “7cffd299c141f5c3e8e34cdef01bcc90”,  
“field\_title”: “額外付款方式金額”,  
“field\_position”: “78”,  
“field\_type”: “digits”,  
“field\_id”: “118”,  
“field\_pos”: “78”,  
“field\_values”: null  
},  
{  
“value”: “不用卷”,  
“field\_name”: “a71830558a1c356be06eb20172527024”,  
“field\_title”: “是否用卷”,  
“field\_position”: “327”,  
“field\_type”: “select”,  
“field\_id”: “101”,  
“field\_pos”: “327”,  
“field\_values”: “用卷,不用卷”  
},  
{  
“value”: “”,  
“field\_name”: “42f20d0a030f4f8fbf62c2caea9d266b”,  
“field\_title”: “(泰和村)用卷輸入”,  
“field\_position”: “328”,  
“field\_type”: “select”,  
“field\_id”: “102”,  
“field\_pos”: “328”,  
“field\_values”: “1100,1200,1300,1388,1500,1600”  
},  
{  
“value”: “”,  
“field\_name”: “9a17454f0246fdf6fba8239249ed0656”,  
“field\_title”: “(泰和村)卷號輸入”,  
“field\_position”: “335”,  
“field\_type”: “digits”,  
“field\_id”: “103”,  
“field\_pos”: “335”,  
“field\_values”: null  
},  
{  
“value”: “”,  
“field\_name”: “1a2936c72b87b881dc769dbf328dc5ee”,  
“field\_title”: “備註”,  
“field\_position”: “382”,  
“field\_type”: “text”,  
“field\_id”: “6”,  
“field\_pos”: “382”,  
“field\_values”: null  
},  
{  
“value”: “”,  
“field\_name”: “89d3ad08ef9e86cd0fda0daa6f1aed29”,  
“field\_title”: “支出”,  
“field\_position”: “383”,  
“field\_type”: “digits”,  
“field\_id”: “91”,  
“field\_pos”: “383”,  
“field\_values”: null  
},  
{  
“value”: “泰和村”,  
“field\_name”: “343d37b1594945ad851e7d947ef7902e”,  
“field\_title”: “泰和村”,  
“field\_position”: “384”,  
“field\_type”: “select”,  
“field\_id”: “112”,  
“field\_pos”: “384”,  
“field\_values”: “泰和村”  
}  
],  
“status”: {  
“id”: “6”,  
“name”: “代付款”,  
“description”: “”,  
“color”: “fac94e”,  
“is\_default”: “1”  
},  
“comments”: ,  
“history”: [  
{  
“id”: “205683”,  
“sheduler\_id”: “75368”,  
“datetime”: “2025-02-21 23:22:52”,  
“type”: “create”,  
“user\_id”: “1”,  
“agent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Safari/605.1.15”,  
“ip”: “211.76.58.170, 211.76.58.170:127.0.0.1”,  
“referer”: “[https://taihevillage.secure.simplybook.asia/](https://taihevillage.secure.simplybook.asia/)”,  
“login”: “zas125314055”,  
“firstname”: “泰和村”,  
“lastname”: “”  
}  
],  
“location”: null,  
“price”: ,  
“promo”: ,  
“client\_membership\_id”: null,  
“membership\_name”: null,  
“membership\_rest”: null,  
“membership\_limit”: null,  
“membership\_period\_start”: null,  
“membership\_period\_end”: null,  
“event\_category”: {  
“id”: “88”,  
“name”: “泰和村2H”,  
“description”: “”,  
“is\_default”: “0”,  
“position”: “45”,  
“file\_id”: null,  
“seo\_url”: null,  
“is\_visible”: “0”  
},  
“invoice”: null,  
“paid\_attributes”: ,  
“products”: ,  
“is\_google\_maps\_booking”: false  
}  
],  
“level”: “log”,  
“timestamp”: 1740151378136  
},  
{  
“message”: [  
“預約詳情已保存到數據庫”  
],  
“level”: “log”,  
“timestamp”: 1740151378280  
}  
],  
“eventTimestamp”: 1740151375244,  
“event”: {  
“request”: {  
“url”: “[https://taihevllageauto.zas125314055.workers.dev/](https://taihevllageauto.zas125314055.workers.dev/)”,  
“method”: “POST”,  
“headers”: {  
“accept-encoding”: “gzip, br”,  
“cf-connecting-ip”: “2402:1f00:8001:2194::”,  
“cf-ipcountry”: “SG”,  
“cf-ray”: “9157bc0f3da6f93b”,  
“cf-visitor”: “{"scheme":"https"}”,  
“connection”: “Keep-Alive”,  
“content-length”: “183”,  
“content-type”: “application/json”,  
“host”: “taihevllageauto.zas125314055.workers.dev”,  
“user-agent”: “[simplybook.me](http://simplybook.me) API”,  
“x-forwarded-proto”: “https”,  
“x-real-ip”: “2402:1f00:8001:2194::”,  
“x-signature”: “ace8c385154ee68a12460f5e3d1108fc6a2c7080afdb2c3cefcee16a5490c7ad”  
},  
“cf”: {  
“clientTcpRtt”: 1,  
“requestHeaderNames”: {},  
“httpProtocol”: “HTTP/1.1”,  
“tlsCipher”: “AEAD-AES256-GCM-SHA384”,  
“continent”: “AS”,  
“asn”: 16276,  
“clientAcceptEncoding”: “gzip, deflate”,  
“country”: “SG”,  
“verifiedBotCategory”: “”,  
“tlsClientAuth”: {  
“certIssuerDNLegacy”: “”,  
“certIssuerSKI”: “”,  
“certSubjectDNRFC2253”: “”,  
“certSubjectDNLegacy”: “”,  
“certFingerprintSHA256”: “”,  
“certNotBefore”: “”,  
“certSKI”: “”,  
“certSerial”: “”,  
“certIssuerDN”: “”,  
“certVerified”: “NONE”,  
“certNotAfter”: “”,  
“certSubjectDN”: “”,  
“certPresented”: “0”,  
“certRevoked”: “0”,  
“certIssuerSerial”: “”,  
“certIssuerDNRFC2253”: “”,  
“certFingerprintSHA1”: “”  
},  
“tlsClientExtensionsSha1”: “cZTfz0G33jxhytWCjEfVzVcI6Z8=”,  
“tlsExportedAuthenticator”: {  
“clientFinished”: “3535d969e657cbc336966367dedc80745c364498f23f660aeabfd42634127eafc2a64a1643ada34712a61d01684c7e13”,  
“clientHandshake”: “f4396faadb515969b33369277d2748a0e09463c73581164f737d4f7d274425ed72c9e3d3165c9db2181dbd21c490ef46”,  
“serverHandshake”: “174b9ac98216084eac7be1b40927dabcff833ed7931fdcf1441d359d2d55073d8bbd267cc4cc0fe0eeb3681203a02685”,  
“serverFinished”: “6c96a8313f5d59ea04464d230fdbb29d145bbebec31f6b6121f5bd2e6fad85f02134a3821a2d4c40743251fe3878ba46”  
},  
“tlsVersion”: “TLSv1.3”,  
“city”: “Singapore”,  
“timezone”: “Asia/Singapore”,  
“requestPriority”: “”,  
“edgeRequestKeepAliveStatus”: 1,  
“tlsClientRandom”: “ByulAI6C4ygA6k59OZj+0qCnnTS97hfZq79SAyUc2zw=”,  
“longitude”: “103.84680”,  
“latitude”: “1.27670”,  
“postalCode”: “06”,  
“asOrganization”: “OVHcloud”,  
“tlsClientHelloLength”: “508”,  
“colo”: “SIN”  
}  
},  
“response”: {  
“status”: 200  
}  
},  
“id”: 1  
}

This is the log of the successful getBookingDetails api. Sometimes it fails.

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [February 21, 2025, 3:28pm UTC](https://tech-support.simplybook.me/t/1375-api-issues/1375/7 "2025-02-21T15:28:18Z")

</div>

**Redmine Admin** wrote:

hi, i’m not sure what is this. Please provide just one API request to our API which gives you error. We need raw http request and response for a one API request. We never ask for company password. Company login is needed
