Contact moments
Registrations of contact between the organization and third parties
Accept header for requests to Contact moments
application/vnd.procurios.contact_moment+json; version=1
Contact moments
GET /l/contact_moment_api/contact_moment
Get contact moments
Parameters
Parameter | Type | Description |
---|---|---|
page | int | The api will provide 25 results per page |
since | datetime | Only get results created or updated since yyyy-mm-ddThh:mm:ss |
relationIds | int[] | Limit the results to the given relationIds, as a single integer, comma-separated list of integers, or array of integers |
Examples
[]
200
[ { "id": 12345, "subject": "Test contact moment", "senderId": 42, "sender": "Douglas Adams", "type": "ContactMomentVisit", "dateTime": "2020-01-01T01:23:45", "action": 1234, "tags": { "99": "Tag name" }, "recipients": [ 123, 124, 126, "other relation ids as int" ] } ]
Schema for a certain type
GET /l/contact_moment_api/contact_moment/type/ContactMomentPhone/schema
Get the JSON schema for registering contact moments of a type
Examples
[]
200
[ { "$schema": "http:\/\/json-schema.org\/draft-07\/schema#", "title": "Contact moment", "type": "object", "properties": { "contactMomentId": { "title": "Contact moment ID", "description": "The unique ID for the contact moment", "type": "integer" }, "subject": { "title": "Subject", "description": "What the contact moment was about", "type": "string" }, "dateTime": { "title": "Date and time", "description": "yyyy-mm-dd hh:mm:ss", "type": "string" }, "senderId": { "title": "Sender ID", "description": "The Procurios ID of the relation that initiated contact", "type": "integer" }, "recipients": { "title": "Recipient", "description": "The Procurios IDs of the relations that were contacted", "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "integer" } }, "action_code": { "title": "Entered via action", "type": "integer" }, "reference": { "title": "A reference for this contact moment in the calling system.", "type": "string", "maxLength": 255 }, "tagIds": { "title": "Tag Ids", "description": "The ids of the labels attached to the contact moment for extra information", "type": "array", "minItems": 0, "uniqueItems": true, "items": { "type": "integer" } } }, "required": [ "subject", "senderId", "recipients" ] } ]
Contact moment types
GET /l/contact_moment_api/contact_moment/types
Get a list of available contact moment types
Examples
[]
200
[ { "id": "ContactMomentPhone", "title": "Telephone call", "addable": true, "_links": { "schema": { "href": "link\/to\/schema", "type": [ "GET" ] } } } ]
Tags available to contact moments
GET /l/contact_moment_api/contact_moment/tags
Get the available tags to use in contact moments
Examples
[]
200
{ "3": "Label 1", "4": "Label 2", "5": "Label 3" }
Contact moment
POST /l/contact_moment_api/contact_moment/type/ContactMomentPhone
Create a new contact moment of a type
Examples
The sender 9999 is not available in the system
{ "subject": "Retention call", "dateTime": "2018-11-13T20:20:39+02:00", "senderId": 9999, "recipients": [ 429000 ], "contents": "We had a good call and the person decided to stay a member", "action_code": 2, "reference": "MyRefernce0123" }
400
{ "errors": "Sender is not available in CRM" }
The recipient 9999 is not available in the system
{ "subject": "Retention call", "dateTime": "2018-11-13T20:20:39+02:00", "senderId": 1516, "recipients": [ 9999 ], "contents": "We had a good call and the person decided to stay a member", "action_code": 2, "reference": "MyRefernce0123" }
400
{ "errors": "Not all recipients are available in CRM" }
Sending a phone call contact moment; mind that "contents" is a phone-specific field!
{ "subject": "Retention call", "dateTime": "2018-11-13T20:20:39+02:00", "senderId": 1516, "recipients": [ 429000 ], "contents": "We had a good call and the person decided to stay a member", "action_code": 2, "reference": "MyRefernce0123" }
200
{ "contactMomentId": 42 }