The return object

A comprehensive list of the return resource's attributes and relationships

A return object is returned as part of the response body of each successful list, retrieve, create or update API call to the /api/returns endpoint.

Fields

FieldTypeDescription

type

string

returns

id

string

The return unique identifier

links.self

string

The return endpoint URL

attributes._approve

boolean

Send this attribute if you want to mark this return as approved.

attributes._archive

boolean

Send this attribute if you want to archive the return.

attributes._cancel

boolean

Send this attribute if you want to mark this return as cancelled.

attributes._receive

boolean

Send this attribute if you want to mark this return as received.

attributes._refund

boolean

Send this attribute if you want to create a refund for this return.

attributes._refund_amount_cents

integer

Send this attribute as a value in cents to specify the amount to be refunded.

attributes._reject

boolean

Send this attribute if you want to mark this return as rejected.

attributes._request

boolean

Send this attribute if you want to activate this return.

attributes._restock

boolean

Send this attribute if you want to restock all of the return line items.

attributes._ship

boolean

Send this attribute if you want to mark this return as shipped.

attributes._unarchive

boolean

Send this attribute if you want to unarchive the return.

attributes.approved_at

datetime

Time at which the return was approved.

attributes.archived_at

datetime

Time at which the resource has been archived.

attributes.cancelled_at

datetime

Time at which the return was cancelled.

attributes.created_at

datetime

Time at which the resource was created.

attributes.customer_email

string

The email address of the associated customer.

attributes.estimated_refund_amount_cents

integer

The amount to be refunded, estimated by associated return line items, in cents.

attributes.estimated_refund_amount_float

float

The amount to be refunded, estimated by associated return line items, float.

attributes.formatted_estimated_refund_amount

string

The amount to be refunded, estimated by associated return line items, formatted.

attributes.metadata

object

Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format.

attributes.number

string

Unique identifier for the return.

attributes.received_at

datetime

Time at which the return was received.

attributes.reference

string

A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever.

attributes.reference_origin

string

Any identifier of the third party system that defines the reference code.

attributes.refunded_at

datetime

Time at which the return was refunded.

attributes.rejected_at

datetime

Time at which the return was rejected.

attributes.shipped_at

datetime

Time at which the return was shipped.

attributes.skus_count

integer

The total number of SKUs in the return's line items. This can be useful to display a preview of the return content.

attributes.status

string

The return status. One of 'draft' (default), 'requested', 'approved', 'cancelled', 'shipped', 'rejected', 'received', or 'refunded'.

attributes.updated_at

datetime

Time at which the resource was last updated.

relationships.attachments

array

The associated attachments.

relationships.customer

object

The associated customer.

relationships.destination_address

object

The associated stock location address.

relationships.events

array

The associated events.

relationships.order

object

The associated order.

relationships.origin_address

object

The customer shipping address.

relationships.reference_capture

object

The associated succeded capture to be refunded. The order last succeeded one unless specified.

relationships.reference_refund

object

The associated refund.

relationships.resource_errors

array

The associated resource errors.

relationships.return_line_items

array

The order line items associated to the return.

relationships.stock_location

object

The stock location to which the return will be shipped.

relationships.tags

array

The associated tags.

relationships.versions

array

The associated changes.

meta.mode

string

The resource environment (can be one of test or live)

Last updated