Catalog migration
On this page :
- GetAllowedCategoryTree : From GetAllowedCategoryTree to GET /categories
- GetModelList : From GetModelList to GET /categories/{categoryReference}
- GetBrandList : From GetBrandList to GET /brands
- SubmitProductPackage : From SubmitProductPackage to POST /products-integration
- GetProductPackageSubmissionResult : GetProductPackageSubmissionResult to GET /products-integration-reports
- GetProductList : GetProductList to GET /products
Correspondence table
This diagram represents the correspondence between the SOAP API methods and the REST API calls.
For example, when you need to get the category tree : previously you used the GetAllowedCategoryTree SOAP method, now with REST you need to use the GET/categories call.
Overall guidelines to manage your products creation
First, you need to get all the required information to create a product.
Therefore:
1. First check if your product already exists by using the GET/products call.
Note:
- If your product already exists, you can go forward and create an offer.
- If you are the seller who has created the product , then the GET/products call will return all the product information. Otherwise it will only return the product GTIN, title, product reference, category and language.
2. Then use the Get / categories (for the REST API, the category code is the 6 first characters of the SOAP category code)
SOAP API
CATEGORY_CODE | 1D090301 |
CATEGORIE 1 | ANIMALERIE |
CATEGORIE 2 | JOUET |
CATEGORIE 3 | ARBRE A CHAT |
CATEGORIE 4 | ARBRE A CHAT |
REST API
CATEGORY_CODE | 1D0903 |
CATEGORIE 1 | ANIMALERIE |
CATEGORIE 2 | JOUET |
CATEGORIE 3 | ARBRE A CHAT |
no 4th category level on REST API
3. If you need to know if the brand is mandatory for your product category: you can use GET/categories/{categoryReference}
4. If you need to know if variant products are allowed for a category: you can use GET/categories/{categoryReference}
5. Also, if you want to know which properties are mandatory to create a product: you can use the GET/categories/{categoryReference}/properties
6. Use the Get/brands call to get the brand name you need to use to create your product.
Once all the required information is gathered, you can use the POST/products-integration to create your product.
You need to check the integration result by checking the integration status in the integration reports available by using the GET /products-integration-reports call.
You will find below a list of useful integration status.
Integration error message | Meaning |
ER400-9250 : The field must not be null or empty. | Error message when a field is empty or null |
ER400-7480 : The field is required. | Error message you get when a mandatory field such as gtin is null or empty |
ER400-8614 : The field must be a product reference with only alphanumeric and/or dash/dot. | Error message you get when the reference is not alphanumeric |
Variant product integration
- First please Check if your product category allows variant product integration by using the GET/categories/{categoryReference} call
{
"categoryReference": "100602",
"label": "TROUSERS",
"level": 3,
"isActive": true,
"parentReference": "1006",
"isTanslated": true,
"parentReferences": [
"10",
"1006"
],
"isBrandMandatory": false,
"isVariant": true
}
- Then use a GET/product by gtin to retrieve the variantGroupReference you need to use to add a variant product to an already existing variant family
- And finally use the POST/products-integration using the variantGroupReference you retrieved previously in step 1.If there were no variantGroupReference already existing then you can use your own variantGroupReference.
From SOAP methods to REST routes
Method :
GetAllowedCategoryTree
Obtain the tree of the categories.
This operation allows the user API to know the categories of product which are accessible to her.
Request URL
POST https://wsvc.cdiscount.com/MarketplaceAPIService.svc
Body
<Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<//www.cdiscount.com">
<a="[...]" xmlns:i="[...]">
<Context>
<CatalogID>1<CatalogID>
<CustomerPoolID>1<CustomerPoolID>
<SiteID>100<SiteID>
<Context>
<Localization>
<Country>Fr<Country>
<Currency>Eur<Currency>
<DecimalPosition>2<DecimalPosition>
<Language>Fr<Language>
<Localization>
<Security>
<DomainRightsList i:nil="true" />
<IssuerID i:nil="true" />
<SessionID i:nil="true" />
<SubjectLocality i:nil="true" />
<TokenId>${#Project#token}<TokenId>
<UserName i:nil="true" />
<Security>
<Version>1.0<Version>
<Body>
<Envelope>
Route :
GET /categories
This route allows you to retrieve all the categories with a paginated result.
Accept-Language header allows you to get the details for one of these three languages (EN, FR, ES)
Request URL
GET /categories?pageIndex=100&fields=label,IsActive
Sample Response
{
"itemsPerPage": 25,
"items": [
{
"categoryReference": "0H0D0L",
"label": "COMPONENT",
"level": 3,
"isActive": true,
"parentReference": "0H0D",
"parentReferences": [
"0H",
"0H0D"
],
"isBrandMandatory": false
}
]
}
New Management Rule with REST
The category tree is the same, but with only 3 category levels in Octopia (versus 4 category levels in Cdiscount).
What this means: the REST category code is only 6 characters = the first 6 characters of the SOAP category code.
Pay attention to this in your use of GET/Categories and POST/products-integration calls
Method :
GetModelList
This operation allows the user API to obtain the list of the present models on categories which are allocated to him.
A model contains specific properties which must be informed in packages it of produced import.
Request URL
POST /wsvc.cdiscount.com/MarketplaceAPIService.svc
Body
<Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<//www.cdiscount.com">
<a="[...]" xmlns:i="[...]">
<Context>
<CatalogID>1<CatalogID>
<CustomerPoolID>1<CustomerPoolID>
<SiteID>100<SiteID>
<Context>
<Localization>
<Country>Fr<Country>
<Currency>Eur<Currency>
<DecimalPosition>2<DecimalPosition>
<Language>Fr<Language>
<Localization>
<Security>
<DomainRightsList i:nil="true" />
<IssuerID i:nil="true" />
<SessionID i:nil="true" />
<SubjectLocality i:nil="true" />
<TokenId>${#Project#token}<TokenId>
<UserName i:nil="true" />
<Security>
<Version>1.0<Version>
<i="[...]/XMLSchema-instance">
<a="[...]/Arrays">
<string>06010201<string>
<Body>
<Envelope>
Route :
GET /categories/{categoryReference}
This route allows you to get the details of a given category.
Accept-Language allows you to get the details for one of these three languages (EN, FR, ES)
Request URL
GET /categories/{categoryReference}
Sample Response
{
"categoryReference": "0H0D0R",
"label": "MOTORISATION FOR GARAGE DOOR",
"level": 3,
"isActive": true,
"parentReference": "0H0D",
"parentReferences": [
"0H",
"0H0D"
],
"isBrandMandatory": false
}
Method :
GetBrandList
To obtain the full brands list.
This operation allows a specific user in the API to obtain the complete list of the brands.
Request URL
POST /wsvc.cdiscount.com/MarketplaceAPIService.svc
Route :
GET /brands
This route allows you to retrieve all the brands with a paginated result.
Request URL
GET /brands?pageIndex=1&pageSize=100
Method :
SubmitProductPackage
This operation allows to asks for the creation of products in the catalog Cdiscount.
The user API supplies the URI of package product in entrance (description of packages product download here).
The API downloads this file and proceeds to the import of products.
Request URL
Body Payload
<Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<//www.cdiscount.com">
<a="[...]" xmlns:i="[...]">
<Context>
<CatalogID>1<CatalogID>
<CustomerPoolID>1<CustomerPoolID>
<SiteID>100<SiteID>
<Context>
<Localization>
<Country>Fr<Country>
<Currency>Eur<Currency>
<DecimalPosition>2<DecimalPosition>
<Language>Fr<Language>
<Localization>
<Security>
<DomainRightsList i:nil="true" />
<IssuerID i:nil="true" />
<SessionID i:nil="true" />
<SubjectLocality i:nil="true" />
<TokenId>{{TokenId}}<TokenId>
<UserName i:nil="true" />
<Security>
<Version>1.0<Version>
<i="[...]">
<Body>
<Envelope>
Route :
POST /products-integration
Use this API to integrate your products on Octopia Sales Channels, including Cdiscount.
The values accepted for the language field are fr-FR , en-US and es-ES.
Request URL
POST /products-integration
Body Payload
{
"products": [
{
"gtin": "",
"sellerProductReference": "",
"title": "My title",
"description": "My description",
"sellerPictureUrls": [
{
"index": 1,
"url": "https://example.fr/media/img/hd/img.gif"
},
{
"index": 2,
"url": "https://example.fr/media/img/hd/img.gif"
}
],
"brand": "My brand",
"categoryCode": "",
"language": "fr-FR"
}
]
}
Sample Response
{
"packageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
API Fields Mapping by categories of calls
Here find the mapping between the soap fields and the new rest fields.
Category | SOAP | REST |
---|---|---|
Creation by reference | SellerProductId | sellerProductReference |
Creation by EAN | <Product.EanList> <ProductEan Ean=”{{Ean}}”/> </Product.EanList> | gtin |
Creation by brand | BrandName | brand |
Creation by product type | ProductKind | gtinReference |
Creation by category code | CategoryCode | categoryCode |
Creation by long label | LongLabel | Title |
Creation by short label | ShortLabel | Not available on the REST API |
Creation by model | Model | Not available on the REST API |
Creation by navigation | Navigation | Not available on the REST API |
Creation by Properties | ModelProperties | attributes |
Creation by images | <Product.Pictures> <ProductImage Uri=”{{Uri}}”/> </Product.Pictures> | “sellerPictureUrls”: [ { “index”: 1, “url”: “https://static.education.francetv.fr/media/img/hd/img.gif” } ] |
Creation by description | Description | description |
Creation by description | N/A | richMarketingDescription |
Creation by langue | N/A | language |
Method :
GetProductPackageSubmissionResult
This operation allows of know the state of progress of the requests of creation of products.
Request URL
POST /wsvc.cdiscount.com/MarketplaceAPIService.svc
Body Payload
<Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<a="[...]" xmlns:i="[...]">
<Context>
<CatalogID>1<CatalogID>
<CustomerPoolID>1<CustomerPoolID>
<SiteID>100<SiteID>
<Context>
<Localization>
<Country>Fr<Country>
<Currency>Eur<Currency>
<DecimalPosition>2<DecimalPosition>
<Language>Fr<Language>
<Localization>
<Security>
<DomainRightsList i:nil="true" />
<IssuerID i:nil="true" />
<SessionID i:nil="true" />
<SubjectLocality i:nil="true" />
<TokenId>${#Project#token}<TokenId>
<UserName i:nil="true" />
<Security>
<Version>1.0<Version>
<i="[...]">
<Body>
<Envelope>
Route :
GET /products-integration-reports
This route allows you to obtain technical and functional information about product submissions.
Request URL
GET /products-integration-reports
Sample Response
{
"items": [
{
"attributes": [
{
"files": [
"https://media.pdf"
],
"propertyReference": "24077",
"values": [
"Electrique",
"Batterie"
]
}
],
"brand": "My brand",
"categoryCode": "010201",
"createdAt": "2022-01-14T07:35:19Z",
"description": "My description",
"errors": [
{
"code": "IncorrectValue",
"field": "CategoryReference",
"message": "[...]",
"type": "Exports"
}
],
"gtin": "[...]",
"gtinReference": "[...]",
"infos": [
{
"code": "IncorrectValue",
"field": "CategoryReference",
"message": "[...]",
"type": "Exports"
}
],
"integratedProductId": "[...]",
"integrationPictureUrls": [
{
"index": 1,
"url": "[...]"
}
],
"language": "fr-FR",
"operationType": "Modification",
"packageId": "[...]",
"productReference": "AAAAA00148",
"publicationCompleteness": 30,
"sellerId": 98979,
"sellerPictureUrls": [
{
"index": 1,
"url": "[...]"
}
],
"sellerProductReference": "AGRA39401",
"status": "Validated",
"submissionDate": "2022-05-24T07:38:39Z",
"submissionType": "Excel",
"title": "My title",
"updatedAt": "2021-03-28T08:32:30Z",
"warnings": [
{
"code": "IncorrectValue",
"field": "CategoryReference",
"message": "[...]",
"type": "Exports"
}
],
"wasAllowedToEdit": true,
"wasAllowedToEnrich": true,
"wasMarketable": false
}
],
"itemsPerPage": 10
}
Method :
GetProductList
This operation makes it possible to search products in the reference frame. It turns over a list of products.
Request URL
POST /wsvc.cdiscount.com/MarketplaceAPIService.svc
Body Payload
<Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<a="[...]" xmlns:i="[...]">
<Context>
<CatalogID>1<CatalogID>
<CustomerPoolID>1<CustomerPoolID>
<SiteID>100<SiteID>
<Context>
<Localization>
<Country>Fr<Country>
<Currency>Eur<Currency>
<DecimalPosition>2<DecimalPosition>
<Language>Fr<Language>
<Localization>
<Security>
<DomainRightsList i:nil="true" />
<IssuerID i:nil="true" />
<SessionID i:nil="true" />
<SubjectLocality i:nil="true" />
<TokenId>${#Project#token}<TokenId>
<UserName i:nil="true" />
<Security>
<Version>1.0<Version>
<i="[...]">
<Body>
<Envelope>
Route :
GET /products
This route allows you to get a list of products for a given seller.
Request URL
GET /products
Sample Response
{
"items": [
{
"attributes": [
{
"files": [
{
"index": 1,
"mimeType": "application/pdf",
"updatedAt": "2021-03-28T08:32:30Z",
"url": "https://media.pdf"
}
],
"label": "Memory",
"reference": "39635",
"unit": "kg",
"values": [
"Electrique",
"Batterie"
]
}
],
"brand": {
"name": "Robe en tule",
"reference": "010d04"
},
"category": {
"label": "SMARTPHONE",
"reference": "070302",
"referencePath": "07/0703/070302"
},
"completeness": 0,
"createdAt": "2022-01-14T07:35:19Z",
"description": "[...]",
"expireAt": "2022-01-14T07:35:19Z",
"groupReference": "AZ1234",
"gtin": "8806088879093",
"isMarketable": false,
"isTop": false,
"label": "[...]",
"language": "fr-FR",
"marketingDescription": "[...]",
"origin": "Octopia",
"pictures": [
{
"index": 1,
"updatedAt": "2021-03-28T08:32:30Z",
"url": "[...]"
}
],
"reference": "A58BC78",
"sellers": [
{
"gtinReference": "8806088879090",
"isCreator": true,
"productReference": "SAMNOTE20_256",
"reference": "1234"
}
],
"status": "Archived",
"updatedAt": "2021-03-28T08:32:30Z",
"variantAttributes": [
{
"files": [
{
"index": 1,
"mimeType": "application/pdf",
"updatedAt": "2021-03-28T08:32:30Z",
"url": "https://media.pdf"
}
],
"label": "Memory",
"reference": "39635",
"unit": "kg",
"values": [
"Electrique",
"Batterie"
]
}
]
}
],
"itemsPerPage": 10
}