PHP SDK

Build e-commerce applications easily with PHP

About the PHP SDK

The PHP SDK enables the developer to use methods and objects to communicate with the commercetools platform rather than using plain HTTP calls and untyped data. Users gain IDE auto completion for building valid requests.

PHP SDK v2

We have rewritten this SDK over our previous version of PHP SDK, this is an autogenerated code that will get you faster releases of new features in API and bug fixes.

Additionally, It has exclusive support to Machine Learning APIs and the Import API using the ML API Request Builder and the Import API Request Builder

PHP SDK v1

Deprecation notice

According to our long-term support plan we fixed the following dates along deprecation of this SDK:

  • Active Support phase ended 28 February 2022
  • Maintenance Support phase ends 31 August 2022
  • End of Life reached 1 September 2022

Features

Authentication

The API client automatically authenticates using OAuth 2.0 and stores the retrieved token in any PSR-6 or PSR-16 compatible cache adapter.

Logging

The API client can be configured to log detailed information of each request to any PSR-3 compatible logging provider.

The correlation id of each request sent by the API gets extracted and logged as context information. Information about API deprecation is logged with severity warning.

Asynchronous requests

The SDK uses the guzzle HTTP client for executing requests which opens the possibility of executing requests in batches as well as asynchronously.

Localization

The SDK provides convenient formatting of currencies using the PHP intl extension. For localization of a project, fallback rules for localization can be configured.

License

The SDK is licensed under the permissive MIT License.

Developer Center
HTTP APIGraphQL APIPlatform Release NotesCustom ApplicationsBETASDKs & Client LibrariesImport & ExportSUNRISE Starter FrontendsTutorialsFAQ
Merchant Center
DocumentationRelease Notes
Sign upLog inTech BlogIntegrationsStatusSupportUser Research Program
Copyright © 2022 commercetools
Privacy PolicyImprint