returns

Update a return

patch/returns/{returnId}

Request

  • Base URL
    https://{your_organization_slug}.commercelayer.io/api
  • URL
    https://{your_organization_slug}.commercelayer.io/api/returns/{returnId}
  • Auth
    HTTP bearer

Path parameters

returnIdstring required

The resource's id

Request body

Example request

{
  "data": {
    "id": "XAyRWNUzyN",
    "attributes": {
      "_request": true,
      "_approve": true,
      "_cancel": true,
      "_ship": true,
      "_reject": true,
      "_receive": true,
      "_restock": true,
      "_archive": true,
      "_unarchive": true,
      "_refund": true,
      "_refund_amount_cents": 500,
      "reference": "ANY-EXTERNAL-REFEFERNCE",
      "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
      "metadata": {
        "foo": "bar"
      }
    },
    "relationships": {
      "stock_location": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "reference_capture": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "tags": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      }
    }
  }
}

Response

The updated return object

Changes

    • breaking

      added the new required request property ///

    • breaking

      request property / was restricted to a list of enum values

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property default value returns was removed

    • info

      added the new returns enum value to the request property /

    • info

      added the media type application/vnd.api+json for the response with the status