# API Documentation # API Error Codes API error codes indicate a failure while communicating with the OPS-COM API. ## Example Error *Content-Type: application/json*
`{`
`    ``"ErrorCode"``: 9001,`
`    ``"ErrorMessage"``: ``"API Token is missing from the request."`
`}`
## Error Codes
**Error Code****Error Message**
9000Client Code is missing from the request.
9001API Token is missing from the request.
9002The supplied API token does not have permission to perform that request.
9003Could not parse the request.
9004End Time is a required field.
9005The end time value is invalid.
9006Plate is a required field.
9007The start time value is invalid.
9008Reference ID is required. On a new permit push, a reference id is returned. This is required for updates and deletes.
9009Record not found.
9010The Plate Type is required.
9011The province or state is required.
9012The vehicle is already in the database.
9013A unique id is required.
9014The login source is required.
9015The login source is invalid.
9016The user e-mail is required.
9017The user's first name is required.
9018The user's last name is required.
9019The user's email address must be unique.
9020The user's username must be unique.
9021The vehicle's plate length exceeds 50 characters.
9022A record already exists with the supplied details.
9030The field's maximum number of characters was exceeded.
9031The field is required.
9032The field has a minimum number of characters.
9033The field's value is invalid.
# Permits API # Pull API: Permit Stats The OPS-COM Controller provides a simple JSON based API to integrate with. Clients use this API to gather stats on permits pushed into OPS-COM. Make sure you set the HTTP Content-Type header to be application/json. ## Making API Requests ### Raw Request:
`POST /api/OC-TOMA/v1/permits/stats HTTP/1.1`
`Host: controller.operationscommander.io`
`Accept: application/json`
`Content-Type: application/json`
`Cache-Control: no-cache`
`{`
`    ``"apiToken": "YOUR-API-TOKEN",`
`    ``"zones": "NOT-REQUIRED--LIST-OF-ZONES"`
`}`
### JavaScript Request
`var` `request = ``new` `XMLHttpRequest();`
`request.open(``'POST'``, ``'https://controller.operationscommander.io/api/OC-TOMA/v1/permits/stats'``);`
`request.setRequestHeader(``'Content-Type'``, ``'application/json'``);`
`request.setRequestHeader(``'Accept'``, ``'application/json'``);`
`request.onreadystatechange = ``function` `() {`
`  ``if` `(``this``.readyState === 4) {`
`    ``console.log(``'Status:'``, ``this``.status);`
`    ``console.log(``'Headers:'``, ``this``.getAllResponseHeaders());`
`    ``console.log(``'Body:'``, ``this``.responseText);`
`  ``}`
`};`
`var` `body = {`
`    ``"apiToken"``: ``"YOUR-API-TOKEN"``,`
`    ``"zones"``: ``"Lot 01,Lot 02"`
`}`
`request.send(JSON.stringify(body));`
## Request Object Attributes
**Attribute** **Type** **Limits** **Possible Names** **Description**
apiTokenString50-character alphanumeric including dashes apiToken**(Required)** Your supplied API Token.
zones StringListed zones match zone names in databasezones **(Not Required)** Comma delimited list of zones e.g. zone1,zone2,Lot 03,Red Lot,Street parking
## Successful Response The response will be a json object. The same reference id will be returned. *Content-Type: application/json*
`{`
`    ``"data"``: [`
`        ``{`
`            ``"type"``: ``"standard"``,`
`            ``"zone"``: ``"zone1"``,`
`            ``"total"``: ``"4"`
`        ``},`
`        ``{`
`            ``"type"``: ``"temp"``,`
`            ``"zone"``: ``"zone1"``,`
`            ``"total"``: ``"35"`
`        ``},`
`   ``:`
`   ``:`
`}`
# Push API: Permit Delete The OPS-COM Controller provides a simple JSON based API to integrate with. Clients use this API to directly feed details about existing paid permits and their changes into OPS-COM from other systems such as Parking apps. Make sure you set the HTTP Content-Type header to be application/json. ## Making API Requests ### Raw Request:
`POST /api/OC-TOMA/v1/permits/delete HTTP/1.1`
`Host: controller.operationscommander.io`
`Accept: application/json`
`Content-Type: application/json`
`Cache-Control: no-cache`
`{`
`    ``"apiToken": "YOUR-API-TOKEN",`
`    ``"referenceID": "PREVIOUS-REFERENCE-ID"`
`}`
### JavaScript Request:
`var` `request = ``new` `XMLHttpRequest();`
`request.setRequestHeader(``'Content-Type'``, ``'application/json'``);`
`request.setRequestHeader(``'Accept'``, ``'application/json'``);`
`request.onreadystatechange = ``function` `() {`
`  ``if` `(``this``.readyState === 4) {`
`    ``console.log(``'Status:'``, ``this``.status);`
`    ``console.log(``'Headers:'``, ``this``.getAllResponseHeaders());`
`    ``console.log(``'Body:'``, ``this``.responseText);`
`  ``}`
`};`
`var` `body = {`
`    ``"apiToken"``: ``"YOUR-API-TOKEN"``,`
`    ``"referenceID"``: ``"PREVIOUS-REFERENCE-ID"`
`}`
`request.send(JSON.stringify(body));`
## Request Object Attributes
**Attribute****Type** **Limits** **Possible Names** **Description**
apiTokenString50-character alphanumeric including dashes apiToken**(Required)** Your supplied API Token.
Reference ID String50-character alphanumeric including dashesreferenceid referenceID reference\_id **(Required)** This value is supplied to when the permit push api is successful. e.g. 1a9b5375-cb75-4c71-9939-eeae550b09ac
## Successful Response The response will be a json object. The same reference id will be returned. *Content-Type: application/json*
`{`
`    ``"status"``: ``"success"``,`
`    ``"reference_id"``: ``"1a9b5375-cb75-4c71-9939-eeae550b09ac"``,`
`    ``"InternalReferenceID"``: ``"1a9b5375-cb75-4c71-9939-eeae550b09ac"`
`}`
# Push API: Permit Create The OPS-COM Controller provides a simple JSON based API to integrate with. Clients use this API to directly feed paid permit details into OPS-COM from other systems such as Parking Meters. Any permit types whether Validator, Temporary or Standard can be feed to OPS-COM using this API Make sure you set the HTTP Content-Type header to be application/json. ## Making API Requests ### Raw Request:
`POST /api/OC-TOMA/v1/permits/push HTTP/1.1`
`Host: controller.operationscommander.io`
`Accept: application/json`
`Content-Type: application/json`
`Cache-Control: no-cache`
`{`
`    ``"apiToken": "YOUR-API-TOKEN",`
`    ``"Amount": "14.50",`
`    ``"CurrencyID": "CAD",`
`    ``"LicencePlate": "PL8RDR",`
`    ``"zone": "Lot 4",`
`    ``"permitNo": "L4-1138",`
`    ``"startTime": "2018-07-02T09:00:00",`
`    ``"endTime": "2018-07-02T09:30:00"`
`}`
### JavaScript Request:
`var` `request = ``new` `XMLHttpRequest();`
`request.setRequestHeader(``'Content-Type'``, ``'application/json'``);`
`request.setRequestHeader(``'Accept'``, ``'application/json'``);`
`request.onreadystatechange = ``function` `() {`
`  ``if` `(``this``.readyState === 4) {`
`    ``console.log(``'Status:'``, ``this``.status);`
`    ``console.log(``'Headers:'``, ``this``.getAllResponseHeaders());`
`    ``console.log(``'Body:'``, ``this``.responseText);`
`  ``}`
`};`
`var` `body = {`
`    ``"apiToken"``: ``"YOUR-API-TOKEN"``,`
`    ``"Amount"``: ``"14.50"``,`
`    ``"CurrencyID"``: ``"CAD"``,`
`    ``"LicencePlate"``: ``"PL8RDR"``,`
`    ``"zone"``: ``"Lot 4"``,`
`    ``"permitNo"``: ``"L4-1138"``,`
`    ``"startTime"``: ``"2018-07-02T09:00:00"``,`
`    ``"endTime"``: ``"2018-07-02T09:30:00"`
`}`
`request.send(JSON.stringify(body));`
## Request Object Attributes
AttributeTypeLimitsPossible NamesDescription
apiTokenString50-character alphanumeric including dashes apiToken**(Required)** Your supplied API Token.
AmountString9-character decimalamount Amount *(Optional)* Transaction amount This must contain at least 3 digits, two of which are penny values. The minimum allowable value is $0.01, and the maximum allowable value is $999999.99.
CurrencyString10-characterscurrency CurrencyID *(Optional)* CAD, USD
Start Date String20-characters Y-m-d\\TH:i:s format. startTime StartDateUtc **(Required)** Must be in the format of Y-m-d\\TH:i:s e.g. 2000-05-30T14:38:22 For formatting help, see [PHP Date Formatting](http://php.net/manual/en/function.date.php)
End DateString20-characters Y-m-d\\TH:i:s format. endTime EndDateUtc **(Required)** Must be in the format of Y-m-d\\TH:i:s e.g. 2000-05-30T14:38:22 For formatting help, see [PHP Date Formatting](http://php.net/manual/en/function.date.php)
License PlateString25-charactersplate LicencePlate **(Required)** The plate of the vehicle.
Ticket NumberString50-characterspermitNo TicketNumber *(Optional)*
Zone NameString200-characterszone ParkingZoneName *(Optional)* If the zone does not match a zone in our system, it will be a disconnected record and may not report properly.
## Successful Response The response will be a json object. Content-Type: application/json
`{`
`    ``"status"``: ``"success"``,`
`    ``"reference_id"``: ``"1a9b5375-cb75-4c71-9939-eeae550b09ac"``,`
`    ``"InternalReferenceID"``: ``"1a9b5375-cb75-4c71-9939-eeae550b09ac"`
`}`
# Push API: Permit Update The OPS-COM Controller provides a simple JSON based API to integrate with. Clients use this API to directly feed paid permit details into OPS-COM from other systems such as Parking Apps. Make sure you set the HTTP Content-Type header to be application/json. ## Making API Requests ### Raw Request:
`POST /api/OC-TOMA/v1/permits/update HTTP/1.1`
`Host: controller.operationscommander.io`
`Accept: application/json`
`Content-Type: application/json`
`Cache-Control: no-cache`
`{`
`    ``"apiToken": "YOUR-API-TOKEN",`
`    ``"referenceID": "PREVIOUS-REFERENCE-ID",`
`    ``"plate": "PL8RDR",`
`    ``"Amount": "14.50",`
`    ``"currency": "CAD",`
`    ``"endTime": "2018-07-02T09:30:00"`
`}`
### JavaScript Request:
`var` `request = ``new` `XMLHttpRequest();`
`request.setRequestHeader(``'Content-Type'``, ``'application/json'``);`
`request.setRequestHeader(``'Accept'``, ``'application/json'``);`
`request.onreadystatechange = ``function` `() {`
`  ``if` `(``this``.readyState === 4) {`
`    ``console.log(``'Status:'``, ``this``.status);`
`    ``console.log(``'Headers:'``, ``this``.getAllResponseHeaders());`
`    ``console.log(``'Body:'``, ``this``.responseText);`
`  ``}`
`};`
`var` `body = {`
`    ``"apiToken"``: ``"YOUR-API-TOKEN"``,`
`    ``"referenceID"``: ``"PREVIOUS-REFERENCE-ID"``,`
`    ``"plate"``: ``"PL8RDR"``,`
`    ``"Amount"``: ``"14.50"``,`
`    ``"currency"``: ``"CAD"``,`
`    ``"endTime"``: ``"2018-07-02T09:30:00"`
`}`
`request.send(JSON.stringify(body));`
## Request Object Attributes
AttributeTypeLimitsPossible NamesDescription
apiTokenString50-character alphanumeric including dashes apiToken**(Required)** Your supplied API Token.
Reference ID String50-character alphanumeric including dashesreferenceid referenceID reference\_id **(Required)** This value is supplied to when the permit push api is successful. e.g. 1a9b5375-cb75-4c71-9939-eeae550b09ac
End DateString20-characters Y-m-d\\TH:i:s format. endTime EndDateUtc *(Optional)* Must be in the format of Y-m-d\\TH:i:s e.g. 2000-05-30T14:38:22 For formatting help, see [PHP Date Formatting](http://php.net/manual/en/function.date.php)
License PlateString25-charactersplate LicencePlate *(Optional)* The plate of the vehicle.
AmountString9-character decimalamount Amount *(Optional)* Transaction amount This must contain at least 3 digits, two of which are penny values. The minimum allowable value is $0.01, and the maximum allowable value is $999999.99.
CurrencyString10-characterscurrency CurrencyID *(Optional)* CAD, USD
## Successful Response The response will be a json object. The same reference id will be returned. Content-Type: application/json
`{`
`    ``"status"``: ``"success"``,`
`    ``"reference_id"``: ``"1a9b5375-cb75-4c71-9939-eeae550b09ac"``,`
`    ``"InternalReferenceID"``: ``"1a9b5375-cb75-4c71-9939-eeae550b09ac"`
`}`
# Push API: Vehicle Create The OPS-COM Controller provides a simple JSON based API to integrate with. Clients use this API to directly feed vehicles into OPS-COM from other systems. Make sure you set the HTTP Content-Type header to be application/json. ## Making API Requests ### Raw Request:
`POST /api/OC_TOMA/v1/vehicles/push HTTP/1.1`
`Host: controller.operationscommander.io`
`Accept: application/json`
`Content-Type: application/json`
`Cache-Control: no-cache`
`{`
`    ``"apiToken": "YOUR-API-TOKEN",`
`    ``"plate": "PL8RDR",`
`    ``"plateType": "Motorcycle",`
`    ``"prov": "MA",`
`    ``"make": "8",`
`    ``"type": "3",`
`    ``"colour": "red",`
`    ``"year": "2011",`
`    ``"vin": "8GKS1AKC7FR518845"`
`}`
### JavaScript Request:
`var` `request = ``new` `XMLHttpRequest();`
`request.setRequestHeader(``'Content-Type'``, ``'application/json'``);`
`request.setRequestHeader(``'Accept'``, ``'application/json'``);`
`request.onreadystatechange = ``function` `() {`
`  ``if` `(``this``.readyState === 4) {`
`    ``console.log(``'Status:'``, ``this``.status);`
`    ``console.log(``'Headers:'``, ``this``.getAllResponseHeaders());`
`    ``console.log(``'Body:'``, ``this``.responseText);`
`  ``}`
`};`
`var` `body = {`
`    ``"apiToken"``: ``"YOUR-API-TOKEN"``,`
`    ``"plate"``: ``"PL8RDR"``,`
`    ``"plateType"``: ``"Motorcycle"``,`
`    ``"prov"``: ``"MA"``,`
`    ``"make"``: ``"kia"``,`
`    ``"type"``: ``"commercial"``,`
`    ``"colour"``: ``"red"``,`
`    ``"year"``: ``"2021"``,`
`    ``"vin"``: ``"8GKS1AKC7FR518845"`
`}`
`request.send(JSON.stringify(body));`
## Request Object Attributes
AttributeTypeLimitsPossible NamesDescription
apiTokenString50-character alphanumeric including dashes. apiToken**(Required)** Your supplied API Token.
plateString50-character alphanumeric.plate **(Required)** The license plate.
plateTypeIDStringThe ID of the VechiclePlateType record. plateTypeID**(One of plateTypeID or plateType is required)** Your supplied VehiclePlateType identifier.
plateTypeString50-character alphanumeric including dashes. plateType**(One of plateTypeID or plateType is required)** The name of the plate type.
provIDStringThe ID of the state/province. provID**(One of provID or prov is required)** Your supplied state or province identifier.
provString50-character alphanumeric including dashes prov**(One of provID or prov is required)** The full name of the state/province or the corresponding postal abbreviation.
makeIDStringThe ID of the vehicle make. makeID*(Optional) Your supplied vehicle make identifier.*
makeString50-character alphanumeric including dashesmake *(Optional)* The name of the vehicle manufacturer.
typeIDStringThe ID of the vehicle type. typeID*(Optional) Your supplied vehicle type identifier.*
typeString50-character alphanumeric including dashes type*(Optional) The name of the type of vehicle that you provided.*
colourIDStringThe ID of the vehicle colour.colourID*(Optional) Your supplied vehicle colour identifier.*
colour String50-character alphanumeric including dashes colour *(Optional) The name of a colour that you have provided..*
yearString4 digit year. year *(Optional) The model year.*
vinString25-charactersvin *(Optional) The vehicle identification number.*
## Successful Response The response will be a json object. Content-Type: application/json
`{`
`    ``"status"``: ``"success"``,`
`    ``"vehicle_id_id"``: ``"158"``,`
`    ``"warnings"``:[``"The vehicle colour name was too long and has been truncated."``]`
`}`
# Pull API: UserType The OPS-COM Controller provides a simple JSON based API to integrate with. Clients use this API to obtain a list of the current profile user types in their system. Make sure you set the HTTP Content-Type header to be application/json. ## Making API Requests ### Raw Request:
`POST /api/OC_TOMA/v1/profiles/types/list HTTP/1.1`
`Host: controller.operationscommander.io`
`Accept: application/json`
`Content-Type: application/json`
`Cache-Control: no-cache`
`{`
`    ``"apiToken": "YOUR-API-TOKEN",`
`}`
### JavaScript Request:
`var` `request = ``new` `XMLHttpRequest();`
`request.setRequestHeader(``'Content-Type'``, ``'application/json'``);`
`request.setRequestHeader(``'Accept'``, ``'application/json'``);`
`request.onreadystatechange = ``function` `() {`
`  ``if` `(``this``.readyState === 4) {`
`    ``console.log(``'Status:'``, ``this``.status);`
`    ``console.log(``'Headers:'``, ``this``.getAllResponseHeaders());`
`    ``console.log(``'Body:'``, ``this``.responseText);`
`  ``}`
`};`
`var` `body = {`
`    ``"apiToken"``: ``"YOUR-API-TOKEN"`
`}`
`request.send(JSON.stringify(body));`
## Request Object Attributes
AttributeTypeLimitsPossible NamesDescription
apiTokenString50-character alphanumeric including dashes. apiToken**(Required)** Your supplied API Token.
## Successful Response The response will be a json object. Content-Type: application/json
`{`
`    ``"status"``: ``"success"``,`
`    ``"user_types"``: [`
`        ``{`
`            ``"id"``: ``"1"``,`
`            ``"type_name"``: ``"Full Time Student"``,`
`            ``"ext_info"``: ``"Student"`
`        ``},`
`        ``{`
`            ``"id"``: ``"6"``,`
`            ``"type_name"``: ``"Demo"``,`
`            ``"ext_info"``: ``"Public"`
`        ``},`
`        ``{`
`            ``"id"``: ``"7"``,`
`            ``"type_name"``: ``"Full Time Staff"``,`
`            ``"ext_info"``: ``"Staff"`
`        ``},`
`        ``{`
`            ``"id"``: ``"8"``,`
`            ``"type_name"``: ``"Part Time Staff"``,`
`            ``"ext_info"``: ``"Staff"`
`        ``},`
`        ``{`
`            ``"id"``: ``"9"``,`
`            ``"type_name"``: ``"Part Time Student"``,`
`            ``"ext_info"``: ``"Student"`
`        ``},`
`        ``{`
`            ``"id"``: ``"10"``,`
`            ``"type_name"``: ``"Exchange Student"``,`
`            ``"ext_info"``: ``"Student"`
`        ``},`
`        ``{`
`            ``"id"``: ``"11"``,`
`            ``"type_name"``: ``"Athletics Member"``,`
`            ``"ext_info"``: ``"Athletics"`
`        ``},`
`        ``{`
`            ``"id"``: ``"12"``,`
`            ``"type_name"``: ``"Complimentary"``,`
`            ``"ext_info"``: ``"Public"`
`        ``},`
`        ``{`
`            ``"id"``: ``"13"``,`
`            ``"type_name"``: ``"Daily Reserved"``,`
`            ``"ext_info"``: ``"Public"`
`        ``}`
`    ``]`
`}`
# Push API: User Create/Update The OPS-COM Controller provides a simple JSON based API to integrate with. Clients use this API to push to OPS-COM new users and update existing users directly from another system. For example, you may wish to push Student and Staff information from Banner directly to OPS-COM. Make sure you set the HTTP Content-Type header to be application/json. ## Making API Requests ### Raw Request:
`POST /api/OC_TOMA/v1/profiles/push HTTP/1.1`
`Host: controller.operationscommander.io`
`Accept: application/json`
`Content-Type: application/json`
`Cache-Control: no-cache`
`{`
`    ``"apiToken": "YOUR-API-TOKEN",`
`    ``"unique_id": "tester23",`
`    ``"login_source": "OPSCOM",`
`    ``"first_name":"firstname",`
`    ``"last_name":"lastname",`
`    ``"user_name":"username",`
`    ``"email":"test@test.com",`
`    ``"street":"123 Main Street, 123 Main Street,123 Main Street,123 Main Street,123 Main Street,123 Main Street",`
`    ``"city":"Everywhere",`
`    ``"province":"bc",`
`    ``"state":"NY",`
`    ``"postal_code":"HOHOHO",`
`    ``"zip":"12345-1212",`
`    ``"street2":"123 General Street",`
`    ``"city2":"Somewhere",`
`    ``"province2":"AB",`
`    ``"state2":"MA",`
`    ``"postal_code2":"A9A9A9",`
`    ``"zip2":"54321-1212",`
`    ``"phone_cell":"613-555-1212",`
`    ``"user_type_id":"6",`
`    ``"employ_no":"employee number: default",`
`    ``"employee_phone":"emp ph. klondike 555",`
`    ``"student_no":"SN 543209854",`
`    ``"student_phone":"999",`
`    ``"driver_licence_num":"QC 99999999",`
`    ``"driver_license_num":"NYNY",`
`    ``"date_of_birth":"1901-01-31",`
`    ``"locker_user_type_id":"3",`
`    ``"driver_licence_prov":"BC",`
`    ``"driver_license_state":"CA"`
`}`
### JavaScript Request:
`var` `request = ``new` `XMLHttpRequest();`
`request.setRequestHeader(``'Content-Type'``, ``'application/json'``);`
`request.setRequestHeader(``'Accept'``, ``'application/json'``);`
`request.onreadystatechange = ``function` `() {`
`  ``if` `(``this``.readyState === 4) {`
`    ``console.log(``'Status:'``, ``this``.status);`
`    ``console.log(``'Headers:'``, ``this``.getAllResponseHeaders());`
`    ``console.log(``'Body:'``, ``this``.responseText);`
`  ``}`
`};`
`var` `body = {`
`    ``"apiToken"``: ``"YOUR-API-TOKEN"``,`
`    ``"unique_id"``: ``"tester23"``,`
`    ``"login_source"``: ``"OPSCOM"``,`
`    ``"first_name"``:``"firstname"``,`
`    ``"last_name"``:``"lastname"``,`
`    ``"user_name"``:``"username"``,`
`    ``"email"``:``"test@test.com"``,`
`    ``"street"``:``"123 Main Street, 123 Main Street,123 Main Street,123 Main Street,123 Main Street,123 Main Street"``,`
`    ``"city"``:``"Everywhere"``,`
`    ``"province"``:``"bc"``,`
`    ``"state"``:``"NY"``,`
`    ``"postal_code"``:``"HOHOHO"``,`
`    ``"zip"``:``"12345-1212"``,`
`    ``"street2"``:``"123 General Street"``,`
`    ``"city2"``:``"Somewhere"``,`
`    ``"province2"``:``"AB"``,`
`    ``"state2"``:``"MA"``,`
`    ``"postal_code2"``:``"A9A9A9"``,`
`    ``"zip2"``:``"54321-1212"``,`
`    ``"phone_cell"``:``"613-555-1212"``,`
`    ``"user_type_id"``:``"6"``,`
`    ``"employ_no"``:``"employee number: default"``,`
`    ``"employee_phone"``:``"emp ph. klondike 555"``,`
`    ``"student_no"``:``"SN 543209854"``,`
`    ``"student_phone"``:``"999"``,`
`    ``"driver_licence_num"``:``"QC 99999999"``,`
`    ``"driver_license_num"``:``"NYNY"``,`
`    ``"date_of_birth"``:``"1901-01-31"``,`
`    ``"locker_user_type_id"``:``"3"``,`
`    ``"driver_licence_prov"``:``"BC"``,`
`    ``"driver_license_state"``:``"CA"`
`}`
`request.send(JSON.stringify(body));`
## Request Object Attributes
AttributeTypeLimitsPossible NamesDescription
apiTokenString50-character alphanumeric including dashes. apiToken**(Required)** Your supplied API Token.
Unique IDString50-character alphanumeric including dashes.unique\_id**(Required)** An unique identification number of the user.
Login SourceString20-character alphanumeric including dashes.login\_source**(Required)** Your supplied login source.
First NameString50-character alphanumeric including dashes.first\_name*(Optional)* User's first name.
Last NameString50-character alphanumeric including dashes.last\_name*(Optional)* User's last name.
User NameString50-character alphanumeric including dashes.user\_name*(Optional)* Unique username.
EmailString100-character alphanumeric including dashes.email*(Optional)* Valid email address .
Street - address 1String street*(Optional) User's primary street number and name.*
City - address 1String50-character alphanumeric including dashes.city*(Optional) User's primary city name.*
Province - address 1String2-character postal abbreviation eg. "MA"province, state *(Optional) User's primary province or state.*
Postal Code - address 1String20-character alphanumeric including dashes.postal\_code, zip *(Optional) User's primary postal code or zip.*
Street - address 2String20-character alphanumeric including dashes.street2*(Optional) User's alternate street number and name.*
City - address 2String50-character alphanumeric including dashes.city2*(Optional) User's alternate city name.*
Province - address 2String2-character postal abbreviation eg. "MA"province2, state2 *(Optional) User's alternate province or state.*
Postal\_Code - address 2String20-character alphanumeric including dashes.postal\_code2, zip2 *(Optional) User's alternate postal code or zip.*
Cell phone numberString20-character alphanumeric including dashes.phone\_cell*(Optional) User's cell phone number*
User Type IDStringId number of UserTypeuser\_type\_id*(Optional) A reference number to the type of user.*
Employee NumberString50-character alphanumeric including dashes.employ\_no*(Optional) User's employee number.*
Employee phone numberString50-character alphanumeric including dashes.employee\_phone*(Optional) User's employee phone number.*
Student numberString50-character alphanumeric including dashes.student\_no*(Optional) User's student number.*
Student phone numberString50-character alphanumeric including dashes.student\_phone*(Optional) User's student phone number.*
Driver licence numberString255-character alphanumeric including dashes.driver\_licence\_num, driver\_license\_num *(Optional) User's driver's licence number or driver's license number.*
Date of BirthString10-character date in format 'yyyy-mm-dd'date\_of\_birth*(Optional) User's date of birth in format "YYYY-MM-DD.*
Locker User Type IDStringId number of LockerUserTypelocker\_user\_type\_id*(Optional) A reference the the user's locker type id of the user.*
Driver's licence provinceString2-character postal abbreviation eg. "MA"driver\_licence\_prov, driver\_license\_state *(Optional) The province or state of the user's driver's licence.*
## Successful Response The response will be a json object. Content-Type: application/json
`{`
`    ``"status"``: ``"success"``,`
`    ``"reference_id"``: 44`
`}`
# Pull API: Overdue Violations The OPS-COM Controller provides a simple JSON based API to integrate with. Clients use this API to export a list of the currently overdue violations, which are then marked as having been sent to collections. Make sure you set the HTTP Content-Type header to be application/json. # Information When accessed, this API will send all overdue violations that have not been sent to collections yet in a JSON object. It will also mark them as having been sent to collections, so subsequent calls to the API will not get the same information more than once. This is a POST request. Data is being posted to the server. **POST** **/api/{client}/v1/violations/send\_overdue\_to\_collections** **Sample Request - All Params** /api/OC\_TOMA/v1/violations/send\_overdue\_to\_collections # Making API Requests ### Raw Request:
`POST /api/OC_TOMA/v1/violations/send_overdue_to_collections HTTP/1.1`
`Host: controller.operationscommander.io`
`Accept: application/json`
`Content-Type: application/json`
`Cache-Control: no-cache`
`{`
`    ``"apiToken": "YOUR-API-TOKEN",`
`}`
### JavaScript Request:
`var` `request = ``new` `XMLHttpRequest();`
`request.setRequestHeader(``'Content-Type'``, ``'application/json'``);`
`request.setRequestHeader(``'Accept'``, ``'application/json'``);`
`request.onreadystatechange = ``function` `() {`
`  ``if` `(``this``.readyState === 4) {`
`    ``console.log(``'Status:'``, ``this``.status);`
`    ``console.log(``'Headers:'``, ``this``.getAllResponseHeaders());`
`    ``console.log(``'Body:'``, ``this``.responseText);`
`  ``}`
`};`
`var` `body = {`
`    ``"apiToken"``: ``"YOUR-API-TOKEN"`
`}`
`request.send(JSON.stringify(body));`
# Request Object Attributes
AttributeTypeLimitsPossible NamesDescription
apiTokenString50-character alphanumeric including dashes. apiToken**(Required)** Your supplied API Token.
# Successful Response The response will be a JSON object. Content-Type: application/json
`{`
`  ``"records"``: [`
`    ``{`
`      ``"ViolationID"``: 9,`
`      ``"SemPermitID"``: 0,`
`      ``"Ticket"``: ``"1-100013"``,`
`      ``"VehicleID"``: 8,`
`      ``"Spoiled"``: 0,`
`      ``"TicketType"``: 2,`
`      ``"Issued"``: ``"2016-05-03T20:00:00.000000Z"``,`
`      ``"convNotice"``: ``null``,`
`      ``"Due"``: ``"2016-05-23T20:00:00.000000Z"``,`
`      ``"ViolationTypeID"``: -1,`
`      ``"Fine"``: 50,`
`      ``"AdjustedFine"``: 0,`
`      ``"Towing"``: 0,`
`      ``"taxAmount"``: ``"0.0000"``,`
`      ``"Writer"``: 8,`
`      ``"LocationID"``: 6,`
`      ``"Comment"``: ``null``,`
`      ``"TicketAppeal"``: ``null``,`
`      ``"appealType"``: 0,`
`      ``"appealFormat"``: ``null``,`
`      ``"AccessAdminID"``: 7,`
`      ``"ActionedPer"``: ``null``,`
`      ``"Created"``: ``"2020-10-15T20:13:24.000000Z"``,`
`      ``"AppealUserID"``: 0,`
`      ``"AppealProcessDate"``: ``null``,`
`      ``"AppealAdminID"``: 0,`
`      ``"AppealComment"``: ``null``,`
`      ``"AppealAdminComment"``: ``null``,`
`      ``"AutoNotice"``: 2,`
`      ``"ProcessedByCollection"``: ``null``,`
`      ``"SentToCollections"``: ``null``,`
`      ``"PrivateComments"``: ``null``,`
`      ``"DriveAway"``: 0,`
`      ``"UUID"``: ``"d9a1c8bb-4ed1-411e-91b1-0b63ba52e04d"``,`
`      ``"VioNotice"``: ``null``,`
`      ``"latitude"``: ``null``,`
`      ``"longitude"``: ``null``,`
`      ``"Warning"``: ``null``,`
`      ``"userid"``: ``null``,`
`      ``"incidentID"``: ``null``,`
`      ``"failToIdentify"``: ``null``,`
`      ``"pin"``: ``null``,`
`      ``"duplicate"``: ``null``,`
`      ``"AdjustmentReason"``: ``null``,`
`      ``"user"``: ``null``,`
`      ``"vehicle"``: {`
`        ``"VehicleID"``: 8,`
`        ``"Active"``: 1,`
`        ``"lastUpdate"``: ``"2020-10-15T20:13:03.000000Z"``,`
`        ``"Plate"``: ``"AJNR123"``,`
`        ``"PlateTypeID"``: 4,`
`        ``"ProvID"``: 9,`
`        ``"MakeID"``: 13,`
`        ``"TypeID"``: 5,`
`        ``"ColourID"``: 14,`
`        ``"Year"``: 2006,`
`        ``"TotalVio"``: 0,`
`        ``"TotalUnpaid"``: 0,`
`        ``"TotalWarning"``: 0,`
`        ``"created"``: ``"2020-10-15T20:13:03.000000Z"``,`
`        ``"externallookupdate"``: ``null``,`
`        ``"externallookupRequestID"``: ``null``,`
`        ``"modified"``: ``"2022-03-16T21:36:09.000000Z"``,`
`        ``"vehicleAlert"``: ``null``,`
`        ``"vin"``: ``null``,`
`        ``"drivers"``: [`
`          ``{`
`            ``"UserID"``: 73,`
`            ``"enabled"``: ``null``,`
`            ``"salutation"``: ``"Dr."``,`
`            ``"firstName"``: ``"stephen_14Oct_1114"``,`
`            ``"middleName"``: ``null``,`
`            ``"lastName"``: ``"stephen_14Oct_1114"``,`
`            ``"username"``: ``"stephen_14Oct_1114"``,`
`            ``"email"``: ``"stephen_14Oct_1114@test"``,`
`            ``"street"``: ``"1234 Main Street"``,`
`            ``"city"``: ``"Ottawa"``,`
`            ``"prov"``: 9,`
`            ``"postal"``: ``"H0H0H0"``,`
`            ``"street2"``: ``null``,`
`            ``"city2"``: ``null``,`
`            ``"prov2"``: ``null``,`
`            ``"postal2"``: ``null``,`
`            ``"phonecell"``: ``"6135551212"``,`
`            ``"status"``: 1,`
`            ``"UserTypeID"``: 7,`
`            ``"employNo"``: ``"staff12341115"``,`
`            ``"deptNameID"``: ``null``,`
`            ``"ePhone"``: ``null``,`
`            ``"staffFacultyFlag"``: 0,`
`            ``"studentNo"``: ``null``,`
`            ``"sPhone"``: ``null``,`
`            ``"sPhone2"``: ``null``,`
`            ``"lastUpdated"``: ``"2022-08-29T21:31:12.000000Z"``,`
`            ``"created"``: ``"2020-10-15T20:12:57.000000Z"``,`
`            ``"privateComment"``: ``null``,`
`            ``"publicComment"``: ``null``,`
`            ``"DLNum"``: ``"DL 123451114"``,`
`            ``"DOB"``: ``"2020-10-14T04:00:00.000000Z"``,`
`            ``"StaffMailPermit"``: 0,`
`            ``"ExtendedID"``: ``null``,`
`            ``"UserUUID"``: ``"42c5d253-2f06-4ab6-9090-969333c25da6"``,`
`            ``"CampusBox"``: ``null``,`
`            ``"newEmail"``: ``null``,`
`            ``"ReadOnlyUserID"``: ``null``,`
`            ``"studentNo_int"``: ``null``,`
`            ``"employNo_int"``: ``null``,`
`            ``"StuCampusLocation"``: ``null``,`
`            ``"EmpCampusLocation"``: ``null``,`
`            ``"MailPermitTo"``: ``"Permanent Mailing Address"``,`
`            ``"isCloudAccount"``: ``null``,`
`            ``"lastSelfUpdated"``: ``null``,`
`            ``"emailConsent"``: ``null``,`
`            ``"T2P_reminders"``: ``null``,`
`            ``"reminderTime"``: ``null``,`
`            ``"lockerUserTypeID"``: ``null``,`
`            ``"encid"``: ``"A063AA9AC458DA5581FC777ADC9875FF"``,`
`            ``"preferredname"``: ``null``,`
`            ``"plateAlert"``: 0,`
`            ``"peopleAlert"``: 0,`
`            ``"salt"``: ``"85cf3dbb-54de-48e3-a2d1-0b312dd4cea8"``,`
`            ``"forcePasswordChange"``: 1,`
`            ``"lastpasswordchange"``: ``null``,`
`            ``"DLprov"``: 66,`
`            ``"loginSource"``: ``"OPSCOM"``,`
`            ``"company_id"``: ``null``,`
`            ``"taxexemption"``: ``null``,`
`            ``"company_manager"``: ``null``,`
`            ``"receives_invoice"``: ``null``,`
`            ``"account_number"``: ``null``,`
`            ``"company_bill_recipient"``: ``null``,`
`            ``"kais_employer"``: ``null``,`
`            ``"kais_building"``: ``null``,`
`            ``"kais_supervisor_name"``: ``null``,`
`            ``"kais_supervisor_title"``: ``null``,`
`            ``"register_token"``: ``null``,`
`            ``"api_token"``: ``null``,`
`            ``"modified"``: ``"2022-08-29T21:36:24.000000Z"``,`
`            ``"bambora_customer_code"``: ``null``,`
`            ``"language"``: ``"fr"``,`
`            ``"preferred_communication_method"``: ``null``,`
`            ``"laravel_through_key"``: 8`
`          ``}`
`        ``],`
`        ``"make"``: {`
`          ``"MakeID"``: 13,`
`          ``"MakeName"``: ``"Chevrolet"``,`
`          ``"modified"``: ``"2020-10-15T20:13:11.000000Z"`
`        ``},`
`        ``"colour"``: {`
`          ``"ColourID"``: 14,`
`          ``"ColourName"``: ``"Red"``,`
`          ``"ColourKey"``: ``null``,`
`          ``"modified"``: ``"2020-10-15T20:13:08.000000Z"`
`        ``},`
`        ``"vehicle_type"``: {`
`          ``"TypeID"``: 5,`
`          ``"TypeName"``: ``"Compact"``,`
`          ``"modified"``: ``"2020-10-15T20:13:13.000000Z"`
`        ``},`
`        ``"plate_type"``: {`
`          ``"TypeID"``: 4,`
`          ``"TypeName"``: ``"Passenger"``,`
`          ``"modified"``: ``"2022-04-15T20:58:56.000000Z"``,`
`          ``"typeCode"``: ``"passenger"`
`        ``},`
`        ``"province"``: {`
`          ``"ProvID"``: 9,`
`          ``"ProvName"``: ``"Ontario"``,`
`          ``"Country"``: 1,`
`          ``"ProvCode"``: ``"ON"``,`
`          ``"modified"``: ``"2022-08-30T21:54:10.000000Z"``,`
`          ``"payments"``: 1`
`        ``}`
`      ``},`
`      ``"location"``: {`
`        ``"LocationID"``: 6,`
`        ``"LocationName"``: ``"Downtown Business District"``,`
`        ``"WriterVisible"``: 1,`
`        ``"GisNo"``: 0,`
`        ``"modified"``: ``"2020-10-15T20:04:19.000000Z"`
`      ``},`
`      ``"details"``: [`
`        ``{`
`          ``"ViolationsDetailID"``: 10,`
`          ``"ViolationID"``: 9,`
`          ``"Ticket"``: ``"1-100013"``,`
`          ``"ViolationTypeID"``: 9,`
`          ``"LocationID"``: 6,`
`          ``"offenceFine"``: 50,`
`          ``"discountFlag"``: 1,`
`          ``"discountAmount"``: 10,`
`          ``"discountHours"``: 168,`
`          ``"created"``: ``"2020-10-15T20:13:33.000000Z"``,`
`          ``"type"``: {`
`            ``"ViolationTypeID"``: 9,`
`            ``"ViolationDescr"``: ``"Parked in Loading Zone"``,`
`            ``"DefaultCost"``: 50,`
`            ``"created"``: ``"2020-10-15T20:13:41.000000Z"``,`
`            ``"discountFlag"``: ``true``,`
`            ``"discountAmount"``: 10,`
`            ``"discountHours"``: 168,`
`            ``"adminOnly"``: ``false``,`
`            ``"violationkey"``: ``null``,`
`            ``"modified"``: ``"2020-10-15T20:13:41.000000Z"``,`
`            ``"category_id"``: 1,`
`            ``"adjustable"``: ``false``,`
`            ``"bylawcode"``: ``"BL-78"`
`          ``}`
`        ``}`
`      ``],`
`      ``"attachments"``: [`
`        ``{`
`          ``"attachID"``: 1,`
`          ``"storageLocation"``: ``"oc_tomahawk/VIOLATIONS/2022/08/23/index-debf76b6.png"``,`
`          ``"attachName"``: ``"index-debf76b6"``,`
`          ``"attachExt"``: ``"png"``,`
`          ``"attachMime"``: ``"image/png"``,`
`          ``"relatedType"``: ``"VIOLATIONS"``,`
`          ``"relatedID"``: 9,`
`          ``"relatedNote"``: ``"1-100013"``,`
`          ``"created"``: ``"2022-08-23T18:48:36.000000Z"``,`
`          ``"archived"``: ``null``,`
`          ``"uniqueid"``: ``"70756a09-550e-433d-b6f4-75b0bfdcef60"`
`        ``},`
`        ``{`
`          ``"attachID"``: 2,`
`          ``"storageLocation"``: ``"oc_tomahawk/VIOLATIONS/2022/08/23/index-b11529e8.png"``,`
`          ``"attachName"``: ``"index-b11529e8"``,`
`          ``"attachExt"``: ``"png"``,`
`          ``"attachMime"``: ``"image/png"``,`
`          ``"relatedType"``: ``"VIOLATIONS"``,`
`          ``"relatedID"``: 9,`
`          ``"relatedNote"``: ``"1-100013"``,`
`          ``"created"``: ``"2022-08-23T20:55:23.000000Z"``,`
`          ``"archived"``: ``null``,`
`          ``"uniqueid"``: ``"079541cf-302e-4c42-a2cf-38665643d364"`
`        ``}`
`      ``],`
`      ``"category"``: {`
`        ``"TicketTypeID"``: 2,`
`        ``"TicketTypeName"``: ``"Municipal"``,`
`        ``"HandHeldVisible"``: 0,`
`        ``"modified"``: ``"2020-10-15T20:12:51.000000Z"``,`
`        ``"archived"``: ``null``,`
`        ``"appliesTo"``: 1,`
`        ``"enableFailToIdentify"``: 0`
`      ``}`
`    ``}`
`  ``],`
`  ``"state"``: {`
`    ``"version"``: ``"2022.5.hawksbill.0-rc"``,`
`    ``"csrf_token"``: ``"xSc9UppEG8iMXFu606Z6sfemODRyHuoyvKYT0vs6"`
`  ``}`
`}`