Marketplaces / Cdiscount / Cdiscount REST API Technical Scope [DRAFT] / Cdiscount Product Management / Get Products

Get Products

Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)

Date Version Name Applied changes
22/11/2022 1.0 Bogomil Pavlov Initial Version

Before creating new products we will be checking if the current product is not existing on the marketplace using the EANs.

API Call: GET ttps://api.octopia-io.net/seller/v2/products?gtin=

API Doc: https://developer.octopia-io.net/api-details#api=api-rest-seller-v2&operation=get-products

The gtin is the EAN number in our system.

Mapping :

Cdiscount Field Hemi Field Comment
gtin Product Account Cdiscount > EAN

OR Product Account > Marketplace EAN OR Product > EAN | Since EAN is mandatory for Cdiscount we will be checking if the product exists using with priority Product Account Cdiscount > EAN, Product Account > Marketplace EAN and then Product > EAN |

Sample Response:

{
    "itemsPerPage": 1,
    "items": [
        {
            "reference": "MP61228737-0005",
            "gtin": "5059499002731",
            "language": "fr-FR",
            "label": "Nevica Meribel Top Première Couche De Sport Enfants",
            "description": "Ce haut thermique Nevica Meribel est confectionné avec un col ras du cou côtelé et des manches longues pour un look classique. Il présente des coutures plates pour éviter les frottements et est une construction légère. Ce haut est conçu avec un logo signature et est complet avec la marque Nevica.",
            "pictures": [
                {
                    "index": 1,
                    "url": "~/pdt2/7/3/7/1/700x700/mp61228737/rw/nevica-meribel-top-premiere-couche-de-sport-enfant.jpg",
                    "updatedAt": "2022-12-01T07:26:20.989Z"
                },
                {
                    "index": 2,
                    "url": "~/pdt2/7/3/7/2/700x700/mp61228737/rw/nevica-meribel-top-premiere-couche-de-sport-enfant.jpg",
                    "updatedAt": "2022-12-01T07:26:20.989Z"
                },
                {
                    "index": 3,
                    "url": "~/pdt2/7/3/7/3/700x700/mp61228737/rw/nevica-meribel-top-premiere-couche-de-sport-enfant.jpg",
                    "updatedAt": "2022-12-01T07:26:20.989Z"
                }
            ],
            "category": {
                "reference": "0U0O17",
                "label": "TOP THERMIQUE - T-SHIRT THERMIQUE",
                "referencePath": "0U/0U0O/0U0O17"
            },
            "brand": {
                "reference": "29504",
                "name": "NEVICA"
            },
            "sellers": [
                {
                    "reference": "51102",
                    "productReference": "MP61228737-0005",
                    "isCreator": true,
                    "gtinReference": "5059499002700"
                }
            ],
            "attributes": [
                {
                    "reference": "28899",
                    "label": "Sports",
                    "values": [
                        "Multisport"
                    ]
                },
                {
                    "reference": "28003",
                    "label": "Genre",
                    "values": [
                        "Mixte"
                    ]
                },
                {
                    "reference": "24097",
                    "label": "Type de public",
                    "values": [
                        "Enfant"
                    ]
                },
                {
                    "reference": "3264",
                    "label": "Couleur principale",
                    "values": [
                        "Bleu"
                    ]
                },
                {
                    "reference": "3263",
                    "label": "Couleur(s)",
                    "values": [
                        "Bleu marine"
                    ]
                },
                {
                    "reference": "46801",
                    "label": "Taille gilet - pull - tee-shirt - veste - manteau - blouson",
                    "values": [
                        "9-10 ans"
                    ]
                }
            ],
            "variantAttributes": [
                {
                    "reference": "3263",
                    "label": "Couleur(s)",
                    "values": [
                        "Bleu marine"
                    ]
                },
                {
                    "reference": "46801",
                    "label": "Taille gilet - pull - tee-shirt - veste - manteau - blouson",
                    "values": [
                        "9-10 ans"
                    ]
                }
            ],
            "completeness": 67,
            "isMarketable": true,
            "groupReference": "MP61228737",
            "origin": "Cdiscount",
            "status": "Active",
            "createdAt": "2022-12-01T07:20:55.072Z",
            "updatedAt": "2023-04-04T14:24:38.646Z"
        }
    ]
}

Response Mapping:

Cdiscount Field Hemi Field Comment
itemsPerPage
items
reference Product Account > Channel Item ID
gtin N/A
language N/A
label N/A
description N/A
pictures N/A
index N/A
url N/A
updatedAt N/A
category N/A
reference N/A
label N/A
referencePath N/A
brand N/A
reference N/A
name N/A
sellers N/A
reference N/A
productReference N/A
isCreator N/A
gtinReference N/A
attributes N/A
reference N/A
label N/A
values N/A
variantAttributes N/A
reference N/A
label N/A
values N/A
completeness N/A
isMarketable N/A
groupReference N/A
origin N/A
status N/A
createdAt N/A
updatedAt N/A

In order to pick a product we must have: Product Account > Listing Status = Inactive Product Account > Product Status = Awaiting creation Product Account > Closed = No

If we match a product we will be storing the referenceas Product Account > Channel Item ID if it is already populated we will overwrite it if different and will have to update Product Account > Listing Status = Inactive Product Account > Product Status = Product created Product Account >List / Update the Whole Item = Pending

If we do not match the EAN we will receive a 400 response:

{
    "errors": {
        "Gtin": [
            "The gtin field must be a valid GTIN with 8 up to 14 numeric characters."
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "|97f98cc8-432b688ae06f3268.97f98cc9_2218f63_"
}

In this case we DELETE the Product Account > Channel Item ID and update Product Account > Listing Status = Inactive Product Account > Product Status =Product not created Product Account >List / Update the Whole Item = Pending

Limits: No particular limits are specified but we can try to set a limit of 1000 EANs per request.

Is this article helpful?
0 0 0