Download OpenAPI specification:Download
This document describes the GoCXL API server.
If the endpoint requested supports pagination, you can check the Response Headers
inside the 200
response
to see how you can paginate the results.
To show information about an account, send a GET request to /api/v1/accounts/$ACCOUNT_ID
.
account_id required | string <uuid> Example: acf19357-d974-4843-9525-e98426ad5346 A unique identifier for an account. |
{- "account": {
- "id": "acf19357-d974-4843-9525-e98426ad5346",
- "name": "ACME",
- "sandbox_mode": false,
- "sandbox_email": "johndoe@example.com",
- "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
To list all categories in your account, send a GET request to /api/v1/categories
.
The response body will be a JSON object with a key of categories
. This will be
set to an array containing objects each representing a category.
slug | string Example: slug=insurances Used to filter categories by a specific slug. |
locales[] | Array of strings Example: locales[]=nl-NL Used to filter categories by specific locales. |
object Used to order categories by | |
cursor | string The requested cursor token for paginated responses. |
limit | integer Default: 20 The requested amount of items for paginated responses. |
object Used to filter by account metadata. Example: metadata[key[subkey]]=value |
{- "categories": [
- {
- "id": "dff66101-e1da-4e93-bad0-12908a8be91d",
- "name": "Insurances",
- "slug": "insurances",
- "locales": [
- {
- "locale": "nl-NL",
- "name": "Verzekeringen",
- "slug": "verzekeringen",
- "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": null,
- "label": null
}
]
}
]
}, - "requires_consent": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To show information about a category, send a GET request to /api/v1/categories/$CATEGORY_ID
.
category_id required | string <uuid> Example: dff66101-e1da-4e93-bad0-12908a8be91d A unique identifier for a category. |
{- "category": {
- "id": "dff66101-e1da-4e93-bad0-12908a8be91d",
- "name": "Insurances",
- "slug": "insurances",
- "locales": [
- {
- "locale": "nl-NL",
- "name": "Verzekeringen",
- "slug": "verzekeringen",
- "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "requires_consent": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
To list all organizations in your account, send a GET request to /api/v1/$CATEGORY_ID/organizations
.
The response body will be a JSON object with a key of organizations
. This will be
set to an array containing objects each representing a organization.
category_id required | string <uuid> Example: dff66101-e1da-4e93-bad0-12908a8be91d A unique identifier for a category. |
object Used to order organizations by | |
cursor | string The requested cursor token for paginated responses. |
limit | integer Default: 20 The requested amount of items for paginated responses. |
object Used to filter by account metadata. Example: metadata[key[subkey]]=value |
{- "organizations": [
- {
- "id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "category_id": "dff66101-e1da-4e93-bad0-12908a8be91d",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "code": "nl-NL",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": null,
- "label": null
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To show information about a letter event, send a GET request to /api/v1/letter_events/$LETTER_EVENT_ID
.
letter_event_id required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 A unique identifier for a letter event. |
{- "letter_event": {
- "id": "459a5993-1560-44bd-b879-258075b77e13",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "dispatchable_id": "71375f07-f6c4-4bad-87a9-e2467af894e7",
- "dispatchable_type": "Letter",
- "event_type": "email.single.send",
- "locale": "nl-NL",
- "metadata": { },
- "received_at": "2020-12-01T00:42:16Z"
}
}
To list all letters in your account, send a GET request to /api/v1/letters
.
The response body will be a JSON object with a key of letters
. This will be
set to an array containing objects each representing a letter.
object Used to order letters by | |
cursor | string The requested cursor token for paginated responses. |
limit | integer Default: 20 The requested amount of items for paginated responses. |
object Used to filter by account metadata. Example: metadata[key[subkey]]=value |
{- "letters": [
- {
- "id": "87ed0487-7e18-4380-9028-3d7fd2c46433",
- "state": "drafting",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "organization_name": "Allianz Nederland",
- "product_id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "product_name": "Liability insurance",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "sandbox_mode": false,
- "sandbox_email": "johndoe@example.com",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "email": "user@example.com",
- "fax": "string",
- "proof_of_ids": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "metadata": { },
- "signature_type": "text",
- "signature_data": "John Doe",
- "consent": true,
- "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
Create a new letter by submitting the parameters required by the template to POST /api/v1/letters
.
organization_id required | string <uuid> A string specifying the UUID of the organization the letter is intended for. |
product_id | string <uuid> An optional string specifying the UUID of the product the letter is intended for. |
provider_id | string <uuid> A string specifying the UUID of the provider to use when sending the letter. |
locale required | string The locale of the letter. |
signature_type | string The type of signature (could be text or image) |
signature_data | string The data for the signature. Will be the name for signature_type text and the base64 encode string for signature_type image |
required | object The parameters to use when generating the letter as described by the fields of the organization's or product's letter template. |
consent | boolean or null A boolean indicating if the user gave explicit consent to create the letter request. Only required when either the organization or products requires so. |
proof_of_ids | Array of strings An array of ID documents as base64 encoded blobs. |
metadata | object An optional set of key-value pairs that are attached for your account. Please note that:
|
drafted | boolean We can go directly to the state |
{- "organization_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "product_id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "signature_type": "text",
- "signature_data": "John Doe",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "consent": true,
- "proof_of_ids": [
- "data:image/png;base64,[insert-encoded-blob]"
], - "metadata": { },
- "drafted": true
}
{- "letter": {
- "id": "87ed0487-7e18-4380-9028-3d7fd2c46433",
- "state": "drafting",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "organization_name": "Allianz Nederland",
- "product_id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "product_name": "Liability insurance",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "sandbox_mode": false,
- "sandbox_email": "johndoe@example.com",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "email": "user@example.com",
- "fax": "string",
- "proof_of_ids": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "metadata": { },
- "signature_type": "text",
- "signature_data": "John Doe",
- "consent": true,
- "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
To show information about a letter, send a GET request to /api/v1/letters/$LETTER_ID
.
letter_id required | string <uuid> Example: 87ed0487-7e18-4380-9028-3d7fd2c46433 A unique identifier for a letter. |
{- "letter": {
- "id": "87ed0487-7e18-4380-9028-3d7fd2c46433",
- "state": "drafting",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "organization_name": "Allianz Nederland",
- "product_id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "product_name": "Liability insurance",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "sandbox_mode": false,
- "sandbox_email": "johndoe@example.com",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "email": "user@example.com",
- "fax": "string",
- "proof_of_ids": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "metadata": { },
- "signature_type": "text",
- "signature_data": "John Doe",
- "consent": true,
- "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
Update a existing letter by submitting the parameters required by the template to PUT or PATCH /api/v1/letters/$LETTER_ID
.
Letter is required to be in the state drafting
.
letter_id required | string <uuid> Example: 87ed0487-7e18-4380-9028-3d7fd2c46433 A unique identifier for a letter. |
organization_id required | string <uuid> A string specifying the UUID of the organization the letter is intended for. |
product_id | string <uuid> An optional string specifying the UUID of the product the letter is intended for. |
provider_id | string <uuid> A string specifying the UUID of the provider to use when sending the letter. |
locale required | string The locale of the letter. |
signature_type | string The type of signature (could be text or image) |
signature_data | string The data for the signature. Will be the name for signature_type text and the base64 encode string for signature_type image |
required | object The parameters to use when generating the letter as described by the fields of the organization's or product's letter template. |
consent | boolean or null A boolean indicating if the user gave explicit consent to create the letter request. Only required when either the organization or products requires so. |
proof_of_ids | Array of strings An array of ID documents as base64 encoded blobs. |
metadata | object An optional set of key-value pairs that are attached for your account. Please note that:
|
drafted | boolean We can go directly to the state |
{- "organization_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "product_id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "signature_type": "text",
- "signature_data": "John Doe",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "consent": true,
- "proof_of_ids": [
- "data:image/png;base64,[insert-encoded-blob]"
], - "metadata": { },
- "drafted": true
}
{- "letter": {
- "id": "87ed0487-7e18-4380-9028-3d7fd2c46433",
- "state": "drafting",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "organization_name": "Allianz Nederland",
- "product_id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "product_name": "Liability insurance",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "sandbox_mode": false,
- "sandbox_email": "johndoe@example.com",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "email": "user@example.com",
- "fax": "string",
- "proof_of_ids": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "metadata": { },
- "signature_type": "text",
- "signature_data": "John Doe",
- "consent": true,
- "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
To delete a letter, send a DELETE request to /api/v1/letters/$LETTER_ID
.
This operation is only allowed for sandboxed accounts.
letter_id required | string <uuid> Example: 87ed0487-7e18-4380-9028-3d7fd2c46433 A unique identifier for a letter. |
{- "error": {
- "code": ":unauthorized",
- "title": "Unauthorized",
- "message": "Unable to authenticate you."
}
}
To download the generated document for a letter, send a GET request to /api/v1/letters/$LETTER_ID/document
.
The response body will be a binary stream containing the document.
letter_id required | string <uuid> Example: 87ed0487-7e18-4380-9028-3d7fd2c46433 A unique identifier for a letter. |
{- "error": {
- "code": ":unauthorized",
- "title": "Unauthorized",
- "message": "Unable to authenticate you."
}
}
To generate a document from a letter payload and download it, send a POST request with payload to /api/v1/generate_pdf
.
The response body will be a binary stream containing the document.
object |
{- "letter": {
- "organization_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "signature_type": "text",
- "signature_data": "John Doe",
- "proof_of_ids": [
- "data:image/png;base64,[insert-encoded-blob]"
]
}
}
{- "error": {
- "code": ":unauthorized",
- "title": "Unauthorized",
- "message": "Unable to authenticate you."
}
}
Updates the letter to the new state.
letter_id required | string <uuid> Example: 87ed0487-7e18-4380-9028-3d7fd2c46433 A unique identifier for a letter. |
provider_key | string |
metadata | object A set of key-value pairs that are attached to the Letter event object. |
{- "provider_key": "string",
- "metadata": { }
}
{- "letter": {
- "id": "87ed0487-7e18-4380-9028-3d7fd2c46433",
- "state": "drafting",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "organization_name": "Allianz Nederland",
- "product_id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "product_name": "Liability insurance",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "sandbox_mode": false,
- "sandbox_email": "johndoe@example.com",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "email": "user@example.com",
- "fax": "string",
- "proof_of_ids": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "metadata": { },
- "signature_type": "text",
- "signature_data": "John Doe",
- "consent": true,
- "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
To list all letter events in your account, send a GET request to /api/v1/letters/$LETTER_ID/events
.
The response body will be a JSON object with a key of events
. This will be
set to an array containing objects each representing a letter event.
letter_id required | string <uuid> Example: 87ed0487-7e18-4380-9028-3d7fd2c46433 A unique identifier for a letter. |
object Used to order letter_events by | |
cursor | string The requested cursor token for paginated responses. |
limit | integer Default: 20 The requested amount of items for paginated responses. |
{- "letter_events": [
- {
- "id": "459a5993-1560-44bd-b879-258075b77e13",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "dispatchable_id": "71375f07-f6c4-4bad-87a9-e2467af894e7",
- "dispatchable_type": "Letter",
- "event_type": "email.single.send",
- "locale": "nl-NL",
- "metadata": { },
- "received_at": "2020-12-01T00:42:16Z"
}
]
}
To download a proof of ID for a letter, send a GET request to /api/v1/letters/$LETTER_ID/proof_of_ids/$PROOF_OF_ID_ID
.
The response body will be a binary stream containing the uploaded proof of ID.
letter_id required | string <uuid> Example: 87ed0487-7e18-4380-9028-3d7fd2c46433 A unique identifier for a letter. |
proof_of_id_id required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 A unique identifier for an uploaded proof of ID. |
{- "error": {
- "code": ":unauthorized",
- "title": "Unauthorized",
- "message": "Unable to authenticate you."
}
}
To list all organizations in your account, send a GET request to /api/v1/organizations
.
The response body will be a JSON object with a key of organizations
. This will be
set to an array containing objects each representing a organization.
slug | string Example: slug=allianz-nederland Used to filter organizations by a specific slug. |
category | string Example: category=insurances Used to filter organizations by a specific category. |
locales[] | Array of strings Example: locales[]=nl-NL Used to filter organizations by specific locales. |
url | string Example: url=allianz.nl Used to filter organizations by a (partial) URL. |
object Used to order organizations by | |
cursor | string The requested cursor token for paginated responses. |
limit | integer Default: 20 The requested amount of items for paginated responses. |
object Used to filter by account metadata. Example: metadata[key[subkey]]=value |
{- "organizations": [
- {
- "id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "category_id": "dff66101-e1da-4e93-bad0-12908a8be91d",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "code": "nl-NL",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": null,
- "label": null
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To show information about an organization, send a GET request to /api/v1/organizations/$ORGANIZATION_ID
.
organization_id required | string <uuid> Example: 0df21c85-54f5-4ce9-be17-4a2fb63e958c A unique identifier for an organization. |
{- "organization": {
- "id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "category_id": "dff66101-e1da-4e93-bad0-12908a8be91d",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "code": "nl-NL",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
To list all products for an organizations in your account, send a GET request to /api/v1/organizations/$ORGANIZATION_ID/products
.
The response body will be a JSON object with a key of products
. This will be
set to an array containing objects each representing a product.
organization_id required | string <uuid> Example: 0df21c85-54f5-4ce9-be17-4a2fb63e958c A unique identifier for an organization. |
slug | string Example: slug=liability-insurance Used to filter products by a specific slug. |
locales[] | Array of strings Example: locales[]=nl-NL Used to filter products by specific locales. |
url | string Example: url=allianz.nl Used to filter products by a (partial) URL. |
object Used to order products by | |
cursor | string The requested cursor token for paginated responses. |
limit | integer Default: 20 The requested amount of items for paginated responses. |
object Used to filter by account metadata. Example: metadata[key[subkey]]=value |
{- "products": [
- {
- "id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "name": "Liability insurance",
- "slug": "liability-insurance",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "name": "Aansprakelijkheidsverzekering",
- "slug": "aansprakelijkheidsverzekering",
- "email": "user@example.com",
- "phone": "aansprakelijkheidsverzekering-opzeggen@allianz.nl",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": null,
- "label": null
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2022-12-01T00:42:16Z",
- "updated_at": "2022-12-01T00:42:16Z"
}
]
}
To find Organizations or Products matching the search string, send a GET request to /api/v1/search
.
q | string The input that needs to be searched for |
record_type | string Example: record_type=product Used to filter results by their type. Possible options are 'organization' or 'product'. |
locale | string Example: locale=nl-NL Used to filter results by their locale. |
cursor | string The requested cursor token for paginated responses. |
limit | integer Default: 20 The requested amount of items for paginated responses. |
{- "results": [
- {
- "matched_text": "string",
- "record_type": "organization",
- "record": { }
}
]
}
To show information about an organization's product, send a GET request to /api/v1/organizations/$ORGANIZATION_ID/products/$PRODUCT_ID
.
organization_id required | string <uuid> Example: 0df21c85-54f5-4ce9-be17-4a2fb63e958c A unique identifier for an organization. |
product_id required | string Example: bfc501cf-dc45-40ca-aba3-b05018c8f8be A unique identifier for an organization's product. |
{- "product": {
- "id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "name": "Liability insurance",
- "slug": "liability-insurance",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "name": "Aansprakelijkheidsverzekering",
- "slug": "aansprakelijkheidsverzekering",
- "email": "user@example.com",
- "phone": "aansprakelijkheidsverzekering-opzeggen@allianz.nl",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2022-12-01T00:42:16Z",
- "updated_at": "2022-12-01T00:42:16Z"
}
}
To show information about an organization's generic product, send a GET request to /api/v1/organizations/$ORGANIZATION_ID/products/generic
.
organization_id required | string <uuid> Example: 0df21c85-54f5-4ce9-be17-4a2fb63e958c A unique identifier for an organization. |
{- "product": {
- "id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "name": "Liability insurance",
- "slug": "liability-insurance",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "name": "Aansprakelijkheidsverzekering",
- "slug": "aansprakelijkheidsverzekering",
- "email": "user@example.com",
- "phone": "aansprakelijkheidsverzekering-opzeggen@allianz.nl",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2022-12-01T00:42:16Z",
- "updated_at": "2022-12-01T00:42:16Z"
}
}
To show information about an product, send a GET request to /api/v1/products/$PRODUCT_ID
.
product_id required | string Example: bfc501cf-dc45-40ca-aba3-b05018c8f8be A unique identifier for an organization's product. |
{- "product": {
- "id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "name": "Liability insurance",
- "slug": "liability-insurance",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "name": "Aansprakelijkheidsverzekering",
- "slug": "aansprakelijkheidsverzekering",
- "email": "user@example.com",
- "phone": "aansprakelijkheidsverzekering-opzeggen@allianz.nl",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2022-12-01T00:42:16Z",
- "updated_at": "2022-12-01T00:42:16Z"
}
}
To find Organizations or Products matching the search string, send a GET request to /api/v1/search
.
q | string The input that needs to be searched for |
record_type | string Example: record_type=product Used to filter results by their type. Possible options are 'organization' or 'product'. |
locale | string Example: locale=nl-NL Used to filter results by their locale. |
cursor | string The requested cursor token for paginated responses. |
limit | integer Default: 20 The requested amount of items for paginated responses. |
{- "results": [
- {
- "matched_text": "string",
- "record_type": "organization",
- "record": { }
}
]
}
To list all providers in your account, send a GET request to /api/v1/providers
.
The response body will be a JSON object with a key of providers
. This will be
set to an array containing objects each representing a provider.
object Used to order providers by | |
cursor | string The requested cursor token for paginated responses. |
limit | integer Default: 20 The requested amount of items for paginated responses. |
{- "providers": [
- {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "provider_type": "email",
- "type": "manual",
- "configuration": {
- "provider_type": "email",
- "subject": "Provider email subject"
}, - "locales": [
- {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "locale": "nl-NL",
- "configuration": {
- "provider_type": "email",
- "subject": "Provider email subject"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
], - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To show information about a provider, send a GET request to /api/v1/providers/$PROVIDER_ID
.
provider_id required | string <uuid> Example: 05926e22-152d-484e-b4b7-73928d829350 A unique identifier for a provider. |
{- "provider": {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "provider_type": "email",
- "type": "manual",
- "configuration": {
- "provider_type": "email",
- "subject": "Provider email subject"
}, - "locales": [
- {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "locale": "nl-NL",
- "configuration": {
- "provider_type": "email",
- "subject": "Provider email subject"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
], - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
To find Organizations or Products matching the search string, send a GET request to /api/v1/search
.
q | string The input that needs to be searched for |
record_type | string Example: record_type=product Used to filter results by their type. Possible options are 'organization' or 'product'. |
locale | string Example: locale=nl-NL Used to filter results by their locale. |
cursor | string The requested cursor token for paginated responses. |
limit | integer Default: 20 The requested amount of items for paginated responses. |
{- "results": [
- {
- "matched_text": "string",
- "record_type": "organization",
- "record": { }
}
]
}
GoCXL uses webhooks to notify your application when an event happens in your account. Webhooks are particularly useful for asynchronous events like when a letter gets sent to an organization, or when an organization receives a cancellation letter.
GoCXL signs the webhook events we send to your endpoints by including a signature in each event's Gocxl-Signature
header. This enables you to verify that the events were sent by GoCXL and not by any malicious actor. You can verify these signatures manually before you attempt to process the event.
Before you can verify signatures, you need to retrieve your webhook's secret from your account's webhooks settings. GoCXL generates a unique secret key for each endpoint. So if you use multiple endpoints, you must obtain a secret for each one you want to verify signatures of.
The Gocxl-Signature
header included in each webhook event contains a timestamp and one or more signatures. The timestamp is prefixed by t=
, and each signature is prefixed by a scheme. Schemes start with v
, followed by an integer. Currently, the only valid live signature scheme are v1
and v2
.
Gocxl-Signature: t=1638280062,v1=bb276e91ad7b038d19021bfd37dd052f9f7c919b2b58bd29abbb6d97c13f0e5c
To list all webhooks in your account, send a GET request to /api/v1/webhooks
.
The response body will be a JSON object with a key of webhooks
. This will be
set to an array containing objects each representing a webhook.
active | boolean Example: active=true Used to filter webhooks by its status. |
events[] | Array of strings Example: events[]=email.single.send Used to filter webhooks by specific events. |
locales[] | Array of strings Example: locales[]=nl-NL Used to filter webhooks by specific locales. |
object Used to order webhooks by | |
cursor | string The requested cursor token for paginated responses. |
limit | integer Default: 20 The requested amount of items for paginated responses. |
{- "webhooks": [
- {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "events": [
- "nl-NL"
], - "locales": [
- "nl-NL"
], - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To show information about a webhook, send a GET request to /api/v1/webhooks/$WEBHOOK_ID
.
webhook_id required | string <uuid> Example: 05926e22-152d-484e-b4b7-73928d829350 A unique identifier for a webhook. |
{- "webhook": {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "events": [
- "nl-NL"
], - "locales": [
- "nl-NL"
], - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
To list all webhook responses for a webhook in your account, send a GET request to /api/v1/webhooks/:webhook_id/responses
.
webhook_id required | string <uuid> Example: 05926e22-152d-484e-b4b7-73928d829350 A unique identifier for a webhook. |
object Used to order webhook_responses by | |
cursor | string The requested cursor token for paginated responses. |
limit | integer Default: 20 The requested amount of items for paginated responses. |
{- "webhook_responses": [
- {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "request_headers": { },
- "request_body": { },
- "status": 0,
- "duration": 0,
- "response_body": "string",
- "response_headers": { }
}
]
}
Create a new webhook response by submitting the parameters required to POST /api/v1/webhooks/:webhook_id/responses
.
webhook_id required | string <uuid> Example: 05926e22-152d-484e-b4b7-73928d829350 A unique identifier for a webhook. |
required | object The JSON payload that will be sent to the webhook and which will be used for signing the request |
{- "request_payload": {
- "property1": "string",
- "property2": "string"
}
}
{- "webhook": {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "request_headers": { },
- "request_body": { },
- "status": 0,
- "duration": 0,
- "response_body": "string",
- "response_headers": { }
}
}
Create a new webhook response by submitting the parameters required to POST /api/v1/webhooks/:webhook_id/responses/:webhook_response_id
.
webhook_id required | string <uuid> Example: 05926e22-152d-484e-b4b7-73928d829350 A unique identifier for a webhook. |
webhook_response_id required | string <uuid> Example: 05926e22-152d-484e-b4b7-73928d829350 A unique identifier for a webhook response. |
required | object The JSON payload that will be sent to the webhook and which will be used for signing the request |
{- "request_payload": {
- "property1": "string",
- "property2": "string"
}
}
{- "webhook": {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "request_headers": { },
- "request_body": { },
- "status": 0,
- "duration": 0,
- "response_body": "string",
- "response_headers": { }
}
}
To list all categories in your account, send a GET request to /api/v2/categories
.
The response body will be a JSON object with a key of categories
. This will be
set to an array containing objects each representing a category.
slug | string Example: slug=insurances Used to filter categories by a specific slug. |
locales[] | Array of strings Example: locales[]=nl-NL Used to filter categories by specific locales. |
object Used to order categories by | |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
object Used to filter by account metadata. Example: metadata[key[subkey]]=value |
{- "categories": [
- {
- "id": "dff66101-e1da-4e93-bad0-12908a8be91d",
- "name": "Insurances",
- "slug": "insurances",
- "locales": [
- {
- "locale": "nl-NL",
- "name": "Verzekeringen",
- "slug": "verzekeringen",
- "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": null,
- "label": null
}
]
}
]
}, - "requires_consent": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To list all organizations in your account, send a GET request to /api/v2/$CATEGORY_ID/organizations
.
The response body will be a JSON object with a key of organizations
. This will be
set to an array containing objects each representing a organization.
category_id required | string <uuid> Example: dff66101-e1da-4e93-bad0-12908a8be91d A unique identifier for a category. |
object Used to order organizations by | |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
object Used to filter by account metadata. Example: metadata[key[subkey]]=value |
{- "organizations": [
- {
- "id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "category_id": "dff66101-e1da-4e93-bad0-12908a8be91d",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "code": "nl-NL",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": null,
- "label": null
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To list all letters in your account, send a GET request to /api/v2/letters
.
The response body will be a JSON object with a key of letters
. This will be
set to an array containing objects each representing a letter.
object Used to order letters by | |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
object Used to filter by account metadata. Example: metadata[key[subkey]]=value |
{- "letters": [
- {
- "id": "87ed0487-7e18-4380-9028-3d7fd2c46433",
- "state": "drafting",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "organization_name": "Allianz Nederland",
- "product_id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "product_name": "Liability insurance",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "sandbox_mode": false,
- "sandbox_email": "johndoe@example.com",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "email": "user@example.com",
- "fax": "string",
- "proof_of_ids": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "metadata": { },
- "signature_type": "text",
- "signature_data": "John Doe",
- "consent": true,
- "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To list all letter events in your account, send a GET request to /api/v2/letters/$LETTER_ID/events
.
The response body will be a JSON object with a key of events
. This will be
set to an array containing objects each representing a letter event.
letter_id required | string <uuid> Example: 87ed0487-7e18-4380-9028-3d7fd2c46433 A unique identifier for a letter. |
object Used to order letter_events by | |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
{- "letter_events": [
- {
- "id": "459a5993-1560-44bd-b879-258075b77e13",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "dispatchable_id": "71375f07-f6c4-4bad-87a9-e2467af894e7",
- "dispatchable_type": "Letter",
- "event_type": "email.single.send",
- "locale": "nl-NL",
- "metadata": { },
- "received_at": "2020-12-01T00:42:16Z"
}
]
}
To list all organizations in your account, send a GET request to /api/v2/organizations
.
The response body will be a JSON object with a key of organizations
. This will be
set to an array containing objects each representing a organization.
slug | string Example: slug=allianz-nederland Used to filter organizations by a specific slug. |
category | string Example: category=insurances Used to filter organizations by a specific category. |
locales[] | Array of strings Example: locales[]=nl-NL Used to filter organizations by specific locales. |
url | string Example: url=allianz.nl Used to filter organizations by a (partial) URL. |
object Used to order organizations by | |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
object Used to filter by account metadata. Example: metadata[key[subkey]]=value |
{- "organizations": [
- {
- "id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "category_id": "dff66101-e1da-4e93-bad0-12908a8be91d",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "code": "nl-NL",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": null,
- "label": null
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To list all organizations/products in your account, send a POST request to /api/v2/cancellations_selection
.
account_ids required | Array of strings <uuid> Example: account_ids=0df21c85-54f5-4ce9-be17-4a2fb63e958c&account_ids=12321c85-54f5-4ce9-be17-4a2fb63e958c Filter organizations/products by account ids. |
organization_id | string <uuid> Example: organization_id=0df21c85-54f5-4ce9-be17-4a2fb63e958c If specified will return the products of this organization. |
category_ids | Array of strings <uuid> Example: category_ids=0df21c85-54f5-4ce9-be17-4a2fb63e958c&category_ids=12321c85-54f5-4ce9-be17-4a2fb63e958c Filter organizations/products by a specific categories. |
locale_codes | Array of strings Example: locale_codes=en-nl&locale_codes=es-es Filter organizations/products by locales. |
limit | integer [ 1 .. 50 ] Example: limit=10 Limit the number of organizations/products returned. |
date_from | string <date> Example: date_from=2020-01-01 Filter organizations/products by a specific date. |
date_to | string <date> Example: date_to=2020-01-01 Filter organizations/products by a specific date. |
predefined_period | string Example: predefined_period=today Filter organizations/products by a predefined period. Possible options are 'today', 'this_week' or 'this_month'. |
order_by | string Example: order_by=name Order organizations/products by a specific field. Possible options are 'most_cancelled' or 'recent'. |
{- "organizations": [
- {
- "id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "category_id": "dff66101-e1da-4e93-bad0-12908a8be91d",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "code": "nl-NL",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": null,
- "label": null
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To list all products for an organizations in your account, send a GET request to /api/v2/organizations/$ORGANIZATION_ID/products
.
The response body will be a JSON object with a key of products
. This will be
set to an array containing objects each representing a product.
organization_id required | string <uuid> Example: 0df21c85-54f5-4ce9-be17-4a2fb63e958c A unique identifier for an organization. |
slug | string Example: slug=liability-insurance Used to filter products by a specific slug. |
locales[] | Array of strings Example: locales[]=nl-NL Used to filter products by specific locales. |
url | string Example: url=allianz.nl Used to filter products by a (partial) URL. |
object Used to order products by | |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
object Used to filter by account metadata. Example: metadata[key[subkey]]=value |
{- "products": [
- {
- "id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "name": "Liability insurance",
- "slug": "liability-insurance",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "name": "Aansprakelijkheidsverzekering",
- "slug": "aansprakelijkheidsverzekering",
- "email": "user@example.com",
- "phone": "aansprakelijkheidsverzekering-opzeggen@allianz.nl",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": null,
- "label": null
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To find Organizations or Products matching the search string, send a GET request to /api/v2/search
.
q | string The input that needs to be searched for |
record_type | string Example: record_type=product Used to filter results by their type. Possible options are 'organization' or 'product'. |
locale | string Example: locale=nl-NL Used to filter results by their locale. |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
{- "results": [
- {
- "matched_text": "string",
- "record_type": "organization",
- "record": { }
}
]
}
To find Organizations or Products matching the search string, send a GET request to /api/v2/search
.
q | string The input that needs to be searched for |
record_type | string Example: record_type=product Used to filter results by their type. Possible options are 'organization' or 'product'. |
locale | string Example: locale=nl-NL Used to filter results by their locale. |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
{- "results": [
- {
- "matched_text": "string",
- "record_type": "organization",
- "record": { }
}
]
}
To list all providers in your account, send a GET request to /api/v2/providers
.
The response body will be a JSON object with a key of providers
. This will be
set to an array containing objects each representing a provider.
object Used to order providers by | |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
{- "providers": [
- {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "provider_type": "email",
- "type": "manual",
- "configuration": {
- "provider_type": "email",
- "subject": "Provider email subject"
}, - "locales": [
- {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "locale": "nl-NL",
- "configuration": {
- "provider_type": "email",
- "subject": "Provider email subject"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
], - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To find Organizations or Products matching the search string, send a GET request to /api/v2/search
.
q | string The input that needs to be searched for |
record_type | string Example: record_type=product Used to filter results by their type. Possible options are 'organization' or 'product'. |
locale | string Example: locale=nl-NL Used to filter results by their locale. |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
{- "results": [
- {
- "matched_text": "string",
- "record_type": "organization",
- "record": { }
}
]
}
To list all webhooks in your account, send a GET request to /api/v2/webhooks
.
The response body will be a JSON object with a key of webhooks
. This will be
set to an array containing objects each representing a webhook.
active | boolean Example: active=true Used to filter webhooks by its status. |
events[] | Array of strings Example: events[]=email.single.send Used to filter webhooks by specific events. |
locales[] | Array of strings Example: locales[]=nl-NL Used to filter webhooks by specific locales. |
object Used to order webhooks by | |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
{- "webhooks": [
- {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "events": [
- "nl-NL"
], - "locales": [
- "nl-NL"
], - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To list all webhook responses for a webhook in your account, send a GET request to /api/v2/webhooks/:webhook_id/responses
.
webhook_id required | string <uuid> Example: 05926e22-152d-484e-b4b7-73928d829350 A unique identifier for a webhook. |
object Used to order webhook_responses by | |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
{- "webhook_responses": [
- {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "request_headers": { },
- "request_body": { },
- "status": 0,
- "duration": 0,
- "response_body": "string",
- "response_headers": { }
}
]
}
Create a new letter by submitting the parameters required by the template to POST /api/widget/$WIDGET_TOKEN/letters
.
widget_token required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 The requested token for Widget authorization access. |
Origin required | string <<scheme>://<hostname>(:<port>)> Example: http://example.com Indicates the origin (schema, hostname, and port) that caused the request |
organization_id required | string <uuid> A string specifying the UUID of the organization the letter is intended for. |
product_id | string <uuid> An optional string specifying the UUID of the product the letter is intended for. |
provider_id | string <uuid> A string specifying the UUID of the provider to use when sending the letter. |
locale required | string The locale of the letter. |
signature_type | string The type of signature (could be text or image) |
signature_data | string The data for the signature. Will be the name for signature_type text and the base64 encode string for signature_type image |
required | object The parameters to use when generating the letter as described by the fields of the organization's or product's letter template. |
consent | boolean or null A boolean indicating if the user gave explicit consent to create the letter request. Only required when either the organization or products requires so. |
proof_of_ids | Array of strings An array of ID documents as base64 encoded blobs. |
metadata | object An optional set of key-value pairs that are attached for your account. Please note that:
|
{- "organization_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "product_id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "signature_type": "text",
- "signature_data": "John Doe",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "consent": true,
- "proof_of_ids": [
- "data:image/png;base64,[insert-encoded-blob]"
], - "metadata": { }
}
{- "letter": {
- "id": "87ed0487-7e18-4380-9028-3d7fd2c46433",
- "state": "drafting",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "organization_name": "Allianz Nederland",
- "product_id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "product_name": "Liability insurance",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "sandbox_mode": false,
- "sandbox_email": "johndoe@example.com",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "email": "user@example.com",
- "fax": "string",
- "proof_of_ids": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "metadata": { },
- "signature_type": "text",
- "signature_data": "John Doe",
- "consent": true,
- "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z",
- "payment_url": "string"
}
}
To show information about a letter, send a GET request to /api/widget/$WIDGET_TOKEN/letters/$LETTER_ID
.
letter_id required | string <uuid> Example: 87ed0487-7e18-4380-9028-3d7fd2c46433 A unique identifier for a letter. |
widget_token required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 The requested token for Widget authorization access. |
{- "letter": {
- "id": "87ed0487-7e18-4380-9028-3d7fd2c46433",
- "state": "drafting",
- "account_id": "acf19357-d974-4843-9525-e98426ad5346",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "organization_name": "Allianz Nederland",
- "product_id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "product_name": "Liability insurance",
- "provider_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "sandbox_mode": false,
- "sandbox_email": "johndoe@example.com",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "email": "user@example.com",
- "fax": "string",
- "proof_of_ids": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "metadata": { },
- "signature_type": "text",
- "signature_data": "John Doe",
- "consent": true,
- "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
To download the generated document for a letter, send a GET request to /api/widget/$WIDGET_TOKEN/letters/$LETTER_ID/document
.
The response body will be a binary stream containing the document.
letter_id required | string <uuid> Example: 87ed0487-7e18-4380-9028-3d7fd2c46433 A unique identifier for a letter. |
widget_token required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 The requested token for Widget authorization access. |
{- "error": {
- "code": ":unauthorized",
- "title": "Unauthorized",
- "message": "Unable to authenticate you."
}
}
To generate a document from a letter payload and download it, send a POST request with payload to /api/widget/$WIDGET_TOKEN/generate_pdf
.
The response body will be a binary stream containing the document.
widget_token required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 The requested token for Widget authorization access. |
object |
{- "letter": {
- "organization_id": "20ab8e7e-8d51-4144-b92a-03af909a6895",
- "locale": "nl-NL",
- "parameters": {
- "property1": "string",
- "property2": "string"
}, - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "signature_type": "text",
- "signature_data": "John Doe",
- "proof_of_ids": [
- "data:image/png;base64,[insert-encoded-blob]"
]
}
}
{- "error": {
- "code": ":unauthorized",
- "title": "Unauthorized",
- "message": "Unable to authenticate you."
}
}
To list all organizations in your account, send a GET request to /api/widget/$WIDGET_TOKEN/organizations
.
The response body will be a JSON object with a key of organizations
. This will be
set to an array containing objects each representing a organization.
widget_token required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 The requested token for Widget authorization access. |
slug | string Example: slug=allianz-nederland Used to filter organizations by a specific slug. |
category | string Example: category=insurances Used to filter organizations by a specific category. |
locales[] | Array of strings Example: locales[]=nl-NL Used to filter organizations by specific locales. |
url | string Example: url=allianz.nl Used to filter organizations by a (partial) URL. |
object Used to order organizations by | |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
object Used to filter by account metadata. Example: metadata[key[subkey]]=value |
{- "organizations": [
- {
- "id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "category_id": "dff66101-e1da-4e93-bad0-12908a8be91d",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "code": "nl-NL",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": null,
- "label": null
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To show information about an organization, send a GET request to /api/widget/$WIDGET_TOKEN/organizations/$ORGANIZATION_ID
.
organization_id required | string <uuid> Example: 0df21c85-54f5-4ce9-be17-4a2fb63e958c A unique identifier for an organization. |
widget_token required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 The requested token for Widget authorization access. |
{- "organization": {
- "id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "category_id": "dff66101-e1da-4e93-bad0-12908a8be91d",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "code": "nl-NL",
- "name": "Allianz Nederland",
- "slug": "allianz-nederland",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
To list all products for an organizations in your account, send a GET request to /api/widget/$WIDGET_TOKEN/organizations/$ORGANIZATION_ID/products
.
The response body will be a JSON object with a key of products
. This will be
set to an array containing objects each representing a product.
organization_id required | string <uuid> Example: 0df21c85-54f5-4ce9-be17-4a2fb63e958c A unique identifier for an organization. |
widget_token required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 The requested token for Widget authorization access. |
slug | string Example: slug=liability-insurance Used to filter products by a specific slug. |
locales[] | Array of strings Example: locales[]=nl-NL Used to filter products by specific locales. |
url | string Example: url=allianz.nl Used to filter products by a (partial) URL. |
object Used to order products by | |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
object Used to filter by account metadata. Example: metadata[key[subkey]]=value |
{- "products": [
- {
- "id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "name": "Liability insurance",
- "slug": "liability-insurance",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "name": "Aansprakelijkheidsverzekering",
- "slug": "aansprakelijkheidsverzekering",
- "email": "user@example.com",
- "phone": "aansprakelijkheidsverzekering-opzeggen@allianz.nl",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": null,
- "label": null
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
]
}
To find Organizations or Products matching the search string, send a GET request to /api/widget/$WIDGET_TOKEN/search
.
widget_token required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 The requested token for Widget authorization access. |
q | string The input that needs to be searched for |
record_type | string Example: record_type=product Used to filter results by their type. Possible options are 'organization' or 'product'. |
locale required | string Example: locale=nl-NL Used to filter results by their locale. |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
{- "results": [
- {
- "matched_text": "string",
- "record_type": "organization",
- "record": { }
}
]
}
To show information about an organization's generic product, send a GET request to /api/widget/$WIDGET_TOKEN/organizations/$ORGANIZATION_ID/products/generic
.
organization_id required | string <uuid> Example: 0df21c85-54f5-4ce9-be17-4a2fb63e958c A unique identifier for an organization. |
widget_token required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 The requested token for Widget authorization access. |
{- "product": {
- "id": "bfc501cf-dc45-40ca-aba3-b05018c8f8be",
- "organization_id": "0df21c85-54f5-4ce9-be17-4a2fb63e958c",
- "name": "Liability insurance",
- "slug": "liability-insurance",
- "email": "user@example.com",
- "phone": "string",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "locales": [
- {
- "locale": "nl-NL",
- "name": "Aansprakelijkheidsverzekering",
- "slug": "aansprakelijkheidsverzekering",
- "email": "user@example.com",
- "phone": "aansprakelijkheidsverzekering-opzeggen@allianz.nl",
- "fax": "string",
- "address": {
- "name": "string",
- "for_attention_of": "string",
- "address_line1": "string",
- "address_line2": "string",
- "postal_code": "string",
- "dependent_locality": "string",
- "locality": "string",
- "administrative_area": "string",
- "country": "string"
}, - "providers": [
- {
- "id": "4f8cb0f3-139a-4776-9878-051affed7134",
- "name": "Manual email provider",
- "type": "email",
- "method": "manual"
}
], - "letter_template": {
- "template": "string",
- "fields": [
- {
- "key": "string",
- "type": "string",
- "default": "string",
- "label": "string",
- "required": true,
- "position": 0,
- "options": [
- {
- "value": "string",
- "label": "string"
}
]
}
]
}, - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "requires_consent": true,
- "requires_proof_of_id": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
To find Organizations or Products matching the search string, send a GET request to /api/widget/$WIDGET_TOKEN/search
.
widget_token required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 The requested token for Widget authorization access. |
q | string The input that needs to be searched for |
record_type | string Example: record_type=product Used to filter results by their type. Possible options are 'organization' or 'product'. |
locale required | string Example: locale=nl-NL Used to filter results by their locale. |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
{- "results": [
- {
- "matched_text": "string",
- "record_type": "organization",
- "record": { }
}
]
}
To show information about a widget setting, send a GET request to /api/widget/$WIDGET_TOKEN/settings
.
widget_token required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 The requested token for Widget authorization access. |
{- "widget_setting": {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "color": "blue",
- "company_logo_url": "string",
- "font_url": "string",
- "payment_url": "string",
- "subtitle": "Version A",
- "title": "The Real Widget",
- "widget_domain": "string",
- "prices": [
- {
- "id": "05926e22-152d-484e-b4b7-73928d829350",
- "provider_id": "05926e22-152d-484e-b4b7-73928d829350",
- "title": "The premium provider",
- "currency": "$",
- "currency_iso_code": "EUR",
- "price": "13.00",
- "description": "Description",
- "payment_description": "Description",
- "locale": "nl-NL",
- "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
], - "created_at": "2020-12-01T00:42:16Z",
- "updated_at": "2020-12-01T00:42:16Z"
}
}
To find Organizations or Products matching the search string, send a GET request to /api/widget/$WIDGET_TOKEN/search
.
widget_token required | string <uuid> Example: 459a5993-1560-44bd-b879-258075b77e13 The requested token for Widget authorization access. |
q | string The input that needs to be searched for |
record_type | string Example: record_type=product Used to filter results by their type. Possible options are 'organization' or 'product'. |
locale required | string Example: locale=nl-NL Used to filter results by their locale. |
page | integer Default: 1 The page number that you want to request. |
per_page | integer Default: 20 The requested amount of items for paginated responses. |
{- "results": [
- {
- "matched_text": "string",
- "record_type": "organization",
- "record": { }
}
]
}