MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer Bearer YOUR_TOKEN".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Use Sanctum token for authenticated endpoints.

Documents

Upload document.

requires authentication

Upload a required document for a registration.

Example request:
curl --request POST \
    "https://api.muhammadiyahgames.online/api/registrations/16/documents" \
    --header "Authorization: Bearer Bearer YOUR_TOKEN" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "type=identity_card"\
    --form "file=@/tmp/phpfU3tWe" 
const url = new URL(
    "https://api.muhammadiyahgames.online/api/registrations/16/documents"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_TOKEN",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('type', 'identity_card');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (201):


{
    "success": true,
    "message": "Document uploaded successfully.",
    "data": {
        "id": 1,
        "type": "identity_card",
        "status": "pending"
    }
}
 

Request      

POST api/registrations/{registration_id}/documents

Headers

Authorization        

Example: Bearer Bearer YOUR_TOKEN

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

registration_id   integer     

The ID of the registration. Example: 16

Body Parameters

type   string     

Document type. Example: identity_card

file   file     

The document file (PDF, JPG, PNG). Max 2MB. Example: /tmp/phpfU3tWe

List documents for a registration.

requires authentication

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/registrations/16/documents" \
    --header "Authorization: Bearer Bearer YOUR_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/registrations/16/documents"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/registrations/{registration_id}/documents

Headers

Authorization        

Example: Bearer Bearer YOUR_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

registration_id   integer     

The ID of the registration. Example: 16

Approve document.

requires authentication

Approve a submitted document.

Example request:
curl --request PATCH \
    "https://api.muhammadiyahgames.online/api/registrations/16/documents/16/approve" \
    --header "Authorization: Bearer Bearer YOUR_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/registrations/16/documents/16/approve"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/registrations/{registration}/documents/{document_id}/approve

Headers

Authorization        

Example: Bearer Bearer YOUR_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

registration   integer     

The registration. Example: 16

document_id   integer     

The ID of the document. Example: 16

Reject document.

requires authentication

Reject a document with optional note.

Example request:
curl --request PATCH \
    "https://api.muhammadiyahgames.online/api/registrations/16/documents/16/reject" \
    --header "Authorization: Bearer Bearer YOUR_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"admin_note\": \"File is blurry.\"
}"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/registrations/16/documents/16/reject"
);

const headers = {
    "Authorization": "Bearer Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "admin_note": "File is blurry."
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/registrations/{registration}/documents/{document_id}/reject

Headers

Authorization        

Example: Bearer Bearer YOUR_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

registration   integer     

The registration. Example: 16

document_id   integer     

The ID of the document. Example: 16

Body Parameters

admin_note   string  optional    

Optional note explaining rejection. Example: File is blurry.

Endpoints

POST api/auth/login

Example request:
curl --request POST \
    "https://api.muhammadiyahgames.online/api/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"password\": \"|]|{+-\"
}"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "password": "|]|{+-"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: gbailey@example.net

password   string     

Example: |]|{+-

POST api/auth/logout

Example request:
curl --request POST \
    "https://api.muhammadiyahgames.online/api/auth/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/auth/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/auth/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/master/sports

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/master/sports" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/master/sports"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
 

{
    "success": true,
    "data": []
}
 

Request      

GET api/master/sports

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Display a listing of venues

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/venues" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/venues"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
 

[]
 

Request      

GET api/venues

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created venue

Example request:
curl --request POST \
    "https://api.muhammadiyahgames.online/api/venues" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"city\": \"n\",
    \"address\": \"g\"
}"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/venues"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "city": "n",
    "address": "g"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/venues

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

city   string  optional    

Must not be greater than 255 characters. Example: n

address   string  optional    

Must not be greater than 255 characters. Example: g

Display the specified venue

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/venues/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/venues/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
 

{
    "message": "No query results for model [App\\Models\\Venue] 16"
}
 

Request      

GET api/venues/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the venue. Example: 16

Update the specified venue

Example request:
curl --request PUT \
    "https://api.muhammadiyahgames.online/api/venues/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"city\": \"n\",
    \"address\": \"g\"
}"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/venues/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "city": "n",
    "address": "g"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/venues/{id}

PATCH api/venues/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the venue. Example: 16

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

city   string  optional    

Must not be greater than 255 characters. Example: n

address   string  optional    

Must not be greater than 255 characters. Example: g

Remove the specified venue

Example request:
curl --request DELETE \
    "https://api.muhammadiyahgames.online/api/venues/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/venues/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/venues/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the venue. Example: 16

GET api/my-contingent

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/my-contingent" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/my-contingent"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/my-contingent

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/athletes

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/athletes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/athletes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/athletes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/athletes

Example request:
curl --request POST \
    "https://api.muhammadiyahgames.online/api/athletes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contingent_id\": \"architecto\",
    \"name\": \"n\",
    \"gender\": \"male\",
    \"birth_date\": \"2026-03-13T09:00:08\"
}"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/athletes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "contingent_id": "architecto",
    "name": "n",
    "gender": "male",
    "birth_date": "2026-03-13T09:00:08"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/athletes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

contingent_id   string     

The id of an existing record in the contingents table. Example: architecto

name   string     

Must not be greater than 255 characters. Example: n

gender   string     

Example: male

Must be one of:
  • male
  • female
birth_date   string     

Must be a valid date. Example: 2026-03-13T09:00:08

GET api/athletes/{id}

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/athletes/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/athletes/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/athletes/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the athlete. Example: 16

PUT api/athletes/{id}

Example request:
curl --request PUT \
    "https://api.muhammadiyahgames.online/api/athletes/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contingent_id\": \"architecto\",
    \"name\": \"n\",
    \"gender\": \"female\",
    \"birth_date\": \"2026-03-13T09:00:08\"
}"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/athletes/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "contingent_id": "architecto",
    "name": "n",
    "gender": "female",
    "birth_date": "2026-03-13T09:00:08"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/athletes/{id}

PATCH api/athletes/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the athlete. Example: 16

Body Parameters

contingent_id   string     

The id of an existing record in the contingents table. Example: architecto

name   string     

Must not be greater than 255 characters. Example: n

gender   string     

Example: female

Must be one of:
  • male
  • female
birth_date   string     

Must be a valid date. Example: 2026-03-13T09:00:08

DELETE api/athletes/{id}

Example request:
curl --request DELETE \
    "https://api.muhammadiyahgames.online/api/athletes/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/athletes/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/athletes/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the athlete. Example: 16

GET api/teams

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/teams" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/teams"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/teams

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/teams

Example request:
curl --request POST \
    "https://api.muhammadiyahgames.online/api/teams" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contingent_id\": \"architecto\",
    \"name\": \"n\"
}"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/teams"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "contingent_id": "architecto",
    "name": "n"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/teams

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

contingent_id   string     

The id of an existing record in the contingents table. Example: architecto

name   string     

Must not be greater than 255 characters. Example: n

GET api/teams/{id}

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/teams/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/teams/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/teams/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the team. Example: 16

PUT api/teams/{id}

Example request:
curl --request PUT \
    "https://api.muhammadiyahgames.online/api/teams/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contingent_id\": \"architecto\",
    \"name\": \"n\"
}"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/teams/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "contingent_id": "architecto",
    "name": "n"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/teams/{id}

PATCH api/teams/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the team. Example: 16

Body Parameters

contingent_id   string     

The id of an existing record in the contingents table. Example: architecto

name   string     

Must not be greater than 255 characters. Example: n

DELETE api/teams/{id}

Example request:
curl --request DELETE \
    "https://api.muhammadiyahgames.online/api/teams/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/teams/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/teams/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the team. Example: 16

Store new draft registration.

Example request:
curl --request POST \
    "https://api.muhammadiyahgames.online/api/registrations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"event_id\": 1,
    \"athlete_id\": 10,
    \"team_id\": 5,
    \"notes\": \"Participant requires special equipment.\"
}"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/registrations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "event_id": 1,
    "athlete_id": 10,
    "team_id": 5,
    "notes": "Participant requires special equipment."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/registrations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

event_id   string     

ID of the event being registered. The id of an existing record in the events table. Example: 1

athlete_id   string  optional    

Athlete ID (required for individual sports). The id of an existing record in the athletes table. Example: 10

team_id   string  optional    

Team ID (required for team sports). The id of an existing record in the teams table. Example: 5

notes   string  optional    

Optional notes for the registration. Must not be greater than 500 characters. Example: Participant requires special equipment.

Display list of authenticated user's registrations.

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/registrations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/registrations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/registrations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Show single registration.

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/registrations/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/registrations/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/registrations/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the registration. Example: 16

Delete draft registration.

Example request:
curl --request DELETE \
    "https://api.muhammadiyahgames.online/api/registrations/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/registrations/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/registrations/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the registration. Example: 16

Submit registration (User).

Example request:
curl --request PATCH \
    "https://api.muhammadiyahgames.online/api/workflow/registrations/16/submit" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/workflow/registrations/16/submit"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/workflow/registrations/{registration_id}/submit

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

registration_id   integer     

The ID of the registration. Example: 16

Move registration to review (Admin).

Example request:
curl --request PATCH \
    "https://api.muhammadiyahgames.online/api/workflow/registrations/16/review" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/workflow/registrations/16/review"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/workflow/registrations/{registration_id}/review

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

registration_id   integer     

The ID of the registration. Example: 16

Approve registration (Admin).

Example request:
curl --request PATCH \
    "https://api.muhammadiyahgames.online/api/workflow/registrations/16/approve" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/workflow/registrations/16/approve"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/workflow/registrations/{registration_id}/approve

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

registration_id   integer     

The ID of the registration. Example: 16

Reject registration (Admin).

Example request:
curl --request PATCH \
    "https://api.muhammadiyahgames.online/api/workflow/registrations/16/reject" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/workflow/registrations/16/reject"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/workflow/registrations/{registration_id}/reject

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

registration_id   integer     

The ID of the registration. Example: 16

Create or update result (Admin).

Example request:
curl --request POST \
    "https://api.muhammadiyahgames.online/api/results" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"category_id\": \"architecto\"
}"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/results"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "category_id": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/results

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

category_id   string     

The id of an existing record in the categories table. Example: architecto

first_place_registration_id   string  optional    

The id of an existing record in the registrations table.

second_place_registration_id   string  optional    

The id of an existing record in the registrations table.

third_place_registration_id   string  optional    

The id of an existing record in the registrations table.

Show public result by category.

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/results/category/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/results/category/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 56
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Request      

GET api/results/category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the category. Example: architecto

GET api/schedule

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/schedule" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/schedule"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 55
access-control-allow-origin: *
 

{
    "success": true,
    "data": []
}
 

Request      

GET api/schedule

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/schedule/{id}

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/schedule/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/schedule/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 54
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Request      

GET api/schedule/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the schedule. Example: architecto

Create or update result (Admin).

Example request:
curl --request POST \
    "https://api.muhammadiyahgames.online/api/admin/results" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"category_id\": \"architecto\"
}"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/admin/results"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "category_id": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/admin/results

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

category_id   string     

The id of an existing record in the categories table. Example: architecto

first_place_registration_id   string  optional    

The id of an existing record in the registrations table.

second_place_registration_id   string  optional    

The id of an existing record in the registrations table.

third_place_registration_id   string  optional    

The id of an existing record in the registrations table.

Lock result (Admin).

Example request:
curl --request PATCH \
    "https://api.muhammadiyahgames.online/api/admin/results/16/lock" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/admin/results/16/lock"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/admin/results/{result_id}/lock

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

result_id   integer     

The ID of the result. Example: 16

Publish result (Admin).

Example request:
curl --request PATCH \
    "https://api.muhammadiyahgames.online/api/admin/results/16/publish" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/admin/results/16/publish"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/admin/results/{result_id}/publish

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

result_id   integer     

The ID of the result. Example: 16

Display paginated audit logs (Admin only).

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/admin/audit-logs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/admin/audit-logs"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/admin/audit-logs

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/stats/dashboard

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/stats/dashboard" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/stats/dashboard"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/stats/dashboard

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/ping

Example request:
curl --request GET \
    --get "https://api.muhammadiyahgames.online/api/ping" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.muhammadiyahgames.online/api/ping"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "API Working"
}
 

Request      

GET api/ping

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json