API Documentation

Overview

See below for a list of Resources and Actions you can perform with this API.

Test Interface

There is a simple test interface available.

URL Structure

All resources can be accessed at /api/uwapi/(resourcename)

For example, if you are dealing with a resource named Person, you could retrieve a list of Person by submitting a GET to /api/uwapi/person or the Person with ID 173 by submitting a GET to /api/uwapi/person/173

Additional Parameters

Additional parameters such as search terms for GET requests must be passed through the querystring. i.e. /api/uwapi/person?SearchTerm=fred

Content Type

This API supports XML and JSON. It will return data in the format specified by the request's Content-Type HTTP header. The default is JSON.

For PUT and POST requests, the request's data must match the request's Content-Type.

Actions and HTTP Verbs

ActionVerb to UseID Required in URL?
ReadGETYes
Read All / SearchGETNo
Insert / CreatePUTNo
UpdatePOSTYes
DeleteDELETEYes

Required Parameters

Parameters marked as Required [not null] must be provided and cannot be null or empty.

Parameters marked as Required must be provided but can be null or empty.

Parameters marked as [not null] are optional but cannot be null or empty.

Inserting New Data

When you create a new record, the ID (or primary key) for the new record will be available in the Status Text of the response (generally a HTTP 201).

You can also look at the Location header in the HTTP Response. though the GetByID may not be implemented for all resources, the ID will be correct at the end of the URL. (i.e. /api/uwapi/member/20280 )

UTC Dates

Unless otherwise specified in the Resource or Action documentation, dates are in UTC.

Generally this means about the only exception is Event Start/End Dates, which are the client's local time.

Date Formats

Most date formats should work. We recommend dd-mmm-yyyy, yyyy-mm-dd hh:mm:ss, or some other unambiguous format for best results. See below for some examples.

StringResulting Date
2013-03-05March 5, 2013
Jan 06, 2017January 6, 2017
04/05/07April 5, 2007
04/05/07 07:03April 5, 2007 7:03 AM
04/05/07 07:03 PMApril 5, 2007 7:03 PM
04/05/07 19:03April 5, 2007 7:03 PM

Saving Data : NULL vs Empty Values

When saving data, any value not passed in will be ignored (left as is) in the database.

If you want to set a value to NULL in the database, you need to pass an empty string for that value.

Booleans can not be saved as NULL.

Reason Phrase in Response Body

You may pass uwReasonInBody=true in the querystring to have the HTTP Reason Phrase included as a field within the Response Body.

For GET, POST and DELETE requests, this only applies to HTTP Status Codes indicating errors ( <200 or >=300 ).

For PUT requests, it applies to all HTTP Status Codes so that the new ID is accessible when applicable.

Returning Empty Sets

You may pass uwReturnEmpty=true in the querystring to any GET request. If provided, and your request would otherwise return no data, the API will return a single object with all fields set to NULL. The default is false.

This may be useful when using the API to populate a dropdown or grid where you wish to always have data returned.

Documents/Files

All Documents/Files parameters in Requests must be Base64-encoded strings. All Documents/Files provided as fields in Responses will be returned as Base64-encoded strings.

Supported Actions

You can click on each resource name to see what methods and parameters are provided.

Resource: affiliate

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the Affiliate resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Action: GET ONE - HTTP: GET

Parameters

Parameters (other than the primary key / ID: AffiliateID) must be passed in the querystring for this action.

Action: UPDATE - HTTP: POST

Parameters

Parameters (other than the primary key / ID: AffiliateID) must be passed in the body of the request for this action.

Resource: availableevents

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the AvailableEvents resource.

Action: GET MANY - HTTP: GET

The app passes PersonID to the API and the API will return a list of events that are available for that member, as well as events that are registered by that member. The events returned will be the same events listed in memberlink for that member.

Parameters

Parameters must be passed in the querystring for this action.

Resource: availableforms

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the AvailableForms resource.

Action: GET MANY - HTTP: GET

The app passes PersonID to the API and the API will return a list of forms that are available for that member, as well as events that are registered by that member.

Members with a current job in Affiliate 52 can see the UPSC Staffing Objection form.
Members with a current job in any other Affiliate can see the UNAC Staffing Objection form.

Parameters

Parameters must be passed in the querystring for this action.

Resource: checkresetpasswordcode

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the CheckResetPasswordCode resource.

Action: INSERT - HTTP: PUT

If the User Name matches a Member's MemberLink Account in UnionWare, and the Reset Code matches a code generated for that account within the last two hours, returns a success code.

Parameters

Parameters must be passed in the body of the request for this action.

Resource: classification

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the Classification resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Action: GET ONE - HTTP: GET

Parameters

Parameters (other than the primary key / ID: ClassificationID) must be passed in the querystring for this action.

Action: UPDATE - HTTP: POST

Parameters

Parameters (other than the primary key / ID: ClassificationID) must be passed in the body of the request for this action.

Resource: department

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the Department resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Action: GET ONE - HTTP: GET

Parameters

Parameters (other than the primary key / ID: DepartmentID) must be passed in the querystring for this action.

Action: UPDATE - HTTP: POST

Parameters

Parameters (other than the primary key / ID: DepartmentID) must be passed in the body of the request for this action.

Resource: event

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the Event resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Resource: eventregistrationlink

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the EventRegistrationLink resource.

Action: GET MANY - HTTP: GET

The app tells the API which event the member wants to register for. The app is also forced here to pass the user name and password to authenticate the member’s credentials. The API will generate a URL containing a Token parameter that will automatically login the user and redirect them to the Event Registration page of the passed in event. The token expires after ten minutes.

Parameters

Parameters must be passed in the querystring for this action.

Resource: eventregistrationstaff

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the EventRegistrationStaff resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Resource: eventregistrationwaitinglist

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the EventRegistrationWaitingList resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Resource: eventsession

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the EventSession resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Action: UPDATE - HTTP: POST

Parameters

Parameters (other than the primary key / ID: EventSessionID) must be passed in the body of the request for this action.

Resource: eventsessionregistration

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the EventSessionRegistration resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Resource: eventsessionregistrationstaff

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the EventSessionRegistrationStaff resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Resource: eventsessionregistrationwaitinglist

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the EventSessionRegistrationWaitingList resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Resource: forgotpassword

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the ForgotPassword resource.

Action: INSERT - HTTP: PUT

If these values match a user account in UnionWare an email is sent to the specified email with a six digit code for resetting the password.

Parameters

Parameters must be passed in the body of the request for this action.

Resource: forgotusername

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the ForgotUsername resource.

Action: INSERT - HTTP: PUT

If these values match an existing member in UnionWare an email is sent to the specified email address with the Username of the account included.

Parameters

Parameters must be passed in the body of the request for this action.

Resource: formlink

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the FormLink resource.

Action: GET MANY - HTTP: GET

The app passes to the API a Form ID, Username, and password to authenticate the member’s credentials. The API will generate a URL for passed in Form ID. The API will generate a URL containing a Token parameter that will automatically login the user and redirect them to the Form page. The token expires after ten minutes.

Parameters

Parameters must be passed in the querystring for this action.

Resource: login

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the Login resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Resource: member

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the Member resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Action: GET ONE - HTTP: GET

Parameters

Parameters (other than the primary key / ID: PersonID) must be passed in the querystring for this action.

Action: UPDATE - HTTP: POST

Parameters

Parameters (other than the primary key / ID: PersonID) must be passed in the body of the request for this action.

Resource: memberaddress

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the MemberAddress resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Action: INSERT - HTTP: PUT

Parameters

Parameters must be passed in the body of the request for this action.

Action: UPDATE - HTTP: POST

Parameters

Parameters (other than the primary key / ID: AddressID) must be passed in the body of the request for this action.

Resource: memberjob

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the MemberJob resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Action: UPDATE - HTTP: POST

Parameters

Parameters (other than the primary key / ID: JobID) must be passed in the body of the request for this action.

Resource: membernote

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the MemberNote resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Action: INSERT - HTTP: PUT

Parameters

Parameters must be passed in the body of the request for this action.

Action: UPDATE - HTTP: POST

Parameters

Parameters (other than the primary key / ID: NoteID) must be passed in the body of the request for this action.

Resource: memberphoneemail

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the MemberPhoneEmail resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Action: INSERT - HTTP: PUT

Parameters

Parameters must be passed in the body of the request for this action.

Action: UPDATE - HTTP: POST

Parameters

Parameters (other than the primary key / ID: PhoneEmailID) must be passed in the body of the request for this action.

Resource: register

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the Register resource.

Action: INSERT - HTTP: PUT

Register for Memberlink

Parameters

Parameters must be passed in the body of the request for this action.

Resource: resetpassword

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the ResetPassword resource.

Action: INSERT - HTTP: PUT

If the username matches a Member’s account and the reset code matches a code generated for that account in the last two hours, sets the Member’s password to the New Password parameter.

Parameters

Parameters must be passed in the body of the request for this action.

Resource: unit

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the Unit resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Action: GET ONE - HTTP: GET

Parameters

Parameters (other than the primary key / ID: UnitID) must be passed in the querystring for this action.

Action: UPDATE - HTTP: POST

Parameters

Parameters (other than the primary key / ID: UnitID) must be passed in the body of the request for this action.

Resource: worklocation

Any action (GET ONE, GET MANY, INSERT, UPDATE, DELETE) not explicitly listed below is not permitted for the WorkLocation resource.

Action: GET MANY - HTTP: GET

Parameters

Parameters must be passed in the querystring for this action.

Action: GET ONE - HTTP: GET

Parameters

Parameters (other than the primary key / ID: WorkLocationID) must be passed in the querystring for this action.

Action: UPDATE - HTTP: POST

Parameters

Parameters (other than the primary key / ID: WorkLocationID) must be passed in the body of the request for this action.

Status Codes and Error Messages

Below is a list of the various HTTP Status Codes and Reason Phrases that this API will return and what it means. Status codes and descriptions unique to your implementation may not be listed below.

The terms in italics below (i.e. ResourceName or ID) refer to the values provided in the request.

With GET, obviously some status codes below only apply when passing (or not passing) an ID.

If you consistently get 403 errors, check that you are authenticating correctly.

If you consistently get 404 errors, refer to the URL Structure section of this document to make sure you are using the right URLs.

VerbStatus CodeReason PhraseExplanation
GET, DELETE200OKThe action was successfully completed.
PUT201CreatedResource was successfully created. The response, if set, will generally contain the ID of the new resource.
POST, DELETE204nocontentThe action was successfully completed.
GET, POST, DELETE404No 'ResourceName' found for ID ID. - Details: ResourceName is not a valid resource.The resource by that name does not exist.
GET, POST, DELETE404'Action' is not a valid request for Resource ResourceNameThe specified action is not permitted for the specified resource.
POST404No HTTP resource was found that matches the request URI '(url)'For POST, the ID (primary key) needs to be passed as part of the URL itself, not as part of the request body or querystring.
GET, POST, DELETE400No 'ResourceName' found for ID IDThe resource name is correct, but there is no resource at that ID. You can configure this behavior for GET requests. See the Returning Empty Sets section of this document.
GET400No 'ResourceName' found.The resource name is correct, but your query returned no resources. You can configure this behavior. See the Returning Empty Sets section of this document.
GET, POST, DELETE400The ID ID is not numeric.When specifying an ID as part of the URL, it must be an integer.
GET400### 'ResourceName' results found for ID: IDThe specified ID did not uniquely identify a record. The Reason Phrase will detail how many records were found.
PUT,POST400Request content was NULL and must be provided for PUT and POST operations.The Request submitted contained no content - PUT and POST operations require XML or JSON data to be submitted within the request body.
PUT,POST400Could not parse the provided XML content. Details: (exception details)The XML provided in the request content is not valid. If you intended JSON, make sure you set the Content-Type appropriately.
PUT,POST400Could not parse the provided JSON content. Details: (exception details)The JSON provided in the request content is not valid. If you intended XML, make sure you set the Content-Type appropriately.
(all)400ParameterName must be provided and have a value specified.The specified parameter is required and cannot be null or empty. The ID must be in the URL. For GET requests, additional parameters must be provided through the querystring. For all other requests, additional parameters must be provided through the request content.
(all)400ParameterName must be provided.The specified parameter is required. The ID must be in the URL. For GET requests, additional parameters must be provided through the querystring. For all other requests, additional parameters must be provided through the request content.
(all)400ParameterName must have a value specified when provided.The specified parameter is NOT required but cannot be null or empty if provided. The ID must be in the URL. For GET requests, additional parameters must be provided through the querystring. For all other requests, additional parameters must be provided through the request content.
(all)400ParameterName is not a valid DataType.The specified parameter contains invalid data.
(all)500An unhandled error occurred. Exception was (exception details)An error occurred on the server. If the exception details are not helpful, check your request and try again in a few minutes. If the issue persists you may need to contact us.
(all)500UnionWare Database FailureA significant error occurred on the server. Check your request and try again in a few minutes. If the issue persists you should contact us.