Rawi

مرجع 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_pagequerystringr1 r2 r3 r4 r5 o2 settings other

پاسخ‌ها

200 — {name, phone, snapshot: ConsultationSnapshot, working_days, timezone}

فیلدنوعتوضیح
name*string
phone*stringMobile number.
snapshot*object
snapshot.brandstring
snapshot.planstringPlan: free (Free) or paid (Pro).
snapshot.sharenumber
snapshot.gapsintegerMissed questions: AI named a competitor and not you.
snapshot.last_run_atstring
snapshot.source_pagestring
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
codestring
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"

امتحان در کنسول