Federation API update

 

This is not public visible change, and will not affect the usage of app.equipe.com. Normally these changes goes without saying. But I think this is a perfect opportunity to share our way of thinking.

Federation API is what allows Equipe to be glued together with any Federation or Entry system. It allows Equipe to import entries, export results, search riders, horses, clubs and officials on the behalf of the signed in person, and import specific record directly to Equipe without leaving the system.

You are read more about it

From the birth of the Federation API we have had integer/bigint as foreign id, so the external system can identify what goes in and what goes out.

The problem with using integer as primary key for external system is that the data models could differ. We expect all people to be stored in one table, and that is what happened, riders, officials and horse owners came from different sources and don't have unique identifier. Todays update solves this. Foreign string IDs can easily be prefixed to be unique or you can use guids.

{
  "show": {
    "id": "fc1bf64e-1f6d-4838-ab45-1d4f0a079288",
    "name": "Mini show 2017",
    "currency": "SEK"
  },
  "competitions": [
    {
      "competition_no": "1",
      "name": "Two phases, not atc T A",
      "judgement_id": "274.5.1",
      "discipline": "H",
      "starts_on": "2017-01-10",
      "start_time": "12:00",
      "fence_height": 120,
      "entry_fee": 120,
      "late_entry_fee": 50,
      "vat": 0
    }
  ],
  "people": [
    {
      "id": "c0cdc695-c646-4b32-ab68-5fa92eca2fc5",
      "first_name": "Jon",
      "last_name": "Stenqvist",
      "person_no": "2010-10-12"
    }
  ],
  "horses": [
    {
      "id": "81ce6fc1-426b-4a77-9371-1605f51c9eef",
      "name": "Seed",
      "category": "H"
    }
  ],
  "entries": [
    {
      "id": "2f5e3700-95b6-47ea-a96c-99ea9cca6dbe",
      "competition_no": "1",
      "rider_id": "c0cdc695-c646-4b32-ab68-5fa92eca2fc5",
      "horse_id": "81ce6fc1-426b-4a77-9371-1605f51c9eef",
      "payer_id": "c0cdc695-c646-4b32-ab68-5fa92eca2fc5"
    }
  ]
}

We have seen many format for results and entries over years, we wanted something easy to implement and easy to extend without breaking the format.