Product endpoint

This page describes the product endpoint, which can be used to interact with products via your external e-commerce solution’s REST service.

Magento is now Adobe Commerce, powered by Magento. In the examples and configuration below, we may refer to Adobe Commerce as Magento.

GET

Get all products

Returns a list of all the products.

Request URL

/.rest/ecommerce/v1/products

Parameters

Parameter Description Type Data Type

definitionName

required

The definition name.

query

string

connectionName

required

The connection name.

query

string

Magento example

Gets a list of all the products.

curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/products?definitionName=magento&connectionName=connection"

JSON response

[
    {
        "name": "Joust Duffle Bag",
        "id": {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "24-MB01"
        },
        "sku": "24-MB01",
        "price": "35",
        "status": 1,
        "visibility": 4,
        "weight": null,
        "description": "<p>The sporty Joust Duffle Bag can't be beat - not in the gym, not on the luggage carousel, not anywhere. Big enough to haul a basketball or soccer ball and some sneakers with plenty of room to spare, it's ideal for athletes with places to go.<p>\r\n<ul>\r\n<li>Dual top handles.</li>\r\n<li>Adjustable shoulder strap.</li>\r\n<li>Full-length zipper.</li>\r\n<li>L 29\" x W 13\" x H 11\".</li>\r\n</ul>",
        "categoryIds": [
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "3"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "4"
            }
        ],
        "images": [
            "https://demo1-m2.mage.direct//pub/media/catalog/product/m/b/mb01-blue-0.jpg"
        ],
        "attribute_set_id": "15",
        "type_id": "simple",
        "created_at": "2018-08-07 12:47:03",
        "updated_at": "2019-03-22 12:35:28"
    },
    {
        "name": "Strive Shoulder Pack",
        "id": {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "24-MB04"
        },
        "sku": "24-MB04",
        "price": "32",
        "status": 1,
        "visibility": 4,
        "weight": null,
        "description": "<p>Convenience is next to nothing when your day is crammed with action. So whether you're heading to class, gym, or the unbeaten path, make sure you've got your Strive Shoulder Pack stuffed with all your essentials, and extras as well.</p>\n<ul>\n<li>Zippered main compartment.</li>\n<li>Front zippered pocket.</li>\n<li>Side mesh pocket.</li>\n<li>Cell phone pocket on strap.</li>\n<li>Adjustable shoulder strap and top carry handle.</li>\n</ul>",
        "categoryIds": [
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "3"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "7"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "4"
            }
        ],
        "images": [
            "https://demo1-m2.mage.direct//pub/media/catalog/product/m/b/mb04-black-0.jpg",
            "https://demo1-m2.mage.direct//pub/media/catalog/product/m/b/mb04-black-0_alt1.jpg"
        ],
        "attribute_set_id": "15",
        "type_id": "simple",
        "created_at": "2018-08-07 12:47:03",
        "updated_at": "2018-08-07 12:47:03"
    },
    {
        "name": "Crown Summit Backpack",
        "id": {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "24-MB03"
        },
        "sku": "24-MB03",
        "price": "38",
        "status": 1,
        "visibility": 4,
        "weight": null,
        "description": "<p>The Crown Summit Backpack is equally at home in a gym locker, study cube or a pup tent, so be sure yours is packed with books, a bag lunch, water bottles, yoga block, laptop, or whatever else you want in hand. Rugged enough for day hikes and camping trips, it has two large zippered compartments and padded, adjustable shoulder straps.</p>\n<ul>\n<li>Top handle.</li>\n<li>Grommet holes.</li>\n<li>Two-way zippers.</li>\n<li>H 20\" x W 14\" x D 12\".</li>\n<li>Weight: 2 lbs, 8 oz. Volume: 29 L.</li>\n<ul>",
        "categoryIds": [
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "3"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "4"
            }
        ],
        "images": [
            "https://demo1-m2.mage.direct//pub/media/catalog/product/m/b/mb03-black-0.jpg",
            "https://demo1-m2.mage.direct//pub/media/catalog/product/m/b/mb03-black-0_alt1.jpg"
        ],
        "attribute_set_id": "15",
        "type_id": "simple",
        "created_at": "2018-08-07 12:47:04",
        "updated_at": "2018-08-07 12:47:04"
    },
...

commercetools example

Gets a list of all the products.

curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/products?definitionName=commercetools&connectionName=connection"

JSON response

[
   {
      "id":{
         "definitionName":"commercetools",
         "connectionName":"connection",
         "itemId":"cb292097-a8cf-4b51-8258-879d3e85036a"
      },
      "name":"Jean Paul Gaultier",
      "sku":"245",
      "description":null,
      "price":"EUR 50",
      "status":null,
      "visibility":1,
      "weight":null,
      "categoryIds":[
         {
            "definitionName":"commercetools",
            "connectionName":"connection",
            "itemId":"05005125-3b5b-40df-bd8f-18cf6e2aa0d4"
         }
      ],
      "images":[
         "https://55b04f920fa53a42249e-5110a72d79ca30656f0873e4e7b95dbe.ssl.cf3.rackcdn.com/jean-paul-gaultier-s-88xRJ8Cy.jpg"
      ],
      "referencedProduct":{
         "createdAt":{
            "offset":{
               "totalSeconds":0,
               "id":"Z",
               "rules":{
                  "fixedOffset":true,
                  "transitions":[

                  ],
                  "transitionRules":[

                  ]
               }
            },
            "zone":{
               "totalSeconds":0,
               "id":"Z",
               "rules":{
                  "fixedOffset":true,
                  "transitions":[

                  ],
                  "transitionRules":[

                  ]
               }
            },
            "dayOfWeek":"THURSDAY",
            "dayOfYear":313,
            "year":2017,
            "month":"NOVEMBER",
            "monthValue":11,
            "dayOfMonth":9,
            "hour":14,
            "minute":45,
            "second":19,
            "nano":468000000,
            "chronology":{
               "id":"ISO",
               "calendarType":"iso8601"
            }
         },
         "id":"cb292097-a8cf-4b51-8258-879d3e85036a",
         "key":null,
         "lastModifiedAt":{
            "offset":{
               "totalSeconds":0,
               "id":"Z",
               "rules":{
                  "fixedOffset":true,
                  "transitions":[

                  ],
                  "transitionRules":[

                  ]
               }
            },
            "zone":{
               "totalSeconds":0,
               "id":"Z",
               "rules":{
                  "fixedOffset":true,
                  "transitions":[

                  ],
                  "transitionRules":[

                  ]
               }
            },
            "dayOfWeek":"WEDNESDAY",
            "dayOfYear":9,
            "year":2019,
            "month":"JANUARY",
            "monthValue":1,
            "dayOfMonth":9,
            "hour":13,
            "minute":36,
            "second":25,
            "nano":343000000,
            "chronology":{
               "id":"ISO",
               "calendarType":"iso8601"
            }
         },
         "masterData":{
            "hasStagedChanges":false,
            "published":true,
            "current":{
               "categories":[
                  {
                     "typeId":"category",
                     "id":"05005125-3b5b-40df-bd8f-18cf6e2aa0d4",
                     "key":null
                  }
               ],
               "categoryOrderHints":{

               },
               "description":null,
               "masterVariant":{
                  "assets":[

                  ],
                  "attributes":[
                     {
                        "name":"baseId",
                        "value":"4532"
                     }
                  ],
                  "availability":null,
                  "id":1,
                  "images":[
                     {
                        "url":"https://55b04f920fa53a42249e-5110a72d79ca30656f0873e4e7b95dbe.ssl.cf3.rackcdn.com/jean-paul-gaultier-s-88xRJ8Cy.jpg",
                        "dimensions":{
                           "w":215,
                           "h":251
                        },
                        "label":null
                     }
                  ],
...

Salesforce Commerce example

Gets a list of all the products.

curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/products?definitionName=salesforce-commerce&connectionName=connection-RefArch"

JSON response

[
    {
        "id": {
            "definitionName": "salesforce-commerce",
            "connectionName": "connection-RefArch",
            "itemId": "electronics-m-catalog~S2510211M"
        },
        "name": "Samsung Digimax A6 - Digital camera - 6.0 Mpix - optical zoom: 3 x - supported memory: MMC, SD",
        "price": "399.99",
        "sku": "S2510211M",
        "description": "",
        "status": null,
        "visibility": null,
        "weight": null,
        "categoryIds": [
            {
                "definitionName": "salesforce-commerce",
                "connectionName": "connection-RefArch",
                "itemId": "storefront-catalog-m-en~electronics-digital-cameras"
            },
            {
                "definitionName": "salesforce-commerce",
                "connectionName": "connection-RefArch",
                "itemId": "electronics-m-catalog~electronics-digital-cameras"
            }
        ],
        "images": [
            "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/large/Samsung-DigimaxA6.jpg",
            "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/medium/Samsung-DigimaxA6.jpg",
            "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/small/Samsung-DigimaxA6.jpg"
        ],
        "imageGroups": [
            {
                "images": [
                    {
                        "type": "media_file",
                        "disBaseLink": "https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZXZ_003/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/large/Samsung-DigimaxA6.jpg",
                        "link": "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/large/Samsung-DigimaxA6.jpg"
                    }
                ],
                "type": "image_group"
            },
            {
                "images": [
                    {
                        "type": "media_file",
                        "disBaseLink": "https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZXZ_003/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/medium/Samsung-DigimaxA6.jpg",
                        "link": "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/medium/Samsung-DigimaxA6.jpg"
                    }
                ],
                "type": "image_group"
            },
            {
                "images": [
                    {
                        "type": "media_file",
                        "disBaseLink": "https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZXZ_003/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/small/Samsung-DigimaxA6.jpg",
                        "link": "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/small/Samsung-DigimaxA6.jpg"
                    }
                ],
                "type": "image_group"
            }
        ]
    }
]
...

SAP example

Gets a list of all the products.

curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/products?definitionName=sap-commerce&connectionName=electronics"

JSON response

[
    {
        "name": "AC-VQ900AM",
        "price": "$168.52",
        "description": "- Compatible with InfoLITHIUM M series batteries for Camcorders, Cyber-shot and DSLR cameras.<br/>- Quick recharge.<br/>- Includes LCD panel showing battery status.<br/>- Relay type recharges two batteries.",
        "images": [
            "https://40.114.149.179:9002/medias/?context=bWFzdGVyfGltYWdlc3w5NjM5fGltYWdlL2pwZWd8aW1hZ2VzL2hiNC9oN2EvODc5NzI3MDA4MTU2Ni5qcGd8NzM1ZmNkZDEzOGFhZDMxZmVkMWU4ZTNhZDBiOTllZWNkOGRlYzllMzhiNjQwODViZTgwYzYxYzkwNGQyMjYyZA"
        ],
        "id": {
            "definitionName": "sap-commerce",
            "connectionName": "electronics",
            "itemId": "1298094"
        },
        "sku": "1298094",
        "status": null,
        "visibility": null,
        "weight": null,
        "categoryIds": []
    },
    {
        "name": "AC Power Adapter ACK-E2",
        "price": "$64.92",
        "description": "The ACK-E2 AC Adapter Kit contains AC Adapter AC-E2, AC Cable and DR Coupler DR-400.",
        "images": [
            "https://40.114.149.179:9002/medias/?context=bWFzdGVyfGltYWdlc3w5NDI5fGltYWdlL2pwZWd8aW1hZ2VzL2hkNS9oMWIvODc5NzI5MTI0OTY5NC5qcGd8NWZhZjc5ZjhiYzYyYTMwMjA2M2Y2Mjk0ZDg1YTMzNDAyNjM2NWYzZTdkYzBhYTQxNTE0NGFkZTNjOTYyMDM0ZA"
        ],
        "id": {
            "definitionName": "sap-commerce",
            "connectionName": "electronics",
            "itemId": "594471"
        },
        "sku": "594471",
        "status": null,
        "visibility": null,
        "weight": null,
        "categoryIds": []
    },
    {
        "name": "InfoLITHIUM Battery, NP-FM55H",
        "price": "$149.69",
        "description": "-Lithium-ion cells with no 'Memory Effect'. <br/>-Highly efficient, compact and light-weight. <br/>-Capacity: 11.5Wh, 1,600mAh.",
        "images": [
            "https://40.114.149.179:9002/medias/?context=bWFzdGVyfGltYWdlc3wxMTIwMnxpbWFnZS9qcGVnfGltYWdlcy9oOWMvaGFjLzg3OTcyODg4OTAzOTguanBnfDgwYWI1ZTY1ZDY5MWZmMjkwZGUyOTI1M2VkODJmNmJiNWJjNWUyNTAzMWRjOTc2YTU0N2FiMGUxOTExZjc1OWU"
        ],
        "id": {
            "definitionName": "sap-commerce",
            "connectionName": "electronics",
            "itemId": "482105"
        },
        "sku": "482105",
        "status": null,
        "visibility": null,
        "weight": null,
        "categoryIds": []
    },
.....

Get product by ID

Returns a given product based on its ID.

Request URL

.rest/ecommerce/v1/products/{productId}

Parameters

Parameter Description Type Data Type

definitionName

required

The definition name.

query

string

connectionName

required

The connection name.

query

string

productId

required

The unique ID of the product.

Magento: SKU of the product.

path

string

Magento example

Gets the product with an ID of 24-MB05.

curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/products/24-MB01?definitionName=magento&connectionName=connection"

JSON response

{
    "name": "Wayfarer Messenger Bag",
    "id": {
        "definitionName": "magento",
        "connectionName": "connection",
        "itemId": "24-MB05"
    },
    "sku": "24-MB05",
    "price": "45",
    "status": 1,
    "visibility": 4,
    "weight": null,
    "description": "<p>Perfect for class, work or the gym, the Wayfarer Messenger Bag is packed with pockets. The dual-buckle flap closure reveals an organizational panel, and the roomy main compartment has spaces for your laptop and a change of clothes. An adjustable shoulder strap and easy-grip handle promise easy carrying.</p>\n<ul>\n<li>Multiple internal zip pockets.</li>\n<li>Made of durable nylon.</li>\n</ul>",
    "categoryIds": [
        {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "3"
        },
        {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "7"
        },
        {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "4"
        },
        {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "8"
        }
    ],
    "images": [
        "https://demo1-m2.mage.direct//pub/media/catalog/product/m/b/mb05-black-0.jpg"
    ],
    "attribute_set_id": "15",
    "type_id": "simple",
    "created_at": "2018-08-07 12:47:04",
    "updated_at": "2018-08-07 12:47:04"
}

commercetools example

Gets the product with an ID of cb292097-a8cf-4b51-8258-879d3e85036a.

curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/products/cb292097-a8cf-4b51-8258-879d3e85036a?definitionName=commercetools&connectionName=connection"

JSON response

{
    "id": {
        "definitionName": "commercetools",
        "connectionName": "connection",
        "itemId": "cb292097-a8cf-4b51-8258-879d3e85036a"
    },
    "name": "Jean Paul Gaultier",
    "sku": "245",
    "description": null,
    "price": "EUR 50",
    "status": null,
    "visibility": 1,
    "weight": null,
    "categoryIds": [
        {
            "definitionName": "commercetools",
            "connectionName": "connection",
            "itemId": "05005125-3b5b-40df-bd8f-18cf6e2aa0d4"
        }
    ],
    "images": [
        "https://55b04f920fa53a42249e-5110a72d79ca30656f0873e4e7b95dbe.ssl.cf3.rackcdn.com/jean-paul-gaultier-s-88xRJ8Cy.jpg"
    ],
    "referencedProduct": {
        "createdAt": {
            "offset": {
                "totalSeconds": 0,
                "id": "Z",
                "rules": {
                    "fixedOffset": true,
                    "transitions": [],
                    "transitionRules": []
                }
            },
            "zone": {
                "totalSeconds": 0,
                "id": "Z",
                "rules": {
                    "fixedOffset": true,
                    "transitions": [],
                    "transitionRules": []
                }
            },
            "dayOfWeek": "THURSDAY",
            "dayOfYear": 313,
            "year": 2017,
            "month": "NOVEMBER",
            "monthValue": 11,
            "dayOfMonth": 9,
            "hour": 14,
            "minute": 45,
            "second": 19,
            "nano": 468000000,
            "chronology": {
                "id": "ISO",
                "calendarType": "iso8601"
            }
        },
        "id": "cb292097-a8cf-4b51-8258-879d3e85036a",
        "key": null,
        "lastModifiedAt": {
            "offset": {
                "totalSeconds": 0,
                "id": "Z",
                "rules": {
                    "fixedOffset": true,
                    "transitions": [],
                    "transitionRules": []
                }
            },
            "zone": {
                "totalSeconds": 0,
                "id": "Z",
                "rules": {
                    "fixedOffset": true,
                    "transitions": [],
                    "transitionRules": []
                }
            },
            "dayOfWeek": "WEDNESDAY",
            "dayOfYear": 9,
            "year": 2019,
            "month": "JANUARY",
            "monthValue": 1,
            "dayOfMonth": 9,
            "hour": 13,
            "minute": 36,
            "second": 25,
            "nano": 343000000,
            "chronology": {
                "id": "ISO",
                "calendarType": "iso8601"
            }
        },
        "masterData": {
            "hasStagedChanges": false,
            "published": true,
            "current": {
                "categories": [
                    {
                        "typeId": "category",
                        "id": "05005125-3b5b-40df-bd8f-18cf6e2aa0d4",
                        "key": null
                    }
                ],
                "categoryOrderHints": {},
                "description": null,
                "masterVariant": {
                    "assets": [],
                    "attributes": [
                        {
                            "name": "baseId",
                            "value": "4532"
                        }
                    ],
                    "availability": null,
                    "id": 1,
                    "images": [
                        {
                            "url": "https://55b04f920fa53a42249e-5110a72d79ca30656f0873e4e7b95dbe.ssl.cf3.rackcdn.com/jean-paul-gaultier-s-88xRJ8Cy.jpg",
                            "dimensions": {
                                "w": 215,
                                "h": 251
                            },
                            "label": null
                        }
                    ],
                    "key": "22",
                    "price": null,
                    "prices": [
                        {
                            "channel": null,
                            "country": null,
                            "custom": null,
                            "customerGroup": null,
                            "discounted": null,
                            "id": "d1c6375e-dfdd-484e-879f-a8fe5a23dd2e",
                            "tiers": null,
                            "validFrom": null,
                            "validUntil": null,
                            "value": {
                                "factory": {
                                    "defaultMonetaryContext": {
                                        "precision": 0,
                                        "fixedScale": false,
                                        "maxScale": 63,
                                        "amountType": "org.javamoney.moneta.Money",
                                        "empty": false,
                                        "providerName": null
                                    },
                                    "minNumber": null,
                                    "maxNumber": null,
                                    "amountType": "org.javamoney.moneta.Money",
                                    "maximalMonetaryContext": {
                                        "precision": 0,
                                        "fixedScale": false,
                                        "maxScale": -1,
                                        "amountType": "org.javamoney.moneta.Money",
                                        "empty": false,
                                        "providerName": null
                                    }
                                },
                                "context": {
                                    "precision": 256,
                                    "fixedScale": false,
                                    "maxScale": -1,
                                    "amountType": "org.javamoney.moneta.Money",
                                    "empty": false,
                                    "providerName": null
                                },
                                "number": 50,
                                "zero": false,
                                "negative": false,
                                "currency": {
                                    "context": {
                                        "empty": false,
                                        "providerName": "java.util.Currency"
                                    },
                                    "defaultFractionDigits": 2,
                                    "currencyCode": "EUR",
                                    "numericCode": 978
                                },
                                "positive": true,
                                "negativeOrZero": false,
                                "positiveOrZero": true
                            }
                        }
                    ],
                    "scopedPrice": null,
                    "sku": "245",
                    "isMatchingVariant": null,
                    "scopedPriceDiscounted": null
                },
                "metaDescription": null,
                "metaKeywords": null,
                "metaTitle": null,
                "name": {
                    "en": "Jean Paul Gaultier"
                },
                "searchKeywords": {},
                "slug": {
                    "en": "jean-paul-gaultier"
                },
                "variants": [],
                "allVariants": [
                    {
                        "assets": [],
                        "attributes": [
                            {
                                "name": "baseId",
                                "value": "4532"
                            }
                        ],
                        "availability": null,
                        "id": 1,
                        "images": [
                            {
                                "url": "https://55b04f920fa53a42249e-5110a72d79ca30656f0873e4e7b95dbe.ssl.cf3.rackcdn.com/jean-paul-gaultier-s-88xRJ8Cy.jpg",
                                "dimensions": {
                                    "w": 215,
                                    "h": 251
                                },
                                "label": null
                            }
                        ],
                        "key": "22",
                        "price": null,
                        "prices": [
                            {
                                "channel": null,
                                "country": null,
                                "custom": null,
                                "customerGroup": null,
                                "discounted": null,
                                "id": "d1c6375e-dfdd-484e-879f-a8fe5a23dd2e",
                                "tiers": null,
                                "validFrom": null,
                                "validUntil": null,
                                "value": {
                                    "factory": {
                                        "defaultMonetaryContext": {
                                            "precision": 0,
                                            "fixedScale": false,
                                            "maxScale": 63,
                                            "amountType": "org.javamoney.moneta.Money",
                                            "empty": false,
                                            "providerName": null
                                        },
                                        "minNumber": null,
                                        "maxNumber": null,
                                        "amountType": "org.javamoney.moneta.Money",
                                        "maximalMonetaryContext": {
                                            "precision": 0,
                                            "fixedScale": false,
                                            "maxScale": -1,
                                            "amountType": "org.javamoney.moneta.Money",
                                            "empty": false,
                                            "providerName": null
                                        }
                                    },
                                    "context": {
                                        "precision": 256,
                                        "fixedScale": false,
                                        "maxScale": -1,
                                        "amountType": "org.javamoney.moneta.Money",
                                        "empty": false,
                                        "providerName": null
                                    },
                                    "number": 50,
                                    "zero": false,
                                    "negative": false,
                                    "currency": {
                                        "context": {
                                            "empty": false,
                                            "providerName": "java.util.Currency"
                                        },
                                        "defaultFractionDigits": 2,
                                        "currencyCode": "EUR",
                                        "numericCode": 978
                                    },
                                    "positive": true,
                                    "negativeOrZero": false,
                                    "positiveOrZero": true
                                }
                            }
                        ],
                        "scopedPrice": null,
                        "sku": "245",
                        "isMatchingVariant": null,
                        "scopedPriceDiscounted": null
                    }
                ]
            },
            "staged": {
                "categories": [
                    {
                        "typeId": "category",
                        "id": "05005125-3b5b-40df-bd8f-18cf6e2aa0d4",
                        "key": null
                    }
                ],
                "categoryOrderHints": {},
                "description": null,
                "masterVariant": {
                    "assets": [],
                    "attributes": [
                        {
                            "name": "baseId",
                            "value": "4532"
                        }
                    ],
                    "availability": null,
                    "id": 1,
                    "images": [
                        {
                            "url": "https://55b04f920fa53a42249e-5110a72d79ca30656f0873e4e7b95dbe.ssl.cf3.rackcdn.com/jean-paul-gaultier-s-88xRJ8Cy.jpg",
                            "dimensions": {
                                "w": 215,
                                "h": 251
                            },
                            "label": null
                        }
                    ],
                    "key": "22",
                    "price": null,
                    "prices": [
                        {
                            "channel": null,
                            "country": null,
                            "custom": null,
                            "customerGroup": null,
                            "discounted": null,
                            "id": "d1c6375e-dfdd-484e-879f-a8fe5a23dd2e",
                            "tiers": null,
                            "validFrom": null,
                            "validUntil": null,
                            "value": {
                                "factory": {
                                    "defaultMonetaryContext": {
                                        "precision": 0,
                                        "fixedScale": false,
                                        "maxScale": 63,
                                        "amountType": "org.javamoney.moneta.Money",
                                        "empty": false,
                                        "providerName": null
                                    },
                                    "minNumber": null,
                                    "maxNumber": null,
                                    "amountType": "org.javamoney.moneta.Money",
                                    "maximalMonetaryContext": {
                                        "precision": 0,
                                        "fixedScale": false,
                                        "maxScale": -1,
                                        "amountType": "org.javamoney.moneta.Money",
                                        "empty": false,
                                        "providerName": null
                                    }
                                },
                                "context": {
                                    "precision": 256,
                                    "fixedScale": false,
                                    "maxScale": -1,
                                    "amountType": "org.javamoney.moneta.Money",
                                    "empty": false,
                                    "providerName": null
                                },
                                "number": 50,
                                "zero": false,
                                "negative": false,
                                "currency": {
                                    "context": {
                                        "empty": false,
                                        "providerName": "java.util.Currency"
                                    },
                                    "defaultFractionDigits": 2,
                                    "currencyCode": "EUR",
                                    "numericCode": 978
                                },
                                "positive": true,
                                "negativeOrZero": false,
                                "positiveOrZero": true
                            }
                        }
                    ],
                    "scopedPrice": null,
                    "sku": "245",
                    "isMatchingVariant": null,
                    "scopedPriceDiscounted": null
                },
                "metaDescription": null,
                "metaKeywords": null,
                "metaTitle": null,
                "name": {
                    "en": "Jean Paul Gaultier"
                },
                "searchKeywords": {},
                "slug": {
                    "en": "jean-paul-gaultier"
                },
                "variants": [],
                "allVariants": [
                    {
                        "assets": [],
                        "attributes": [
                            {
                                "name": "baseId",
                                "value": "4532"
                            }
                        ],
                        "availability": null,
                        "id": 1,
                        "images": [
                            {
                                "url": "https://55b04f920fa53a42249e-5110a72d79ca30656f0873e4e7b95dbe.ssl.cf3.rackcdn.com/jean-paul-gaultier-s-88xRJ8Cy.jpg",
                                "dimensions": {
                                    "w": 215,
                                    "h": 251
                                },
                                "label": null
                            }
                        ],
                        "key": "22",
                        "price": null,
                        "prices": [
                            {
                                "channel": null,
                                "country": null,
                                "custom": null,
                                "customerGroup": null,
                                "discounted": null,
                                "id": "d1c6375e-dfdd-484e-879f-a8fe5a23dd2e",
                                "tiers": null,
                                "validFrom": null,
                                "validUntil": null,
                                "value": {
                                    "factory": {
                                        "defaultMonetaryContext": {
                                            "precision": 0,
                                            "fixedScale": false,
                                            "maxScale": 63,
                                            "amountType": "org.javamoney.moneta.Money",
                                            "empty": false,
                                            "providerName": null
                                        },
                                        "minNumber": null,
                                        "maxNumber": null,
                                        "amountType": "org.javamoney.moneta.Money",
                                        "maximalMonetaryContext": {
                                            "precision": 0,
                                            "fixedScale": false,
                                            "maxScale": -1,
                                            "amountType": "org.javamoney.moneta.Money",
                                            "empty": false,
                                            "providerName": null
                                        }
                                    },
                                    "context": {
                                        "precision": 256,
                                        "fixedScale": false,
                                        "maxScale": -1,
                                        "amountType": "org.javamoney.moneta.Money",
                                        "empty": false,
                                        "providerName": null
                                    },
                                    "number": 50,
                                    "zero": false,
                                    "negative": false,
                                    "currency": {
                                        "context": {
                                            "empty": false,
                                            "providerName": "java.util.Currency"
                                        },
                                        "defaultFractionDigits": 2,
                                        "currencyCode": "EUR",
                                        "numericCode": 978
                                    },
                                    "positive": true,
                                    "negativeOrZero": false,
                                    "positiveOrZero": true
                                }
                            }
                        ],
                        "scopedPrice": null,
                        "sku": "245",
                        "isMatchingVariant": null,
                        "scopedPriceDiscounted": null
                    }
                ]
            }
        },
        "productType": {
            "typeId": "product-type",
            "id": "495ab177-e063-43cc-87be-fdb216113274",
            "key": null
        },
        "reviewRatingStatistics": null,
        "state": null,
        "taxCategory": null,
        "version": 8
    }
}

Salesforce Commerce example

Gets the product with an ID of electronics-m-catalog~canon-eos-50d-bodyM.

curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/products/electronics-m-catalog~canon-eos-50d-bodyM?definitionName=salesforce-commerce&connectionName=connection-RefArch"

JSON response

{
    "id": {
        "definitionName": "salesforce-commerce",
        "connectionName": "connection-RefArch",
        "itemId": "electronics-m-catalog~canon-eos-50d-bodyM"
    },
    "name": "Canon EOS 50D Digital SLR Camera (body only)",
    "price": "979.99",
    "sku": "canon-eos-50d-bodyM",
    "description": " Canon's new EOS 50D bridges the gap between the novice and the seasoned pro with a perfect combination of high-speed and quality. It features an APS-C sized 15.1-megapixel CMOS sensor for tremendous images, new DIGIC 4 Image Processor for fine detail and superior color reproduction, and improved ISO capabilities up to 12800 for uncompromised shooting even in the dimmest situations. It features a refined 3.0-inch Clear View LCD (920,000 dots) monitor, supercharged Live View Function with Face Detection Live mode, plus a number of new automatic Image Correction settings and HDMI output for viewing images on an HDTV. Pick up the EOS 50D and you'll experience true digital inspiration! ",
    "status": null,
    "visibility": null,
    "weight": null,
    "categoryIds": [
        {
            "definitionName": "salesforce-commerce",
            "connectionName": "connection-RefArch",
            "itemId": "electronics-m-catalog~electronics-digital-cameras"
        }
    ],
    "images": [
        "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/large/canon-eos-50d-body.jpg",
        "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/medium/canon-eos-50d-body.jpg",
        "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/small/canon-eos-50d-body.jpg"
    ],
    "imageGroups": [
        {
            "images": [
                {
                    "type": "media_file",
                    "disBaseLink": "https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZXZ_003/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/large/canon-eos-50d-body.jpg",
                    "link": "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/large/canon-eos-50d-body.jpg"
                }
            ],
            "type": "image_group"
        }
    ]
}

SAP example

Gets the product with an ID of 847942.

curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/products/847942?definitionName=sap-commerce&connectionName=electronics"

JSON response

{
    "name": "AC Adapter",
    "price": "$218.56",
    "description": "-Quick charger for infoLITHIUM™ H and P series. <br/>-Consecutive dual battery charging. <br/>-Compatible with H and P series batteries. <br/>-Indicates charging time & current remaining battery life.",
    "images": [
        "https://40.114.149.179:9002/medias/?context=bWFzdGVyfGltYWdlc3wzMTE5MXxpbWFnZS9qcGVnfGltYWdlcy9oODEvaDYyLzg3OTcyNjgxMTU0ODYuanBnfDdkNzJhZjExNWYxODk3MjgzNmZjOTA1MzdkMmI3NTJiNDk2OGQ1YWE1MjcwMDEyNTFhZTEyNjM5NTZlNzMxNWE",
        "https://40.114.149.179:9002/medias/?context=bWFzdGVyfGltYWdlc3wxMzk4MnxpbWFnZS9qcGVnfGltYWdlcy9oMDcvaGVhLzg3OTcyOTQzOTU0MjIuanBnfDA3MjkzYzRmMDBhNDk1OGRmNjhiZDA4ZmUxOTA2MDVkZDdhYmJkOWUzM2U2YmM5ODVkZDkwMThlMThjMzdjMTE"
    ],
    "id": {
        "definitionName": "sap-commerce",
        "connectionName": "electronics",
        "itemId": "847942"
    },
    "sku": "847942",
    "status": null,
    "visibility": null,
    "weight": null,
    "categoryIds": [
        {
            "definitionName": "sap-commerce",
            "connectionName": "electronics",
            "itemId": "electronicsProductCatalog/Online/829"
        },
        {
            "definitionName": "sap-commerce",
            "connectionName": "electronics",
            "itemId": "electronicsProductCatalog/Online/brand_5"
        }
    ]
}

Get product by category ID

Returns a list of products based on the ID of a category.

Request URL

/.rest/ecommerce/v1/products/category/{categoryId}

Parameters

Parameter Description Type Data Type

definitionName

required

The definition name.

query

string

connectionName

required

The connection name.

query

string

categoryId

required

The category ID.

path

string

Magento example

Gets the list of products from the category with an ID of 6.

curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/products/category/6?definitionName=magento&connectionName=connection"

JSON response

[
    {
        "name": "Aim Analog Watch",
        "id": {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "24-MG04"
        },
        "sku": "24-MG04",
        "price": "45",
        "status": 1,
        "visibility": 4,
        "weight": null,
        "description": "<p>Stay light-years ahead of the competition with our Aim Analog Watch. The flexible, rubberized strap is contoured to conform to the shape of your wrist for a comfortable all-day fit. The face features three illuminated hands, a digital read-out of the current time, and stopwatch functions.</p>\n<ul>\n<li>Japanese quartz movement.</li>\n<li>Strap fits 7\" to 8.0\".</li>\n</ul>",
        "categoryIds": [
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "3"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "6"
            }
        ],
        "images": [
            "https://demo1-m2.mage.direct//pub/media/catalog/product/m/g/mg04-bk-0.jpg"
        ],
        "attribute_set_id": "11",
        "type_id": "simple",
        "created_at": "2018-08-07 12:47:10",
        "updated_at": "2018-08-07 12:47:10"
    },
    {
        "name": "Endurance Watch",
        "id": {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "24-MG01"
        },
        "sku": "24-MG01",
        "price": "49",
        "status": 1,
        "visibility": 4,
        "weight": null,
        "description": "<p>It's easy to track and monitor your training progress with the Endurance Watch. You'll see standard info like time, date and day of the week, but it also functions for the serious high-mileage athete: lap counter, stopwatch, distance, heart rate, speed/pace, cadence and altitude.</p>\n<ul>\n<li>Digital display.</li>\n<li>LED backlight.</li>\n<li>Strap fits 7\" to 10\".</li>\n<li>1-year limited warranty.</li>\n<li>Comes with polished metal case.</li>\n</ul>",
        "categoryIds": [
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "3"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "6"
            }
        ],
        "images": [
            "https://demo1-m2.mage.direct//pub/media/catalog/product/m/g/mg01-bk-0.jpg"
        ],
        "attribute_set_id": "11",
        "type_id": "simple",
        "created_at": "2018-08-07 12:47:11",
        "updated_at": "2018-08-07 12:47:11"
    },
    {
        "name": "Summit Watch",
        "id": {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "24-MG03"
        },
        "sku": "24-MG03",
        "price": "54",
        "status": 1,
        "visibility": 4,
        "weight": null,
        "description": "<p>Trek high and low in the attractive Summit Watch, which features a digital LED display with time and date, stopwatch, lap counter, and 3-second backlight. It can also calculate the number of steps taken and calories burned.</p>\n<ul>\n<li>Brushed metal case.</li>\n<li>Water resistant (100 meters).</li>\n<li>Buckle clasp.</li>\n<li>Strap fits 7\" - 10\".</li>\n<li>1-year limited warranty.</li>\n</ul>",
        "categoryIds": [
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "3"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "6"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "7"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "8"
            }
        ],
        "images": [
            "https://demo1-m2.mage.direct//pub/media/catalog/product/m/g/mg03-br-0.jpg"
        ],
        "attribute_set_id": "11",
        "type_id": "simple",
        "created_at": "2018-08-07 12:47:11",
        "updated_at": "2018-08-07 12:47:11"
    },
    {
        "name": "Cruise Dual Analog Watch",
        "id": {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "24-MG05"
        },
        "sku": "24-MG05",
        "price": "55",
        "status": 1,
        "visibility": 4,
        "weight": null,
        "description": "<p>Whether you're traveling or wish you were, you'll never let time zones perplex you again with the Cruise Dual Analog Watch. The thick, adjustable band promises a comfortable, personalized fit to this classy, modern time piece.</p>\n<ul>\n<li>Two dials.</li>\n<li>Stainless steel case.</li>\n<li>Adjustable leather band.</li>\n</ul>",
        "categoryIds": [
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "3"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "6"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "7"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "8"
            }
        ],
        "images": [
            "https://demo1-m2.mage.direct//pub/media/catalog/product/m/g/mg05-br-0.jpg"
        ],
        "attribute_set_id": "11",
        "type_id": "simple",
        "created_at": "2018-08-07 12:47:11",
        "updated_at": "2018-08-07 12:47:11"
    },
    {
        "name": "Dash Digital Watch",
        "id": {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "24-MG02"
        },
        "sku": "24-MG02",
        "price": "92",
        "status": 1,
        "visibility": 4,
        "weight": null,
        "description": "<p>The Dash Digital Watch will challenge you to push harder and longer. Log workouts by date, average, and segment times, and recharge by setting hydration and nutrition alarms. This watch is styled with a sleek, square face and durable rubber strap for a long life.</p>\n<ul>\n<li>Digital display.</li>\n<li>LED backlight.</li>\n<li>Rubber strap with buckle clasp.</li>\n<li>1-year limited warranty.</li>",
        "categoryIds": [
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "3"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "6"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "7"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "8"
            }
        ],
        "images": [
            "https://demo1-m2.mage.direct//pub/media/catalog/product/m/g/mg02-bk-0.jpg"
        ],
        "attribute_set_id": "11",
        "type_id": "simple",
        "created_at": "2018-08-07 12:47:11",
        "updated_at": "2018-08-07 12:47:11"
    },
    {
        "name": "Luma Analog Watch",
        "id": {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "24-WG09"
        },
        "sku": "24-WG09",
        "price": "43",
        "status": 1,
        "visibility": 4,
        "weight": null,
        "description": "<p>Designed to stand up to your active lifestyle, this women's Luma Analog Watch features a tasteful brushed chrome finish and a stainless steel, water-resistant construction for lasting durability.</p>\n<ul>\n<li>Precision Miyota® three-hand movement.</li>\n</ul>",
        "categoryIds": [
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "3"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "6"
            }
        ],
        "images": [
            "https://demo1-m2.mage.direct//pub/media/catalog/product/w/g/wg09-gr-0.jpg"
        ],
        "attribute_set_id": "11",
        "type_id": "simple",
        "created_at": "2018-08-07 12:47:11",
        "updated_at": "2018-08-07 12:47:11"
    },
    {
        "name": "Bolo Sport Watch",
        "id": {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "24-WG01"
        },
        "sku": "24-WG01",
        "price": "49",
        "status": 1,
        "visibility": 4,
        "weight": null,
        "description": "<p>The Bolo Sport Watch is sleek, sporty and sized just right to fit your smaller wrist. Easy to read and set up, it features a large digital face and button-activated alarm and stopwatch. The soft-touch resin band promises no-pinch comfort, while the water-resistant design lets you take your workout to the lap pool.</p>\n<ul>\n<li>Displays time, day and date.</li>\n<li>Two-tone design.</li>\n<li>12/24 hour formats.</li>\n<li>Nickel-free buckle on band.</li>\n<li>Battery included.</li>\n</ul>",
        "categoryIds": [
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "3"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "6"
            }
        ],
        "images": [
            "https://demo1-m2.mage.direct//pub/media/catalog/product/w/g/wg01-bk-0.jpg"
        ],
        "attribute_set_id": "11",
        "type_id": "simple",
        "created_at": "2018-08-07 12:47:12",
        "updated_at": "2018-08-07 12:47:12"
    },
    {
        "name": "Clamber Watch",
        "id": {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "24-WG03"
        },
        "sku": "24-WG03",
        "price": "54",
        "status": 1,
        "visibility": 4,
        "weight": null,
        "description": "<p>Keep track of time on the treadmill or trail with our Clamber Watch. The flexible, rubberized strap is contoured to conform to your wrist for a comfortable fit all day. The face features an illuminated digital read-out of the current time and stopwatch functions.</p>\n<ul>\n<li>Japanese quartz movement.</li>\n<li>Strap fits 5\" to 6.0\".</li>\n</ul>",
        "categoryIds": [
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "3"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "6"
            }
        ],
        "images": [
            "https://demo1-m2.mage.direct//pub/media/catalog/product/w/g/wg03-gr-0.jpg",
            "https://demo1-m2.mage.direct//pub/media/catalog/product/w/g/wg03-sa-0.jpg"
        ],
        "attribute_set_id": "11",
        "type_id": "simple",
        "created_at": "2018-08-07 12:47:12",
        "updated_at": "2018-08-07 12:47:12"
    },
    {
        "name": "Didi Sport Watch",
        "id": {
            "definitionName": "magento",
            "connectionName": "connection",
            "itemId": "24-WG02"
        },
        "sku": "24-WG02",
        "price": "92",
        "status": 1,
        "visibility": 4,
        "weight": null,
        "description": "<p>The Didi Sport Watch helps you keep your workout plan down to the second. The vertical, digital face looks sleek and futuristic. This watch is programmed with tons of helpful features such as a timer, an alarm clock, a pedometer, and more to help make your excercise more productive.</p>\n<ul>\n<li>Digital display.</li>\n<li>LED backlight.</li>\n<li>Rubber strap with buckle clasp.</li>\n<li>1-year limited warranty.</li>\n</ul>",
        "categoryIds": [
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "3"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "6"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "7"
            },
            {
                "definitionName": "magento",
                "connectionName": "connection",
                "itemId": "8"
            }
        ],
        "images": [
            "https://demo1-m2.mage.direct//pub/media/catalog/product/w/g/wg02-bk-0.jpg"
        ],
        "attribute_set_id": "11",
        "type_id": "simple",
        "created_at": "2018-08-07 12:47:12",
        "updated_at": "2018-08-07 12:47:12"
    }
]

commercetools example

Gets the list of products from the category with an ID of 5c804c8d-d628-41fe-84ca-6f5a1fb161a9.

curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/products/category/5c804c8d-d628-41fe-84ca-6f5a1fb161a9?definitionName=commercetools&connectionName=connection"

JSON response

[
    {
        "id": {
            "definitionName": "commercetools",
            "connectionName": "connection",
            "itemId": "7c7a27ef-16f4-4594-ad8f-4a16f258e242"
        },
        "name": "Lacome",
        "sku": "12312",
        "description": "La vie est belle",
        "price": "EUR 52",
        "status": null,
        "visibility": 1,
        "weight": null,
        "categoryIds": [
            {
                "definitionName": "commercetools",
                "connectionName": "connection",
                "itemId": "05005125-3b5b-40df-bd8f-18cf6e2aa0d4"
            },
            {
                "definitionName": "commercetools",
                "connectionName": "connection",
                "itemId": "d7c9e7b7-d9da-4e5a-a3f9-a111943ddf82"
            },
            {
                "definitionName": "commercetools",
                "connectionName": "connection",
                "itemId": "5c804c8d-d628-41fe-84ca-6f5a1fb161a9"
            }
        ],
        "images": [
            "https://55b04f920fa53a42249e-5110a72d79ca30656f0873e4e7b95dbe.ssl.cf3.rackcdn.com/lancome-la-vie-est-b-mziadDvS.jpg"
        ],
        "referencedProduct": {
            "createdAt": {
                "offset": {
                    "totalSeconds": 0,
                    "id": "Z",
                    "rules": {
                        "fixedOffset": true,
                        "transitions": [],
                        "transitionRules": []
                    }
                },
                "zone": {
                    "totalSeconds": 0,
                    "id": "Z",
                    "rules": {
                        "fixedOffset": true,
                        "transitions": [],
                        "transitionRules": []
                    }
                },
                "dayOfWeek": "THURSDAY",
                "dayOfYear": 313,
                "year": 2017,
                "month": "NOVEMBER",
                "monthValue": 11,
                "dayOfMonth": 9,
                "hour": 14,
                "minute": 36,
                "second": 15,
                "nano": 569000000,
                "chronology": {
                    "id": "ISO",
                    "calendarType": "iso8601"
                }
            },
...

Salesforce Commerce example

Gets the list of products from the category with an ID of electronics-m-catalog~electronics-digital-cameras.

curl --user 'superuser:superuser' --request GET "http://localhost:8080/magnoliaAuthor/.rest/ecommerce/v1/products/category/electronics-m-catalog~electronics-digital-cameras?definitionName=salesforce-commerce&connectionName=connection-RefArch"

JSON response

[
    {
        "id": {
            "definitionName": "salesforce-commerce",
            "connectionName": "connection-RefArch",
            "itemId": "electronics-m-catalog~S2510211M"
        },
        "name": "Samsung Digimax A6 - Digital camera - 6.0 Mpix - optical zoom: 3 x - supported memory: MMC, SD",
        "price": "399.99",
        "sku": "S2510211M",
        "description": "",
        "status": null,
        "visibility": null,
        "weight": null,
        "categoryIds": [
            {
                "definitionName": "salesforce-commerce",
                "connectionName": "connection-RefArch",
                "itemId": "electronics-m-catalog~electronics-digital-cameras"
            }
        ],
        "images": [
            "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/large/Samsung-DigimaxA6.jpg",
            "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/medium/Samsung-DigimaxA6.jpg",
            "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/small/Samsung-DigimaxA6.jpg"
        ],
        "imageGroups": [
            {
                "images": [
                    {
                        "type": "media_file",
                        "disBaseLink": "https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZXZ_003/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/large/Samsung-DigimaxA6.jpg",
                        "link": "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/large/Samsung-DigimaxA6.jpg"
                    }
                ],
                "type": "image_group"
            },
            {
                "images": [
                    {
                        "type": "media_file",
                        "disBaseLink": "https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZXZ_003/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/medium/Samsung-DigimaxA6.jpg",
                        "link": "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/medium/Samsung-DigimaxA6.jpg"
                    }
                ],
                "type": "image_group"
            },
            {
                "images": [
                    {
                        "type": "media_file",
                        "disBaseLink": "https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZXZ_003/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/small/Samsung-DigimaxA6.jpg",
                        "link": "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/small/Samsung-DigimaxA6.jpg"
                    }
                ],
                "type": "image_group"
            }
        ]
    },
    {
        "id": {
            "definitionName": "salesforce-commerce",
            "connectionName": "connection-RefArch",
            "itemId": "electronics-m-catalog~canon-eos-50d-bodyM"
        },
        "name": "Canon EOS 50D Digital SLR Camera (body only)",
        "price": "979.99",
        "sku": "canon-eos-50d-bodyM",
        "description": " Canon's new EOS 50D bridges the gap between the novice and the seasoned pro with a perfect combination of high-speed and quality. It features an APS-C sized 15.1-megapixel CMOS sensor for tremendous images, new DIGIC 4 Image Processor for fine detail and superior color reproduction, and improved ISO capabilities up to 12800 for uncompromised shooting even in the dimmest situations. It features a refined 3.0-inch Clear View LCD (920,000 dots) monitor, supercharged Live View Function with Face Detection Live mode, plus a number of new automatic Image Correction settings and HDMI output for viewing images on an HDTV. Pick up the EOS 50D and you'll experience true digital inspiration! ",
        "status": null,
        "visibility": null,
        "weight": null,
        "categoryIds": [
            {
                "definitionName": "salesforce-commerce",
                "connectionName": "connection-RefArch",
                "itemId": "electronics-m-catalog~electronics-digital-cameras"
            }
        ],
        "images": [
            "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/large/canon-eos-50d-body.jpg",
            "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/medium/canon-eos-50d-body.jpg",
            "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/small/canon-eos-50d-body.jpg"
        ],
        "imageGroups": [
            {
                "images": [
                    {
                        "type": "media_file",
                        "disBaseLink": "https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZXZ_003/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/large/canon-eos-50d-body.jpg",
                        "link": "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/large/canon-eos-50d-body.jpg"
                    }
                ],
                "type": "image_group"
            },
            {
                "images": [
                    {
                        "type": "media_file",
                        "disBaseLink": "https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZXZ_003/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/medium/canon-eos-50d-body.jpg",
                        "link": "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/medium/canon-eos-50d-body.jpg"
                    }
                ],
                "type": "image_group"
            },
            {
                "images": [
                    {
                        "type": "media_file",
                        "disBaseLink": "https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZXZ_003/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/small/canon-eos-50d-body.jpg",
                        "link": "https://zzxz-003.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-electronics-m-catalog/default/va49692be9eb16e6e7d5a8630f27fdc60a9d38e4d/images/small/canon-eos-50d-body.jpg"
                    }
                ],
                "type": "image_group"
            }
        ]
    }
]
...
Currently, there is no API for productByCategoryId in the SAP connector, so we cannot provide an example of the REST endpoint in this case.
Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the Ecommerce module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules