Rawi

مرجع API · Talk to an expert

Get own expert request

get/consultations/{id}
احراز هویتتوکن مشتری (Bearer)
سطح دسترسیکاربر رایگان · کاربر حرفه‌ای

Customer token (Bearer) — free and paid users

One of the caller's own requests.

پارامترها

ناممحلنوعتوضیح
id*pathintegerPostman variable {{consultationId}}

پاسخ‌ها

200 — ConsultationRequest

فیلدنوعتوضیح
id*integerUnique ID.
name*string
phone*stringMobile number.
method*string
time_slot*string
preferred_days*any[]
note*string | null
source_page*string | null
status*stringCurrent status.
due_at*string | null
snapshot*object
snapshot.brand*string | null
snapshot.plan*string | string ("free")Plan: free (Free) or paid (Pro).
snapshot.share*string | null
snapshot.gaps*string | nullMissed questions: AI named a competitor and not you.
snapshot.last_run_at*string | null
snapshot.source_page*string | null
created_at*string | nullWhen it was created (ISO 8601).
json
{
  "id": 0,
  "name": "",
  "phone": "",
  "method": "",
  "time_slot": "",
  "preferred_days": [
    null
  ],
  "note": "",
  "source_page": "",
  "status": "",
  "due_at": "",
  "snapshot": {
    "brand": "",
    "plan": "",
    "share": "",
    "gaps": "",
    "last_run_at": "",
    "source_page": ""
  },
  "created_at": ""
}

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"
}

404 — Unknown id (or not owned by the caller)

فیلدنوع
message*string
json
{
  "message": ""
}

نمونهٔ curl

bash
curl -X GET 'http://127.0.0.1:8010/api/consultations/{id}' \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $RAWI_USER_TOKEN"

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