Table of Contents
- Preface
- Errors
-
Global — Globally available actions (Global is no REST resource)
- GET /api2/mget — Fetch multiple items of any base type
- POST /api2/search — Search items
-
Account — Account represents the WebCRM account model
- Attributes
- GET /api2/accounts/:id — Fetch an account
- POST /api2/accounts — Create an account
- PUT /api2/accounts/:id — Update an account
- DELETE /api2/accounts/:id — Delete an account
- POST /api2/accounts/:id/merge_and_delete — Merge and delete an account
- GET /api2/accounts/:id/changes — Fetch the changelog of an account
-
Activity — Activity represents the WebCRM activity model
- Attributes
- GET /api2/activities/:id — Fetch an activity
- POST /api2/activities — Create an activity
- PUT /api2/activities/:id — Update an activity
- DELETE /api2/activities/:id — Delete an activity
- GET /api2/activities/:id/changes — Fetch the changelog of an activity
-
AttachmentStore — AttachmentStore represents actions related to activity attachments
- POST /api2/attachment_store/generate_upload_permission — Generate an upload permission to upload a file directly to S3
- POST /api2/attachment_store/generate_download_url — Generate a download URL
-
Collection — Collection represents the WebCRM collection model
- Attributes
- GET /api2/collections/:id — Fetch a collection
- POST /api2/collections — Create a collection
- PUT /api2/collections/:id — Update a collection
- DELETE /api2/collections/:id — Delete a collection
- PUT /api2/collections/:id/compute — Compute a collection
- GET /api2/collections/:id/output_ids — Get the computation result
- GET /api2/collections/:id/changes — Fetch the changelog of a collection
-
Contact — Contact represents the WebCRM contact model
- Attributes
- GET /api2/contacts/:id — Fetch a contact
- POST /api2/contacts — Create a contact
- PUT /api2/contacts/:id — Update a contact
- DELETE /api2/contacts/:id — Delete a contact
- POST /api2/contacts/:id/merge_and_delete — Merge and delete a contact
- GET /api2/contacts/:id/changes — Fetch the changelog of a contact
- PUT /api2/contacts/:id/clear_password — Clear the contact's password
- POST /api2/contacts/:id/generate_password_token — Generate a password token
- POST /api2/contacts/:id/send_password_token_email — Send an email containing a password token to the contact
- PUT /api2/contacts/:id/set_password — Set a new password
- PUT /api2/contacts/set_password_by_token — Set a new password by token
- PUT /api2/contacts/authenticate — Authenticate a contact by means of a login and a password
-
EventContact — EventContact represents the WebCRM event participation model
- Attributes
- GET /api2/event_contacts/:id — Fetch an event contact
- POST /api2/event_contacts — Create an event_contact
- PUT /api2/event_contacts/:id — Update an event contact
- DELETE /api2/event_contacts/:id — Delete an event contact
- GET /api2/event_contacts/:id/changes — Fetch the changelog of an event contact
-
Event — Event represents the WebCRM event model
- Attributes
- GET /api2/events/:id — Fetch an event
- POST /api2/events — Create an event
- PUT /api2/events/:id — Update an event
- DELETE /api2/events/:id — Delete an event
- GET /api2/events/:id/changes — Fetch the changelog of an event
-
Mailing — Mailing represents the WebCRM mailing model
- Attributes
- GET /api2/mailings/:id — Fetch a mailing
- POST /api2/mailings/:id/clone — Clone a mailing
- POST /api2/mailings — Create a mailing
- PUT /api2/mailings/:id — Update a mailing
- DELETE /api2/mailings/:id — Delete a mailing
- GET /api2/mailings/:id/changes — Fetch the changelog of a mailing
- POST /api2/mailings/:id/render_preview — Render a mailing preview
- POST /api2/mailings/:id/send_single_email — Send a single email
- POST /api2/mailings/:id/send_me_a_proof_email — Send a proof email
- POST /api2/mailings/:id/release — Release mailing
-
MailingDelivery — MailingDelivery represents a mailing delivery
- Attributes
- GET /api2/mailings/:mailing_id/mailing_deliveries — Fetch all mailing deliveries of a mailing
- GET /api2/mailings/:mailing_id/mailing_deliveries/:id — Fetch a mailing delivery
- PUT /api2/mailings/:mailing_id/mailing_deliveries/:id — Create or update a mailing delivery
- DELETE /api2/mailings/:mailing_id/mailing_deliveries/:id — Delete a mailing delivery
-
MailingRecipient — MailingRecipient represents a mailing recipient email address
- Attributes
- GET /api2/mailing_recipients — Fetch all mailing recipient email addresses
- GET /api2/mailing_recipients/:id — Fetch a mailing recipient email address
- PUT /api2/mailing_recipients/:id — Updating or creating a mailing recipient email address
-
TemplateSet — TemplateSet represents the singleton WebCRM template set
- Attributes
- GET /api2/template_set — Fetch the template set
- PUT /api2/template_set — Update the template set
- GET /api2/template_set/changes — Fetch the changelog of the template set
- POST /api2/template_set/render_preview — Render a preview of the template set
-
Type — Type represents the WebCRM type model
- Attributes
- GET /api2/types — Fetch all types
- GET /api2/types/:id — Fetch a type
- POST /api2/types — Create a type
- PUT /api2/types/:id — Update a type
- DELETE /api2/types/:id — Delete a type
- GET /api2/types/:id/changes — Fetch the changelog of a type
Preface
General Rules / Guidelines
On every change of a type, a global type version counter is incremented. The value of this counter is included in every HTTP response the API returns. A client may utilize the counter to update its type cache. The response header is "X-Types-Version".
PUT complains about keys that are not defined in the corresponding type of
the item.
PUT does not complain about setting internal r/o keys. Clients can PUT the
same data they received on GET w/o having to delete specific keys from the PUT
request.
Timestamps are generally formatted in the ISO 8601 format, e.g.
2013-09-08T07:22:41Z or 2013-09-08T07:22:41+00:00. The timezone is always
UTC.
Please note that new attributes/endpoints/actions/functionality can be introduced any time by Infopark. Clients should not expect responses to always contain the same set of keys. Nevertheless, newly added attributes will have default values and may be omitted in requests.
Request and response bodies are encoded in JSON.
Development with curl
Example:
curl -H "Content-Type: application/json" \
-H "Accept: application/json" \
-u $CRM_USER:$CRM_API_KEY \
-XGET \
https://$CRM_TENANT.crm.infopark.net/api2/accounts/$ID
Errors
unauthorized
Authentication attempt with invalid API credentials
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
HTTP Response Code: 401
Example:
{
"id": "unauthorized",
"message": "Please validate credentials and try again."
}
forbidden
The API User is not permitted to access the resource
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
HTTP Response Code: 403
Example:
{
"id": "forbidden",
"message": "The provided credentials do not provide access to the specified resource."
}
not_found
The requested resource/resources cannot be found
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
|
A list of IDs that could not be found |
|
HTTP Response Code: 404
Example:
{
"id": "not_found",
"message": "Items could not be found.",
"missing_ids": ["9762b2b4382f6bf34adbdeb21ce588aa"]
}
conflict
Someone else changed the item
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
HTTP Response Code: 412
Example:
{
"id": "conflict",
"message": "The item was changed by someone else."
}
too_many_params
A POST or PUT of an item sets more than 1000 keys. This is either a DOS
attack or the type is misconfigured.
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
HTTP Response Code: 422
Example:
{
"id": "too_many_params",
"message": "The request contains too many parameters."
}
authentication_failed
Authentication of a contact failed
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
HTTP Response Code: 422
Example:
{
"id": "authentication_failed",
"message": "The provided credentials are wrong.",
}
sending_email_failed
Sending an email failed
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
|
The root cause message |
|
HTTP Response Code: 422
Example:
{
"id": "sending_email_failed",
"message": "The email could not be sent.",
"debug_info": "root cause message"
}
invalid_values
The keys are all recognized but their values are partially incorrect.
The code in a validation_errors field is one of Rails' validation
error code symbols, e.g. :blank, :inclusion. An English message is
provided for convenience, clients can provide a translation based on
the code symbol.
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
|
A list of model validation errors. The items in the list are hashes including a code (i.e. one of the Rails validation error codes), the attribute that has an invalid value, and an English message that is provided for convenience. |
|
HTTP Response Code: 422
Example:
{
"id": "invalid_values",
"message": "Validate the parameters and try again.",
"validation_errors": [
{
"code": "blank",
"attribute": "name",
"message": "name is blank"
}
]
}
invalid_keys
Attempt to set undefined keys. In contrast to the invalid_values
error, this error is not based on validations in the model.
Instead, setting invalid keys is already blocked on the API layer. If
this error occurs, the validations defined in the model will not run at
all. Internal r/o attributes are silently ignored.
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
|
A list of model validation errors. The items in the list are hashes including a code (i.e. one of the Rails validation error codes), the attribute that has an invalid value, and an English message that is provided for convenience. |
|
HTTP Response Code: 422
Example:
{
"id": "invalid_keys",
"message": "Unknown keys specified.",
"validation_errors": [
{
"attribute": "foo",
"code": "unknown",
"message": "foo is unknown"
}
]
}
item_state_precondition_failed
One or more preconditions of the attempted action were not satisfied.
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
|
A list of unmet preconditions. The items in the list are hashes including a code (the symbolic name of the precondition), and an English message that is provided for convenience. |
|
HTTP Response Code: 422
Example:
params_parse_error
The JSON parameters could not be parsed
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
|
The root cause message |
|
HTTP Response Code: 422
Example:
{
"id": "params_parse_error",
"message": "The sent params could not be parsed."
"debug_info": "795: unexpected token at 'account'"
}
rate_limit
The rate limit was exceeded
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
HTTP Response Code: 429
Example:
{
"id": "rate_limit",
"message": "Your account reached the API rate limit. Please wait a
few minutes before making new requests."
}
internal_server_error
An internal server error occurred
Response
Attributes:
| Name | Description | Type |
|---|---|---|
|
An ID describing the error |
|
|
A short description of the error in English |
|
HTTP Response Code: 500
Example:
{
"id": "internal_server_error",
"message": "We have been notified about this issue, and we will take a look at it shortly."
}
Global
Globally available actions (Global is no REST resource)
GET /api2/mget — Fetch multiple items of any base type
Use case: First search for items (may result in a large result set).
Check your local app cache if it already contains some or all of the
items in detail. Fetch missing items via mget. Iterate over the
search result to fetch items in smaller batches. Note that mget has a
much smaller limit than search because the amount of item data is
supposed to be larger than the few keys returned by search.
Request
Required Parameters:
| Name | Description |
|---|---|
|
A list of IDs to fetch. Limit 100. Type: Example:
|
Requirements:
- All requested IDs must exist
Response
A list of items, one for each requested ID. An empty array if no IDs were specified.
HTTP Response Code: 200
Example:
[
{
"id": "9762b2b4382f6bf34adbdeb21ce588aa",
"base_type": "Account",
"type_id": "account",
"version": 17,
"name": "Firma XYZ",
"locality": "Hamburg",
[…]
},
{
"id": "4c562cc22b2dd164f353756526664589",
"base_type": "Contact",
"type_id": "contact",
"version": 1,
"name": "Herr Meier",
"locality": "Frankfurt",
"gender": "M",
[…]
}
]
POST /api2/search — Search items
Performs a search over the following base types: Account, Activity,
Collection, Contact, Event, EventContact, Mailing.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
Array of filter clauses. Each clause is an object with three properties:
Supported fields: Supported conditions: Type: Example:
|
|
The search term of a full-text search for words starting with the term (case-insensitive prefix search). Affects score. Type: |
|
The number of results to return at most. Min: 0. Max: 100. Type: Default: |
|
The number of results to skip. Min: 0. Type: Default: |
|
The attribute name by which to sort the result. Possible choices: To achieve deterministic results, a second criterion (e.g. Type: Default: |
|
One of For Type: Default: |
Response
The search results
Parameters:
| Name | Description |
|---|---|
|
A list of search hits. Each hit has the field Type: |
|
The number of hits regardless of limit Type: |
HTTP Response Code: 200
Example:
{
"results": [
{
"id": "9762b2b4382f6bf34adbdeb21ce588aa"
},
{
"id": "4c562cc22b2dd164f353756526664589"
}
],
"total": 2157
}
Account
Account represents the WebCRM account model
Attributes of Account
| Name | Description |
|---|---|
|
base_type is always Account. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Available for: Example:
|
|
The timestamp of the creation of the item Type: Available for: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Available for: Example:
|
|
The ID of an item Type: Available for: Example:
|
|
type_id is always account. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Available for: Example:
|
|
The login of the user who updated the item at Type: Available for: Example:
|
|
The version number of the change. It is incremented on every change. Type: Available for: Example:
|
|
The name of the company group the account belongs to Type: Available for: Example:
|
|
The name of the country in which the account is based (stored in uppercase). Type: Available for: Example:
|
|
An address extension Type: Available for: |
|
The company's website address (URL) Type: Available for: |
|
The city in which the account is based Type: Available for: Example:
|
|
Type: Available for: |
|
The name of the account Type: Available for: |
|
Type: Available for: |
|
Type: Available for: |
|
The main phone number of the account Type: Available for: Example:
|
|
The postal code of the account Type: Available for: |
|
The region in which the account is based Type: Available for: |
|
The street name and building number of the account location Type: Available for: |
|
A list of tags Type: Available for: Example:
|
|
Whether to lookup the geo coordinates for the address Type: Available for: |
GET /api2/accounts/:id — Fetch an account
Response
The representation of the requested account
Parameters:
| Name | Description |
|---|---|
|
base_type is always Account. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always account. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The name of the company group the account belongs to Type: Example:
|
|
The name of the country in which the account is based (stored in uppercase). Type: Example:
|
|
An address extension Type: |
|
The company's website address (URL) Type: |
|
The city in which the account is based Type: Example:
|
|
Type: |
|
The name of the account Type: |
|
Type: |
|
Type: |
|
The main phone number of the account Type: Example:
|
|
The postal code of the account Type: |
|
The region in which the account is based Type: |
|
The street name and building number of the account location Type: |
|
A list of tags Type: Example:
|
|
Whether to lookup the geo coordinates for the address Type: |
HTTP Response Code: 200
POST /api2/accounts — Create an account
Request
Required Parameters:
| Name | Description |
|---|---|
|
The name of the account Type: |
Optional Parameters:
| Name | Description |
|---|---|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The name of the company group the account belongs to Type: Example:
|
|
The name of the country in which the account is based (stored in uppercase). Type: Example:
|
|
An address extension Type: |
|
The company's website address (URL) Type: |
|
The city in which the account is based Type: Example:
|
|
Type: |
|
Type: |
|
The main phone number of the account Type: Example:
|
|
The postal code of the account Type: |
|
The region in which the account is based Type: |
|
The street name and building number of the account location Type: |
|
A list of tags Type: Example:
|
|
Whether to lookup the geo coordinates for the address Type: |
Response
The representation of the created account
Parameters:
| Name | Description |
|---|---|
|
base_type is always Account. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always account. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The name of the company group the account belongs to Type: Example:
|
|
The name of the country in which the account is based (stored in uppercase). Type: Example:
|
|
An address extension Type: |
|
The company's website address (URL) Type: |
|
The city in which the account is based Type: Example:
|
|
Type: |
|
The name of the account Type: |
|
Type: |
|
Type: |
|
The main phone number of the account Type: Example:
|
|
The postal code of the account Type: |
|
The region in which the account is based Type: |
|
The street name and building number of the account location Type: |
|
A list of tags Type: Example:
|
|
Whether to lookup the geo coordinates for the address Type: |
HTTP Response Code: 201
PUT /api2/accounts/:id — Update an account
For optimistic locking, send the current version in an If-Match
HTTP header.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The name of the company group the account belongs to Type: Example:
|
|
The name of the country in which the account is based (stored in uppercase). Type: Example:
|
|
An address extension Type: |
|
The company's website address (URL) Type: |
|
The city in which the account is based Type: Example:
|
|
The name of the account Type: |
|
Type: |
|
Type: |
|
The main phone number of the account Type: Example:
|
|
The postal code of the account Type: |
|
The region in which the account is based Type: |
|
The street name and building number of the account location Type: |
|
A list of tags Type: Example:
|
|
Whether to lookup the geo coordinates for the address Type: |
Response
The representation of the updated account
Parameters:
| Name | Description |
|---|---|
|
base_type is always Account. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always account. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The name of the company group the account belongs to Type: Example:
|
|
The name of the country in which the account is based (stored in uppercase). Type: Example:
|
|
An address extension Type: |
|
The company's website address (URL) Type: |
|
The city in which the account is based Type: Example:
|
|
Type: |
|
The name of the account Type: |
|
Type: |
|
Type: |
|
The main phone number of the account Type: Example:
|
|
The postal code of the account Type: |
|
The region in which the account is based Type: |
|
The street name and building number of the account location Type: |
|
A list of tags Type: Example:
|
|
Whether to lookup the geo coordinates for the address Type: |
HTTP Response Code: 200
DELETE /api2/accounts/:id — Delete an account
For optimistic locking, send the current version in an If-Match
HTTP header.
Response
HTTP Response Code: 200
POST /api2/accounts/:id/merge_and_delete — Merge and delete an account
Assigns the dependent docs/items of the account with ID id to
merge_into_id after deleting id.
Request
Required Parameters:
| Name | Description |
|---|---|
|
The ID of the account to assign the dependent docs/items to Type: Example:
|
Requirements:
merge_into_id != id
Response
HTTP Response Code: 200
GET /api2/accounts/:id/changes — Fetch the changelog of an account
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The number of changelog entries to fetch at most. The max. limit is 100. Type: Default: |
Response
The account changelog
Parameters:
| Name | Description |
|---|---|
|
The changelog entries in reverse order (newer -> older) Type: Example:
|
HTTP Response Code: 200
Activity
Activity represents the WebCRM activity model
Attributes of Activity
| Name | Description |
|---|---|
|
base_type is always Activity. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Available for: Example:
|
|
The timestamp of the creation of the item Type: Available for: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Available for: Example:
|
|
The ID of an item Type: Available for: Example:
|
|
The type ID of the item Type: Available for: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Available for: Example:
|
|
The login of the user who updated the item at Type: Available for: Example:
|
|
The version number of the change. It is incremented on every change. Type: Available for: Example:
|
|
The list of the accounts associated with the activity Type: Available for: Example:
|
|
The ending time of an appointment. The activity is shown as a
calendar entry. Must only be present if Type: Available for: |
|
The starting time of an appointment. The activity will be shown as a
calendar entry. Must only be present if Type: Available for: |
|
The location of the appointment Type: Available for: |
|
The list of the contacts associated with the activity Type: Available for: Example:
|
|
Additional email addresses (comma-separated). To have them receive
notifications, add this field to the Type: Available for: |
|
Activity state (one of the states of its type) Type: Available for: |
|
The list of the tags associated with the activity Type: Available for: |
|
The activity title Type: Available for: |
|
The list of comments. An activity can have any number of comments.
Comments are represented inline in the activity resource. They
are append-only. Use the attributes A comment has the following fields:
Type: Available for: |
|
New comment attachment IDs Type: Available for: |
|
When adding a comment, the ID of the contact person concerned can be specified using this field (can be set only). Type: Available for: |
|
New comment text Type: Available for: |
|
The new comment is visible to the Type: Available for: |
GET /api2/activities/:id — Fetch an activity
Response
The representation of the requested account
Parameters:
| Name | Description |
|---|---|
|
base_type is always Activity. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
The type ID of the item Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The list of the accounts associated with the activity Type: Example:
|
|
The ending time of an appointment. The activity is shown as a
calendar entry. Must only be present if Type: |
|
The starting time of an appointment. The activity will be shown as a
calendar entry. Must only be present if Type: |
|
The location of the appointment Type: |
|
The list of the contacts associated with the activity Type: Example:
|
|
Additional email addresses (comma-separated). To have them receive
notifications, add this field to the Type: |
|
Activity state (one of the states of its type) Type: |
|
The list of the tags associated with the activity Type: |
|
The activity title Type: |
|
The list of comments. An activity can have any number of comments.
Comments are represented inline in the activity resource. They
are append-only. Use the attributes A comment has the following fields:
Type: |
HTTP Response Code: 200
POST /api2/activities — Create an activity
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The list of the accounts associated with the activity Type: Example:
|
|
The ending time of an appointment. The activity is shown as a
calendar entry. Must only be present if Type: |
|
The starting time of an appointment. The activity will be shown as a
calendar entry. Must only be present if Type: |
|
The location of the appointment Type: |
|
The list of the contacts associated with the activity Type: Example:
|
|
Additional email addresses (comma-separated). To have them receive
notifications, add this field to the Type: |
|
Activity state (one of the states of its type) Type: |
|
The list of the tags associated with the activity Type: |
|
The activity title Type: |
|
New comment attachment IDs Type: |
|
When adding a comment, the ID of the contact person concerned can be specified using this field (can be set only). Type: |
|
New comment text Type: |
|
The new comment is visible to the Type: |
Response
The representation of the created activity
Parameters:
| Name | Description |
|---|---|
|
base_type is always Activity. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
The type ID of the item Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The list of the accounts associated with the activity Type: Example:
|
|
The ending time of an appointment. The activity is shown as a
calendar entry. Must only be present if Type: |
|
The starting time of an appointment. The activity will be shown as a
calendar entry. Must only be present if Type: |
|
The location of the appointment Type: |
|
The list of the contacts associated with the activity Type: Example:
|
|
Additional email addresses (comma-separated). To have them receive
notifications, add this field to the Type: |
|
Activity state (one of the states of its type) Type: |
|
The list of the tags associated with the activity Type: |
|
The activity title Type: |
|
The list of comments. An activity can have any number of comments.
Comments are represented inline in the activity resource. They
are append-only. Use the attributes A comment has the following fields:
Type: |
HTTP Response Code: 201
PUT /api2/activities/:id — Update an activity
For optimistic locking, send the current version in an If-Match
HTTP header.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The list of the accounts associated with the activity Type: Example:
|
|
The ending time of an appointment. The activity is shown as a
calendar entry. Must only be present if Type: |
|
The starting time of an appointment. The activity will be shown as a
calendar entry. Must only be present if Type: |
|
The location of the appointment Type: |
|
The list of the contacts associated with the activity Type: Example:
|
|
Additional email addresses (comma-separated). To have them receive
notifications, add this field to the Type: |
|
Activity state (one of the states of its type) Type: |
|
The list of the tags associated with the activity Type: |
|
The activity title Type: |
|
New comment attachment IDs Type: |
|
When adding a comment, the ID of the contact person concerned can be specified using this field (can be set only). Type: |
|
New comment text Type: |
|
The new comment is visible to the Type: |
Response
The representation of the updated activity
Parameters:
| Name | Description |
|---|---|
|
base_type is always Activity. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
The type ID of the item Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The list of the accounts associated with the activity Type: Example:
|
|
The ending time of an appointment. The activity is shown as a
calendar entry. Must only be present if Type: |
|
The starting time of an appointment. The activity will be shown as a
calendar entry. Must only be present if Type: |
|
The location of the appointment Type: |
|
The list of the contacts associated with the activity Type: Example:
|
|
Additional email addresses (comma-separated). To have them receive
notifications, add this field to the Type: |
|
Activity state (one of the states of its type) Type: |
|
The list of the tags associated with the activity Type: |
|
The activity title Type: |
|
The list of comments. An activity can have any number of comments.
Comments are represented inline in the activity resource. They
are append-only. Use the attributes A comment has the following fields:
Type: |
HTTP Response Code: 200
DELETE /api2/activities/:id — Delete an activity
For optimistic locking, send the current version in an If-Match
HTTP header.
Response
HTTP Response Code: 200
GET /api2/activities/:id/changes — Fetch the changelog of an activity
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The number of changelog entries to fetch at most. The max. limit is 100. Type: Default: |
Response
The activity changelog
Parameters:
| Name | Description |
|---|---|
|
The changelog entries in reverse order (newer -> older) Type: |
HTTP Response Code: 200
AttachmentStore
AttachmentStore represents actions related to activity attachments
POST /api2/attachment_store/generate_upload_permission — Generate an upload permission to upload a file directly to S3
For uploading a file, please proceed as follows.
Request an upload permission from the WebCRM. The response grants the client permission to upload a file to a given key on S3. This permission is valid for one hour.
Upload the file to the URL provided in the response, together with the fields as parameters. S3 itself then verifies the signature of these parameters prior to accepting the upload.
Attach the upload to a new activity comment by setting its commentattachments field to an array of upload IDs. The client may append filenames to the upload IDs for producing download URLs with proper file names later on. The format of commentattachments is:
["upload_id/filename.ext", ...], e.g.["e13f0d960feeb2b29e9103b203ae03bd/screenshot.jpg"]. The WebCRM in turn translates these upload IDs to attachment IDs. Syntactically they look the same, upload IDs, however, are only temporary, whereas attachment ID are permanent. If the client appended a filename to the upload ID, the attachment ID will contain this filename, too. Otherwise, the attachment ID ends with "/file". Please note that the WebCRM replaces file name characters other than a-zA-Z0-9.+- with a dash. Multiple dashes will be joined into a single dash.Later, when downloading the attachment, pass the attachment ID to a download URL request. The WebCRM returns a signed S3 URL that remains valid for 5 minutes.
Response
The upload permission
Parameters:
| Name | Description |
|---|---|
|
The URL to which the attachment file data is uploaded Type: |
|
Additional fields to include in the request when uploading to the URL Type: |
|
A temporary ID associated with this upload. Use it when
setting the Type: |
HTTP Response Code: 200
Example:
{
"url": "https://xyz.s3.amazonaws.com/",
"fields": {
"AWSAccessKeyId":"AKIAIDB73YRJUW2RAYXA",
"key":"uploads/e13f0d960feeb2b29e9103b203ae03bd",
"policy":"eyJleHBpcmF0aW9uIjoiMjAxMy0wOS0yNVQxNTozOToyNVoi...",
"signature":"d9eVr1TPZ+Z9U0Fu6OmpVbbfLzI="
},
"upload_id": "e13f0d960feeb2b29e9103b203ae03bd"
}
POST /api2/attachment_store/generate_download_url — Generate a download URL
Generates a download URL for the attachment file. The URL is presigned and valid for 5 minutes only. Hence, it is recommended to have such URLs generated on demand.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
An attachment ID taken from the attachments field inside the comments section of an activity. Type: Example:
|
Response
The download URL
Parameters:
| Name | Description |
|---|---|
|
base_type is always Activity. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
The type ID of the item Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The list of the accounts associated with the activity Type: Example:
|
|
The ending time of an appointment. The activity is shown as a
calendar entry. Must only be present if Type: |
|
The starting time of an appointment. The activity will be shown as a
calendar entry. Must only be present if Type: |
|
The location of the appointment Type: |
|
The list of the contacts associated with the activity Type: Example:
|
|
Additional email addresses (comma-separated). To have them receive
notifications, add this field to the Type: |
|
Activity state (one of the states of its type) Type: |
|
The list of the tags associated with the activity Type: |
|
The activity title Type: |
|
The list of comments. An activity can have any number of comments.
Comments are represented inline in the activity resource. They
are append-only. Use the attributes A comment has the following fields:
Type: |
HTTP Response Code: 201
Example:
{
"url": "https://xyz.s3.amazonaws.com/attachments/84cb8263345bce4de2438ccea34f08fb/image.png?AWSAccessKeyId=...&Expires=...&Signature=..."
}
Collection
Collection represents the WebCRM collection model
Attributes of Collection
| Name | Description |
|---|---|
|
base_type is always Collection. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Available for: Example:
|
|
The timestamp of the creation of the item Type: Available for: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Available for: Example:
|
|
The ID of an item Type: Available for: Example:
|
|
type_id is always collection. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Available for: Example:
|
|
The login of the user who updated the item at Type: Available for: Example:
|
|
The version number of the change. It is incremented on every change. Type: Available for: Example:
|
|
The collection type defines the base type of the items. It is
one of: Type: Available for: Example:
|
|
Mandatory in event contact collections, otherwise ignored Type: Available for: |
|
Mandatory in mailing contact collections, otherwise ignored Type: Available for: |
|
The title Type: Available for: |
|
Array of terms, each of which is an array of clauses. Each clause is an
object with three properties: Hint: specify a list of IDs to select all items with the given IDs, e.g.
Type: Available for: Example:
|
|
The number of results of the last computation. 0 for uncomputed
collections. May be stale if filters were changed or Type: Available for: |
|
The timestamp of the starting time of the computation being performed. It is
only set during the computation, and is set to Type: Available for: |
|
The timestamp of the last computation Type: Available for: |
GET /api2/collections/:id — Fetch a collection
Response
The representation of the requested collection
Parameters:
| Name | Description |
|---|---|
|
base_type is always Collection. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always collection. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The collection type defines the base type of the items. It is
one of: Type: Example:
|
|
Mandatory in event contact collections, otherwise ignored Type: |
|
Mandatory in mailing contact collections, otherwise ignored Type: |
|
The title Type: |
|
Array of terms, each of which is an array of clauses. Each clause is an
object with three properties: Hint: specify a list of IDs to select all items with the given IDs, e.g.
Type: Example:
|
|
The number of results of the last computation. 0 for uncomputed
collections. May be stale if filters were changed or Type: |
|
The timestamp of the starting time of the computation being performed. It is
only set during the computation, and is set to Type: |
|
The timestamp of the last computation Type: |
HTTP Response Code: 200
POST /api2/collections — Create a collection
Request
Required Parameters:
| Name | Description |
|---|---|
|
The collection type defines the base type of the items. It is
one of: Type: Example:
|
|
Mandatory in event contact collections, otherwise ignored Type: |
|
Mandatory in mailing contact collections, otherwise ignored Type: |
|
The title Type: |
Optional Parameters:
| Name | Description |
|---|---|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
Array of terms, each of which is an array of clauses. Each clause is an
object with three properties: Hint: specify a list of IDs to select all items with the given IDs, e.g.
Type: Example:
|
Response
The representation of the created collection
Parameters:
| Name | Description |
|---|---|
|
base_type is always Collection. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always collection. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The collection type defines the base type of the items. It is
one of: Type: Example:
|
|
Mandatory in event contact collections, otherwise ignored Type: |
|
Mandatory in mailing contact collections, otherwise ignored Type: |
|
The title Type: |
|
Array of terms, each of which is an array of clauses. Each clause is an
object with three properties: Hint: specify a list of IDs to select all items with the given IDs, e.g.
Type: Example:
|
|
The number of results of the last computation. 0 for uncomputed
collections. May be stale if filters were changed or Type: |
|
The timestamp of the starting time of the computation being performed. It is
only set during the computation, and is set to Type: |
|
The timestamp of the last computation Type: |
HTTP Response Code: 201
PUT /api2/collections/:id — Update a collection
For optimistic locking, send the current version in an If-Match
HTTP header.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The collection type defines the base type of the items. It is
one of: Type: Example:
|
|
Mandatory in event contact collections, otherwise ignored Type: |
|
Mandatory in mailing contact collections, otherwise ignored Type: |
|
The title Type: |
|
Array of terms, each of which is an array of clauses. Each clause is an
object with three properties: Hint: specify a list of IDs to select all items with the given IDs, e.g.
Type: Example:
|
Requirements:
- Collection is currently not being computed
Response
The representation of the updated collection
Parameters:
| Name | Description |
|---|---|
|
base_type is always Collection. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always collection. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The collection type defines the base type of the items. It is
one of: Type: Example:
|
|
Mandatory in event contact collections, otherwise ignored Type: |
|
Mandatory in mailing contact collections, otherwise ignored Type: |
|
The title Type: |
|
Array of terms, each of which is an array of clauses. Each clause is an
object with three properties: Hint: specify a list of IDs to select all items with the given IDs, e.g.
Type: Example:
|
|
The number of results of the last computation. 0 for uncomputed
collections. May be stale if filters were changed or Type: |
|
The timestamp of the starting time of the computation being performed. It is
only set during the computation, and is set to Type: |
|
The timestamp of the last computation Type: |
HTTP Response Code: 200
DELETE /api2/collections/:id — Delete a collection
For optimistic locking, send the current version in an If-Match
HTTP header.
Request
Requirements:
- Collection is currently not being computed
Response
HTTP Response Code: 200
PUT /api2/collections/:id/compute — Compute a collection
Determines the IDs of the items that match the filters using a background
job. Use GET output_ids to fetch the IDs and mget to then fetch the
items.
Request
Requirements:
- Collection is currently not being computed
- Filters have been specified
Response
The representation of the modified collection
Parameters:
| Name | Description |
|---|---|
|
base_type is always Collection. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always collection. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The collection type defines the base type of the items. It is
one of: Type: Example:
|
|
Mandatory in event contact collections, otherwise ignored Type: |
|
Mandatory in mailing contact collections, otherwise ignored Type: |
|
The title Type: |
|
Array of terms, each of which is an array of clauses. Each clause is an
object with three properties: Hint: specify a list of IDs to select all items with the given IDs, e.g.
Type: Example:
|
|
The number of results of the last computation. 0 for uncomputed
collections. May be stale if filters were changed or Type: |
|
The timestamp of the starting time of the computation being performed. It is
only set during the computation, and is set to Type: |
|
The timestamp of the last computation Type: |
HTTP Response Code: 200
GET /api2/collections/:id/output_ids — Get the computation result
Returns the list of the IDs that matched the filters
Response
The list of the IDs that matched the filters. Returns an empty list for uncomputed collections. May return a redirect to S3 instead of the data. May be stale if filters were changed after the latest computation.
HTTP Response Code: 200
Example:
[
'9762b2b4382f6bf34adbdeb21ce588aa',
'4c562cc22b2dd164f353756526664589'
]
GET /api2/collections/:id/changes — Fetch the changelog of a collection
The log does not include changes to the output data
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The number of changelog entries to fetch at most. The max. limit is 100. Type: Default: |
Response
The collection changelog
Parameters:
| Name | Description |
|---|---|
|
The changelog entries in reverse order (newer -> older) Type: |
HTTP Response Code: 200
Contact
Contact represents the WebCRM contact model
Attributes of Contact
| Name | Description |
|---|---|
|
base_type is always Contact. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Available for: Example:
|
|
The timestamp of the creation of the item Type: Available for: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Available for: Example:
|
|
The ID of an item Type: Available for: Example:
|
|
type_id is always contact. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Available for: Example:
|
|
The login of the user who updated the item at Type: Available for: Example:
|
|
The version number of the change. It is incremented on every change. Type: Available for: Example:
|
|
The ID of the associated account Type: Available for: Example:
|
|
A string to prepend to the name Type: Available for: Example:
|
|
The first name of the contact Type: Available for: |
|
The last name of the contact Type: Available for: |
|
The gender of the contact. One of Type: Available for: Example:
|
|
The preferred language of the contact. One of the codes defined in the contact type. Type: Available for: Example:
|
|
The job description of the contact Type: Available for: |
|
The email address of the contact Type: Available for: |
|
The main phone number of the contact Type: Available for: Example:
|
|
The main mobile phone number of the contact Type: Available for: |
|
The fax number of the contact Type: Available for: |
|
The country in which the contact is based (stored in uppercase) Type: Available for: Example:
|
|
The region in which the contact is based Type: Available for: |
|
The postal code of the contact location Type: Available for: |
|
The street name and building number of the contact location Type: Available for: |
|
The city in which the contact is based Type: Available for: Example:
|
|
An address extension Type: Available for: |
|
Type: Available for: |
|
Type: Available for: |
|
A list of tags Type: Available for: Example:
|
|
Type: Available for: |
|
Whether to look up the geo coordinates of the address Type: Available for: |
|
Whether the contact wants to receive phone calls Type: Available for: |
|
Whether the contact wants to receive snail mail Type: Available for: |
|
The login used to authenticate. Must be unique in the tenant. Type: Available for: |
|
Whether the contact has a password Type: Available for: |
|
The timestamp of the most recent request for a new password token Type: Available for: |
|
The timestamp of the most recent password renewal Type: Available for: |
GET /api2/contacts/:id — Fetch a contact
Response
The representation of the requested contact
Parameters:
| Name | Description |
|---|---|
|
base_type is always Contact. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always contact. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The ID of the associated account Type: Example:
|
|
A string to prepend to the name Type: Example:
|
|
The first name of the contact Type: |
|
The last name of the contact Type: |
|
The gender of the contact. One of Type: Example:
|
|
The preferred language of the contact. One of the codes defined in the contact type. Type: Example:
|
|
The job description of the contact Type: |
|
The email address of the contact Type: |
|
The main phone number of the contact Type: Example:
|
|
The main mobile phone number of the contact Type: |
|
The fax number of the contact Type: |
|
The country in which the contact is based (stored in uppercase) Type: Example:
|
|
The region in which the contact is based Type: |
|
The postal code of the contact location Type: |
|
The street name and building number of the contact location Type: |
|
The city in which the contact is based Type: Example:
|
|
An address extension Type: |
|
Type: |
|
Type: |
|
A list of tags Type: Example:
|
|
Type: |
|
Whether to look up the geo coordinates of the address Type: |
|
Whether the contact wants to receive phone calls Type: |
|
Whether the contact wants to receive snail mail Type: |
|
The login used to authenticate. Must be unique in the tenant. Type: |
|
Whether the contact has a password Type: |
|
The timestamp of the most recent request for a new password token Type: |
|
The timestamp of the most recent password renewal Type: |
HTTP Response Code: 200
POST /api2/contacts — Create a contact
Request
Required Parameters:
| Name | Description |
|---|---|
|
The last name of the contact Type: |
|
The preferred language of the contact. One of the codes defined in the contact type. Type: Example:
|
Optional Parameters:
| Name | Description |
|---|---|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of the associated account Type: Example:
|
|
A string to prepend to the name Type: Example:
|
|
The first name of the contact Type: |
|
The gender of the contact. One of Type: Example:
|
|
The job description of the contact Type: |
|
The email address of the contact Type: |
|
The main phone number of the contact Type: Example:
|
|
The main mobile phone number of the contact Type: |
|
The fax number of the contact Type: |
|
The country in which the contact is based (stored in uppercase) Type: Example:
|
|
The region in which the contact is based Type: |
|
The postal code of the contact location Type: |
|
The street name and building number of the contact location Type: |
|
The city in which the contact is based Type: Example:
|
|
An address extension Type: |
|
Type: |
|
Type: |
|
A list of tags Type: Example:
|
|
Whether to look up the geo coordinates of the address Type: |
|
Whether the contact wants to receive phone calls Type: |
|
Whether the contact wants to receive snail mail Type: |
|
The login used to authenticate. Must be unique in the tenant. Type: |
Response
The representation of the created contact
Parameters:
| Name | Description |
|---|---|
|
base_type is always Contact. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always contact. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The ID of the associated account Type: Example:
|
|
A string to prepend to the name Type: Example:
|
|
The first name of the contact Type: |
|
The last name of the contact Type: |
|
The gender of the contact. One of Type: Example:
|
|
The preferred language of the contact. One of the codes defined in the contact type. Type: Example:
|
|
The job description of the contact Type: |
|
The email address of the contact Type: |
|
The main phone number of the contact Type: Example:
|
|
The main mobile phone number of the contact Type: |
|
The fax number of the contact Type: |
|
The country in which the contact is based (stored in uppercase) Type: Example:
|
|
The region in which the contact is based Type: |
|
The postal code of the contact location Type: |
|
The street name and building number of the contact location Type: |
|
The city in which the contact is based Type: Example:
|
|
An address extension Type: |
|
Type: |
|
Type: |
|
A list of tags Type: Example:
|
|
Type: |
|
Whether to look up the geo coordinates of the address Type: |
|
Whether the contact wants to receive phone calls Type: |
|
Whether the contact wants to receive snail mail Type: |
|
The login used to authenticate. Must be unique in the tenant. Type: |
|
Whether the contact has a password Type: |
|
The timestamp of the most recent request for a new password token Type: |
|
The timestamp of the most recent password renewal Type: |
HTTP Response Code: 201
PUT /api2/contacts/:id — Update a contact
For optimistic locking, send the current version in an If-Match
HTTP header.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of the associated account Type: Example:
|
|
A string to prepend to the name Type: Example:
|
|
The first name of the contact Type: |
|
The last name of the contact Type: |
|
The gender of the contact. One of Type: Example:
|
|
The preferred language of the contact. One of the codes defined in the contact type. Type: Example:
|
|
The job description of the contact Type: |
|
The email address of the contact Type: |
|
The main phone number of the contact Type: Example:
|
|
The main mobile phone number of the contact Type: |
|
The fax number of the contact Type: |
|
The country in which the contact is based (stored in uppercase) Type: Example:
|
|
The region in which the contact is based Type: |
|
The postal code of the contact location Type: |
|
The street name and building number of the contact location Type: |
|
The city in which the contact is based Type: Example:
|
|
An address extension Type: |
|
Type: |
|
Type: |
|
A list of tags Type: Example:
|
|
Whether to look up the geo coordinates of the address Type: |
|
Whether the contact wants to receive phone calls Type: |
|
Whether the contact wants to receive snail mail Type: |
|
The login used to authenticate. Must be unique in the tenant. Type: |
Response
The representation of the updated contact
Parameters:
| Name | Description |
|---|---|
|
base_type is always Contact. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always contact. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The ID of the associated account Type: Example:
|
|
A string to prepend to the name Type: Example:
|
|
The first name of the contact Type: |
|
The last name of the contact Type: |
|
The gender of the contact. One of Type: Example:
|
|
The preferred language of the contact. One of the codes defined in the contact type. Type: Example:
|
|
The job description of the contact Type: |
|
The email address of the contact Type: |
|
The main phone number of the contact Type: Example:
|
|
The main mobile phone number of the contact Type: |
|
The fax number of the contact Type: |
|
The country in which the contact is based (stored in uppercase) Type: Example:
|
|
The region in which the contact is based Type: |
|
The postal code of the contact location Type: |
|
The street name and building number of the contact location Type: |
|
The city in which the contact is based Type: Example:
|
|
An address extension Type: |
|
Type: |
|
Type: |
|
A list of tags Type: Example:
|
|
Type: |
|
Whether to look up the geo coordinates of the address Type: |
|
Whether the contact wants to receive phone calls Type: |
|
Whether the contact wants to receive snail mail Type: |
|
The login used to authenticate. Must be unique in the tenant. Type: |
|
Whether the contact has a password Type: |
|
The timestamp of the most recent request for a new password token Type: |
|
The timestamp of the most recent password renewal Type: |
HTTP Response Code: 200
DELETE /api2/contacts/:id — Delete a contact
For optimistic locking, send the current version in an If-Match
HTTP header.
Response
HTTP Response Code: 200
POST /api2/contacts/:id/merge_and_delete — Merge and delete a contact
Assigns the dependent docs/items of the contact with ID id to
merge_into_id after deleting id.
Request
Required Parameters:
| Name | Description |
|---|---|
|
The ID of the contact to assign the dependent docs/items to Type: Example:
|
Requirements:
merge_into_id != id
Response
HTTP Response Code: 200
GET /api2/contacts/:id/changes — Fetch the changelog of a contact
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The number of changelog entries to fetch at most. The max. limit is 100. Type: Default: |
Response
The contact changelog
Parameters:
| Name | Description |
|---|---|
|
The changelog entries in reverse order (newer -> older) Type: Example:
|
HTTP Response Code: 200
PUT /api2/contacts/:id/clear_password — Clear the contact's password
Prevents the contact from logging in until a new password has been set
Response
The representation of the modified contact.
Parameters:
| Name | Description |
|---|---|
|
base_type is always Contact. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always contact. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The ID of the associated account Type: Example:
|
|
A string to prepend to the name Type: Example:
|
|
The first name of the contact Type: |
|
The last name of the contact Type: |
|
The gender of the contact. One of Type: Example:
|
|
The preferred language of the contact. One of the codes defined in the contact type. Type: Example:
|
|
The job description of the contact Type: |
|
The email address of the contact Type: |
|
The main phone number of the contact Type: Example:
|
|
The main mobile phone number of the contact Type: |
|
The fax number of the contact Type: |
|
The country in which the contact is based (stored in uppercase) Type: Example:
|
|
The region in which the contact is based Type: |
|
The postal code of the contact location Type: |
|
The street name and building number of the contact location Type: |
|
The city in which the contact is based Type: Example:
|
|
An address extension Type: |
|
Type: |
|
Type: |
|
A list of tags Type: Example:
|
|
Type: |
|
Whether to look up the geo coordinates of the address Type: |
|
Whether the contact wants to receive phone calls Type: |
|
Whether the contact wants to receive snail mail Type: |
|
The login used to authenticate. Must be unique in the tenant. Type: |
|
Whether the contact has a password Type: |
|
The timestamp of the most recent request for a new password token Type: |
|
The timestamp of the most recent password renewal Type: |
HTTP Response Code: 200
POST /api2/contacts/:id/generate_password_token — Generate a password token
A project that uses this API could send an email to the contact. The mail
should contain a link to the project web app. The link should contain
the param ?token=.... It is the responsibility of the web app to
parse the token param and pass it to PUT
contacts/set_password_by_token. Tokens expire after 24 hours.
Request
Requirements:
- Contact has a login
Response
The password token
Parameters:
| Name | Description |
|---|---|
|
Type: |
HTTP Response Code: 200
Example:
{
"token": "xyz"
}
POST /api2/contacts/:id/send_password_token_email — Send an email containing a password token to the contact
Configure the password mail template to contain a link to the project
web app. The link should contain the param ?token=.... It is the
responsibility of the web app to parse the token param and pass it to
PUT contacts/set_password_by_token. Tokens expire after 24h.
Request
Requirements:
- Contact has a login
- Contact has an email address
Response
An empty response
HTTP Response Code: 200
PUT /api2/contacts/:id/set_password — Set a new password
No questions asked. The API does not require to send the old
password. In order to check the old password in the web app, use
authenticate prior to setting the new password.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The new password to set Type: |
Requirements:
- Contact has a login
Response
The representation of the modified contact
Parameters:
| Name | Description |
|---|---|
|
base_type is always Contact. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always contact. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The ID of the associated account Type: Example:
|
|
A string to prepend to the name Type: Example:
|
|
The first name of the contact Type: |
|
The last name of the contact Type: |
|
The gender of the contact. One of Type: Example:
|
|
The preferred language of the contact. One of the codes defined in the contact type. Type: Example:
|
|
The job description of the contact Type: |
|
The email address of the contact Type: |
|
The main phone number of the contact Type: Example:
|
|
The main mobile phone number of the contact Type: |
|
The fax number of the contact Type: |
|
The country in which the contact is based (stored in uppercase) Type: Example:
|
|
The region in which the contact is based Type: |
|
The postal code of the contact location Type: |
|
The street name and building number of the contact location Type: |
|
The city in which the contact is based Type: Example:
|
|
An address extension Type: |
|
Type: |
|
Type: |
|
A list of tags Type: Example:
|
|
Type: |
|
Whether to look up the geo coordinates of the address Type: |
|
Whether the contact wants to receive phone calls Type: |
|
Whether the contact wants to receive snail mail Type: |
|
The login used to authenticate. Must be unique in the tenant. Type: |
|
Whether the contact has a password Type: |
|
The timestamp of the most recent request for a new password token Type: |
|
The timestamp of the most recent password renewal Type: |
HTTP Response Code: 200
PUT /api2/contacts/set_password_by_token — Set a new password by token
The contact is identified by means of the token.
Use case: contact clicks on a link (including a token) in an email to visit a password change page.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The new password to set Type: |
|
The token as acquired from Type: |
Requirements:
- Contact has a login
- Token has not expired
Response
The representation of the modified contact
Parameters:
| Name | Description |
|---|---|
|
base_type is always Contact. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always contact. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The ID of the associated account Type: Example:
|
|
A string to prepend to the name Type: Example:
|
|
The first name of the contact Type: |
|
The last name of the contact Type: |
|
The gender of the contact. One of Type: Example:
|
|
The preferred language of the contact. One of the codes defined in the contact type. Type: Example:
|
|
The job description of the contact Type: |
|
The email address of the contact Type: |
|
The main phone number of the contact Type: Example:
|
|
The main mobile phone number of the contact Type: |
|
The fax number of the contact Type: |
|
The country in which the contact is based (stored in uppercase) Type: Example:
|
|
The region in which the contact is based Type: |
|
The postal code of the contact location Type: |
|
The street name and building number of the contact location Type: |
|
The city in which the contact is based Type: Example:
|
|
An address extension Type: |
|
Type: |
|
Type: |
|
A list of tags Type: Example:
|
|
Type: |
|
Whether to look up the geo coordinates of the address Type: |
|
Whether the contact wants to receive phone calls Type: |
|
Whether the contact wants to receive snail mail Type: |
|
The login used to authenticate. Must be unique in the tenant. Type: |
|
Whether the contact has a password Type: |
|
The timestamp of the most recent request for a new password token Type: |
|
The timestamp of the most recent password renewal Type: |
HTTP Response Code: 200
PUT /api2/contacts/authenticate — Authenticate a contact by means of a login and a password
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The login of the contact Type: |
|
The contact's password Type: |
Requirements:
- Login and password authenticate a contact
Response
The representation of the contact
Parameters:
| Name | Description |
|---|---|
|
base_type is always Contact. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The custom attributes of a type. Custom attributes are user-defined. Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always contact. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The ID of the associated account Type: Example:
|
|
A string to prepend to the name Type: Example:
|
|
The first name of the contact Type: |
|
The last name of the contact Type: |
|
The gender of the contact. One of Type: Example:
|
|
The preferred language of the contact. One of the codes defined in the contact type. Type: Example:
|
|
The job description of the contact Type: |
|
The email address of the contact Type: |
|
The main phone number of the contact Type: Example:
|
|
The main mobile phone number of the contact Type: |
|
The fax number of the contact Type: |
|
The country in which the contact is based (stored in uppercase) Type: Example:
|
|
The region in which the contact is based Type: |
|
The postal code of the contact location Type: |
|
The street name and building number of the contact location Type: |
|
The city in which the contact is based Type: Example:
|
|
An address extension Type: |
|
Type: |
|
Type: |
|
A list of tags Type: Example:
|
|
Type: |
|
Whether to look up the geo coordinates of the address Type: |
|
Whether the contact wants to receive phone calls Type: |
|
Whether the contact wants to receive snail mail Type: |
|
The login used to authenticate. Must be unique in the tenant. Type: |
|
Whether the contact has a password Type: |
|
The timestamp of the most recent request for a new password token Type: |
|
The timestamp of the most recent password renewal Type: |
HTTP Response Code: 200
EventContact
EventContact represents the WebCRM event participation model
Attributes of EventContact
| Name | Description |
|---|---|
|
base_type is always EventContact. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Available for: Example:
|
|
The timestamp of the creation of the item Type: Available for: Example:
|
|
Custom attributes are defined in the associated event. Type: Available for: Example:
|
|
The ID of an item Type: Available for: Example:
|
|
typeid is always eventcontact. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Available for: Example:
|
|
The login of the user who updated the item at Type: Available for: Example:
|
|
The version number of the change. It is incremented on every change. Type: Available for: Example:
|
|
The ID of the contact person concerned Type: Available for: |
|
The ID of the event concerned Type: Available for: |
|
Event participation state of the person. One of: Type: Available for: |
|
Timestamp of the most recent update of the participant's state. Type: Available for: |
GET /api2/event_contacts/:id — Fetch an event contact
Response
The representation of the requested event contact
Parameters:
| Name | Description |
|---|---|
|
base_type is always EventContact. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
Custom attributes are defined in the associated event. Type: Example:
|
|
The ID of an item Type: Example:
|
|
typeid is always eventcontact. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The ID of the contact person concerned Type: |
|
The ID of the event concerned Type: |
|
Event participation state of the person. One of: Type: |
|
Timestamp of the most recent update of the participant's state. Type: |
HTTP Response Code: 200
POST /api2/event_contacts — Create an event_contact
Request
Optional Parameters:
| Name | Description |
|---|---|
|
Custom attributes are defined in the associated event. Type: Example:
|
|
The ID of the contact person concerned Type: |
|
The ID of the event concerned Type: |
|
Event participation state of the person. One of: Type: |
Response
The representation of the created event contact
Parameters:
| Name | Description |
|---|---|
|
base_type is always EventContact. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
Custom attributes are defined in the associated event. Type: Example:
|
|
The ID of an item Type: Example:
|
|
typeid is always eventcontact. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The ID of the contact person concerned Type: |
|
The ID of the event concerned Type: |
|
Event participation state of the person. One of: Type: |
|
Timestamp of the most recent update of the participant's state. Type: |
HTTP Response Code: 201
PUT /api2/event_contacts/:id — Update an event contact
For optimistic locking, send the current version in an If-Match
HTTP header.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
Custom attributes are defined in the associated event. Type: Example:
|
|
Event participation state of the person. One of: Type: |
Response
The representation of the updated event contact
Parameters:
| Name | Description |
|---|---|
|
base_type is always EventContact. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
Custom attributes are defined in the associated event. Type: Example:
|
|
The ID of an item Type: Example:
|
|
typeid is always eventcontact. Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The ID of the contact person concerned Type: |
|
The ID of the event concerned Type: |
|
Event participation state of the person. One of: Type: |
|
Timestamp of the most recent update of the participant's state. Type: |
HTTP Response Code: 200
DELETE /api2/event_contacts/:id — Delete an event contact
For optimistic locking, send the current version in an If-Match
HTTP header.
Response
HTTP Response Code: 200
GET /api2/event_contacts/:id/changes — Fetch the changelog of an event contact
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The number of changelog entries to fetch at most. The max. limit is 100. Type: Default: |
Response
The event contact changelog
Parameters:
| Name | Description |
|---|---|
|
The changelog entries in reverse order (newer -> older) Type: |
HTTP Response Code: 200
Event
Event represents the WebCRM event model
Attributes of Event
| Name | Description |
|---|---|
|
base_type is always Event. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Available for: Example:
|
|
The timestamp of the creation of the item Type: Available for: Example:
|
|
Custom attributes of the type with the specified type_id. Type: Available for: Example:
|
|
The ID of an item Type: Available for: Example:
|
|
The type determines which custom attributes the event has Type: Available for: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Available for: Example:
|
|
The login of the user who updated the item at Type: Available for: Example:
|
|
The version number of the change. It is incremented on every change. Type: Available for: Example:
|
|
A hash of attribute definitions for the event contacts of this event. The keys are the attribute names, the values are the respective definitions. Custom attribute names must be prefixed with When updating, attributes not specified are not deleted. Set them to Type: Available for: Example:
|
|
The attribute names in the order to be used in a GUI.
Attribute names must be prefixed with Type: Available for: Example:
|
|
The timestamp of the beginning of the event Type: Available for: |
|
The timestamp of the end of the event Type: Available for: |
|
A string that can be used to categorize the event Type: Available for: Example:
|
|
The place at which the event takes place Type: Available for: |
|
The title of the event Type: Available for: |
GET /api2/events/:id — Fetch an event
Response
The representation of the requested event
Parameters:
| Name | Description |
|---|---|
|
base_type is always Event. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
Custom attributes of the type with the specified type_id. Type: Example:
|
|
The ID of an item Type: Example:
|
|
The type determines which custom attributes the event has Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
A hash of attribute definitions for the event contacts of this event. The keys are the attribute names, the values are the respective definitions. Custom attribute names must be prefixed with When updating, attributes not specified are not deleted. Set them to Type: Example:
|
|
The attribute names in the order to be used in a GUI.
Attribute names must be prefixed with Type: Example:
|
|
The timestamp of the beginning of the event Type: |
|
The timestamp of the end of the event Type: |
|
A string that can be used to categorize the event Type: Example:
|
|
The place at which the event takes place Type: |
|
The title of the event Type: |
HTTP Response Code: 200
POST /api2/events — Create an event
Request
Required Parameters:
| Name | Description |
|---|---|
|
The type determines which custom attributes the event has Type: Example:
|
|
The timestamp of the beginning of the event Type: |
|
The timestamp of the end of the event Type: |
|
The title of the event Type: |
Optional Parameters:
| Name | Description |
|---|---|
|
Custom attributes of the type with the specified type_id. Type: Example:
|
|
A hash of attribute definitions for the event contacts of this event. The keys are the attribute names, the values are the respective definitions. Custom attribute names must be prefixed with When updating, attributes not specified are not deleted. Set them to Type: Example:
|
|
The attribute names in the order to be used in a GUI.
Attribute names must be prefixed with Type: Example:
|
|
A string that can be used to categorize the event Type: Example:
|
|
The place at which the event takes place Type: |
Response
The representation of the created event
Parameters:
| Name | Description |
|---|---|
|
base_type is always Event. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
Custom attributes of the type with the specified type_id. Type: Example:
|
|
The ID of an item Type: Example:
|
|
The type determines which custom attributes the event has Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
A hash of attribute definitions for the event contacts of this event. The keys are the attribute names, the values are the respective definitions. Custom attribute names must be prefixed with When updating, attributes not specified are not deleted. Set them to Type: Example:
|
|
The attribute names in the order to be used in a GUI.
Attribute names must be prefixed with Type: Example:
|
|
The timestamp of the beginning of the event Type: |
|
The timestamp of the end of the event Type: |
|
A string that can be used to categorize the event Type: Example:
|
|
The place at which the event takes place Type: |
|
The title of the event Type: |
HTTP Response Code: 201
PUT /api2/events/:id — Update an event
For optimistic locking, send the current version in an If-Match
HTTP header.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
Custom attributes of the type with the specified type_id. Type: Example:
|
|
A hash of attribute definitions for the event contacts of this event. The keys are the attribute names, the values are the respective definitions. Custom attribute names must be prefixed with When updating, attributes not specified are not deleted. Set them to Type: Example:
|
|
The attribute names in the order to be used in a GUI.
Attribute names must be prefixed with Type: Example:
|
|
The timestamp of the beginning of the event Type: |
|
The timestamp of the end of the event Type: |
|
A string that can be used to categorize the event Type: Example:
|
|
The place at which the event takes place Type: |
|
The title of the event Type: |
Response
The representation of the updated event
Parameters:
| Name | Description |
|---|---|
|
base_type is always Event. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
Custom attributes of the type with the specified type_id. Type: Example:
|
|
The ID of an item Type: Example:
|
|
The type determines which custom attributes the event has Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
A hash of attribute definitions for the event contacts of this event. The keys are the attribute names, the values are the respective definitions. Custom attribute names must be prefixed with When updating, attributes not specified are not deleted. Set them to Type: Example:
|
|
The attribute names in the order to be used in a GUI.
Attribute names must be prefixed with Type: Example:
|
|
The timestamp of the beginning of the event Type: |
|
The timestamp of the end of the event Type: |
|
A string that can be used to categorize the event Type: Example:
|
|
The place at which the event takes place Type: |
|
The title of the event Type: |
HTTP Response Code: 200
DELETE /api2/events/:id — Delete an event
For optimistic locking, send the current version in an If-Match
HTTP header.
Response
HTTP Response Code: 200
GET /api2/events/:id/changes — Fetch the changelog of an event
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The number of changelog entries to fetch at most. The max. limit is 100. Type: Default: |
Response
The event changelog
Parameters:
| Name | Description |
|---|---|
|
The changelog entries in reverse order (newer -> older) Type: |
HTTP Response Code: 200
Mailing
Mailing represents the WebCRM mailing model
Attributes of Mailing
| Name | Description |
|---|---|
|
base_type is always Mailing. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Available for: Example:
|
|
The timestamp of the creation of the item Type: Available for: Example:
|
|
The ID of an item Type: Available for: Example:
|
|
type_id is always mailing Type: Available for: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Available for: Example:
|
|
The login of the user who updated the item at Type: Available for: Example:
|
|
The version number of the change. It is incremented on every change. Type: Available for: Example:
|
|
Plain text content of the mailing Type: Available for: |
|
HTML content of the mailing Type: Available for: |
|
Timestamp of the point in time the mailing is expected to be released. Mailings are not sent out automatically if the date arrives. Type: Available for: |
|
Sender address of the emails Type: Available for: |
|
Address to which replies are sent Type: Available for: |
|
Subject of the emails Type: Available for: |
|
One of Type: Default: Available for: |
|
A collection of contacts or event contacts the mails will be sent to Type: Available for: |
|
ID of the event associated with the mailing Type: Available for: |
|
Timestamp of the release of the mailing Type: Available for: |
|
Login of the person who released the mailing Type: Available for: |
|
Mailing title Type: Available for: |
GET /api2/mailings/:id — Fetch a mailing
Response
The representation of the requested mailing
Parameters:
| Name | Description |
|---|---|
|
base_type is always Mailing. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always mailing Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
Plain text content of the mailing Type: |
|
HTML content of the mailing Type: |
|
Timestamp of the point in time the mailing is expected to be released. Mailings are not sent out automatically if the date arrives. Type: |
|
Sender address of the emails Type: |
|
Address to which replies are sent Type: |
|
Subject of the emails Type: |
|
One of Type: Default: |
|
A collection of contacts or event contacts the mails will be sent to Type: |
|
ID of the event associated with the mailing Type: |
|
Timestamp of the release of the mailing Type: |
|
Login of the person who released the mailing Type: |
|
Mailing title Type: |
HTTP Response Code: 200
POST /api2/mailings/:id/clone — Clone a mailing
Creates a new mailing by cloning this mailing. Specify all the attributes you want to overwrite. Afterwards, you can still modify the new mailing using update.
Response
The representation of the created mailing
Parameters:
| Name | Description |
|---|---|
|
base_type is always Mailing. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always mailing Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
Plain text content of the mailing Type: |
|
HTML content of the mailing Type: |
|
Timestamp of the point in time the mailing is expected to be released. Mailings are not sent out automatically if the date arrives. Type: |
|
Sender address of the emails Type: |
|
Address to which replies are sent Type: |
|
Subject of the emails Type: |
|
One of Type: Default: |
|
A collection of contacts or event contacts the mails will be sent to Type: |
|
ID of the event associated with the mailing Type: |
|
Timestamp of the release of the mailing Type: |
|
Login of the person who released the mailing Type: |
|
Mailing title Type: |
HTTP Response Code: 201
POST /api2/mailings — Create a mailing
Request
Required Parameters:
| Name | Description |
|---|---|
|
Mailing title Type: |
Optional Parameters:
| Name | Description |
|---|---|
|
Plain text content of the mailing Type: |
|
HTML content of the mailing Type: |
|
Timestamp of the point in time the mailing is expected to be released. Mailings are not sent out automatically if the date arrives. Type: |
|
Sender address of the emails Type: |
|
Address to which replies are sent Type: |
|
Subject of the emails Type: |
|
One of Type: Default: |
|
A collection of contacts or event contacts the mails will be sent to Type: |
|
ID of the event associated with the mailing Type: |
Response
The representation of the created mailing
Parameters:
| Name | Description |
|---|---|
|
base_type is always Mailing. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always mailing Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
Plain text content of the mailing Type: |
|
HTML content of the mailing Type: |
|
Timestamp of the point in time the mailing is expected to be released. Mailings are not sent out automatically if the date arrives. Type: |
|
Sender address of the emails Type: |
|
Address to which replies are sent Type: |
|
Subject of the emails Type: |
|
One of Type: Default: |
|
A collection of contacts or event contacts the mails will be sent to Type: |
|
ID of the event associated with the mailing Type: |
|
Timestamp of the release of the mailing Type: |
|
Login of the person who released the mailing Type: |
|
Mailing title Type: |
HTTP Response Code: 201
PUT /api2/mailings/:id — Update a mailing
For optimistic locking, send the current version in an If-Match
HTTP header.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
Plain text content of the mailing Type: |
|
HTML content of the mailing Type: |
|
Timestamp of the point in time the mailing is expected to be released. Mailings are not sent out automatically if the date arrives. Type: |
|
Sender address of the emails Type: |
|
Address to which replies are sent Type: |
|
Subject of the emails Type: |
|
One of Type: Default: |
|
A collection of contacts or event contacts the mails will be sent to Type: |
|
ID of the event associated with the mailing Type: |
|
Mailing title Type: |
Response
The representation of the updated mailing
Parameters:
| Name | Description |
|---|---|
|
base_type is always Mailing. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always mailing Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
Plain text content of the mailing Type: |
|
HTML content of the mailing Type: |
|
Timestamp of the point in time the mailing is expected to be released. Mailings are not sent out automatically if the date arrives. Type: |
|
Sender address of the emails Type: |
|
Address to which replies are sent Type: |
|
Subject of the emails Type: |
|
One of Type: Default: |
|
A collection of contacts or event contacts the mails will be sent to Type: |
|
ID of the event associated with the mailing Type: |
|
Timestamp of the release of the mailing Type: |
|
Login of the person who released the mailing Type: |
|
Mailing title Type: |
HTTP Response Code: 200
DELETE /api2/mailings/:id — Delete a mailing
For optimistic locking, send the current version in an If-Match
HTTP header.
Response
HTTP Response Code: 200
GET /api2/mailings/:id/changes — Fetch the changelog of a mailing
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The number of changelog entries to fetch at most. The max. limit is 100. Type: Default: |
Response
The mailing changelog
Parameters:
| Name | Description |
|---|---|
|
The changelog entries in reverse order (newer -> older) Type: |
HTTP Response Code: 200
POST /api2/mailings/:id/render_preview — Render a mailing preview
Renders a mailing preview
Request
Optional Parameters:
| Name | Description |
|---|---|
|
Personalizes the preview for this contact (salutation, name etc.). This parameter is necessary for Liquid mailings, but unused for Scrivito mailings. Type: |
Response
For Liquid mailings, the response contains email fields personalized in the context of the contact.
For Scrivito mailings, the response is not personalized.
It does not contain the fields email_to and text_body.
Parameters:
| Name | Description |
|---|---|
|
Type: |
|
Type: |
|
Type: |
|
Type: |
|
Type: |
|
Type: |
HTTP Response Code: 200
Example:
# For Liquid mailing:
{
"email_from": "Marketing <marketing@example.com>",
"email_reply_to": "reply@example.com",
"email_subject": "Invitation to exhibition",
"email_to": "john.doe@example.com",
"html_body": "<h1>Welcome Mr. John Doe</h1>...",
"text_body": "Welcome Mr. John Doe..."
}
# For Scrivito mailing:
{
"email_from": "Marketing <marketing@example.com>",
"email_reply_to": "reply@example.com",
"email_subject": "Invitation to exhibition",
"html_body": "..."
}
POST /api2/mailings/:id/send_single_email — Send a single email
Sends a mailing, e.g. a newsletter mailing, to a single person.
Use case: somebody registers for a newsletter, they should receive the most recent newsletter as well.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The contact to send a single email to Type: |
Requirements:
- Mailing has been released
- Mailing attribute
email_fromhas been registered as a valid sender - Contact
recipient_contact_idhas an email address - Contact
recipient_contact_idwants to receive emails
Response
A status report
Parameters:
| Name | Description |
|---|---|
|
Type: |
HTTP Response Code: 200
Example:
{
"message": "email sent to $ADDR"
}
POST /api2/mailings/:id/send_me_a_proof_email — Send a proof email
Sends a proof email (personalized for a contact) to the current user (the API user).
Request
Optional Parameters:
| Name | Description |
|---|---|
|
Personalize email for this contact (salutation, name etc.) Type: |
Requirements:
- Mailing attribute
email_fromhas been registered as a valid sender - Current user has a valid email address
Response
A status report
Parameters:
| Name | Description |
|---|---|
|
Type: |
HTTP Response Code: 200
Example:
{
"message": "email sent to joe@example.com"
}
POST /api2/mailings/:id/release — Release mailing
Sends the mailing to all recipient email addresses.
Marks the mailing as
released (released_at, released_by) and also sets
planned_release_at to now.
Request
Requirements:
- Mailing has not been released or is no longer than 3 months released
- Attribute
email_fromhas been registered as a valid sender email address
Response
The representation of the updated mailing
Parameters:
| Name | Description |
|---|---|
|
base_type is always Mailing. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The ID of an item Type: Example:
|
|
type_id is always mailing Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
Plain text content of the mailing Type: |
|
HTML content of the mailing Type: |
|
Timestamp of the point in time the mailing is expected to be released. Mailings are not sent out automatically if the date arrives. Type: |
|
Sender address of the emails Type: |
|
Address to which replies are sent Type: |
|
Subject of the emails Type: |
|
One of Type: Default: |
|
A collection of contacts or event contacts the mails will be sent to Type: |
|
ID of the event associated with the mailing Type: |
|
Timestamp of the release of the mailing Type: |
|
Login of the person who released the mailing Type: |
|
Mailing title Type: |
HTTP Response Code: 200
MailingDelivery
MailingDelivery represents a mailing delivery
Attributes of MailingDelivery
| Name | Description |
|---|---|
|
Timestamp of when the mailing delivery was bounced Type: Available for: |
|
The status code issued by the reporting MTA, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounce-types Type: Available for: |
|
The bounce subtype, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounce-types Type: Available for: |
|
The bounce type, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounce-types Type: Available for: |
|
Timestamp of when any tracked link in the email was clicked. Type: Available for: |
|
A list of clicked links. Type: Available for: |
|
Timestamp of when a complaint was sent, i.e. the user clicked spam/junk or the mail server classified it as spam. Type: Available for: |
|
The complaint feedback type, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#complaint-object Type: Available for: |
|
The user agent (the user's client) that reported the complaint, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#complaint-object Type: Available for: |
|
The contact id of an associated contact. It will be automatically determined based on the email address. Type: Available for: |
|
The timestamp of the creation of the item Type: Available for: Example:
|
|
Custom properties attached to the mailing delivery for personalizing emails. The values can be inserted into the mailing content. Custom data is only available for Scrivito mailings. Type: Available for: |
|
Timestamp of when the mailing delivery was delivered Type: Available for: |
|
The SMTP response message of the receiving mail server Type: Available for: |
|
Use the URL-encoded recipient email address as ID in the endpoint URL. Type: Available for: |
|
ID of the mailing this delivery belongs to Type: Available for: |
|
Timestamp of when the email was opened Type: Available for: |
|
Timestamp of when the mailing delivery was processed Type: Available for: |
|
The error message in case processing failed Type: Available for: |
|
Timestamp of when the mailing delivery was released Type: Available for: |
|
Whether the sending of the email was skipped. This happens if the recipient email address opted out from receiving emails or previous deliveries bounced permanently. Type: Available for: |
|
Timestamp of when the recipient unsubscribed from receiving further emails Type: Available for: |
|
The timestamp of the last change made to the item. Type: Available for: Example:
|
|
The version number of the change. It is incremented on every change. Type: Available for: Example:
|
GET /api2/mailings/:mailing_id/mailing_deliveries — Fetch all mailing deliveries of a mailing
Returns the list of mailing deliveries that belong to the mailing.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
A timestamp to filter deliveries by. Only mailing deliveries that were modified after or at this time are returned. Type: Example:
|
Requirements:
- Mailing has not been deleted
Response
The shortened representation of all deliveries of the mailing sorted by id.
Use the updated_at timestamp to determine if you need to fetch the details.
HTTP Response Code: 200
Example:
[
{
"id": "abc@example.com",
"updated_at": "2020-10-21T14:45:07Z"
},
{
"id": "def@example.com",
"updated_at": "2020-10-21T14:43:55Z"
}
]
GET /api2/mailings/:mailing_id/mailing_deliveries/:id — Fetch a mailing delivery
Request
Requirements:
- Mailing has not been deleted
Response
The representation of the mailing delivery
Parameters:
| Name | Description |
|---|---|
|
Timestamp of when the mailing delivery was bounced Type: |
|
The status code issued by the reporting MTA, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounce-types Type: |
|
The bounce subtype, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounce-types Type: |
|
The bounce type, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounce-types Type: |
|
Timestamp of when any tracked link in the email was clicked. Type: |
|
A list of clicked links. Type: |
|
Timestamp of when a complaint was sent, i.e. the user clicked spam/junk or the mail server classified it as spam. Type: |
|
The complaint feedback type, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#complaint-object Type: |
|
The user agent (the user's client) that reported the complaint, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#complaint-object Type: |
|
The contact id of an associated contact. It will be automatically determined based on the email address. Type: |
|
The timestamp of the creation of the item Type: Example:
|
|
Custom properties attached to the mailing delivery for personalizing emails. The values can be inserted into the mailing content. Custom data is only available for Scrivito mailings. Type: |
|
Timestamp of when the mailing delivery was delivered Type: |
|
The SMTP response message of the receiving mail server Type: |
|
Use the URL-encoded recipient email address as ID in the endpoint URL. Type: |
|
ID of the mailing this delivery belongs to Type: |
|
Timestamp of when the email was opened Type: |
|
Timestamp of when the mailing delivery was processed Type: |
|
The error message in case processing failed Type: |
|
Timestamp of when the mailing delivery was released Type: |
|
Whether the sending of the email was skipped. This happens if the recipient email address opted out from receiving emails or previous deliveries bounced permanently. Type: |
|
Timestamp of when the recipient unsubscribed from receiving further emails Type: |
|
The timestamp of the last change made to the item. Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
HTTP Response Code: 200
Example:
{
"bounced_at": "2020-10-21T15:45:07Z",
"bounced_diagnostic_code": "smtp; 552 5.5.2 Mailbox full",
"bounced_subtype": "MailboxFull",
"bounced_type": "Transient",
"clicked_at": "2020-10-21T15:45:07Z",
"clicked_links": [
{
"clicked_at": "2020-10-21T15:45:07Z",
"title": "The Link Title",
"url": "http://example.com"
},
{
...
}
],
"complained_at": "2020-10-21T15:45:07Z",
"complained_type": "abuse",
"complained_user_agent": "the user agent",
"contact_id": "950b3f7d33f2ae67b842ed1572f22b13",
"created_at": "2020-10-21T13:45:07Z",
"custom_data": {
"salutation": "Mr. Doe"
},
"delivered_at": "2020-10-21T15:45:07Z",
"delivered_smtp_response": "250 2.0.0 OK 1594292034 b13si2065370",
"id": "john.doe@example.com",
"mailing_id": "04bc2c6257aa5d8bac34e6e1e828e8e2",
"opened_at": "2020-10-21T15:45:07Z",
"processed_at": "2020-10-21T15:45:07Z",
"processing_error": "an error",
"released_at": "2020-10-21T15:45:07Z",
"skipped": false,
"unsubscribed_at": "2020-10-21T15:45:07Z",
"updated_at": "2020-10-21T14:45:07Z",
"version": 2
}
PUT /api2/mailings/:mailing_id/mailing_deliveries/:id — Create or update a mailing delivery
If a mailing delivery for the specified id (email address) already exists, it will be updated instead.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
Custom properties attached to the mailing delivery for personalizing emails. The values can be inserted into the mailing content. Custom data is only available for Scrivito mailings. Type: |
Requirements:
- Mailing has not been deleted
Response
The representation of the created or updated mailing delivery
Parameters:
| Name | Description |
|---|---|
|
Timestamp of when the mailing delivery was bounced Type: |
|
The status code issued by the reporting MTA, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounce-types Type: |
|
The bounce subtype, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounce-types Type: |
|
The bounce type, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounce-types Type: |
|
Timestamp of when any tracked link in the email was clicked. Type: |
|
A list of clicked links. Type: |
|
Timestamp of when a complaint was sent, i.e. the user clicked spam/junk or the mail server classified it as spam. Type: |
|
The complaint feedback type, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#complaint-object Type: |
|
The user agent (the user's client) that reported the complaint, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#complaint-object Type: |
|
The contact id of an associated contact. It will be automatically determined based on the email address. Type: |
|
The timestamp of the creation of the item Type: Example:
|
|
Custom properties attached to the mailing delivery for personalizing emails. The values can be inserted into the mailing content. Custom data is only available for Scrivito mailings. Type: |
|
Timestamp of when the mailing delivery was delivered Type: |
|
The SMTP response message of the receiving mail server Type: |
|
Use the URL-encoded recipient email address as ID in the endpoint URL. Type: |
|
ID of the mailing this delivery belongs to Type: |
|
Timestamp of when the email was opened Type: |
|
Timestamp of when the mailing delivery was processed Type: |
|
The error message in case processing failed Type: |
|
Timestamp of when the mailing delivery was released Type: |
|
Whether the sending of the email was skipped. This happens if the recipient email address opted out from receiving emails or previous deliveries bounced permanently. Type: |
|
Timestamp of when the recipient unsubscribed from receiving further emails Type: |
|
The timestamp of the last change made to the item. Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
HTTP Response Code: 200
DELETE /api2/mailings/:mailing_id/mailing_deliveries/:id — Delete a mailing delivery
Request
Requirements:
- Mailing has not been deleted
- Mailing delivery has not been released
Response
Deleting a mailing delivery is irreversible.
HTTP Response Code: 200
MailingRecipient
MailingRecipient represents a mailing recipient email address
Attributes of MailingRecipient
| Name | Description |
|---|---|
|
base_type is always MailingRecipient Type: Available for: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Available for: Example:
|
|
The timestamp of the creation of the item Type: Available for: Example:
|
|
use the url-encoded recipient email address as ID Type: Available for: Example:
|
|
type_id is always mailing-recipient Type: Available for: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Available for: Example:
|
|
The login of the user who updated the item at Type: Available for: Example:
|
|
The version number of the change. It is incremented on every change. Type: Available for: Example:
|
|
When sending mailings, this flag determines whether the WebCRM sends emails to this address. Type: Available for: |
|
If the user has given their consent, the value is "given". If the user has revoked their consent, the value is "revoked". Otherwise the value is "unknown". Type: Available for: |
|
A list of subscribed topic names. Type: Available for: |
|
A list of unsubscribed topic names. The unsubscribed topic names are computed as the difference set between all available topic names and the subscribed topic names. Type: Available for: |
|
A sentence that describes why the activeness/consent/subscriptions were
changed, e.g. "recipient email address used the subscription form on www.foo.com". The
text will be logged in the recipient email address. See Type: Available for: |
|
An array of log entries. Every entry is a hash with the keys Type: Available for: |
|
Type: Available for: |
|
Type: Available for: |
|
Type: Available for: |
|
Type: Available for: |
GET /api2/mailing_recipients — Fetch all mailing recipient email addresses
Returns the list of mailing recipient email addresses.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
A timestamp to filter recipients by. Only those that were modified after or at this time are returned. Type: Example:
|
Response
The representation of up to 100 mailing recipients sorted by update time. If no since param is given, the list starts with the oldest updated mailing recipient. To fetch more mailing recipients, query this endpoint again with a later since param.
HTTP Response Code: 200
Example:
[
{
"active": true,
"complained_at": null,
"consent": "given",
"consent_logs": [],
"consent_given_at": "2021-01-04T12:25:07Z",
"consent_revoked_at": null,
"created_at": "2020-12-08T10:13:56Z",
"created_by": "user1",
"id": "john.doe@example.com",
"permanent_bounced_at": null,
"topic_names_unsubscribed": ["Product-Info"],
"topic_names": ["Newsletter"],
"updated_at": "2021-01-04T12:25:07Z",
"updated_by": "user1",
"version": 7,
},
{
...
}
]
GET /api2/mailing_recipients/:id — Fetch a mailing recipient email address
Mailing recipient email addresses exist implicitly. They do not need to be created first. A not previously created mailing recipient email address is active by default.
Response
The representation of the requested mailing recipient email address
Parameters:
| Name | Description |
|---|---|
|
base_type is always MailingRecipient Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
use the url-encoded recipient email address as ID Type: Example:
|
|
type_id is always mailing-recipient Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
When sending mailings, this flag determines whether the WebCRM sends emails to this address. Type: |
|
If the user has given their consent, the value is "given". If the user has revoked their consent, the value is "revoked". Otherwise the value is "unknown". Type: |
|
A list of subscribed topic names. Type: |
|
A list of unsubscribed topic names. The unsubscribed topic names are computed as the difference set between all available topic names and the subscribed topic names. Type: |
|
A sentence that describes why the activeness/consent/subscriptions were
changed, e.g. "recipient email address used the subscription form on www.foo.com". The
text will be logged in the recipient email address. See Type: |
|
An array of log entries. Every entry is a hash with the keys Type: |
|
Type: |
|
Type: |
|
Type: |
|
Type: |
HTTP Response Code: 200
PUT /api2/mailing_recipients/:id — Updating or creating a mailing recipient email address
For optimistic locking, send the current version in an If-Match
HTTP header.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
When sending mailings, this flag determines whether the WebCRM sends emails to this address. Type: |
|
If the user has given their consent, the value is "given". If the user has revoked their consent, the value is "revoked". Otherwise the value is "unknown". Type: |
|
A list of subscribed topic names. Type: |
|
A sentence that describes why the activeness/consent/subscriptions were
changed, e.g. "recipient email address used the subscription form on www.foo.com". The
text will be logged in the recipient email address. See Type: |
Response
The representation of the updated mailing recipient email address
Parameters:
| Name | Description |
|---|---|
|
base_type is always MailingRecipient Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
use the url-encoded recipient email address as ID Type: Example:
|
|
type_id is always mailing-recipient Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
When sending mailings, this flag determines whether the WebCRM sends emails to this address. Type: |
|
If the user has given their consent, the value is "given". If the user has revoked their consent, the value is "revoked". Otherwise the value is "unknown". Type: |
|
A list of subscribed topic names. Type: |
|
A list of unsubscribed topic names. The unsubscribed topic names are computed as the difference set between all available topic names and the subscribed topic names. Type: |
|
A sentence that describes why the activeness/consent/subscriptions were
changed, e.g. "recipient email address used the subscription form on www.foo.com". The
text will be logged in the recipient email address. See Type: |
|
An array of log entries. Every entry is a hash with the keys Type: |
|
Type: |
|
Type: |
|
Type: |
|
Type: |
HTTP Response Code: 200
TemplateSet
TemplateSet represents the singleton WebCRM template set
Attributes of TemplateSet
| Name | Description |
|---|---|
|
base_type is always TemplateSet. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Available for: Example:
|
|
The timestamp of the creation of the item Type: Available for: Example:
|
|
id is always null Type: Available for: Example:
|
|
type_id is always template-set Type: Available for: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Available for: Example:
|
|
The login of the user who updated the item at Type: Available for: Example:
|
|
The version number of the change. It is incremented on every change. Type: Available for: Example:
|
|
The individual templates. When updating, missing entries are not deleted. Set them to Type: Available for: |
GET /api2/template_set — Fetch the template set
Lists the current templates
Response
The representation of the template set
Parameters:
| Name | Description |
|---|---|
|
base_type is always TemplateSet. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
id is always null Type: Example:
|
|
type_id is always template-set Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The individual templates. When updating, missing entries are not deleted. Set them to Type: |
HTTP Response Code: 200
PUT /api2/template_set — Update the template set
For optimistic locking, send the current version in an If-Match
HTTP header.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The individual templates. When updating, missing entries are not deleted. Set them to Type: |
Requirements:
- Templates have no Liquid syntax errors
Response
The representation of the updated template set
Parameters:
| Name | Description |
|---|---|
|
base_type is always TemplateSet. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
id is always null Type: Example:
|
|
type_id is always template-set Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
The individual templates. When updating, missing entries are not deleted. Set them to Type: |
HTTP Response Code: 200
GET /api2/template_set/changes — Fetch the changelog of the template set
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The number of changelog entries to fetch at most. The max. limit is 100. Type: Default: |
Response
The template set changelog.
Lists the changed templates individually. The keys in the changes
are formed like this: templates.$template_name.
Parameters:
| Name | Description |
|---|---|
|
The changelog entries in reverse order (newer -> older) Type: |
HTTP Response Code: 200
Example:
{
"results": [
{
"changed_at": "2014-01-01T00:00:00Z",
"changed_by": "root",
"details": {
"templates.digest_email_bcc": {
"before": "foo@example.com",
"after": "bar@example.com"
},
}
},
]
}
POST /api2/template_set/render_preview — Render a preview of the template set
Returns the templates after processing their Liquid code. Uses the context items as contexts for rendering.
A template for support cases, for example, might refer to an activity, a contact and perhaps other items to render. The template designer would thus pick one activity (a support case) and one contact from the already existing items and pass them to the render_preview action. The action would load these items into liquid drop and pass them to the liquid renderer. If a template accesses a liquid drop not present as a context, nothing is rendered instead of raising an error.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The templates can be a subset of the stored templates. They will be merged with the templates of the template set. Type: |
|
Templates have access to these parameters. The Type: Example:
|
Requirements:
- All IDs in context exist
- Templates have no liquid syntax errors
Response
The preview of all templates. Returns a hash containing the rendered output of all templates.
HTTP Response Code: 200
Type
Type represents the WebCRM type model
Attributes of Type
| Name | Description |
|---|---|
|
base_type is always Type. Type: Available for: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Available for: Example:
|
|
The timestamp of the creation of the item Type: Available for: Example:
|
|
The ID of the defined type, e.g. "support-case". Format: Type: Available for: Example:
|
|
type_id is always type Type: Available for: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Available for: Example:
|
|
The login of the user who updated the item at Type: Available for: Example:
|
|
The version number of the change. It is incremented on every change. Type: Available for: Example:
|
|
Liquid template that renders an item of this type in the list view Type: Available for: |
|
The base type of the items based on this type. Possible base types:
Type: Available for: |
|
Icon of the type definition, with semantic naming scheme:
Only supported for activities. Available backgrounds: Available foregrounds: Available colors: Type: Available for: |
|
A list of possible languages a contact can choose from, mainly used for communication with the contact, e.g. mailings. Only supported for contacts. Type: Default: Available for: |
|
The list of available activity states. Only supported for activities. Type: Available for: Example:
|
|
A hash of custom attribute definitions. The keys are the attribute names, the values are the respective attribute definitions. Limit 200. Attribute names must be prefixed with When updating, attributes not specified are not deleted. Set them to Attribute types of custom attributes: Every definition has the following properties:
Enums and multienums also have:
Type: Available for: Example:
|
|
The attribute names in the order to be used in a GUI.
Attribute names must be prefixed with Type: Available for: Example:
|
|
A hash of internal attributes that are specific to this base type. Attribute types of standard attributes:
Type: Available for: Example:
|
GET /api2/types — Fetch all types
Returns a list of type definitions (including standard types such as mailing, collection, and type).
Response
The representation of all types. Returns an array of types.
HTTP Response Code: 200
GET /api2/types/:id — Fetch a type
Returns the type definition. Also includes the definitions of the standard attributes.
Response
The representation of the requested type
Parameters:
| Name | Description |
|---|---|
|
base_type is always Type. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The ID of the defined type, e.g. "support-case". Format: Type: Example:
|
|
type_id is always type Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
Liquid template that renders an item of this type in the list view Type: |
|
The base type of the items based on this type. Possible base types:
Type: |
|
Icon of the type definition, with semantic naming scheme:
Only supported for activities. Available backgrounds: Available foregrounds: Available colors: Type: |
|
A list of possible languages a contact can choose from, mainly used for communication with the contact, e.g. mailings. Only supported for contacts. Type: Default: |
|
The list of available activity states. Only supported for activities. Type: Example:
|
|
A hash of custom attribute definitions. The keys are the attribute names, the values are the respective attribute definitions. Limit 200. Attribute names must be prefixed with When updating, attributes not specified are not deleted. Set them to Attribute types of custom attributes: Every definition has the following properties:
Enums and multienums also have:
Type: Example:
|
|
The attribute names in the order to be used in a GUI.
Attribute names must be prefixed with Type: Example:
|
|
A hash of internal attributes that are specific to this base type. Attribute types of standard attributes:
Type: Example:
|
HTTP Response Code: 200
Example:
{
"attributes": {
"version": {
"title": "Version",
"attribute_type": "integer",
"read_only": true,
},
"first_name": {
"title": "First name",
"attribute_type": "string",
"read_only": true,
},
"account_id": {
"title": "Account",
"attribute_type": "reference",
"read_only": true,
},
"custom_segment": {
"title": "Segment",
"attribute_type": "enum",
"mandatory": false,
"values": ["Großhändler", "Einzelhändler", "Lieferant", "Presse"]
},
...
},
"base_type": "Type",
"icon_css_class": null,
"id": "contact",
"item_base_type": "Contact",
"type_id": "type",
"version": 1,
}
POST /api2/types — Create a type
Defines a new type. The attributes specified in attributes will be
merged with the standard attributes.
There is a limit of max. 100 types. Deleted types count, too.
Request
Required Parameters:
| Name | Description |
|---|---|
|
The ID of the defined type, e.g. "support-case". Format: Type: Example:
|
|
The base type of the items based on this type. Possible base types:
Type: |
Optional Parameters:
| Name | Description |
|---|---|
|
Liquid template that renders an item of this type in the list view Type: |
|
Icon of the type definition, with semantic naming scheme:
Only supported for activities. Available backgrounds: Available foregrounds: Available colors: Type: |
|
A list of possible languages a contact can choose from, mainly used for communication with the contact, e.g. mailings. Only supported for contacts. Type: Default: |
|
The list of available activity states. Only supported for activities. Type: Example:
|
|
A hash of custom attribute definitions. The keys are the attribute names, the values are the respective attribute definitions. Limit 200. Attribute names must be prefixed with When updating, attributes not specified are not deleted. Set them to Attribute types of custom attributes: Every definition has the following properties:
Enums and multienums also have:
Type: Example:
|
|
The attribute names in the order to be used in a GUI.
Attribute names must be prefixed with Type: Example:
|
Response
The representation of the created type
Parameters:
| Name | Description |
|---|---|
|
base_type is always Type. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The ID of the defined type, e.g. "support-case". Format: Type: Example:
|
|
type_id is always type Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
Liquid template that renders an item of this type in the list view Type: |
|
The base type of the items based on this type. Possible base types:
Type: |
|
Icon of the type definition, with semantic naming scheme:
Only supported for activities. Available backgrounds: Available foregrounds: Available colors: Type: |
|
A list of possible languages a contact can choose from, mainly used for communication with the contact, e.g. mailings. Only supported for contacts. Type: Default: |
|
The list of available activity states. Only supported for activities. Type: Example:
|
|
A hash of custom attribute definitions. The keys are the attribute names, the values are the respective attribute definitions. Limit 200. Attribute names must be prefixed with When updating, attributes not specified are not deleted. Set them to Attribute types of custom attributes: Every definition has the following properties:
Enums and multienums also have:
Type: Example:
|
|
The attribute names in the order to be used in a GUI.
Attribute names must be prefixed with Type: Example:
|
|
A hash of internal attributes that are specific to this base type. Attribute types of standard attributes:
Type: Example:
|
HTTP Response Code: 201
PUT /api2/types/:id — Update a type
For optimistic locking, send the current version in an If-Match
HTTP header.
Request
Optional Parameters:
| Name | Description |
|---|---|
|
Liquid template that renders an item of this type in the list view Type: |
|
Icon of the type definition, with semantic naming scheme:
Only supported for activities. Available backgrounds: Available foregrounds: Available colors: Type: |
|
A list of possible languages a contact can choose from, mainly used for communication with the contact, e.g. mailings. Only supported for contacts. Type: Default: |
|
The list of available activity states. Only supported for activities. Type: Example:
|
|
A hash of custom attribute definitions. The keys are the attribute names, the values are the respective attribute definitions. Limit 200. Attribute names must be prefixed with When updating, attributes not specified are not deleted. Set them to Attribute types of custom attributes: Every definition has the following properties:
Enums and multienums also have:
Type: Example:
|
|
The attribute names in the order to be used in a GUI.
Attribute names must be prefixed with Type: Example:
|
Response
The representation of the updated type
Parameters:
| Name | Description |
|---|---|
|
base_type is always Type. Type: Example:
|
|
The timestamp of the last change made to the item, independently of the originator. Type: Example:
|
|
The timestamp of the creation of the item Type: Example:
|
|
The ID of the defined type, e.g. "support-case". Format: Type: Example:
|
|
type_id is always type Type: Example:
|
|
The timestamp of the last change made to the item, always requires a user to
do the update. May be Type: Example:
|
|
The login of the user who updated the item at Type: Example:
|
|
The version number of the change. It is incremented on every change. Type: Example:
|
|
Liquid template that renders an item of this type in the list view Type: |
|
The base type of the items based on this type. Possible base types:
Type: |
|
Icon of the type definition, with semantic naming scheme:
Only supported for activities. Available backgrounds: Available foregrounds: Available colors: Type: |
|
A list of possible languages a contact can choose from, mainly used for communication with the contact, e.g. mailings. Only supported for contacts. Type: Default: |
|
The list of available activity states. Only supported for activities. Type: Example:
|
|
A hash of custom attribute definitions. The keys are the attribute names, the values are the respective attribute definitions. Limit 200. Attribute names must be prefixed with When updating, attributes not specified are not deleted. Set them to Attribute types of custom attributes: Every definition has the following properties:
Enums and multienums also have:
Type: Example:
|
|
The attribute names in the order to be used in a GUI.
Attribute names must be prefixed with Type: Example:
|
|
A hash of internal attributes that are specific to this base type. Attribute types of standard attributes:
Type: Example:
|
HTTP Response Code: 200
DELETE /api2/types/:id — Delete a type
For optimistic locking, send the current version in an If-Match
HTTP header.
Response
HTTP Response Code: 200
GET /api2/types/:id/changes — Fetch the changelog of a type
Request
Optional Parameters:
| Name | Description |
|---|---|
|
The number of changelog entries to fetch at most. The max. limit is 100. Type: Default: |
Response
The types changelog.
Lists the changed attributes individually. The keys in the changes are
formed like this: attributes.$attribute_name.
Parameters:
| Name | Description |
|---|---|
|
The changelog entries in reverse order (newer -> older) Type: |
HTTP Response Code: 200