Create online refund for order

POST /V1/winkelstraat/order/{incrementId}/refund

Create online refund for order

Path parameters

  • incrementId string Required

Body

  • items array[object]
    Hide items attributes Show items attributes object
    • sku string
    • status string
    • quantity integer
  • notify boolean
  • appendComment boolean
  • comment object

    Interface CreditmemoCommentCreationInterface

    Hide comment attributes Show comment attributes object
    • extension_attributes object

      ExtensionInterface class for @see \Magento\Sales\Api\Data\CreditmemoCommentCreationInterface

    • comment string Required

      Comment.

    • is_visible_on_front integer Required

      Is-visible-on-storefront flag value.

Responses

  • 200

    200 Success.

  • 401

    401 Unauthorized

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • default

    Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

POST /V1/winkelstraat/order/{incrementId}/refund
curl \
 --request POST 'https://magento2.winkelstraat.mac/rest/all/V1/winkelstraat/order/{incrementId}/refund' \
 --data '{"items":[{"sku":"string","status":"string","quantity":42}],"notify":true,"appendComment":true,"comment":{"extension_attributes":{},"comment":"string","is_visible_on_front":42}}'
Request examples
{
  "items": [
    {
      "sku": "string",
      "status": "string",
      "quantity": 42
    }
  ],
  "notify": true,
  "appendComment": true,
  "comment": {
    "extension_attributes": {},
    "comment": "string",
    "is_visible_on_front": 42
  }
}
Response examples (200)
[
  "string"
]
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"
}