QBOS REST API documentation (address)

(return to Main Document)

Introduction

The address API allows client applications to maintain address data including any part of its demographic record sets.

Audience

This developer's guide is intended for software developers needing a technical reference for using the QBOS REST API. The information you find in this guide is written by software engineering, and is authoritative on how the API behaves.

Additional resources, information about this guide

Occasionally, we make a mistake in this documentation, or unknowingly break a feature that you depend on. If this has happened to you, we apologize! You can help us fix the issue by contacting us. We appreciate your help.

Getting Started

To place any request in QBOS API application from third party application you need to authenticate user account and set/calculate values for the following request headers: x-qbos-id, x-qbos-nonce, x-qbos-date-utc, x-qbos-hash-version, x-qbos-auth

See details in Authentication Documentation.

address properties

Properties prefixed with '_' (underscore) are read-only properties. i.e. POST and PUT processing will ignore these properties.

Name Type Max length Numeric Required
For POST
Filterable Description

id

bigint

 

 

 

Required for GET(by id),PUT,DELETE

parent_id

bigint

 

yes

 

parent_type

nvarchar

50

 

yes

 

type

nvarchar

50

 

 

 

Value is "address"

address_type

char

1

 

 

 

address types

address1

nvarchar

80

 

yes

 

Street address

address2

nvarchar

50

 

 

 

Suite no, Apartment no, etc.

city

nvarchar

25

 

yes

 

City name

_county

nvarchar

30

 

 

 

County name is derived from zip

state

varchar

2

 

yes

 

US Two letter ANSI codes for State abbreviations

zip

varchar

10

yes

yes

 

Postal code

primarysw

bit

yes

 

 

Value of 1 indicates the primary address in the collection of addresses per contact

Read address by id:

GET https:/.../v1/o/address/{id}

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 200 - OK

Response data: GET https:/.../v1/o/address/760863
{ "parent_type" : "contact", "parent_id" : 506998, "type" : "address", "id" : 760863, "sub_type" : "_", "address1" : "701 SE 82nd St", "address2" : "", "city" : "OKLAHOMA CITY", "_county" : "OKLAHOMA", "state" : "OK", "zip" : 73149, "primarysw" : 1, "href" : "\/v1\/o\/address\/760863" }

Read address from parent:

GET https:/.../v1/o/{parent_type}/{parent_id}/links/address[?{filter}]

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 200 - OK

GET https:/.../v1/o/contact/506998/links/address
Response example is shown in XML format here even though REST API returns JSON format:
<address><address parent_type="contact" parent_id="506998" type="address" id="760863" sub_type="_" _title="701 SE 82nd St OKLAHOMA CITY OK 73149" href="/v1/o/address/760863" zip="73149" city="OKLAHOMA CITY" address1="701 SE 82nd St" state="OK" primarysw="1" _county="OKLAHOMA"/></address>

Create address:

POST https:/.../v1/o/contact/506998/address

Request data [See properties]:

{"address": [ { "parent_type" : "contact", "parent_id" : 506998, "property_a" : "value-a", "property" : "See address properties", "property_z" : "value-z" } ] }

Response codes:

Update address:

PUT https:/.../v1/o/address/{id}

Request data [See properties]:

{"address": [ { "id" : 760863, "property_a" : "value-a", "property" : "See address properties", "property_z" : "value-z" } ] }

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 200 - OK Content returned [See response data]
  • 204 - OK No content
  • 404 - Not found

Delete address:

DELETE https:/.../v1/o/address/{id}

The "id" in JSON payload is required to match the {id} in the URI to ensure that deletion requests are intended and safe

{"address": [{"id":760863}]}

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 204 - OK
  • 404 - Not found

Response data:
{}