مرجع API · Talk to an expert
Prefill the expert request form
get
/consultations/prefill| احراز هویت | توکن مشتری (Bearer) |
|---|---|
| سطح دسترسی | کاربر رایگان · کاربر حرفهای Customer token (Bearer) — free and paid users |
Name, last used phone and the account snapshot that is attached automatically. Fires consultation_form_opened.
پارامترها
| نام | محل | نوع | توضیح |
|---|---|---|---|
source_page | query | string | r1 r2 r3 r4 r5 o2 settings other |
پاسخها
200 — {name, phone, snapshot: ConsultationSnapshot, working_days, timezone}
| فیلد | نوع | توضیح |
|---|---|---|
name* | string | |
phone* | string | Mobile number. |
snapshot* | object | |
snapshot.brand | string | |
snapshot.plan | string | Plan: free (Free) or paid (Pro). |
snapshot.share | number | |
snapshot.gaps | integer | Missed questions: AI named a competitor and not you. |
snapshot.last_run_at | string | |
snapshot.source_page | string | |
working_days* | any[] | any[] | The C1 form's «روزهای …، به وقت …» line: working days (ISO weekdays, 1 = Monday) and the time zone. |
timezone* | string |
json
{
"name": "عرفان",
"phone": "09123456789",
"snapshot": {
"brand": "آوند",
"plan": "free",
"share": 18.8,
"gaps": 2,
"last_run_at": "2026-11-25T10:30:00Z",
"source_page": "r2"
},
"working_days": [
1,
2,
3,
4,
5
],
"timezone": "UTC"
}
401 — Missing/invalid token, or a token of the wrong owner (admin token on a user route or vice versa): {"message":"…","code":"unauthenticated"} (message in the request language)
| فیلد | نوع |
|---|---|
message* | string |
code | string |
json
{
"message": "Please sign in to continue; your session has ended or is not valid.",
"code": "unauthenticated"
}
نمونهٔ curl
bash
curl -X GET 'http://127.0.0.1:8010/api/consultations/prefill' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $RAWI_USER_TOKEN"