{"id":37395605,"url":"https://github.com/amadeus4dev-examples/amadeus-dotnet","last_synced_at":"2026-01-16T05:36:51.815Z","repository":{"id":44740470,"uuid":"194818383","full_name":"amadeus4dev-examples/amadeus-dotnet","owner":"amadeus4dev-examples","description":"Dotnet library for the Amadeus Self-Service travel APIs","archived":false,"fork":false,"pushed_at":"2023-11-04T12:53:44.000Z","size":241,"stargazers_count":22,"open_issues_count":10,"forks_count":21,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-08T05:27:44.550Z","etag":null,"topics":["dotnet","sdk"],"latest_commit_sha":null,"homepage":"https://developers.amadeus.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amadeus4dev-examples.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-02T08:09:12.000Z","updated_at":"2025-11-25T13:28:42.000Z","dependencies_parsed_at":"2023-01-24T15:45:46.865Z","dependency_job_id":null,"html_url":"https://github.com/amadeus4dev-examples/amadeus-dotnet","commit_stats":null,"previous_names":["amadeus4dev/amadeus-dotnet"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/amadeus4dev-examples/amadeus-dotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev-examples%2Famadeus-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev-examples%2Famadeus-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev-examples%2Famadeus-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev-examples%2Famadeus-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amadeus4dev-examples","download_url":"https://codeload.github.com/amadeus4dev-examples/amadeus-dotnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev-examples%2Famadeus-dotnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","sdk"],"created_at":"2026-01-16T05:36:51.710Z","updated_at":"2026-01-16T05:36:51.798Z","avatar_url":"https://github.com/amadeus4dev-examples.png","language":"C#","readme":"# Amadeus Dotnet SDK\n\n[![Nuget](https://img.shields.io/nuget/v/amadeus-dotnet)](https://www.nuget.org/packages/amadeus-dotnet)\n[![build](https://github.com/amadeus4dev/amadeus-dotnet/actions/workflows/build.yml/badge.svg)](https://github.com/amadeus4dev/amadeus-dotnet/actions/workflows/build.yml)\n[![Discord](https://img.shields.io/discord/696822960023011329?label=\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2)](https://discord.gg/cVrFBqx)\n\nAmadeus provides a rich set of APIs for the travel industry. For more details, check out the [Amadeus for Developers portal](https://developers.amadeus.com).\n\n## :warning: Important message :warning\n\n:heavy_exclamation_mark: This SDK is maintained **by the developer community only**. The Amadeus for Developers team doesn't support or maintain it. :heavy_exclamation_mark:\n\n## Installation\n\nYou can install the `amadeus-dotnet` via NuGet packages installer, by searching for it in the package explorer.\n\n## Getting Started\n\nTo make your first API call you will need to [register for an Amadeus\nDeveloper Account](https://developers.amadeus.com/create-account) and set up\nyour first application.\n\n```C#\nusing System;\n\nusing amadeus;\nusing amadeus.resources;\n\nnamespace amadeusTest\n\n\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            GetCheckinLinks();\n        }\n\n        public static void GetCheckinLinks()\n        {\n            try\n            {\n                Amadeus amadeus = Amadeus\n                    .builder(\"REPLACE_BY_YOUR_API_KEY\", \"REPLACE_BY_YOUR_API_SECRET\")\n                    .build();\n\n                Console.WriteLine(\"Get Check-in links:\");\n                CheckinLink[] checkinLinks = amadeus.referenceData.urls.checkinLinks.get(Params\n                        .with(\"airlineCode\", \"BA\"));\n\n                Console.WriteLine(checkinLinks[0].response.data);\n\n            }\n            catch (Exception e)\n            {\n                Console.WriteLine(\"ERROR: \" + e.ToString());\n            }\n        }\n    }\n}\n```\n\n## Initialization\n\nThe client can be initialized directly.\n\n```C#\n//Initialize using parameters\nAmadeus amadeus = Amadeus\n        .builder(\"REPLACE_BY_YOUR_API_KEY\", \"REPLACE_BY_YOUR_API_SECRET\")\n        .build();\n```\n\nAlternatively it can be initialized without any parameters if the environment\nvariables `AMADEUS_CLIENT_ID` and `AMADEUS_CLIENT_SECRET` are present.\n\n```C#\nSystem.Environment.SetEnvironmentVariable(\"AMADEUS_CLIENT_ID\", \"REPLACE_BY_YOUR_API_KEY\");\nSystem.Environment.SetEnvironmentVariable(\"AMADEUS_CLIENT_ID\", \"REPLACE_BY_YOUR_API_SECRET\");\nAmadeus amadeus = Amadeus\n        .builder()\n        .build();\n```\n\nYour credentials can be found on the [Amadeus\ndashboard](https://developers.amadeus.com/my-apps). [Sign\nup](https://developers.amadeus.com/create-account) for an account today.\n\nBy default the environment for the SDK is the `test` environment. To switch to\na production (paid-for) environment please switch the hostname as follows:\n\n```C#\nAmadeus amadeus = Amadeus\n        .builder()\n        .setHostname(\"production\")\n        .build();\n```\n\n## Making API calls\n\nThis library conveniently maps every API path to a similar path.\n\nFor example, `GET /v2/reference-data/urls/checkin-links?airlineCode=BA` would be:\n\n```C#\namadeus.referenceData.urls.checkinLinks.get(Params.with(\"airlineCode\", \"BA\"));\n```\n\nSimilarly, to select a resource by ID, you can pass in the ID to the **singular** path.\n\nFor example,  `GET /v2/shopping/hotel-offers/XXX` would be:\n\n```C#\namadeus.hotelOffer(\"XXX\").get(...);\n```\n\nYou can make any arbitrary API call as well directly to call not supported yet APIs.\nKeep in mind, this returns a raw `Resource`.\n\nFor the `.get` methods you can call the APIs such as\n\n```C#\namadeus.get(\"/v2/reference-data/urls/checkin-links\",\n  Params.with(\"airlineCode\", \"BA\"))\n```\n\nand for the `.post` methods\n\n```C#\namadeus.post(\"/v1/shopping/availability/flight-availabilities\", body);\n```\n\n## Response\n\nEvery successful API call returns a `Resource` object. The underlying\n`Resource` with the raw available.\n\n```C#\nLocation[] locations = amadeus.referenceData.locations.get(Params\n  .with(\"keyword\", \"LON\")\n  .and(\"subType\", \"CITY\"));\n\nConsole.Write(locations[0].response.body); //the raw response, as a string\nConsole.Write(locations[0].response.result); //the body parsed as JSON, if the result was parsable\nConsole.Write(locations[0].response.data); //the list of locations, extracted from the JSON\n```\n\n## Pagination\n\nIf an API endpoint supports pagination, the other pages are available under the\n`.next`, `.previous`, `.last` and `.first` methods.\n\n```C#\nLocation[] locations = amadeus.referenceData.locations.get(Params\n  .with(\"keyword\", \"LON\")\n  .and(\"subType\", Locations.ANY));\n\n// Fetches the next page\nLocation[] locations = (Location[]) amadeus.next(locations[0]);\n```\n\nIf a page is not available, the method will return `null`.\n\n## Logging \u0026 Debugging\n\nThe SDK makes it easy to add logger. To enable more verbose logging, you can set the appropriate level\non your own logger, though the easiest way would be to enable debugging via a\nparameter on initialization, or using the `AMADEUS_LOG_LEVEL` environment\nvariable.\n\n```C#\nAmadeus amadeus = Amadeus\n        .builder(\"REPLACE_BY_YOUR_API_KEY\", \"REPLACE_BY_YOUR_API_SECRET\")\n        .setLogLevel(\"debug\") // or warn\n        .build();\n```\n\n## List of supported endpoints\n\n```C#\n// Flight Inspiration Search\nFlightDestination[] flightDestinations = amadeus.shopping.flightDestinations.get(Params\n  .with(\"origin\", \"MAD\"));\n\n// Flight Cheapest Date Search\nFlightDate[] flightDates = amadeus.shopping.flightDates.get(Params\n  .with(\"origin\", \"MAD\")\n  .and(\"destination\", \"MUC\"));\n\n// Flight Check-in Links\nCheckinLink[] checkinLinks = amadeus.referenceData.urls.checkinLinks.get(Params\n  .with(\"airlineCode\", \"BA\"));\n\n// Airline Code LookUp\nAirline[] airlines = amadeus.referenceData.airlines.get(Params\n  .with(\"airlineCodes\", \"BA\"));\n\n// Airport \u0026 City Search (autocomplete)\n// Find all the cities and airports starting by the keyword 'LON'\nLocation[] locations = amadeus.referenceData.locations.get(Params\n  .with(\"keyword\", \"LON\")\n  .and(\"subType\", Locations.ANY));\n  \n// Get a specific city or airport based on its id\nLocation location = amadeus.referenceData\n  .location(\"ALHR\").get();\n\n// Airport Nearest Relevant (for London)\nLocation[] locations = amadeus.referenceData.locations.airports.get(Params\n  .with(\"latitude\", 0.1278)\n  .and(\"longitude\", 51.5074));\n\n// Flight Most Searched Destinations\n// Which were the most searched flight destinations from Madrid in August 2017?\nSearchedDestination searchedDestination = amadeus.travel.analytics.airTraffic.searchedByDestination.get(Params\n        .with(\"originCityCode\", \"MAD\")\n        .and(\"destinationCityCode\", \"NYC\")\n        .and(\"searchPeriod\", \"2017-08\")\n        .and(\"marketCountryCode\", \"ES\"));\n        \n// How many people in Spain searched for a trip from Madrid to New-York in September 2017?\nSearch[] search = amadeus.travel.analytics.airTraffic.searched.get(Params\n        .with(\"originCityCode\", \"MAD\")\n        .and(\"searchPeriod\", \"2017-08\")\n        .and(\"marketCountryCode\", \"ES\"));\n\n// Flight Most Booked Destinations\nAirTraffic[] airTraffics = amadeus.travel.analytics.airTraffic.booked.get(Params\n  .with(\"originCityCode\", \"MAD\")\n  .and(\"period\", \"2017-08\"));\n\n// Flight Most Traveled Destinations\nAirTraffic[] airTraffics = amadeus.travel.analytics.airTraffic.traveled.get(Params\n  .with(\"originCityCode\", \"MAD\")\n  .and(\"period\", \"2017-01\"));\n\n// Flight Busiest Traveling Period\nPeriod[] busiestPeriods = amadeus.travel.analytics.airTraffic.busiestPeriod.get(Params\n  .with(\"cityCode\", \"MAD\")\n  .and(\"period\", \"2017\")\n  .and(\"direction\", BusiestPeriod.ARRIVING));\n    \n// Flight Offers Search\n// GET endpoint\nFlightOffer[] flights = amadeus.shopping.flightOffersSearch.getFlightOffers(Params.\n    with(\"originLocationCode\", \"SYD\")\n    .and(\"destinationLocationCode\", \"BKK\")\n    .and(\"departureDate\", System.DateTime.Now.AddMonths(2).ToString(\"2022-06-06\"))\n    .and(\"adults\", \"1\"));\n    \n// POST ednpoint\nFlightOffer[] flights = amadeus.shopping.flightOffersSearch.postFlightOffers(body);\n\n// Flight Offers Price\nFlightOfferPricingOutput pricing = amadeus.shopping.flightOffers.pricing.postFlightOffersPricing(body);\n\n// Flight Create Orders\nFlightOrderCreateQuery createOrder = amadeus.booking.flightOrder.postFlightOrderManagement(body);\n\n// Flight Order Management\n// GET endpoint\nFlightOrderCreateQuery getOrder = amadeus.booking.flightOrder.getFlightOrderManagement(Params\n    .with(\"flight-orderId\", \"eJzTd9cPsbR083cDAArgAkc%3D\"));\n\n// DELETE endpoint\nFlightOrderCreateQuery[] deleteOrder = amadeus.booking.flightOrder.deleteFlightOrderManagement(Params\n    .with(\"flight-orderId\", \"eJzTd9cPsbR083cDAArgAkc%3D\"));\n    \n// SeatMap Display API \n// GET ednpoint\nSeatMap[] seatsmap = amadeus.shopping.seatmaps.getSeatMap(Params\n    .with(\"flightOrderId\", \"MlpZVkFMfFdBVFNPTnwyMDE1LTExLTAy\"));\n\n// POST endpoint\nSeatMap[] response = amadeus.shopping.seatmaps.postSeatMap(body);\n\n// Hotel Search\n// Get list of hotels by city code\nHotelOffer[] offers = amadeus.shopping.hotelOffers.get(Params\n  .with(\"cityCode\", \"MAD\"));\n  \n// Get list of offers for a specific hotel\nHotelOffer hotelOffer = amadeus.shopping.hotelOffersByHotel.get(Params.with(\"hotelId\", \"BGLONBGB\"));\n\n// Confirm the availability of a specific offer\nHotelOffer offer = amadeus.shopping.hotelOffer(\"NRPQNQBOJM\").get();\n\n// Points of Interest\n// What are the popular places in Barcelona (based a geo location and a radius)\nPointOfInterest[] pointsOfInterest = amadeus.referenceData.locations.pointsOfInterest.get(Params\n   .with(\"latitude\", \"41.39715\")\n   .and(\"longitude\", \"2.160873\"));\n\n// What are the popular places in Barcelona? (based on a square)\nPointOfInterest[] pointsOfInterest = amadeus.referenceData.locations.pointsOfInterest.bySquare.get(Params\n    .with(\"north\", \"41.397158\")\n    .and(\"west\", \"2.160873\")\n    .and(\"south\", \"41.394582\")\n    .and(\"east\", \"2.177181\"));\n    \n// Safe Place \n// Safe Place by coordinates \nSafetyRatedLocation[] safeLocation = amadeus.safety.safetyRatedLocations.getByGeoCode(Params\n    .with(\"latitude\", \"41.397158\")\n    .and(\"longitude\", \"2.160873\"));\n    \n// Safe Place by square \nSafetyRatedLocation[] safeLocation = amadeus.safety.safetyRatedLocations.getBySquare(Params\n    .with(\"north\", \"41.397158\")\n    .and(\"west\", \"2.160873\")\n    .and(\"south\", \"41.394582\")\n    .and(\"east\", \"2.177181\"));\n    \n// Safe Place by id \nSafetyRatedLocation safeLocation = amadeus.safety.safetyRatedLocations.getById(Params\n    .with(\"safety-rated-locationId\", \"Q930402719\"));\n\n// Trip Purpose Prediction\nPrediction prediction = amadeus.travel.predictions.tripPurpose.get(Params.with(\"originLocationCode\", \"NYC\")\n    .and(\"destinationLocationCode\", \"MAD\")\n    .and(\"departureDate\", \"2022-06-01\")\n    .and(\"returnDate\", \"2022-06-06\"));\n\n```\n\n## Development \u0026 Contributing\n\nWant to contribute? Read our [Contributors Guide](.github/CONTRIBUTING.md) for\nguidance on installing and running this code in a development environment.\n\n## License\n\nThis library is released under the [MIT License](LICENSE).\n\n## Help\n\nYou can find us on [StackOverflow](https://stackoverflow.com/questions/tagged/amadeus) or join our developer community on\n[Discord](https://discord.gg/cVrFBqx).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famadeus4dev-examples%2Famadeus-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famadeus4dev-examples%2Famadeus-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famadeus4dev-examples%2Famadeus-dotnet/lists"}