Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

API2Cart SDK for PHP makes it easy to interact with API2Cart API from your PHP application and build a robust integration with eCommerce platforms

Notifications You must be signed in to change notification settings

api2cart/php-sdk

Repository files navigation

OpenAPIClient-php

API2Cart

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
 "repositories": [
 {
 "type": "vcs",
 "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
 }
 ],
 "require": {
 "GIT_USER_ID/GIT_REPO_ID": "*@dev"
 }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\AccountApi(
 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
 // This is optional, `GuzzleHttp\Client` will be used as default.
 new GuzzleHttp\Client(),
 $config
);
$account_cart_add = new \OpenAPI\Client\Model\AccountCartAdd(); // \OpenAPI\Client\Model\AccountCartAdd
try {
 $result = $apiInstance->accountCartAdd($account_cart_add);
 print_r($result);
} catch (Exception $e) {
 echo 'Exception when calling AccountApi->accountCartAdd: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.api2cart.local.com/v1.1

Class Method HTTP request Description
AccountApi accountCartAdd POST /account.cart.add.json account.cart.add
AccountApi accountCartList GET /account.cart.list.json account.cart.list
AccountApi accountConfigUpdate PUT /account.config.update.json account.config.update
AccountApi accountFailedWebhooks GET /account.failed_webhooks.json account.failed_webhooks
AccountApi accountSupportedPlatforms GET /account.supported_platforms.json account.supported_platforms
AttributeApi attributeAdd POST /attribute.add.json attribute.add
AttributeApi attributeAssignGroup POST /attribute.assign.group.json attribute.assign.group
AttributeApi attributeAssignSet POST /attribute.assign.set.json attribute.assign.set
AttributeApi attributeAttributesetList GET /attribute.attributeset.list.json attribute.attributeset.list
AttributeApi attributeCount GET /attribute.count.json attribute.count
AttributeApi attributeDelete DELETE /attribute.delete.json attribute.delete
AttributeApi attributeGroupList GET /attribute.group.list.json attribute.group.list
AttributeApi attributeInfo GET /attribute.info.json attribute.info
AttributeApi attributeList GET /attribute.list.json attribute.list
AttributeApi attributeTypeList GET /attribute.type.list.json attribute.type.list
AttributeApi attributeUnassignGroup POST /attribute.unassign.group.json attribute.unassign.group
AttributeApi attributeUnassignSet POST /attribute.unassign.set.json attribute.unassign.set
AttributeApi attributeUpdate PUT /attribute.update.json attribute.update
AttributeApi attributeValueAdd POST /attribute.value.add.json attribute.value.add
AttributeApi attributeValueDelete DELETE /attribute.value.delete.json attribute.value.delete
AttributeApi attributeValueUpdate PUT /attribute.value.update.json attribute.value.update
BasketApi basketInfo GET /basket.info.json basket.info
BasketApi basketItemAdd POST /basket.item.add.json basket.item.add
BasketApi basketLiveShippingServiceCreate POST /basket.live_shipping_service.create.json basket.live_shipping_service.create
BasketApi basketLiveShippingServiceDelete DELETE /basket.live_shipping_service.delete.json basket.live_shipping_service.delete
BasketApi basketLiveShippingServiceList GET /basket.live_shipping_service.list.json basket.live_shipping_service.list
BatchApi batchJobList GET /batch.job.list.json batch.job.list
BatchApi batchJobResult GET /batch.job.result.json batch.job.result
BridgeApi bridgeDelete POST /bridge.delete.json bridge.delete
BridgeApi bridgeDownload GET /bridge.download.file bridge.download
BridgeApi bridgeUpdate POST /bridge.update.json bridge.update
CartApi cartCatalogPriceRulesCount GET /cart.catalog_price_rules.count.json cart.catalog_price_rules.count
CartApi cartCatalogPriceRulesList GET /cart.catalog_price_rules.list.json cart.catalog_price_rules.list
CartApi cartCouponAdd POST /cart.coupon.add.json cart.coupon.add
CartApi cartCouponConditionAdd POST /cart.coupon.condition.add.json cart.coupon.condition.add
CartApi cartCouponCount GET /cart.coupon.count.json cart.coupon.count
CartApi cartCouponDelete DELETE /cart.coupon.delete.json cart.coupon.delete
CartApi cartCouponList GET /cart.coupon.list.json cart.coupon.list
CartApi cartDelete DELETE /cart.delete.json cart.delete
CartApi cartGiftcardAdd POST /cart.giftcard.add.json cart.giftcard.add
CartApi cartGiftcardCount GET /cart.giftcard.count.json cart.giftcard.count
CartApi cartGiftcardDelete DELETE /cart.giftcard.delete.json cart.giftcard.delete
CartApi cartGiftcardList GET /cart.giftcard.list.json cart.giftcard.list
CartApi cartInfo GET /cart.info.json cart.info
CartApi cartMetaDataList GET /cart.meta_data.list.json cart.meta_data.list
CartApi cartMetaDataSet POST /cart.meta_data.set.json cart.meta_data.set
CartApi cartMetaDataUnset DELETE /cart.meta_data.unset.json cart.meta_data.unset
CartApi cartMethods GET /cart.methods.json cart.methods
CartApi cartPluginList GET /cart.plugin.list.json cart.plugin.list
CartApi cartScriptAdd POST /cart.script.add.json cart.script.add
CartApi cartScriptDelete DELETE /cart.script.delete.json cart.script.delete
CartApi cartScriptList GET /cart.script.list.json cart.script.list
CartApi cartShippingZonesList GET /cart.shipping_zones.list.json cart.shipping_zones.list
CartApi cartValidate GET /cart.validate.json cart.validate
CategoryApi categoryAdd POST /category.add.json category.add
CategoryApi categoryAddBatch POST /category.add.batch.json category.add.batch
CategoryApi categoryAssign POST /category.assign.json category.assign
CategoryApi categoryCount GET /category.count.json category.count
CategoryApi categoryDelete DELETE /category.delete.json category.delete
CategoryApi categoryFind GET /category.find.json category.find
CategoryApi categoryImageAdd POST /category.image.add.json category.image.add
CategoryApi categoryImageDelete DELETE /category.image.delete.json category.image.delete
CategoryApi categoryInfo GET /category.info.json category.info
CategoryApi categoryList GET /category.list.json category.list
CategoryApi categoryUnassign POST /category.unassign.json category.unassign
CategoryApi categoryUpdate PUT /category.update.json category.update
CustomerApi customerAdd POST /customer.add.json customer.add
CustomerApi customerAddressAdd POST /customer.address.add.json customer.address.add
CustomerApi customerAttributeList GET /customer.attribute.list.json customer.attribute.list
CustomerApi customerCount GET /customer.count.json customer.count
CustomerApi customerDelete DELETE /customer.delete.json customer.delete
CustomerApi customerFind GET /customer.find.json customer.find
CustomerApi customerGroupAdd POST /customer.group.add.json customer.group.add
CustomerApi customerGroupList GET /customer.group.list.json customer.group.list
CustomerApi customerInfo GET /customer.info.json customer.info
CustomerApi customerList GET /customer.list.json customer.list
CustomerApi customerUpdate PUT /customer.update.json customer.update
CustomerApi customerWishlistList GET /customer.wishlist.list.json customer.wishlist.list
MarketplaceApi marketplaceProductFind GET /marketplace.product.find.json marketplace.product.find
OrderApi orderAbandonedList GET /order.abandoned.list.json order.abandoned.list
OrderApi orderAdd POST /order.add.json order.add
OrderApi orderCalculate POST /order.calculate.json order.calculate
OrderApi orderCount GET /order.count.json order.count
OrderApi orderFinancialStatusList GET /order.financial_status.list.json order.financial_status.list
OrderApi orderFulfillmentStatusList GET /order.fulfillment_status.list.json order.fulfillment_status.list
OrderApi orderInfo GET /order.info.json order.info
OrderApi orderList GET /order.list.json order.list
OrderApi orderPreestimateShippingList POST /order.preestimate_shipping.list.json order.preestimate_shipping.list
OrderApi orderRefundAdd POST /order.refund.add.json order.refund.add
OrderApi orderReturnAdd POST /order.return.add.json order.return.add
OrderApi orderReturnDelete DELETE /order.return.delete.json order.return.delete
OrderApi orderReturnUpdate PUT /order.return.update.json order.return.update
OrderApi orderShipmentAdd POST /order.shipment.add.json order.shipment.add
OrderApi orderShipmentAddBatch POST /order.shipment.add.batch.json order.shipment.add.batch
OrderApi orderShipmentDelete DELETE /order.shipment.delete.json order.shipment.delete
OrderApi orderShipmentInfo GET /order.shipment.info.json order.shipment.info
OrderApi orderShipmentList GET /order.shipment.list.json order.shipment.list
OrderApi orderShipmentTrackingAdd POST /order.shipment.tracking.add.json order.shipment.tracking.add
OrderApi orderShipmentUpdate PUT /order.shipment.update.json order.shipment.update
OrderApi orderStatusList GET /order.status.list.json order.status.list
OrderApi orderTransactionList GET /order.transaction.list.json order.transaction.list
OrderApi orderUpdate PUT /order.update.json order.update
ProductApi productAdd POST /product.add.json product.add
ProductApi productAddBatch POST /product.add.batch.json product.add.batch
ProductApi productAttributeList GET /product.attribute.list.json product.attribute.list
ProductApi productAttributeValueSet POST /product.attribute.value.set.json product.attribute.value.set
ProductApi productAttributeValueUnset POST /product.attribute.value.unset.json product.attribute.value.unset
ProductApi productBrandList GET /product.brand.list.json product.brand.list
ProductApi productChildItemFind GET /product.child_item.find.json product.child_item.find
ProductApi productChildItemInfo GET /product.child_item.info.json product.child_item.info
ProductApi productChildItemList GET /product.child_item.list.json product.child_item.list
ProductApi productCount GET /product.count.json product.count
ProductApi productCurrencyAdd POST /product.currency.add.json product.currency.add
ProductApi productCurrencyList GET /product.currency.list.json product.currency.list
ProductApi productDelete DELETE /product.delete.json product.delete
ProductApi productDeleteBatch POST /product.delete.batch.json product.delete.batch
ProductApi productFind GET /product.find.json product.find
ProductApi productImageAdd POST /product.image.add.json product.image.add
ProductApi productImageDelete DELETE /product.image.delete.json product.image.delete
ProductApi productImageUpdate PUT /product.image.update.json product.image.update
ProductApi productInfo GET /product.info.json product.info
ProductApi productList GET /product.list.json product.list
ProductApi productManufacturerAdd POST /product.manufacturer.add.json product.manufacturer.add
ProductApi productOptionAdd POST /product.option.add.json product.option.add
ProductApi productOptionAssign POST /product.option.assign.json product.option.assign
ProductApi productOptionDelete DELETE /product.option.delete.json product.option.delete
ProductApi productOptionList GET /product.option.list.json product.option.list
ProductApi productOptionValueAdd POST /product.option.value.add.json product.option.value.add
ProductApi productOptionValueAssign POST /product.option.value.assign.json product.option.value.assign
ProductApi productOptionValueDelete DELETE /product.option.value.delete.json product.option.value.delete
ProductApi productOptionValueUpdate PUT /product.option.value.update.json product.option.value.update
ProductApi productPriceAdd POST /product.price.add.json product.price.add
ProductApi productPriceDelete DELETE /product.price.delete.json product.price.delete
ProductApi productPriceUpdate PUT /product.price.update.json product.price.update
ProductApi productReviewList GET /product.review.list.json product.review.list
ProductApi productStoreAssign POST /product.store.assign.json product.store.assign
ProductApi productTaxAdd POST /product.tax.add.json product.tax.add
ProductApi productUpdate PUT /product.update.json product.update
ProductApi productUpdateBatch POST /product.update.batch.json product.update.batch
ProductApi productVariantAdd POST /product.variant.add.json product.variant.add
ProductApi productVariantAddBatch POST /product.variant.add.batch.json product.variant.add.batch
ProductApi productVariantDelete DELETE /product.variant.delete.json product.variant.delete
ProductApi productVariantDeleteBatch POST /product.variant.delete.batch.json product.variant.delete.batch
ProductApi productVariantImageAdd POST /product.variant.image.add.json product.variant.image.add
ProductApi productVariantImageDelete DELETE /product.variant.image.delete.json product.variant.image.delete
ProductApi productVariantPriceAdd POST /product.variant.price.add.json product.variant.price.add
ProductApi productVariantPriceDelete DELETE /product.variant.price.delete.json product.variant.price.delete
ProductApi productVariantPriceUpdate PUT /product.variant.price.update.json product.variant.price.update
ProductApi productVariantUpdate PUT /product.variant.update.json product.variant.update
ProductApi productVariantUpdateBatch POST /product.variant.update.batch.json product.variant.update.batch
ReturnApi returnActionList GET /return.action.list.json return.action.list
ReturnApi returnCount GET /return.count.json return.count
ReturnApi returnInfo GET /return.info.json return.info
ReturnApi returnList GET /return.list.json return.list
ReturnApi returnReasonList GET /return.reason.list.json return.reason.list
ReturnApi returnStatusList GET /return.status.list.json return.status.list
SubscriberApi subscriberList GET /subscriber.list.json subscriber.list
TaxApi taxClassInfo GET /tax.class.info.json tax.class.info
TaxApi taxClassList GET /tax.class.list.json tax.class.list
WebhookApi webhookCount GET /webhook.count.json webhook.count
WebhookApi webhookCreate POST /webhook.create.json webhook.create
WebhookApi webhookDelete DELETE /webhook.delete.json webhook.delete
WebhookApi webhookEvents GET /webhook.events.json webhook.events
WebhookApi webhookList GET /webhook.list.json webhook.list
WebhookApi webhookUpdate PUT /webhook.update.json webhook.update

Models

Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header

StoreKeyAuth

  • Type: API key
  • API key parameter name: x-store-key
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

contact@api2cart.com

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.1
    • Generator version: 7.11.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

API2Cart SDK for PHP makes it easy to interact with API2Cart API from your PHP application and build a robust integration with eCommerce platforms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

Languages

AltStyle によって変換されたページ (->オリジナル) /