order

order.return.add

Create new return request.

post/order.return.add.json

Request

  • Base URL: https://api.api2cart.com/v1.1
  • URL: https://api.api2cart.com/v1.1/order.return.add.json
  • Auth: API key in header x-api-key and API key in header x-store-key

Request body

order_idstring

Defines the order id

store_idstring

Store Id

return_status_idstring required

Defines return request status

return_action_idstring required

Defines return request action

return_reason_idstring required

Defines return request reason

return_actionstring

Defines return request action

return_reasonstring

Defines return request reason

item_restockboolean

Boolean, whether or not to add the line items back to the store inventory.

staff_notestring

Specifies staff note

commentstring

Specifies return comment

messagestring

Customer-visible message attached to the return request.

send_notificationsboolean

Send notifications to customer after order was created

reject_reasonstring

Defines return reject reason

is_onlineboolean

Indicates whether refund type is online

fee_pricenumber

Specifies refund's fee price

shipping_pricenumber

Specifies order's shipping price

idempotency_keystring

A unique identifier associated with a specific request. Repeated requests with the same <strong>idempotency_key</strong> return a cached response without re-executing the business logic. <strong>Please note that the cache lifetime is 15 minutes.</strong>

Example request

{
  "store_id": "1",
  "return_status_id": "RETURNED",
  "return_action_id": "RETURNED",
  "return_reason_id": "broken",
  "return_action": "refund",
  "return_reason": "broken",
  "item_restock": true,
  "staff_note": "Test",
  "comment": "This coole order",
  "message": "Customer wants to return — wrong size.",
  "send_notifications": true,
  "reject_reason": "ORDER_UNPAID",
  "fee_price": 5.5,
  "shipping_price": 5.5,
  "idempotency_key": "098f6bcd4621d373cade4e832627b4f6",
  "order_products": [
    {
      "order_product_id": "125, where {x} - 1,2,3,... etc",
      "order_product_reason_id": "DEFECTIVE, where {x} - 1,2,3,... etc",
      "order_product_action_id": "REFUND, where {x} - 1,2,3,... etc",
      "order_product_customer_comment": "I need a bigger size, where {x} - 1,2,3,... etc",
      "order_product_handling_status": "123456",
      "order_product_condition": "Broken, where {x} - 1,2,3,... etc",
      "order_product_reason": "123456",
      "order_product_status": "pending"
    }
  ]
}

Response

successful operation

return_codeinteger
return_messagestring

Changes

No recorded changes to this operation across all 1 revision of this API.