Marital status

Marital status webhooks

This page documents webhook events related to marital status from the Inventory API (marital-status resource).


Inventory API – marital-status resource

Emitted when a marital status is created (POST /marital-status), updated (PUT /marital-status/:maritalstatusId), or deleted (DELETE /marital-status/:maritalstatusId).

Events (Inventory API)

Action Event name Endpoint
Create a marital status maritalstatus.created POST /marital-status
Update a marital status maritalstatus.updated PUT /marital-status/:maritalstatusId
Delete a marital status maritalstatus.deleted DELETE /marital-status/:maritalstatusId

Payload example – created (Inventory API)

The data object for maritalstatus.created is the full created marital status (same shape as the API response maritalstatus).

{
  "attemptId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created": 1623794000,
  "data": {
    "_id": "60c92280d9e6c43f77b5a583",
    "accountId": "5f243d100617680712e78dd7",
    "name": "Single",
    "ord": 100,
    "lexiconKeys": {
      "name": {
        "key": "maritalstatus-name-5f243d100617680712e78dd7-fce3e1bc-983b-4b3a-a5e7-b03c0f3b63e8",
        "values": { "en-us": "Single" }
      }
    },
    "createdBy": "5f243d100617680712e78dd7",
    "updatedBy": "5f243d100617680712e78dd7",
    "createdAt": { "offset": 0, "value": "2021-06-15T12:00:00.000Z" },
    "updatedAt": { "offset": 0, "value": "2021-06-15T12:00:00.000Z" }
  },
  "event": "maritalstatus.created",
  "id": "uuid",
  "livemode": true
}

Payload example – updated (Inventory API)

The data object for maritalstatus.updated is the full updated marital status (same shape as the API response maritalstatus).

{
  "attemptId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created": 1623794000,
  "data": {
    "_id": "60c92280d9e6c43f77b5a583",
    "accountId": "5f243d100617680712e78dd7",
    "name": "Single",
    "ord": 100,
    "lexiconKeys": {
      "name": {
        "key": "maritalstatus-name-5f243d100617680712e78dd7-fce3e1bc-983b-4b3a-a5e7-b03c0f3b63e8",
        "values": { "en-us": "Single" }
      }
    },
    "createdBy": "5f243d100617680712e78dd7",
    "updatedBy": "5f243d100617680712e78dd7",
    "createdAt": { "offset": 0, "value": "2021-06-15T12:00:00.000Z" },
    "updatedAt": { "offset": 0, "value": "2021-06-15T12:30:00.000Z" }
  },
  "event": "maritalstatus.updated",
  "id": "uuid",
  "livemode": true
}

Payload example – deleted (Inventory API)

The data object for maritalstatus.deleted contains only the id of the deleted marital status.

{
  "attemptId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created": 1623794000,
  "data": {
    "maritalstatusId": "60c92280d9e6c43f77b5a583"
  },
  "event": "maritalstatus.deleted",
  "id": "uuid",
  "livemode": true
}

Field descriptions – data (created / updated)

data matches the Inventory API MaritalStatus schema. Main fields:

Field Type Description
_id string Marital status id (24 hex characters).
accountId string The account id of this resource.
name string The default name of the marital status.
ord number Display order.
lexiconKeys object Lexicon keys for the name property (key and values per language).
createdBy string The user that created this resource.
updatedBy string The last user that updated this resource.
createdAt object The date the object was created (BzDate: offset, value).
updatedAt object The date the object was last updated (BzDate: offset, value).

Field descriptions – data (deleted)

Field Type Description
maritalstatusId string Id of the deleted marital status (24 hex characters).