Rawi

مرجع API · Settings

Get account & receipts

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

Customer token (Bearer) — free and paid users

Email (null for phone-only accounts), verified phone, SMS-notification switch, plan, period, renewal date and receipts (successful/refunded payments).

پاسخ‌ها

200 — AccountSettings

فیلدنوعتوضیح
email*string | nullEmail address.
phone*string | nullMobile number.
sms_notifications*boolean
email_notifications*object
email_notifications.reminders*boolean
email_notifications.report_ready*boolean
email_notifications.renewal*boolean
plan*string ("paid", "free")S5: reminders, report_ready, renewal
billing_period*string | null
plan_expires_at*string | null
payments*object[]
payments[].id*integerUnique ID.
payments[].period*string
payments[].status*stringCurrent status.
payments[].base_amount*integer
payments[].period_discount*integer
payments[].code_discount*integer
payments[].vat*integer
payments[].total*integer
payments[].currency*stringCurrency code, e.g. USD, EUR or IRT.
payments[].tracking_code*string | null
payments[].gateway_message*string | null
payments[].gateway_name*string | null
payments[].period_start*string | null
payments[].period_end*string | null
payments[].paid_at*string | null
payments[].created_at*string | nullWhen it was created (ISO 8601).
payments[].auto_renew*boolean
payments[].renewal_amount*integer | null«Renew automatically» (Stripe subscription)
payments[].amount_refunded*integerRefunds (status refunded / partially_refunded): total refunded so far and when the last one was made.
payments[].refunded_at*string | null
renewal*objectAutomatic renewal (Stripe subscription): renews_at / ends_at, cancel or resume (POST /billing/subscription).
renewal.auto*boolean
renewal.status*string | nullCurrent status.
renewal.can_cancel*booleanactive | past_due | cancel_at_period_end | none
renewal.can_resume*boolean
renewal.renews_at*string | null
renewal.ends_at*string | null
brand_names*any[]«Delete account» accepts any of these (or the email) as the typed confirmation.
json
{
  "email": "demo@rawi.local",
  "phone": "+989120000077",
  "sms_notifications": true,
  "plan": "paid",
  "billing_period": "quarterly",
  "plan_expires_at": "2027-01-25T00:00:00Z",
  "payments": [
    {
      "id": 19,
      "period": "quarterly",
      "status": "success",
      "base_amount": 5400000,
      "period_discount": 540000,
      "code_discount": 1458000,
      "vat": 340200,
      "total": 3742200,
      "currency": "IRT",
      "tracking_code": "427999304",
      "gateway_message": null,
      "gateway_name": "درگاه بانکی (آزمایشی)",
      "period_start": "2026-10-25T00:00:00Z",
      "period_end": "2027-01-25T00:00:00Z",
      "paid_at": "2026-10-25T11:42:00Z",
      "created_at": "2026-10-25T11:42:00Z",
      "auto_renew": false,
      "renewal_amount": null
    }
  ],
  "renewal": {
    "auto": false,
    "status": "none",
    "can_cancel": false,
    "can_resume": false,
    "renews_at": null,
    "ends_at": "2027-01-25T00:00:00Z"
  }
}

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/settings/account' \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $RAWI_USER_TOKEN"

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