Adds a comment to a specified order.
application/json
Body
-
Order status history interface. An order is a document that a web store issues to a customer. Magento generates a sales order that lists the product items, billing and shipping addresses, and shipping and payment methods. A corresponding external document, known as a purchase order, is emailed to the customer.
Body
-
Order status history interface. An order is a document that a web store issues to a customer. Magento generates a sales order that lists the product items, billing and shipping addresses, and shipping and payment methods. A corresponding external document, known as a purchase order, is emailed to the customer.
POST
/V1/orders/{id}/comments
cURL (application/json)
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/orders/{id}/comments' \
--header "Content-Type: application/json" \
--data '{"statusHistory":{"comment":"string","created_at":"string","entity_id":42,"entity_name":"string","is_customer_notified":42,"is_visible_on_front":42,"parent_id":42,"status":"string","extension_attributes":{}}}'
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/orders/{id}/comments' \
--header "Content-Type: application/xml"
Request examples
{
"statusHistory": {
"comment": "string",
"created_at": "string",
"entity_id": 42,
"entity_name": "string",
"is_customer_notified": 42,
"is_visible_on_front": 42,
"parent_id": 42,
"status": "string",
"extension_attributes": {}
}
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<statusHistory>
<comment>string</comment>
<created-at>string</created-at>
<entity-id type="integer">42</entity-id>
<entity-name>string</entity-name>
<is-customer-notified type="integer">42</is-customer-notified>
<is-visible-on-front type="integer">42</is-visible-on-front>
<parent-id type="integer">42</parent-id>
<status>string</status>
<extension-attributes>
</extension-attributes>
</statusHistory>
</root>
Response examples (200)
true
Response examples (200)
true
Response examples (401)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (401)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>
Response examples (default)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>