POST
Create return order

Authorizations

x-api-key
string
header
required

Body

application/json
parent_external_order_number
string
required

External order number of the sell order being returned (the parent sell order), as you sent it when creating that sell order.

Example:

"EXT-123"

buyer_return_order_shipping_method_code
enum<number>
required

How the package travels back to Melonn:

  • 1: Collected by Melonn (a carrier picks it up at pickup_info's address).
  • 2: Shipped by the buyer.
  • 3: Dropped off at Melonn by the buyer.
Available options:
1,
2,
3
Example:

1

external_order_number
string
required

Your identifier for the return. Shown in Melonn and usable as a filter in List return orders.

Example:

"test-public-api-001"

buyer
object
required

The buyer who is returning the products.

pickup_info
object
required

Where and from whom the package is collected. Required for every shipping method, but only used for pickup when buyer_return_order_shipping_method_code is 1; in that case the address must be geocodable.

line_items
object[]
required

Products being returned. At least one.

Minimum array length: 1
transport_request_type
enum<string>

Only relevant for shipping method 1. With sync, the request waits up to about 10 seconds for the carrier pickup to be booked and returns its label in return_full_label_url (empty if it was not ready in time). With async or when omitted, the request returns immediately and the label becomes available later through Get return order.

Available options:
sync,
async
Example:

"async"

external_order_id
string

Optional secondary identifier for the return in your system. Must be unique per e-commerce store.

Example:

"1"

ecommerce_store_id
number

ID of your e-commerce store (sales channel) in Melonn. When sent, the parent sell order is looked up in this store first, and the return is linked to it.

Example:

12

assigned_warehouse_code
string

Code of the warehouse that will receive the return. Defaults to the warehouse that fulfilled the parent sell order.

Example:

"WCOD-1"

comments
string

Free-text comments about the return.

Example:

"Customer reported wrong size"

Response

The return order was created.

id
integer

Numeric Melonn ID of the return order.

Example:

527

internal_order_number
string

Melonn internal order number of the return order. Use it to get or cancel the return.

Example:

"R00527"

external_order_number
string

Your identifier for the return, as sent on creation.

Example:

"test-public-api-001"

external_order_id
string | null

Your secondary identifier for the return, or null if none was sent.

Example:

null

assigned_warehouse_code
string

Code of the warehouse that receives the return.

Example:

"WCOD-1"

buyer_full_name
string

Full name of the buyer.

Example:

"Jane Doe"

creation_date
string<date-time>

When the return order was created (UTC).

Example:

"2025-12-01T16:16:13.000Z"

last_modified_date
string<date-time> | null

When the return order was last modified (UTC).

Example:

"2025-12-01T16:16:13.000Z"

buyer_return_order_state
object

Current state of the return order.

return_full_label_url
string

Pre-signed download link to the return label PDF, valid for 72 hours (3 days) from the response. Empty string when the label is not ready yet.

Example:

"https://example-bucket.s3.amazonaws.com/R00527-melonn-full-label.pdf?X-Amz-Expires=259200&X-Amz-Signature=..."

line_items_summary
object[]

Returned products, as requested (kits are kept as kits).

parent_sell_order
object

The sell order this return was created from.