Getting started

In this page you will find the best practices in order to start your development or to refresh some parts.

Create your account with sign up.

When registering, please ensure that you enter the correct information as it will be used for your integrator account and our follow-up.

Once created we will send you an email to initialize your password for the portal.

You will also receive a second email with your integrator account (client_id create with your partnername) to generate your tokens and manage the seller shops with their approval.

Picture

1

Picture

You must be logged in and then select the API product you want to subscribe
To know, for try our API you have API Product starter, other API products must be approved by us and is only used if you have an authorized SellerId with your client_id.

2

Picture

Name your subscription as you wish

3

Picture

For API product management, we must accept your subscription. Once accepted you will receive an email and will have access to. To act in production on a shop, the seller must make a request to us to approve the fact that you intervene on his account. He must do this via an API ticket in his back office


Try our documentation

You receive your first login and you have subscribed to our starter development package, you can try now in live your first call with the try It.

Your tests are to be carried out with the SellerId Test 98979 that we make available to you (see screenshot below).
To do this, you must add it as a parameter in the header of your calls.

Picture

You will receive the correct or incorrect answer to your call in return.

Picture

The parameters to keep in mind for your future calls out of the portal are :

  • The SellerId to enter in the header

  • Your OCP-APIM-Subscription key for your subscribed API product

Install your environment and generate your token

For the demonstration we use postman

  • In a second step, we will make new packs available for production, you will receive your machine identifiers (client_id) upon subscription so that you can generate your tokens. For the startup api pack you can skip this step production. 

  • As a starting point, we recommend that you install Postman for your tests.

  • Once installed, you can create the collection in order to have our functionalities and the token generation request

You can generate your tokens but in order to be able to generate your API calls, the seller must accept you  in his back office.

For the moment you can try it in functionality API documentation and in our Sandbox who coming soon.  

Import your collection downloaded

You can download a starter collection here which you can add to as you go along.

Picture

Open your collection and enter your login information

  • Then enter your client_id and secret client_secret with your password.

  • The url you must use is: https://oauth2.cdiscount.com/auth/realms/maas-international-sellers/protocol/openid-connect/token

Picture

First call

Now you know how to generate a token, you can make the first call.(For the starter pack you don't need a token)

To make it simple we take a get call without any parameter like seller informations.

As a reminder, the seller must have approved you in order to be able to inform the SellerId.

If this is not the case, you can ask your seller(s) to send us a request asking us with hi back office Cdiscount -> contact us  to allow you API access to his/her account.

Picture

Send the call.

Fill in the url of the corresponding api call, the SellerId key and Ocp-Apim-Subscription-Key the value (Subscription key to Product choose, Offer management for offer call etc...) and send it

If you encounter an SSL error you must disable SSL in the request settings.

Picture

To make your POST calls

Find the parameters in the documentation of the API functionality.

Then add the desired parameters in the body of the request.

It can be for example an order number, a reference, count_by_page for the pagination...

Best practices for managing your development

Where to begin :

Analyze your needs in order to direct you to the right API product.

If you wish to manage the entire activity from A to Z you will start with a Manage the shop product.

Otherwise you will only go on the product on your need so as not to see documentation that will not be useful to you.

How it works :

For each group of functionality API, product, offer, order... you can find in the menu or at the bottom of the tags the desired features to accompany you.

The documentation is only at the beginning, it will be regularly updated for each change and will be used as an example for your feedback.

Need suport :

You are lost, have a question or wish to report a malfunction.

Book a call with us