# Products

These keys are specified to use as defined in docs, they are case-sensitive. Any change in these keys may cause issues during data sync&#x20;

### Authentication&#x20;

\
Use your token provided inside converted.in after on boarding process to authenticate the request using form-data body

![](https://1119750375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7X1MfKrY7KCRp85qrV%2Fuploads%2F3O3usHmK6wbeaXKgcjSC%2Fimage.png?alt=media\&token=8be39209-8d15-49f3-b720-9ca94350164b)

> If collection*id exists within the request, your api should return products within this collection. if not return all products.*\
> *For pagination : use per\_*&#x70;age and page as listed in the image above.

## Products

<mark style="color:green;">`POST`</mark> `YOUR_BASEURL/convertedin/products`

#### Request Body

| Name                                        | Type    | Description                         |
| ------------------------------------------- | ------- | ----------------------------------- |
| per\_page<mark style="color:red;">\*</mark> | integer | limit per page (default 100)        |
| page<mark style="color:red;">\*</mark>      | integer | page number                         |
| token<mark style="color:red;">\*</mark>     | string  | Fixed token provided by Convertedin |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "current_page": 1,
    "data": [ 
        {
            "id": 206,
            "category_id": "44",
            "title": "Brain Challenge Bundle",
            "handle": "brain-challenge-bundle",
            "full_permalink": "http://storeurl.com/product/abominable-hoodie/", // full product public link
            "app_links": {
                "ios": "myapp://ios/product/123",
                "android": "myapp://android/product/123"
            },
            "image": "https://www.3anqod.com/wp-content/uploads/2020/11/WhatsApp-Image-2020-11-16-at-3.04.06-AM.jpeg",
            "content": "<div class=\"section parbase\"><section class=\"ps-section--white ds-intro\" data-dtm-banner-position=\"1\">\r\n<div class=\"onecolumn parbase\">\r\n<div class=\"single-column no-top no-bottom\">\r\n<div class=\"row\">\r\n<div class=\"single-column--md\">\r\n<div class=\"richtext parbase\">\r\n<div class=\"block-copy \">\r\n\r\nSave more than 20% of the original price by renting this bundle offer:\r\n\r\nSpin Master Classic Board Games + The Heist\r\n\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</section></div>",
            "type": null,
            "vendor": "Brand or seller name",
            "price": 90,
            "quantity": 0,
            "published_at": "2020-10-10 20:00:00",
            "tags": "games, products, trending",
            "images": [ 
                {
                    "path": "http://convertedin-wordpress.test/wp-content/uploads/2020/09/ug07-bk-0_alt1-150x150.jpg",
                    "width": 150,
                    "height": 150
                }
            ]
        }
    ],
    "from": 1,
    "last_page": 36,
    "per_page": 100,
    "to": 100,
    "total": 3538
}
```

{% endtab %}
{% endtabs %}

Note: you have to send either `stock_status` or `quantity`  so we can show/hide products in your catalog<br>

If you want product to be inactive you can pass null at `published_at`

| id                 | product id in your database and linked to orders                                                                                            | **Required** |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| category\_id       | category id linked to that product                                                                                                          | Not required |
| title              | product name or title                                                                                                                       | **Required** |
| handle             | product slug or permalink id                                                                                                                | Not required |
| full\_permalink    | Full product public url                                                                                                                     | **Required** |
| app\_links         | The `app_links` key provides platform-specific deep links for accessing product details directly within the associated mobile applications. | Not required |
| app\_links.android | The deep link URL for accessing the product within the Android application                                                                  | Not required |
| app\_links.ios     | The deep link URL for accessing the product within the iOS application                                                                      | Not required |
| image              | Full product image public url ( 600 \* 600 mandatory)                                                                                       | **Required** |
| content            | Product description or page content                                                                                                         | **Required** |
| type               | Product type (aliases to category)                                                                                                          | Not required |
| vendor             | Product provider, brand, or your store name if the latter is not available                                                                  | **Required** |
| compare\_at\_price | product price before sale (this the old price is shown stripped)                                                                            | Not required |
| price              | product price                                                                                                                               | **Required** |
| quantity           | product stock quantity (default zero if you don't want the product to be used in ads or any integer above zero for enabled)                 | Not required |
| stock\_status      | Product stock status (instock, onbackorder, outofstock)                                                                                     | Not required |
| published\_at      | product publish date, Format: Y-m-d H:i:s, ex: 2020-12-15 19:00:00                                                                          | **Required** |
| tags               | product SEO tags (comma separated)                                                                                                          | Not required |
| images             | product gallery images (format in json response example)                                                                                    | Not required |
| meta               | Any other non existing data                                                                                                                 | Not required |
|                    |                                                                                                                                             |              |

### Response

```json
{
    "data": [
        {
            "id": 23,
            "title": "first product title",
            "category_id": 4,
            "image": "https://storename.com/public/uploads/products/1587912939Nuxe-prodigieuse-cream.jpeg",
            "type": "Now",
            "vendor": "Nuxe",
            "handle": "nuxe-reve-de-miel-hand-nail-cream-155",
            "owner": "seller",
            "compare_at_price": 195,
            "price": 195,
            "stock_status": "instock",
            "quantity": 10000,
            "published_at": "2019-12-15 19:35:34",
            "tags": "Women Care",
            "images": [
                {
                    "path": "https://storename.com/filters:format(webp)/public/uploads/products/1587912939Nuxe-prodigieuse-cream.jpeg",
                    "width": 1250,
                    "height": 1250
                }
            ],
            "full_permalink": "https://storename.com/nowProduct/nuxe-reve-de-miel-hand-nail-cream-155",
            "content": "كريم نوكس هو أحد منتجات العناية باليدين والأظافر من نوكس يساعد على ترطيب البشرة وعلاج التشقق والجفاف ويتميز بأن % من مكوناته طبيعية ولا يحتوي على البارابينمكونات nuxe cream  زيت جوز الهند  مرطب للجلد وله خصائص مضادة للبكتيريا ومضاد للفطرياتالجلسرين  يساعد على ترطيب البشرة بفاعلية العسل  مرطب رائع للبشرة وله تأثير مضاد للبكتيريا زيت الأفوكادو  غني بالأحماض الدهنية التي ترطب الجلد بفاعلية ويحتوى على فيتامين E والبوتاسيوم والليسيثين والعديد من العناصر الغذائية زيت بذور عباد الشمس  مصدر لفيتامين E ومضادات الأكسدة والعديد من العناصر الغذائية        زيت الصويا  يغذى البشرة حيث يحتوي على الأوميجا ٣ والعديد من الأحماض الدهنية المغذية للبشرة         ألانتوين   مرطب لطيف على البشرة ولا يسبب التهيج ويزيد من نعومة الجلد        زبدة الشيا  يرطب البشرة ويخفف من الإلتهاب ويحسن من ملمس البشرة        زيت الأرجان  يساعد على ترطيب البشرة وتنعيمها        خلاصة زهرة الكاليندولا  له تأثير مطهر ويساعد على التئام الجروح ويخفف من حروق الشمس        عطرفوائد كريم نوكس لليد والأظافر ترطيب البشرة حماية البشرة من الجفاف والتهيجعلاج تشقق اليدينيغذي البشرة بعناصر غذائية عديدة        يجدد خلايا الجلد         يعطى اليدين رائحة رائعة        يزيد من نعومة الجلد    طريقة إستخدام nuxe prodigieuse cream      لا توجد طريقة خاطئة أو صحيحة لإستخدام كريم اليد Nuxe Rve de Miel ، لكن أفضل طريقة لاستخدام كريم اليدين هي وضع كمية من الكريم على ظهر اليد وفرك ظهر يدك الأخرى ضده وذلك لأن الجلد الموجود في الجزء العلوي من يديك يكون أرق بكثير وبه غدد دهنية أقل مما يعني أنه يمكن أن يصبح جافًا جدًا وبالتالي يحتاج إلى الرطوبةوعدد مرات استخدام nuxe reve de miel hand and nail cream يعتمد على حالة يديك وكم مرة تغسلينها طوال اليوم ويفضل إستخدام كريم اليد في كل مرة تغسل فيها يديك أو كلما شعرت بالجفاف وقبل الخروج وقبل الذهاب للنوم    حجم كريم ترطيب اليدين ريف دي ميل من نوكس     يتوافر nuxe hand and nail cream بحجم ملسعر nuxe hand cream     يبلغ سعر نوكسي كريم مرطب للأيدي حوالى  جنيه مصرى وقد يتغير السعر من مكان لآخر ومن وقت لآخر كيفية اختيار افضل كريم مرطب لليدين شديدة الجفاف     كريم اليد هو واحد من منتجات العناية التي لا غنى عنها ، والتي تحتاج إلى أن تأخذها معك في كل مكان فبشرة اليدين رقيقة وضعيفة وتتعرض للعديد من العوامل الخارجية التى تسبب ضرر بها  ، ومن هنا تأتي أهمية منتجات العناية باليدينوأفضل كريمات اليدين هي تلك التي تحتوي على مكونات تساعد فى ترطيب ، وتغذية ، ونعومة الجلد ومن امثلة هذه المكونات  الجليسرين واليوريا وحمض الهيالورونيك وخلاصة الصبار و الألنتوين وإذا كانت اليدين تعانى من التشقق والجفاف الشديد فيفضل إستخدام الكريمات التى تحتوى على الزيوت الطبيعية مثل زيت الجوجوبا وزيت اللوز وزبدة الشيا والسيراميد والبارافينويمكن مع الكريم إستخدام المياه الحرارية التى تخفف من التهاب البشرة كم مرة يستخدم كريم اليدين  ؟    يجب على الأقل إستخدام كريم اليد مرتين يومياً          في الصباح ، قبل مغادرة المنزل لحماية اليدين ويفضل إستخدام الكريمات التى تحتوى على معامل الحماية من الأشعة فوق البنفسجية ومضادات الأكسدة لمحاربة ظهور البقع        قبل النوم  لتهدئة البشرة ويمكن استخدام طبقة سميكة من الكريم لتوفير الرطوبة للجلد خلال الليلفي حالة الأيدي الجافة بشدة يُنصح بوضع الكريم بعد كل مرة يتم فيها غسل اليدين"
        }
 ],
    "from": 1,
    "current_page": 1,
    "last_page": 51,
    "per_page": 100,
    "to": 100,
    "total": 5076
}
```

## Get Category Products

## Products

<mark style="color:green;">`POST`</mark> `YOUR_BASEURL/convertedin/products`

Get the products related to the given category

#### Query Parameters

| Name                                             | Type    | Description                         |
| ------------------------------------------------ | ------- | ----------------------------------- |
| per\_page<mark style="color:red;">\*</mark>      | integer | limit per page (default 100)        |
| page<mark style="color:red;">\*</mark>           | integer | page number                         |
| token<mark style="color:red;">\*</mark>          | string  | Fixed token provided by Convertedin |
| collection\_id<mark style="color:red;">\*</mark> | int     | The category id                     |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "current_page": 1,
    "data": [ 
        {
            "id": 206,
            "category_id": "44",
            "title": "Brain Challenge Bundle",
            "handle": "brain-challenge-bundle",
            "full_permalink": "http://storeurl.com/product/abominable-hoodie/", // full product public link
            "image": "https://www.3anqod.com/wp-content/uploads/2020/11/WhatsApp-Image-2020-11-16-at-3.04.06-AM.jpeg",
            "content": "<div class=\"section parbase\"><section class=\"ps-section--white ds-intro\" data-dtm-banner-position=\"1\">\r\n<div class=\"onecolumn parbase\">\r\n<div class=\"single-column no-top no-bottom\">\r\n<div class=\"row\">\r\n<div class=\"single-column--md\">\r\n<div class=\"richtext parbase\">\r\n<div class=\"block-copy \">\r\n\r\nSave more than 20% of the original price by renting this bundle offer:\r\n\r\nSpin Master Classic Board Games + The Heist\r\n\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</section></div>",
            "type": null,
            "vendor": "Brand or seller name",
            "price": 90,
            "quantity": 0,
            "published_at": "2020-10-10 20:00:00",
            "tags": "games, products, trending", 
            "images": [ 
                {
                    "path": "http://convertedin-wordpress.test/wp-content/uploads/2020/09/ug07-bk-0_alt1-150x150.jpg",
                    "width": 150,
                    "height": 150
                }
            ]
        }
    ],
    "from": 1,
    "last_page": 36,
    "per_page": 100,
    "to": 100,
    "total": 35}
```

{% endtab %}
{% endtabs %}

### Parameters

<table><thead><tr><th width="195.04531722054378">Name</th><th width="150">Type</th><th width="150">Required</th><th>Description</th></tr></thead><tbody><tr><td>page</td><td>int</td><td>true</td><td>page number</td></tr><tr><td>limit</td><td>int</td><td>true</td><td>count items per page</td></tr><tr><td>collection_id</td><td>int</td><td>false</td><td>used to fetch only products related to this collection</td></tr></tbody></table>
