Skip to main content
Skip table of contents

Generic API Parameters

When exporting COMET DATA results from report through API call, the following fields are added to the JSON response:

  • uid - unique identifier of the record in this report

  • lastupdateddatetime - last updated datetime of the record (UTC)

These fields correspond to the new fields in the various tables of results generated by each report. Here is a list of all modified reports and the corresponding Unique ID value:

Category

Report

Unique ID

Persons

Person Registrations (5)*

Registration ID

Person Custom Attributes (6)

Attribute value ID

Person Contacts (7)

Contact ID

Person Titles and Licenses (9)

TitleLicense ID

Persons Contracts (10)

Contract ID

Person Registrations Status Transitions (41)

StatusTransition ID

Person Contracts Status Transitions (42)

StatusTransition ID

Organizations

Organizations (1)

Organization ID

Organizations Custom Attributes (15)

Attribute value ID

Organization Contacts (16)

Contact ID

Organization Titles and Licenses (17)

TitleLicense ID

Pitches (57)

Pitch ID (Stadium Part)

Pitch Custom Attributes (58)

Attribute Value ID

Organization Status Transitions (43)

StatusTransition ID

Licensing

Application Types (18)

Evidence type ID

Applications (19)

Application ID

Disciplinary

Disciplinary Cases (22)

Case ID

Disciplinary Sanctions (23)

Sanction ID

Served Suspensions (24)

Sanction match ID

Competitions

Matches (29)

Match ID

Match Events (34)

Match event ID

Competitions (29)

Competition ID

Competition Person Registrations (26)

Competition Role ID

Competition Person Contacts (28)

Contact ID

Match Phases (30)

Match Phase ID

Player Appearances (31)

Match Role ID

Team Official Appearances (32)

Match Role ID

Match Official Appearances (33)

Match Role ID

Goalkeeper Appearances (53)

Match Role ID

Competition Teams (54)

Competition Club ID

Match Status Transitions (44)

StatusTransition ID

Match Team Status Transitions (45)

StatusTransition ID

Match Official Status Transitions (46)

StatusTransition ID

Competition Team Status Transitions (55)

StatusTransition ID

Events

 

Events (11)

Event ID

Event Participants (14)

EventParticipant ID

Event Participant Contacts (13)

Contact ID

Event Participant Status Transitions (86)

Entity in Status ID

Sales

Items (64)

Item ID

Orders (65)

Order ID

Order Payments (66)

Order Payment ID

Order Items (67)

Order Item ID

Order Items Survey Answers (68)

Item Question Value ID

* For Person Registrations (5) report, the lastupdatedatetime considers not only the changes on the specific Registration, but also changes on the Person. E.g. if the Lastname of a Person is updated, the lastupdatedatetime will be updated on all registrations of that person.

Below is an example of the resulting JSON (example from report Person Registrations):

JSON
{
            "fatherName": "",
            "country": "Wales",
            "registrationStatus": "TERMINATED",
            "notes": "",
            "titleReferee": "",
            "discipline": "Football",
            "parentOrganization": "SWFA",
            "parentOrganizationId": 10003,
            "organizationId": 10068,
            "countryOfBirth": "Wales",
            "#result_id#": "1",
            "titleCoach": "",
            "tenant": "FAW",
            "lastNameINT": "",
            "zip": "CF5 6SB",
            "passportNumber": "",
            "personNameId": "Jasonn Clarke (323658)",
            "orgName": "Ely Rangers FC",
            "level": "Amateur",
            "motherName": "",
            "dateFrom": 1185494400000,
            "inStatusSince": 1539100258062,
            "firstName": "Jasonn",
            "nationality": "Wales",
            "registrationType": "Transfer",
            "personShortName": "",
            "registrationCategory": "Player",
            "personNationalID": "",
            "personId": 323658,
            "region": "South Glamorgan",
            "lastName": "Clarke",
            "gender": "Male",
            "displayName": "Jasonn Clarke",
            "uid": 25,
            "personPrivacy": "",
            "place": "Cardiff",
            "fifaid": "16YBGD0",
            "email": "jasonaclarke0@gmail.com",
            "longitudeLatitude": "51.462581634521484,-3.2860524654388428",
            "placeOfBirth": "Cardiff",
            "address": "The Summer House\nThe Downs\n",
            "titlePlayer": "",
            "photo": "https://comet-demo.faw.cymru/file?id=85ad5ba2-71d6-435e-83e5-3d9e649c8a4f",
            "dateOfBirth": -12096000000,
            "dateTo": 1214784000000,
            "regionOfBirth": "",
            "lastupdateddatetime": 1653988113754,
            "category": "",
            "registrationTermReason": "Other",
            "firstNameINT": ""
        },

Parameter changedAfter

Also, for those reports, we have created new optional query param for API called ”changedAfter”. This parameter accepts datetime (in UTC) in format YYYYMMDDHHmmSS and extracts only the records that are changed after specified changedAfter datetime parameter.

In the example below only records changed after 31 May 2022 09:00 AM UTC will be returned.

The changedAfter parameter is very useful if you want to sync data from large COMET reports with your local database on a regular basis. It allows you to only fetch those records that have been changed since the last sync, instead of always fetching all data.

Parameter uids

API calls for reports that have a defined Unique ID (from the table above) can also be filtered using that field. Filtering is done using an optional query parameter called “uids” which is a comma separated list of appropriate IDs (ex. &uids=8075816,8075824).

If the report does not have a defined Unique ID and the uids param is used an error will be returned.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.