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: 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.

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.

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.

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.

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.