# Swift Call **Category:** [Growth Charts](https://forum.rcpch.tech/c/rcpch-digital-growth-charts/6) **Created:** 2021-05-12 10:07 UTC **Views:** 924 **Replies:** 6 **URL:** https://forum.rcpch.tech/t/swift-call/31 --- ## Post #1 by @kit_fisto HI, is there a method to call the API from Swift in IOS please? --- ## Post #2 by @pacharanero Hi @kit_fisto The API is a simple REST API. I don't know any Swift myself but I'm fairly certain that it will have the capability to make an HTTP call. You probably need to consult the Swift language documentation If you make an HTTP GET to `https://api.rcpch.ac.uk/growth/v1` and include your API key in the headers then you should get back a JSON description of the API in openAPI3 format. You can explore the API using something like Postman (using our [Postman collection](https://www.getpostman.com/collections/e1ac5fe1fef92761c2ed)) and you can also use Postman to generate simple requests coded in a variety of languages including Swift. The BaseURL should be included in the Postman Collection by default, but in case not, ensure you are hitting the API server `https://api.rcpch.ac.uk/growth/v1`. --- ## Post #3 by @kit_fisto Thanks. I can make an HTTP call with apikey in Swift. I have used open weather before and add the city and units by adding &city=y&units=x etc to the call. The returns a JSON formatted return. Is there a format to do this? --- ## Post #4 by @pacharanero For our API you send a **POST** request containing a **JSON** body. (We did try initially building the API to use data in the URL as a query string, but the amount of data we needed to pass to the API made the URLs too long) this example JSON should return you a `chronological_centile` of 34 and `corrected_centile` of 82 ```json { "birth_date": "2020-03-12", "observation_date": "2020-04-12", "observation_value": 54, "sex": "male", "gestation_weeks": 37, "gestation_days": 1, "measurement_method": "height" } ``` I am guessing you are writing an iOS app for the API. If this is for your own learning/entertainment then go right ahead, but I just wanted to let you know that we are working on a React Native app, currently in pre-alpha, which will furnish us with an iOS and Android app which uses the API. We're very happy for other people to get involved in helping build this. It's open source and the code is here https://github.com/rcpch/digital-growth-charts-react-native-client --- ## Post #5 by @kit_fisto Thanks- yes just wanted to get something to 'help' my IT department use the API! --- ## Post #6 by @alexsunny123 thanks for the awesome information. --- ## Post #7 by @alexsunny123 [quote="alexsunny123, post:6, topic:2413, full:true"] thanks for the awesome information[.](https://ometv.onl)[.](https://chatroulette.top) [/quote] thanks my issue has been fixed. --- **Canonical:** https://forum.rcpch.tech/t/swift-call/31 **Original content:** https://forum.rcpch.tech/t/swift-call/31