نظرة عامة على CSS API
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يمكنك استخدام CSS API لإدارة خدمة CSS والتحكّم في مجموعة حسابات CSS Products التي تديرها.
إنّ CSS API هي إعادة تصميم لميزات CSS في Content API for Shopping.
مقارنة بين CSS API وMerchant API
من المهم فهم الفرق بين CSS API وMerchant API
لإدارة منتجاتك بفعالية. تخدم كل واجهة برمجة تطبيقات غرضًا مختلفًا وتعمل على أنواع مختلفة من الحسابات ومساحات المعرّفات:
CSS API (الإصدار 1): استخدِم واجهة برمجة التطبيقات هذه لجميع الوظائف المتعلقة بإدارة حسابات CSS ومنتجات CSS المرتبطة بها. تستخدم واجهة برمجة التطبيقات هذه اسم المضيف css.googleapis.com
وتتطلّب معرّف نطاق CSS لإجراء عمليات على المنتجات.
- مثلاً:
POST https://css.googleapis.com/v1/accounts/{cssDomainId}/cssProductInputs:insert
Merchant API
(الإصدار 1): استخدِم واجهة برمجة التطبيقات هذه للاستفادة من جميع الوظائف ذات الصلة بحسابات Merchant Center العادية ومنتجاتها. يستخدم واجهة برمجة التطبيقات هذه اسم المضيف merchantapi.googleapis.com
وتتطلّب معرّفًا عاديًا لحساب Merchant Center.
- مثلاً:
POST https://merchantapi.googleapis.com/v1/accounts/{merchantId}/productInputs:insert
ملاحظة مهمة: لا تستخدِم معرّف نطاق CSS مع Merchant API لنقاط نهاية المنتجات، ولا تستخدِم معرّف Merchant Center مع CSS API لنقاط نهاية المنتجات. سيؤدي استخدام رقم تعريف غير صحيح مع واجهة برمجة تطبيقات غير صحيحة إلى حدوث أخطاء.
تحلّ واجهة CSS API وMerchant API معًا محلّ الإصدار القديم من Content API for Shopping (الإصدار 2.1)، الذي يجب التوقّف عن استخدامه.
في ما يلي بعض الأسباب التي تستدعي الترقية إلى CSS API:
لمزيد من المعلومات، يُرجى الاطّلاع على البدء.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-13 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-13 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe CSS API enables managing CSS and controlling your CSS Products portfolio.\u003c/p\u003e\n"],["\u003cp\u003eThe CSS API offers new features, improved alignment with Google's API improvement proposals, and updated documentation and samples.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading from the Content API for Shopping to the CSS API is recommended.\u003c/p\u003e\n"]]],[],null,["# CSS API overview\n\nYou can use the CSS API to manage your CSS and control your CSS Products\nportfolio.\n\nThe CSS API is a redesign of the CSS features in [Content API for\nShopping](/shopping-content).\n\nCSS API versus Merchant API\n---------------------------\n\nUnderstanding the distinction between the CSS API and the Merchant API is key\nto effectively managing your products. Each API serves a different purpose and\noperates on different account types and ID spaces:\n\n- **CSS API (v1):** Use this API for all functionalities related to managing\n CSS accounts and their associated CSS products. This API uses the\n `css.googleapis.com` hostname and requires a **CSS Domain ID** for product\n operations.\n\n - Example: `POST https://css.googleapis.com/v1/accounts/{cssDomainId}/cssProductInputs:insert`\n- **[Merchant API](https://developers.google.com/merchant/api/overview)\n (v1):** Use this API for all functionalities related to\n standard Merchant Center accounts and their products. This API uses the\n `merchantapi.googleapis.com` hostname and requires a standard **Merchant\n Center ID**.\n\n - Example: `POST https://merchantapi.googleapis.com/v1/accounts/{merchantId}/productInputs:insert`\n\n**Key takeaway:** Don't use a CSS Domain ID with the Merchant API for product\nendpoints, and don't use a Merchant Center ID with the CSS API product\nendpoints. Using the wrong ID with the wrong API will result in errors.\n\nThe CSS API and Merchant API together replace the older Content API for Shopping\n(v2.1), which should no longer be used.\n\nHere are some reasons to upgrade to the CSS API:\n\n- New features.\n- Improved alignment with Google's [API improvement proposals](//google.aip.dev/).\n- Updated documentation and [samples](/comparison-shopping-services/api/code-samples).\n\nSee [Get started](/comparison-shopping-services/api/guides/quickstart) for more\ninformation."]]