graduation-capReturns Tutorial

How to configure the Returns Service

By default, the expiration date offset for a return request is set to 30 days.

Update the expiration date settings

You can update the expiration date offset for a tenant by sending a request to the Updating a configurationarrow-up-right endpoint in the Configuration Service.

In the following example, we are changing the expiration date offset to 14 days.

circle-check
rectangle-terminalAPI Referencechevron-right
curl -i -X PUT 
  'https://api.emporix.io/configuration/{tenant}/configurations/{propertyKey}' 
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' 
  -H 'Content-Type: application/json' 
  -d '{
    "key": "return.defaultExpiryDate",
    "secured": false,
    "value": "14",
    "version": 1
  }'
  

How to manage return requests

A return can be created both by a customer directly on your business' website, or by an employee on behalf of a customer.

circle-exclamation

First, ensure that the orders that you want to return (along with their order_Id values) exist in the system.

Create a return by a customer

On the storefront, a customer fills in the applicable fields in the return request:

  • orders

  • reason

  • mixins

Based on your tenant's configuration settings and customer's oauth token, the remaining fields are populated automatically.

When a customer sends a return request, the Creating a single return entityarrow-up-right endpoint is called.

circle-exclamation
rectangle-terminalAPI Referencechevron-right

Create a return on behalf of a customer

To create a return on behalf of a customer, you need to send a request to the Creating a single return entityarrow-up-right endpoint.

circle-exclamation
rectangle-terminalAPI Referencechevron-right
circle-exclamation

Update the return request by a customer

Customers can update their return request only when the approval status of the request is PENDING. When a customer updates a return, the Updating a single returnarrow-up-right endpoint is called.

circle-exclamation

In this scenario, the customer updates the reason for the return.

rectangle-terminalAPI Referencechevron-right

Update the return status

As an employee, you can update all the fields available during the return creation, as well as the approvalStatus and received fields, by sending a request to the Updating a single returnarrow-up-right endpoint.

circle-exclamation

In this scenario, the employee updates the approval status of the return request.

rectangle-terminalAPI Referencechevron-right

Last updated

Was this helpful?