Skip to content

Latest commit

 

History

History
23 lines (13 loc) · 837 Bytes

README.md

File metadata and controls

23 lines (13 loc) · 837 Bytes

Place a magento order via API

This is a sandbox module to place a order in a Magento 2 shop via api. We use it as a demo application for our OpenTrigger System.

The API examples are mostly taken from this magento.stackexchage.com entry

Video demonstration

https://www.youtube.com/watch?v=bM9SWjf4cbc

Create api key in Magento:

  • Go to: System -> Integrations -> "Add new integration"
  • Create a new Integration with sufficient permissions (e.g. set Ressource Access to "All" if you are just playing around)
  • Note down the created Access Token for usage in place-order.php

Configure place-order.php

Set valid values for $api_url, $token and $sku.

Execute order

php place-order.php