The core api
A command to assign roles to a worker in an ASG
Path /roles/workers/[worker-id]/[application-service-group-id]
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "role/ClinicalManager",
"@type": "Role"
},
{
"@id": "role/Clinician",
"@type": "Role"
}
]
}
Constraints
{
"type": "object",
"properties": {
"@graph": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@id": {
"type": "string"
},
"@type": {
"type": "string"
}
},
"required": [
"@id",
"@type"
]
}
}
},
"required": [
"@graph"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerRolesAssignedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[worker-id]",
"@type": "Worker"
},
{
"@id": "YoungPeople",
"@type": "ApplicationServiceGroup"
},
{
"@id": "ClinicalManager",
"@type": "Role"
},
{
"@id": "Clinician",
"@type": "Role"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 409
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity conflicts with an pre-existing entity - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
WorkerRolesAssignedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerRolesAssignedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[worker-id]",
"@type": "Worker"
},
{
"@id": "YoungPeople",
"@type": "ApplicationServiceGroup"
},
{
"@id": "ClinicalManager",
"@type": "Role"
},
{
"@id": "Clinician",
"@type": "Role"
}
]
}
[#] [back to top]
OAuth2 Token endpoint following refresh token flow following RFC-6749. Parameter values should be URL-encoded.
Path /token
grant_type=refresh_token&refresh_token=eyJhbGciO
Responses
Status code: 200
{
"access_token": "eyJhbGciO...iJIw",
"token_type": "Bearer",
"expires_in": 900
}
Status code: 400
{
"error":"invalid_request",
"error_description": "lorem ipsum",
}
Emits
[#] [back to top]
OAuth2 Token endpoint following resource owner credentials flow following RFC-6749. Parameter values should be URL-encoded.
Path /token
grant_type=password&username=foobar%7Eemail@example.com&password=pass%21word&scope=applicationServiceGroupId%3Aasg%2FYoungPeople%20applicationId%3A000d1d88-5b43-487e-8ad5-df64794c9e1d
Responses
Status code: 200
{
"access_token": "eyJhbGciO...iJIw",
"token_type": "Bearer",
"expires_in": 900
}
Status code: 400
{
"error":"invalid_request",
"error_description": "lorem ipsum",
}
Emits
[#] [back to top]
OAuth2 Token endpoint following custom verification token flow allowed by RFC-6749. Parameter values should be URL-encoded.
Path /token
grant_type=com.xenzone.verification_token&verification_token=eyJhbGciO
Responses
Status code: 200
{
"access_token": "eyJhbGciO...iJIw",
"token_type": "Bearer",
"expires_in": 900
}
Status code: 400
{
"error":"invalid_request",
"error_description": "lorem ipsum",
}
Emits
[#] [back to top]
Checks if a username exists for a service user
Path /credentials/service-users/check-username-existsResponses
Status code: 200
{
'exists': true
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
A command to create service-user credentials
Path /credentials/service-users/[service-user-id] or /credentials/service-users/me
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "UsernamePasswordCredential",
"password": "Strong password",
"username": "UseRname"
}
Constraints
{
"title": "CreateServiceUserCredentials",
"type": "object",
"properties": {
"@type": {
"type": "string",
},
"password": {
"type": "string",
"minLength": 8,
"pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,}"
},
"username": {
"type": "string",
"pattern": "^.+@.+$"
},
"active": {
"type": "boolean",
"default": true
}
},
"required": [
"@type",
"password",
"username"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ServiceUserCredentialsCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 409
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity conflicts with an pre-existing entity - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ServiceUserCredentialsCreateFailedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "ServiceUserCredentialsCreateFailedEvent",
"atTime": "2018-01-05T16:56:15+00:00",
"causedBy": "commands/[command-uuid]"
}
ServiceUserCredentialsCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ServiceUserCredentialsCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
}
]
}
[#] [back to top]
A command to create worker credentials
Path /credentials/workers/[worker-id] or /credentials/workers/me
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "UsernamePasswordCredential",
"password": "Strong password",
"username": "UseRname"
}
Constraints
{
"title": "CreateWorkerCredentials",
"type": "object",
"properties": {
"@type": {
"type": "string",
},
"password": {
"type": "string",
"minLength": 8,
"pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,}"
},
"username": {
"type": "string",
"pattern": "^.+@.+$"
},
"active": {
"type": "boolean",
"default": true
}
},
"required": [
"@type",
"password",
"username"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerCredentialsCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 409
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity conflicts with an pre-existing entity - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
WorkerCredentialsCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerCredentialsCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
}
]
}
WorkerCredentialsCreateFailedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"atTime": "2018-01-05T16:56:15+00:00"
}
[#] [back to top]
A command to get assigned roles for a worker in an ASG
Path /roles/workers/[worker-id]/[application-service-group-id]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "ClinicalManager",
"@type": "Role"
},
{
"@id": "Clinician",
"@type": "Role"
}
],
"pagination": {
"currentPage": 5,
"perPage": 20,
"total": 521
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get service user credentials
Path /credentials/service-usersResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "UsernamePasswordCredentials",
"username": "Username",
"active": false,
"privateReason": "They were rude to one of the Workers",
"publicReason": "They did not follow our acceptable behaviour policies"
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get service user credentials by service user ID
Path /credentials/service-users/[service-user-id] or /credentials/service-users/meResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "UsernamePasswordCredentials",
"username": "Username",
"active": false,
"privateReason": "They were rude to one of the Workers",
"publicReason": "They did not follow our acceptable behaviour policies"
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
A command to update assigned roles to a worker in an ASG
Path /roles/workers/[worker-id]/[application-service-group-id]
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "ClinicalManager",
"@type": "Role"
},
{
"@id": "Clinician",
"@type": "Role"
}
]
}
Constraints
{
"type": "object",
"properties": {
"@graph": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@id": {
"type": "string"
},
"@type": {
"type": "string"
}
},
"required": [
"@id",
"@type"
]
}
}
},
"required": [
"@graph"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerRolesAssignedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[worker-id]",
"@type": "Worker"
},
{
"@id": "YoungPeople",
"@type": "ApplicationServiceGroup"
},
{
"@id": "ClinicalManager",
"@type": "Role"
},
{
"@id": "Clinician",
"@type": "Role"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
WorkerRolesAssignedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerRolesAssignedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[worker-id]",
"@type": "Worker"
},
{
"@id": "YoungPeople",
"@type": "ApplicationServiceGroup"
},
{
"@id": "ClinicalManager",
"@type": "Role"
},
{
"@id": "Clinician",
"@type": "Role"
}
]
}
[#] [back to top]
A command to update service-user credentials
Path /credentials/service-users/[service-user-id] or /credentials/service-users/me
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "UsernamePasswordCredential",
"password": "Strong password",
"active": false,
"privateReason": "They were rude to one of the Workers",
"publicReason": "They did not follow our acceptable behaviour policies"
}
Constraints
{
"title": "UpdateServiceUserCredentials",
"type": "object",
"properties": {
"@type": {
"type": "string",
},
"password": {
"type": "string",
"minLength": 8,
"pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,}"
},
"active": {
"type": "boolean",
"default": true
}
},
"required": [
"@type",
"password"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ServiceUserCredentialsUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ServiceUserCredentialsUpdateFailedEvent
{
"@id": "[event-id]",
"@type": "ServiceUserCredentialsUpdateFailedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
}
ServiceUserCredentialsUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ServiceUserCredentialsUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
}
]
}
[#] [back to top]
A command to update worker credentials
Path /credentials/workers/[worker-id] or /credentials/workers/me
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "UsernamePasswordCredential",
"password": "Strong password",
"active": true
}
Constraints
{
"title": "UpdateWorkerCredentials",
"type": "object",
"properties": {
"@type": {
"type": "string",
},
"password": {
"type": "string",
"minLength": 8,
"pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,}"
},
"active": {
"type": "boolean",
"default": true
}
},
"required": [
"@type",
"password"
]
}
Responses
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
WorkerCredentialsUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerCredentialsUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
}
]
}
WorkerCredentialsUpdateFailedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"atTime": "2018-01-05T16:56:15+00:00"
}
[#] [back to top]
A command to create an application contract for a customer
Path /contracts
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Contract",
"name":"contract name",
"customer": {
"@type": "Customer",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d"
},
"startDate": "2018-01-10T16:56:15Z",
"endDate": "2018-01-11T16:56:15Z",
"effectiveDate": "2018-01-10T16:56:15Z",
"active": true,
"coverage": {
"@type": "Coverage",
"applicationCoverage" : {
"@type":"Application",
"@id": "96593da2-29ec-4d40-9cf1-b8cdbb4a9764"
},
"monthlyCounsellingHours" : 12345,
"monthlyIandPHours" : 12335,
"monthlyDynamicModerationHours" : 12345,
"minAge" : 11,
"maxAge" : 18,
"faceToFace" : true,
"subLocation" : [
{ "@type": "SubLocation", "name": "Cambridgeshire"},
{ "@type": "SubLocation", "name": "Lancashire"}
]
},
"contactName": "Joe Bloggs"
}
Constraints
{
"title": "CreateContract",
"type": "object",
"properties": {
"@type": { "type": "string", "enum": ["Contract"], "default": "Contract" },
"name" { "type":"string" },
"customer": {
"type": "object",
"properties": {
"@type": { "type": "string", "enum": ["Customer"], "default": "Customer" },
"@id": { "type": "string" }
},
"required": ["@id"]
},
"startDate": { "type": "string", "minLength": 20, "maxLength": 20 },
"endDate": { "type": "string", "minLength": 20, "maxLength": 20 },
"effectiveDate": { "type": "string", "minLength": 20, "maxLength": 20 },
"active": { "type": "boolean", "default": false },
"coverage": {
"type": "object",
"properties": {
"@type": { "type": "string" },
"applicationCoverage": {
"type": "object",
"properties" : {
"@type": { "type": "string", "enum": ["Application"], "default": "Application" },
"@id": { "type": "string" }
},
"required": ["@id"]
},
"monthlyCounsellingHours": { "type": "integer", "min": 0 },
"monthlyIandPHours": { "type": "integer", "min": 0 },
"monthlyDynamicModerationHours": { "type": "integer", "min": 0 },
"minAge": { "type":"number", "min": 1 },
"maxAge": { "type":"number", "min": 1, "max": 99 },
"faceToFace": { "type": "boolean" },
"subLocation" : {
"type":"array",
"items": {
"type": "object" ,
"properties": {
"@type": { "type": "string" },
"name": { "type": "string" }
}
}
}
},
"required": [
"@type",
"customer",
"applicationCoverage",
"monthlyCounsellingHours",
"monthlyIandPHours",
"monthlyDynamicModerationHours",
"minAge",
"maxAge",
"faceToFace"
"subLocation",
]
},
"contactName": { "type": "string", "minLength": 1 }
},
"required": [
"@type",
"coverage",
"name",
"startDate",
"endDate",
"effectiveDate",
"active",
"contactName"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@id": "1411ed16-928a-4110-8149-0244ecfc8403",
"@type" : "ContractCreatedEvent",
"causedBy": "commands/5677d224-22c2-4a8f-8b14-60488e762dbf",
"atTime": "2018-01-10T16:56:15+00:00"
},
{
"@id": "3fdeb8f0-2c82-428d-b685-8353604e34d4",
"@type": "Contract",
"name": "Contract name",
"customer": {
"@type": "Customer",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d"
},
"startDate": "2018-01-10T16:56:15Z",
"endDate": "2018-01-11T16:56:15Z",
"effectiveDate": "2018-01-10T16:56:15Z",
"active": true,
"coverage": {
"@type": "Coverage",
"applicationCoverage" : {
"@type": "Application",
"@id": "96593da2-29ec-4d40-9cf1-b8cdbb4a9764",
},
"monthlyCounsellingHours" : 12345,
"monthlyIandPHours" : 12335,
"monthlyDynamicModerationHours" : 12345,
"minAge" : 11,
"maxAge" : 18,
"faceToface" : true,
"subLocation" : [
{ "@type": "SubLocation", "name": "Cambridgeshire" },
{ "@type": "SubLocation", "name": "Lancashire" }
],
"contactName": "Joe Bloggs"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ContractCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@id": "1411ed16-928a-4110-8149-0244ecfc8403",
"@type" : "ContractCreatedEvent",
"causedBy": "commands/5677d224-22c2-4a8f-8b14-60488e762dbf",
"atTime": "2018-01-10T16:56:15+00:00"
},
{
"@id": "3fdeb8f0-2c82-428d-b685-8353604e34d4",
"@type": "Contract",
"name": "Contract name",
"customer": {
"@type": "Customer",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d"
},
"startDate": "2018-01-10T16:56:15Z",
"endDate": "2018-01-11T16:56:15Z",
"effectiveDate": "2018-01-10T16:56:15Z",
"active": true,
"coverage": {
"@type": "Coverage",
"applicationCoverage" : {
"@type": "Application",
"@id": "96593da2-29ec-4d40-9cf1-b8cdbb4a9764",
},
"monthlyCounsellingHours" : 12345,
"monthlyIandPHours" : 12335,
"monthlyDynamicModerationHours" : 12345,
"minAge" : 11,
"maxAge" : 18,
"faceToface" : true,
"subLocation" : [
{ "@type": "SubLocation", "name": "Cambridgeshire" },
{ "@type": "SubLocation", "name": "Lancashire" }
],
"contactName": "Joe Bloggs"
}
}
]
}
[#] [back to top]
A command to create a customer
Path /customers
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": { "@id": "University", "@type": "UniversityCustomer" },
"name": "customer name",
"contactName": "the name of a customer contact",
"emailAddress": "customer email address e.g jack@jill.com",
"fullAddress": "customers full physical address",
"telephoneNumber":"123456",
"organisationRegistration" : "companies house number"
}
Constraints
{
"title": "CreateCustomer",
"type": "object",
"properties": {
"@type": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"enum": [
"Consumer",
"Intermediary",
"LocalAuthority",
"University"
]
},
"@type": {
"type": "string",
"enum": [
"ConsumerCustomer",
"IntermediaryCustomer",
"LocalAuthorityCustomer",
"UniversityCustomer"
]
}
},
"required": ["@id", "@type"]
},
"name": { "type": "string" },
"contactName": { "type": "string" }
,
"emailAddress": { "type": "string", "format": "email" },
"fullAddress": { "type": "string" },
"telephoneNumber": { "type":"string", "format": "phone" },
"organisationRegistration": { "type":"string" }
},
"required": ["@type", "name","contactName","emailAddress","fullAddress","telephoneNumber"]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "CustomerCreatedEvent"},
{
"@id": "6de5bb4e-6f81-4f85-82cf-8bca85703fab",
"@type": "UniversityCustomer",
"name": "customer name",
"contactName": "the name of a customer contact",
"emailAddress": "customer email address",
"fullAddress": "customers full physical address",
"telephoneNumber":"customers telephone number",
"organisationRegistration" : "companies house number"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
CustomerCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "CustomerCreatedEvent"},
{
"@id": "6de5bb4e-6f81-4f85-82cf-8bca85703fab",
"@type": "UniversityCustomer",
"name": "customer name",
"contactName": "the name of a customer contact",
"emailAddress": "customer email address",
"fullAddress": "customers full physical address",
"telephoneNumber":"customers telephone number",
"organisationRegistration" : "companies house number"
}
]
}
[#] [back to top]
A command to delete a contract
Path /contracts/[id]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@id": "5b0c5ae6-10dc-47a5-9dc4-922d14dd0c2f",
"@type" : "ContractDeletedEvent",
"causedBy": "commands/beebb503-5be9-410f-a244-a5f374d6d4de",
"atTime": "2018-01-10T13:38:23.000Z"
},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "5b0c5ae6-10dc-47a5-9dc4-922d14dd0c2f",
"@type": "Contract",
"name":"contract name",
"customer": {
"@type": "Customer",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d"
},
"startDate": "2018-01-10T16:56:15Z",
"endDate": "2018-01-11T16:56:15Z",
"effectiveDate": "2018-01-10T16:56:15Z",
"active": true,
"coverage": {
"@type": "Coverage",
"applicationCoverage" : {
"@type":"Application",
"@id": "96593da2-29ec-4d40-9cf1-b8cdbb4a9764"
},
"monthlyCounsellingHours" : 12345,
"monthlyIandPHours" : 12335,
"monthlyDynamicModerationHours" : 12345,
"minAge" : 11,
"maxAge" : 18,
"faceToFace" : true,
"subLocation" : [
{ "@type": "SubLocation", "name": "Cambridgeshire" },
{ "@type": "SubLocation", "name": "Lancashire" }
]
},
"contactName": "Joe Bloggs"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ContractDeletedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@id": "5b0c5ae6-10dc-47a5-9dc4-922d14dd0c2f",
"@type" : "ContractDeletedEvent",
"causedBy": "commands/beebb503-5be9-410f-a244-a5f374d6d4de",
"atTime": "2018-01-10T13:38:23.000Z"
},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "5b0c5ae6-10dc-47a5-9dc4-922d14dd0c2f",
"@type": "Contract",
"name":"contract name",
"customer": {
"@type": "Customer",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d"
},
"startDate": "2018-01-10T16:56:15Z",
"endDate": "2018-01-11T16:56:15Z",
"effectiveDate": "2018-01-10T16:56:15Z",
"active": true,
"coverage": {
"@type": "Coverage",
"applicationCoverage" : {
"@type":"Application",
"@id": "96593da2-29ec-4d40-9cf1-b8cdbb4a9764"
},
"monthlyCounsellingHours" : 12345,
"monthlyIandPHours" : 12335,
"monthlyDynamicModerationHours" : 12345,
"minAge" : 11,
"maxAge" : 18,
"faceToFace" : true,
"subLocation" : [
{ "@type": "SubLocation", "name": "Cambridgeshire" },
{ "@type": "SubLocation", "name": "Lancashire" }
]
},
"contactName": "Joe Bloggs"
}
]
}
[#] [back to top]
A command to get applications
Path /applicationsResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "763fb57f-4186-4d4e-92a1-30c087612c0a",
"@type": "Application",
"name": "Kooth",
"applicationServiceGroup": {
"@id": "asg/YoungPerson",
"@type": "ApplicationServiceGroup"
}
}
]
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get a contract
Path /contracts/[contract-id]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "3fdeb8f0-2c82-428d-b685-8353604e34d4",
"@type": "Contract",
"customer": {
"@type": "Customer",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d",
"name": "Customer name"
},
"startDate": "2018-01-10T16:56:15Z",
"endDate": "2018-01-11T16:56:15Z",
"effectiveDate": "2018-01-10T16:56:15Z",
"active": true,
"coverage": {
"@type": "Coverage",
"applicationCoverage" : {
"@type": "Application",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d",
},
"monthlyCounsellingHours" : 12345,
"monthlyIandPHours" : 12335,
"monthlyDynamicModerationHours" : 12345,
"minAge" : 11,
"maxAge" : 18,
"faceToface" : true,
"subLocation" : [
{ "@type": "SubLocation", "name": "Cambridgeshire" },
{ "@type": "SubLocation", "name": "Lancashire" }
],
"contactName": "Joe Bloggs"
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get all contracts
Path /contracts/Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "3fdeb8f0-2c82-428d-b685-8353604e34d4",
"@type": "Contract",
"customer": {
"@type": "Customer",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d",
"name": "Customer name"
},
"startDate": "2018-01-10T16:56:15Z",
"endDate": "2018-01-11T16:56:15Z",
"effectiveDate": "2018-01-10T16:56:15Z",
"active": true,
"coverage": {
"@type": "Coverage",
"applicationCoverage" : {
"@type": "Application",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d",
},
"monthlyCounsellingHours" : 12345,
"monthlyIandPHours" : 12335,
"monthlyDynamicModerationHours" : 12345,
"minAge" : 11,
"maxAge" : 18,
"faceToface" : true,
"subLocation" : [
{ "@type": "SubLocation", "name": "Cambridgeshire" },
{ "@type": "SubLocation", "name": "Lancashire" }
],
"contactName": "Joe Bloggs"
}
},
{
"@id": "3fdeb8f0-2c82-428d-b685-8353604e34d5",
"@type": "Contract",
"customer": {
"@type": "Customer",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d",
"name": "Customer name 2"
},
"startDate": "2018-01-10T16:56:15Z",
"endDate": "2018-01-11T16:56:15Z",
"effectiveDate": "2018-01-10T16:56:15Z",
"active": true,
"coverage": {
"@type": "Coverage",
"applicationCoverage" : {
"@type": "Application",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d",
},
"monthlyCounsellingHours" : 12345,
"monthlyIandPHours" : 12335,
"monthlyDynamicModerationHours" : 12345,
"minAge" : 11,
"maxAge" : 18,
"faceToface" : true,
"subLocation" : [
{ "@type": "SubLocation", "name": "Cambridgeshire" },
{ "@type": "SubLocation", "name": "Lancashire" }
],
"contactName": "Joe Bloggs"
}
}
],
"pagination":
{
"currentPage": 5,
"perPage": 20,
"total": 521
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
A command to create a customer
Path /customers/[customer-id]/Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "6de5bb4e-6f81-4f85-82cf-8bca85703fab",
"@type": "UniversityCustomer",
"name": "customer name",
"contactName": "the name of a customer contact",
"emailAddress": "customer email address",
"fullAddress": "customers full physical address",
"telephoneNumber":"customers telephone number",
"organisationRegistration" : "companies house number"
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
CustomerCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "CustomerCreatedEvent"},
{
"@id": "6de5bb4e-6f81-4f85-82cf-8bca85703fab",
"@type": "UniversityCustomer",
"name": "customer name",
"contactName": "the name of a customer contact",
"emailAddress": "customer email address",
"fullAddress": "customers full physical address",
"telephoneNumber":"customers telephone number",
"organisationRegistration" : "companies house number"
}
]
}
[#] [back to top]
Get customers, with search
Path /customersResponses
Status code: 200
{
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{"@type": "Customer", "name" : "customer name" "@id":"6de5bb4e-6f81-4f85-82cf-8bca85703fab"},
{"@type": "Customer", "name" : "customer two" "@id":"6de5bb4e-6f81-4f85-82cf-8bca85703fac"}
],
"pagination":
{
"currentPage": 5,
"perPage": 20,
"total": 521
}
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
A command to update a contract
Path /contracts/[id]
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "5b0c5ae6-10dc-47a5-9dc4-922d14dd0c2f",
"@type": "Contract",
"name":"contract name",
"customer": {
"@type": "Customer",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d"
},
"startDate": "2018-01-10T16:56:15Z",
"endDate": "2018-01-11T16:56:15Z",
"effectiveDate": "2018-01-10T16:56:15Z",
"active": true,
"coverage": {
"@type": "Coverage",
"applicationCoverage" : {
"@type":"Application",
"@id": "96593da2-29ec-4d40-9cf1-b8cdbb4a9764"
},
"monthlyCounsellingHours" : 12345,
"monthlyIandPHours" : 12335,
"monthlyDynamicModerationHours" : 12345,
"minAge" : 11,
"maxAge" : 18,
"faceToFace" : true,
"subLocation" : [
{ "@type": "SubLocation", "name": "Cambridgeshire" },
{ "@type": "SubLocation", "name": "Lancashire" }
]
},
"contactName": "Joe Bloggs"
}
Constraints
{
"title": "UpdateContract",
"type": "object",
"properties": {
"@type": { "type": "string", "enum": ["Contract"], "default": "Contract" },
"name" { "type":"string" },
"customer": {
"type": "object",
"properties": {
"@type": { "type": "string", "enum": ["Customer"], "default": "Customer" },
"@id": { "type": "string" }
},
"required": ["@id"]
},
"startDate": { "type": "string", "minLength": 20, "maxLength": 20 },
"endDate": { "type": "string", "minLength": 20, "maxLength": 20 },
"effectiveDate": { "type": "string", "minLength": 20, "maxLength": 20 },
"active": { "type": "boolean", "default": false },
"coverage": {
"type": "object",
"properties": {
"@type": { "type": "string" },
"applicationCoverage": {
"type": "object",
"properties" : {
"@type": { "type": "string", "enum": ["Application"], "default": "Application" },
"@id": { "type": "string" }
},
"required": ["@id"]
},
"monthlyCounsellingHours": { "type": "integer", "min": 0 },
"monthlyIandPHours": { "type": "integer", "min": 0 },
"monthlyDynamicModerationHours": { "type": "integer", "min": 0 },
"minAge": { "type":"number", "min": 1 },
"maxAge": { "type":"number", "min": 1, "max": 99 },
"faceToFace": { "type": "boolean" },
"subLocation" : {
"type":"array",
"items": {
"type": "object" ,
"properties": {
"@type": { "type": "string" },
"name": { "type": "string" }
}
}
}
},
"required": [
"@type",
"customer",
"applicationCoverage",
"monthlyCounsellingHours",
"monthlyIandPHours",
"monthlyDynamicModerationHours",
"minAge",
"maxAge",
"faceToFace"
"subLocation",
]
},
"contactName": { "type": "string", "minLength": 1 }
},
"required": [
"@type",
"coverage",
"name",
"startDate",
"endDate",
"effectiveDate",
"active",
"contactName"
]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@id": "5b0c5ae6-10dc-47a5-9dc4-922d14dd0c2f",
"@type" : "ContractUpdatedEvent",
"causedBy": "commands/beebb503-5be9-410f-a244-a5f374d6d4de",
"atTime": "2018-01-10T13:38:23.000Z"
},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "5b0c5ae6-10dc-47a5-9dc4-922d14dd0c2f",
"@type": "Contract",
"name":"contract name",
"customer": {
"@type": "Customer",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d"
},
"startDate": "2018-01-10T16:56:15Z",
"endDate": "2018-01-11T16:56:15Z",
"effectiveDate": "2018-01-10T16:56:15Z",
"active": true,
"coverage": {
"@type": "Coverage",
"applicationCoverage" : {
"@type":"Application",
"@id": "96593da2-29ec-4d40-9cf1-b8cdbb4a9764"
},
"monthlyCounsellingHours" : 12345,
"monthlyIandPHours" : 12335,
"monthlyDynamicModerationHours" : 12345,
"minAge" : 11,
"maxAge" : 18,
"faceToFace" : true,
"subLocation" : [
{ "@type": "SubLocation", "name": "Cambridgeshire" },
{ "@type": "SubLocation", "name": "Lancashire" }
]
},
"contactName": "Joe Bloggs"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ContractUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@id": "5b0c5ae6-10dc-47a5-9dc4-922d14dd0c2f",
"@type" : "ContractUpdatedEvent",
"causedBy": "commands/beebb503-5be9-410f-a244-a5f374d6d4de",
"atTime": "2018-01-10T13:38:23.000Z"
},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "5b0c5ae6-10dc-47a5-9dc4-922d14dd0c2f",
"@type": "Contract",
"name":"contract name",
"customer": {
"@type": "Customer",
"@id": "000d1d88-5b43-487e-8ad5-df64794c9e1d"
},
"startDate": "2018-01-10T16:56:15Z",
"endDate": "2018-01-11T16:56:15Z",
"effectiveDate": "2018-01-10T16:56:15Z",
"active": true,
"coverage": {
"@type": "Coverage",
"applicationCoverage" : {
"@type":"Application",
"@id": "96593da2-29ec-4d40-9cf1-b8cdbb4a9764"
},
"monthlyCounsellingHours" : 12345,
"monthlyIandPHours" : 12335,
"monthlyDynamicModerationHours" : 12345,
"minAge" : 11,
"maxAge" : 18,
"faceToFace" : true,
"subLocation" : [
{ "@type": "SubLocation", "name": "Cambridgeshire" },
{ "@type": "SubLocation", "name": "Lancashire" }
]
},
"contactName": "Joe Bloggs"
}
]
}
[#] [back to top]
A command to update a customer
Path /customers/[id]
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": { "@id": "University", "@type": "UniversityCustomer" },
"name": "customer name",
"contactName": "the name of a customer contact",
"emailAddress": "customer email address e.g jack@jill.com",
"fullAddress": "customers full physical address",
"telephoneNumber":"123456",
"organisationRegistration" : "companies house number"
}
Constraints
{
"title": "UpdateCustomer",
"type": "object",
"properties": {
"@id": { "type": "string" },
"@type": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"enum": [
"Consumer",
"Intermediary",
"LocalAuthority",
"University"
]
},
"@type": {
"type": "string",
"enum": [
"ConsumerCustomer",
"IntermediaryCustomer",
"LocalAuthorityCustomer",
"UniversityCustomer"
]
}
},
"required": ["@id", "@type"]
},
"name": { "type": "string" },
"contactName": { "type": "string" }
,
"emailAddress": { "type": "string", "format": "email" },
"fullAddress": { "type": "string" },
"telephoneNumber": { "type":"string", "format": "phone" },
"organisationRegistration": { "type":"string" }
},
"required": ["@type", "name","contactName","emailAddress","fullAddress","telephoneNumber"]
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "CustomerCreatedEvent"},
{
"@id": "6de5bb4e-6f81-4f85-82cf-8bca85703fab",
"@type": "UniversityCustomer",
"name": "customer name",
"contactName": "the name of a customer contact",
"emailAddress": "customer email address",
"fullAddress": "customers full physical address",
"telephoneNumber":"customers telephone number",
"organisationRegistration" : "companies house number"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
CustomerUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "CustomerCreatedEvent"},
{
"@id": "6de5bb4e-6f81-4f85-82cf-8bca85703fab",
"@type": "UniversityCustomer",
"name": "customer name",
"contactName": "the name of a customer contact",
"emailAddress": "customer email address",
"fullAddress": "customers full physical address",
"telephoneNumber":"customers telephone number",
"organisationRegistration" : "companies house number"
}
]
}
[#] [back to top]
Updates answers for a clinical questionnaire
Path /clinical-questionnaires/[clinical-questionnaire-id]
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"answers": [
{
"@type": "ClinicalAnswer",
"questionId": "how-are-you",
"answerId": "notbad"
}
]
}
Constraints
{
"type": "object",
"properties": {
"@context": {
"type": "string",
"examples": [
"https://vocabularies.xenzone.com/context.jsonld"
]
},
"answers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"questionId": {
"type": "string",
"examples": [
"how-are-you"
]
},
"answerId": {
"type": "string",
"examples": [
"notbad"
]
}
},
"required": [
"questionId",
"answerId"
]
}
}
},
"required": [
"@context",
"answers"
]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ClinicalQuestionnaireAnsweredEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[clinical-questionnaire-id]",
"@type": "ClinicalQuestionnaireCoreYp",
"answers": [
{
"@type": "ClinicalAnswer",
"questionId": "how-are-you",
"answerId": "notbad"
},
{
"@type": "ClinicalAnswer",
"questionId": "pet",
"answerId": ""
}
]
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ClinicalQuestionnaireAnsweredEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ClinicalQuestionnaireAnsweredEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[clinical-questionnaire-id]",
"@type": "ClinicalQuestionnaireCoreYp",
"answers": [
{
"@type": "ClinicalAnswer",
"questionId": "how-are-you",
"answerId": "notbad"
},
{
"@type": "ClinicalAnswer",
"questionId": "pet",
"answerId": ""
}
]
}
]
}
[#] [back to top]
Complete a pending clinical questionnaire
Path /clinical-questionnaires/[clinical-questionnaire-id]/completeResponses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ClinicalQuestionnaireCompletedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[clinical-questionnaire-id]",
"@type": "ClinicalQuestionnaireEos",
"status": "completed"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ClinicalQuestionnaireCompletedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ClinicalQuestionnaireCompletedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[clinical-questionnaire-id]",
"@type": "ClinicalQuestionnaireEos",
"status": "completed"
}
]
}
[#] [back to top]
Create a new clinical journal
Path /service-users/:serviceUserId/clinical-journals
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "ClinicalJournal",
"reason": "a reason",
"emoji": ":)"
}
Constraints
{
"$id": "http://example.com/example.json",
"type": "object",
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"@context": {
"type": "string"
},
"@type": {
"type": "string"
},
"reason": {
"type": "string"
},
"emoji": {
"type": "string"
}
},
"required": [
"@context",
"@type",
"emoji"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "d71c7f3c-8010-4784-a42f-cf01b00bbb40",
"@type": "JournalCreatedEvent",
"causedBy": "commands/eae05306-9134-4d5a-83bc-00ff35a0049d",
"atTime": "2018-03-08T16:13:51.141Z"
},
{
"@id": "[clinical-journal-id]",
"@type": "ClinicalJournal",
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ClinicalJournalCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "d71c7f3c-8010-4784-a42f-cf01b00bbb40",
"@type": "JournalCreatedEvent",
"causedBy": "commands/eae05306-9134-4d5a-83bc-00ff35a0049d",
"atTime": "2018-03-08T16:13:51.141Z"
},
{
"@id": "[clinical-journal-id]",
"@type": "ClinicalJournal",
}
]
}
[#] [back to top]
Create a new service user
Path /case-notes/service-users/[:serviceuserid]/clinical-notes/
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type" : "GeneralNote||FlaggedNote||ClinicalRiskNote||SeriousIncidentNote",
"description" : "incident description",
"createdOn": "2018-01-10T16:56:15Z",
"createdBy": {
"@type": "Worker",
"@id": "AC0D751B-348A-4E15-8393-0A4372DD5464"
}
}
Constraints
{
"type": "object",
"properties": {
"@type": {
"type" : "string"
},
"description": {
"type": "string"
},
"createdBy": {
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"@id": {
"type": "string"
}
},
required: [
"@type",
"@id"
]
}
},
"required":[
"@type",
"description",
"createdBy"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type":"ClinicalNoteCreatedEvent"},
{"@type" : "GeneralNote||FlaggedNote||ClinicalRiskNote||SeriousIncidentNote",
"@id" : "clinicalnote-id",
"description" : "for non serious incidents",
"incidentDescription" : "only user this if the note is a SeriousIncidentNote",
"agreedActionDescription" : "only use this if the note is a SeriousIncidentNote",
"dateTimeCreated" : date time,
"createdBy" : {
"@type" : "Worker",
"@id" : "id",
"name" : "worker name"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ClinicalNoteCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type":"ClinicalNoteCreatedEvent"},
{"@type" : "GeneralNote||FlaggedNote||ClinicalRiskNote||SeriousIncidentNote",
"@id" : "clinicalnote-id",
"description" : "for non serious incidents",
"incidentDescription" : "only user this if the note is a SeriousIncidentNote",
"agreedActionDescription" : "only use this if the note is a SeriousIncidentNote",
"dateTimeCreated" : date time,
"createdBy" : {
"@type" : "Worker",
"@id" : "id",
"name" : "worker name"
}
}
]
}
[#] [back to top]
Create a new clinical questionnaire
Path /clinical-questionnaires
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "ClinicalQuestionnaireCoreYp||ClinicalQuestionnaireEos||ClinicalQuestionnaireCore10",
"serviceUser": {
"@id": "[service-user-id]",
"@type": "ServiceUser"
}
"questionnaireContext": {
"@type": "Message||Chat",
"@id": "[message-id]||[chat-id]"
}
}
Constraints
{
"title": "CreateClinicalQuestionnaire",
"type": "object",
"properties": {
"@context": {
"type": "string"
},
"@id": {
"type": "string"
},
"serviceUser": {
"@id": "[service-user-id]",
"@type": "ServiceUser"
}
"questionnaireContext": {
"type": "object",
"additionalProperties": false,
"properties": {
"@type": {
"type": "string"
},
"@id": {
"type": "string"
}
},
"required": [
"@type",
"@id"
]
}
},
"required": [
"@context",
"@id",
"questionnaireContext"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[clinical-questionnaire-id]",
"@type": "ClinicalQuestionnaireEos||ClinicalQuestionnaireCoreYp||ClinicalQuestionnaireCore10",
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ClinicalQuestionnaireCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[clinical-questionnaire-id]",
"@type": "ClinicalQuestionnaireEos||ClinicalQuestionnaireCoreYp||ClinicalQuestionnaireCore10",
}
]
}
[#] [back to top]
Create a new goal
Path /goals
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Goal",
"serviceUserId": "serviceUsers/f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"score": 1,
"title": "My goal",
"applicationId": "applications/22ad004c-e4ed-4a06-9eea-583b4a54ebe5",
"category": {
"@id": "
Anger |
EmotionalExploration |
EmotionalRegulation |
EnjoyingSelf |
FeelingHappier |
Grief |
GettingMoreHelpFromSignificantOthers |
GettingProfessionalHelpInService |
GettingProfessionalHelpOutsideOurService |
ChallengingThoughts |
ConfidenceSelfAcceptance |
SelfExploration |
SelfHelpSelfCare |
SelfHelpSkillsForLife |
Sexuality |
GenderIdentity |
Motivation |
Bullying |
FamilyRelationships |
Friendships |
Assertiveness |
ChallengingOwnBehaviour |
FittingIn |
SpeakingUpCommunicatingBetter |
ComingOut |
SupportingOthers |
CareerAspirational |
EatingIssues |
LearningDifficulties |
ManagingDepressionOrLowMood |
MedicationDrugs |
OvercomingAnxiety |
SchoolCollegeTraining |
SelfHarm |
SleepIssues |
Smoking |
SuicidalThoughts |
KeepingSafe |
",
"@type": "GoalCategory"
}
}
Constraints
{
type: 'object',
properties: {
'@context': {
type: 'string',
},
'@type': {
type: 'string',
enum: [
'Goal',
],
},
'title': {
type: 'string',
},
'serviceUserId': {
type: 'string',
},
'applicationId': {
type: 'string',
},
'score': {
type: 'integer',
minimum: 0,
maximum: 10,
},
'category': {
type: 'object',
properties: {
'@id': {
type: 'string',
enum: [
'Anger',
'EmotionalExploration',
'EmotionalRegulation',
'EnjoyingSelf',
'FeelingHappier',
'Grief',
'GettingMoreHelpFromSignificantOthers',
'GettingProfessionalHelpInService',
'GettingProfessionalHelpOutsideOurService',
'ChallengingThoughts',
'ConfidenceSelfAcceptance',
'SelfExploration',
'SelfHelpSelfCare',
'SelfHelpSkillsForLife',
'Sexuality',
'GenderIdentity',
'Motivation',
'Bullying',
'FamilyRelationships',
'Friendships',
'Assertiveness',
'ChallengingOwnBehaviour',
'FittingIn',
'SpeakingUpCommunicatingBetter',
'ComingOut',
'SupportingOthers',
'CareerAspirational',
'EatingIssues',
'LearningDifficulties',
'ManagingDepressionOrLowMood',
'MedicationDrugs',
'OvercomingAnxiety',
'SchoolCollegeTraining',
'SelfHarm',
'SleepIssues',
'Smoking',
'SuicidalThoughts',
'KeepingSafe',
],
},
'@type': {
type: 'string',
enum: [
'GoalCategory',
],
},
},
},
},
required: [
'@context',
'@type',
'serviceUserId',
'applicationId',
],
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "788f11e3-8072-45fe-a703-828b68da622c",
"@type": "GoalCreatedEvent",
"causedBy": "commands/c316f150-36a3-4315-92ba-0cc779893a7f",
"atTime": "2018-03-12T23:12:22.456Z"
},
{
"@id": "31e840c2-ef70-466c-9820-01a313aec20a",
"@type": "Goal"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
GoalCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "788f11e3-8072-45fe-a703-828b68da622c",
"@type": "GoalCreatedEvent",
"causedBy": "commands/c316f150-36a3-4315-92ba-0cc779893a7f",
"atTime": "2018-03-12T23:12:22.456Z"
},
{
"@id": "31e840c2-ef70-466c-9820-01a313aec20a",
"@type": "Goal"
}
]
}
[#] [back to top]
Create a new risk status for a service user
Path /risk-status/[:serviceuserid]
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "RiskStatus",
"reason": "reason",
"status": "RED|AMBER|GREEN"
}
Constraints
{
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"status": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": ["@type", "status", "reason"]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@type":"RiskStatusCreatedEvent"
},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "riskId",
"@type": "RiskStatus",
"worker": {
"@type": "Worker",
"@id": "workerId"
},
"reason": "reason",
"status": "RED|AMBER|GREEN",
"date": "dd-MMM-YY",
"time": "hh:mm"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Emits
RiskStatusCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@type":"RiskStatusCreatedEvent"
},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "riskId",
"@type": "RiskStatus",
"worker": {
"@type": "Worker",
"@id": "workerId"
},
"reason": "reason",
"status": "RED|AMBER|GREEN",
"date": "dd-MMM-YY",
"time": "hh:mm"
}
]
}
[#] [back to top]
Create a new safeguarding note for a service user
Path /safeguardings/[:serviceuserid]
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Safeguarding",
"areaReferredTo": "Area",
"reason": "Neglect|Sexual|Physical|Emotional|Bullying|Suicidal-intent|Self-harm",
"referredTo": "Internal monitoring|Social care|Police|CAMHS|Other",
"referralContact": "Name contact agency",
"referralContactPhone": "+442081234567",
"outcomes": "outcomes"
}
Constraints
{
"type":"object",
"properties":{
"@type":{
"type":"string",
"enum":[
"Safeguarding"
],
"default":"Safeguarding"
},
"areaReferredTo":{
"type":"string",
"pattern":"^[a-zA-Zs]+",
"maxLength":250
},
"reason":{
"type":"string",
"enum":[
"Neglect",
"Sexual",
"Physical",
"Emotional",
"Bullying",
"Suicidal-intent",
"Self-harm"
],
"default":"Self-harm"
},
"referredTo":{
"type":"string",
"enum":[
"Internal monitoring",
"Social care",
"Police",
"CAMHS",
"Other"
],
"default":"Other"
},
"referralContact":{
"type":"string",
"pattern":"^[a-zA-Zs]+",
"maxLength":250
},
"referralContactPhone":{
"type":"string",
"pattern":"^\+[1-9]\d{1,14}$"
},
"outcomes":{
"type":"string",
"maxLength":250
}
},
"required":[
"@type",
"areaReferredTo",
"reason",
"referredTo",
"referralContact",
"referralContactPhone",
"outcomes"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@type":"SafeguardingCreatedEvent"
},
{
"@id": "safeguardingId",
"@type": "Safeguarding",
"referrer": {
"@id": "workerId"
"@type": "Worker",
"name": "Worker name"
},
"areaReferredTo": "Area",
"reason": "reason",
"referredTo": "Internal monitoring|Social care|Police|CAMHS|Other",
"referralContact": "Name contact agency",
"referralContactPhone": "+442081234567",
"outcomes": "outcomes",
"createdAt": "2018-01-10T16:56:15Z",
"modifiedAt": "2018-01-10T16:56:15Z"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Emits
SafeguardingCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@type":"SafeguardingCreatedEvent"
},
{
"@id": "safeguardingId",
"@type": "Safeguarding",
"referrer": {
"@id": "workerId"
"@type": "Worker",
"name": "Worker name"
},
"areaReferredTo": "Area",
"reason": "reason",
"referredTo": "Internal monitoring|Social care|Police|CAMHS|Other",
"referralContact": "Name contact agency",
"referralContactPhone": "+442081234567",
"outcomes": "outcomes",
"createdAt": "2018-01-10T16:56:15Z",
"modifiedAt": "2018-01-10T16:56:15Z"
}
]
}
[#] [back to top]
Create a new safety plan for a service user
Path /safety-plan/[:serviceuserid]
{
"@context": "//vocabularies.xenzone.com/context.jsonld",
"@type": "SafetyPlan",
"status": "Empty",
"questionnaire": [
{
"@id": "questionId",
"question": "Question",
"answer": "Answer"
}
]
}
Constraints
{
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"questionnaire": {
"type": "array",
"answers": {
"type": "object",
"properties": {
"type": "object",
"properties": {
"@id": {
"type": "string"
},
"question": {
"type": "string"
},
"answer": {
"type": "string"
}
},
"required": ["@id", "question", "answer"]
}
}
}
},
"required": ["@type", "questionnaire"]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@type":"SafetyPlanCreatedEvent"
},
{
"@type": "SafetyPlan",
"status": "Created",
"questionnaire": [
{
"@id": "questionId",
"question": "Question",
"answer": "Answer"
}
]
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Emits
SafetyPlanCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@type":"SafetyPlanCreatedEvent"
},
{
"@type": "SafetyPlan",
"status": "Created",
"questionnaire": [
{
"@id": "questionId",
"question": "Question",
"answer": "Answer"
}
]
}
]
}
[#] [back to top]
Create a new service user
Path /service-users
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "ServiceUser",
"applicationServiceGroup": {
"@id": "[asg-id]",
"@type": "ApplicationServiceGroup"
},
"customer": {
"@type": "Customer",
"@id": "[customer-id]"
}
}
Constraints
{
"title": "CreateServiceUser",
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"applicationServiceGroup": {
"type": "object",
"properties": {
"@id": {
"type": "string"
},
"@type": {
"type": "string"
}
},
"required": [
"@id",
"@type"
]
},
"customer": {
"type": "object",
"properties": {
"@id": {
"type": "string"
},
"@type": {
"type": "string"
}
},
"required": [
"@id",
"@type"
]
}
},
"required": [
"@type",
"applicationServiceGroup",
"customer"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ServiceUserCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[service-user-id]",
"@type": "ServiceUser",
"applicationServiceGroup": {
"@id": "[asg-id]",
"@type": "ApplicationServiceGroup"
},
"customer": {
"@id": "[customer-id]",
"@type": "Customer",
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ServiceUserCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ServiceUserCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[service-user-id]",
"@type": "ServiceUser",
"applicationServiceGroup": {
"@id": "[asg-id]",
"@type": "ApplicationServiceGroup"
},
"customer": {
"@id": "[customer-id]",
"@type": "Customer",
}
}
]
}
[#] [back to top]
Decline a pending clinical questionnaire
Path /clinical-questionnaires/[clinical-questionnaire-id]/declineResponses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ClinicalQuestionnaireDeclinedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[clinical-questionnaire-id]",
"@type": "ClinicalQuestionnaireEos",
"status": "declined"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ClinicalQuestionnaireDeclinedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ClinicalQuestionnaireDeclinedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[clinical-questionnaire-id]",
"@type": "ClinicalQuestionnaireEos",
"status": "declined"
}
]
}
[#] [back to top]
Get clinical journals
Path /service-users/:serviceUserId/clinical-journalsResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"results": [
{
"@id": "[clinical-journal-id]",
"@type": "ClinicalJournal",
"serviceUser": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "ServiceUser"
}
"application": {
"@id": "22ad004c-e4ed-4a06-9eea-583b4a54ebe5",
"@type": "Application"
}
"emoji": ":)",
"dateTimeCreated": "2018-03-02T15:12:31.516Z",
"reason": "Because I want",
},
{
"@id": "[clinical-journal-id]",
"@type": "ClinicalJournal",
"serviceUser": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "ServiceUser"
}
"application": {
"@id": "22ad004c-e4ed-4a06-9eea-583b4a54ebe5",
"@type": "Application"
}
"emoji": ":D",
"dateTimeCreated": "2018-03-02T15:12:31.516Z",
"reason": "Because I want",
},
{
"@id": "[clinical-journal-id]",
"@type": "ClinicalJournal",
"serviceUser": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "ServiceUser"
}
"application": {
"@id": "22ad004c-e4ed-4a06-9eea-583b4a54ebe5",
"@type": "Application"
}
"emoji": ":P",
"dateTimeCreated": "2018-03-02T15:12:31.516Z",
"reason": "Because I want",
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get clinical notes
Path /case-notes/service-users/[:serviceuserid]/clinical-notes/Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@type": "GeneralNote",
"@id":"[id]",
"description": "blah blah blah"
},
{
"@type": "SeriousIncidentNote",
"@id":"[id]",
"incidentDescription": "blah blah blah",
"agreedActionDescription" : "only use this if the note is a SeriousIncidentNote"
}
],
"pagination":
{
"currentPage": 5,
"perPage": 20,
"total": 521
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get clinical notes
Path /clinical-questionnaires/templatesResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [{
"@id": "templates/ClinicalQuestionnaireCoreYp",
"@type": "ClinicalQuestionnaireTemplate",
"clinicalQuestions": [{
"@type": "ClinicalQuestion",
"@id": "how-are-you",
"text": "How are you?",
"possibleClinicalAnswers": [
{
"@id": "well",
"@type": "ClinicalAnswer",
"text": "Well",
"score": 2
},
{
"@id": "notbad",
"@type": "ClinicalAnswer",
"text": "Not too bad, yourself?",
"score": 0
}
]
},
{
"@id": "like-apis",
"@type": "ClinicalQuestion",
"text": "Do you like APIs?",
"possibleClinicalAnswers": [
{
"@id": "losers",
"@type": "ClinicalAnswer",
"text": "Backend is for losers!",
"score": 2
},
{
"@id": "lovethem",
"@type": "ClinicalAnswer",
"text": "Love them!",
"score": 2
},
{
"@id": "onlyif",
"@type": "ClinicalAnswer",
"text": "Only if they have 100000 libraries",
"score": 10
}
]
}]
},
{
"@id": "templates/ClinicalQuestionnaireEos",
"@type": "ClinicalQuestionnaireTemplate",
"clinicalQuestions": [
{
"@type": "ClinicalQuestion",
"@id": "pet",
"text": "What kind of pet do you have?",
"possibleClinicalAnswers": [
{
"@id": "unicorn",
"@type": "ClinicalAnswer",
"text": "A magic unicorn"
},
{
"@id": "trex",
"@type": "ClinicalAnswer",
"text": "A T-rex?"
},
{
"@id": "fox",
"@type": "ClinicalAnswer",
"text": "A fox?"
}
]
},
{
"@id": "like-apis",
"@type": "ClinicalQuestion",
"text": "Do you like APIs?",
"possibleClinicalAnswers": [
{
"@id": "losers",
"@type": "ClinicalAnswer",
"text": "Backend is for losers!",
},
{
"@id": "lovethem",
"@type": "ClinicalAnswer",
"text": "Love them!",
},
{
"@id": "onlyif",
"@type": "ClinicalAnswer",
"text": "Only if they have 100000 libraries",
}
]
}
]
}]
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get clinical questionnaires, with options
Path /clinical-questionnairesResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"results": [
{
"@id": "[clinical-questionnaire-id]",
"@type": "ClinicalQuestionnaireEos",
"status": "declined",
"dateTimeCreated": "2018-03-02T15:12:31.516Z",
"contextType": "Message|Chat",
"contextId": "[chat-id]|[message-id]",
"answers": [
{
"@type": "ClinicalAnswer",
"questionId": "how-are-you",
"answerId": "notbad"
},
{
"@type": "ClinicalAnswer",
"questionId": "pet",
"answerId": "unicorn"
},
{
"@type": "ClinicalAnswer",
"questionId": "last-question",
"answerId": ""
}
]
},
{
"@id": "[clinical-questionnaire-id]",
"@type": "ClinicalQuestionnaireCoreYp",
"status": "pending",
"score": "10",
"dateTimeCreated": "2018-03-02T15:12:31.516Z",
"contextType": "Message|Chat",
"contextId": "[chat-id]|[message-id]",
"answers": [
{
"@type": "ClinicalAnswer",
"questionId": "how-are-you",
"answerId": "",
"score": 10
},
]
},
{
"@id": "[clinical-questionnaire-id]",
"@type": "ClinicalQuestionnaireEos",
"status": "completed",
"dateTimeCreated": "2018-03-02T15:12:31.516Z",
"contextType": "Message|Chat",
"contextId": "[chat-id]|[message-id]",
"answers": [
{
"@type": "ClinicalAnswer",
"questionId": "are-you-in-the-matrix",
"answerId": "morfeus-is-my-dealer"
},
]
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get goals, with options
Path /goalsResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"results": [
{
"serviceUser": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "ServiceUser"
}
"application": {
"@id": "22ad004c-e4ed-4a06-9eea-583b4a54ebe5",
"@type": "Application",
"name": "Kooth"
}
"title": null,
"category": {
"@id": "Sexuality",
"@type": "GoalCategory"
},
"@id": "31e840c2-ef70-466c-9820-01a313aec20a",
"dateTimeCreated": "2018-03-12T23:12:22.423Z",
"status": {
"@id": "Active",
"@type": "GoalStatus"
},
"score": 0
},
{
"serviceUser": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "ServiceUser"
}
"application": {
"@id": "22ad004c-e4ed-4a06-9eea-583b4a54ebe5",
"@type": "Application",
"name": "Kooth"
}
"title": null,
"category": {
"@id": "Sexuality",
"@type": "GoalCategory"
},
"@id": "d7cbd7d8-75ee-4637-9196-bf8345bba088",
"dateTimeCreated": "2018-03-12T23:16:16.377Z",
"status": {
"@id": "Active",
"@type": "GoalStatus"
},
"score": 0
},
{
"serviceUser": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "ServiceUser"
}
"application": {
"@id": "22ad004c-e4ed-4a06-9eea-583b4a54ebe5",
"@type": "Application",
"name": "Kooth"
}
"title": null,
"category": {
"@id": "Sexuality",
"@type": "GoalCategory"
},
"@id": "a285fb84-525b-4796-9256-a3d47c74fc07",
"dateTimeCreated": "2018-03-12T23:16:34.382Z",
"status": {
"@id": "Active",
"@type": "GoalStatus"
},
"score": 1
},
{
"serviceUser": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "ServiceUser"
}
"application": {
"@id": "22ad004c-e4ed-4a06-9eea-583b4a54ebe5",
"@type": "Application",
"name": "Kooth"
}
"title": null,
"category": {
"@id": "Sexuality",
"@type": "GoalCategory"
},
"@id": "f6b519b2-08c9-4890-92c7-63c509aa9f7f",
"dateTimeCreated": "2018-03-12T23:16:44.996Z",
"status": {
"@id": "Active",
"@type": "GoalStatus"
},
"score": 1
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get goals service user command
Path /service-users/:userId/goalsResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"results": [
{
"serviceUser": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "ServiceUser"
}
"application": {
"@id": "22ad004c-e4ed-4a06-9eea-583b4a54ebe5",
"@type": "Application",
"name": "Kooth"
}
"title": null,
"category": {
"@id": "Sexuality",
"@type": "GoalCategory"
},
"@id": "31e840c2-ef70-466c-9820-01a313aec20a",
"dateTimeCreated": "2018-03-12T23:12:22.423Z",
"status": {
"@id": "Active",
"@type": "GoalStatus"
},
"score": 0
},
{
"serviceUser": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "ServiceUser"
}
"application": {
"@id": "22ad004c-e4ed-4a06-9eea-583b4a54ebe5",
"@type": "Application",
"name": "Kooth"
}
"title": null,
"category": {
"@id": "Sexuality",
"@type": "GoalCategory"
},
"@id": "d7cbd7d8-75ee-4637-9196-bf8345bba088",
"dateTimeCreated": "2018-03-12T23:16:16.377Z",
"status": {
"@id": "Active",
"@type": "GoalStatus"
},
"score": 0
},
{
"serviceUser": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "ServiceUser"
}
"application": {
"@id": "22ad004c-e4ed-4a06-9eea-583b4a54ebe5",
"@type": "Application",
"name": "Kooth"
}
"title": null,
"category": {
"@id": "Sexuality",
"@type": "GoalCategory"
},
"@id": "a285fb84-525b-4796-9256-a3d47c74fc07",
"dateTimeCreated": "2018-03-12T23:16:34.382Z",
"status": {
"@id": "Active",
"@type": "GoalStatus"
},
"score": 1
},
{
"serviceUser": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "ServiceUser"
}
"application": {
"@id": "22ad004c-e4ed-4a06-9eea-583b4a54ebe5",
"@type": "Application",
"name": "Kooth"
}
"title": null,
"category": {
"@id": "Sexuality",
"@type": "GoalCategory"
},
"@id": "f6b519b2-08c9-4890-92c7-63c509aa9f7f",
"dateTimeCreated": "2018-03-12T23:16:44.996Z",
"status": {
"@id": "Active",
"@type": "GoalStatus"
},
"score": 1
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get the risk statuses of a service user
Path /risk-status/[:serviceuserid]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "riskId",
"@type": "RiskStatus",
"worker": {
"@type": "Worker",
"@id": "workerId"
},
"status": "RED|AMBER|GREEN",
"reason": "reason",
"date": "dd-MMM-YY",
"time": "hh:mm"
}
],
"pagination": {
"currentPage": 1,
"perPage": 10,
"total": 1
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get the safeguarding notes of a service user
Path /safeguardings/[:serviceuserid]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "safeguardingId",
"@type": "Safeguarding",
"referrer": {
"@type": "Worker",
"@id": "workerId",
"name": "Worker name"
},
"areaReferredTo": "Area",
"reason": "reason",
"referredTo": "Internal monitoring|Social care|Police|CAMHS|Other",
"referralContact": "Name contact agency",
"referralContactPhone": "+442081234567",
"outcomes": "outcomes",
"createdAt": "2018-01-10T16:56:15Z",
"modifiedAt": "2018-01-10T16:56:15Z"
}
],
"pagination": {
"currentPage": 1,
"perPage": 10,
"total": 1
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get the safety plan of a service user
Path /safety-plan/[:serviceuserid]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "SafetyPlan",
"status": "Empty|Created",
"questionnaire": [
{
"@id": "questionId",
"question": "Question",
"answer": "Answer"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Gets a service user with personal profile.
Path /service-users/[id]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "[service-user-id]",
"@type": "ServiceUser",
"applicationServiceGroup": {
"@id": "[asg-id]",
"@type": "ApplicationServiceGroup",
},
"customer": {
"@id": "[customer-id]",
"@type": 'Customer',
},
"profile": {
"@type": "ServiceUserPersonalProfile",
"@id": "[personal-profile-id]",
"avatar": "https://www.myavatar.com/1",
"nickname": "Joe",
"nameTitle": "Mr",
"firstName": "Joseph",
"lastName": "Bloggs",
"birthDate": "1966-04-21",
"religion": {
"@type": "Religion",
"@id": "Buddhist",
},
"gender": {
"@type": "Gender",
"@id": "Male",
},
"disability": {
"@type": "Disability",
"@id": "Sight",
},
"ethnicity": {
"@type": "Ethnicity",
"@id": "Chinese",
},
"telephoneNumber": "+4402071234567",
"fullAddress": "135 Park Avenue, London, N5 T46",
"emailAddress": "test@xenzone.com",
"contacts": [
{
"@type": "Contact",
"school": "The London Academy",
"role": "Teacher",
"firstName": "Jane",
"lastName": "Doe",
"telephoneNumber": "+4402071234568",
}
],
"description": "This is a profile note",
"heardAboutFrom": "My friend Paco el Flaco",
"tags": [
{ "@type": "Vulnerability", "@id": "Neet" },
{ "@type": "Vulnerability", "@id": "YoungCarer" }
]
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get Service User next of kin
Path /service-users/[id]/next-of-kin/[1-or-2]/Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type" : "Father||Mother||Sibling||GrandParent||Guardian||OtherNextOfKin",
"@id" : "/service-users/[id]/next-of-kin/[1-or-2]/",
"nameTitle" : "Dr, Mrs etc",
"firstName" : "firstname",
"lastName" : "surname",
"telephoneNumber" : "telephone number",
"fullAddress" : "full address",
"emailAddress" : "jack@jill.com"
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Gets a list of service users with personal profiles. Query params to filter results.
Path /service-users/Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "[service-user-id]",
"@type": "ServiceUser",
"applicationServiceGroup": {
"@id": "[asg-id]",
"@type": "ApplicationServiceGroup",
},
"customer": {
"@id": "[customer-id]",
"@type": 'Customer',
},
"profile": {},
},
{
"@id": "[service-user-id]",
"@type": "ServiceUser",
"applicationServiceGroup": {
"@id": "[asg-id]",
"@type": "ApplicationServiceGroup",
},
"customer": {
"@id": "[customer-id]",
"@type": 'Customer',
},
"profile": {
"@type": "ServiceUserPersonalProfile",
"avatar": {
"@type": "Avatar",
"@id": "[avatar-id]",
},
"nickname": "Joe",
"nameTitle": "Mr",
"firstName": "Joseph",
"lastName": "Bloggs",
"birthDate": "1966-04-21",
"religion": {
"@type": "Religion",
"@id": "Buddhist",
},
"gender": {
"@type": "Gender",
"@id": "Male",
},
"disability": {
"@type": "Disability",
"@id": "Sight",
},
"ethnicity": {
"@type": "Ethnicity",
"@id": "Chinese",
},
"telephoneNumber": "+4402071234567",
"fullAddress": "135 Park Avenue, London, N5 T46",
"emailAddress": "test@xenzone.com",
"contacts": [
{
"@type": "Contact",
"school": "The London Academy",
"role": "Teacher",
"firstName": "Jane",
"lastName": "Doe",
"telephoneNumber": "+4402071234568",
}
],
"description": "This is a profile note",
"heardAboutFrom": "My friend Paco el Flaco",
"tags": [
{ "@type": "Vulnerability", "@id": "Neet" },
{ "@type": "Vulnerability", "@id": "YoungCarer" }
]
},
},
],
"pagination":
{
"currentPage": 5,
"perPage": 20,
"total": 521
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Updates a goal
Path /goals/[goal-id]
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Goal",
"status": {
"@id": "Active",
"@type": "GoalStatus"
},
"category": {
"@id": "EmotionalExploration",
"@type": "GoalCategory"
},
"reviewedStatus": {
"@id": "Active",
"@type": "ReviewedStatus"
},
"title": "another title",
"score": 3
}
Constraints
{
type: 'object',
properties: {
'@context': {
type: 'string',
},
'title': {
type: 'string',
},
'category': {
type: 'object',
properties: {
'@id': {
type: 'string',
enum: [
'Anger',
'EmotionalExploration',
'EmotionalRegulation',
'EnjoyingSelf',
'FeelingHappier',
'Grief',
'GettingMoreHelpFromSignificantOthers',
'GettingProfessionalHelpInService',
'GettingProfessionalHelpOutsideOurService',
'ChallengingThoughts',
'ConfidenceSelfAcceptance',
'SelfExploration',
'SelfHelpSelfCare',
'SelfHelpSkillsForLife',
'Sexuality',
'GenderIdentity',
'Motivation',
'Bullying',
'FamilyRelationships',
'Friendships',
'Assertiveness',
'ChallengingOwnBehaviour',
'FittingIn',
'SpeakingUpCommunicatingBetter',
'ComingOut',
'SupportingOthers',
'CareerAspirational',
'EatingIssues',
'LearningDifficulties',
'ManagingDepressionOrLowMood',
'MedicationDrugs',
'OvercomingAnxiety',
'SchoolCollegeTraining',
'SelfHarm',
'SleepIssues',
'Smoking',
'SuicidalThoughts',
'KeepingSafe',
],
},
'@type': {
type: 'string',
enum: [
'GoalCategory',
],
},
},
},
'@type': {
type: 'string',
enum: [
'Goal',
],
},
'status': {
type: 'object',
properties: {
'@id': {
type: 'string',
enum: [
'Active',
'Archived',
'Complete',
],
},
'@type': {
type: 'string',
enum: [
'GoalStatus',
],
},
},
},
'reviewedStatus': {
type: 'object',
properties: {
'@id': {
type: 'string',
enum: [
'Approved',
'Rejected',
'RequiresReview',
],
},
'@type': {
type: 'string',
enum: [
'ReviewedStatus',
],
},
},
},
'score': {
type: 'integer',
minimum: 0,
maximum: 10,
},
},
anyOf: [
{ required: ['status'] },
{ required: ['reviewedStatus'] },
{ required: ['score'] },
],
required: [
'@context',
'@type',
],
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "9a5487eb-3a6f-4c21-ba46-ef22379e5a67",
"@type": "GoalUpdatedEvent",
"causedBy": "commands/22781121-b641-4d11-94b8-a922af146bc2",
"atTime": "2018-03-12T23:25:11.583Z"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
GoalUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "9a5487eb-3a6f-4c21-ba46-ef22379e5a67",
"@type": "GoalUpdatedEvent",
"causedBy": "commands/22781121-b641-4d11-94b8-a922af146bc2",
"atTime": "2018-03-12T23:25:11.583Z"
}
]
}
[#] [back to top]
Updates a goal (service user command)
Path /service-users/:userId/goals/[goal-id]
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Goal",
"score": 3,
"status": {
"@id": "Active",
"@type": "GoalStatus"
},
}
Constraints
{
type: 'object',
properties: {
'@context': {
type: 'string',
},
'@type': {
type: 'string',
enum: [
'Goal',
],
},
'score': {
type: 'integer',
minimum: 0,
maximum: 10,
},
'status': {
type: 'object',
properties: {
'@id': {
type: 'string',
enum: [
'Active',
'Archived',
'Complete',
],
},
'@type': {
type: 'string',
enum: [
'GoalStatus',
],
},
},
},
},
anyOf: [
{ required: ['status'] },
{ required: ['score'] },
],
required: [
'@context',
'@type',
],
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "9a5487eb-3a6f-4c21-ba46-ef22379e5a67",
"@type": "GoalUpdatedEvent",
"causedBy": "commands/22781121-b641-4d11-94b8-a922af146bc2",
"atTime": "2018-03-12T23:25:11.583Z"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
GoalUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "9a5487eb-3a6f-4c21-ba46-ef22379e5a67",
"@type": "GoalUpdatedEvent",
"causedBy": "commands/22781121-b641-4d11-94b8-a922af146bc2",
"atTime": "2018-03-12T23:25:11.583Z"
}
]
}
[#] [back to top]
Update a new safeguarding note for a service user
Path /safeguardings/[:serviceuserid]
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "safeguardingId",
"@type": "Safeguarding",
"areaReferredTo": "Area",
"reason": "Neglect|Sexual|Physical|Emotional|Bullying|Suicidal-intent|Self-harm",
"referredTo": "Internal monitoring|Social care|Police|CAMHS|Other",
"referralContact": "Name contact agency",
"referralContactPhone": "+442081234567",
"outcomes": "outcomes"
}
Constraints
{
"type":"object",
"properties":{
"@id":{
"type":"string"
},
"@type":{
"type":"string",
"enum":[
"Safeguarding"
],
"default":"Safeguarding"
},
"areaReferredTo":{
"type":"string",
"pattern":"^[a-zA-Zs]+",
"maxLength":250
},
"reason":{
"type":"string",
"enum":[
"Neglect",
"Sexual",
"Physical",
"Emotional",
"Bullying",
"Suicidal-intent",
"Self-harm"
],
"default":"Self-harm"
},
"referredTo":{
"type":"string",
"enum":[
"Internal monitoring",
"Social care",
"Police",
"CAMHS",
"Other"
],
"default":"Other"
},
"referralContact":{
"type":"string",
"pattern":"^[a-zA-Zs]+",
"maxLength":250
},
"referralContactPhone":{
"type":"string",
"pattern":"^\+[1-9]\d{1,14}$"
},
"outcomes":{
"type":"string",
"maxLength":250
}
},
"required":[
"@id",
"@type",
"areaReferredTo",
"reason",
"referredTo",
"referralContact",
"referralContactPhone",
"outcomes"
]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@type":"SafeguardingUpdatedEvent"
},
{
"@id": "safeguardingId",
"@type": "Safeguarding",
"referrer": {
"@id": "workerId"
"@type": "Worker",
"name": "Worker name"
},
"areaReferredTo": "Area",
"reason": "reason",
"referredTo": "Internal monitoring|Social care|Police|CAMHS|Other",
"referralContact": "Name contact agency",
"referralContactPhone": "+442081234567",
"outcomes": "outcomes",
"createdAt": "2018-01-10T16:56:15Z",
"modifiedAt": "2018-01-10T16:56:15Z"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Emits
SafeguardingUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@type":"SafeguardingUpdatedEvent"
},
{
"@id": "safeguardingId",
"@type": "Safeguarding",
"referrer": {
"@id": "workerId"
"@type": "Worker",
"name": "Worker name"
},
"areaReferredTo": "Area",
"reason": "reason",
"referredTo": "Internal monitoring|Social care|Police|CAMHS|Other",
"referralContact": "Name contact agency",
"referralContactPhone": "+442081234567",
"outcomes": "outcomes",
"createdAt": "2018-01-10T16:56:15Z",
"modifiedAt": "2018-01-10T16:56:15Z"
}
]
}
[#] [back to top]
Update a new safety plan for a service user
Path /safety-plan/[:serviceuserid]
{
"@context": "//vocabularies.xenzone.com/context.jsonld",
"@type": "SafetyPlan",
"status": "Created",
"questionnaire": [
{
"@id": "questionId",
"question": "Question",
"answer": "Answer"
}
]
}
Constraints
{
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"questionnaire": {
"type": "array",
"answers": {
"type": "object",
"properties": {
"type": "object",
"properties": {
"@id": {
"type": "string"
},
"question": {
"type": "string"
},
"answer": {
"type": "string"
}
},
"required": ["@id", "question", "answer"]
}
}
}
},
"required": ["@type", "questionnaire"]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@type":"SafetyPlanUpdatedEvent"
},
{
"@type": "SafetyPlan",
"status": "Created",
"questionnaire": [
{
"@id": "questionId",
"question": "Question",
"answer": "Answer"
}
]
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Emits
SafetyPlanUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{
"@type":"SafetyPlanUpdatedEvent"
},
{
"@type": "SafetyPlan",
"status": "Created",
"questionnaire": [
{
"@id": "questionId",
"question": "Question",
"answer": "Answer"
}
]
}
]
}
[#] [back to top]
Update an existing service user
Path /service-users/[id]/
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "ServiceUser",
"applicationServiceGroup": {
"@id": "[asg-id]",
"@type": "ApplicationServiceGroup"
},
"customer": {
"@type": "Customer",
"@id": "[customer-id]"
}
}
Constraints
{
"title": "UpdateServiceUser",
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"applicationServiceGroup": {
"type": "object",
"properties": {
"@id": {
"type": "string"
},
"@type": {
"type": "string"
}
},
"required": [
"@id",
"@type"
]
},
"customer": {
"type": "object",
"properties": {
"@id": {
"type": "string"
},
"@type": {
"type": "string"
}
},
"required": [
"@id",
"@type"
]
}
},
"required": [
"@type",
"applicationServiceGroup",
"customer"
]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ServiceUserUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[service-user-id]",
"@type": "ServiceUser",
"applicationServiceGroup": {
"@id": "[asg-id]",
"@type": "ApplicationServiceGroup"
},
"customer": {
"@id": "[customer-id]",
"@type": "Customer",
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ServiceUserUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ServiceUserUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[service-user-id]",
"@type": "ServiceUser",
"applicationServiceGroup": {
"@id": "[asg-id]",
"@type": "ApplicationServiceGroup"
},
"customer": {
"@id": "[customer-id]",
"@type": "Customer",
}
}
]
}
[#] [back to top]
Create or update a new service user personal profile
Path /service-users/[id]/next-of-kin/[1-or-2]/
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type" : "Father||Mother||Sibling||GrandParent||Guardian||OtherNextOfKin",
"nameTitle" : "Dr, Mrs etc",
"firstName" : "firstname",
"lastName" : "surname",
"telephoneNumber" : "telephone number",
"fullAddress" : "full address",
"emailAddress" : "jack@jill.com"
}
Constraints
{
"title": "UpdateServiceUserNextOfKin",
"type": "object",
"properties": {
"@type": {
"type" : "string",
"default" : "OtherNextOfKin"
},
"firstName": {
"type" : "string"
},
"lastName": {
"type" : "string"
},
"telephoneNumber": {
"type" : "string"
},
"fullAddress": {
"type" : "string"
},
"emailAddress": {
"type" : "email"
}
},
"required":["@type"]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type":"ServiceUserNextOfKinUpdatedEvent"},
{"@type" : "Father||Mother||Sibling||GrandParent||Guardian||Carer||OtherNextOfKin",
"@id" : "/service-users/[id]/next-of-kin/[1-or-2]/",
"nameTitle" : "Dr, Mrs etc",
"firstName" : "firstname",
"lastName" : "surname",
"telephoneNumber" : "telephone number",
"fullAddress" : "full address",
"emailAddress" : "jack@jill.com"}
]
}
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type":"ServiceUserNextOfKinUpdatedEvent"},
{"@type" : "Father||Mother||Sibling||GrandParent||Guardian||OtherNextOfKin",
"@id" : "/service-users/[id]/next-of-kin/[1-or-2]/",
"nameTitle" : "Dr, Mrs etc",
"firstName" : "firstname",
"lastName" : "surname",
"telephoneNumber" : "telephone number",
"fullAddress" : "full address",
"emailAddress" : "jack@jill.com"}
]
}
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type":"ServiceUserNextOfKinUpdatedEvent"},
{"@type" : "Father||Mother||Sibling||GrandParent||Guardian||Carer||OtherNextOfKin",
"@id" : "/service-users/[id]/next-of-kin/[1-or-2]/",
"nameTitle" : "Dr, Mrs etc",
"firstName" : "firstname",
"lastName" : "surname",
"telephoneNumber" : "telephone number",
"fullAddress" : "full address",
"emailAddress" : "jack@jill.com"}
]
}
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type":"ServiceUserNextOfKinUpdatedEvent"},
{"@type" : "Father||Mother||Sibling||GrandParent||Guardian||OtherNextOfKin",
"@id" : "/service-users/[id]/next-of-kin/[1-or-2]/",
"nameTitle" : "Dr, Mrs etc",
"firstName" : "firstname",
"lastName" : "surname",
"telephoneNumber" : "telephone number",
"fullAddress" : "full address",
"emailAddress" : "jack@jill.com"}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ServiceUserNextOfKinUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type":"ServiceUserNextOfKinUpdatedEvent"},
{"@type" : "Father||Mother||Sibling||GrandParent||Guardian||Carer||OtherNextOfKin",
"@id" : "/service-users/[id]/next-of-kin/[1-or-2]/",
"nameTitle" : "Dr, Mrs etc",
"firstName" : "firstname",
"lastName" : "surname",
"telephoneNumber" : "telephone number",
"fullAddress" : "full address",
"emailAddress" : "jack@jill.com"}
]
}
ServiceUserNextOfKinUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type":"ServiceUserNextOfKinUpdatedEvent"},
{"@type" : "Father||Mother||Sibling||GrandParent||Guardian||OtherNextOfKin",
"@id" : "/service-users/[id]/next-of-kin/[1-or-2]/",
"nameTitle" : "Dr, Mrs etc",
"firstName" : "firstname",
"lastName" : "surname",
"telephoneNumber" : "telephone number",
"fullAddress" : "full address",
"emailAddress" : "jack@jill.com"}
]
}
[#] [back to top]
Update an existing service user personal profile
Path /service-users/[id]/personal-profile/
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "ServiceUserPersonalProfile",
"avatar": {
"@type": "Avatar",
"@id": "[avatar-id]",
},
"nickname": "Joe",
"nameTitle": "Mr",
"firstName": "Joseph",
"lastName": "Bloggs",
"birthDate": "1966-04-21",
"religion": {
"@type": "Religion",
"@id": "Buddhist",
},
"gender": {
"@type": "Gender",
"@id": "Male",
},
"disability": {
"@type": "Disability",
"@id": "Sight",
},
"ethnicity": {
"@type": "Ethnicity",
"@id": "Chinese",
},
"telephoneNumber": "+4402071234567",
"fullAddress": "135 Park Avenue, London, N5 T46",
"emailAddress": "test@xenzone.com",
"contacts": [
{
"@type": "Contact",
"school": "The London Academy",
"role": "Teacher",
"firstName": "Jane",
"lastName": "Doe",
"telephoneNumber": "+4402071234568",
}
],
"description": "This is a profile note",
"heardAboutFrom": "My friend Paco el Flaco",
"tags": [
{ "@type": "Vulnerability", "@id": "Neet" },
{ "@type": "Vulnerability", "@id": "YoungCarer" }
]
}
Constraints
{
"title": "UpdateServiceUserPersonalProfile",
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"avatar": {
"type": "string"
},
"nickname": {
"type": "string"
},
"nameTitle": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"birthDate": { // should allow either YYYY-MM-DD or YYYY-MM (ISO8601 format)
"anyOf": [
{
"type": "string",
"format": "date" // YYYY-MM-DD
},
{
"type": "string",
"pattern": "([12][0-9]{3})-(0[1-9]|1[0-2])" // YYYY-MM
}
]
},
"religion": {
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"@id": {
"type": "string",
"enum": [
"BahaI",
"Buddhist",
"Christian",
"Hindu",
"Jain",
"Jewish",
"Muslim",
"Pagan",
"Sikh",
"Zoroastrian",
"Other",
"None",
"DeclinesToDisclose",
"Unknown",
]
}
},
"required": [
"@type",
"@id"
]
},
"gender": {
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"@id": {
"type": "string",
"enum":
[
"Male",
"Female",
"Agender",
"GenderFluid"
]
}
},
"required": [
"@type",
"@id"
]
},
"disability": {
"type": "object",
"properties":
{
"@type": {
"type": "string"
},
"@id": {
"type": "string",
"enum": [
"BehaviourAndEmotional",
"Hearing",
"ManualDexterity",
"MemoryOrAbilityToConcentrateLearnOrUnderstandLearningDisability",
"MobilityAndGrossMotor",
"PerceptionOfPhysicalDanger",
"PersonalSelfCareAndContinence",
"ProgressiveConditionsAndPhysicalHealthSuchAsHivCancerMultipleSclerosisFitsEtc",
"Sight",
"Speech",
"Other",
"NoDisability",
"NotStated",
]
}
},
"required": [
"@type",
"@id"
]
},
"ethnicity": {
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"@id": {
"type": "string",
"enum": [
"WhiteAndBlackCaribbean",
"WhiteAndBlackAfrican",
"WhiteAndAsian",
"AnyOtherMixedBackground",
"British",
"Irish",
"AnyOtherWhiteBackground",
"Indian",
"Pakistani",
"Bangladeshi",
"AnyOtherAsianBackground",
"Chinese",
"AnyOtherEthnicGroup",
"NotStated",
"Caribbean",
"African",
"AnyOtherBlackBackground",
]
}
},
"required": [
"@type",
"@id"
]
},
"telephoneNumber": {
"pattern": "^\+[1-9]\d{1,14}$",
"type": "string"
},
"fullAddress": {
"type": "string"
},
"emailAddress": {
"type": "string",
"format": "email"
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"school": {
"type": "string"
},
"role": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"telephoneNumber": {
"type": "string",
"pattern": "^\+[1-9]\d{1,14}$"
}
},
"required": [
"@type"
]
}
},
"description": {
"type": "string"
},
"heardAboutFrom": {
"type": "string"
},
"tags": {
type: "array",
uniqueItems: true,
additionalProperties: false,
minItems: 1,
items: {
anyOf: [
{
type: "object",
required: ["@type", "@id"],
additionalProperties: false,
properties: {
"@type": {
type: "string",
enum: [
"Vulnerability",
],
},
"@id": {
type: "string",
enum: [
"Send",
"SexualOrientation",
"Pregnancy",
"ReligionFaith",
"ArrangedMarriage",
"VulnerablyAccommodated",
"Neet",
"YoungCarer",
"ChildLookedAfter",
"YoungOffender",
"SubstanceMisuse",
"VictimOfCrime",
"EnglishAsSecondLanguage",
]
}
}
}
]
}
}
},
"required": [
"@type",
"birthDate",
"nickname"
]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ServiceUserPersonalProfileUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@type": "ServiceUserPersonalProfile",
"@id": "[personal-profile-id]",
"avatar": {
"@type": "Avatar",
"@id": "[avatar-id]",
},
"nickname": "Joe",
"nameTitle": "Mr",
"firstName": "Joseph",
"lastName": "Bloggs",
"birthDate": "1966-04-21",
"religion": {
"@type": "Religion",
"@id": "Buddhist",
},
"gender": {
"@type": "Gender",
"@id": "Male",
},
"disability": {
"@type": "Disability",
"@id": "Sight",
},
"ethnicity": {
"@type": "Ethnicity",
"@id": "Chinese",
},
"telephoneNumber": "+4402071234567",
"fullAddress": "135 Park Avenue, London, N5 T46",
"emailAddress": "test@xenzone.com",
"contacts": [
{
"@type": "Contact",
"school": "The London Academy",
"role": "Teacher",
"firstName": "Jane",
"lastName": "Doe",
"telephoneNumber": "+4402071234568",
}
],
"description": "This is a profile note",
"heardAboutFrom": "My friend Paco el Flaco",
"tags": [
{ "@type": "Vulnerability", "@id": "Neet" },
{ "@type": "Vulnerability", "@id": "YoungCarer" }
]
},
{
"@type": "ServiceUser",
"@id": "[service-user-id]",
"applicationServiceGroup": {
"@id": "[asg-id]",
"@type": "ApplicationServiceGroup"
},
"customer": {
"@type": "Customer",
"@id": "[customer-id]"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ServiceUserPersonalProfileUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ServiceUserPersonalProfileUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@type": "ServiceUserPersonalProfile",
"@id": "[personal-profile-id]",
"avatar": {
"@type": "Avatar",
"@id": "[avatar-id]",
},
"nickname": "Joe",
"nameTitle": "Mr",
"firstName": "Joseph",
"lastName": "Bloggs",
"birthDate": "1966-04-21",
"religion": {
"@type": "Religion",
"@id": "Buddhist",
},
"gender": {
"@type": "Gender",
"@id": "Male",
},
"disability": {
"@type": "Disability",
"@id": "Sight",
},
"ethnicity": {
"@type": "Ethnicity",
"@id": "Chinese",
},
"telephoneNumber": "+4402071234567",
"fullAddress": "135 Park Avenue, London, N5 T46",
"emailAddress": "test@xenzone.com",
"contacts": [
{
"@type": "Contact",
"school": "The London Academy",
"role": "Teacher",
"firstName": "Jane",
"lastName": "Doe",
"telephoneNumber": "+4402071234568",
}
],
"description": "This is a profile note",
"heardAboutFrom": "My friend Paco el Flaco",
"tags": [
{ "@type": "Vulnerability", "@id": "Neet" },
{ "@type": "Vulnerability", "@id": "YoungCarer" }
]
},
{
"@type": "ServiceUser",
"@id": "[service-user-id]",
"applicationServiceGroup": {
"@id": "[asg-id]",
"@type": "ApplicationServiceGroup"
},
"customer": {
"@type": "Customer",
"@id": "[customer-id]"
}
}
]
}
[#] [back to top]
A command to add a participant to an appointment
Path /appointments/[appointment-id]/participants
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Participant",
"user": { "@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac", "@type": "Worker" }
}
Constraints
{
"title": "AddAppointmentParticipant",
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"user": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Worker",
"ServiceUser"
]
}
},
"required": [
"@id",
"@type"
]
},
"host": {
"type": "boolean",
"default": "false"
}
},
"required": [
"@type",
"user"
]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "AddAppointmentParticipantEvent"},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Participant",
"user": { "@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac", "@type": "Worker" },
"host": false
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
AddAppointmentParticipantEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "AddAppointmentParticipantEvent"},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Participant",
"user": { "@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac", "@type": "Worker" },
"host": false
}
]
}
[#] [back to top]
A command to assigned a worker to an impromptu chat
Path /impromptu-chats/[impromptu-chat-id]/workers
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
}
Constraints
{
"title": "AssignWorkerToImpromptuChat",
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Worker"
]
}
},
"required": [
"@id",
"@type"
]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "AssignWorkerToImpromptuChatEvent"},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
AssignWorkerToImpromptuChatEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "AssignWorkerToImpromptuChatEvent"},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
}
]
}
[#] [back to top]
A command to create a new appointment.
Path /appointments
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Appointment",
"startTime": "2018-01-01T12:00:00.000Z",
"endTime": "2018-01-01T12:30:00.000Z",
"participants": [
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
},
"host": true
},
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "ServiceUser"
}
}
],
"description": "A description",
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
Constraints
{
"title": "CreateAppointment",
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"startTime": {
"type": "string",
"format": "date-time"
},
"endTime": {
"type": "string",
"format": "date-time"
},
"participants": {
"type": "array",
"minItems": 2,
"items": {
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"user": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["Worker", "ServiceUser"] }
},
"required": ["@id", "@type"]
},
"host": {
"type": "boolean",
"default": false
}
},
"required": ["@type", "user"]
}
},
"description": {
type: "string",
minLength: 1,
},
"applicationServiceGroup": {
type: "object",
properties: {
"@id": { type: "string" },
"@type": { type: "string", enum: ["ApplicationServiceGroup"] },
},
required: ["@id", "@type"],
},
"application": {
type: "object",
properties: {
"@id": { type: "string", minLength: 1 },
"@type": { type: "string", enum: ["Application"] },
},
required: ["@id", "@type"],
},
},
"required": ["@type", "startTime", "endTime", "participants"]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@type": "CreateAppointmentEvent"
},
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "Appointment",
"startTime": "2018-01-01T12:00:00.000Z",
"endTime": "2018-01-01T12:30:00.000Z",
"participants": [
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
},
"host": true
},
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "ServiceUser"
},
"host": false
}
],
"status": {
"@id": "Pending",
"@type": "Status"
},
"description": "A description",
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 409
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity conflicts with an pre-existing entity - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
CreateAppointmentEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@type": "CreateAppointmentEvent"
},
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "Appointment",
"startTime": "2018-01-01T12:00:00.000Z",
"endTime": "2018-01-01T12:30:00.000Z",
"participants": [
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
},
"host": true
},
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "ServiceUser"
},
"host": false
}
],
"status": {
"@id": "Pending",
"@type": "Status"
},
"description": "A description",
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
]
}
[#] [back to top]
A command to create a new impromptu chat.
Path /impromptu-chats
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "ImpromptuChat",
"serviceUser": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "ServiceUser"
},
"assignedWorker": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "Worker"
},
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
Constraints
{
"title": "CreateImpromptuChat",
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"serviceUser": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["ServiceUser"] }
},
"required": ["@id", "@type"]
},
"assignedWorker": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["Worker"] }
},
"required": ["@id", "@type"]
},
"applicationServiceGroup": {
"type": "object",
"properties": {
"@id": { "type": "string" },
"@type": { "type": "string", "enum": ["ApplicationServiceGroup"] }
},
"required": ["@id", "@type"]
},
"application": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["Application"] }
},
"required": ["@id"]
}
},
"required": ["@type", "serviceUser"]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@type": "CreateImpromptuChatEvent"
},
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "ImpromptuChat",
"dateTimeCreated": "2018-01-01T12:00:00.000Z",
"serviceUser": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "ServiceUser"
},
"assignedWorker": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "Worker"
},
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 409
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity conflicts with an pre-existing entity - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
CreateImpromptuChatEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@type": "CreateImpromptuChatEvent"
},
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "ImpromptuChat",
"dateTimeCreated": "2018-01-01T12:00:00.000Z",
"serviceUser": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "ServiceUser"
},
"assignedWorker": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "Worker"
},
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
]
}
[#] [back to top]
A command to create a new worker. This is without roles
Path /workers
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Worker",
"emailAddress" : "john.smith@smithy.com"
}
Constraints
{
"type": "object",
"properties": {
"@type": {
"type": "string",
},
"emailAddress": {
"type": "string",
}
},
"required": [
"@type",
"emailAddress"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[worker-id]",
"@type": "Worker",
"emailAddress": "john.smith@smithy.com"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 409
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity conflicts with an pre-existing entity - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
EmailPreparedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "EmailPreparedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@type": "Email",
"subject": "Welcome to XCP",
"body": [
{
"@type": "HtmlBody",
"content": "Lorem Ipsum"
},
{
"@type": "TextBody",
"content": "Lorem Ipsum"
}
],
"from": {
"emailAddress": "platform@xenzone.com",
"name": "XenZone Platform"
},
"to": [
{
"emailAddress": "t.cooper@example.com"
},
{
"name": "j.smith@example.com"
}
]
}
]
}
WorkerCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[worker-id]",
"@type": "Worker",
"emailAddress": "john.smith@smithy.com"
}
]
}
[#] [back to top]
A command to create a worker personal profile
Path /workers/[worker-id]/personal-profile/ or /workers/me/personal-profile/
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "WorkerPersonalProfile",
"firstName": "first name",
"lastName": "last name",
"aboutMe": "about me",
"therapiesOffered": "therapies offered by the worker",
"preferredProfessionalBodies": "membership of professional bodies",
"qualifications": "qualifications, training etc",
"whenImAvailable": "when I am available",
"gender": {
"@id": "service-users/genders/Male",
"@type": "Gender"
}
}
Constraints
{
"title": "CreateWorkerPersonalProfile",
"type": "object",
"properties": {
"@type": {
"type": "string",
},
"firstName": {
"type": "string",
"maxLength": 20,
},
"lastName": {
"type": "string",
"maxLength": 20,
},
"aboutMe": {
"type": "string",
"maxLength": 1000,
},
"therapiesOffered": {
"type": "string",
"maxLength": 750,
},
"preferredProfessionalBodies": {
"type": "string",
"maxLength": 300,
},
"qualifications": {
"type": "string",
"maxLength": 1000,
},
"whenImAvailable": {
"type": "string",
"maxLength": 300,
},
"gender": {
"type": "object",
"properties": {
"@type": {
"type": "string",
},
"@id": {
"type": "string",
"enum": [
"service-users/genders/Male",
"service-users/genders/Female",
"service-users/genders/Agender",
"service-users/genders/Gender fluid",
],
},
},
},
},
"required": [
"@type",
"firstName",
"lastName",
"aboutMe",
"preferredProfessionalBodies",
"qualifications",
"gender",
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerPersonalProfileCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[personal-profile-id]",
"@type": "WorkerPersonalProfile",
"firstName": "first name",
"lastName": "last name",
"aboutMe": "about me",
"therapiesOffered": "therapies offered by the worker",
"preferredProfessionalBodies": "membership of professional bodies",
"qualifications": "qualifications, training etc",
"whenImAvailable": "when I am available",
"gender": {
"@id": "service-users/genders/Male",
"@type": "Gender"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 409
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity conflicts with an pre-existing entity - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
WorkerPersonalProfileCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerPersonalProfileCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[personal-profile-id]",
"@type": "WorkerPersonalProfile",
"firstName": "first name",
"lastName": "last name",
"aboutMe": "about me",
"therapiesOffered": "therapies offered by the worker",
"preferredProfessionalBodies": "membership of professional bodies",
"qualifications": "qualifications, training etc",
"whenImAvailable": "when I am available",
"gender": {
"@id": "service-users/genders/Male",
"@type": "Gender"
}
}
]
}
[#] [back to top]
Delete an appointment
Path /appointments/[appointment-id]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@type": "DeleteAppointmentEvent"
},
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "Appointment",
"startTime": "2018-01-01T12:00:00.000Z",
"endTime": "2018-01-01T12:30:00.000Z",
"participants": [
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
},
"host": true
},
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "ServiceUser"
},
"host": false
}
],
"status": {
"@id": "Pending",
"@type": "Status"
},
"description": "A description",
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
]
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
DeleteAppointmentEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@type": "DeleteAppointmentEvent"
},
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "Appointment",
"startTime": "2018-01-01T12:00:00.000Z",
"endTime": "2018-01-01T12:30:00.000Z",
"participants": [
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
},
"host": true
},
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "ServiceUser"
},
"host": false
}
],
"status": {
"@id": "Pending",
"@type": "Status"
},
"description": "A description",
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
]
}
[#] [back to top]
Delete an impromptu chat
Path /impromptu-chats/[impromptu-chat-id]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@type": "DeleteImpromptuChatEvent"
},
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "ImpromptuChat",
"dateTimeCreated": "2018-01-01T12:00:00.000Z",
"serviceUser": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "ServiceUser"
},
"assignedWorker": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "Worker"
},
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
]
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
DeleteImpromptuChatEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@type": "DeleteImpromptuChatEvent"
},
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "ImpromptuChat",
"dateTimeCreated": "2018-01-01T12:00:00.000Z",
"serviceUser": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "ServiceUser"
},
"assignedWorker": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "Worker"
},
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
]
}
[#] [back to top]
Get an appointment
Path /appointments/[appointment-id]Responses
Status code: 200
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "Appointment",
"startTime": "2018-01-01T12:00:00.000Z",
"endTime": "2018-01-01T12:30:00.000Z",
"participants": [
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
},
"host": true
},
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "ServiceUser"
},
"host": false
}
],
"status": {
"@id": "Pending",
"@type": "Status"
},
"description": "A description",
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get all appointments
Path /appointmentsResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "Appointment",
"startTime": "2018-01-01T12:00:00.000Z",
"endTime": "2018-01-01T12:30:00.000Z",
"participants": [
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
},
"host": true
},
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "ServiceUser"
},
"host": false
}
],
"status": {
"@id": "Pending",
"@type": "Status"
},
"description": "A description",
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
],
"pagination":
{
"currentPage": 1,
"perPage": 10,
"total": 1
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get an impromptu chat
Path /impromptu-chats/[impromptu-chat-id]Responses
Status code: 200
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "ImpromptuChat",
"dateTimeCreated": "2018-01-01T12:00:00.000Z",
"serviceUser": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "ServiceUser"
},
"assignedWorker": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "Worker"
},
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get all impromptu chats
Path /impromptu-chats or /service-users/me/impromptu-chatsResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "ImpromptuChat",
"dateTimeCreated": "2018-01-01T12:00:00.000Z",
"serviceUser": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "ServiceUser"
},
"assignedWorker": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "Worker"
},
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
],
"pagination":
{
"currentPage": 1,
"perPage": 10,
"total": 1
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get all appointments for the authorised user
Path /workers/me/appointmentsResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "Appointment",
"startTime": "2018-01-01T12:00:00.000Z",
"endTime": "2018-01-01T12:30:00.000Z",
"participants": [
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
},
"host": true
},
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "ServiceUser"
},
"host": false
}
],
"status": {
"@id": "Pending",
"@type": "Status"
},
"description": "A description",
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
],
"pagination":
{
"currentPage": 1,
"perPage": 10,
"total": 1
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
A command to get worker
Path /workers/[workerid]
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "[worker-id]"
"@type": "Worker",
"emailAddress" : "john.smith@smithy.com",
"profile": {
"@id": "[personal-profile-id]",
"@type": "WorkerPersonalProfile",
"firstName": "first name",
"lastName": "last name",
"aboutMe": "about me",
"therapiesOffered": "therapies offered by the worker",
"preferredProfessionalBodies": "membership of professional bodies",
"qualifications": "qualifications, training etc",
"whenImAvailable": "when i am available",
"gender": {
"@id": "service-users/genders/Male",
"@type": "Gender"
}
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
A command to get workers
Path /workersResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "[worker-id]",
"@type": "Worker",
"emailAddress": "john.smith@smithy.com",
"profile": {
"@id": "[personal-profile-id]",
"@type": "WorkerPersonalProfile",
"firstName": "first name",
"lastName": "last name",
"aboutMe": "about me",
"therapiesOffered": "therapies offered by the worker",
"preferredProfessionalBodies": "membership of professional bodies",
"qualifications": "qualifications, training etc",
"whenImAvailable": "when i am available",
"gender": {
"@id": "service-users/genders/Male",
"@type": "Gender"
}
}
}
],
"pagination": {
"currentPage": 5,
"perPage": 20,
"total": 521
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
A command to remove a participant from an appointment
Path /appointments/[appointment-id]/participants/[participant-id]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "RemoveAppointmentParticipantEvent"},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Participant",
"user": { "@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac", "@type": "Worker" },
"host": false
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
RemoveAppointmentParticipantEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "RemoveAppointmentParticipantEvent"},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Participant",
"user": { "@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac", "@type": "Worker" },
"host": false
}
]
}
[#] [back to top]
A command to remove a worker from an impromptu chat
Path /impromptu-chats/[impromptu-chat-id]/workers/[worker-id]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "RemoveWorkerFromImpromptuChatEvent"},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 409
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity conflicts with an pre-existing entity - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
RemoveWorkerFromImpromptuChatEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph" : [
{"@type" : "RemoveWorkerFromImpromptuChatEvent"},
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
}
]
}
[#] [back to top]
A command to update an appointment.
Path /appointments/[appointment-id]
{
@context: "https://vocabularies.xenzone.com/context.jsonld",
@type: "Appointment",
startTime: "2018-01-01T12:00:00.000Z",
endTime: "2018-01-01T12:30:00.000Z",
status: { "@id": "Pending", "@type": "Status" },
description: "A description"
}
Constraints
{
"title": "UpdateAppointment",
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"startTime": {
"type": "string",
"format": "date-time"
},
"endTime": {
"type": "string",
"format": "date-time"
},
"status": {
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"@id": {
"type": "string",
"enum": [
"Pending",
"Complete",
"DNA",
"Cancelled"
]
}
}
},
"description": {
type: "string",
minLength: 1,
},
},
"required": ["@type"]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@type": "UpdateAppointmentEvent"
},
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "Appointment",
"startTime": "2018-01-01T14:00:00.000Z",
"endTime": "2018-01-01T15:00:00.000Z",
"participants": [
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
},
"host": true
},
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "ServiceUser"
},
"host": false
}
],
"status": {
"@id": "Complete",
"@type": "Status"
},
"description": "A description",
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 409
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity conflicts with an pre-existing entity - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
UpdateAppointmentEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@type": "UpdateAppointmentEvent"
},
{
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fab",
"@type": "Appointment",
"startTime": "2018-01-01T14:00:00.000Z",
"endTime": "2018-01-01T15:00:00.000Z",
"participants": [
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fac",
"@type": "Worker"
},
"host": true
},
{
"@type": "Participant",
"user": {
"@id": "6de5bb4e-6f81-4f85-82cf-7bca85703fad",
"@type": "ServiceUser"
},
"host": false
}
],
"status": {
"@id": "Complete",
"@type": "Status"
},
"description": "A description",
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": 'ApplicationServiceGroup'
},
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
}
}
]
}
[#] [back to top]
A command to update a workers personal profile
Path /workers/[worker-id]/personal-profile/ or /workers/me/personal-profile/
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "WorkerPersonalProfile",
"firstName": "first name",
"lastName": "last name",
"aboutMe": "about me",
"therapiesOffered": "therapies offered by the worker",
"preferredProfessionalBodies": "membership of professional bodies",
"qualifications": "qualifications, training etc",
"whenImAvailable": "when I am available",
"gender": {
"@id": "service-users/genders/Male",
"@type": "Gender"
}
}
Constraints
{
"title": "CreateWorkerPersonalProfile",
"type": "object",
"properties": {
"@type": {
"type": "string",
},
"firstName": {
"type": "string",
"maxLength": 20,
},
"lastName": {
"type": "string",
"maxLength": 20,
},
"aboutMe": {
"type": "string",
"maxLength": 1000,
},
"therapiesOffered": {
"type": "string",
"maxLength": 750,
},
"preferredProfessionalBodies": {
"type": "string",
"maxLength": 300,
},
"qualifications": {
"type": "string",
"maxLength": 1000,
},
"whenImAvailable": {
"type": "string",
"maxLength": 300,
},
"gender": {
"type": "object",
"properties": {
"@type": {
"type": "string",
},
"@id": {
"type": "string",
"enum": [
"service-users/genders/Male",
"service-users/genders/Female",
"service-users/genders/Agender",
"service-users/genders/Gender fluid",
],
},
},
},
},
"required": [
"@type",
"firstName",
"lastName",
"aboutMe",
"preferredProfessionalBodies",
"qualifications",
"gender",
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerPersonalProfileUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[personal-profile-id]",
"@type": "WorkerPersonalProfile",
"firstName": "first name",
"lastName": "last name",
"aboutMe": "about me",
"therapiesOffered": "therapies offered by the worker",
"preferredProfessionalBodies": "membership of professional bodies",
"qualifications": "qualifications, training etc",
"whenImAvailable": "when I am available",
"gender": {
"@id": "service-users/genders/Male",
"@type": "Gender"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
WorkerPersonalProfileUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "WorkerPersonalProfileUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[personal-profile-id]",
"@type": "WorkerPersonalProfile",
"firstName": "first name",
"lastName": "last name",
"aboutMe": "about me",
"therapiesOffered": "therapies offered by the worker",
"preferredProfessionalBodies": "membership of professional bodies",
"qualifications": "qualifications, training etc",
"whenImAvailable": "when I am available",
"gender": {
"@id": "service-users/genders/Male",
"@type": "Gender"
}
}
]
}
[#] [back to top]
Creates a new category
Path /content/categories
{
"@type": "Category",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"name": "Category A"
}
Constraints
{
"type": "object",
"properties": {
"@type": { "type": "string", "enum": ["Category"], default: "Category" },
"application": {
"type": "object",
"properties: {
"@id": { "type": "string", "minLength": 1 },
"@type" { "type": "string", "enum": ["Application"], "default": "Application" }
},
"required": ["@id"]
}
"name": { "type": "string", "minLength": 1 }
},
"required": ["application", "name"]
}
Responses
Status code: 201
{
"@context": 'https://vocabularies.xenzone.com/context.jsonld',
"@graph": [{
"@id": "[event-id]",
"@type": "ContentCategoryCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-id]"
}, {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Category",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"name": "Category A",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Creates a new content resource
Path /content/resources
{
"@type": "Comment"
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"topic": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Topic"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"replyTo": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Comment"
},
"title": "The title of the comment",
"content": "The content of the comment",
"publishStatus": { "@id": "Unpublished", "@type": "PublishStatus" },
"minAge": 0,
"maxAge": 999,
"thumbnail": {
"@id": "[file-path]",
"@type": "Thumbnail"
},
}
Constraints
{
"type": "object",
"properties": {
"@type": {
"type": "string",
"enum": [
"Article",
"Discussion",
"LiveDiscussion",
"QAndADiscussion",
"Comment"
]
},
"application": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Application"
],
"default": "Application"
}
},
"required": [
"@id"
]
},
"category": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Category"
],
"default": "Category"
}
},
"required": [
"@id"
]
},
"topic": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Topic"
],
"default": "Topic"
}
},
"required": [
"@id"
]
},
"author": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"ServiceUser",
"Worker"
]
}
},
"required": [
"@id",
"@type"
]
},
"title": {
"type": "string",
"minLength": 1
},
"content": {
"type": "string",
"minLength": 1
},
"publishStatus": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"enum": [
"Unpublished",
"Published"
],
"default": "Unpublished"
},
"@type": {
"type": "string",
"enum": [
"PublishStatus"
],
"default": "PublishStatus"
}
},
"required": [
"@id"
]
},
"minAge": {
"type": "integer",
"minimum": 0,
"maximum": 999
},
"maxAge": {
"type": "integer",
"minimum": 0,
"maximum": 999
},
"startTime": {
"type": "string"
},
"endTime": {
"type": "string"
},
"replyTo": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Article",
"Discussion",
"LiveDiscussion",
"QAndADiscussion",
"Comment"
]
}
},
"required": [
"@id",
"@type"
]
}
},
"thumbnail": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Thumbnail"
],
"default": "Thumbnail"
}
},
"required": [
"@id"
]
},
"required": [
"@type",
"application",
"author",
"content"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "ContentResourceCreatedEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Comment",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"topic": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Topic"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"replyTo": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Comment"
},
"author": {
"@id": "e453f1a8-623a-4ea0-be09-544d4671aacc",
"@type": "ServiceUser"
},
"thumbnail": {
"@id": "[file-path]",
"@type": "Thumbnail"
},
"title": "Title of the comment",
"content": "The content of the comment",
"publishStatus": { "@id": "Unpublished", "@type": "PublishStatus" },
"moderationStatus": { "@id": "PendingModeration", "@type": "ModerationStatus" },
"minAge": 0,
"maxAge": 999,
"dateTimeCreated": "2018-01-01T00:00:00.000Z",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ContentResourceCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "ContentResourceCreatedEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Comment",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"topic": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Topic"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"replyTo": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Comment"
},
"author": {
"@id": "e453f1a8-623a-4ea0-be09-544d4671aacc",
"@type": "ServiceUser"
},
"thumbnail": {
"@id": "[file-path]",
"@type": "Thumbnail"
},
"title": "Title of the comment",
"content": "The content of the comment",
"publishStatus": { "@id": "Unpublished", "@type": "PublishStatus" },
"moderationStatus": { "@id": "PendingModeration", "@type": "ModerationStatus" },
"minAge": 0,
"maxAge": 999,
"dateTimeCreated": "2018-01-01T00:00:00.000Z",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}
]
}
[#] [back to top]
Creates a follow to content
Path /content/follows
{
"@type": "Follow",
"resource": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Topic"
}
"follower": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4"
"@tye": "Worker",
}
}
Constraints
{
"type": "object",
"properties": {
"@type": { "type": "enum", ["Follow"], "default": "Follow" },
"resource": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": {
"type": "string",
"enum": [
"Category",
"Topic",
"Article",
"Discussion",
"LiveDiscussion",
"Comment"
]
}
},
"required": ["@id", "@type"]
},
"follower": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["ServiceUser", "Worker"]
},
"required": ["@id", "@type"],
}
},
"required": ["@type", "@resourceType", "follower"]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "FollowCreatedEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@type": "Follow",
"resource": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Topic"
}
"follower": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Worker"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
CreateFollowResponse
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "FollowCreatedEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@type": "Follow",
"resource": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Topic"
}
"follower": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Worker"
}
}
]
}
[#] [back to top]
Creates a new topic
Path /content/topics
{
"@type": "Topic",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"name": "Topic Name"
}
Constraints
{
"type": "object",
"properties": {
"@type": { "type": "string", "enum": ["Topic"], "default": "Topic" },
"application": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["Application"], "default": "Application" }
}
"required": ["@id"]
},
"category": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["Category"], "default": "Category" }
},
"required": ["@id"]
},
"name": { "type": "string", "minLength": 1 }
},
"required": ["application", "category", "name"]
}
Responses
Status code: 201
{
"@context": 'https://vocabularies.xenzone.com/context.jsonld',
"@graph": [{
"@id": "[event-id]",
"@type": "ContentTopicCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-id]"
}, {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "Topic"
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"category": {
"@id": "e401fd9b-ef4a-49a0-a27b-aeecdf6c4df3",
"@type": "Category"
},
"name": "Topic Name",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ContentTopicCreatedEvent
{
"@context": 'https://vocabularies.xenzone.com/context.jsonld',
"@graph": [{
"@id": "[event-id]",
"@type": "ContentTopicCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-id]"
}, {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "Topic"
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"category": {
"@id": "e401fd9b-ef4a-49a0-a27b-aeecdf6c4df3",
"@type": "Category"
},
"name": "Topic Name",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}]
}
[#] [back to top]
Creates a useful mark
Path /content/usefuls
{
"@type": "Useful",
"resource": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Topic"
},
"user": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Worker"
}
}
Constraints
{
"type": "object",
"properties": {
"@type": { "type": "enum", ["Useful"], "default": "Useful" },
"resource": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": {
"type": "string",
"enum": [
"Category",
"Topic",
"Article",
"Discussion",
"LiveDiscussion",
"QAndADiscussion",
"Comment"
]
}
},
"required": ["@id", "@type"]
},
"user": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["Worker", "ServiceUser"] }
},
"required": ["@id", "@type"]
}
},
"required": ["@type", "@resourceType", "user"]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "CreatedUsefulEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@type": "Useful",
"resource": {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Comment"
},
"user": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Worker"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
CreateUsefulEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "CreatedUsefulEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@type": "Useful",
"resource": {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Comment"
},
"user": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Worker"
}
}
]
}
[#] [back to top]
Deletes a content resource
Path /content/resources/:idResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "ContentResourceDeletedEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Article",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"topic": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Topic"
},
"author": {
"@id": "e453f1a8-623a-4ea0-be09-544d4671aacc",
"@type": "Worker"
},
"title": "Title of the article",
"content": "The content of the article",
"publishStatus": { "@id": "Published", "@type": "PublishStatus" },
"moderationStatus": { "@id": "PassedModeration", "@type": "ModerationStatus" },
"minAge": 0,
"maxAge": 999,
"dateTimeCreated": "2018-01-01T00:00:00.000Z",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
DeleteContentResourceEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "ContentResourceDeletedEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Article",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"topic": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Topic"
},
"author": {
"@id": "e453f1a8-623a-4ea0-be09-544d4671aacc",
"@type": "Worker"
},
"title": "Title of the article",
"content": "The content of the article",
"publishStatus": { "@id": "Published", "@type": "PublishStatus" },
"moderationStatus": { "@id": "PassedModeration", "@type": "ModerationStatus" },
"minAge": 0,
"maxAge": 999,
"dateTimeCreated": "2018-01-01T00:00:00.000Z",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}
]
}
[#] [back to top]
Delete a follow to content
Path /content/follows
{
"@type": "Follow",
"resource": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Topic"
},
"follower": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Worker"
}
}
Constraints
{
"type": "object",
"properties": {
"@type": { "type": "enum", ["Follow"], "default": "Follow" },
"resource": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": {
"type": "string",
"enum": [
"Category",
"Topic",
"Article",
"Discussion",
"LiveDiscussion",
"Comment"
]
}
},
"required": ["@id", "@type"]
},
"follower": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": {
"type": "string",
"enum": ["Worker", "ServiceUser"]
}
},
"required": ["@id", "@type"]
}
},
"required": ["@type", "@resourceType", "follower"]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "FollowDeletedEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@type": "Follow",
"resource": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Topic"
},
"follower": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Worker"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
DeleteFollowResponse
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "FollowDeletedEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@type": "Follow",
"resource": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Topic"
},
"follower": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Worker"
}
}
]
}
[#] [back to top]
Deletes a useful mark
Path /content/usefuls
{
"@type": "Useful",
"resource": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Topic"
},
"follower": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Worker"
}
}
Constraints
{
"type": "object",
"properties": {
"@type": { "type": "enum", ["Useful"], "default": "Useful" },
"resource": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": {
"type": "string",
"enum": [
"Category",
"Topic",
"Article",
"Discussion",
"LiveDiscussion",
"Comment"
]
}
},
"required": ["@id", "@type"]
},
"user": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["Worker", "ServiceUser" }
},
"required": ["@id", "@type"]
}
},
"required": ["@type", "@resourceType", "user"]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "CommentUnmarkedAsUsefulEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@type": "Useful",
"resource": {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Topic"
},
"user": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Worker"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
DeletedUsefulEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "CommentUnmarkedAsUsefulEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@type": "Useful",
"resource": {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Topic"
},
"user": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Worker"
}
}
]
}
[#] [back to top]
Returns all the categories
Path /content/categories
{
"type": "object",
"properties": {
"applicationServiceGroupId": { "type": "string", "minLength": 1 },
"applicationId": { "type": "string", "minLength": 1 },
"order": {
"type": "string",
"enum": [
"AlphabeticalAsc",
"AlphabeticalDesc",
"MostUseful",
"LeastUseful",
"MostFollowed",
"LeastFollowed"
],
"default": "AlphabeticalAsc"
},
"resourceType": {
"type": "string",
"enum": ["Article", "Discussion", "LiveDiscussion", "QAndADiscussion", "Comment"]
},
"moderationStatus": {
"type": "string",
"enum": ["PendingModeration", "PassedModeration", "FailedModeration"]
},
"page": { "type": "integer", "minimum": 1, "default": 1 },
"perPage": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10 }
},
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Category",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"name": "Category A",
"contentCount": 5,
"userCount": 0,
"usefulCount": 0,
"followCount": 1,
}
// etc...
],
"pagination": {
"total": 1,
"currentPage": 10,
"perPage": 2
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Returns the category for a given ID
Path /content/categories/:id
{
"type": "object",
"properties": {
"resourceType": {
"type": "string",
"enum": ["Article", "Discussion", "LiveDiscussion", "QAndADiscussion", "Comment"]
},
"moderationStatus": {
"type": "string",
"enum": ["PendingModeration", "PassedModeration", "FailedModeration"]
}
},
}
Responses
Status code: 200
{
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Category",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"name": "Category A",
"contentCount": 5,
"userCount": 0,
"usefulCount": 0,
"followCount": 1
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Returns the content resource for a given ID
Path /content/resources/:id
{
"type": "object",
"properties": {
"resourceType": {
"type": "string",
"enum": ["Article", "Discussion", "LiveDiscussion", "QAndADiscussion", "Comment", "ArticleComment", "DiscussionComment", "LiveDiscussionComment"]
},
"moderationStatus": {
"type": "string",
"enum": ["PendingModeration", "PassedModeration", "FailedModeration"]
}
}
}
Responses
Status code: 200
{
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "LiveDiscussion",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"topic": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Topic"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"author": {
"@id": "e453f1a8-623a-4ea0-be09-544d4671aacc",
"@type": "Worker"
},
"title": "Title of the live discussion",
"content": "The content of the live discussion",
"publishStatus": { "@id": "Published", "@type": "PublishStatus" },
"moderationStatus": { "@id": "PassedModeration", "@type": "ModerationStatus" },
"minAge": 0,
"maxAge": 999,
"thumbnail": {
"@id": "[file-path]",
"@type": "Thumbnail"
},
"startTime": "2018-01-01T00:00:00.000Z",
"endTime": "2018-01-01T00:00:00.000Z",
"dateTimeCreated": "2018-01-01T00:00:00.000Z",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Returns all relevant content resources
Path /content/resources
{
"type": "object",
"properties": {
"applicationId": { "type": "string", "minLength": 1 },
"applicationServiceGroupId": { "type": "string", "minLength": 1 },
"resourceType": {
"type": "string",
"enum": [
"Article",
"Discussion",
"LiveDiscussion",
"QAndADiscussion",
"Comment",
"ArticleComment",
"DiscussionComment",
"LiveDiscussionComment"
]
},
"categoryId": { "type": "string", "minLength": 1 },
"topicId": { "type": "string", "minLength": 1 },
"parentResourceId": { "type": "string", "minLength": 1 },
"publishStatus": {
"type": "string",
"enum": ["Unpublished", "Published"]
},
"moderationStatus": {
"type": "string",
"enum": ["PendingModeration", "PassedModeration", "FailedModeration"]
},
"age": { "type": "integer", "minimum": 1, "maximum": 999 },
"keywords": { "type": "string", "minLength": 3 },
"order": {
"type": "string",
"enum": [
"Newest",
"Oldest",
"MostUseful",
"LeastUseful",
"MostFollowed",
"LeastFollowed"
],
"default": "Newest"
},
"page": { "type": "integer', "minimum": 1, "default": 1 },
"perPage": { "type": "integer', "minimum": 1, "maximum": 50, "default": 10 }
},
}
Responses
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Returns the resources that a user follows
Path /content/follows
{
"type": "object",
"properties": {
"applicationServiceGroupId": { "type": "string", "minLength": 1 },
"applicationId": { "type": "string", "minLength": 1 },
"resourceId": { "type": "string", "minLength": 1 },
"resourceType": {
"type": "string",
"enum": [
"Category",
"Topic",
"Article",
"Discussion",
"LiveDiscussion",
"QAndADiscussion",
"Comment"
]
},
"followerId": { "type": "string", "minLength": 1 },@
"followerType": { "type": "string", "enum": ["ServiceUser", "Worker"] },
"page": { "type": "integer", "minimum": 1, "default": 1 },
"perPage": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10 }
}
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@type": "Follow",
"resource": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Topic"
},
"follower": {
"@id" "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "ServiceUser",
}
},
{
"@type": "Follow",
"resource": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "Topic"
},
"follower": {
"@id" "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "ServiceUser",
}
}
// etc...
],
"pagination": {
"total": 2,
"currentPage": 10,
"perPage": 2
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Returns the topic for a given ID
Path /content/topics/:id
{
"type": "object",
"properties": {
"resourceType": {
"type": "string",
"enum": ["Article", "Discussion", "LiveDiscussion", "QAndADiscussion", "Comment"]
},
"moderationStatus": {
"type": "string",
"enum": ["PendingModeration", "PassedModeration", "FailedModeration"]
}
},
}
Responses
Status code: 200
{
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Topic",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"name": "Topic 1",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Returns all the topics
Path /content/topics
{
"type": "object",
"properties": {
"applicationServiceGroupId": { "type": "string", "minLength": 1 },
"applicationId": { "type": "string", "minLength": 1 },
"categoryId": { "type": "string", "minLength": 1 },
"order": {
"type": "string",
"enum": [
"AlphabeticalAsc",
"AlphabeticalDesc",
"MostUseful",
"LeastUseful",
"MostFollowed",
"LeastFollowed"
],
"default": "AlphabeticalAsc"
},
"resourceType": {
"type": "string",
"enum": ["Article", "Discussion", "LiveDiscussion", "QAndADiscussion", "Comment"]
},
"moderationStatus": {
"type": "string",
"enum": ["PendingModeration", "PassedModeration", "FailedModeration"]
},
"page": { "type": "integer", "minimum": 1, "default": 1 },
"perPage": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10 }
},
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Topic",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"name": "Topic 1",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
},
// etc...
],
"pagination": {
"total": 2,
"currentPage": 10,
"perPage": 2
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Returns the resources that a user finds useful
Path /content/usefuls
{
"type": "object",
"properties": {
"applicationServiceGroupId": { "type": "string", "minLength": 1 },
"applicationId": { "type": "string", "minLength": 1 },
"resourceId": { "type": "string", "minLength": 1 },
"resourceType": {
"type": "string",
"enum": [
"Category",
"Topic",
"Article",
"Discussion",
"LiveDiscussion",
"QAndADiscussion",
"Comment"
]
},
"userType": { "type": "string", "enum": ["ServiceUser", "Worker" },
"usefulUserId": { "type": "string", "minLength": 1 },
"page": { "type": "integer", "minimum": 1, "default": 1 },
"perPage": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10 }
}
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@type": "Useful",
"resource": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Topic"
},
"user": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Worker"
}
},
{
"@type": "Useful",
"resource": {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "Topic"
},
"user": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "ServiceUser"
}
}
// etc...
],
"pagination": {
"total": 2,
"currentPage": 10,
"perPage": 2
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Moderate a content resource
Path /content/resources/:id/moderation
{
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Comment",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"topic": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Topic"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"replyTo": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Comment"
},
"author": {
"@id": "e453f1a8-623a-4ea0-be09-544d4671aacc",
"@type": "ServiceUser"
},
"title": "Title of the comment",
"content": "The content of the comment",
"publishStatus": { "@id": "Published", "@type": "PublishStatus" },
"moderationStatus": { "@id": "PassedModeration", "@type": "ModerationStatus" },
"minAge": 0,
"maxAge": 999,
"thumbnail": {
"@id": "[file-path]",
"@type": "Thumbnail"
},
}
Constraints
{
"type": "object",
"properties": {
"@type": {
"type": "string",
"enum": [
"Article",
"Discussion",
"LiveDiscussion",
"QAndADiscussion",
"Comment"
]
},
"application": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Application"
],
"default": "Application"
}
},
"required": [
"@id"
]
},
"category": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Category"
],
"default": "Category"
}
},
"required": [
"@id"
]
},
"topic": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Topic"
],
"default": "Topic"
}
},
"required": [
"@id"
]
},
"author": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"ServiceUser",
"Worker"
]
}
},
"required": [
"@id",
"@type"
]
},
"title": {
"type": "string",
"minLength": 1
},
"content": {
"type": "string",
"minLength": 1
},
"publishStatus": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"enum": [
"Unpublished",
"Published"
],
"default": "Unpublished"
},
"@type": {
"type": "string",
"enum": [
"PublishStatus"
],
"default": "PublishStatus"
}
},
"required": [
"@id"
]
},
"moderationStatus": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"enum": [
"PendingModeration",
"PassedModeration",
"FailedModeration"
],
"default": "PendingModeration"
},
"@type": {
"type": "string",
"enum": [
"ModerationStatus"
],
"default": "ModerationStatus"
}
},
"required": [
"@id"
]
},
"minAge": {
"type": "integer",
"minimum": 0,
"maximum": 999
},
"maxAge": {
"type": "integer",
"minimum": 0,
"maximum": 999
},
"startTime": {
"type": "string"
},
"endTime": {
"type": "string"
},
"replyTo": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Article",
"Discussion",
"LiveDiscussion",
"QAndADiscussion",
"Comment"
]
}
},
"required": [
"@id",
"@type"
]
}
},
"thumbnail": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Thumbnail"
],
"default": "Thumbnail"
}
},
"required": [
"@id"
]
},
"required": [
"@id",
"@type",
"application",
"author",
"content",
"publishStatus",
"moderationStatus"
]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "ContentResourceModeratedEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Comment",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"topic": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Topic"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"replyTo": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Comment"
},
"author": {
"@id": "e453f1a8-623a-4ea0-be09-544d4671aacc",
"@type": "ServiceUser"
},
"thumbnail": {
"@id": "[file-path]",
"@type": "Thumbnail"
},
"title": "Title of the comment",
"content": "The content of the comment",
"publishStatus": { "@id": "Unpublished", "@type": "PublishStatus" },
"moderationStatus": { "@id": "FailedModeration", "@type": "ModerationStatus" },
"minAge": 0,
"maxAge": 999,
"dateTimeCreated": "2018-01-01T00:00:00.000Z",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ContentResourceModeratedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "ContentResourceModeratedEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Comment",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"topic": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Topic"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"replyTo": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Comment"
},
"author": {
"@id": "e453f1a8-623a-4ea0-be09-544d4671aacc",
"@type": "ServiceUser"
},
"thumbnail": {
"@id": "[file-path]",
"@type": "Thumbnail"
},
"title": "Title of the comment",
"content": "The content of the comment",
"publishStatus": { "@id": "Unpublished", "@type": "PublishStatus" },
"moderationStatus": { "@id": "FailedModeration", "@type": "ModerationStatus" },
"minAge": 0,
"maxAge": 999,
"dateTimeCreated": "2018-01-01T00:00:00.000Z",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}
]
}
[#] [back to top]
Updates a category
Path /content/categories/:id
{
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Category",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"name": "Category A"
}
Constraints
{
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["Category"], default: "Category" },
"application": {
"type": "object",
"properties: {
"@id": { "type": "string", "minLength": 1 },
"@type" { "type": "string", "enum": ["Application"], "default": "Application" }
},
"required": ["@id"]
}
"name": { "type": "string", "minLength": 1 }
},
"required": ["@id", "application", "name"]
}
Responses
Status code: 200
{
"@context": 'https://vocabularies.xenzone.com/context.jsonld',
"@graph": [{
"@id": "[event-id]",
"@type": "ContentCategoryUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-id]"
}, {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Category",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"name": "Category A",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Updates a content resource
Path /content/resources/:id
{
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Comment"
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"topic": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Topic"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"replyTo": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Comment"
},
"title": "The title of the comment",
"content": "The content of the comment",
"publishStatus": { "@id": "PendingModeration", "@type": "ModerationStatus" },
"minAge": 0,
"maxAge": 999,
"thumbnail": {
"@id": "[file-path]",
"@type": "Thumbnail"
},
}
Constraints
{
"type": "object",
"properties": {
"@type": {
"type": "string",
"enum": [
"Article",
"Discussion",
"LiveDiscussion",
"QAndADiscussion",
"Comment"
]
},
"application": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Application"
],
"default": "Application"
}
},
"required": [
"@id"
]
},
"category": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Category"
],
"default": "Category"
}
},
"required": [
"@id"
]
},
"topic": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Topic"
],
"default": "Topic"
}
},
"required": [
"@id"
]
},
"author": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"ServiceUser",
"Worker"
]
}
},
"required": [
"@id",
"@type"
]
},
"title": {
"type": "string",
"minLength": 1
},
"content": {
"type": "string",
"minLength": 1
},
"publishStatus": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"enum": [
"Unpublished",
"Published"
],
"default": "Unpublished"
},
"@type": {
"type": "string",
"enum": [
"PublishStatus"
],
"default": "PublishStatus"
}
},
"required": [
"@id"
]
},
"minAge": {
"type": "integer",
"minimum": 0,
"maximum": 999
},
"maxAge": {
"type": "integer",
"minimum": 0,
"maximum": 999
},
"startTime": {
"type": "string"
},
"endTime": {
"type": "string"
},
"replyTo": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Article",
"Discussion",
"LiveDiscussion",
"QAndADiscussion",
"Comment"
]
}
},
"required": [
"@id",
"@type"
]
}
},
"thumbnail": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"minLength": 1
},
"@type": {
"type": "string",
"enum": [
"Thumbnail"
],
"default": "Thumbnail"
}
},
"required": [
"@id"
]
},
"required": [
"@type",
"application",
"author",
"content"
]
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "ContentResourceUpdatedEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Comment",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"topic": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Topic"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"replyTo": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Comment"
},
"author": {
"@id": "e453f1a8-623a-4ea0-be09-544d4671aacc",
"@type": "ServiceUser"
},
"thumbnail": {
"@id": "[file-path]",
"@type": "Thumbnail"
},
"title": "Title of the comment",
"content": "The content of the comment",
"publishStatus": { "@id": "Unpublished", "@type": "PublishStatus" },
"moderationStatus": { "@id": "PendingModeration", "@type": "ModerationStatus" },
"minAge": 0,
"maxAge": 999,
"dateTimeCreated": "2018-01-01T00:00:00.000Z",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
UpdateContentResourceEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "13328e94-afd8-4135-b467-409256f2778f",
"@type": "ContentResourceUpdatedEvent",
"causedBy": "commands/75a892ba-1ed3-4bb3-afe2-1df5f1141b35",
"atTime": "2018-01-01T00:00:00.000Z"
}, {
"@id": "330b65b8-0b71-44e4-a65f-4e6e984907b6",
"@type": "Comment",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"topic": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Topic"
},
"category": {
"@id": "bb965149-bae9-4535-9dbe-c751229643d5",
"@type": "Category"
},
"replyTo": {
"@id": "f5dcceae-8bbd-4b87-ae59-d9ac9697ed5c",
"@type": "Comment"
},
"author": {
"@id": "e453f1a8-623a-4ea0-be09-544d4671aacc",
"@type": "ServiceUser"
},
"thumbnail": {
"@id": "[file-path]",
"@type": "Thumbnail"
},
"title": "Title of the comment",
"content": "The content of the comment",
"publishStatus": { "@id": "Unpublished", "@type": "PublishStatus" },
"moderationStatus": { "@id": "PendingModeration", "@type": "ModerationStatus" },
"minAge": 0,
"maxAge": 999,
"dateTimeCreated": "2018-01-01T00:00:00.000Z",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}
]
}
[#] [back to top]
Updates a topic
Path /content/topics/:id
{
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "Topic",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application"
},
"category": {
"@id": "e401fd9b-ef4a-49a0-a27b-aeecdf6c4df3",
"@type": "Category"
},
"name": "Topic Name"
}
Constraints
{
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["Topic"], "default": "Topic" },
"application": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["Application"], "default": "Application" }
},
"required": ["@id"]
},
"category": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": { "type": "string", "enum": ["Category"], "default": "Category" }
},
"required": ["@id"]
}
"name": { "type": "string", "minLength": 1 }
},
"required": ["@id", "application", "category", "name"]
}
Responses
Status code: 200
{
"@context": 'https://vocabularies.xenzone.com/context.jsonld',
"@graph": [{
"@id": "[event-id]",
"@type": "ContentTopicUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-id]"
}, {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "Topic",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application",
},
"category": {
"@id": "e401fd9b-ef4a-49a0-a27b-aeecdf6c4df3",
"@type" "Category"
},
"name": "Topic Name",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ForumTopicUpdatedEvent
{
"@context": 'https://vocabularies.xenzone.com/context.jsonld',
"@graph": [{
"@id": "[event-id]",
"@type": "ContentTopicUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-id]"
}, {
"@id": "f9edff9c-9d54-4e5e-94e3-891d94e64af2",
"@type": "Topic",
"application": {
"@id": "20fc60c1-d232-48a4-96ed-85b03fddc0a4",
"@type": "Application",
},
"category": {
"@id": "e401fd9b-ef4a-49a0-a27b-aeecdf6c4df3",
"@type" "Category"
},
"name": "Topic Name",
"contentCount": 0,
"userCount": 0,
"usefulCount": 0,
"followCount": 0
}]
}
[#] [back to top]
A command to send an email
Path /emails
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "commands/6de5bb4e-6f81-4f85-82cf-8bca85703fab",
"@type": "communication:Email",
"communication:subject": "Welcome to XCP",
"communication:body": [
{
"@type": "communication:HtmlBody",
"core:content": "Lorem Ipsum"
},
{
"@type": "communication:TextBody",
"core:content": "Lorem Ipsum"
}
],
"communication:from": {
"@type": "communication:Sender",
"core:emailAddress": "platform@xenzone.com",
"core:name": "XenZone Platform"
},
"communication:to": [
{
"@type": "communication:Recipient",
"core:emailAddress": "t.cooper@example.com"
},
{
"@type": "communication:Recipient",
"core:emailAddress": "j.smith@example.com"
}
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"api:atTime": "2018-01-05T16:56:15+00:00",
"email": {
"@type": "Email",
"communication:subject": "Welcome to XCP",
"communication:body": [
{
"@type": "communication:HtmlBody",
"core:content": "Lorem Ipsum"
},
{
"@type": "communication:TextBody",
"core:content": "Lorem Ipsum"
}
],
"communication:from": {
"core:emailAddress": "platform@xenzone.com",
"core:name": "XenZone Platform"
},
"communication:to": [
{
"core:emailAddress": "t.cooper@example.com"
},
{
"core:emailAddress": "j.smith@example.com"
}
]
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
EmailSentEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"api:atTime": "2018-01-05T16:56:15+00:00",
"email": {
"@type": "Email",
"communication:subject": "Welcome to XCP",
"communication:body": [
{
"@type": "communication:HtmlBody",
"core:content": "Lorem Ipsum"
},
{
"@type": "communication:TextBody",
"core:content": "Lorem Ipsum"
}
],
"communication:from": {
"core:emailAddress": "platform@xenzone.com",
"core:name": "XenZone Platform"
},
"communication:to": [
{
"core:emailAddress": "t.cooper@example.com"
},
{
"core:emailAddress": "j.smith@example.com"
}
]
}
}
EmailFailedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"api:atTime": "2018-01-05T16:56:15+00:00"
}
[#] [back to top]
Creates a new multi-user chat, and invites the moderators and participants
Path /messaging/chats
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Chat",
"participants": [
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
}
],
"moderators": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
}
],
"application": {
"@id": "645d38b7-1105-40d5-b1e6-17cf17d430ce",
"@type": "Application"
}
}
Constraints
{
"type": "object",
"properties": {
"@context": {
"type": "string",
"enum": [
"https://vocabularies.xenzone.com/context.jsonld"
]
},
"@id": {
"type": "string",
"format": "uuid"
},
"@type": {
"type": "string",
"enum": [
"Chat"
]
},
"status": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"enum": [
"Active",
"Archived",
"Unassigned"
]
},
"@type": {
"type": "string",
"enum": [
"ConversationStatus"
]
}
},
"required": [
"@id",
"@type"
]
},
"timer": {
"type": "object",
"properties": {
"startTime": {
"type": "string",
"format": "date-time"
},
"endTime": {
"type": "string",
"format": "date-time"
}
}
},
"participants": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"format": "uuid"
},
"@type": {
"type": "string",
"enum": [
"Worker",
"ServiceUser"
]
}
},
"required": [
"@id",
"@type"
]
}
},
"moderators": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"format": "uuid"
},
"@type": {
"type": "string",
"enum": [
"Worker",
"ServiceUser"
]
}
},
"required": [
"@id",
"@type"
]
}
},
"application": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"format": "uuid"
},
"@type": {
"type": "string",
"enum": [
"Application"
]
}
},
"required": [
"@id",
"@type"
]
}
},
"required": [
"@type",
"participants",
"moderators"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ChatCreatedEvent",
"causedBy": "commands/[command-id]",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Chat",
"participants": [
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
}
],
"moderators": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
}
],
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
"endTime": "2018-04-28T13:00:13.006Z",
},
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"application": {
"@id": "645d38b7-1105-40d5-b1e6-17cf17d430ce",
"@type": "Application"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ChatCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ChatCreatedEvent",
"causedBy": "commands/[command-id]",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Chat",
"participants": [
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
}
],
"moderators": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
}
],
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
"endTime": "2018-04-28T13:00:13.006Z",
},
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"application": {
"@id": "645d38b7-1105-40d5-b1e6-17cf17d430ce",
"@type": "Application"
}
}
]
}
[#] [back to top]
Create a new conversation within a mailbox
Path /mailbox-conversations
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "MailboxConversation",
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
},
"participants": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
},
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
},
],
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": "ApplicationServiceGroup"
}
}
Constraints
{
"type": "object",
"properties": {
"@context": {
"type": "string",
"enum": [
"https://vocabularies.xenzone.com/context.jsonld"
]
},
"@id": {
"type": "string",
"format": "uuid"
},
"@type": {
"type": "string",
"enum": [
"MailboxConversation"
]
},
"status": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"enum": [
"Active",
"Archived",
"Unassigned"
]
},
"@type": {
"type": "string",
"enum": [
"ConversationStatus"
]
}
},
"required": [
"@id",
"@type"
]
},
"timer": {
"type": "object",
"properties": {
"startTime": {
"type": "string",
"format": "date-time"
},
"endTime": {
"type": "string",
"format": "date-time"
}
}
},
"participants": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"format": "uuid"
},
"@type": {
"type": "string",
"enum": [
"Worker",
"ServiceUser"
]
}
},
"required": [
"@id",
"@type"
]
}
},
"applicationServiceGroup": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"pattern": "^asg\/.+$"
},
"@type": {
"type": "string",
"enum": [
"ApplicationServiceGroup"
]
}
},
"required": [
"@id",
"@type"
]
}
},
"required": [
"@type",
"participants"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "ed7ebb91-26af-46c6-ba82-18121ace1cbe",
"@type": "MailboxConversationCreatedEvent",
"causedBy": "commands/e5e72f2d-82c1-4dfc-bd30-eb2209604916",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "867e8039-6b46-4207-9656-b55973a6d537",
"@type": "MailboxConversation",
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
},
"participants": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
},
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
},
],
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": "ApplicationServiceGroup"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 406
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
MailboxConversationCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "ed7ebb91-26af-46c6-ba82-18121ace1cbe",
"@type": "MailboxConversationCreatedEvent",
"causedBy": "commands/e5e72f2d-82c1-4dfc-bd30-eb2209604916",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "867e8039-6b46-4207-9656-b55973a6d537",
"@type": "MailboxConversation",
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
},
"participants": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
},
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
},
],
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": "ApplicationServiceGroup"
}
}
]
}
[#] [back to top]
Ends an existing multi-user chat, and removes all users from the room
Path /messaging/chats/[chat-id]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ChatEndedEvent",
"causedBy": "commands/[command-id]",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Chat",
"participants": [
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
}
],
"moderators": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
}
],
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
"endTime": "2018-04-28T13:00:13.006Z"
},
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"application": {
"@id": "645d38b7-1105-40d5-b1e6-17cf17d430ce",
"@type": "Application"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ChatEndedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ChatEndedEvent",
"causedBy": "commands/[command-id]",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Chat",
"participants": [
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
}
],
"moderators": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
}
],
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
"endTime": "2018-04-28T13:00:13.006Z"
},
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"application": {
"@id": "645d38b7-1105-40d5-b1e6-17cf17d430ce",
"@type": "Application"
}
}
]
}
[#] [back to top]
Sets the end time of a chat
Path /messaging/chats/[chat-id]/timer
{
@context: "https://vocabularies.xenzone.com/context.jsonld",
@type: "Chat",
"endTime": "2018-01-01T00:00:00.000Z"
}
Constraints
{
"type": "object",
"properties": {
"startTime": {
"type": "string",
"format": "date-time"
},
"endTime": {
"type": "string",
"format": "date-time"
}
}
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ChatTimerEndedEvent",
"causedBy": "commands/[command-id]",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Chat",
"participants": [
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
}
],
"moderators": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
}
],
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
"endTime": "2018-04-28T13:00:13.006Z"
},
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"application": {
"@id": "645d38b7-1105-40d5-b1e6-17cf17d430ce",
"@type": "Application"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ChatTimerEndedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ChatTimerEndedEvent",
"causedBy": "commands/[command-id]",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Chat",
"participants": [
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
}
],
"moderators": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
}
],
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
"endTime": "2018-04-28T13:00:13.006Z"
},
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"application": {
"@id": "645d38b7-1105-40d5-b1e6-17cf17d430ce",
"@type": "Application"
}
}
]
}
[#] [back to top]
Gets information about a multi-user chat room
Path /messaging/chats/[chat-id]Responses
Status code: 200
{
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Chat",
"participants": [
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
}
],
"moderators": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
}
],
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
"endTime": "2018-04-28T13:00:13.006Z"
},
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"application": {
"@id": "645d38b7-1105-40d5-b1e6-17cf17d430ce",
"@type": "Application"
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get all conversations
Path /mailbox-conversationsResponses
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get a conversation within a service user mailbox
Path /service-user-mailboxes/:workerId/conversations/:conversationIdResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "c12c7186-b5f7-45cd-892b-7975775bf8c2",
"@type": "MailboxConversation",
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
},
"participants": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
},
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
},
],
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": "ApplicationServiceGroup"
}
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get all conversation within a service user mailbox
Path /service-user-mailboxes/:serviceUserId/conversationsResponses
Status code: 200
{
"results": [
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "c12c7186-b5f7-45cd-892b-7975775bf8c2",
"@type": "MailboxConversation",
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
},
"participants": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "ServiceUser"
},
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
},
],
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": "ApplicationServiceGroup"
}
}
],
"pagination": {
"total": 10,
"currentPage": 1,
"perPage": 1
}
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get a conversation within a worker mailbox
Path /worker-mailboxes/:workerId/conversations/:conversationIdResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "c12c7186-b5f7-45cd-892b-7975775bf8c2",
"@type": "MailboxConversation",
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
},
"participants": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
},
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
},
],
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": "ApplicationServiceGroup"
}
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Get all conversation within a worker mailbox
Path /worker-mailboxes/:workerId/conversationsResponses
Status code: 200
{
"results": [
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "c12c7186-b5f7-45cd-892b-7975775bf8c2",
"@type": "MailboxConversation",
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
},
"participants": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
},
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
},
],
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": "ApplicationServiceGroup"
}
}
],
"pagination": {
"total": 10,
"currentPage": 1,
"perPage": 1
}
}
Status code: 200
{
"results": [
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "c12c7186-b5f7-45cd-892b-7975775bf8c2",
"@type": "MailboxConversation",
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
},
"participants": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
},
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
},
],
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": "ApplicationServiceGroup"
}
}
],
"pagination": {
"total": 10,
"currentPage": 1,
"perPage": 1
}
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
Partially update a conversation within a mailbox
Path /mailbox-conversations/:conversationId
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "MailboxConversation",
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
},
"participants": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
},
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
},
],
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": "ApplicationServiceGroup"
}
}
Constraints
{
"type": "object",
"properties": {
"@context": {
"type": "string",
"enum": [
"https://vocabularies.xenzone.com/context.jsonld"
]
},
"@id": {
"type": "string",
"format": "uuid"
},
"@type": {
"type": "string",
"enum": [
"MailboxConversation"
]
},
"status": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"enum": [
"Active",
"Archived",
"Unassigned"
]
},
"@type": {
"type": "string",
"enum": [
"ConversationStatus"
]
}
},
"required": [
"@id",
"@type"
]
},
"timer": {
"type": "object",
"properties": {
"startTime": {
"type": "string",
"format": "date-time"
},
"endTime": {
"type": "string",
"format": "date-time"
}
}
},
"participants": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"format": "uuid"
},
"@type": {
"type": "string",
"enum": [
"Worker",
"ServiceUser"
]
}
},
"required": [
"@id",
"@type"
]
}
},
"applicationServiceGroup": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"pattern": "^asg\/.+$"
},
"@type": {
"type": "string",
"enum": [
"ApplicationServiceGroup"
]
}
},
"required": [
"@id",
"@type"
]
}
},
"required": [
"@type"
]
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "ed7ebb91-26af-46c6-ba82-18121ace1cbe",
"@type": "MailboxConversationUpdatedEvent",
"causedBy": "commands/e5e72f2d-82c1-4dfc-bd30-eb2209604916",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "867e8039-6b46-4207-9656-b55973a6d537",
"@type": "MailboxConversation",
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
},
"participants": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
},
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
},
],
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": "ApplicationServiceGroup"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 406
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
MailboxConversationUpdatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "ed7ebb91-26af-46c6-ba82-18121ace1cbe",
"@type": "MailboxConversationUpdatedEvent",
"causedBy": "commands/e5e72f2d-82c1-4dfc-bd30-eb2209604916",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "867e8039-6b46-4207-9656-b55973a6d537",
"@type": "MailboxConversation",
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"timer": {
"startTime": "2018-04-27T13:00:13.006Z",
},
"participants": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
},
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
},
],
"applicationServiceGroup": {
"@id": "asg/YoungPeople",
"@type": "ApplicationServiceGroup"
}
}
]
}
[#] [back to top]
Sends a message to a conversation
Path /messages
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "LinkMessage",
"to": {
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Chat"
},
"from": {
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Worker"
},
"body": "The text to show as a hyperlink",
"url": "The URL to direct a user to when the link is clicked"
}
Constraints
{
"type": "object",
"properties": {
"@type": {
"type": "string",
"enum": [
"BasicMessage",
"BasicAdminMessage",
"LinkMessage"
]
},
"to": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": {
"type": "string",
"enum": ["Worker", "ServiceUser", "Chat", "MailboxConversation"]
}
},
"required": ["@id", "@type"]
},
"from": {
"type": "object",
"properties": {
"@id": { "type": "string", "minLength": 1 },
"@type": {
"type": "string",
"enum": ["Worker", "ServiceUser", "Chat", "MailboxConversation"]
}
},
"required": ["@id", "@type"]
},
"body": { "type": "string", "minLength": 1 },
"url": { "type": "string", "minLength": 1 }
},
"required": ["@type", "to", "from", "body"]
}
Responses
Status code: 202
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "MessagePreparedEvent",
"causedBy": "commands/[command-id]",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "[user-id]",
"@type": "Worker"
},
{
"@id": "[message-id]",
"@type": "MessageStanza",
},
{
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Chat",
"participants": [
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
}
],
"moderators": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
}
],
"timer": {
"startTime": "2018-04-27T13:00:13.006Z"
},
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"application": {
"@id": "645d38b7-1105-40d5-b1e6-17cf17d430ce",
"@type": "Application"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
MessagePreparedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "MessagePreparedEvent",
"causedBy": "commands/[command-id]",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "[user-id]",
"@type": "Worker"
},
{
"@id": "[message-id]",
"@type": "MessageStanza",
},
{
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Chat",
"participants": [
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
}
],
"moderators": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
}
],
"timer": {
"startTime": "2018-04-27T13:00:13.006Z"
},
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"application": {
"@id": "645d38b7-1105-40d5-b1e6-17cf17d430ce",
"@type": "Application"
}
}
]
}
[#] [back to top]
Sets the start time of a chat
Path /messaging/chats/[chat-id]/timer
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Chat",
"startTime": "2018-01-01T00:00:00.000Z"
}
Constraints
{
"type": "object",
"properties": {
"startTime": {
"type": "string",
"format": "date-time"
},
"endTime": {
"type": "string",
"format": "date-time"
}
}
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ChatTimerStartedEvent",
"causedBy": "commands/[command-id]",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Chat",
"participants": [
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
}
],
"moderators": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
}
],
"timer": {
"startTime": "2018-04-27T13:00:13.006Z"
},
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"application": {
"@id": "645d38b7-1105-40d5-b1e6-17cf17d430ce",
"@type": "Application"
}
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 404
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity was not found - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
ChatTimerStartedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "ChatTimerStartedEvent",
"causedBy": "commands/[command-id]",
"atTime": "2018-01-01T00:00:00.000Z"
},
{
"@id": "3bb3c9ba-d26f-44bd-a007-fe6c3574789f",
"@type": "Chat",
"participants": [
{
"@id": "0794c1d2-3cd6-4587-8e66-bcc27ba368c1",
"@type": "ServiceUser"
}
],
"moderators": [
{
"@id": "d682ed3f-dbce-41eb-bf2d-e5fc56dc9db1",
"@type": "Worker"
}
],
"timer": {
"startTime": "2018-04-27T13:00:13.006Z"
},
"status": {
"@id": "Active",
"@type": "ConversationStatus"
},
"application": {
"@id": "645d38b7-1105-40d5-b1e6-17cf17d430ce",
"@type": "Application"
}
}
]
}
[#] [back to top]
A command to create a new agency in an asg.
Path /agencies
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Agency",
"organisation": "City of London Police",
"address": "12 Norrice Avenue, SW3 58T",
"details": "The City of London Police is responsible for law enforcement within the City of London",
"categories": [
{
"@type": "AgencyCategory",
"@id": "Advocacy",
}
],
"contact": {
"@type": "AgencyContact",
"name": "Hans Gruber",
"telephoneNumber": "+442075673810",
},
"areas": [
{
"@type": "AgencyArea",
"@id": "Wirral",
}
]
}
Constraints
{
"title": "CreateAgency",
"type": "object",
"properties" {
"@context": {
"type": "string"
},
"@type": {
"type": "string"
},
"organisation": {
"type": "string",
},
"address": {
"type": "string",
},
"details": {
"type": "string",
},
"categories": {
"type": "array",
"items": {
"type": "object",
"properties" {
"@type": {
"type": "string"
},
"@id": {
"type": "string",
"enum": [
"AdultServices",
"Advocacy",
"BullyingServices",
"BereavementServices",
"Camhs",
"ChildrenSServices",
"ChildProtection",
"CrisisServices",
"CounsellingAndTherapy",
"CommunitySupportGroups",
"ChildSexualExploitation",
"DrugAndAlcoholServices",
"DisabilityServices",
"DomesticAbuse",
"EducationWorkAndTraining",
"FamilyServices",
"ForcedMarriage",
"Fgm",
"HealthAndWelbeingServices",
"HousingAndHomelessness",
"Iapt",
"InformationAdviceAndGuidance",
"KoothF2FCounselling",
"LgbtqServices",
"LookedAfterChildren",
"MentalHealthSupportServices",
"OnlineSupportServices",
"OnlineSafety",
"ParentingServices",
"PositiveActivitiesGroups",
"PoliceServices",
"RacismAndInequality",
"Radicalisation",
"StayingSafe",
"Sen",
"SexualHealthAndRelationships",
"SocialCare",
"TargettedYouthSupport",
"VolunteeringServices",
"VictimSupport",
"YouthWorkServices",
"YoungCarers",
"YouthJusticeOffending",
"Uncategorised"
]
}
}
},
"required": [
"@type",
"@id"
]
},
"contact": {
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"name": {
"type": "string"
},
"telephoneNumber": {
"pattern": "^\+[1-9]\d{1,14}$",
"type": "string"
},
"required": [
"@type",
"name",
"telephoneNumber",
],
},
"areas": {
"type": "array",
"items": {
"type": "object",
"properties" {
"@type": {
"type": "string"
},
"@id": {
"type": "string",
"enum": [
"Knowsley",
"Wirral",
"Powys",
"Cardiff",
"Oldham",
"CheshireEast",
"Dudley",
"Lincolnshire",
"Cornwall",
"Walsall",
"NottinghamCity",
"WestSussex",
"Sandwell",
"Cumbria",
"Lewisham",
"Bracknell",
"Halton",
"Devon",
"Leicestershire",
"Wakefield",
"Hertfordshire",
"Slough",
"WindsorAndMaidenhead",
"Warrington",
"Rochdale",
"Wiltshire",
"BathAndNorthEastSomerset",
"Surrey",
"Manchester",
"Plymouth",
"Bristol",
"BarkingAndDagenham",
"CambridgeshireAndPeterborough",
"Worcestershire",
"LincolnshireNorthEast",
"Nottinghamshire",
"TelfordAndWrekin",
"KingstonUponThames",
"Shropshire",
"Somerset",
"Barnet",
"Redbridge",
"Calderdale",
"Havering",
"Westminster",
"KensingtonAndChelsea",
"HammersmithAndFulham",
"KentSwale",
"KentGravesham",
"ManchesterTrafford",
"Rootcapital",
"UniversityOfWestEngland",
"Essex",
"Windleborough",
"Solihull",
"KentAshford",
"KentCanterbury",
"KentShepway",
"Swindon",
"Bolton",
"NorthTyneside",
"SomersetNorth",
"Wolverhampton"
]
}
}
},
"required": [
"@type",
"@id"
]
}
},
"required": [
"@type",
"organisation",
"address",
"details",
"categories",
"contact",
"areas",
],
}
Responses
Status code: 201
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "AgencyCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[agency-id]",
"@type": "Agency",
"organisation": "City of London Police",
"address": "12 Norrice Avenue, SW3 58T",
"details": "The City of London Police is responsible for law enforcement within the City of London",
"categories": [
{
"@type": "AgencyCategory",
"@id": "Advocacy",
}
],
"contact": {
"@type": "AgencyContact",
"name": "Hans Gruber",
"telephoneNumber": "+442075673810",
},
"areas": [
{
"@type": "AgencyArea",
"@id": "Wirral",
}
]
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 409
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity conflicts with an pre-existing entity - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
AgencyCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "AgencyCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[agency-id]",
"@type": "Agency",
"organisation": "City of London Police",
"address": "12 Norrice Avenue, SW3 58T",
"details": "The City of London Police is responsible for law enforcement within the City of London",
"categories": [
{
"@type": "AgencyCategory",
"@id": "Advocacy",
}
],
"contact": {
"@type": "AgencyContact",
"name": "Hans Gruber",
"telephoneNumber": "+442075673810",
},
"areas": [
{
"@type": "AgencyArea",
"@id": "Wirral",
}
]
}
]
}
[#] [back to top]
A command to get agencies
Path /agenciesResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "[agency-id]",
"@type": "Agency",
"organisation": "City of London Police",
"address": "12 Norrice Avenue, SW3 58T",
"details": "The City of London Police is responsible for law enforcement within the City of London",
"categories": [
{
"@type": "AgencyCategory",
"@id": "Advocacy",
}
],
"contact": {
"@type": "AgencyContact",
"name": "Hans Gruber",
"telephoneNumber": "+442075673810",
},
"areas": [
{
"@type": "AgencyArea",
"@id": "Wirral",
}
]
}
],
"pagination": {
"currentPage": 5,
"perPage": 20,
"total": 521
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
A command to get an agency
Path /agencies/[agency-id]Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@id": "[agency-id]",
"@type": "Agency",
"organisation": "City of London Police",
"address": "12 Norrice Avenue, SW3 58T",
"details": "The City of London Police is responsible for law enforcement within the City of London",
"categories": [
{
"@type": "AgencyCategory",
"@id": "Advocacy",
}
],
"contact": {
"@type": "AgencyContact",
"name": "Hans Gruber",
"telephoneNumber": "+442075673810",
},
"areas": [
{
"@type": "AgencyArea",
"@id": "Wirral",
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
A command to get agency areas
Path /areasResponses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Collection",
"results": [
{
"@id": "Wirral",
"@type": "AgencyArea"
}
],
"pagination": {
"currentPage": 5,
"perPage": 20,
"total": 521
}
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
A command to get agency categories
Path /agency-categoriesResponses
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
[#] [back to top]
A command to update an agency in an ASG
Path /agencies/[agency-id]/
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Agency",
"organisation": "City of London Police",
"address": "12 Norrice Avenue, SW3 58T",
"details": "The City of London Police is responsible for law enforcement within the City of London",
"categories": [
{
"@type": "AgencyCategory",
"@id": "Advocacy",
}
],
"contact": {
"@type": "AgencyContact",
"name": "Hans Gruber",
"telephoneNumber": "+442075673810",
},
"areas": [
{
"@type": "AgencyArea",
"@id": "Wirral",
}
]
}
Constraints
{
"title": "UpdateAgency",
"type": "object",
"properties" {
"@context": {
"type": "string"
},
"@type": {
"type": "string"
},
"organisation": {
"type": "string",
},
"address": {
"type": "string",
},
"details": {
"type": "string",
},
"categories": {
"type": "array",
"items": {
"type": "object",
"properties" {
"@type": {
"type": "string"
},
"@id": {
"type": "string",
"enum": [
"AdultServices",
"Advocacy",
"BullyingServices",
"BereavementServices",
"Camhs",
"ChildrenSServices",
"ChildProtection",
"CrisisServices",
"CounsellingAndTherapy",
"CommunitySupportGroups",
"ChildSexualExploitation",
"DrugAndAlcoholServices",
"DisabilityServices",
"DomesticAbuse",
"EducationWorkAndTraining",
"FamilyServices",
"ForcedMarriage",
"Fgm",
"HealthAndWelbeingServices",
"HousingAndHomelessness",
"Iapt",
"InformationAdviceAndGuidance",
"KoothF2FCounselling",
"LgbtqServices",
"LookedAfterChildren",
"MentalHealthSupportServices",
"OnlineSupportServices",
"OnlineSafety",
"ParentingServices",
"PositiveActivitiesGroups",
"PoliceServices",
"RacismAndInequality",
"Radicalisation",
"StayingSafe",
"Sen",
"SexualHealthAndRelationships",
"SocialCare",
"TargettedYouthSupport",
"VolunteeringServices",
"VictimSupport",
"YouthWorkServices",
"YoungCarers",
"YouthJusticeOffending",
"Uncategorised"
]
}
}
},
"required": [
"@type",
"@id"
]
},
"contact": {
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"name": {
"type": "string"
},
"telephoneNumber": {
"pattern": "^\+[1-9]\d{1,14}$",
"type": "string"
},
"required": [
"@type",
"name",
"telephoneNumber",
],
},
"areas": {
"type": "array",
"items": {
"type": "object",
"properties" {
"@type": {
"type": "string"
},
"@id": {
"type": "string",
"enum": [
"Knowsley",
"Wirral",
"Powys",
"Cardiff",
"Oldham",
"CheshireEast",
"Dudley",
"Lincolnshire",
"Cornwall",
"Walsall",
"NottinghamCity",
"WestSussex",
"Sandwell",
"Cumbria",
"Lewisham",
"Bracknell",
"Halton",
"Devon",
"Leicestershire",
"Wakefield",
"Hertfordshire",
"Slough",
"WindsorAndMaidenhead",
"Warrington",
"Rochdale",
"Wiltshire",
"BathAndNorthEastSomerset",
"Surrey",
"Manchester",
"Plymouth",
"Bristol",
"BarkingAndDagenham",
"CambridgeshireAndPeterborough",
"Worcestershire",
"LincolnshireNorthEast",
"Nottinghamshire",
"TelfordAndWrekin",
"KingstonUponThames",
"Shropshire",
"Somerset",
"Barnet",
"Redbridge",
"Calderdale",
"Havering",
"Westminster",
"KensingtonAndChelsea",
"HammersmithAndFulham",
"KentSwale",
"KentGravesham",
"ManchesterTrafford",
"Rootcapital",
"UniversityOfWestEngland",
"Essex",
"Windleborough",
"Solihull",
"KentAshford",
"KentCanterbury",
"KentShepway",
"Swindon",
"Bolton",
"NorthTyneside",
"SomersetNorth",
"Wolverhampton"
]
}
}
},
"required": [
"@type",
"@id"
]
}
},
"required": [
"@type",
"organisation",
"address",
"details",
"categories",
"contact",
"areas",
],
}
Responses
Status code: 200
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "AgencyUpdatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[agency-id]",
"@type": "Agency",
"organisation": "City of London Police",
"address": "12 Norrice Avenue, SW3 58T",
"details": "The City of London Police is responsible for law enforcement within the City of London",
"categories": [
{
"@type": "AgencyCategory",
"id": "Advocacy",
}
],
"contact": {
"@type": "AgencyContact",
"name": "Hans Gruber",
"telephoneNumber": "+442075673810",
},
"areas": [
{
"@type": "AgencyArea",
"@id": "Wirral",
}
]
}
]
}
Status code: 400
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity is invalid - [actual information]"
}
Status code: 401
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The requested resource requires authorization"
}
Status code: 403
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "You are not authorized to access the resource"
}
Status code: 409
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "The request entity conflicts with an pre-existing entity - [actual information]"
}
Status code: 500
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@type": "Error",
"title": "An error occurred",
"description": "Server error - [actual information]"
}
Emits
AgencyCreatedEvent
{
"@context": "https://vocabularies.xenzone.com/context.jsonld",
"@graph": [
{
"@id": "[event-id]",
"@type": "AgencyCreatedEvent",
"atTime": "2018-01-10T16:56:15Z",
"causedBy": "commands/[command-uuid]"
},
{
"@id": "[agency-id]",
"@type": "Agency",
"organisation": "City of London Police",
"address": "12 Norrice Avenue, SW3 58T",
"details": "The City of London Police is responsible for law enforcement within the City of London",
"categories": [
{
"@type": "AgencyCategory",
"@id": "Advocacy",
}
],
"contact": {
"@type": "AgencyContact",
"name": "Hans Gruber",
"telephoneNumber": "+442075673810",
},
"areas": [
{
"@type": "AgencyArea",
"@id": "Wirral",
}
]
}
]
}
[#] [back to top]
Sends a message to a multi-user chat room using XMPP
Path
<message
from="hag66@shakespeare.lit/pda"
id="hysf1v37"
to="coven@chat.shakespeare.lit"
type="groupchat">
<body>Harpier cries: 'tis time, 'tis time.</body>
</message>
Responses
Emits
[#] [back to top]