الروابط

ملاحظات
مستوى خبير
مفتاح API لازم يترسل كـ Bearer token في رأس الطلب Authorization. خذ مفتاح API بتاعك.
قائمة

نقطة نهاية API:

GET
https://shbbr.com/api/v1/links

مثال الطلب:

curl --location --request GET 'https://shbbr.com/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
معامل
النوع
الوصف
search
اختياري string
استعلام البحث.
search_by
اختياري string
البحث حسب. القيم الممكنة هي: title لـ العنوان, alias لـ الاسم المستعار, url لـ رابط. الافتراضي: title.
status
اختياري integer
الحالة. القيم الممكنة هي: 0 لـ الكل, 1 لـ نشط, 2 لـ منتهي, 3 لـ معطل. الافتراضي: 0.
space_id
اختياري integer
معرف المساحة.
domain_id
اختياري integer
معرف النطاق.
pixel_id
اختياري integer
معرف البكسل.
sort_by
اختياري string
ترتيب حسب. القيم الممكنة هي: id لـ تاريخ الإنشاء, clicks لـ نقرات, title لـ العنوان, alias لـ الاسم المستعار, url لـ رابط. الافتراضي: id.
sort
اختياري string
ترتيب. القيم الممكنة هي: desc لـ تنازلي, asc لـ تصاعدي. الافتراضي: desc.
per_page
اختياري integer
النتائج لكل صفحة. القيم الممكنة هي: 10, 25, 50, 100. الافتراضي: 100.
عرض

نقطة نهاية API:

GET
https://shbbr.com/api/v1/links/{id}

مثال الطلب:

curl --location --request GET 'https://shbbr.com/api/v1/links/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
تخزين

نقطة نهاية API:

POST
https://shbbr.com/api/v1/links

مثال الطلب:

curl --location --request POST 'https://shbbr.com/api/v1/links' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}' \
--data-urlencode 'domain={id}'
معامل
النوع
الوصف
url
مطلوب string
رابط الوجهة.
domain_id
مطلوب integer
معرف النطاق.
alias
اختياري string
الاسم المستعار.
space_id
اختياري integer
معرف المساحة.
pixel_ids[]
اختياري array
معرفات البكسل.
redirect_password
اختياري string
كلمة مرور التوجيه.
sensitive_content
اختياري integer
محتوى حساس. القيم الممكنة هي: 0 لـ لا, 1 لـ نعم. الافتراضي: 0.
privacy
اختياري integer
خصوصية الإحصائيات. القيم الممكنة هي: 0 لـ عام, 1 لـ خاص, 2 لـ كلمة المرور. الافتراضي: 0.
password
اختياري string
كلمة مرور الإحصائيات. بيشتغل بس مع حقل privacy مضبوط على 2.
active_period_start_at
اختياري string
تاريخ بداية الفترة النشطة بصيغة Y-m-d H:i.
active_period_end_at
اختياري string
تاريخ نهاية الفترة النشطة بصيغة Y-m-d H:i.
clicks_limit
اختياري integer
حد النقرات.
expiration_url
اختياري string
رابط الانتهاء.
targets_type
اختياري string
الاستهداف. القيم الممكنة هي: continents لـ Continents, countries لـ Countries, operating_systems لـ Operating systems, browsers لـ Browsers, languages لـ Languages, devices لـ Devices, rotations لـ Rotations.
targets[index][key]
اختياري string
للحقل targets_type=country، القيمة لازم تكون بصيغة ISO 3166-1 alpha-2.
For targets_type=operating_systems, the possible values are iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
للحقل targets_type=browsers، القيم الممكنة هي: Chrome, Chromium, Firefox, Firefox Mobile, Edge, Internet Explorer, Mobile Internet Explorer, Vivaldi, Brave, Safari, Opera, Opera Mini, Opera Mobile, Opera Touch, Yandex Browser, UC Browser, Samsung Internet, QQ Browser, BlackBerry Browser, Maxtho.
للحقل targets_type=devices، القيم الممكنة هي: Desktop, Mobile, Tablet, Watch, Television.
للحقل targets_type=languages، القيمة لازم تكون بصيغة ISO 639-1 alpha-2.
للحقل targets_type=continents، القيم الممكنة هي: AF لـ Africa, AN لـ Antarctica, AS لـ Asia, EU لـ Europe, NA لـ North America, OC لـ Oceania, SA لـ South America.
targets[index][value]
اختياري string
رابط الوجهة.
تحديث

نقطة نهاية API:

PUT PATCH
https://shbbr.com/api/v1/links/{id}

مثال الطلب:

curl --location --request PUT 'https://shbbr.com/api/v1/links/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}'
معامل
النوع
الوصف
url
اختياري string
رابط الوجهة.
alias
اختياري string
الاسم المستعار.
space_id
اختياري integer
معرف المساحة.
pixel_ids[]
اختياري array
معرفات البكسل.
redirect_password
اختياري string
كلمة مرور التوجيه.
sensitive_content
اختياري integer
محتوى حساس. القيم الممكنة هي: 0 لـ لا, 1 لـ نعم.
privacy
اختياري integer
خصوصية الإحصائيات. القيم الممكنة هي: 0 لـ عام, 1 لـ خاص, 2 لـ كلمة المرور.
password
اختياري string
كلمة مرور الإحصائيات. بيشتغل بس مع حقل privacy مضبوط على 2.
active_period_start_at
اختياري string
تاريخ بداية الفترة النشطة بصيغة Y-m-d H:i.
active_period_end_at
اختياري string
تاريخ نهاية الفترة النشطة بصيغة Y-m-d H:i.
clicks_limit
اختياري integer
حد النقرات.
expiration_url
اختياري string
رابط الانتهاء.
targets_type
اختياري string
الاستهداف. القيم الممكنة هي: continents لـ Continents, countries لـ Countries, operating_systems لـ Operating systems, browsers لـ Browsers, languages لـ Languages, devices لـ Devices, rotations لـ Rotations.
targets[index][key]
اختياري string
للحقل targets_type=country، القيمة لازم تكون بصيغة ISO 3166-1 alpha-2.
For targets_type=operating_systems, the possible values are iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
للحقل targets_type=browsers، القيم الممكنة هي: Chrome, Chromium, Firefox, Firefox Mobile, Edge, Internet Explorer, Mobile Internet Explorer, Vivaldi, Brave, Safari, Opera, Opera Mini, Opera Mobile, Opera Touch, Yandex Browser, UC Browser, Samsung Internet, QQ Browser, BlackBerry Browser, Maxtho.
للحقل targets_type=devices، القيم الممكنة هي: Desktop, Mobile, Tablet, Watch, Television.
للحقل targets_type=languages، القيمة لازم تكون بصيغة ISO 639-1 alpha-2.
للحقل targets_type=continents، القيم الممكنة هي: AF لـ Africa, AN لـ Antarctica, AS لـ Asia, EU لـ Europe, NA لـ North America, OC لـ Oceania, SA لـ South America.
targets[index][value]
اختياري string
رابط الوجهة.
حذف

نقطة نهاية API:

DELETE
https://shbbr.com/api/v1/links/{id}

مثال الطلب:

curl --location --request DELETE 'https://shbbr.com/api/v1/links/{id}' \
--header 'Authorization: Bearer {api_key}'