---
updatedAt: 2026-05-25T15:17:28.000Z
agentTools:
  projectIndex: https://docs.aerocrs.com/llms.txt
---

# updateClass

Update class or classes quantity

> ❗️ Important
>
> This API call will NOT work for multileg flights

> 📘 Operational information
>
> The quantity parameter sets the new number of free seats.\
> For instance, if you have 4 booked passengers, and you want to set the new class quantity to be 10 (=6 free seats) - you need to send 6.

## Request Parameters

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        Flights
      </td>

      <td>
        Element*
      </td>

      <td>
        Array of flights
      </td>
    </tr>

    <tr>
      <td>
        Flight
      </td>

      <td>
        Element*
      </td>

      <td>
        Contains flight information
      </td>
    </tr>

    <tr>
      <td>
        flightnumber
      </td>

      <td>
        String*
      </td>

      <td>
        Flight Number
      </td>
    </tr>

    <tr>
      <td>
        flightdate
      </td>

      <td>
        Date*
      </td>

      <td>
        Date of flight YYYY/mm/dd
      </td>
    </tr>

    <tr>
      <td>
        fromcode
      </td>

      <td>
        String*
      </td>

      <td>
        Flight departure destination
      </td>
    </tr>

    <tr>
      <td>
        tocode
      </td>

      <td>
        String*
      </td>

      <td>
        Flight arrival destination
      </td>
    </tr>

    <tr>
      <td>
        class
      </td>

      <td>
        Element*
      </td>

      <td>
        Array of classes
      </td>
    </tr>

    <tr>
      <td>
        code
      </td>

      <td>
        String*
      </td>

      <td>
        Class code
      </td>
    </tr>

    <tr>
      <td>
        type
      </td>

      <td>
        String*
      </td>

      <td>
        Open or closed (O/C only)
      </td>
    </tr>

    <tr>
      <td>
        qty
      </td>

      <td>
        Number
      </td>

      <td>
        Quantity of seats.  
        This field is mandatory when type is O
      </td>
    </tr>

    <tr>
      <td>
        closed
      </td>

      <td>
        Boolean
      </td>

      <td>
        Parameter to close the class (nesting feature)
      </td>
    </tr>
  </tbody>
</Table>

## Response Parameters

| Parameter | Type    | Description                                                            |
| :-------- | :------ | :--------------------------------------------------------------------- |
| Success   | Boolean | true/false                                                             |
| Details   | String  | Additional information in case of failure. (Only when success = false) |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "aerocrs-v5",
    "version": "5.0"
  },
  "servers": [
    {
      "url": "https://api.aerocrs.com/v5"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "auth_id"
      },
      "sec1": {
        "type": "apiKey",
        "in": "header",
        "name": "auth_password"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/updateClass": {
      "post": {
        "summary": "updateClass",
        "description": "Update class or classes quantity",
        "operationId": "updateclass",
        "parameters": [
          {
            "name": "auth_id",
            "in": "header",
            "description": "ID provided to you by AeroCRS",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "auth_password",
            "in": "header",
            "description": "ID provided to you by AeroCRS",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Raw body": {
                    "type": "string",
                    "description": "The method accepts XML/JSON"
                  }
                }
              },
              "examples": {
                "JSON": {
                  "value": {
                    "aerocrs": {
                      "parms": {
                        "flights": {
                          "flight": [
                            {
                              "flightnumber": "DS5845",
                              "flightdate": "2019/07/31",
                              "fromcode": "TLV",
                              "tocode": "AMS",
                              "class": [
                                {
                                  "code": "E",
                                  "type": "O",
                                  "qty": 20
                                },
                                {
                                  "code": "Y",
                                  "type": "O",
                                  "qty": 20
                                }
                              ]
                            },
                            {
                              "flightnumber": "DSNM1",
                              "flightdate": "2019/07/31",
                              "fromcode": "MAD",
                              "tocode": "AMS",
                              "class": [
                                {
                                  "code": "A",
                                  "type": "C"
                                }
                              ]
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "JSON": {
                    "value": "{\n    \"aerocrs\": {\n        \"success\": true\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "aerocrs": {
                      "type": "object",
                      "properties": {
                        "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</aerocrs>"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "xml",
              "code": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<aerocrs>\n    <parms>\n        <flights>\n            <flight>\n                <flightnumber>DS5845</flightnumber>\n                <flightdate>2019/07/31</flightdate>\n                <fromcode>TLV</fromcode>\n\t        \t<tocode>AMS</tocode>\n\t        \t<class>\n\t        \t\t<code>E</code>\n\t        \t\t<type>O</type>\n\t        \t\t<qty>20</qty>\n\t        \t</class>\n\t        \t<class>\n\t        \t\t<code>Y</code>\n\t        \t\t<type>O</type>\n\t        \t\t<qty>20</qty>\n\t        \t</class>\n            </flight>\n            <flight>\n                <flightnumber>DSNM1</flightnumber>\n                <flightdate>2019/07/31</flightdate>\n                <fromcode>MAD</fromcode>\n\t        \t<tocode>AMS</tocode>\n\t        \t<class>\n\t        \t\t<code>A</code>\n\t        \t\t<type>C</type>\n\t        \t</class>\n            </flight>\n        </flights>\n    </parms>\n</aerocrs>",
              "name": "XML"
            }
          ],
          "samples-languages": [
            "xml"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```