{"_id":"564b84471ed5c823003eb662","category":{"_id":"55773acb07e7110d001043ee","pages":["55776c5f07e7110d00104499","564b840485e4e92b00fb4f9d","564b8422cc472d0d00da9453","564b8436cc472d0d00da9455","564b84471ed5c823003eb662","564b84591ed5c823003eb664","564b8468766d4923004e1fcd","564b84944f06ef2b006b08b2","564b84a0766d4923004e1fcf"],"__v":9,"project":"55773a5ba042551900b002cb","version":"55773a5ba042551900b002ce","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-06-09T19:13:15.370Z","from_sync":false,"order":7,"slug":"federation-api","title":"Federation API"},"user":"546d17e2eb9cfd1400dd4529","version":{"_id":"55773a5ba042551900b002ce","project":"55773a5ba042551900b002cb","__v":18,"createdAt":"2015-06-09T19:11:23.764Z","releaseDate":"2015-06-09T19:11:23.764Z","categories":["55773a5ca042551900b002cf","55773a6ce6063e0d00481380","55773ab007e7110d001043ec","55773abaa042551900b002d5","55773ac207e7110d001043ed","55773acb07e7110d001043ee","55773ad3a042551900b002d6","55773adce6063e0d00481383","55773ae4a042551900b002d7","55773af307e7110d001043ef","55773af907e7110d001043f0","55773b0407e7110d001043f1","563a4f7ad25e8919005f3f39","563a4fcaa19edf0d00972321","564a70dc4cd0521700523edf","564b797bcc472d0d00da9435","564b855b766d4923004e1fd1","59cd4b81935249001c77c48e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Motherboard","version_clean":"1.0.0","version":"1"},"editedParams2":true,"editedParams":true,"__v":2,"parentDoc":null,"project":"55773a5ba042551900b002cb","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-17T19:47:19.003Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","status":201,"language":"json","code":"{\n   \"code\":201,\n   \"status\":\"success\",\n   \"data\":{\n      \"federation_id\":2390,\n      \"federation_title\":\"Antigua and Barbuda Triathlon Association\",\n      \"federation_slug\":\"antigua_and_barbuda_triathlon_association\",\n      \"federation_edit_date\":\"2015-04-15T08:57:35+00:00\",\n      \"federation_country_id\":107,\n      \"federation_region_id\":11,\n      \"federation_region_name\":\"Americas\",\n      \"federation_affiliation_status\":\"Affiliated\",\n      \"federation_noc\":\"ANT\",\n      \"federation_country_name\":\"Antigua and Barbuda\",\n      \"federation_country_isoa2\":\"AG\",\n      \"federation_flag\":\"https://f9ca11ef49c28681fc01-0acbf57e00c47a50e70a1acb89e86c89.ssl.cf1.rackcdn.com/images/icons/ag.png\",\n      \"federation_listing\":\"http://americas.triathlon.org/federations/federation/antigua_and_barbuda_triathlon_association\",\n      \"federation_api_listing\":\"https://api.triathlon.org/v1/v1/federations/2390\"\n   }\n}"}]},"settings":"","examples":{"codes":[]},"method":"post","auth":"required","params":[{"_id":"565ca445ea82b00d00f94a35","ref":"","in":"body","required":true,"desc":"The title of the Federation to be created","default":"","type":"string","name":"title"},{"_id":"565ca445ea82b00d00f94a34","ref":"","in":"body","required":true,"desc":"The county_id of the Federation to be created","default":"","type":"string","name":"country_id"}],"url":"/federations"},"isReference":true,"order":3,"body":"The **Create Federation** method creates a new Federation and returns a basic Federation object. You may add additional information via the **Edit Federation** method once you have a valid `federation_id`.\n\nThis method validates that a duplicate Federation is not being created (no more than one Federation per country) and returns a 400 error code if this validation fails i.e. a duplicate Federation exists in the system.","excerpt":"","slug":"create-federation","type":"endpoint","title":"Create Federation"}

postCreate Federation


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

title:
required
string
The title of the Federation to be created
country_id:
required
string
The county_id of the Federation to be created

Result Format


Documentation

The **Create Federation** method creates a new Federation and returns a basic Federation object. You may add additional information via the **Edit Federation** method once you have a valid `federation_id`. This method validates that a duplicate Federation is not being created (no more than one Federation per country) and returns a 400 error code if this validation fails i.e. a duplicate Federation exists in the system.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}