Links

Relationships and available actions for a resource are represented with links. All resources have a _links attribute. At a minimum, all resources will have a self link which indicates the URL of the resource itself.

Some links, such as games or assignments, give you a URL which you can follow to access related resources. For example, an assignment resource has a decline link which, when followed, can be used when an assigned official needs to decline a game assignment.

Below is an example game. Note that the game has embedded venue, zone, site, and assignments. Joseph Schmoe, one of the assigned officials, has not accepted or declined their game assignment, and the assignment is showing an "accept" and "decline" link.

{ "id": 14532529, "start_time": "2023-04-03T09:00:00.000-04:00", "end_time": "2023-04-03T10:00:00.000-04:00", "localized_date": "Apr 3 2023", "localized_time": "9:00 AM", "localized_end_time": null, "age_group": "Under 9 [TEST]", "home_team": "Blues", "away_team": "Blackhawks", "gender": "Youth", "league": "Girls", "pattern": "3 officials", "status": "A", "cancelled": false, "published": true, "user_defined_id": null, "external_id": null, "lock_version": 7, "public_note": null, "created": "2020-01-20T16:54:10.000-05:00", "updated": "2022-08-11T11:56:22.000-04:00", "_links": { "self": { "resource-type": "game", "href": "https://api.assignr.com/api/v2/games/14532529.json" } }, "_embedded": { "venue": { "id": 800303, "name": "Milton HS", "longitude": null, "latitude": null, "created": "2021-01-28T15:07:03.000-05:00", "updated": "2021-01-28T15:07:03.000-05:00", "_links": { "self": { "resource-type": "venue", "href": "https://api.assignr.com/api/v2/venues/800303.json" } } }, "zone": { "id": 3, "name": "Zone C", "location": "Seattle, WA, USA", "created": "2020-12-31T09:37:45.000-05:00", "updated": "2022-09-29T11:30:05.000-04:00", "_links": { "self": { "resource-type": "zone", "href": "https://api.assignr.com/api/v2/zones/3.json" } } }, "site": { "id": 7, "name": "assignr.com Support", "created": "2009-09-27T21:53:54.000-04:00", "updated": "2022-11-10T12:46:57.000-05:00", "_links": { "self": { "resource-type": "site", "href": "https://api.assignr.com/api/v2/sites/7.json" } } }, "assignments": [ { "id": 43597266, "position_id": 24, "position": "Referee", "position_abbreviation": "Ref", "accepted": false, "declined": false, "assigned": true, "sort_order": 1, "lock_version": 7, "created": "2020-01-20T16:54:10.000-05:00", "updated": "2020-09-20T10:02:05.000-04:00", "_links": { "self": { "resource-type": "assignment", "href": "https://api.assignr.com/api/v2/assignments/43597266.json" }, "game": { "resource-type": "game", "href": "https://api.assignr.com/api/v2/games/14532529.json" } }, "_embedded": { "official": { "id": 671476, "last_name": "Hurrell [C]", "first_name": "Teresa", "created": "2017-11-02T11:23:35.000-04:00", "updated": "2021-01-28T16:41:35.000-05:00", "_links": { "self": { "resource-type": "user", "href": "https://api.assignr.com/api/v2/users/671476.json" }, "avatar_square": { "resource-type": "avatar", "href": "https://app.assignr.com/photo/123456--db7d8d07bb2e8e1d63decf016e53f33eb6431796b97d7aad34d5a9e6c2dbb322?size=300" }, "photo": { "resource-type": "photo", "href": "https://app.assignr.com/photo/123456--db7d8d07bb2e8e1d63decf016e53f33eb6431796b97d7aad34d5a9e6c2dbb322" } } } } }, { "id": 43597264, "position_id": 42651, "position": "Assistant Referee", "position_abbreviation": "AR", "accepted": false, "declined": false, "assigned": true, "sort_order": 2, "lock_version": 2, "created": "2020-01-20T16:54:10.000-05:00", "updated": "2020-02-08T10:32:47.000-05:00", "_links": { "self": { "resource-type": "assignment", "href": "https://api.assignr.com/api/v2/assignments/43597264.json" }, "game": { "resource-type": "game", "href": "https://api.assignr.com/api/v2/games/14532529.json" }, "statement": { "resource-type": "statement", "href": "https://api.assignr.com/api/v2/statements/5300.json" }, "accept": { "href": "https://api.assignr.com/api/v2/assignments/43597264/confirm.json" }, "decline": { "href": "https://api.assignr.com/api/v2/assignments/43597264/confirm.json" } }, "_embedded": { "official": { "id": 1992, "last_name": "Schmoe", "first_name": "Joseph", "mi": "A.", "created": "2009-09-27T21:53:54.000-04:00", "updated": "2022-12-01T09:58:03.000-05:00", "_links": { "self": { "resource-type": "user", "href": "https://api.assignr.com/api/v2/users/1992.json" }, "account": { "resource-type": "account", "href": "https://api.assignr.com/api/v2/site/4.json" }, "avatar_square": { "resource-type": "avatar", "href": "https://app.assignr.com/photo/789012%3D--0213ec1bf7dcc8086f73ef901eb9679e5accb3a73eb169c2dc7fd2979e3fd27c?size=300" }, "photo": { "resource-type": "photo", "href": "https://app.assignr.com/photo/789012%3D--0213ec1bf7dcc8086f73ef901eb9679e5accb3a73eb169c2dc7fd2979e3fd27c" } } }, "fees": [ { "value": 26.0, "formatted": "$26.00", "currency": "USD", "description": "Officiating Fees", "game_fees": true, "travel_fees": false, "_links": {} } ] } }, { "id": 43597265, "position_id": 42651, "position": "Assistant Referee", "position_abbreviation": "AR", "accepted": false, "declined": false, "assigned": true, "sort_order": 3, "lock_version": 2, "created": "2020-01-20T16:54:10.000-05:00", "updated": "2020-02-08T10:32:47.000-05:00", "_links": { "self": { "resource-type": "assignment", "href": "https://api.assignr.com/api/v2/assignments/43597265.json" }, "game": { "resource-type": "game", "href": "https://api.assignr.com/api/v2/games/14532529.json" } }, "_embedded": { "official": { "id": 671501, "last_name": "Anderson [B]", "first_name": "Teresa", "mi": "R", "created": "2017-11-02T11:23:37.000-04:00", "updated": "2021-12-03T14:37:31.000-05:00", "_links": { "self": { "resource-type": "user", "href": "https://api.assignr.com/api/v2/users/671501.json" }, "avatar_square": { "resource-type": "avatar", "href": "https://app.assignr.com/photo/456789--9cde23144b3746fd6dd9ce1a03021f9eb9c7b65242a585a5ab1496c4f81c9cb7?size=300" }, "photo": { "resource-type": "photo", "href": "https://app.assignr.com/photo/456789--9cde23144b3746fd6dd9ce1a03021f9eb9c7b65242a585a5ab1496c4f81c9cb7" } } } } }, { "id": 43597263, "position_id": 42661, "position": "4th Official", "position_abbreviation": "4th", "accepted": false, "declined": false, "assigned": true, "sort_order": 4, "lock_version": 2, "created": "2020-01-20T16:54:10.000-05:00", "updated": "2020-02-08T10:32:47.000-05:00", "_links": { "self": { "resource-type": "assignment", "href": "https://api.assignr.com/api/v2/assignments/43597263.json" }, "game": { "resource-type": "game", "href": "https://api.assignr.com/api/v2/games/14532529.json" } }, "_embedded": { "official": { "id": 734661, "last_name": "Armstrong [TEST] 10 [C]", "first_name": "Jackson", "created": "2018-08-27T15:52:48.000-04:00", "updated": "2022-12-01T08:21:15.000-05:00", "_links": { "self": { "resource-type": "user", "href": "https://api.assignr.com/api/v2/users/734661.json" }, "avatar_square": { "resource-type": "avatar", "href": "https://app.assignr.com/photo/345678--a9b055d0552c31f0a570447b74cc1fbbeb5130b88e2f781b998df906409271c9?size=300" }, "photo": { "resource-type": "photo", "href": "https://app.assignr.com/photo/345678--a9b055d0552c31f0a570447b74cc1fbbeb5130b88e2f781b998df906409271c9" } } } } }, { "id": 43612716, "position_id": 60221, "position": "Timekeeper", "position_abbreviation": "TK", "accepted": false, "declined": false, "assigned": false, "sort_order": 5, "lock_version": 0, "created": "2020-09-12T08:59:24.000-04:00", "updated": "2020-09-12T08:59:24.000-04:00", "_links": { "self": { "resource-type": "assignment", "href": "https://api.assignr.com/api/v2/assignments/43612716.json" }, "game": { "resource-type": "game", "href": "https://api.assignr.com/api/v2/games/14532529.json" } } }, { "id": 43612718, "position_id": 60221, "position": "Timekeeper", "position_abbreviation": "TK", "accepted": false, "declined": false, "assigned": false, "sort_order": 5, "lock_version": 0, "created": "2020-09-12T08:59:24.000-04:00", "updated": "2020-09-12T08:59:24.000-04:00", "_links": { "self": { "resource-type": "assignment", "href": "https://api.assignr.com/api/v2/assignments/43612718.json" }, "game": { "resource-type": "game", "href": "https://api.assignr.com/api/v2/games/14532529.json" } } }, { "id": 43612720, "position_id": 60221, "position": "Timekeeper", "position_abbreviation": "TK", "accepted": false, "declined": false, "assigned": false, "sort_order": 5, "lock_version": 0, "created": "2020-09-12T08:59:24.000-04:00", "updated": "2020-09-12T08:59:24.000-04:00", "_links": { "self": { "resource-type": "assignment", "href": "https://api.assignr.com/api/v2/assignments/43612720.json" }, "game": { "resource-type": "game", "href": "https://api.assignr.com/api/v2/games/14532529.json" } } } ] } }