PHPackages                             mobi-market/cdiscount-sdkphpapi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mobi-market/cdiscount-sdkphpapi

ActiveLibrary[API Development](/categories/api)

mobi-market/cdiscount-sdkphpapi
===============================

PHP SDK for the Cdiscount Marketplace API

v2.1.0(4y ago)01.0kGPL-3.0PHPPHP ^7.4|^8.0|^8.1

Since Jan 9Pushed 4y agoCompare

[ Source](https://github.com/Mobi-Market/API-MarketPlace-SDK-PHP)[ Packagist](https://packagist.org/packages/mobi-market/cdiscount-sdkphpapi)[ RSS](/packages/mobi-market-cdiscount-sdkphpapi/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (5)Versions (22)Used By (0)

mobi-market/cdiscount-sdkphpapi
===============================

[](#mobi-marketcdiscount-sdkphpapi)

> This package has now been updated to use laminas framework (replacement of zend) and a minimum requirement of PHP 7.4 *or* PHP 8.0 to allow for usage in more modern code.

This package is an update to the [Cdiscount/API-MarketPlace-SDK-PHP](https://github.com/Cdiscount/API-MarketPlace-SDK-PHP) parent.

Main Changes include the ability to pass in the username, password, token url and cURL options into the API functionality without the need to modify the supplied `config.ini` file.

The reasons for these changes are to better support frameworks like Laravel and to dissuade users from directly editing files in the `vendor` directory.

Installation
------------

[](#installation)

1- Install a web server (for example wamp for windows)
------------------------------------------------------

[](#1--install-a-web-server-for-example-wamp-for-windows)

### 1.1 - Min requirements :

[](#11---min-requirements-)

- PHP 8.0 -
- PHP 7.4 -
- Composer -

2- Install the package
----------------------

[](#2--install-the-package)

Either with composer or by cloning.

### 2.1a - Add to your project with composer

[](#21a---add-to-your-project-with-composer)

`composer require mobi-market/cdiscount-sdkphpapi`

### 2.1b - Clone the Git repository in your root project folder

[](#21b---clone-the-git-repository-in-your-root-project-folder)

The SDK is structured like that :

- config/ : config files
- samples/ : samples folder
- sdk/ : content of the Cdiscount SDK (do not modify any file of this folder)

### 2.2b - Run the 'composer update' command in the root path of the sdk folder to download Laminas Framework dependencies

[](#22b---run-the-composer-update-command-in-the-root-path-of-the-sdk-folder-to-download-laminas-framework-dependencies)

3 - Insert your API credentials
-------------------------------

[](#3---insert-your-api-credentials)

### 3.1 - Requirements

[](#31---requirements)

To use Cdiscount Marketplace API and Cdiscount Marketplace SDK you first need to follow the steps described in the Cdiscount Marketplace API website.

The sections are the following :

- Request your account creation.
- Have set up your account

### 3.2 - Update the config files

[](#32---update-the-config-files)

Follow the procedure to insert your API credentials

- Open the config folder
- Open the config.ini file
- Set the api mode : 'preprod' or 'prod'
- Open the preprod.config.ini file or the prod.config.ini file (if you set mode to 'prod')
- Set your api username
- Set your api password

4 - Use the SDK
---------------

[](#4---use-the-sdk)

### 4.1 - Use the endpoints

[](#41---use-the-endpoints)

The SDK contains the following endpoints :

- Seller
- Offer
- Discussion
- Product
- Order
- Relay

All the SDK methods are described in the MarketPlace API Website because they have the same names of the Cdiscount Marketplace API methods.

For each method, you have a PHP file with a sample to call the corresponding API function.

For example, to call the GetSellerInformation API method, open the `GetSellerInformation.php` file contained in the Seller folder and follow the same steps of the sample.

### 4.2 - CDSApiClient Object

[](#42---cdsapiclient-object)

The CDSApiClient allows you to call the API.

The CDSApiClient object contains all the endpoints. It's also create an API call to get a token for you.

Don't create a new CDSApiClient each time you call the API !

You can (have to) use the same CDSApiClient for all your API' calls.

Here an example of how use the same CDSApiClient for many API calls :

```
$client = new \Sdk\ApiClient\CDSApiClient();
$token = $client->init();
if ($token == null || !$client->isTokenValid()) {
	echo "Souci lors de la génération du token";
	die;
}
$offerPoint = $client->getOfferPoint();
$offerListResponse = $offerPoint->getOfferList(null); /** Parse here $offerListResponse **/
$sellerPoint = $client->getSellerPoint();
$sellerResponse = $sellerPoint->getSellerInformation(); /** Parse here $sellerResponse **/
```

5 - Update the SDK
------------------

[](#5---update-the-sdk)

Download the new SDK Zip file from the CDiscount Marketplace API Website

Erase the SDK folder with the new one

Erase the vendor folder with the new one

Notes
-----

[](#notes)

In the sample, the parameter error\_reporting is set to '-1'. Do not let it in production mode.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 57.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~91 days

Recently: every ~342 days

Total

21

Last Release

1629d ago

Major Versions

1.1.9 → v2.0.02021-07-21

PHP version history (2 changes)v2.0.0PHP ^7.4|^8.0

v2.1.0PHP ^7.4|^8.0|^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/57994517?v=4)[Mobi Market](/maintainers/Mobi-Market)[@Mobi-Market](https://github.com/Mobi-Market)

---

Top Contributors

[![guillaumecochard](https://avatars.githubusercontent.com/u/7467023?v=4)](https://github.com/guillaumecochard "guillaumecochard (31 commits)")[![guillaumecds16](https://avatars.githubusercontent.com/u/24295149?v=4)](https://github.com/guillaumecds16 "guillaumecds16 (9 commits)")[![scott-davidjones](https://avatars.githubusercontent.com/u/547193?v=4)](https://github.com/scott-davidjones "scott-davidjones (6 commits)")[![cslaneyflett](https://avatars.githubusercontent.com/u/45046600?v=4)](https://github.com/cslaneyflett "cslaneyflett (3 commits)")[![ncharlot](https://avatars.githubusercontent.com/u/592778?v=4)](https://github.com/ncharlot "ncharlot (3 commits)")[![dyod](https://avatars.githubusercontent.com/u/6864299?v=4)](https://github.com/dyod "dyod (2 commits)")

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/mobi-market-cdiscount-sdkphpapi/health.svg)

```
[![Health](https://phpackages.com/badges/mobi-market-cdiscount-sdkphpapi/health.svg)](https://phpackages.com/packages/mobi-market-cdiscount-sdkphpapi)
```

###  Alternatives

[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[magento/community-edition

Magento 2 (Open Source)

12.1k53.0k12](/packages/magento-community-edition)[x-fran/g-trends

Google Trends API for PHP

11756.5k](/packages/x-fran-g-trends)[spejder/odoo-client

A PHP Client for Odoo

1018.7k3](/packages/spejder-odoo-client)[ltd-beget/dns-zone-configurator

Php library for parsing and editing dns zones files programmatically with high level abstraction.

22166.9k](/packages/ltd-beget-dns-zone-configurator)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1010.0k22](/packages/loki-magento2-components)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
