Skip to content

Customer Created

This event is triggered when a new customer is created on WillSuite.

Input


Endpoint

Post your_endpoint


Payload

webhook_type  string

This is set to customer.created

customer_data  object

This is the newly created customers data

case_data  object

This is the case data related to the customer


Response

WARNING

A response of 202 status code is expected

INFO

202 status code indicates the request has been accepted for processing, but the processing has not been finished yet.

Payload

json
{
  "case_data": {
    "id": "12345678-abcd-efgh-ijkl-1234567890ab",
    "ref": "02052024 - EXAMPLE",
    "meta": {
      "abcdef12-3456-7890-abcd-ef1234567890": "example@example.com",
      "12345678-90ab-cdef-1234-567890abcdef": "2024-05-21"
    },
    "email": "",
    "notes": null,
    "postcode": "",
    "full_names": "Mr Alex Brown & Mr Jamie Smith",
    "last_names": "Brown & Smith",
    "first_names": "Alex & Jamie"
  },
  "webhook_type": "customer.created",
  "customer_data": {
    "id": "abcd1234-5678-90ef-abcd-1234567890ef",
    "email": null,
    "tel_1": null,
    "tel_2": null,
    "title": "Mr",
    "gender": null,
    "postcode": null,
    "address_1": null,
    "address_2": null,
    "address_3": null,
    "last_name": "Johnson",
    "occupation": null,
    "first_names": "Chris",
    "middle_names": null,
    "date_of_birth": null,
    "marital_status": null,
    "customer_case_id": "12345678-abcd-efgh-ijkl-1234567890ab"
  }
}
json
{
  "type": "object",
  "properties": {
    "case_data": {
      "type": "object",
      "properties": {
        "id": { "type": "string" },
        "ref": { "type": "string" },
        "meta": {
          "type": "object",
          "additionalProperties": { "type": "string" }
        },
        "email": { "type": "string" },
        "notes": { "type": ["string", "null"] },
        "postcode": { "type": "string" },
        "full_names": { "type": "string" },
        "last_names": { "type": "string" },
        "first_names": { "type": "string" }
      },
      "required": ["id", "ref", "meta", "email", "notes", "postcode", "full_names", "last_names", "first_names"]
    },
    "webhook_type": { "type": "string" },
    "customer_data": {
      "type": "object",
      "properties": {
        "id": { "type": "string" },
        "email": { "type": ["string", "null"] },
        "tel_1": { "type": ["string", "null"] },
        "tel_2": { "type": ["string", "null"] },
        "title": { "type": "string" },
        "gender": { "type": ["string", "null"] },
        "postcode": { "type": ["string", "null"] },
        "address_1": { "type": ["string", "null"] },
        "address_2": { "type": ["string", "null"] },
        "address_3": { "type": ["string", "null"] },
        "last_name": { "type": "string" },
        "occupation": { "type": ["string", "null"] },
        "first_names": { "type": "string" },
        "middle_names": { "type": ["string", "null"] },
        "date_of_birth": { "type": ["string", "null"] },
        "marital_status": { "type": ["string", "null"] },
        "customer_case_id": { "type": "string" }
      },
      "required": ["id", "email", "tel_1", "tel_2", "title", "gender", "postcode", "address_1", "address_2", "address_3", "last_name", "occupation", "first_names", "middle_names", "date_of_birth", "marital_status", "customer_case_id"]
    }
  },
  "required": ["case_data", "webhook_type", "customer_data"]
}