{"id":2268,"date":"2024-12-05T18:18:15","date_gmt":"2024-12-05T17:18:15","guid":{"rendered":"https:\/\/france.magicsoftware.com\/blog\/?p=2268"},"modified":"2025-01-10T14:32:58","modified_gmt":"2025-01-10T13:32:58","slug":"prestashop-magic-xpi","status":"publish","type":"post","link":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/","title":{"rendered":"Prestashop &#8211; Magic xpi"},"content":{"rendered":"\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>Goal<\/strong> : How to implement Webhook and call Prestashop REST API from Magic xpi when Order status is changed<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Prerequisite :<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Prestashop up and running (i have used an AWS image with prestashop already configured from Intuz )<\/li>\n\n\n\n<li>Credentials<\/li>\n\n\n\n<li>FTP access to upload the Magic xpi module in prestashop (not mandatory)<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"597\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro-1024x597.png\" alt=\"\" class=\"wp-image-2288\" style=\"width:514px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro-1024x597.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro-300x175.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro-768x448.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro.png 1503w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1\/ Webhook <\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>In our case, we want to trigger a Magic xpi Flow when an Order is validated in the Shopping site<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"663\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro5-1024x663.png\" alt=\"\" class=\"wp-image-2313\" style=\"width:492px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro5-1024x663.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro5-300x194.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro5-768x497.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro5.png 1240w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"673\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro6-1024x673.png\" alt=\"\" class=\"wp-image-2317\" style=\"width:494px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro6-1024x673.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro6-300x197.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro6-768x505.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro6.png 1188w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To implement a webhook to trigger Magic xpi Flow, you have to Write a Prestashop module in PHP.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The result of this step will be<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"412\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta1-1024x412.png\" alt=\"\" class=\"wp-image-2282\" style=\"width:759px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta1-1024x412.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta1-300x121.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta1-768x309.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta1-1536x618.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta1.png 1876w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"632\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta2-3-1024x632.png\" alt=\"\" class=\"wp-image-2347\" style=\"width:641px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta2-3-1024x632.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta2-3-300x185.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta2-3-768x474.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta2-3.png 1422w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"> To get this result, navigate to <a href=\"https:\/\/validator.prestashop.com\/generator\">https:\/\/validator.prestashop.com\/generator<\/a> to generate a basic module and fill the information like below<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"747\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro2-1024x747.png\" alt=\"\" class=\"wp-image-2273\" style=\"width:500px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro2-1024x747.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro2-300x219.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro2-768x560.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro2.png 1154w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click Next<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"711\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro3-1024x711.png\" alt=\"\" class=\"wp-image-2275\" style=\"width:516px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro3-1024x711.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro3-300x208.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro3-768x533.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro3.png 1162w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click Next and type <strong>ActionOrderStatusUpdate<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"497\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro4-1024x497.png\" alt=\"\" class=\"wp-image-2277\" style=\"width:472px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro4-1024x497.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro4-300x145.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro4-768x372.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta_Intro4.png 1157w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Refer to <a href=\"https:\/\/devdocs.prestashop-project.org\/8\/modules\/concepts\/hooks\/list-of-hooks\/actionorderstatusupdate\" title=\"\">https:\/\/devdocs.prestashop-project.org\/8\/modules\/concepts\/hooks\/list-of-hooks\/actionorderstatusupdate<\/a> for documentation<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"796\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta10-1024x796.png\" alt=\"\" class=\"wp-image-2398\" style=\"width:441px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta10-1024x796.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta10-300x233.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta10-768x597.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta10.png 1124w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After clicking Next, you will get a zip file containing all the necessary files to implement the module.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"859\" height=\"233\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta5.png\" alt=\"\" class=\"wp-image-2279\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta5.png 859w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta5-300x81.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta5-768x208.png 768w\" sizes=\"auto, (max-width: 859px) 100vw, 859px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Replace the logo.png file with a 32*32 pixel png file (magic logo)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2\/ Modify the Magicxpi.php file like below<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Register the module to the Hook <strong>ActionOrderStatusUpdate<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"724\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta7-1024x724.png\" alt=\"\" class=\"wp-image-2292\" style=\"width:550px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta7-1024x724.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta7-300x212.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta7-768x543.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta7.png 1138w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Define a Configuration URL variable that will hold the Magic xpi Trigger URL<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"681\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta9-1024x681.png\" alt=\"\" class=\"wp-image-2295\" style=\"width:594px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta9-1024x681.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta9-300x200.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta9-768x511.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta9.png 1088w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Create a function <strong>hookActionOrderStatusUpdate($params)<\/strong> and write the code like below<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We will receive, in the Magic xpi Flow, Order_Id in the URL and Order_ID + newOrderStatus in the body in JSON<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"804\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta8-2-1024x804.png\" alt=\"\" class=\"wp-image-2298\" style=\"width:560px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta8-2-1024x804.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta8-2-300x236.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta8-2-768x603.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta8-2.png 1117w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Save your file and zip the Magic xpi folder to get a new Magicxpi.zip<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3\/ Sign in with your admin user and Upload your Magic xpi module in the Prestashop website<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"396\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta15-1024x396.png\" alt=\"\" class=\"wp-image-2303\" style=\"width:826px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta15-1024x396.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta15-300x116.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta15-768x297.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta15-1536x594.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta15.png 1865w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If successfull, the result will be<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"412\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta1-1-1024x412.png\" alt=\"\" class=\"wp-image-2306\" style=\"width:701px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta1-1-1024x412.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta1-1-300x121.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta1-1-768x309.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta1-1-1536x618.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta1-1.png 1876w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click on Configure to fill the magic xpi URL<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"632\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta2-2-1024x632.png\" alt=\"\" class=\"wp-image-2308\" style=\"width:594px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta2-2-1024x632.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta2-2-300x185.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta2-2-768x474.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta2-2.png 1422w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(*) We will discuss below the Magic xpi URL structure<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4\/ Create a Magic xpi Service to get the order<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create a RESTful API service and set the URL to : <strong>http:\/\/localhost:6443\/xpiREST<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Define a Path with the structure : <strong>\/order\/{id}<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"308\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta12-1024x308.png\" alt=\"\" class=\"wp-image-2324\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta12-1024x308.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta12-300x90.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta12-768x231.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta12.png 1262w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">5\/ Create a Magic xpi Flow with a RESTful trigger<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"615\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta11-1024x615.png\" alt=\"\" class=\"wp-image-2326\" style=\"width:648px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta11-1024x615.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta11-300x180.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta11-768x461.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta11.png 1295w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Catch the Id parameter in a context variable (C.ExternalObjectID) and the Body in a context variable (C.RequestPayload)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">6\/ Get the order detail using <strong>Prestashop REST API<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To call the <strong>Prestashop REST API<\/strong>, you have to define an API Key and set the rights on the objects.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"462\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta3-1024x462.png\" alt=\"\" class=\"wp-image-2331\" style=\"width:786px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta3-1024x462.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta3-300x135.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta3-768x346.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta3-1536x692.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta3.png 1859w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Set the permissions on the objects (minimum you have to tick GET on the object \u00ab\u00a0orders\u00a0\u00bb)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"501\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta4-1024x501.png\" alt=\"\" class=\"wp-image-2333\" style=\"width:729px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta4-1024x501.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta4-300x147.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta4-768x376.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta4-1536x751.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta4.png 1808w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">7\/ Define a Magic xpi REST resource<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"389\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta14-1-1024x389.png\" alt=\"\" class=\"wp-image-2338\" style=\"width:779px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta14-1-1024x389.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta14-1-300x114.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta14-1-768x292.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta14-1.png 1497w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We choose JSON format for the output and full option in the query<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">8\/ Drag and drop REST Client connector <\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"593\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta13-1024x593.png\" alt=\"\" class=\"wp-image-2340\" style=\"width:604px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta13-1024x593.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta13-300x174.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta13-768x444.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta13.png 1232w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">catch JSON Prestashop Order detail in a context variable C.OrderDetail_eCommerce <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">9\/ Make a break point after this step<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">10\/ From now, you are going to be able to test your webhook<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My prestashop system and My Magic xpi system are located in the same AWS VPC.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My prestashop system has a public IP with Firewall rule.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To test and simulate the call, you can use Postman <\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"343\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta16-1024x343.png\" alt=\"\" class=\"wp-image-2344\" style=\"width:714px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta16-1024x343.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta16-300x101.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta16-768x257.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta16.png 1364w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The JSON request body corresponds to what Prestashop Module is going to send.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You should receive an HTTP 200 code<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">11\/ Magic xpi monitor<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You should see in the Blob, the order detail in JSON format.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"391\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta17-1024x391.png\" alt=\"\" class=\"wp-image-2350\" style=\"width:784px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta17-1024x391.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta17-300x115.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta17-768x293.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta17-1536x586.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta17.png 1860w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This order corresponds to :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"442\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta18-1024x442.png\" alt=\"\" class=\"wp-image-2352\" style=\"width:505px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta18-1024x442.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta18-300x129.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta18-768x331.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta18-1536x663.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta18.png 1676w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">11\/ If it&rsquo;s working with postman then you can test it directly in the Prestashop website by creating an order and place this order in the Cart.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(see screen captures from step 1)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">12\/ You can use this implementation to automatically create the order in any back end system (ERP, WMS, &#8230;) such as SAP ECC6, D365FinanceOperation, &#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">you can use this mechanism on any prestashop objects with any webhooks that are supported.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Goal : How to implement Webhook and call Prestashop REST API from Magic xpi when Order status is changed Prerequisite : 1\/ Webhook In our case, we want to trigger a Magic xpi Flow when an Order is validated in the Shopping site To implement a webhook to trigger Magic xpi Flow, you have to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2354,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[64,4,63,65],"tags":[68,67,66],"class_list":["post-2268","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ecommerce","category-magic-xpi","category-prestashop","category-retail","tag-ecommerce","tag-prestashop","tag-retail"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Goal : How to implement Webhook and call Prestashop REST API from Magic xpi when Order status is changed Prerequisite : Prestashop up and running (i have used an AWS image with prestashop already configured from Intuz ) Credentials FTP access to upload the Magic xpi module in prestashop (not mandatory) 1\/ Webhook In our\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Sa\u00e2d Alem\"\/>\n\t<meta name=\"google-site-verification\" content=\"5yLZLt_RgZVqkETQDrOlMUHaNTra2i5W8dtHQoCMueY\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"fr_FR\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Le Blog Techno | Magic Software France\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Prestashop \u2013 Magic xpi | Le Blog Techno\" \/>\n\t\t<meta property=\"og:description\" content=\"Goal : How to implement Webhook and call Prestashop REST API from Magic xpi when Order status is changed Prerequisite : Prestashop up and running (i have used an AWS image with prestashop already configured from Intuz ) Credentials FTP access to upload the Magic xpi module in prestashop (not mandatory) 1\/ Webhook In our\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico\" \/>\n\t\t<meta property=\"og:image:width\" content=\"16\" \/>\n\t\t<meta property=\"og:image:height\" content=\"16\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-12-05T17:18:15+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2025-01-10T13:32:58+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MagicSoftwareEnterprises\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@MagicSoftware\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Prestashop \u2013 Magic xpi | Le Blog Techno\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Goal : How to implement Webhook and call Prestashop REST API from Magic xpi when Order status is changed Prerequisite : Prestashop up and running (i have used an AWS image with prestashop already configured from Intuz ) Credentials FTP access to upload the Magic xpi module in prestashop (not mandatory) 1\/ Webhook In our\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@MagicSoftware\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#blogposting\",\"name\":\"Prestashop \\u2013 Magic xpi | Le Blog Techno\",\"headline\":\"Prestashop &#8211; Magic xpi\",\"author\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/author\\\/saad\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/Presta19.png\",\"width\":418,\"height\":121},\"datePublished\":\"2024-12-05T18:18:15+01:00\",\"dateModified\":\"2025-01-10T14:32:58+01:00\",\"inLanguage\":\"fr-FR\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#webpage\"},\"articleSection\":\"eCommerce, Magic xpi, Prestashop, Retail, eCommerce, Prestashop, Retail\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog#listItem\",\"position\":1,\"name\":\"Domicile\",\"item\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/#listItem\",\"name\":\"Magic xpi\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/#listItem\",\"position\":2,\"name\":\"Magic xpi\",\"item\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/prestashop\\\/#listItem\",\"name\":\"Prestashop\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog#listItem\",\"name\":\"Domicile\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/prestashop\\\/#listItem\",\"position\":3,\"name\":\"Prestashop\",\"item\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/prestashop\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#listItem\",\"name\":\"Prestashop &#8211; Magic xpi\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/#listItem\",\"name\":\"Magic xpi\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#listItem\",\"position\":4,\"name\":\"Prestashop &#8211; Magic xpi\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/prestashop\\\/#listItem\",\"name\":\"Prestashop\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/#organization\",\"name\":\"Blog Magic France\",\"description\":\"Magic Software France\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/\",\"telephone\":\"+33149105858\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/Magic.ico\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#organizationLogo\",\"width\":16,\"height\":16},\"image\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/MagicSoftwareEnterprises\",\"https:\\\/\\\/twitter.com\\\/MagicSoftware\",\"https:\\\/\\\/youtube.com\\\/MagicSoftware\",\"https:\\\/\\\/linkedin.com\\\/company\\\/magic-software-enterprises\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/author\\\/saad\\\/#author\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/author\\\/saad\\\/\",\"name\":\"Sa\\u00e2d Alem\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/38fae53569553d87ce6ffb3b936e4df6feecf6069ddb238526105d8d906273c4?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Sa\\u00e2d Alem\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#webpage\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/\",\"name\":\"Prestashop \\u2013 Magic xpi | Le Blog Techno\",\"description\":\"Goal : How to implement Webhook and call Prestashop REST API from Magic xpi when Order status is changed Prerequisite : Prestashop up and running (i have used an AWS image with prestashop already configured from Intuz ) Credentials FTP access to upload the Magic xpi module in prestashop (not mandatory) 1\\\/ Webhook In our\",\"inLanguage\":\"fr-FR\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/author\\\/saad\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/author\\\/saad\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/Presta19.png\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#mainImage\",\"width\":418,\"height\":121},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/prestashop-magic-xpi\\\/#mainImage\"},\"datePublished\":\"2024-12-05T18:18:15+01:00\",\"dateModified\":\"2025-01-10T14:32:58+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/\",\"name\":\"Blog Magic France\",\"description\":\"Magic Software France\",\"inLanguage\":\"fr-FR\",\"publisher\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Prestashop \u2013 Magic xpi | Le Blog Techno","description":"Goal : How to implement Webhook and call Prestashop REST API from Magic xpi when Order status is changed Prerequisite : Prestashop up and running (i have used an AWS image with prestashop already configured from Intuz ) Credentials FTP access to upload the Magic xpi module in prestashop (not mandatory) 1\/ Webhook In our","canonical_url":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"5yLZLt_RgZVqkETQDrOlMUHaNTra2i5W8dtHQoCMueY","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#blogposting","name":"Prestashop \u2013 Magic xpi | Le Blog Techno","headline":"Prestashop &#8211; Magic xpi","author":{"@id":"https:\/\/france.magicsoftware.com\/blog\/author\/saad\/#author"},"publisher":{"@id":"https:\/\/france.magicsoftware.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta19.png","width":418,"height":121},"datePublished":"2024-12-05T18:18:15+01:00","dateModified":"2025-01-10T14:32:58+01:00","inLanguage":"fr-FR","mainEntityOfPage":{"@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#webpage"},"isPartOf":{"@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#webpage"},"articleSection":"eCommerce, Magic xpi, Prestashop, Retail, eCommerce, Prestashop, Retail"},{"@type":"BreadcrumbList","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog#listItem","position":1,"name":"Domicile","item":"https:\/\/france.magicsoftware.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/#listItem","name":"Magic xpi"}},{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/#listItem","position":2,"name":"Magic xpi","item":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/","nextItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/prestashop\/#listItem","name":"Prestashop"},"previousItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog#listItem","name":"Domicile"}},{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/prestashop\/#listItem","position":3,"name":"Prestashop","item":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/prestashop\/","nextItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#listItem","name":"Prestashop &#8211; Magic xpi"},"previousItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/#listItem","name":"Magic xpi"}},{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#listItem","position":4,"name":"Prestashop &#8211; Magic xpi","previousItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/prestashop\/#listItem","name":"Prestashop"}}]},{"@type":"Organization","@id":"https:\/\/france.magicsoftware.com\/blog\/#organization","name":"Blog Magic France","description":"Magic Software France","url":"https:\/\/france.magicsoftware.com\/blog\/","telephone":"+33149105858","logo":{"@type":"ImageObject","url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#organizationLogo","width":16,"height":16},"image":{"@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#organizationLogo"},"sameAs":["https:\/\/www.facebook.com\/MagicSoftwareEnterprises","https:\/\/twitter.com\/MagicSoftware","https:\/\/youtube.com\/MagicSoftware","https:\/\/linkedin.com\/company\/magic-software-enterprises"]},{"@type":"Person","@id":"https:\/\/france.magicsoftware.com\/blog\/author\/saad\/#author","url":"https:\/\/france.magicsoftware.com\/blog\/author\/saad\/","name":"Sa\u00e2d Alem","image":{"@type":"ImageObject","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/38fae53569553d87ce6ffb3b936e4df6feecf6069ddb238526105d8d906273c4?s=96&d=mm&r=g","width":96,"height":96,"caption":"Sa\u00e2d Alem"}},{"@type":"WebPage","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#webpage","url":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/","name":"Prestashop \u2013 Magic xpi | Le Blog Techno","description":"Goal : How to implement Webhook and call Prestashop REST API from Magic xpi when Order status is changed Prerequisite : Prestashop up and running (i have used an AWS image with prestashop already configured from Intuz ) Credentials FTP access to upload the Magic xpi module in prestashop (not mandatory) 1\/ Webhook In our","inLanguage":"fr-FR","isPartOf":{"@id":"https:\/\/france.magicsoftware.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#breadcrumblist"},"author":{"@id":"https:\/\/france.magicsoftware.com\/blog\/author\/saad\/#author"},"creator":{"@id":"https:\/\/france.magicsoftware.com\/blog\/author\/saad\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta19.png","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#mainImage","width":418,"height":121},"primaryImageOfPage":{"@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/#mainImage"},"datePublished":"2024-12-05T18:18:15+01:00","dateModified":"2025-01-10T14:32:58+01:00"},{"@type":"WebSite","@id":"https:\/\/france.magicsoftware.com\/blog\/#website","url":"https:\/\/france.magicsoftware.com\/blog\/","name":"Blog Magic France","description":"Magic Software France","inLanguage":"fr-FR","publisher":{"@id":"https:\/\/france.magicsoftware.com\/blog\/#organization"}}]},"og:locale":"fr_FR","og:site_name":"Le Blog Techno | Magic Software France","og:type":"article","og:title":"Prestashop \u2013 Magic xpi | Le Blog Techno","og:description":"Goal : How to implement Webhook and call Prestashop REST API from Magic xpi when Order status is changed Prerequisite : Prestashop up and running (i have used an AWS image with prestashop already configured from Intuz ) Credentials FTP access to upload the Magic xpi module in prestashop (not mandatory) 1\/ Webhook In our","og:url":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/","og:image":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico","og:image:secure_url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico","og:image:width":16,"og:image:height":16,"article:published_time":"2024-12-05T17:18:15+00:00","article:modified_time":"2025-01-10T13:32:58+00:00","article:publisher":"https:\/\/www.facebook.com\/MagicSoftwareEnterprises","twitter:card":"summary_large_image","twitter:site":"@MagicSoftware","twitter:title":"Prestashop \u2013 Magic xpi | Le Blog Techno","twitter:description":"Goal : How to implement Webhook and call Prestashop REST API from Magic xpi when Order status is changed Prerequisite : Prestashop up and running (i have used an AWS image with prestashop already configured from Intuz ) Credentials FTP access to upload the Magic xpi module in prestashop (not mandatory) 1\/ Webhook In our","twitter:creator":"@MagicSoftware","twitter:image":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico"},"aioseo_meta_data":{"post_id":"2268","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2024-12-05 14:49:04","updated":"2025-06-04 06:08:01","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/france.magicsoftware.com\/blog\" title=\"Domicile\">Domicile<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/\" title=\"Magic xpi\">Magic xpi<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/prestashop\/\" title=\"Prestashop\">Prestashop<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPrestashop \u2013 Magic xpi\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Domicile","link":"https:\/\/france.magicsoftware.com\/blog"},{"label":"Magic xpi","link":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/"},{"label":"Prestashop","link":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/prestashop\/"},{"label":"Prestashop &#8211; Magic xpi","link":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/prestashop-magic-xpi\/"}],"jetpack_featured_media_url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/12\/Presta19.png","_links":{"self":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/2268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/comments?post=2268"}],"version-history":[{"count":70,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/2268\/revisions"}],"predecessor-version":[{"id":2496,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/2268\/revisions\/2496"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/media\/2354"}],"wp:attachment":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/media?parent=2268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/categories?post=2268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/tags?post=2268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}