API
Use CURL library to get token and lists in Magento2
'cURL' is a command-line tool that lets you transmit HTTP requests and receive responses from the command line or a shell script. It is available for Linux distributions, Mac OS X, and Windows.
To use cURL to run your REST web API call, use the cURL command syntax to construct the command.
To create the endpoint in the call, append the REST URI that you constructed in Construct a request to this URL:
https:////rest/
To pass the customer data object in the POST call payload, specify a JSON or XML request body on the call.
Magento 2 REST API - Add Order Comment
To add a new comment to existing order and change the order status you can use this endpoint
/rest/V1/orders/{order_id}/comments
and the json data is
{ "statusHistory": { "comment": "Your Comment Here", "created_at": "2018-06-05 15:22:04", "parent_id": {order_id}, "is_customer_notified": 0, "is_visible_on_front": 1, "status": "pending" } }
Create Invoice Via REST API for Magento2 for Bundle Product
To create an invoice for an order that contain bundle product you have to prepare the good json.
Basically Magento has two different types of bundle products: dynamic and fixed. That's why I need to add clarification for Expected Result:
I) Bundle dynamic product:
Get Customer's Orders using Magento2 API REST
in this code you will see how to get all Customer's Orders from Magento2 using the REST API