Fluent Commerce Logo
Docs
Essential knowledgeCore knowledge to understand Fluent Commerce

Author:

Fluent Commerce

Changed on:

3 July 2024

Overview

A return is a customer's request to send back one or more items against an Order from the Retailer. A return can exist with or without the original order reference. If the original order reference exists, the return can contain the details of the returned items, the reasons, and the amount to be refunded. A return also could represent items within an original order that could not be fulfilled or has been canceled by the customer and requires a subsequent refund. Through the type of return, we can identify the context of the return, i.e., if it is a customer return, cannot fulfill or cancel.

Key points

  • The properties are available in the Return object
  • This Return object can be updated and retrieved through the API

Return Properties

Below properties are available in the Return object which can be updated and retrieved through the APIs in this document.

1. returnRef

Type: StringDescription:`{ "returnRef" : "554367" }
`
The return reference from the retailer.

2. orderRef

Type: StringDescription:`{ "orderRef" : "201607191462" }
`
The unique reference provided by the retailer.

3. orderId

Type: StringDescription:`{ "orderId" : "16425" }
`
The unique order id assigned by Fluent Commerce.

4. retailerId

Type: StringDescription:{ "retailerId" : "197" }`
`
The retailer identifier assigned by Fluent Commerce.

5. type

Type: StringDescription:`{ "type" : "CUSTOMER_RETURN" }
`
The type of return. Possible values are:
  • CUSTOMER_RETURN - A customer initiated return.
  • CANCELLATION - The order was cancelled using Admin Console and a full refund has been initiated.
  • CANNOT_FULFIL - The original order contained items that couldn't be fulfilled so a refund has been initiated.

6. customer

Type: ObjectDescription:

7. fulfilmentChoice

Type: ObjectDescription:

8. address

Type: objectDescription:

9. items

Type: ArrayDescription:

10. fulfilments

Type: ArrayDescription:

11. status

Type: StringDescription:`Β { "status" : "LODGED" }

`
Current status of the return. Possible values are:
  • CREATED - Return createdΒ 
  • BOOKED Β - Customer return booked.
  • LODGED Β - Automatic refund strategy has been initiated i.e. Original order is single tender type and payment gateway is integrated.
  • PENDING RETURN - User initiated refund strategy has been initiated.
    i.e. Original order includes more than one tender type and/or payment gateway is not integrated.
    Β Β Β Β Β Return can also move to this state if the return transaction is declined by the payment gateway.
  • COMPLETE - Refund processed.

12. retailerId

Type: StringDescription:`{ "retailerId" : "197" }`

13. createdOn

Type: DateTimeDescription:Β `{ "createdOn" : "2016-05-06T23:41:12.242Z" }
`
Date/time when the Return was created.

14. updatedOn

Type: DateTimeDescription:`{ "updatedOn" : "2016-06-23T07:58:58.000+0000" }`Date/time when the Return was last updated.

15. totalReturnPrice

Type: DoubleDescription:Β `{ "totalReturnPrice" : "59.90" }`Total return value including shipping or click & collect fees

16. sort

Type: StringDescription:`Β { "sort" : "createdOn DESC" }
`
Sorting options requested.Note: Currently default sorting Β "createdOn DESC” only supported.`
`

17. query

Type: StringDescription: Return Id, Order Reference or Customer Name searched for
What you can do with Return

Create a Return

Create a Return in the Fluent Commerce system.POST:Β `/api/v4.1/return`Request and responseRequest parameters and sampleResponse Parameters and sample


View Return via returnId

Retrieve details of the Return using returnId.GET:Β `/api/v4.1/return/{returnId}`** Request and response **Request parameters and sample**Β Return request`/api/v4.1/return/{returnId}`**Β Example request`/api/v4.1/return/5463
`
Response Parameters and sample**Β Return responseΒ Example Response,


View Return via orderId

Retrieve details of the Return using orderId.GET:Β /api/v4.1/order/{orderId}/return** Request and response **Request parameters and sample** Return request`/api/v4.1/order/{orderId}/return`** Example request`/api/v4.1/order/553638/return
`
Response Parameters and sample

Search Returns

Retrieve a list of Returns matching the search criteria.GET:Β /api/v4.1/return** Request and response**Request parameters and sample**Β Return requestResponse Parameters and sample**Β Return response

Response on Failures

NAMETYPEDESCRIPTION
errorArrayArray of errors
messageStringAdditional information on the code Unauthorised | Bad Request | Forbidden | Not Found | Status 500 Error
codeStringStatus Code for the above messages 401 | 400 | 403 | 404 | 500