مرجع API · Settings
Get brand & competitors
get
/settings/brand| احراز هویت | توکن مشتری (Bearer) |
|---|---|
| سطح دسترسی | کاربر رایگان · کاربر حرفهای Customer token (Bearer) — free and paid users |
Brand name/domain, name variants, extra domains and the ordered competitor list.
پاسخها
200 — {name, domain, name_variants[], extra_domains[], competitors: Competitor[]}
| فیلد | نوع | توضیح |
|---|---|---|
name* | string | null | |
domain* | string | null | Site domain. |
name_variants* | any[] | |
extra_domains* | any[] | |
competitors* | object[] | |
competitors[].id* | integer | Unique ID. |
competitors[].name* | string | |
competitors[].domain* | string | null | Site domain. |
competitors[].position* | integer | |
competitors[].source* | string |
json
{
"name": "آوند",
"domain": "avand.example",
"name_variants": [
"Avand",
"آوند حساب",
"اوند"
],
"extra_domains": [
"blog.avand.example"
],
"competitors": [
{
"id": 163,
"name": "نیکحساب",
"domain": "nikhesab.example",
"position": 1,
"source": "suggested"
},
{
"id": 164,
"name": "ترازنو",
"domain": "taraznoo.example",
"position": 2,
"source": "suggested"
}
]
}
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/settings/brand' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $RAWI_USER_TOKEN"