---
updatedAt: 2025-06-02T20:48:58.000Z
agentTools:
  projectIndex: https://docs.aerocrs.com/v4.0/llms.txt
---

# getAllFlightsFromOrigin

This method allows you to get all flights departing from an origin

## Request parameters

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

      <th style={{ textAlign: "left" }}>
        Type
      </th>

      <th style={{ textAlign: "left" }}>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        origin
      </td>

      <td style={{ textAlign: "left" }}>
        String\*
      </td>

      <td style={{ textAlign: "left" }}>
        Destination code
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        startdate
      </td>

      <td style={{ textAlign: "left" }}>
        Date\*
      </td>

      <td style={{ textAlign: "left" }}>
        From date
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        enddate
      </td>

      <td style={{ textAlign: "left" }}>
        Date\*
      </td>

      <td style={{ textAlign: "left" }}>
        To date
      </td>
    </tr>
  </tbody>
</Table>

> ❗️ \* Mandatory parameters

## Response parameters

The method will response with a list of segments departing from the given origin.

<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>
        The following elements are within &lt;flight&gt; which represents a flight within &lt;flights&gt;
      </td>
    </tr>

    <tr>
      <td>
        flight
      </td>

      <td>
        Element
      </td>

      <td>
        The following parameters are within flight
      </td>
    </tr>

    <tr>
      <td>
        flightid
      </td>

      <td>
        Number
      </td>

      <td>
        The flight id
      </td>
    </tr>

    <tr>
      <td>
        flightnumber
      </td>

      <td>
        String
      </td>

      <td>
        The flight number
      </td>
    </tr>

    <tr>
      <td>
        flightdate
      </td>

      <td>
        Date
      </td>

      <td>
        The flight date
      </td>
    </tr>

    <tr>
      <td>
        flightequipment
      </td>

      <td>
        String
      </td>

      <td>
        Aircraft used
      </td>
    </tr>

    <tr>
      <td>
        tailnumber
      </td>

      <td>
        String
      </td>

      <td>
        The tail number
      </td>
    </tr>

    <tr>
      <td>
        seat\_plan\_reference
      </td>

      <td>
        String
      </td>

      <td>
        type of aircraft seat plan
      </td>
    </tr>

    <tr>
      <td>
        opsremarks
      </td>

      <td>
        String
      </td>

      <td>
        Operational remarks (future use)
      </td>
    </tr>

    <tr>
      <td>
        flightlegs
      </td>

      <td>
        Element
      </td>

      <td>
        The following elements are within &lt;leg&gt; which represents a leg within &lt;flightlegs&gt;
      </td>
    </tr>

    <tr>
      <td>
        leg
      </td>

      <td>
        Element
      </td>

      <td>
        The following parameters are within leg
      </td>
    </tr>

    <tr>
      <td>
        origin
      </td>

      <td>
        String
      </td>

      <td>
        The origin code
      </td>
    </tr>

    <tr>
      <td>
        destination
      </td>

      <td>
        String
      </td>

      <td>
        The destination code
      </td>
    </tr>

    <tr>
      <td>
        STD
      </td>

      <td>
        Time
      </td>

      <td>
        Departure leg
      </td>
    </tr>

    <tr>
      <td>
        STA
      </td>

      <td>
        Time
      </td>

      <td>
        Arrival leg
      </td>
    </tr>

    <tr>
      <td>
        daydiff
      </td>

      <td>
        number
      </td>

      <td>
        Returns 1 if flight lands on a different day.
      </td>
    </tr>
  </tbody>
</Table>

# 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": {
    "/getAllFlightsFromOrigin": {
      "post": {
        "summary": "getAllFlightsFromOrigin",
        "description": "This method allows you to get all flights departing from an origin",
        "operationId": "getallflightsfromorigin",
        "parameters": [
          {
            "name": "auth_id",
            "in": "header",
            "description": "ID provided to you by AeroCRS",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "auth_password",
            "in": "header",
            "description": "Password provided to you by AeroCRS",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "RAW_BODY"
                ],
                "properties": {
                  "RAW_BODY": {
                    "type": "string",
                    "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\"",
                    "format": "json"
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "aerocrs": {
                      "parms": {
                        "origin": "DAR",
                        "startdate": "2018/05/14",
                        "enddate": "2018/05/15"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "JSON": {
                    "value": "{\n\t\"aerocrs\": {\n\t\t\"success\": true,\n\t\t\"flights\": {\n\t\t\t\"flight\": [{\n\t\t\t\t\t\"flightid\": 2114589,\n\t\t\t\t\t\"flightnumber\": \"M1235\",\n\t\t\t\t\t\"flightdate\": \"2018/05/14\",\n\t\t\t\t\t\"flightequipment\": \"320\",\n\t\t\t\t\t\"tailnumber\": \"A320-233\",\n\t\t\t\t\t\"seat_plan_reference\": \"Airbus A320-233\",\n\t\t\t\t\t\"opsremarks\": \"\",\n\t\t\t\t\t\"flightlegs\": {\n\t\t\t\t\t\t\"leg\": [{\n\t\t\t\t\t\t\t\t\"origin\": \"ZNZ\",\n\t\t\t\t\t\t\t\t\"destination\": \"DAR\",\n\t\t\t\t\t\t\t\t\"STD\": \"05:00\",\n\t\t\t\t\t\t\t\t\"STA\": \"06:30\",\n\t\t\t\t\t\t\t\t\"daydiff\": 0\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"origin\": \"DAR\",\n\t\t\t\t\t\t\t\t\"destination\": \"BCN\",\n\t\t\t\t\t\t\t\t\"STD\": \"07:30\",\n\t\t\t\t\t\t\t\t\"STA\": \"14:30\",\n\t\t\t\t\t\t\t\t\"daydiff\": 0\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"origin\": \"BCN\",\n\t\t\t\t\t\t\t\t\"destination\": \"MAD\",\n\t\t\t\t\t\t\t\t\"STD\": \"15:30\",\n\t\t\t\t\t\t\t\t\"STA\": \"17:00\",\n\t\t\t\t\t\t\t\t\"daydiff\": 0\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"flightid\": 2114590,\n\t\t\t\t\t\"flightnumber\": \"M1235\",\n\t\t\t\t\t\"flightdate\": \"2018/05/15\",\n\t\t\t\t\t\"flightequipment\": \"320\",\n\t\t\t\t\t\"tailnumber\": \"A320-233\",\n\t\t\t\t\t\"seat_plan_reference\": \"Airbus A320-233\",\n\t\t\t\t\t\"opsremarks\": \"\",\n\t\t\t\t\t\"flightlegs\": {\n\t\t\t\t\t\t\"leg\": [{\n\t\t\t\t\t\t\t\t\"origin\": \"ZNZ\",\n\t\t\t\t\t\t\t\t\"destination\": \"DAR\",\n\t\t\t\t\t\t\t\t\"STD\": \"05:00\",\n\t\t\t\t\t\t\t\t\"STA\": \"06:30\",\n\t\t\t\t\t\t\t\t\"daydiff\": 0\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"origin\": \"DAR\",\n\t\t\t\t\t\t\t\t\"destination\": \"BCN\",\n\t\t\t\t\t\t\t\t\"STD\": \"07:30\",\n\t\t\t\t\t\t\t\t\"STA\": \"14:30\",\n\t\t\t\t\t\t\t\t\"daydiff\": 0\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"origin\": \"BCN\",\n\t\t\t\t\t\t\t\t\"destination\": \"MAD\",\n\t\t\t\t\t\t\t\t\"STD\": \"15:30\",\n\t\t\t\t\t\t\t\t\"STA\": \"17:00\",\n\t\t\t\t\t\t\t\t\"daydiff\": 0\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "aerocrs": {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "flights": {
                          "type": "object",
                          "properties": {
                            "flight": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "flightid": {
                                    "type": "integer",
                                    "example": 2114589,
                                    "default": 0
                                  },
                                  "flightnumber": {
                                    "type": "string",
                                    "example": "M1235"
                                  },
                                  "flightdate": {
                                    "type": "string",
                                    "example": "2018/05/14"
                                  },
                                  "flightequipment": {
                                    "type": "string",
                                    "example": "320"
                                  },
                                  "tailnumber": {
                                    "type": "string",
                                    "example": "A320-233"
                                  },
                                  "seat_plan_reference": {
                                    "type": "string",
                                    "example": "Airbus A320-233"
                                  },
                                  "opsremarks": {
                                    "type": "string",
                                    "example": ""
                                  },
                                  "flightlegs": {
                                    "type": "object",
                                    "properties": {
                                      "leg": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "origin": {
                                              "type": "string",
                                              "example": "ZNZ"
                                            },
                                            "destination": {
                                              "type": "string",
                                              "example": "DAR"
                                            },
                                            "STD": {
                                              "type": "string",
                                              "example": "05:00"
                                            },
                                            "STA": {
                                              "type": "string",
                                              "example": "06:30"
                                            },
                                            "daydiff": {
                                              "type": "integer",
                                              "example": 0,
                                              "default": 0
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "examples": {
                  "XML": {
                    "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<aerocrs>\n    <success>true</success>\n    <flights>\n        <flight>\n            <flightid>2114589</flightid>\n            <flightnumber>M1235</flightnumber>\n            <flightdate>2018/05/14</flightdate>\n            <flightequipment>320</flightequipment>\n            <tailnumber>A320-233</tailnumber>\n            <seat_plan_reference>Airbus A320-233</seat_plan_reference>\n            <opsremarks />\n            <flightlegs>\n                <leg>\n                    <origin>ZNZ</origin>\n                    <destination>DAR</destination>\n                    <STD>05:00</STD>\n                    <STA>06:30</STA>\n                    <daydiff>0</daydiff>\n                </leg>\n                <leg>\n                    <origin>DAR</origin>\n                    <destination>BCN</destination>\n                    <STD>07:30</STD>\n                    <STA>14:30</STA>\n                    <daydiff>0</daydiff>\n                </leg>\n                <leg>\n                    <origin>BCN</origin>\n                    <destination>MAD</destination>\n                    <STD>15:30</STD>\n                    <STA>17:00</STA>\n                    <daydiff>0</daydiff>\n                </leg>\n            </flightlegs>\n        </flight>\n        <flight>\n            <flightid>2114590</flightid>\n            <flightnumber>M1235</flightnumber>\n            <flightdate>2018/05/15</flightdate>\n            <flightequipment>320</flightequipment>\n            <tailnumber>A320-233</tailnumber>\n            <seat_plan_reference>Airbus A320-233</seat_plan_reference>\n            <opsremarks />\n            <flightlegs>\n                <leg>\n                    <origin>ZNZ</origin>\n                    <destination>DAR</destination>\n                    <STD>05:00</STD>\n                    <STA>06:30</STA>\n                    <daydiff>0</daydiff>\n                </leg>\n                <leg>\n                    <origin>DAR</origin>\n                    <destination>BCN</destination>\n                    <STD>07:30</STD>\n                    <STA>14:30</STA>\n                    <daydiff>0</daydiff>\n                </leg>\n                <leg>\n                    <origin>BCN</origin>\n                    <destination>MAD</destination>\n                    <STD>15:30</STD>\n                    <STA>17:00</STA>\n                    <daydiff>0</daydiff>\n                </leg>\n            </flightlegs>\n        </flight>\n    </flights>\n</aerocrs>"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "x-readme": {
          "code-samples": [
            {
              "language": "xml",
              "code": "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n<aerocrs> \n\t<parms>\n\t\t<origin>DAR</origin> \n\t\t<startdate>2018/05/14</startdate> \n\t\t<enddate>2018/05/15</enddate> \n\t</parms>\n</aerocrs>"
            }
          ],
          "samples-languages": [
            "xml"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```