Have questions? Leave your message here or Schedule a quick call with our manager now

统一API,可与多个电子商务平台集成

使用相同的数据模型与所有电子商务平台集成

×

探索功能详解

了解 API2Cart 如何让您的软件与 60 多个购物平台连接。 浏览详细的 API 文档,发现用于管理产品、订单、客户等内容的统一方法。

API2Cart 与各种购物车的集成
在真实商店测试 API2Cart

在真实商店中体验

创建您的账户,在几秒钟内连接测试或真实商店,并执行所需的方法。 查看真实商店数据如何实时返回。

构建您的集成

在确认可以获取所需数据后,围绕所需的实体开发与 API2Cart API 的集成。 需要帮助?我们值得信赖的 集成合作伙伴 将在此为您简化流程。

API2Cart 集成过程分步详解
使用 API2Cart 实现无缝电子商务数据同步

完成内部设置

创建一个令用户愉悦的交互界面。确保系统之间的集成顺畅且数据流动稳定。

API2Cart 统一方法

举个例子:在 Magento 2 和 WooCommerce 原生 API 上创建产品需要多个请求,而使用 API2Cart 只需要一个统一的请求。

API2Cart 统一 API 调用

要求:

POST /v1.1/product.add.json?api_key=xxx&store_key=xxx HTTP/1.1
Content-Type: application/json
Accept: */*
Host: api.api2cart.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 308

{
  "name": "Test Product",
  "sku": "test-001",
  "description": "Test Product Description",
  "price": 103.50,
  "status": "enabled",
  "available_for_view": true,
  "special_price": 89.95,
  "quantity": 136,
  "manage_stock": true,
  "backorder_status": "allow",
  "weight": 1.231
}

回复:

HTTP/1.1 200 OK
Server: nginx/1.14.1
Date: Mon, 21 Jul 2025 20:53:06 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
{"return_code": 0,"result": {"product_id":"20"}}

要求:

GET /magento-2.4.0/rest/V1/store/storeViews HTTP/1.1
Host: www.stores.local
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
content-type: application/json
Authorization: OAuth oauth_consumer_key="0uhhig77uio82511tzfvv3ffidovtmif",oauth_token="pr1medk9ow89uad71fm9rwrirvq0vy5v",oauth_signature_method="HMAC-SHA256",oauth_version="1.0",oauth_timestamp="1753130948",oauth_nonce="db96b5fb727f205b80383ab337b35f65",oauth_signature="dI8BWGDxyUvE1od6W4AYbBKWVQ87777oORj1y9SFwqw%3D"

回复:

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2025 20:49:08 GMT
Server: Apache/2.4.52 (Ubuntu)
X-powered-by: PHP/7.2.34
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-frame-options: SAMEORIGIN
Set-cookie: PHPSESSID=c8glalm3ff4krsfgr4qf3an59p;
expires=Mon, 21-Jul-2025 21:49:08 GMT; Max-Age=3600; path=/magento-2.4.0; domain=www.stores.local; HttpOnly
X-ua-compatible: IE=edge
Connection: close
Content-type: application/json;
charset=utf-8

[{"id":1,"code":"default","name":"Default Store View","website_id":1,"store_group_id":1,"is_active":1},{"id":0,"code":"admin","name":"Admin","website_id":0,"store_group_id":0,"is_active":1}]

要求:

GET /magento-2.4.0/rest/V1/store/storeGroups HTTP/1.1
Host: www.stores.local
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
content-type: application/json
Authorization: OAuth oauth_consumer_key="0uhhig77uio82511tzfvv3ffidovtmif",oauth_token="pr1medk9ow89uad71fm9rwrirvq0vy5v",oauth_signature_method="HMAC-SHA256",oauth_version="1.0",oauth_timestamp="1753130948",oauth_nonce="bc469f9eaecb256aba5a30b09c1b6610",oauth_signature="xjkIviec2qz2uDFrMZT7vgL%2BPCSB1f5T3YRrbozlHBk%3D"

回复:

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2025 20:49:08 GMT
Server: Apache/2.4.52 (Ubuntu)
X-powered-by: PHP/7.2.34
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-frame-options: SAMEORIGIN
Set-cookie: PHPSESSID=huak8gqhi33fe1seu93ar0ecfl;
expires=Mon, 21-Jul-2025 21:49:09 GMT; Max-Age=3600; path=/magento-2.4.0; domain=www.stores.local; HttpOnly
X-ua-compatible: IE=edge
Connection: close
Content-type: application/json;
charset=utf-8

[{"id":0,"website_id":0,"root_category_id":0,"default_store_id":0,"name":"Default","code":"default"},{"id":1,"website_id":1,"root_category_id":2,"default_store_id":1,"name":"Main Website Store","code":"main_website_store"}]

要求:

GET /magento-2.4.0/rest/V1/store/storeConfigs HTTP/1.1
Host: www.stores.local
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
content-type: application/json
Authorization: OAuth oauth_consumer_key="0uhhig77uio82511tzfvv3ffidovtmif",oauth_token="pr1medk9ow89uad71fm9rwrirvq0vy5v",oauth_signature_method="HMAC-SHA256",oauth_version="1.0",oauth_timestamp="1753130949",oauth_nonce="62a3c61977952c40996aec2be780f853",oauth_signature="qsqPzSoCXz2zWSgePIwUTN3J1LxXJXX3G1HbpbDQV9k%3D"

回复:

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2025 20:49:09 GMT
Server: Apache/2.4.52 (Ubuntu)
X-powered-by: PHP/7.2.34
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-frame-options: SAMEORIGIN
Set-cookie: PHPSESSID=l24mvqgt2lubqul9i6cn06kgfl;
expires=Mon, 21-Jul-2025 21:49:09 GMT; Max-Age=3600; path=/magento-2.4.0; domain=www.stores.local; HttpOnly
X-ua-compatible: IE=edge
Connection: close
Content-type: application/json;
charset=utf-8

[{"id":1,"code":"default","website_id":1,"locale":"en_US","base_currency_code":"USD","default_display_currency_code":"USD","timezone":"America\/Los_Angeles","weight_unit":"lbs","base_url":"http:\/\/www.stores.local\/magento-2.4.0\/","base_link_url":"http:\/\/www.stores.local\/magento-2.4.0\/index.php\/","base_static_url":"http:\/\/www.stores.local\/magento-2.4.0\/pub\/static\/version1630311473\/","base_media_url":"http:\/\/www.stores.local\/magento-2.4.0\/pub\/media\/","secure_base_url":"https:\/\/www.stores.local\/magento-2.4.0\/","secure_base_link_url":"https:\/\/www.stores.local\/magento-2.4.0\/index.php\/","secure_base_static_url":"https:\/\/www.stores.local\/magento-2.4.0\/pub\/static\/version1630311473\/","secure_base_media_url":"https:\/\/www.stores.local\/magento-2.4.0\/pub\/media\/"}]

要求:

GET /magento-2.4.0/rest/V1/modules HTTP/1.1
Host: www.stores.local
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
content-type: application/json
Authorization: OAuth oauth_consumer_key="0uhhig77uio82511tzfvv3ffidovtmif",oauth_token="pr1medk9ow89uad71fm9rwrirvq0vy5v",oauth_signature_method="HMAC-SHA256",oauth_version="1.0",oauth_timestamp="1753130949",oauth_nonce="9a699b3f2dc2f09486f561883e6f6d99",oauth_signature="7zoz0PGL5fzE7fF61zWfo6GfSO%2F%2BW%2BZIkTEvqz81fGg%3D"

回复:

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2025 20:49:09 GMT
Server: Apache/2.4.52 (Ubuntu)
X-powered-by: PHP/7.2.34
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-frame-options: SAMEORIGIN
Set-cookie: PHPSESSID=2s3eabjt37769ouudhl1j5pao5;
expires=Mon, 21-Jul-2025 21:49:09 GMT; Max-Age=3600; path=/magento-2.4.0; domain=www.stores.local; HttpOnly
X-ua-compatible: IE=edge
Connection: close
Content-type: application/json;
charset=utf-8

["Magento_AdminAnalytics","Magento_Store","Magento_AdobeIms","Magento_AdobeImsApi","Magento_AdobeStockAdminUi","Magento_MediaGallery","Magento_AdobeStockAssetApi","Magento_AdobeStockClient","Magento_AdobeStockClientApi","Magento_AdobeStockImage","Magento_Directory","Magento_AdobeStockImageApi","Magento_AdvancedPricingImportExport","Magento_Theme","Magento_Amqp","Magento_AmqpStore","Magento_Config","Magento_Backend","Magento_Authorization","Magento_Search","Magento_Backup","Magento_Eav","Magento_Variable","Magento_BundleImportExport","Magento_CacheInvalidate","Magento_Customer","Magento_AdminNotification","Magento_Indexer","Magento_Security","Magento_GraphQl","Magento_EavGraphQl","Magento_Cms","Magento_CatalogImportExport","Magento_Catalog","Magento_CatalogInventory","Magento_Rule","Magento_Payment","Magento_CatalogRuleGraphQl","Magento_CatalogRule","Magento_CatalogUrlRewrite","Magento_StoreGraphQl","Magento_Widget","Magento_Quote","Magento_SalesSequence","Magento_CheckoutAgreementsGraphQl","Magento_MediaGalleryUi","Magento_CmsGraphQl","Magento_CmsUrlRewrite","Magento_CmsUrlRewriteGraphQl","Magento_ComposerRootUpdatePlugin","Magento_User","Magento_Msrp","Magento_Sales","Magento_CatalogGraphQl","Magento_Checkout","Magento_Contact","Magento_Cookie","Magento_Cron","Magento_Csp","Magento_CurrencySymbol","Magento_CatalogCustomerGraphQl","Magento_Integration","Magento_Downloadable","Magento_CustomerGraphQl","Magento_CustomerImportExport","Magento_Deploy","Magento_Developer","Magento_Dhl","Magento_Captcha","Magento_DirectoryGraphQl","Magento_QuoteGraphQl","Magento_DownloadableGraphQl","Magento_ImportExport","Magento_ConfigurableProduct","Magento_BundleGraphQl","Magento_CatalogSearch","Magento_AdvancedSearch","Magento_Elasticsearch","Magento_Email","Magento_EncryptionKey","Magento_Fedex","Magento_GiftMessage","Magento_GoogleAdwords","Magento_GoogleAnalytics","Magento_Ui","Magento_GoogleShoppingAds","Magento_CatalogCmsGraphQl","Magento_PageCache","Magento_GroupedProduct","Magento_GroupedImportExport","Magento_GroupedCatalogInventory","Magento_GroupedProductGraphQl","Magento_DownloadableImportExport","Magento_Bundle","Magento_InstantPurchase","Magento_Analytics","Magento_Inventory","Magento_InventoryAdminUi","Magento_InventoryAdvancedCheckout","Magento_InventoryApi","Magento_InventoryBundleImportExport","Magento_InventoryBundleProduct","Magento_InventoryBundleProductAdminUi","Magento_InventoryBundleProductIndexer","Magento_InventoryCatalog","Magento_InventorySales","Magento_InventoryCatalogAdminUi","Magento_InventoryCatalogApi","Magento_InventoryCatalogSearch","Magento_InventoryConfigurableProduct","Magento_InventoryConfigurableProductAdminUi","Magento_InventoryConfigurableProductIndexer","Magento_InventoryConfiguration","Magento_InventoryConfigurationApi","Magento_InventoryDistanceBasedSourceSelection","Magento_InventoryDistanceBasedSourceSelectionAdminUi","Magento_InventoryDistanceBasedSourceSelectionApi","Magento_InventoryElasticsearch","Magento_InventoryExportStockApi","Magento_InventoryIndexer","Magento_InventorySalesApi","Magento_InventoryGroupedProduct","Magento_InventoryGroupedProductAdminUi","Magento_InventoryGroupedProductIndexer","Magento_InventoryImportExport","Magento_InventoryInStorePickupApi","Magento_InventoryInStorePickupAdminUi","Magento_InventorySourceSelectionApi","Magento_InventoryInStorePickup","Magento_InventoryInStorePickupGraphQl","Magento_Shipping","Magento_InventoryInStorePickupShippingApi","Magento_InventoryInStorePickupQuoteGraphQl","Magento_InventoryInStorePickupSales","Magento_InventoryInStorePickupSalesApi","Magento_InventoryInStorePickupQuote","Magento_InventoryInStorePickupShipping","Magento_InventoryInStorePickupShippingAdminUi","Magento_Multishipping","Magento_Webapi","Magento_InventoryCache","Magento_InventoryLowQuantityNotification","Magento_Reports","Magento_InventoryLowQuantityNotificationApi","Magento_InventoryMultiDimensionalIndexerApi","Magento_InventoryProductAlert","Magento_InventoryRequisitionList","Magento_InventoryReservations","Magento_InventoryReservationCli","Magento_InventoryReservationsApi","Magento_InventoryExportStock","Magento_InventorySalesAdminUi","Magento_CatalogInventoryGraphQl","Magento_InventorySalesFrontendUi","Magento_InventorySetupFixtureGenerator","Magento_InventoryShipping","Magento_InventoryShippingAdminUi","Magento_InventorySourceDeductionApi","Magento_InventorySourceSelection","Magento_InventoryInStorePickupFrontend","Magento_LayeredNavigation","Magento_LoginAsCustomer","Magento_LoginAsCustomerAdminUi","Magento_LoginAsCustomerApi","Magento_LoginAsCustomerFrontendUi","Magento_LoginAsCustomerLog","Magento_LoginAsCustomerPageCache","Magento_LoginAsCustomerQuote","Magento_LoginAsCustomerSales","Magento_Marketplace","Magento_MediaContent","Magento_MediaContentApi","Magento_MediaContentCatalog","Magento_MediaContentCms","Magento_MediaContentSynchronization","Magento_MediaContentSynchronizationApi","Magento_MediaContentSynchronizationCatalog","Magento_MediaContentSynchronizationCms","Magento_AdobeStockAsset","Magento_MediaGalleryApi","Magento_MediaGalleryCatalog","Magento_MediaGalleryIntegration","Magento_MediaGallerySynchronization","Magento_MediaGallerySynchronizationApi","Magento_AdobeStockImageAdminUi","Magento_MediaGalleryUiApi","Magento_MediaStorage","Magento_MessageQueue","Magento_CatalogRuleConfigurable","Magento_MsrpConfigurableProduct","Magento_MsrpGroupedProduct","Magento_InventoryInStorePickupMultishipping","Magento_MysqlMq","Magento_NewRelicReporting","Magento_Newsletter","Magento_OfflinePayments","Magento_SalesRule","Magento_GraphQlCache","Magento_CardinalCommerce","Magento_Vault","Magento_Paypal","Magento_PaypalGraphQl","Magento_Persistent","Magento_ProductAlert","Magento_ProductVideo","Magento_CheckoutAgreements","Magento_QuoteAnalytics","Magento_ConfigurableProductGraphQl","Magento_ReCaptchaAdminUi","Magento_ReCaptchaCheckout","Magento_ReCaptchaContact","Magento_ReCaptchaCustomer","Magento_ReCaptchaFrontendUi","Magento_ReCaptchaMigration","Magento_ReCaptchaNewsletter","Magento_ReCaptchaPaypal","Magento_ReCaptchaReview","Magento_ReCaptchaSendFriend","Magento_ReCaptchaUi","Magento_ReCaptchaUser","Magento_ReCaptchaValidation","Magento_ReCaptchaValidationApi","Magento_ReCaptchaVersion2Checkbox","Magento_ReCaptchaVersion2Invisible","Magento_ReCaptchaVersion3Invisible","Magento_RelatedProductGraphQl","Magento_ReleaseNotification","Magento_InventoryLowQuantityNotificationAdminUi","Magento_RequireJs","Magento_Review","Magento_ReviewAnalytics","Magento_Robots","Magento_Rss","Magento_Elasticsearch6","Magento_ConfigurableProductSales","Magento_SalesAnalytics","Magento_SalesGraphQl","Magento_SalesInventory","Magento_OfflineShipping","Magento_ConfigurableImportExport","Magento_UrlRewrite","Magento_Elasticsearch7","Magento_CustomerAnalytics","Magento_Securitytxt","Magento_SendFriend","Magento_SendFriendGraphQl","Magento_InventoryInStorePickupSalesAdminUi","Magento_Sitemap","Magento_UrlRewriteGraphQl","Magento_CustomerDownloadableGraphQl","Magento_Swagger","Magento_SwaggerWebapi","Magento_SwaggerWebapiAsync","Magento_Swatches","Magento_SwatchesGraphQl","Magento_SwatchesLayeredNavigation","Magento_Tax","Magento_TaxGraphQl","Magento_TaxImportExport","Magento_AsynchronousOperations","Magento_ThemeGraphQl","Magento_Tinymce3","Magento_Translation","Magento_GoogleOptimizer","Magento_Ups","Magento_SampleData","Magento_CatalogUrlRewriteGraphQl","Magento_CatalogAnalytics","Magento_Usps","Magento_InventoryGraphQl","Magento_PaypalCaptcha","Magento_VaultGraphQl","Magento_Version","Magento_InventoryInStorePickupWebapiExtension","Magento_WebapiAsync","Magento_WebapiSecurity","Magento_Weee","Magento_WeeeGraphQl","Magento_CatalogWidget","Magento_Wishlist","Magento_WishlistAnalytics","Magento_WishlistGraphQl","A2C_LiveShippingRates","Amazon_Core","Amazon_Login","Amazon_Payment","Api2cart_BridgeConnector","Dotdigitalgroup_Email","Dotdigitalgroup_Chat","Klarna_Core","Klarna_Ordermanagement","Klarna_Onsitemessaging","Klarna_Kp","PayPal_Braintree","PayPal_BraintreeGraphQl","Temando_ShippingRemover","Vertex_Tax","Vertex_AddressValidation","Yotpo_Yotpo"]

要求:

GET /magento-2.4.0/rest/V1/inventory/sources HTTP/1.1
Host: www.stores.local
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
content-type: application/json
Authorization: OAuth oauth_consumer_key="0uhhig77uio82511tzfvv3ffidovtmif",oauth_token="pr1medk9ow89uad71fm9rwrirvq0vy5v",oauth_signature_method="HMAC-SHA256",oauth_version="1.0",oauth_timestamp="1753130949",oauth_nonce="8f9b41f9f3d26e3d7b2efaa658e2173d",oauth_signature="o8J4PHAUeIK5lTiC48%2BkskNwj%2Fp3gSEwPoFWNkgo3t8%3D"

回复:

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2025 20:49:09 GMT
Server: Apache/2.4.52 (Ubuntu)
X-powered-by: PHP/7.2.34
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-frame-options: SAMEORIGIN
Set-cookie: PHPSESSID=a9h8k64sqosuvj7kdkgk64mm36;
expires=Mon, 21-Jul-2025 21:49:10 GMT; Max-Age=3600; path=/magento-2.4.0; domain=www.stores.local; HttpOnly
X-ua-compatible: IE=edge
Connection: close
Content-type: application/json;
charset=utf-8

{"items":[{"source_code":"default","name":"Default Source","enabled":true,"description":"Default Source","latitude":0,"longitude":0,"country_id":"US","postcode":"00000","use_default_carrier_config":true,"carrier_links":[],"extension_attributes":{"is_pickup_location_active":false,"frontend_name":""}},{"source_code":"ua-warehouse","name":"UA warehouse","email":"[email protected]","contact_name":"Carla Stone","enabled":true,"country_id":"UA","region":"Ternopilska obl.","city":"Ternopil","street":"Biletska st., 56","postcode":"46000","phone":"7406014577","use_default_carrier_config":true,"carrier_links":[],"extension_attributes":{"is_pickup_location_active":false,"frontend_name":"UA warehouse"}},{"source_code":"us-warehouse","name":"US Warehouse","enabled":true,"country_id":"US","region_id":1,"region":"Alabama","city":"Columbus","street":"3717  Jessie Street","postcode":"43215","use_default_carrier_config":true,"carrier_links":[],"extension_attributes":{"is_pickup_location_active":false,"frontend_name":"US Warehouse"}}],"search_criteria":{"filter_groups":[]},"total_count":3}

要求:

GET /magento-2.4.0/rest/V1/inventory/stocks HTTP/1.1
Host: www.stores.local
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
content-type: application/json
Authorization: OAuth oauth_consumer_key="0uhhig77uio82511tzfvv3ffidovtmif",oauth_token="pr1medk9ow89uad71fm9rwrirvq0vy5v",oauth_signature_method="HMAC-SHA256",oauth_version="1.0",oauth_timestamp="1753130950",oauth_nonce="64ede959da091b8ac26562578f112f95",oauth_signature="aROz6RUg81Q%2FR8%2B%2FFnIbT9eBCcKc45hYNy2qk%2FNbgTI%3D"

回复:

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2025 20:49:10 GMT
Server: Apache/2.4.52 (Ubuntu)
X-powered-by: PHP/7.2.34
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-frame-options: SAMEORIGIN
Set-cookie: PHPSESSID=harbpfl3irm7p7eeiukorvnf6i;
expires=Mon, 21-Jul-2025 21:49:10 GMT; Max-Age=3600; path=/magento-2.4.0; domain=www.stores.local; HttpOnly
X-ua-compatible: IE=edge
Connection: close
Content-type: application/json;
charset=utf-8

{"items":[{"stock_id":1,"name":"Default Stock","extension_attributes":{"sales_channels":[]}},{"stock_id":2,"name":"Stock2","extension_attributes":{"sales_channels":[{"type":"website","code":"base"}]}}],"search_criteria":{"filter_groups":[]},"total_count":2}

要求:

GET /magento-2.4.0/rest/V1/inventory/stock-source-links?searchCriteria[filter_groups][0][filters][0][field]=stock_id&searchCriteria[filter_groups][0][filters][0][value]=1,2&searchCriteria[filter_groups][0][filters][0][condition_type]=in HTTP/1.1
Host: www.stores.local
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
content-type: application/json
Authorization: OAuth oauth_consumer_key="0uhhig77uio82511tzfvv3ffidovtmif",oauth_token="pr1medk9ow89uad71fm9rwrirvq0vy5v",oauth_signature_method="HMAC-SHA256",oauth_version="1.0",oauth_timestamp="1753130950",oauth_nonce="68b2634c96d06857057027628c25d0ed",oauth_signature="bB%2BfbDVcQ2JwhCEzWGkZhTzLAVI5rvyt6s9b6Wd9Xxk%3D"

回复:

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2025 20:49:10 GMT
Server: Apache/2.4.52 (Ubuntu)
X-powered-by: PHP/7.2.34
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-frame-options: SAMEORIGIN
Set-cookie: PHPSESSID=vk32vke51l6nsjk7gueq4lnl2c;
expires=Mon, 21-Jul-2025 21:49:10 GMT; Max-Age=3600; path=/magento-2.4.0; domain=www.stores.local; HttpOnly
X-ua-compatible: IE=edge
Connection: close
Content-type: application/json;
charset=utf-8

{"items":[{"stock_id":1,"source_code":"default","priority":1},{"stock_id":2,"source_code":"ua-warehouse","priority":2},{"stock_id":2,"source_code":"us-warehouse","priority":4}],"search_criteria":{"filter_groups":[{"filters":[{"field":"stock_id","value":"1,2","condition_type":"in"}]}]},"total_count":3}

要求:

GET /magento-2.4.0/rest/default/V1/products?searchCriteria[pageSize]=1&searchCriteria[currentPage]=1&searchCriteria[filterGroups][0][filters][0][field]=sku&searchCriteria[filterGroups][0][filters][0][value]=test-001&searchCriteria[filterGroups][0][filters][0][condition_type]=eq HTTP/1.1
Host: www.stores.local
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
content-type: application/json
Authorization: OAuth oauth_consumer_key="0uhhig77uio82511tzfvv3ffidovtmif",oauth_token="pr1medk9ow89uad71fm9rwrirvq0vy5v",oauth_signature_method="HMAC-SHA256",oauth_version="1.0",oauth_timestamp="1753130950",oauth_nonce="e5c6dfce09af1e7bf68cd978bc29b960",oauth_signature="FgephZPd6hhHKRH0fmBIuhPgz7QnHsQW0YbF0E2Bajs%3D"

回复:

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2025 20:49:10 GMT
Server: Apache/2.4.52 (Ubuntu)
X-powered-by: PHP/7.2.34
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-frame-options: SAMEORIGIN
Set-cookie: PHPSESSID=dg7cldngpcvs2saofmsd2mo5s0;
expires=Mon, 21-Jul-2025 21:49:11 GMT; Max-Age=3600; path=/magento-2.4.0; domain=www.stores.local; HttpOnly
X-ua-compatible: IE=edge
Connection: close
Content-type: application/json;
charset=utf-8

{"items":[],"search_criteria":{"filter_groups":[{"filters":[{"field":"sku","value":"test-001","condition_type":"eq"}]}],"page_size":1,"current_page":1},"total_count":0}

要求:

GET /magento-2.4.0/rest/default/V1/products/attribute-sets/sets/list?searchCriteria=0 HTTP/1.1
Host: www.stores.local
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
content-type: application/json
Authorization: OAuth oauth_consumer_key="0uhhig77uio82511tzfvv3ffidovtmif",oauth_token="pr1medk9ow89uad71fm9rwrirvq0vy5v",oauth_signature_method="HMAC-SHA256",oauth_version="1.0",oauth_timestamp="1753130951",oauth_nonce="67fe4bc82183f7352896410a0ca2d03b",oauth_signature="%2FFEePJ8b06nQ1sKremwpqOk5aZiOdB7Ca4iyRcNxdoM%3D"

回复:

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2025 20:49:11 GMT
Server: Apache/2.4.52 (Ubuntu)
X-powered-by: PHP/7.2.34
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-frame-options: SAMEORIGIN
Set-cookie: PHPSESSID=81abns1oecolq0vsk658bpptja;
expires=Mon, 21-Jul-2025 21:49:11 GMT; Max-Age=3600; path=/magento-2.4.0; domain=www.stores.local; HttpOnly
X-ua-compatible: IE=edge
Connection: close
Content-type: application/json;
charset=utf-8

{"items":[{"attribute_set_id":9,"attribute_set_name":"apparel","sort_order":0,"entity_type_id":4},{"attribute_set_id":4,"attribute_set_name":"Default","sort_order":1,"entity_type_id":4}],"search_criteria":{"filter_groups":[]},"total_count":2}

要求:

POST /magento-2.4.0/rest/default/V1/products HTTP/1.1
Host: www.stores.local
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
content-type: application/json
Authorization: OAuth oauth_consumer_key="0uhhig77uio82511tzfvv3ffidovtmif",oauth_token="pr1medk9ow89uad71fm9rwrirvq0vy5v",oauth_signature_method="HMAC-SHA256",oauth_version="1.0",oauth_timestamp="1753130951",oauth_nonce="a38af94ce8a1833db4653fe220a24293",oauth_signature="NcdN3Y5SQEKTUoJxkb6PcuE1Re8%2Bfl8fV4T0VZDeCMc%3D"
Content-Length: 926

{"product":{"sku":"test-001","name":"Test Product","price":103.5,"created_at":"2025-07-21 13:49:09","attribute_set_id":4,"custom_attributes":[{"attribute_code":"description","value":"Test Product Description"},{"attribute_code":"special_price","value":89.95}],"status":1,"type_id":"simple","weight":1.231,"extension_attributes":{"stock_item":{"qty":136,"enable_qty_increments":false,"is_decimal_divided":false,"is_in_stock":true,"is_qty_decimal":false,"low_stock_date":null,"max_sale_qty":10000,"min_qty":0,"min_sale_qty":1,"notify_stock_qty":1,"qty_increments":0,"show_default_notification_message":false,"stock_status_changed_auto":0,"use_config_enable_qty_inc":true,"manage_stock":"True","use_config_manage_stock":false,"use_config_max_sale_qty":true,"use_config_min_qty":true,"use_config_min_sale_qty":1,"use_config_notify_stock_qty":true,"use_config_qty_increments":true,"use_config_backorders":false,"backorders":"1"}}}}

回复:

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2025 20:49:11 GMT
Server: Apache/2.4.52 (Ubuntu)
X-powered-by: PHP/7.2.34
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-frame-options: SAMEORIGIN
Set-cookie: PHPSESSID=s10ff447u8hi1gcoch4mvjj842;
expires=Mon, 21-Jul-2025 21:49:11 GMT; Max-Age=3600; path=/magento-2.4.0; domain=www.stores.local; HttpOnly
X-ua-compatible: IE=edge
Connection: close
Content-type: application/json;
charset=utf-8

{"id":282,"sku":"test-001","name":"Test Product","attribute_set_id":4,"price":103.5,"status":1,"visibility":4,"type_id":"simple","created_at":"2025-07-21 13:49:09","updated_at":"2025-07-21 20:49:12","weight":1.231,"extension_attributes":{"website_ids":[1],"stock_item":{"item_id":282,"product_id":282,"stock_id":1,"qty":136,"is_in_stock":true,"is_qty_decimal":false,"show_default_notification_message":false,"use_config_min_qty":true,"min_qty":0,"use_config_min_sale_qty":1,"min_sale_qty":1,"use_config_max_sale_qty":true,"max_sale_qty":10000,"use_config_backorders":false,"backorders":1,"use_config_notify_stock_qty":true,"notify_stock_qty":1,"use_config_qty_increments":true,"qty_increments":0,"use_config_enable_qty_inc":true,"enable_qty_increments":false,"use_config_manage_stock":true,"low_stock_date":null,"is_decimal_divided":false,"stock_status_changed_auto":0}},"options":[],"media_gallery_entries":[],"custom_attributes":[{"attribute_code":"special_price","value":"89.950000"},{"attribute_code":"special_from_date","value":"2025-07-21 00:00:00"},{"attribute_code":"options_container","value":"container2"},{"attribute_code":"url_key","value":"test-product"},{"attribute_code":"msrp_display_actual_price_type","value":"0"},{"attribute_code":"required_options","value":"0"},{"attribute_code":"has_options","value":"0"},{"attribute_code":"tax_class_id","value":"2"},{"attribute_code":"category_ids","value":[]},{"attribute_code":"description","value":"Test Product Description"}]}

要求:

POST /magento-2.4.0/rest/default/V1/inventory/source-items HTTP/1.1
Host: www.stores.local
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
content-type: application/json
Authorization: OAuth oauth_consumer_key="0uhhig77uio82511tzfvv3ffidovtmif",oauth_token="pr1medk9ow89uad71fm9rwrirvq0vy5v",oauth_signature_method="HMAC-SHA256",oauth_version="1.0",oauth_timestamp="1753130952",oauth_nonce="fbb77260f1b4a164c411b6a7afbd8051",oauth_signature="FsZkbuZDBvO5v%2FwMV9sKCUqr9VgryDrnkQWwEful%2FbY%3D"
Content-Length: 91

{"sourceItems":[{"sku":"test-001","source_code":"ua-warehouse","status":1,"quantity":136}]}

回复:

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2025 20:49:12 GMT
Server: Apache/2.4.52 (Ubuntu)
X-powered-by: PHP/7.2.34
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-frame-options: SAMEORIGIN
Set-cookie: PHPSESSID=eom2obkjaqs7o8te745kd7jgtu;
expires=Mon, 21-Jul-2025 21:49:12 GMT; Max-Age=3600; path=/magento-2.4.0; domain=www.stores.local; HttpOnly
X-ua-compatible: IE=edge
Connection: close
Content-type: application/json;
charset=utf-8

[]

要求:

POST /magento-2.4.0/rest/default/V1/inventory/source-items-delete HTTP/1.1
Host: www.stores.local
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
content-type: application/json
Authorization: OAuth oauth_consumer_key="0uhhig77uio82511tzfvv3ffidovtmif",oauth_token="pr1medk9ow89uad71fm9rwrirvq0vy5v",oauth_signature_method="HMAC-SHA256",oauth_version="1.0",oauth_timestamp="1753130953",oauth_nonce="dbb81017555f41a32ea76c120205a533",oauth_signature="40Ww1pMR7BSrvai%2FWbrPWDm8xayeyUWoXsQiEz63x5I%3D"
Content-Length: 86

{"sourceItems":[{"sku":"test-001","source_code":"default","status":1,"quantity":136}]}

回复:

HTTP/1.1 200 OK
Date: Mon, 21 Jul 2025 20:49:13 GMT
Server: Apache/2.4.52 (Ubuntu)
X-powered-by: PHP/7.2.34
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-frame-options: SAMEORIGIN
Set-cookie: PHPSESSID=0lejai88lgp6he9nnhb2s73190;
expires=Mon, 21-Jul-2025 21:49:13 GMT; Max-Age=3600; path=/magento-2.4.0; domain=www.stores.local; HttpOnly
X-ua-compatible: IE=edge
Connection: close
Content-type: application/json; charset=utf-8

[]

关于集成购物平台有疑问吗?

API2Cart 简化了复杂的购物车 API 集成。 在下方可以找到针对最常见的技术和业务相关问题的解答。

仍需帮助?阅读更多 常见问题 (FAQs)

我可以在付费前进行测试吗?

可以。您可以注册 14 天免费试用,连接测试或真实商店, 并进行真实的 API 调用以查看其工作原理。

API2Cart 安全吗?

是的。所有数据传输均通过 HTTPS 加密,并使用 API 密钥身份验证进行保护。 我们不存储或缓存任何商店数据——数据直接在您的软件和购物车之间传输。

谁来处理平台更新和变更?

由我们处理。API2Cart 负责后端所有平台 API 的更新和维护。 您无需担心维护问题。

准备好使用统一 API 更快地集成电子商务平台了吗?

免费开始使用

不确定 API2Cart 是否适合您?联系我们的团队, 了解 API2Cart 如何满足您的集成需求。

值得信赖