Users v0.4.2
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
The Users API provides operations to allow for the creation and maintainence of user related information.
Users can be created (never deleted) and the state of a user can be modified by authorized users. Every user is uniquely identifiable by a system-generated GUID.
A User may have one of more of the following links depending on its current state
:
self
: A link to the user resource.apiture:activate
: A link to activate the current user (viaPOST
). This link only exists if the user resource isinactive
orlocked
and if the caller is authorized to activate users.apiture:deactivate
: A link to deactivate the current user (viaPOST
). This link only exists if the user resource isactive
orlocked
and if the caller is authorized to deactivate users.apiture:lock
: A link to lock the current user (viaPOST
). This link only exists if the user resource isactive
orinactive
and if the caller is authorized to lock users.apiture:remove
: A link to remove the current user (viaPOST
). This link only exists if the user resource is notremoved
and if the caller is authorized to remove users.apiture:merge
: A link to merge the current user (or a collection of users) with a specified master user (viaPOST
). This link only exists if the user resource isactive
,inactive
, orlocked
and if the caller is authorized to merge users.
Download OpenAPI Definition (YAML)
Base URLs:
License: Pending.
Authentication
- API Key (
apiKey
)- header parameter: API-Key
- API Key based authentication. Each client application must pass its private, unique API key, allocated in the developer portal, via the
API-Key: {api-key}
request header.
- OAuth2 authentication (
accessToken
)- OAuth2 client access token authentication. The client authenticates against the server at
authorizationUrl
, passing the client's privateclientId
(and optionalclientSecret
) as part of this flow. The client obtains an access token from the server attokenUrl
. It then passes the received access token via theAuthorization: Bearer {access-token}
header in subsequent API calls. The authorization process also returns a refresh token which the client should use to renew the access token before it expires. - Flow:
authorizationCode
- Authorization URL = https://auth.apiture.com/oauth2/authorize
- Token URL = http://auth.apiture.com/auth/oauth2/token
- OAuth2 client access token authentication. The client authenticates against the server at
Scope | Scope Description |
---|---|
profiles/read |
Read access to user and contact related resources. |
profiles/write |
Write (update) access to user and contact related resources. |
profiles/delete |
Delete access to user and contact related resources. |
profiles/readPii |
Read access to personally identifiable information such as tax ID numbers, phone numbers, email and postal addresses. This must be granted in addition to the profiles/read scope in order to read such data, but is included in the profiles/full scope. |
profiles/full |
Full access to user and contact related resources. |
API
Endpoints which describe this API.
getApi
Code samples
# You can also use wget
curl -X GET /users/ \
-H 'Accept: application/hal+json' \
-H 'API-Key: API_KEY'
GET /users/ HTTP/1.1
Accept: application/hal+json
var headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY'
};
$.ajax({
url: '/users/',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY'
};
fetch('/users/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/hal+json',
'API-Key' => 'API_KEY'
}
result = RestClient.get '/users/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/hal+json',
'API-Key': 'API_KEY'
}
r = requests.get('/users/', params={
}, headers = headers)
print r.json()
URL obj = new URL("/users/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/hal+json"},
"API-Key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/users/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Top-level resources and operations in this API
GET /
Return links to the top-level resources and operations in this API. Links in the root response may include:
apiture:user
: A link to a specific user.apiture:users
: A link to the collection of all users.apiture:createuser
: A link to create a new user (viaPOST
)apiture:activateUser
: A link to activate a user (viaPOST
)apiture:deactivateUser
: A link to deactivate a user (viaPOST
)apiture:lockUser
: A link to lock a user (viaPOST
)apiture:removeUser
: A link to remove a user (viaPOST
)apiture:mergeUser
: A link to merge a user (viaPOST
)
Example responses
200 Response
{
"id": "apiName",
"name": "API name",
"apiVersion": "0.0.1-SNAPSHOT",
"_profile": "https://api.apiture.com/schemas/common/root/v1.0.0/profile.json",
"_links": {}
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: root |
getApiDoc
Code samples
# You can also use wget
curl -X GET /users/apiDoc \
-H 'Accept: application/json' \
-H 'API-Key: API_KEY'
GET /users/apiDoc HTTP/1.1
Accept: application/json
var headers = {
'Accept':'application/json',
'API-Key':'API_KEY'
};
$.ajax({
url: '/users/apiDoc',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json',
'API-Key':'API_KEY'
};
fetch('/users/apiDoc',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'API-Key' => 'API_KEY'
}
result = RestClient.get '/users/apiDoc',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'API-Key': 'API_KEY'
}
r = requests.get('/users/apiDoc', params={
}, headers = headers)
print r.json()
URL obj = new URL("/users/apiDoc");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"API-Key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/users/apiDoc", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Return API definition document
GET /apiDoc
Return the OpenAPI document that describes this API.
Example responses
200 Response
{}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: Inline |
Response Schema
User
Endpoints to manage users.
getUsers
Code samples
# You can also use wget
curl -X GET /users/users \
-H 'Accept: application/hal+json' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
GET /users/users HTTP/1.1
Accept: application/hal+json
var headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/users/users',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/users/users',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/hal+json',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/users/users',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/hal+json',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/users/users', params={
}, headers = headers)
print r.json()
URL obj = new URL("/users/users");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/hal+json"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/users/users", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Return a collection of users
GET /users
Use this endpoint to retrieve a paginated, sortable, filterable, searchable collection of folders. The links in the response include pagination links. This representation will contain links in each user in the embedded items array:
self
: A link to the user.apiture:remove
: A link to remove the current user (viaPOST
). This link only exists if the user resource is notremoved
and if the caller is authorized to remove users.apiture:activate
: A link to activate the current user (viaPOST
). This link only exists if the user resource isinactive
orlocked
and if the caller is authorized to activate users.apiture:deactivate
: A link to deactivate the current user (viaPOST
) This link only exists if the user resource isactive
orlocked
and if the caller is authorized to deactivate users.apiture:lock
: A link to lock the current user (viaPOST
). This link only exists if the user resource isactive
or 'inactive`' and if the caller is authorized to lock users.apiture:merge
: A link to merge the current user (or a collection of users) with a specified master user (viaPOST
). This link only exists if the user resource isactive
,inactive
, orlocked
and if the caller is authorized to merge users.
Parameters
Parameter | Description |
---|---|
start (query) |
integer(int64) The zero-based index of the first user in this page. The default, 0, represents the first page of the collection. |
limit (query) |
integer(int32) The maximum number of user representations to return in this page. |
sortBy (query) |
string Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2 . |
filter (query) |
string Optional filter criteria. See filtering. |
q (query) |
string Optional search string. See searching. |
state (query) |
string Subset the accounts or external accounts collection to those whose state matches this value. Use | to separate multiple values. For example, ?state=pending will match only items whose state is pending ; ?state=removed|inactive will match items whose state is removed or inactive . This is combined with an implicit and with other filters if they are used. See filtering. Enumerated values: locked merged active inactive removed |
occupation (query) |
string Subset the accounts or external accounts collection to those with this name value. Use |
createdAt (query) |
string(date-time) Subset the accounts or external accounts collection to those with this createdAt value. Use |
Example responses
200 Response
{
"_profile": "https://api.apiture.com/schemas/users/users/v1.0.0/profile.json",
"start": 0,
"limit": 10,
"count": 2,
"name": "users",
"_links": {
"self": {
"href": "/users?start=0&limit=10"
},
"first": {
"href": "/users?start=10&limit=10"
},
"next": {
"href": "/users?start=10&limit=10"
},
"collection": {
"href": "/users"
}
},
"_embedded": {
"items": [
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:remove": {
"href": "/users/removedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"username": "Johnny1733",
"firstName": "John",
"middleName": "Daniel",
"lastName": "Smith",
"preferredName": "John",
"identification": [
{
"value": "111-11-1111",
"type": "taxId"
}
],
"emailAddresses": [
"api@apiture.com",
"support@apiture.com"
],
"phones": [
{
"type": "home",
"number": "(555) 555-5555"
},
{
"type": "mobile",
"number": "(999) 555-5555"
}
],
"birthdate": "1974-10-27",
"citizenship": [
{
"country": "US",
"status": "citizen"
}
],
"occupation": "Software Engineer",
"addresses": [
{
"type": "home",
"addressLine1": "555 N Front Street",
"addressLine2": "Suite 5555",
"city": "Wilmington",
"region": "NC",
"postalCode": "28401-5405",
"countryCode": "US"
},
{
"type": "home",
"addressLine1": "123 S 3rd Street",
"addressLine2": "Apt 42",
"city": "Wilmington",
"region": "NC",
"postalCode": "28411-5405",
"countryCode": "US"
}
],
"lastContactedAt": "2018-07-29T11:13:54Z",
"lastLoggedInAt": "2017-12-29T15:19:41Z",
"metadata": [],
"state": "active",
"createdAt": "2018-03-09T20:14:32Z"
},
{
"_id": "d1fabf13-31d1-4351-89ad-877ac4d1220a",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/d1fabf13-31d1-4351-89ad-877ac4d1220a"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=d1fabf13-31d1-4351-89ad-877ac4d1220a"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=d1fabf13-31d1-4351-89ad-877ac4d1220a"
},
"apiture:remove": {
"href": "/users/removedUsers?user=d1fabf13-31d1-4351-89ad-877ac4d1220a"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"username": "LAS15",
"firstName": "Laura",
"middleName": "Eileen",
"lastName": "Smith",
"preferredName": "Laura",
"identification": [
{
"value": "111-11-1111",
"type": "taxId"
}
],
"emailAddresses": [
"api@apiture.com",
"support@apiture.com"
],
"phones": [
{
"type": "home",
"number": "(555) 555-5555"
},
{
"type": "mobile",
"number": "(999) 555-5555"
}
],
"birthdate": "1980-03-19",
"citizenship": [
{
"country": "US",
"status": "citizen"
}
],
"occupation": "Product Manager",
"addresses": [
{
"type": "home",
"addressLine1": "555 N Front Street",
"addressLine2": "Suite 5555",
"city": "Wilmington",
"region": "NC",
"postalCode": "28401-5405",
"countryCode": "US"
},
{
"type": "home",
"addressLine1": "123 S 3rd Street",
"addressLine2": "Apt 42",
"city": "Wilmington",
"region": "NC",
"postalCode": "28411-5405",
"countryCode": "US"
}
],
"lastContactedAt": "2018-07-29T11:13:54Z",
"lastLoggedInAt": "2017-12-29T15:19:41Z",
"metadata": [],
"state": "active",
"createdAt": "2018-07-29T11:13:54Z"
}
]
}
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: users | |
400 | Bad Request |
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error. | |
Schema: errorResponse | |
422 | Unprocessable Entity |
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error. | |
Schema: errorResponse |
createUser
Code samples
# You can also use wget
curl -X POST /users/users \
-H 'Content-Type: application/hal+json' \
-H 'Accept: application/hal+json' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
POST /users/users HTTP/1.1
Content-Type: application/hal+json
Accept: application/hal+json
var headers = {
'Content-Type':'application/hal+json',
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/users/users',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const inputBody = '{
"_links": {
"property1": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
},
"property2": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
}
},
"_embedded": {},
"_profile": "http://example.com",
"_error": {
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "http://doc.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
},
"username": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"preferredName": "string",
"identification": [
{
"value": "string",
"type": "taxId",
"expiration": "string"
}
],
"phones": [
{
"type": "home",
"number": "string"
}
],
"emailAddresses": [
"user@example.com"
],
"birthdate": "2019-07-09",
"citizenship": [
{
"country": "string",
"status": "citizen"
}
],
"occupation": "string",
"addresses": [
{
"type": "home",
"label": "string",
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"countryCode": "string"
}
],
"lastContactedAt": "2019-07-09T10:55:35Z",
"lastLoggedInAt": "2019-07-09T10:55:35Z",
"metadata": [
{}
],
"state": "active"
}';
const headers = {
'Content-Type':'application/hal+json',
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/users/users',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/hal+json',
'Accept' => 'application/hal+json',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/users/users',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/hal+json',
'Accept': 'application/hal+json',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/users/users', params={
}, headers = headers)
print r.json()
URL obj = new URL("/users/users");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/hal+json"},
"Accept": []string{"application/hal+json"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/users/users", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Create a new user
POST /users
Body parameter
{
"_links": {
"property1": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
},
"property2": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
}
},
"_embedded": {},
"_profile": "http://example.com",
"_error": {
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "http://doc.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
},
"username": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"preferredName": "string",
"identification": [
{
"value": "string",
"type": "taxId",
"expiration": "string"
}
],
"phones": [
{
"type": "home",
"number": "string"
}
],
"emailAddresses": [
"user@example.com"
],
"birthdate": "2019-07-09",
"citizenship": [
{
"country": "string",
"status": "citizen"
}
],
"occupation": "string",
"addresses": [
{
"type": "home",
"label": "string",
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"countryCode": "string"
}
],
"lastContactedAt": "2019-07-09T10:55:35Z",
"lastLoggedInAt": "2019-07-09T10:55:35Z",
"metadata": [
{}
],
"state": "active"
}
Parameters
Parameter | Description |
---|---|
body (body) |
createUser (required) The data necessary to create a new user. |
Example responses
201 Response
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:remove": {
"href": "/users/removedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"createdAt": "2018-03-09T20:14:32Z"
}
Responses
Status | Description |
---|---|
201 | Created |
Created | |
Schema: user | |
202 | Accepted |
Accepted | |
Schema: user |
Response Headers
Status | Description |
---|---|
201 | Location string uri |
The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with schema ://host | |
201 | ETag string |
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update the resource. | |
202 | Location string uri |
The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with schema ://host | |
202 | ETag string |
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update the resource. |
getUser
Code samples
# You can also use wget
curl -X GET /users/users/{userId} \
-H 'Accept: application/hal+json' \
-H 'If-None-Match: string' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
GET /users/users/{userId} HTTP/1.1
Accept: application/hal+json
If-None-Match: string
var headers = {
'Accept':'application/hal+json',
'If-None-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/users/users/{userId}',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/hal+json',
'If-None-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/users/users/{userId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/hal+json',
'If-None-Match' => 'string',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '/users/users/{userId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/hal+json',
'If-None-Match': 'string',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('/users/users/{userId}', params={
}, headers = headers)
print r.json()
URL obj = new URL("/users/users/{userId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/hal+json"},
"If-None-Match": []string{"string"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/users/users/{userId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Fetch a representation of this user
GET /users/{userId}
Return a HAL representation of this user resource.
This representation will contain links related to the current user:
self
: A link to the user resource.apiture:remove
: A link to remove the current user (viaPOST
). This link only exists if the user resource is notremoved
and if the caller is authorized to remove users.apiture:activate
: A link to activate the current user (viaPOST
). This link only exists if the user resource isinactive
orlocked
and if the caller is authorized to activate users.apiture:deactivate
: A link to deactivate the current user (viaPOST
). This link only exists if the user resource isactive
orlocked
and if the caller is authorized to deactivate users.apiture:lock
: A link to lock the current user (viaPOST
). This link only exists if the user resource isactive
or 'inactive`' and if the caller is authorized to lock users.apiture:merge
: A link to merge the current user (or a collection of users) with a specified master user (viaPOST
). This link only exists if the user resource isactive
,inactive
, orlocked
and if the caller is authorized to merge users.
Parameters
Parameter | Description |
---|---|
userId (path) |
string (required) The unique identifier of the user. This is an opaque string. |
If-None-Match (header) |
string The entity tag that was returned in the ETag response. If the resource's current entity tag matches, the GET will return 304 (Not Modified) and no response body, else the resource representation will be returned. |
Example responses
200 Response
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:remove": {
"href": "/users/removedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"createdAt": "2018-03-09T20:14:32Z"
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: user | |
302 | Found |
Redirect. The specified user has a state of merged and will be redirected to the master user resource. | |
Schema: errorResponse | |
404 | Not Found |
Not Found. There is no such user resource at the specified {userId} The _error field in the response will contain details about the request error. | |
Schema: error |
Response Headers
Status | Description |
---|---|
200 | ETag string |
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this user resource. |
updateUser
Code samples
# You can also use wget
curl -X PUT /users/users/{userId} \
-H 'Content-Type: application/hal+json' \
-H 'Accept: application/hal+json' \
-H 'If-Match: string' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
PUT /users/users/{userId} HTTP/1.1
Content-Type: application/hal+json
Accept: application/hal+json
If-Match: string
var headers = {
'Content-Type':'application/hal+json',
'Accept':'application/hal+json',
'If-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/users/users/{userId}',
method: 'put',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const inputBody = '{
"username": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"preferredName": "string",
"identification": [
{
"value": "string",
"type": "taxId",
"expiration": "string"
}
],
"phones": [
{
"type": "home",
"number": "string"
}
],
"emailAddresses": [
"user@example.com"
],
"birthdate": "2019-07-09",
"citizenship": [
{
"country": "string",
"status": "citizen"
}
],
"occupation": "string",
"addresses": [
{
"type": "home",
"label": "string",
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"countryCode": "string"
}
],
"lastContactedAt": "2019-07-09T10:55:35Z",
"lastLoggedInAt": "2019-07-09T10:55:35Z",
"metadata": [
{}
],
"state": "active",
"_links": {
"property1": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
},
"property2": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
}
},
"_embedded": {},
"_profile": "http://example.com",
"_error": {
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "http://doc.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
},
"_id": "string"
}';
const headers = {
'Content-Type':'application/hal+json',
'Accept':'application/hal+json',
'If-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/users/users/{userId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/hal+json',
'Accept' => 'application/hal+json',
'If-Match' => 'string',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put '/users/users/{userId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/hal+json',
'Accept': 'application/hal+json',
'If-Match': 'string',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('/users/users/{userId}', params={
}, headers = headers)
print r.json()
URL obj = new URL("/users/users/{userId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/hal+json"},
"Accept": []string{"application/hal+json"},
"If-Match": []string{"string"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "/users/users/{userId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Update this user
PUT /users/{userId}
Perform a complete replacement of this user.
Body parameter
{
"username": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"preferredName": "string",
"identification": [
{
"value": "string",
"type": "taxId",
"expiration": "string"
}
],
"phones": [
{
"type": "home",
"number": "string"
}
],
"emailAddresses": [
"user@example.com"
],
"birthdate": "2019-07-09",
"citizenship": [
{
"country": "string",
"status": "citizen"
}
],
"occupation": "string",
"addresses": [
{
"type": "home",
"label": "string",
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"countryCode": "string"
}
],
"lastContactedAt": "2019-07-09T10:55:35Z",
"lastLoggedInAt": "2019-07-09T10:55:35Z",
"metadata": [
{}
],
"state": "active",
"_links": {
"property1": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
},
"property2": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
}
},
"_embedded": {},
"_profile": "http://example.com",
"_error": {
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "http://doc.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
},
"_id": "string"
}
Parameters
Parameter | Description |
---|---|
userId (path) |
string (required) The unique identifier of the user. This is an opaque string. |
If-Match (header) |
string The entity tag that was returned in the ETag response. This must match the current entity tag of the resource. |
body (body) |
updateUser (required) |
Example responses
200 Response
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:remove": {
"href": "/users/removedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"createdAt": "2018-03-09T20:14:32Z"
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: user | |
400 | Bad Request |
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error. | |
Schema: errorResponse | |
404 | Not Found |
Not Found. There is no such user resource at the specified {userId} The _error field in the response will contain details about the request error. | |
Schema: error | |
409 | Conflict |
Conflict. There is a conflict between the request and the current state of the resource. It may be one of the following:
| |
Schema: errorResponse | |
412 | Precondition Failed |
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim. | |
Schema: errorResponse | |
422 | Unprocessable Entity |
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error. | |
Schema: errorResponse |
Response Headers
Status | Description |
---|---|
200 | ETag string |
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this user resource. |
patchUser
Code samples
# You can also use wget
curl -X PATCH /users/users/{userId} \
-H 'Content-Type: application/hal+json' \
-H 'Accept: application/hal+json' \
-H 'If-Match: string' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
PATCH /users/users/{userId} HTTP/1.1
Content-Type: application/hal+json
Accept: application/hal+json
If-Match: string
var headers = {
'Content-Type':'application/hal+json',
'Accept':'application/hal+json',
'If-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/users/users/{userId}',
method: 'patch',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const inputBody = '{
"username": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"preferredName": "string",
"identification": [
{
"value": "string",
"type": "taxId",
"expiration": "string"
}
],
"phones": [
{
"type": "home",
"number": "string"
}
],
"emailAddresses": [
"user@example.com"
],
"birthdate": "2019-07-09",
"citizenship": [
{
"country": "string",
"status": "citizen"
}
],
"occupation": "string",
"addresses": [
{
"type": "home",
"label": "string",
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"countryCode": "string"
}
],
"lastContactedAt": "2019-07-09T10:55:35Z",
"lastLoggedInAt": "2019-07-09T10:55:35Z",
"metadata": [
{}
],
"state": "active",
"_links": {
"property1": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
},
"property2": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
}
},
"_embedded": {},
"_profile": "http://example.com",
"_error": {
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "http://doc.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
},
"_id": "string"
}';
const headers = {
'Content-Type':'application/hal+json',
'Accept':'application/hal+json',
'If-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/users/users/{userId}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/hal+json',
'Accept' => 'application/hal+json',
'If-Match' => 'string',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.patch '/users/users/{userId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/hal+json',
'Accept': 'application/hal+json',
'If-Match': 'string',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.patch('/users/users/{userId}', params={
}, headers = headers)
print r.json()
URL obj = new URL("/users/users/{userId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/hal+json"},
"Accept": []string{"application/hal+json"},
"If-Match": []string{"string"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "/users/users/{userId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Update this user
PATCH /users/{userId}
Perform a partial update of this user. Fields which are omitted are not updated.
Body parameter
{
"username": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"preferredName": "string",
"identification": [
{
"value": "string",
"type": "taxId",
"expiration": "string"
}
],
"phones": [
{
"type": "home",
"number": "string"
}
],
"emailAddresses": [
"user@example.com"
],
"birthdate": "2019-07-09",
"citizenship": [
{
"country": "string",
"status": "citizen"
}
],
"occupation": "string",
"addresses": [
{
"type": "home",
"label": "string",
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"countryCode": "string"
}
],
"lastContactedAt": "2019-07-09T10:55:35Z",
"lastLoggedInAt": "2019-07-09T10:55:35Z",
"metadata": [
{}
],
"state": "active",
"_links": {
"property1": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
},
"property2": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
}
},
"_embedded": {},
"_profile": "http://example.com",
"_error": {
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "http://doc.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
},
"_id": "string"
}
Parameters
Parameter | Description |
---|---|
userId (path) |
string (required) The unique identifier of the user. This is an opaque string. |
If-Match (header) |
string The entity tag that was returned in the ETag response. This must match the current entity tag of the resource. |
body (body) |
updateUser (required) |
Example responses
200 Response
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:remove": {
"href": "/users/removedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"createdAt": "2018-03-09T20:14:32Z"
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: user | |
400 | Bad Request |
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error. | |
Schema: errorResponse | |
404 | Not Found |
Not Found. There is no such user resource at the specified {userId} The _error field in the response will contain details about the request error. | |
Schema: error | |
409 | Conflict |
Conflict. There is a conflict between the request and the current state of the resource. It may be one of the following:
| |
Schema: errorResponse | |
412 | Precondition Failed |
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim. | |
Schema: errorResponse | |
422 | Unprocessable Entity |
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error. | |
Schema: errorResponse |
Response Headers
Status | Description |
---|---|
200 | ETag string |
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this user resource. |
removeUser
Code samples
# You can also use wget
curl -X POST /users/removedUsers \
-H 'Accept: application/hal+json' \
-H 'If-Match: string' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
POST /users/removedUsers HTTP/1.1
Accept: application/hal+json
If-Match: string
var headers = {
'Accept':'application/hal+json',
'If-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/users/removedUsers',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/hal+json',
'If-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/users/removedUsers',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/hal+json',
'If-Match' => 'string',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/users/removedUsers',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/hal+json',
'If-Match': 'string',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/users/removedUsers', params={
}, headers = headers)
print r.json()
URL obj = new URL("/users/removedUsers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/hal+json"},
"If-Match": []string{"string"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/users/removedUsers", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Remove a user.
POST /removedUsers
Remove a user from active use.
This operation is invoked from the apiture:remove
link on a user resource when that user is eligible to be removed.
This changes the state
to removed
.
Parameters
Parameter | Description |
---|---|
user (query) |
string The ID or URI of an existing user which is eligible to be removed. |
userUri (query) |
string The URI of an existing user which is eligible to be removed. This parameter is deprecated; use ?user= instead. |
If-Match (header) |
string The entity tag that was returned in the ETag response. This must match the current entity tag of the resource. |
Example responses
200 Response
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:remove": {
"href": "/users/removedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"createdAt": "2018-03-09T20:14:32Z"
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: user | |
400 | Bad Request |
Bad Request. The user or userUri was malformed or does not refer to a user. | |
409 | Conflict |
Conflict. There is a conflict between the request and the current state of the resource. It may be one of the following:
| |
Schema: errorResponse | |
412 | Precondition Failed |
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim. | |
Schema: errorResponse | |
422 | Unprocessable Entity |
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error. | |
Schema: errorResponse |
Response Headers
Status | Description |
---|---|
200 | ETag string |
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this user resource. |
activateUser
Code samples
# You can also use wget
curl -X POST /users/activeUsers \
-H 'Accept: application/hal+json' \
-H 'If-Match: string' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
POST /users/activeUsers HTTP/1.1
Accept: application/hal+json
If-Match: string
var headers = {
'Accept':'application/hal+json',
'If-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/users/activeUsers',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/hal+json',
'If-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/users/activeUsers',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/hal+json',
'If-Match' => 'string',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/users/activeUsers',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/hal+json',
'If-Match': 'string',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/users/activeUsers', params={
}, headers = headers)
print r.json()
URL obj = new URL("/users/activeUsers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/hal+json"},
"If-Match": []string{"string"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/users/activeUsers", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Activate a user.
POST /activeUsers
Activate a user from an inactive state.
This operation is invoked from the apiture:activate
link on a user resource when that user is eligible to be activated.
This changes the state
to active
.
Parameters
Parameter | Description |
---|---|
user (query) |
string The ID or URI of an existing user which is eligible to be removed. |
userUri (query) |
string The URI of an existing user which is eligible to be removed. This parameter is deprecated; use ?user= instead. |
If-Match (header) |
string The entity tag that was returned in the ETag response. This must match the current entity tag of the resource. |
Example responses
200 Response
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:remove": {
"href": "/users/removedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"createdAt": "2018-03-09T20:14:32Z"
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: user | |
400 | Bad Request |
Bad Request. The user or userUri was malformed or does not refer to a user. | |
409 | Conflict |
Conflict. There is a conflict between the request and the current state of the resource. It may be one of the following:
| |
Schema: errorResponse | |
412 | Precondition Failed |
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim. | |
Schema: errorResponse | |
422 | Unprocessable Entity |
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error. | |
Schema: errorResponse |
Response Headers
Status | Description |
---|---|
200 | ETag string |
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this user resource. |
deactivateUser
Code samples
# You can also use wget
curl -X POST /users/inactiveUsers \
-H 'Accept: application/hal+json' \
-H 'If-Match: string' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
POST /users/inactiveUsers HTTP/1.1
Accept: application/hal+json
If-Match: string
var headers = {
'Accept':'application/hal+json',
'If-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/users/inactiveUsers',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/hal+json',
'If-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/users/inactiveUsers',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/hal+json',
'If-Match' => 'string',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/users/inactiveUsers',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/hal+json',
'If-Match': 'string',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/users/inactiveUsers', params={
}, headers = headers)
print r.json()
URL obj = new URL("/users/inactiveUsers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/hal+json"},
"If-Match": []string{"string"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/users/inactiveUsers", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Deactivate a user.
POST /inactiveUsers
Deactivate a user from an active state.
This operation is invoked from the apiture:deactivate
link on a user resource when that user is eligible to be deactivated.
This changes the state
to inactive
.
Parameters
Parameter | Description |
---|---|
user (query) |
string The ID or URI of an existing user which is eligible to be removed. |
userUri (query) |
string The URI of an existing user which is eligible to be removed. This parameter is deprecated; use ?user= instead. |
If-Match (header) |
string The entity tag that was returned in the ETag response. This must match the current entity tag of the resource. |
Example responses
200 Response
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:remove": {
"href": "/users/removedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"createdAt": "2018-03-09T20:14:32Z"
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: user | |
400 | Bad Request |
Bad Request. The user or userUri was malformed or does not refer to a user. | |
409 | Conflict |
Conflict. There is a conflict between the request and the current state of the resource. It may be one of the following:
| |
Schema: errorResponse | |
412 | Precondition Failed |
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim. | |
Schema: errorResponse | |
422 | Unprocessable Entity |
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error. | |
Schema: errorResponse |
Response Headers
Status | Description |
---|---|
200 | ETag string |
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this user resource. |
lockUser
Code samples
# You can also use wget
curl -X POST /users/lockedUsers \
-H 'Accept: application/hal+json' \
-H 'If-Match: string' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
POST /users/lockedUsers HTTP/1.1
Accept: application/hal+json
If-Match: string
var headers = {
'Accept':'application/hal+json',
'If-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/users/lockedUsers',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const headers = {
'Accept':'application/hal+json',
'If-Match':'string',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/users/lockedUsers',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/hal+json',
'If-Match' => 'string',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/users/lockedUsers',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/hal+json',
'If-Match': 'string',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/users/lockedUsers', params={
}, headers = headers)
print r.json()
URL obj = new URL("/users/lockedUsers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/hal+json"},
"If-Match": []string{"string"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/users/lockedUsers", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Lock a user.
POST /lockedUsers
Lock a user from an active or inactive state.
This operation is invoked from the apiture:lock
link on a user resource when that user is eligible to be lock.
This changes the state
to locked
.
Parameters
Parameter | Description |
---|---|
user (query) |
string The ID or URI of an existing user which is eligible to be removed. |
userUri (query) |
string The URI of an existing user which is eligible to be removed. This parameter is deprecated; use ?user= instead. |
If-Match (header) |
string The entity tag that was returned in the ETag response. This must match the current entity tag of the resource. |
Example responses
200 Response
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:remove": {
"href": "/users/removedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"createdAt": "2018-03-09T20:14:32Z"
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: user | |
400 | Bad Request |
Bad Request. The user or userUri was malformed or does not refer to a user. | |
409 | Conflict |
Conflict. There is a conflict between the request and the current state of the resource. It may be one of the following:
| |
Schema: errorResponse | |
412 | Precondition Failed |
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim. | |
Schema: errorResponse | |
422 | Unprocessable Entity |
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error. | |
Schema: errorResponse |
Response Headers
Status | Description |
---|---|
200 | ETag string |
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this user resource. |
mergeUsers
Code samples
# You can also use wget
curl -X POST /users/mergedUsers \
-H 'Content-Type: application/hal+json' \
-H 'Accept: application/hal+json' \
-H 'API-Key: API_KEY' \
-H 'Authorization: Bearer {access-token}'
POST /users/mergedUsers HTTP/1.1
Content-Type: application/hal+json
Accept: application/hal+json
var headers = {
'Content-Type':'application/hal+json',
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
$.ajax({
url: '/users/mergedUsers',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const fetch = require('node-fetch');
const inputBody = '{
"_links": {
"apiture:master": {
"href": "/users/users/5150d4f2-0d94-4602-8ca8-f68d00815f63"
}
},
"items": [
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
}
},
"username": "Johnny1733",
"firstName": "John",
"middleName": "Daniel",
"lastName": "Smith",
"preferredName": "John",
"identification": [
{
"value": "111-11-1111",
"type": "taxId"
}
],
"emailAddresses": [
"api@apiture.com",
"support@apiture.com"
],
"phones": [
{
"type": "home",
"number": "(555) 555-5555"
},
{
"type": "mobile",
"number": "(999) 555-5555"
}
],
"birthdate": "1974-10-27",
"citizenship": [
{
"country": "US",
"status": "citizen"
}
],
"occupation": "Software Engineer",
"addresses": [
{
"type": "home",
"addressLine1": "555 N Front Street",
"addressLine2": "Suite 5555",
"city": "Wilmington",
"region": "NC",
"postalCode": "28401-5405",
"countryCode": "US"
},
{
"type": "home",
"addressLine1": "123 S 3rd Street",
"addressLine2": "Apt 42",
"city": "Wilmington",
"region": "NC",
"postalCode": "28411-5405",
"countryCode": "US"
}
],
"lastContactedAt": "2018-07-29T11:13:54Z",
"lastLoggedInAt": "2017-12-29T15:19:41Z",
"metadata": [],
"state": "active",
"createdAt": "2018-03-09T20:14:32Z"
},
{
"_id": "d1fabf13-31d1-4351-89ad-877ac4d1220a",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/d1fabf13-31d1-4351-89ad-877ac4d1220a"
}
},
"username": "LAS15",
"firstName": "Laura",
"middleName": "Eileen",
"lastName": "Smith",
"preferredName": "Laura",
"identification": [
{
"value": "111-11-1111",
"type": "taxId"
}
],
"emailAddresses": [
"api@apiture.com",
"support@apiture.com"
],
"phones": [
{
"type": "home",
"number": "(555) 555-5555"
},
{
"type": "mobile",
"number": "(999) 555-5555"
}
],
"birthdate": "1980-03-19",
"citizenship": [
{
"country": "US",
"status": "citizen"
}
],
"occupation": "Product Manager",
"addresses": [
{
"type": "home",
"addressLine1": "555 N Front Street",
"addressLine2": null,
"city": "Wilmington",
"region": "NC",
"postalCode": "28401-5405",
"countryCode": "US"
},
{
"type": "home",
"addressLine1": "123 S 3rd Street",
"addressLine2": "Apt 42",
"city": "Wilmington",
"region": "NC",
"postalCode": "28411-5405",
"countryCode": "US"
}
],
"lastContactedAt": "2018-07-29T11:13:54Z",
"lastLoggedInAt": "2017-12-29T15:19:41Z",
"metadata": [],
"state": "active",
"createdAt": "2018-07-29T11:13:54Z"
}
]
}';
const headers = {
'Content-Type':'application/hal+json',
'Accept':'application/hal+json',
'API-Key':'API_KEY',
'Authorization':'Bearer {access-token}'
};
fetch('/users/mergedUsers',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/hal+json',
'Accept' => 'application/hal+json',
'API-Key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '/users/mergedUsers',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/hal+json',
'Accept': 'application/hal+json',
'API-Key': 'API_KEY',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('/users/mergedUsers', params={
}, headers = headers)
print r.json()
URL obj = new URL("/users/mergedUsers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/hal+json"},
"Accept": []string{"application/hal+json"},
"API-Key": []string{"API_KEY"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/users/mergedUsers", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Merge a set of users.
POST /mergedUsers
Merge a collection of users from an active, inactive or locked state into the user specified via the apiture:master
link.
This operation is invoked from the apiture:merge
link on a user resource when that user is eligible to be merged.
This changes the state
to merged
.
Body parameter
{
"_links": {
"apiture:master": {
"href": "/users/users/5150d4f2-0d94-4602-8ca8-f68d00815f63"
}
},
"items": [
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
}
},
"username": "Johnny1733",
"firstName": "John",
"middleName": "Daniel",
"lastName": "Smith",
"preferredName": "John",
"identification": [
{
"value": "111-11-1111",
"type": "taxId"
}
],
"emailAddresses": [
"api@apiture.com",
"support@apiture.com"
],
"phones": [
{
"type": "home",
"number": "(555) 555-5555"
},
{
"type": "mobile",
"number": "(999) 555-5555"
}
],
"birthdate": "1974-10-27",
"citizenship": [
{
"country": "US",
"status": "citizen"
}
],
"occupation": "Software Engineer",
"addresses": [
{
"type": "home",
"addressLine1": "555 N Front Street",
"addressLine2": "Suite 5555",
"city": "Wilmington",
"region": "NC",
"postalCode": "28401-5405",
"countryCode": "US"
},
{
"type": "home",
"addressLine1": "123 S 3rd Street",
"addressLine2": "Apt 42",
"city": "Wilmington",
"region": "NC",
"postalCode": "28411-5405",
"countryCode": "US"
}
],
"lastContactedAt": "2018-07-29T11:13:54Z",
"lastLoggedInAt": "2017-12-29T15:19:41Z",
"metadata": [],
"state": "active",
"createdAt": "2018-03-09T20:14:32Z"
},
{
"_id": "d1fabf13-31d1-4351-89ad-877ac4d1220a",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/d1fabf13-31d1-4351-89ad-877ac4d1220a"
}
},
"username": "LAS15",
"firstName": "Laura",
"middleName": "Eileen",
"lastName": "Smith",
"preferredName": "Laura",
"identification": [
{
"value": "111-11-1111",
"type": "taxId"
}
],
"emailAddresses": [
"api@apiture.com",
"support@apiture.com"
],
"phones": [
{
"type": "home",
"number": "(555) 555-5555"
},
{
"type": "mobile",
"number": "(999) 555-5555"
}
],
"birthdate": "1980-03-19",
"citizenship": [
{
"country": "US",
"status": "citizen"
}
],
"occupation": "Product Manager",
"addresses": [
{
"type": "home",
"addressLine1": "555 N Front Street",
"addressLine2": null,
"city": "Wilmington",
"region": "NC",
"postalCode": "28401-5405",
"countryCode": "US"
},
{
"type": "home",
"addressLine1": "123 S 3rd Street",
"addressLine2": "Apt 42",
"city": "Wilmington",
"region": "NC",
"postalCode": "28411-5405",
"countryCode": "US"
}
],
"lastContactedAt": "2018-07-29T11:13:54Z",
"lastLoggedInAt": "2017-12-29T15:19:41Z",
"metadata": [],
"state": "active",
"createdAt": "2018-07-29T11:13:54Z"
}
]
}
Parameters
Parameter | Description |
---|---|
body (body) |
mergeUsers (required) The data necessary to merge users. |
Example responses
200 Response
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:remove": {
"href": "/users/removedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"createdAt": "2018-03-09T20:14:32Z"
}
Responses
Status | Description |
---|---|
200 | OK |
OK | |
Schema: user | |
409 | Conflict |
Conflict. There is a conflict between the request and the current state of the resource. It may be one of the following:
| |
Schema: errorResponse | |
412 | Precondition Failed |
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim. | |
Schema: errorResponse | |
422 | Unprocessable Entity |
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error. | |
Schema: errorResponse |
Response Headers
Status | Description |
---|---|
200 | ETag string |
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this user resource. |
Schemas
abstractResource
{
"_profile": "https://api.apiture.com/schema/example/v1.0.0/profile.json",
"_links": {
"self": {
"href": "{uri of current resource}"
}
}
}
Abstract Resource
An augmented HAL resource representation. This model contains hypermedia _links
, and either optional domain object data with _profile
and optional _embedded
objects, or an _error
object. In responses, if the operation was successful, this object will not include the _error
, but if the operation was a 4xx or 5xx error, this object will not include _embedded
or any data fields, only _error
and optionally _links
.
Properties
Name | Description |
---|---|
_links | links An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
_embedded | object An optional map of nested resources, mapping each nested resource name to a nested resource representation. |
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
root
{
"id": "apiName",
"name": "API name",
"apiVersion": "0.0.1-SNAPSHOT",
"_profile": "https://api.apiture.com/schemas/common/root/v1.0.0/profile.json",
"_links": {}
}
API Root
A HAL response, with hypermedia _links
for the top-level resources and operations in API.
Properties
Name | Description |
---|---|
_links | links An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
_embedded | object An optional map of nested resources, mapping each nested resource name to a nested resource representation. |
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
_id | string This API's unique ID. |
name | string This API's name. |
apiVersion | string This API's version. |
errorResponse
{
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"_error": {
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": {},
"_links": {
"describedby": {
"href": "http://doc.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
}
}
Error Response
Describes an error response, typically returned on 4xx or 5xx errors from API operations. The _error
object contains the error details.
Properties
Name | Description |
---|---|
_links | links An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
_embedded | object An optional map of nested resources, mapping each nested resource name to a nested resource representation. |
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
error
{
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "http://doc.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
}
Error
An error description. Nested source errors are contained in the _embedded
object with the key "errors"
; this is an array of nested error objects. For example, an API which validates its request body may find multiple errors in the request, which may be detailed here. The _links
may contain a describedby
link which refers to a web page with details about the error. The attributes
field An optional map of name/value pairs which provide structured data about the error. For example, if the error is a value out of range, the attributes may specify the range values min
and max
. This allows clients to present error messages as they see fit (the API does not assume the client/presentation tier).
Properties
Name | Description |
---|---|
message | string (required) A localized message string describing the error condition. |
_id | string A unique identifier for this error instance. This may be used as a correlation ID with the root cause error (i.e. this ID may be logged at the source of the error). This is is an opaque string. |
statusCode | integer The HTTP status code associate with this error. minimum: 100
maximum: 599
|
type | string An error identifier which indicates the category of error and associate it with API support documentation or which the UI tier can use to render an appropriate message or hint. This provides a finer level of granularity than the statusCode . For example, instead of just 400 Bad Request, the type may be much more specific. such as integerValueNotInAllowedRange or numericValueExceedsMaximum or stringValueNotInAllowedSet .
|
occurredAt | string(date-time) A time stamp indicating when the error occurred. This is in RFC 3396 format: YYYY-MM-DDThh:mm:ss.sssZ
|
attributes | attributes Data attribute associated with the error, such as values or constraints. |
remediation | string An optional localized string which provides hints for how the user or client can resolve the error. |
_embedded | object Optional embedded array of errors. This field may not exist if the error does not have nested errors. |
» items | [errorResponse] An array of error objects. |
attributes
{}
Attributes
An optional map of name/value pairs which contains additional dynamic data about the resource.
Properties
No properties
links
{
"property1": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
},
"property2": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
}
}
Links
An optional map of links, mapping each link relation to a link object. This model defines the _links
object of HAL representations.
Properties
Name | Description |
---|---|
additionalProperties | link Describes a hypermedia link within a _links object in HAL representations. In Apiture APIs, links are HAL links, but Apiture APIs do not use the name or hreflang properties of HAL. Apiture links may include a method property.
|
link
{
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
}
Link
Describes a hypermedia link within a _links
object in HAL representations. In Apiture APIs, links are HAL links, but Apiture APIs do not use the name
or hreflang
properties of HAL. Apiture links may include a method
property.
Properties
Name | Description |
---|---|
href | string(uri) (required) The URI or URI template for the resource/operation this link refers to. |
type | string The media type for the resource. |
templated | boolean If true, the link's href is a URI template. |
title | string An optional human-readable localized title for the link. |
deprecation | string(uri) If present, the containing link is deprecated and the value is a URI which provides human-readable text information about the deprecation. |
profile | string(uri) The URI of a profile document, a JSON document which describes the target resource/operation. |
collection
{
"_links": {
"property1": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
},
"property2": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
}
},
"_embedded": {},
"_profile": "http://example.com",
"_error": {
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "http://doc.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
},
"count": 0,
"start": 0,
"limit": 0,
"name": "string"
}
Collection
A collection of resources. This is an abstract model schema which is extended to define specific resource collections.
Properties
Name | Description |
---|---|
_links | links An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
_embedded | object An optional map of nested resources, mapping each nested resource name to a nested resource representation. |
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
count | integer The number of items in the full collection. |
start | integer The start index of this page of items. |
limit | integer The maximum number of items per page. |
name | string The name of the collection. |
userFields
{
"username": "Johnny1733",
"firstName": "John",
"middleName": "Daniel",
"lastName": "Smith",
"preferredName": "John",
"identification": [
{
"value": "111-11-1111",
"type": "taxId"
}
],
"emailAddresses": [
"api@apiture.com",
"support@apiture.com"
],
"phones": [
{
"type": "home",
"number": "(555) 555-5555"
},
{
"type": "mobile",
"number": "(999) 555-5555"
}
],
"birthdate": "1974-10-27",
"citizenship": [
{
"country": "US",
"status": "citizen"
}
],
"occupation": "Software Engineer",
"addresses": [
{
"type": "home",
"addressLine1": "555 N Front Street",
"addressLine2": "Suite 5555",
"city": "Wilmington",
"region": "NC",
"postalCode": "28401-5405",
"countryCode": "US"
},
{
"type": "home",
"addressLine1": "123 S 3rd Street",
"addressLine2": "Apt 42",
"city": "Wilmington",
"region": "NC",
"postalCode": "28411-5405",
"countryCode": "US"
}
],
"metadata": [],
"state": "active"
}
Common fields of a user
Core fields of the user resource.
Properties
Name | Description |
---|---|
username | string There unique username for the user. |
firstName | string The user's first name (or given name). |
middleName | string The user's middle name. |
lastName | string The user's last name (or surname). |
preferredName | string The user's preferred name. This is how the user's name is presented to the user in the interface. The default is the user's firstName .
|
identification | [object] A collection of official identifying information associated with the user. This currently only supports government tax ID. taxId should be unique.
|
» value | string |
» type | string
|
» expiration | string |
phones | [object] A collection of phone numbers associated with the user. mobile should be unique.
|
» type | string
|
» number | string |
emailAddresses | [string] A collection of email addresses associated with the user |
birthdate | string(date) The user's birth date in yyyy-mm-dd format.
|
citizenship | [object] The user's citizenship. |
» country | string The ISO 3166-1 country code for the user's citizenship. |
» status | string The user's citizenship status (values TBD).
|
occupation | string The user's occupation. |
addresses | [object] The user's addresses. |
» type | string
|
» label | string |
» addressLine1 | string |
» addressLine2 | string |
» city | string |
» region | string |
» postalCode | string |
» countryCode | string |
lastContactedAt | string(date-time) The date-time when the user was last contacted. This is a computed, read-only field and will be ignored if specified as part of the request body. This is in RFC 3396 format: YYYY-MM-DDThh:mm:ss.sssZ
|
lastLoggedInAt | string(date-time) The date-time when the user last logged in. This is a computed, read-only field and will be ignored if specified as part of the request body. This is in RFC 3396 format: YYYY-MM-DDThh:mm:ss.sssZ
|
metadata | [object] Additional unstructured application metadata about the user. |
state | string The state of this user record. The default is active . Users may not be deleted, but Users with a state of active , inactive or locked may be removed by POST ing to the /removedUsers endpoint via the apiture:remove endpoint. Removed users may not be reactivated. Users with a state of active or locked may be deactivated by POST ing to the /inactiveUsers endpoint via the apiture:deactivate endpoint. Users with a state of inactive or locked may be activated by POST ing to the /activeUsers endpoint via the apiture:activate endpoint. Users with a state of active or inactive may be locked by POST qing to the /lockedUsers endpoint via the apiture:lock endpoint. Users with a state of active , inactive , or locked may be merged by POST ing to the /mergedUsers endpoint via the apiture:merge endpoint. Merged users may not have their state changed.
|
createUser
{
"_links": {
"property1": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
},
"property2": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
}
},
"_embedded": {},
"_profile": "http://example.com",
"_error": {
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "http://doc.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
},
"username": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"preferredName": "string",
"identification": [
{
"value": "string",
"type": "taxId",
"expiration": "string"
}
],
"phones": [
{
"type": "home",
"number": "string"
}
],
"emailAddresses": [
"user@example.com"
],
"birthdate": "2019-07-09",
"citizenship": [
{
"country": "string",
"status": "citizen"
}
],
"occupation": "string",
"addresses": [
{
"type": "home",
"label": "string",
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"countryCode": "string"
}
],
"lastContactedAt": "2019-07-09T10:55:35Z",
"lastLoggedInAt": "2019-07-09T10:55:35Z",
"metadata": [
{}
],
"state": "active"
}
Create User
Representation used to create a new user.
Properties
Name | Description |
---|---|
_links | links An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
_embedded | object An optional map of nested resources, mapping each nested resource name to a nested resource representation. |
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
username | string (required) There unique username for the user. |
firstName | string (required) The user's first name (or given name). |
middleName | string The user's middle name. |
lastName | string (required) The user's last name (or surname). |
preferredName | string The user's preferred name. This is how the user's name is presented to the user in the interface. The default is the user's firstName .
|
identification | [object] (required) A collection of official identifying information associated with the user. This currently only supports government tax ID. taxId should be unique.
|
» value | string |
» type | string
|
» expiration | string |
phones | [object] A collection of phone numbers associated with the user. mobile should be unique.
|
» type | string
|
» number | string |
emailAddresses | [string] A collection of email addresses associated with the user |
birthdate | string(date) (required) The user's birth date in yyyy-mm-dd format.
|
citizenship | [object] The user's citizenship. |
» country | string The ISO 3166-1 country code for the user's citizenship. |
» status | string The user's citizenship status (values TBD).
|
occupation | string The user's occupation. |
addresses | [object] The user's addresses. |
» type | string
|
» label | string |
» addressLine1 | string |
» addressLine2 | string |
» city | string |
» region | string |
» postalCode | string |
» countryCode | string |
lastContactedAt | string(date-time) The date-time when the user was last contacted. This is a computed, read-only field and will be ignored if specified as part of the request body. This is in RFC 3396 format: YYYY-MM-DDThh:mm:ss.sssZ
|
lastLoggedInAt | string(date-time) The date-time when the user last logged in. This is a computed, read-only field and will be ignored if specified as part of the request body. This is in RFC 3396 format: YYYY-MM-DDThh:mm:ss.sssZ
|
metadata | [object] Additional unstructured application metadata about the user. |
state | string The state of this user record. The default is active . Users may not be deleted, but Users with a state of active , inactive or locked may be removed by POST ing to the /removedUsers endpoint via the apiture:remove endpoint. Removed users may not be reactivated. Users with a state of active or locked may be deactivated by POST ing to the /inactiveUsers endpoint via the apiture:deactivate endpoint. Users with a state of inactive or locked may be activated by POST ing to the /activeUsers endpoint via the apiture:activate endpoint. Users with a state of active or inactive may be locked by POST qing to the /lockedUsers endpoint via the apiture:lock endpoint. Users with a state of active , inactive , or locked may be merged by POST ing to the /mergedUsers endpoint via the apiture:merge endpoint. Merged users may not have their state changed.
|
summaryUser
{
"username": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"preferredName": "string",
"identification": [
{
"value": "string",
"type": "taxId",
"expiration": "string"
}
],
"phones": [
{
"type": "home",
"number": "string"
}
],
"emailAddresses": [
"user@example.com"
],
"birthdate": "2019-07-09",
"citizenship": [
{
"country": "string",
"status": "citizen"
}
],
"occupation": "string",
"addresses": [
{
"type": "home",
"label": "string",
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"countryCode": "string"
}
],
"lastContactedAt": "2019-07-09T10:55:35Z",
"lastLoggedInAt": "2019-07-09T10:55:35Z",
"metadata": [
{}
],
"state": "active",
"_links": {
"property1": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
},
"property2": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
}
},
"_embedded": {},
"_profile": "http://example.com",
"_error": {
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "http://doc.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
},
"_id": "string"
}
Summary User
Summary representation of a user resource in user collections. This representation normally does not contain any _embedded
objects. If needed, call the GET
operation on the item's self
link to get _embedded
objects.
Properties
Name | Description |
---|---|
username | string There unique username for the user. |
firstName | string The user's first name (or given name). |
middleName | string The user's middle name. |
lastName | string The user's last name (or surname). |
preferredName | string The user's preferred name. This is how the user's name is presented to the user in the interface. The default is the user's firstName .
|
identification | [object] A collection of official identifying information associated with the user. This currently only supports government tax ID. taxId should be unique.
|
» value | string |
» type | string
|
» expiration | string |
phones | [object] A collection of phone numbers associated with the user. mobile should be unique.
|
» type | string
|
» number | string |
emailAddresses | [string] A collection of email addresses associated with the user |
birthdate | string(date) The user's birth date in yyyy-mm-dd format.
|
citizenship | [object] The user's citizenship. |
» country | string The ISO 3166-1 country code for the user's citizenship. |
» status | string The user's citizenship status (values TBD).
|
occupation | string The user's occupation. |
addresses | [object] The user's addresses. |
» type | string
|
» label | string |
» addressLine1 | string |
» addressLine2 | string |
» city | string |
» region | string |
» postalCode | string |
» countryCode | string |
lastContactedAt | string(date-time) The date-time when the user was last contacted. This is a computed, read-only field and will be ignored if specified as part of the request body. This is in RFC 3396 format: YYYY-MM-DDThh:mm:ss.sssZ
|
lastLoggedInAt | string(date-time) The date-time when the user last logged in. This is a computed, read-only field and will be ignored if specified as part of the request body. This is in RFC 3396 format: YYYY-MM-DDThh:mm:ss.sssZ
|
metadata | [object] Additional unstructured application metadata about the user. |
state | string The state of this user record. The default is active . Users may not be deleted, but Users with a state of active , inactive or locked may be removed by POST ing to the /removedUsers endpoint via the apiture:remove endpoint. Removed users may not be reactivated. Users with a state of active or locked may be deactivated by POST ing to the /inactiveUsers endpoint via the apiture:deactivate endpoint. Users with a state of inactive or locked may be activated by POST ing to the /activeUsers endpoint via the apiture:activate endpoint. Users with a state of active or inactive may be locked by POST qing to the /lockedUsers endpoint via the apiture:lock endpoint. Users with a state of active , inactive , or locked may be merged by POST ing to the /mergedUsers endpoint via the apiture:merge endpoint. Merged users may not have their state changed.
|
_links | links An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
_embedded | object An optional map of nested resources, mapping each nested resource name to a nested resource representation. |
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
_id | string The unique identifier for this user resource. This is an opaque string. |
updateUser
{
"username": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"preferredName": "string",
"identification": [
{
"value": "string",
"type": "taxId",
"expiration": "string"
}
],
"phones": [
{
"type": "home",
"number": "string"
}
],
"emailAddresses": [
"user@example.com"
],
"birthdate": "2019-07-09",
"citizenship": [
{
"country": "string",
"status": "citizen"
}
],
"occupation": "string",
"addresses": [
{
"type": "home",
"label": "string",
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"countryCode": "string"
}
],
"lastContactedAt": "2019-07-09T10:55:35Z",
"lastLoggedInAt": "2019-07-09T10:55:35Z",
"metadata": [
{}
],
"state": "active",
"_links": {
"property1": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
},
"property2": {
"href": "http://example.com",
"type": "string",
"templated": true,
"title": "string",
"deprecation": "http://example.com",
"profile": "http://example.com"
}
},
"_embedded": {},
"_profile": "http://example.com",
"_error": {
"_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
"_profile": "https://api.apiture.com/schemas/common/errorResponse/v1.0.0/profile.json",
"message": "The value for deposit must be greater than 0.",
"statusCode": 422,
"type": "positiveNumberRequired",
"attributes": {
"value": -125.5
},
"remediation": "Provide a value which is greater than 0",
"occurredAt": "2018-01-25T05:50:52.375Z",
"_links": {
"describedby": {
"href": "http://doc.apiture.com/errors/positiveNumberRequired"
}
},
"_embedded": {
"errors": []
}
},
"_id": "string",
"createdAt": "2019-07-09T10:55:35Z"
}
Update User
Representation used to update or patch a user.
Properties
Name | Description |
---|---|
username | string There unique username for the user. |
firstName | string The user's first name (or given name). |
middleName | string The user's middle name. |
lastName | string The user's last name (or surname). |
preferredName | string The user's preferred name. This is how the user's name is presented to the user in the interface. The default is the user's firstName .
|
identification | [object] A collection of official identifying information associated with the user. This currently only supports government tax ID. taxId should be unique.
|
» value | string |
» type | string
|
» expiration | string |
phones | [object] A collection of phone numbers associated with the user. mobile should be unique.
|
» type | string
|
» number | string |
emailAddresses | [string] A collection of email addresses associated with the user |
birthdate | string(date) The user's birth date in yyyy-mm-dd format.
|
citizenship | [object] The user's citizenship. |
» country | string The ISO 3166-1 country code for the user's citizenship. |
» status | string The user's citizenship status (values TBD).
|
occupation | string The user's occupation. |
addresses | [object] The user's addresses. |
» type | string
|
» label | string |
» addressLine1 | string |
» addressLine2 | string |
» city | string |
» region | string |
» postalCode | string |
» countryCode | string |
lastContactedAt | string(date-time) The date-time when the user was last contacted. This is a computed, read-only field and will be ignored if specified as part of the request body. This is in RFC 3396 format: YYYY-MM-DDThh:mm:ss.sssZ
|
lastLoggedInAt | string(date-time) The date-time when the user last logged in. This is a computed, read-only field and will be ignored if specified as part of the request body. This is in RFC 3396 format: YYYY-MM-DDThh:mm:ss.sssZ
|
metadata | [object] Additional unstructured application metadata about the user. |
state | string The state of this user record. The default is active . Users may not be deleted, but Users with a state of active , inactive or locked may be removed by POST ing to the /removedUsers endpoint via the apiture:remove endpoint. Removed users may not be reactivated. Users with a state of active or locked may be deactivated by POST ing to the /inactiveUsers endpoint via the apiture:deactivate endpoint. Users with a state of inactive or locked may be activated by POST ing to the /activeUsers endpoint via the apiture:activate endpoint. Users with a state of active or inactive may be locked by POST qing to the /lockedUsers endpoint via the apiture:lock endpoint. Users with a state of active , inactive , or locked may be merged by POST ing to the /mergedUsers endpoint via the apiture:merge endpoint. Merged users may not have their state changed.
|
_links | links An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
_embedded | object An optional map of nested resources, mapping each nested resource name to a nested resource representation. |
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
_id | string The unique identifier for this user resource. This is an opaque string. |
createdAt | string(date-time) The date-time when the user was created. read-only |
mergeUsers
{
"_links": {
"apiture:master": {
"href": "/users/users/5150d4f2-0d94-4602-8ca8-f68d00815f63"
}
},
"items": [
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
}
},
"username": "Johnny1733",
"firstName": "John",
"middleName": "Daniel",
"lastName": "Smith",
"preferredName": "John",
"identification": [
{
"value": "111-11-1111",
"type": "taxId"
}
],
"emailAddresses": [
"api@apiture.com",
"support@apiture.com"
],
"phones": [
{
"type": "home",
"number": "(555) 555-5555"
},
{
"type": "mobile",
"number": "(999) 555-5555"
}
],
"birthdate": "1974-10-27",
"citizenship": [
{
"country": "US",
"status": "citizen"
}
],
"occupation": "Software Engineer",
"addresses": [
{
"type": "home",
"addressLine1": "555 N Front Street",
"addressLine2": "Suite 5555",
"city": "Wilmington",
"region": "NC",
"postalCode": "28401-5405",
"countryCode": "US"
},
{
"type": "home",
"addressLine1": "123 S 3rd Street",
"addressLine2": "Apt 42",
"city": "Wilmington",
"region": "NC",
"postalCode": "28411-5405",
"countryCode": "US"
}
],
"lastContactedAt": "2018-07-29T11:13:54Z",
"lastLoggedInAt": "2017-12-29T15:19:41Z",
"metadata": [],
"state": "active",
"createdAt": "2018-03-09T20:14:32Z"
},
{
"_id": "d1fabf13-31d1-4351-89ad-877ac4d1220a",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/d1fabf13-31d1-4351-89ad-877ac4d1220a"
}
},
"username": "LAS15",
"firstName": "Laura",
"middleName": "Eileen",
"lastName": "Smith",
"preferredName": "Laura",
"identification": [
{
"value": "111-11-1111",
"type": "taxId"
}
],
"emailAddresses": [
"api@apiture.com",
"support@apiture.com"
],
"phones": [
{
"type": "home",
"number": "(555) 555-5555"
},
{
"type": "mobile",
"number": "(999) 555-5555"
}
],
"birthdate": "1980-03-19",
"citizenship": [
{
"country": "US",
"status": "citizen"
}
],
"occupation": "Product Manager",
"addresses": [
{
"type": "home",
"addressLine1": "555 N Front Street",
"addressLine2": null,
"city": "Wilmington",
"region": "NC",
"postalCode": "28401-5405",
"countryCode": "US"
},
{
"type": "home",
"addressLine1": "123 S 3rd Street",
"addressLine2": "Apt 42",
"city": "Wilmington",
"region": "NC",
"postalCode": "28411-5405",
"countryCode": "US"
}
],
"lastContactedAt": "2018-07-29T11:13:54Z",
"lastLoggedInAt": "2017-12-29T15:19:41Z",
"metadata": [],
"state": "active",
"createdAt": "2018-07-29T11:13:54Z"
}
]
}
Merge Users
Representation used to merge a set of users into a master user.
Properties
Name | Description |
---|---|
items | [user] Array of users to merge. |
_links | links An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
user
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:remove": {
"href": "/users/removedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"createdAt": "2018-03-09T20:14:32Z"
}
User
Representation of a user resource. A user may have the following links:
self
: A link to the user resource.apiture:remove
: A link to remove the current user (viaPOST
). This link only exists if the user resource is notremoved
and if the caller is authorized to remove users.apiture:activate
: A link to activate the current user (viaPOST
). This link only exists if the user resource isinactive
orlocked
and if the caller is authorized to activate users.apiture:deactivate
: A link to deactivate the current user (viaPOST
). This link only exists if the user resource isactive
orlocked
and if the caller is authorized to deactivate users.apiture:lock
: A link to lock the current user (viaPOST
). This link only exists if the user resource isactive
orinactive
and if the caller is authorized to lock users.apiture:merge
: A link to merge the current user (or a collection of users) with a specified master user (viaPOST
). This link only exists if the user resource isactive
,inactive
, orlocked
and if the caller is authorized to merge users.
Properties
Name | Description |
---|---|
username | string There unique username for the user. |
firstName | string The user's first name (or given name). |
middleName | string The user's middle name. |
lastName | string The user's last name (or surname). |
preferredName | string The user's preferred name. This is how the user's name is presented to the user in the interface. The default is the user's firstName .
|
identification | [object] A collection of official identifying information associated with the user. This currently only supports government tax ID. taxId should be unique.
|
» value | string |
» type | string
|
» expiration | string |
phones | [object] A collection of phone numbers associated with the user. mobile should be unique.
|
» type | string
|
» number | string |
emailAddresses | [string] A collection of email addresses associated with the user |
birthdate | string(date) The user's birth date in yyyy-mm-dd format.
|
citizenship | [object] The user's citizenship. |
» country | string The ISO 3166-1 country code for the user's citizenship. |
» status | string The user's citizenship status (values TBD).
|
occupation | string The user's occupation. |
addresses | [object] The user's addresses. |
» type | string
|
» label | string |
» addressLine1 | string |
» addressLine2 | string |
» city | string |
» region | string |
» postalCode | string |
» countryCode | string |
lastContactedAt | string(date-time) The date-time when the user was last contacted. This is a computed, read-only field and will be ignored if specified as part of the request body. This is in RFC 3396 format: YYYY-MM-DDThh:mm:ss.sssZ
|
lastLoggedInAt | string(date-time) The date-time when the user last logged in. This is a computed, read-only field and will be ignored if specified as part of the request body. This is in RFC 3396 format: YYYY-MM-DDThh:mm:ss.sssZ
|
metadata | [object] Additional unstructured application metadata about the user. |
state | string The state of this user record. The default is active . Users may not be deleted, but Users with a state of active , inactive or locked may be removed by POST ing to the /removedUsers endpoint via the apiture:remove endpoint. Removed users may not be reactivated. Users with a state of active or locked may be deactivated by POST ing to the /inactiveUsers endpoint via the apiture:deactivate endpoint. Users with a state of inactive or locked may be activated by POST ing to the /activeUsers endpoint via the apiture:activate endpoint. Users with a state of active or inactive may be locked by POST qing to the /lockedUsers endpoint via the apiture:lock endpoint. Users with a state of active , inactive , or locked may be merged by POST ing to the /mergedUsers endpoint via the apiture:merge endpoint. Merged users may not have their state changed.
|
_links | links An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
_embedded | object An optional map of nested resources, mapping each nested resource name to a nested resource representation. |
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
_id | string The unique identifier for this user resource. This is an opaque string. |
createdAt | string(date-time) The date-time when the user was created. read-only |
users
{
"_profile": "https://api.apiture.com/schemas/users/users/v1.0.0/profile.json",
"start": 0,
"limit": 10,
"count": 2,
"name": "users",
"_links": {
"self": {
"href": "/users?start=0&limit=10"
},
"first": {
"href": "/users?start=10&limit=10"
},
"next": {
"href": "/users?start=10&limit=10"
},
"collection": {
"href": "/users"
}
},
"_embedded": {
"items": [
{
"_id": "9604e5f8-da29-4197-b6fb-60a1cfecfba8",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:remove": {
"href": "/users/removedUsers?user=9604e5f8-da29-4197-b6fb-60a1cfecfba8"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"username": "Johnny1733",
"firstName": "John",
"middleName": "Daniel",
"lastName": "Smith",
"preferredName": "John",
"identification": [
{
"value": "111-11-1111",
"type": "taxId"
}
],
"emailAddresses": [
"api@apiture.com",
"support@apiture.com"
],
"phones": [
{
"type": "home",
"number": "(555) 555-5555"
},
{
"type": "mobile",
"number": "(999) 555-5555"
}
],
"birthdate": "1974-10-27",
"citizenship": [
{
"country": "US",
"status": "citizen"
}
],
"occupation": "Software Engineer",
"addresses": [
{
"type": "home",
"addressLine1": "555 N Front Street",
"addressLine2": "Suite 5555",
"city": "Wilmington",
"region": "NC",
"postalCode": "28401-5405",
"countryCode": "US"
},
{
"type": "home",
"addressLine1": "123 S 3rd Street",
"addressLine2": "Apt 42",
"city": "Wilmington",
"region": "NC",
"postalCode": "28411-5405",
"countryCode": "US"
}
],
"lastContactedAt": "2018-07-29T11:13:54Z",
"lastLoggedInAt": "2017-12-29T15:19:41Z",
"metadata": [],
"state": "active",
"createdAt": "2018-03-09T20:14:32Z"
},
{
"_id": "d1fabf13-31d1-4351-89ad-877ac4d1220a",
"_profile": "https://api.apiture.com/schemas/users/user/v.0.1.0/profile.json",
"_links": {
"self": {
"href": "/users/users/d1fabf13-31d1-4351-89ad-877ac4d1220a"
},
"apiture:deactivate": {
"href": "/users/inactiveUsers?user=d1fabf13-31d1-4351-89ad-877ac4d1220a"
},
"apiture:lock": {
"href": "/users/lockedUsers?user=d1fabf13-31d1-4351-89ad-877ac4d1220a"
},
"apiture:remove": {
"href": "/users/removedUsers?user=d1fabf13-31d1-4351-89ad-877ac4d1220a"
},
"apiture:merge": {
"href": "/users/mergedUsers"
}
},
"username": "LAS15",
"firstName": "Laura",
"middleName": "Eileen",
"lastName": "Smith",
"preferredName": "Laura",
"identification": [
{
"value": "111-11-1111",
"type": "taxId"
}
],
"emailAddresses": [
"api@apiture.com",
"support@apiture.com"
],
"phones": [
{
"type": "home",
"number": "(555) 555-5555"
},
{
"type": "mobile",
"number": "(999) 555-5555"
}
],
"birthdate": "1980-03-19",
"citizenship": [
{
"country": "US",
"status": "citizen"
}
],
"occupation": "Product Manager",
"addresses": [
{
"type": "home",
"addressLine1": "555 N Front Street",
"addressLine2": "Suite 5555",
"city": "Wilmington",
"region": "NC",
"postalCode": "28401-5405",
"countryCode": "US"
},
{
"type": "home",
"addressLine1": "123 S 3rd Street",
"addressLine2": "Apt 42",
"city": "Wilmington",
"region": "NC",
"postalCode": "28411-5405",
"countryCode": "US"
}
],
"lastContactedAt": "2018-07-29T11:13:54Z",
"lastLoggedInAt": "2017-12-29T15:19:41Z",
"metadata": [],
"state": "active",
"createdAt": "2018-07-29T11:13:54Z"
}
]
}
}
Users collection
Collection of users. The items in the collection are ordered in the _embedded
object with name items
. The top-level _links
object may contain pagination links (self
, next
, prev
, first
, last
, collection
).
Properties
Name | Description |
---|---|
_links | links An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
|
_embedded | object Embedded objects. |
» items | [summaryUser] [Summary representation of a user resource in user collections. This representation normally does not contain any _embedded objects. If needed, call the GET operation on the item's self link to get _embedded objects.]
|
_profile | string(uri) The URI of a resource profile which describes the representation. |
_error | error An object which describes an error. This value is omitted if the operation succeeded without error. |
count | integer The number of items in the full collection. |
start | integer The start index of this page of items. |
limit | integer The maximum number of items per page. |
name | string The name of the collection. |