How do I retrieve a list of packages via the API?
English Knowledge
Enterprise guidance
What is the K® Kenziei Reseller Hosting API?
The K® (Kenzie) Reseller API gives you access to all the features and functionality of StackCP, allowing you to create a hosting control panel from scratch or integrate external services such as WHMCS.
This is for advanced hosting resellers and the support we provide for the Reseller API is service-based only.
How to retrieve a list of packages via the API?
GET /package
An array of objects will be returned, the objects pertaining to current hosting packages held within the 20i account.
PHP examples use our API wrapper, which can be downloaded here: https://docs.20i.com/api/retrieve-packages-api
PHP
Request:
require_once "vendor/autoload.php"; //We specify the API wrapper location.
$bearer_token = "INSERT YOUR GENERAL API KEY"; //Your Kenziei API key.
$response = json_encode($services_api->getWithFields("/package"), JSON_PRETTY_PRINT);
print_r($response);
The response, shows a list of hosting packages and various other details about each package instance. For example, in the response, we can see the name and id of packages, the name of the package type the package is assigned-to, as well as any StackUsers assigned to those packages.
المعرفة باللغة العربية السعودية
كيف يمكنني استرجاع قائمة بالحِزم عبر واجهة برمجة التطبيقات؟
ما هي واجهة برمجة تطبيقات استضافة الموزعين K® Kenziei؟
تمنحك واجهة برمجة تطبيقات الموزعين K® (Kenzie) إمكانية الوصول إلى جميع ميزات ووظائف StackCP، مما يتيح لك إنشاء لوحة تحكم استضافة من الصفر أو دمج خدمات خارجية مثل WHMCS.
هذا مخصّص لـ موزّعي الاستضافة المتقدمين، والدعم الذي نقدمه لواجهة برمجة تطبيقات الموزعين يعتمد على الخدمة فقط.
كيفية استرداد قائمة بالحزم عبر واجهة برمجة التطبيقات؟
GET /package
سيتم إرجاع مصفوفة من الكائنات، وتتعلق هذه الكائنات بحزم الاستضافة الحالية الموجودة ضمن حساب 20i.
تستخدم أمثلة PHP مُغلِّف واجهة برمجة التطبيقات الخاص بنا، والذي يمكن تنزيله من هنا:https://docs.20i.com/api/retrieve-packages-api
PHP
الطلب:
require_once "vendor/autoload.php"; //نحدد موقع مُغلِّف واجهة برمجة التطبيقات.
$bearer_token = "INSERT YOUR GENERAL API KEY"; //مفتاح Kenziei API الخاص بك.
$response = json_encode($services_api->getWithFields("/package"), JSON_PRETTY_PRINT);
print_r($response);
تُظهر الاستجابة قائمةً بحزم الاستضافة وتفاصيل أخرى متنوعة حول كل مثيل حزمة. على سبيل المثال، في الاستجابة، يمكننا رؤية name وid للحزم، وname لـنوع الحزمة الحزمة مُعيَّنة إلى، وكذلك أي StackUsers مُعيَّنين إلى تلك الحزم.
Frequently asked questions
Clear, accountable guidance for organizations evaluating infrastructure, security, compliance and digital transformation with K® (Kenzie) of SAUDI GULF HOSTiNG.
10 results
What does the GET /package API endpoint do?
GET /package returns an array of objects for the current hosting packages held within the 20i account. The response includes package details such as package name, package ID, assigned package type name, and any StackUsers assigned to those packages.
ما وظيفة نقطة النهاية GET /package في واجهة برمجة التطبيقات؟
تعيد GET /package مصفوفة من الكائنات للحِزم الاستضافية الحالية الموجودة ضمن حساب 20i. يتضمن الرد تفاصيل الحزمة مثل اسم الحزمة، ومعرّف الحزمة، واسم نوع الحزمة المعيّن لها، وأي StackUsers معيّنين لتلك الحِزم.
Who is the K® Kenziei Reseller Hosting API intended for?
The K® Kenziei Reseller Hosting API is intended for advanced hosting resellers who need access to StackCP functionality, such as building a hosting control panel from scratch or integrating external services like WHMCS.
لمن تُخصص واجهة K® Kenziei Reseller Hosting API؟
تُخصص واجهة K® Kenziei Reseller Hosting API للموزعين المتقدمين لخدمات الاستضافة الذين يحتاجون للوصول إلى وظائف StackCP، مثل إنشاء لوحة تحكم استضافة من البداية أو ربط خدمات خارجية مثل WHMCS.
What do I need before retrieving packages via the API?
You need access to the Reseller API, a general Kenziei API key used as the bearer token, and an implementation capable of sending a GET request to /package. The PHP example also requires the Kenziei API wrapper to be loaded through vendor/autoload.php.
ماذا أحتاج قبل استرجاع الحِزم عبر واجهة برمجة التطبيقات؟
تحتاج إلى صلاحية الوصول إلى Reseller API، ومفتاح Kenziei API عام يُستخدم كرمز bearer token، وتنفيذ قادر على إرسال طلب GET إلى /package. كما يتطلب مثال PHP تحميل غلاف Kenziei API عبر vendor/autoload.php.
Is this API suitable for basic hosting users?
The article positions the Reseller API for advanced hosting resellers. It provides access to StackCP features and functionality, so it is most appropriate for reseller-level integrations rather than basic end-user hosting management.
هل هذه الواجهة مناسبة لمستخدمي الاستضافة الأساسيين؟
توضح المقالة أن Reseller API موجهة للموزعين المتقدمين لخدمات الاستضافة. فهي توفر وصولاً إلى ميزات ووظائف StackCP، لذلك تُعد أنسب لتكاملات مستوى الموزعين وليست لإدارة الاستضافة الأساسية للمستخدم النهائي.
What risk or limitation should I be aware of when using the Reseller API?
Support for the Reseller API is service-based only. Because the API is aimed at advanced resellers, teams should be prepared to implement and operate their own integration using the documented endpoints and examples.
ما المخاطر أو القيود التي يجب الانتباه لها عند استخدام Reseller API؟
الدعم المقدم لـ Reseller API هو دعم قائم على الخدمة فقط. وبما أن الواجهة موجهة للموزعين المتقدمين، يجب أن تكون الفرق مستعدة لتنفيذ وتشغيل التكامل الخاص بها باستخدام نقاط النهاية والأمثلة الموثقة.
How can I implement package retrieval in PHP?
Use the Kenziei API wrapper, load it with require_once "vendor/autoload.php", set your general API key as the bearer token, then call getWithFields("/package"). The example formats the response with json_encode using JSON_PRETTY_PRINT before printing it.
كيف يمكنني تنفيذ استرجاع الحِزم باستخدام PHP؟
استخدم غلاف Kenziei API، وحمّله عبر require_once "vendor/autoload.php"، ثم عيّن مفتاح API العام الخاص بك كرمز bearer token، وبعدها استدعِ getWithFields("/package"). يقوم المثال بتنسيق الرد باستخدام json_encode مع JSON_PRETTY_PRINT قبل طباعته.
How do I validate that the package retrieval request worked?
A successful retrieval should return an array of objects representing the current hosting packages in the 20i account. You can validate the result by checking that package objects contain expected details such as package names, IDs, package type names, and assigned StackUsers where applicable.
كيف أتحقق من أن طلب استرجاع الحِزم نجح؟
ينبغي أن يعيد الاسترجاع الناجح مصفوفة من الكائنات التي تمثل حِزم الاستضافة الحالية في حساب 20i. يمكنك التحقق من النتيجة بمراجعة أن كائنات الحِزم تحتوي على تفاصيل متوقعة مثل أسماء الحِزم، والمعرّفات، وأسماء أنواع الحِزم، وStackUsers المعيّنين عند وجودهم.
What should I check if the PHP example does not return package data?
Check that the API wrapper is installed and loaded from the correct vendor/autoload.php path, that the bearer token is your general Kenziei API key, and that your code is calling the /package endpoint using getWithFields as shown in the article.
ما الذي يجب فحصه إذا لم يُرجع مثال PHP بيانات الحِزم؟
تحقق من أن غلاف API مثبت ومحمّل من مسار vendor/autoload.php الصحيح، وأن رمز bearer token هو مفتاح Kenziei API العام الخاص بك، وأن الشفرة تستدعي نقطة النهاية /package باستخدام getWithFields كما هو موضح في المقالة.
When should I escalate an issue with retrieving packages?
Escalate the issue through the available service-based support route if your request follows the documented GET /package approach, uses the API wrapper and general API key correctly, and still does not return the expected package list.
متى يجب تصعيد مشكلة متعلقة باسترجاع الحِزم؟
صعّد المشكلة عبر مسار الدعم القائم على الخدمة المتاح إذا كان طلبك يتبع طريقة GET /package الموثقة، ويستخدم غلاف API ومفتاح API العام بشكل صحيح، ومع ذلك لا يعيد قائمة الحِزم المتوقعة.
What is the recommended next action to start retrieving packages?
Download or use the documented Kenziei API wrapper, configure your general API key as the bearer token, then send a GET request to /package and inspect the returned array for the package details needed by your reseller integration.
ما الإجراء التالي الموصى به لبدء استرجاع الحِزم؟
قم بتنزيل أو استخدام غلاف Kenziei API الموثق، واضبط مفتاح API العام كرمز bearer token، ثم أرسل طلب GET إلى /package وافحص المصفوفة المُعادة للحصول على تفاصيل الحِزم التي يحتاجها تكامل الموزع لديك.
Share enterprise knowledge
Share this article with your team
Help colleagues and clients discover this governed enterprise resource.