> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/returns-api/returns-api-v3.0/methods/configuration-methods.md).

# Configuration Methods

The following are the methods associated with the ‘Configuration’ API data type:

## GET- Get Retailer Country Configuration <a href="#get-get-retailer-country-configuration" id="get-get-retailer-country-configuration"></a>

This endpoint is used to retrieve country-specific configuration information for the returns platform. This brand/country-level configuration is used to drive returns processing. Shopper origin (location from where the return originates) is generally used to look up the configuration.

To get the retailer country configuration information send a `GET` request to `/{identifier}/configuration/countries/{countryIso}`

### Method Parameters <a href="#method-parameters" id="method-parameters"></a>

<details>

<summary><strong>Request Parameters</strong></summary>

| **Field Name** | **Data Type**                                            | **Required/Optional** | **Description**              |
| -------------- | -------------------------------------------------------- | --------------------- | ---------------------------- |
| countryIso     | <ul><li>string</li><li>Max 2 characters length</li></ul> | Required              | Two letter country ISO code. |

</details>

<details>

<summary><strong>Response Parameters</strong></summary>

| **Field Name**                                                  | **Data Type** | **Description**                                                                                                                                                           |
| --------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| organisationId                                                  | string        | Unique identifier for the organisation.                                                                                                                                   |
| brandCode                                                       | string        | ESW legacy 3 character identifier for the brand.                                                                                                                          |
| brandName                                                       | string        | ESW brand name.                                                                                                                                                           |
| countryIso                                                      | string        | Two digit country ISO code.                                                                                                                                               |
| currencyIso                                                     | string        | Three digit currency ISO code.                                                                                                                                            |
| returnsOmsEnabled                                               | boolean       | (optional) Flag to identify whether this brand is enabled for returns or not.                                                                                             |
| portalSettings                                                  | object        |                                                                                                                                                                           |
| <p>portalSettings<br>.blockDefectiveDangerGoods</p>             | boolean       | <p>Flag to identify whether brand blocks return of defective dangerous goods,</p><p>This is set to ‘true’ by default and can be overridden in the ESW service portal.</p> |
| portalSettings.returnsAdminCentreCode                           | string        | Unique five letter code for the returns admin centre for the given brand’s country.                                                                                       |
| portalSettings.returnsPortalConfigurationSettings               | object        |                                                                                                                                                                           |
| returnsPortalConfigurationSettings.showRefund                   | boolean       | Flag to identify whether refund amount summary will be shown on the portal or not.                                                                                        |
| returnsPortalConfigurationSettings.returnReasonMandatory        | boolean       | Flag to identify whether or not the return reason needs to be mandatorily completed.                                                                                      |
| returnsPortalConfigurationSettings.noOfDaysAllowedForReturn     | integer       | <p>Number of days that a return is allowed.</p><p>The first day begins on the day when the order was shipped.</p>                                                         |
| returnsPortalConfigurationSettings.numberOfDeliveryDaysRequired | integer       | Number of days allowed for delivery.                                                                                                                                      |
| returnsPortalConfigurationSettings.shippedPeriodDays            | integer       | Number of days allowed for shipping.                                                                                                                                      |
| returnsPortalConfigurationSettings.cancelOrderNoOfDays          | integer       | Number of days allowed for cancelling the order.                                                                                                                          |
| returnsPortalConfigurationSettings.isCancelOrderAllowed         | boolean       | Flag to check if the order is allowed for cancellation.                                                                                                                   |
| customerReturnReasonCodes                                       | array         |                                                                                                                                                                           |
| customReturnReasonCodes.code                                    | string        | Return reason codes, e.g. "WrongItemShipped", "Damaged", "LateArrival"                                                                                                    |
| customerReturnReasonCodes.description                           | string        | Description of the return reason by the customer.                                                                                                                         |
| customerReturnReasonCodes.isRetailerAtFault                     | boolean       | Flag to check whether or not the retailer is at fault for the return.                                                                                                     |
| locales                                                         | array         | List of aggregated language locales configured for the brand and associated brand countries                                                                               |
| locales.name                                                    | string        | The language name e.g. "English (Ireland)"                                                                                                                                |
| locales.cultureInfoCode                                         | string        | <p>The 4 letter locale culture info code</p><p>e.g. "en-IE"</p>                                                                                                           |

</details>

<details>

<summary>Response</summary>

| **Response Code** | **Description**                                              |
| ----------------- | ------------------------------------------------------------ |
| 200 (Ok)          | The country configurations have been successfully retrieved. |

</details>

{% code title="Request-Response Example" expandable="true" %}

```json
{
   "organisationId": "esw",
   "brandCode": "TES",
   "brandName": "Go Rev",
   "countryIso": "FR",
   "currencyIso": "EUR",
   "returnsOmsEnabled": true,
   "portalSettings": {,
       "blockDefectiveDangerGoods": true,
       "returnsPortalConfigurationSettings": {
          "ShowRefund": false,
          "showLabel": true,
          "returnReasonMandatory": false,
          "noOfDaysAllowedForReturn": 30,
          "numberOfDeliveryDaysRequired": 20,
          "shippedPeriodDays": 0,
          "cancelOrderNoOfDays": 14,
          "isCancelOrderAllowed": true
       },
       "customerReturnReasonCodes": [{
           "code": "WrongItemSent",
           "description": "Wrong item shipped",
           "isRetailerAtFault": true
        },
        {
           "code": "WrongItemSent",
           "description": "Defective",
           "isRetailerAtFault": true
       }]
   },
    "locales": [{
      "name": "English (Ireland)",
      "cultureInfoCode": "en-IE"
  }]
}
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.esw.com/returns-api/returns-api-v3.0/methods/configuration-methods.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
