igloo
Docs / igloohome / Articles on Webhook / Job Specific Data

Job-Specific Webhook Data

This document provides detailed information about the structure and meaning of webhook payloads sent in response to various job requests. Each payload includes metadata about the event and the product involved, along with job-specific data such as status codes, battery levels, or device states.

Overview

Webhooks are used to notify your system of the outcome of asynchronous jobs initiated via API. Each webhook payload contains an event object that describes the job result and a product object identifying the device associated with the job.

All timestamps are in ISO 8601 format (e.g., 2023-04-05T12:34:56Z), and proxyTransportMethod is consistently set to 2, indicating the transport mechanism used for communication.

Common Job Status Codes

The following status codes are shared across all job types unless otherwise specified:

Job Status Number Mapping
Success 0
Generic failure 1
Another operation is in progress 2

Lock Device

Description

This job locks the device. The webhook payload indicates whether the operation was successful.

Expected Payload

{
  "event": {
    "id": "string",
    "type": 3,
    "data": {
      "jobId": "string",
      "jobStatus": 0
    },
    "date": "ISO_DATE",
    "proxyTransportMethod": 2,
    "accessoryId": "string"
  },
  "product": {
    "id": "string",
    "type": 1
  }
}

Unlock Device

Description

This job unlocks the device. The webhook payload reflects the result of the unlock operation.

Expected Payload

{
  "event": {
    "id": "string",
    "type": 3,
    "data": {
      "jobId": "string",
      "jobStatus": 0
    },
    "date": "ISO_DATE",
    "proxyTransportMethod": 2,
    "accessoryId": "string"
  },
  "product": {
    "id": "string",
    "type": 1
  }
}

Create Custom PIN

Description

This job creates a custom PIN on the device. The webhook payload provides feedback on the creation attempt.

Expected Payload

{
  "event": {
    "id": "string",
    "type": 3,
    "data": {
      "jobId": "string",
      "jobStatus": 0
    },
    "date": "ISO_DATE",
    "proxyTransportMethod": 2,
    "accessoryId": "string"
  },
  "product": {
    "id": "string",
    "type": 1
  }
}

Status Codes

Job Status Number Mapping
Invalid Custom PIN length 5
Duplicate PIN 9
Insufficient PIN Storage 12

Delete PIN

Description

This job deletes a PIN from the device. The webhook payload indicates whether the deletion was successful or if the PIN was not found.

Expected Payload

{
  "event": {
    "id": "string",
    "type": 3,
    "data": {
      "jobId": "string",
      "jobStatus": 0
    },
    "date": "ISO_DATE",
    "proxyTransportMethod": 2,
    "accessoryId": "string"
  },
  "product": {
    "id": "string",
    "type": 1
  }
}

Status Codes

Job Status Number Mapping
PIN not found 3

Get Battery Level

Description

This job retrieves the current battery level of the device. The webhook payload includes both the job status and the battery level as a percentage.

Expected Payload

{
  "event": {
    "id": "string",
    "type": 3,
    "data": {
      "jobId": "string",
      "jobStatus": 0,
      "batteryLevel": 75
    },
    "date": "ISO_DATE",
    "proxyTransportMethod": 2,
    "accessoryId": "string"
  },
  "product": {
    "id": "string",
    "type": 1
  }
}

Job Data

Device Battery Level Range Description
0 - 100 Represents battery level as a percentage

Get Device Status

Description

This job retrieves the current status of the device, including whether the lock and door are open. The webhook payload includes the job status and the device state.

Expected Payload

{
  "event": {
    "id": "string",
    "type": 3,
    "data": {
      "jobId": "string",
      "jobStatus": 0,
      "lockOpen": false,
      "doorOpen": true
    },
    "date": "ISO_DATE",
    "proxyTransportMethod": 2,
    "accessoryId": "string"
  },
  "product": {
    "id": "string",
    "type": 1
  }
}

Lock and Door States

Lock Open Boolean Mapping
Locking Mechanism Not Open false
Locking Mechanism Open true
Door Open Boolean Mapping
Door Closed false
Door Open true