In order to create an account, the incoming payload should be a JSON object with the following fields.
[{
"title": "This is the name of the account.",
"descr": "This is a description of the account, particularly useful for differentiating similarly named accounts",
"address_line_1": "Typical address line 1",
"address_line_2": "Typical address line 2",
"city": "The city of the account",
"geo_state": "The two letter state abbreviation",
"zip_code": "A standard zip code",
"address_full": "For addresses that don't conform to typical formats, the full address can be stored here",
"time_zone": "A valid TZ from the IANA Time Zone database (iana.org/time-zones)",
"mdr_id": "Domestic accounts should have an MDR ID",
"crm_id": "The ID for the account within RPADMIN"
}]
In order to create an building (within an account), the incoming payload should be a JSON object with the following fields.
[{
"account_id": "The myon_id of the building's account",
"title": "This is the name of the building.",
"descr": "This is a description of the building, particularly useful for differentiating similarly named buildings",
"address_line_1": "Typical address line 1",
"address_line_2": "Typical address line 2",
"city": "The city of the building",
"geo_state": "The two letter state abbreviation",
"zip_code": "A standard zip code",
"address_full": "For addresses that don't conform to typical formats, the full address can be stored here",
"time_zone": "A valid TZ from the IANA Time Zone database (iana.org/time-zones)",
"sis_id":"This is the ID of the building within the school's system",
"mdr_id": "Domestic buildings should have an MDR ID",
"crm_id": "The ID for the building within RPADMIN",
"rpid": "If the building has a license for AR Quizzes, we need this ID to link back"
}]
In order to assign a permission(s) to buildings we accept an array of permission objects
[{
"building_id":"The myon_id of the building to which the permission should be attached",
"permission_id":"The myon_id of the permission",
"start_date":"YYYY-MM-DD HH:MM:SS",
"end_date":"YYYY-MM-DD HH:MM:SS",
"active": true
}]
In order to create District and Building Admins
[{
"account_id": "The myon_id of the account to which the user should be assigned",
"building_id": "The myon_id of the building to which the user should be assigned",
"user_role_id": "Building Admins: 5; District Admins: 6",
"name_first": "The user's first name",
"name_last": "The user's last name",
"username": "This should be a system-unique & valid email",
"password": "A password to be used with the myON UI",
"email": "This should be a valid email"
}]
In all cases, the return will include the myon_id (a UUID) of the Account(s), Building(s), or User(s). In the case of permissions,
the return will be a simple confirmation. For updates to any entity, the myon_id must also be included. The active
field in
the permissions payload should be a bool. Pay attention to the HTTP status code. All payloads should be arrays even if only one entitiy is sent.