Adds a comment to a specified order

POST /V1/orders/{id}/comments

Adds a comment to a specified order.

Path parameters

  • id integer Required

    The order ID.

Body

  • statusHistory object Required

    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.

    Hide statusHistory attributes Show statusHistory attributes object

Responses

  • 200 Success.

  • 401 Unauthorized

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object
    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object
    • trace string

      Stack trace

  • Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object
    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object
    • trace string

      Stack trace

POST /V1/orders/{id}/comments
curl \
 -X POST https://magento2.winkelstraat.mac/rest/all/V1/orders/{id}/comments \
 -d '{"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
{
  "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": {}
  }
}
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 (default)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}