---
updatedAt: 2025-06-09T16:04:02.000Z
agentTools:
  projectIndex: https://docs.aerocrs.com/v4.0/llms.txt
---

# updateFares

This method will change the fare details

> 📘 **Important**
>
> With this method you can not update information from other airlines.

## Request parameters

| Parameter                   | Type      | Description                                                                                                                       |
| --------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **Fare Structure**          |           |                                                                                                                                   |
| fares                       | Element\* | The following elements are within `<fare>` which represents a `<fare>` within `<fares>`                                           |
| fare                        | Element\* | The Element hold the fare details                                                                                                 |
| **Fare Identification**     |           |                                                                                                                                   |
| fareDetails                 | Element\* | The Element hold the fare details in AeroCRS system                                                                               |
| fromcode                    | String\*  | Departure airport code                                                                                                            |
| tocode                      | String\*  | Arrival airport code                                                                                                              |
| classcode                   | String\*  | Class code                                                                                                                        |
| fromdate                    | Date\*    | From date YYYY/MM/DD                                                                                                              |
| todate                      | Date\*    | To date YYYY/MM/DD                                                                                                                |
| currency                    | String\*  | Currency ISO format (Example - USD)                                                                                               |
| **New Fare Details**        |           |                                                                                                                                   |
| newDetails                  | Element\* | The Element hold the new details to update                                                                                        |
| fromcode                    | String\*  | Departure airport code                                                                                                            |
| tocode                      | String\*  | Arrival airport code                                                                                                              |
| classcode                   | String\*  | Class code                                                                                                                        |
| fromdate                    | Date\*    | From date YYYY/MM/DD                                                                                                              |
| todate                      | Date\*    | To date YYYY/MM/DD                                                                                                                |
| **Fare Configuration**      |           |                                                                                                                                   |
| baggage                     | Number    | Set kg/lb (according to company settings) of baggage allowed for this route                                                       |
| brand                       | String    | Brand name (according the company), In order to change to default settings, Set zero value                                        |
| scheme                      | String    | Scheme name (according the company), In order to change to default settings, Set zero value                                       |
| **Fare Availability Rules** |           |                                                                                                                                   |
| showhours                   | Number    | Set the number of hours before the flight the fare should show<br/>if set to zero, will show always                               |
| expirehours                 | Number    | Set the number of hours before the flight this fare should expire                                                                 |
| minstay                     | Number    | Set the number of days for return bookings, if a booking is done for less than the stated days, the system will not show the fare |
| maxstay                     | Number    | Set the number of days for return bookings, if a booking is done for more than the stated days, the system will not show the fare |
| sellstart                   | Date      | Fare sell start date                                                                                                              |
| sellend                     | Date      | Fare sell end date                                                                                                                |
| **Fare Restrictions**       |           |                                                                                                                                   |
| limitcurrency               | Boolean   | Limit the fare to be sold only for this currency                                                                                  |
| chargevatontax              | Boolean   | Charge VAT on tax                                                                                                                 |
| **One Way Pricing**         |           |                                                                                                                                   |
| owadl                       | Money     | One way fare adult ticket price amount                                                                                            |
| owchd                       | Money     | One way fare child ticket price amount                                                                                            |
| owinf                       | Money     | One way fare infant ticket price amount                                                                                           |
| owtax1                      | Money     | One way fare ticket tax 1 amount                                                                                                  |
| owtax2                      | Money     | One way fare ticket tax 2 amount                                                                                                  |
| owtax3                      | Money     | One way fare ticket tax 3 amount                                                                                                  |
| owtax4                      | Money     | One way fare ticket tax 4 amount                                                                                                  |
| **Round Trip Pricing**      |           |                                                                                                                                   |
| rtadl                       | Money     | Round trip fare adult ticket price amount                                                                                         |
| rtchd                       | Money     | Round trip fare child ticket price amount                                                                                         |
| rtinf                       | Money     | Round trip fare infant ticket price amount                                                                                        |
| rttax1                      | Money     | Round trip fare ticket tax 1 amount                                                                                               |
| rttax2                      | Money     | Round trip fare ticket tax 2 amount                                                                                               |
| rttax3                      | Money     | Round trip fare ticket tax 3 amount                                                                                               |
| rttax4                      | Money     | Round trip fare ticket tax 4 amount                                                                                               |

> ❗️ \* Mandatory parameters

> 🚧 **Notice!**
>
> The request can contain optional parameters. In case some parameters are skipped - those fields data in AeroCRS system will not be changed.

> 📘 **Optional**
>
> Request can contain multiple fares

## Response parameters

| Parameter                    | Type    | Description                                                                             |
| ---------------------------- | ------- | --------------------------------------------------------------------------------------- |
| **Response Structure**       |         |                                                                                         |
| fares                        | Element | The following elements are within `<fare>` which represents a `<fare>` within `<fares>` |
| fare                         | Element | The following parameters are within fare                                                |
| **Updated Fare Information** |         |                                                                                         |
| fromcode                     | String  | The departure airport code which been updated                                           |
| tocode                       | String  | The arrival airport code which been updated                                             |
| classcode                    | String  | The class code which been updated                                                       |
| fromdate                     | Date    | From date YYYY/MM/DD which been updated                                                 |
| todate                       | Date    | To date YYYY/MM/DD which been updated                                                   |
| currency                     | String  | Currency ISO format which been updated                                                  |
| **Operation Result**         |         |                                                                                         |
| success                      | Boolean | true/false                                                                              |
| error                        | String  | Error information                                                                       |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "aerocrs",
    "version": "4.0"
  },
  "servers": [
    {
      "url": "https://api.aerocrs.com/v4"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "auth_id"
      },
      "sec1": {
        "type": "apiKey",
        "in": "header",
        "name": "auth_password"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/updateFares": {
      "post": {
        "summary": "updateFares",
        "description": "This method will change the fare details",
        "operationId": "updatefares",
        "parameters": [
          {
            "name": "RAW_BODY",
            "in": "query",
            "description": "The method accepts the XML / JSON input as POST, response format will be according to the sent format. You can try JSON, put the post in the following input and click \"Try It\"",
            "required": true,
            "schema": {
              "type": "string",
              "format": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "JSON": {
                    "value": "{\n    \"aerocrs\": {\n        \"success\": true,\n        \"fares\": {\n            \"fare\": [\n                {\n                    \"fromcode\": \"MAD\",\n                    \"tocode\": \"BCN\",\n                    \"classcode\": \"Y\",\n                    \"fromdate\": \"2018/10/28\",\n                    \"todate\": \"2019/10/26\",\n                    \"currency\": \"USD\",\n                    \"success\": true\n                }\n            ]\n        }\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "aerocrs": {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "fares": {
                          "type": "object",
                          "properties": {
                            "fare": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "fromcode": {
                                    "type": "string",
                                    "example": "MAD"
                                  },
                                  "tocode": {
                                    "type": "string",
                                    "example": "BCN"
                                  },
                                  "classcode": {
                                    "type": "string",
                                    "example": "Y"
                                  },
                                  "fromdate": {
                                    "type": "string",
                                    "example": "2018/10/28"
                                  },
                                  "todate": {
                                    "type": "string",
                                    "example": "2019/10/26"
                                  },
                                  "currency": {
                                    "type": "string",
                                    "example": "USD"
                                  },
                                  "success": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "examples": {
                  "XML": {
                    "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<aerocrs>\n    <success>true</success>\n    <fares>\n        <fare>\n            <fromcode>MAD</fromcode>\n            <tocode>BCN</tocode>\n            <classcode>Y</classcode>\n            <fromdate>2018/12/01</fromdate>\n            <todate>2019/12/24</todate>\n            <currency>USD</currency>\n            <success>true</success>\n        </fare>\n    </fares>\n</aerocrs>"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "x-readme": {
          "code-samples": [
            {
              "language": "xml",
              "code": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<aerocrs>\n    <parms>\n        <fares>\n            <fare>\n                <fareDetails>\n                    <fromcode>MAD</fromcode>\n                    <tocode>BCN</tocode>\n                    <classcode>Y</classcode>\n                    <fromdate>2018/12/01</fromdate>\n                    <todate>2019/12/24</todate>\n                    <currency>USD</currency>\n                </fareDetails>\n                <newDetails>\n                    <fromcode>MAD</fromcode>\n                    <tocode>BCN</tocode>\n                    <classcode>Y</classcode>\n                    <fromdate>2018/12/01</fromdate>\n                    <todate>2020/03/24</todate>\n                    <currency>USD</currency>\n                    <baggage>20</baggage>\n                    <brand></brand>\n                    <scheme></scheme>\n                    <showhours>0</showhours>\n                    <expirehours>0</expirehours>\n                    <minstay>0</minstay>\n                    <maxstay>0</maxstay>\n                    <sellstart>2018/04/14</sellstart>\n                    <sellend>2019/12/15</sellend>\n                    <limitcurrency>0</limitcurrency>\n                    <chargevatontax>0</chargevatontax>\n                    <owadl>110</owadl>\n                    <owchd>90</owchd>\n                    <owinf>60</owinf>\n                    <owtax1>5</owtax1>\n                    <owtax2>5</owtax2>\n                    <owtax3>5</owtax3>\n                    <owtax4>5</owtax4>\n                    <rtadl>100</rtadl>\n                    <rtchd>80</rtchd>\n                    <rtinf>50</rtinf>\n                    <rttax1>5</rttax1>\n                    <rttax2>5</rttax2>\n                    <rttax3>5</rttax3>\n                    <rttax4>5</rttax4>\n                    <vat>10</vat>\n                </newDetails>\n            </fare>\n        </fares>\n    </parms>\n</aerocrs>"
            }
          ],
          "samples-languages": [
            "xml"
          ]
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {},
              "examples": {
                "Request Example": {
                  "value": {
                    "aerocrs": {
                      "parms": {
                        "fares": {
                          "fare": [
                            {
                              "fareDetails": {
                                "fromcode": "MAD",
                                "tocode": "BCN",
                                "classcode": "Y",
                                "fromdate": "2018/10/28",
                                "todate": "2019/10/26",
                                "currency": "USD"
                              },
                              "newDetails": {
                                "fromcode": "MAD",
                                "tocode": "BCN",
                                "classcode": "Y",
                                "fromdate": "2018/10/28",
                                "todate": "2020/12/28",
                                "currency": "USD",
                                "baggage": 20,
                                "brand": "0",
                                "scheme": "0",
                                "showhours": 0,
                                "expirehours": 0,
                                "minstay": 0,
                                "maxstay": 0,
                                "sellstart": "2018/04/14",
                                "sellend": "2019/12/15",
                                "limitcurrency": 0,
                                "chargevatontax": 0,
                                "owadl": 100,
                                "owchd": 80,
                                "owinf": 50,
                                "owtax1": 5,
                                "owtax2": 5,
                                "owtax3": 5,
                                "owtax4": 5,
                                "rtadl": 100,
                                "rtchd": 80,
                                "rtinf": 30,
                                "rttax1": 10.5,
                                "rttax2": 10.5,
                                "rttax3": 10.5,
                                "rttax4": 10.5,
                                "vat": 0
                              }
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```