Yardman Help

Always up-to-date User's Manual and Documentaion for Developers

Yardman Logo

Event Types & Payloads

Each event has a similar JSON schema, but a unique payload object that is determined by its event type.

  1. Booking created event
  2. Booking updated event
  3. Booking deleted event
  4. Person created event
  5. Person updated event
  6. Person deleted event
  7. Vehicle created event
  8. Vehicle updated event
  9. Vehicle deleted event
  10. Visit created event
  11. Visit updated event
  12. Visit deleted event

Booking created event

Triggered when a Booking is created.

Webhook event name

booking_created

Webhook payload sample

POST /payloads HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Yardman-Hookshot/1.17.1
Content-Type: application/json
X-Yardman-Event: booking_created
X-Yardman-Delivery: e310c6c9-dac1-471e-a628-0b3c78d9b6aa
X-Yardman-Signature: sha1=4e696a7fb6f5ddc7f67274c5f350dc8fef5ba4fb
Connection: close
Host: 880af687.ngrok.io
Content-Length: 744
X-Forwarded-Proto: https
X-Forwarded-For: 2a01:4f8:13b:2d45::2

{
    "booking": {
        "id": 805,
        "confirmation_code": "KGK2E2",
        "check_in_at": "2018-11-30T15:50:00.000+01:00",
        "active": true,
        "notes": "",
        "yard": {
            "id": 25,
            "name": "Hane Court",
            "location": {
                "id": 19,
                "name": "Emmerichfort"
            }
        },
        "bookable": {
            "type": "person",
            "person": {
                "id": 62,
                "first_name": "Michelle",
                "last_name": "Sauer",
                "driving_license_number": null,
                "mobile_phone": null,
                "email": null,
                "notes": null,
                "status": "unknown"
            }
        },
        "movement_plan": {
            "id": 36,
            "name": "Others 2h",
            "properties": null,
            "yard": {
                "id": 25,
                "name": "Hane Court"
            },
            "checkpoints": [
                {
                    "id": 105,
                    "estimated_arrival_in": 900,
                    "estimated_departure_in": 300,
                    "area": {
                        "id": 55,
                        "name": "Entry Gate"
                    }
                },
                {
                    "id": 106,
                    "estimated_arrival_in": 7200,
                    "estimated_departure_in": 300,
                    "area": {
                        "id": 58,
                        "name": "Exit Gate"
                    }
                }
            ]
        }
    },
    "event_name": "booking_created"
}

Booking updated event

Triggered when a Booking is updated.

Webhook event name

booking_updated

Webhook payload sample

POST /payloads HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Yardman-Hookshot/1.17.1
Content-Type: application/json
X-Yardman-Event: booking_updated
X-Yardman-Delivery: dec3d6f8-891f-4c32-8f3e-07b786805237
X-Yardman-Signature: sha1=c07e2a14e82b5193beb379cde8b19ee00a30527d
Connection: close
Host: 880af687.ngrok.io
Content-Length: 744
X-Forwarded-Proto: https
X-Forwarded-For: 2a01:4f8:13b:2d45::2

{
    "booking": {
        "id": 805,
        "confirmation_code": "KGK2E2",
        "check_in_at": "2018-11-30T15:55:00.000+01:00",
        "active": true,
        "notes": "",
        "yard": {
            "id": 25,
            "name": "Hane Court",
            "location": {
                "id": 19,
                "name": "Emmerichfort"
            }
        },
        "bookable": {
            "type": "person",
            "person": {
                "id": 62,
                "first_name": "Michelle",
                "last_name": "Sauer",
                "driving_license_number": null,
                "mobile_phone": null,
                "email": null,
                "notes": null,
                "status": "unknown"
            }
        },
        "movement_plan": {
            "id": 36,
            "name": "Others 2h",
            "properties": null,
            "yard": {
                "id": 25,
                "name": "Hane Court"
            },
            "checkpoints": [
                {
                    "id": 105,
                    "estimated_arrival_in": 900,
                    "estimated_departure_in": 300,
                    "area": {
                        "id": 55,
                        "name": "Entry Gate"
                    }
                },
                {
                    "id": 106,
                    "estimated_arrival_in": 7200,
                    "estimated_departure_in": 300,
                    "area": {
                        "id": 58,
                        "name": "Exit Gate"
                    }
                }
            ]
        }
    },
    "event_name": "booking_updated"
}

Booking deleted event

Triggered when a Booking is deleted.

Webhook event name

booking_deleted

Webhook payload sample

POST /payloads HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Yardman-Hookshot/1.17.1
Content-Type: application/json
X-Yardman-Event: booking_deleted
X-Yardman-Delivery: abc983fe-b26c-469a-bb6c-f6a102e2529d
X-Yardman-Signature: sha1=d4175c8311c7e7b33c228c169951c00864cd9c66
Connection: close
Host: 880af687.ngrok.io
Content-Length: 744
X-Forwarded-Proto: https
X-Forwarded-For: 2a01:4f8:13b:2d45::2

{
    "booking": {
        "id": 805,
        "confirmation_code": "KGK2E2",
        "check_in_at": "2018-11-30T15:55:00.000+01:00",
        "active": true,
        "notes": "",
        "yard": {
            "id": 25,
            "name": "Hane Court",
            "location": {
                "id": 19,
                "name": "Emmerichfort"
            }
        },
        "bookable": {
            "type": "person",
            "person": {
                "id": 62,
                "first_name": "Michelle",
                "last_name": "Sauer",
                "driving_license_number": null,
                "mobile_phone": null,
                "email": null,
                "notes": null,
                "status": "unknown"
            }
        },
        "movement_plan": {
            "id": 36,
            "name": "Others 2h",
            "properties": null,
            "yard": {
                "id": 25,
                "name": "Hane Court"
            },
            "checkpoints": [
                {
                    "id": 105,
                    "estimated_arrival_in": 900,
                    "estimated_departure_in": 300,
                    "area": {
                        "id": 55,
                        "name": "Entry Gate"
                    }
                },
                {
                    "id": 106,
                    "estimated_arrival_in": 7200,
                    "estimated_departure_in": 300,
                    "area": {
                        "id": 58,
                        "name": "Exit Gate"
                    }
                }
            ]
        }
    },
    "event_name": "booking_deleted"
}

Person created event

Triggered when a Person is created.

Webhook event name

person_created

Webhook payload sample

POST /payloads HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Yardman-Hookshot/1.17.1
Content-Type: application/json
X-Yardman-Event: person_created
X-Yardman-Delivery: 0900641c-646a-433d-854b-e3133fffdb1c
X-Yardman-Signature: sha1=a8f74ca6ae2d77c5a15c387c242c1c5d05d2f487
Connection: close
Host: 880af687.ngrok.io
Content-Length: 229
X-Forwarded-Proto: https
X-Forwarded-For: 2a01:4f8:13b:2d45::2

{
    "person": {
        "id": 377,
        "first_name": "John",
        "last_name": "Doe",
        "driving_license_number": "NFHAS13642",
        "mobile_phone": "+4724672948",
        "email": "john.doe@yardman.io",
        "notes": "Fedex courier",
        "status": "unknown"
    },
    "event_name": "person_created"
}

Person updated event

Triggered when a Person is updated.

Webhook event name

person_updated

Webhook payload sample

POST /payloads HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Yardman-Hookshot/1.17.1
Content-Type: application/json
X-Yardman-Event: person_updated
X-Yardman-Delivery: ab347d4d-05e6-4ff3-b20a-c2dc55424e20
X-Yardman-Signature: sha1=d43dc5a6ecd71c7cc114fe902564afd4da09d956
Connection: close
Host: 880af687.ngrok.io
Content-Length: 227
X-Forwarded-Proto: https
X-Forwarded-For: 2a01:4f8:13b:2d45::2

{
    "person": {
        "id": 377,
        "first_name": "John",
        "last_name": "Doe",
        "driving_license_number": "NFHAS13642",
        "mobile_phone": "+4724672948",
        "email": "john.doe@yardman.io",
        "notes": "GLS courier",
        "status": "unknown"
    },
    "event_name": "person_updated"
}

Person deleted event

Triggered when a Person is deleted.

Webhook event name

person_deleted

Webhook payload sample

POST /payloads HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Yardman-Hookshot/1.17.1
Content-Type: application/json
X-Yardman-Event: person_deleted
X-Yardman-Delivery: acb9ce3b-2b16-4468-befb-b0173e39e8fd
X-Yardman-Signature: sha1=ac502bbc46977960b9a77789d56a49b2b30193ca
Connection: close
Host: 880af687.ngrok.io
Content-Length: 227
X-Forwarded-Proto: https
X-Forwarded-For: 2a01:4f8:13b:2d45::2

{
    "person": {
        "id": 377,
        "first_name": "John",
        "last_name": "Doe",
        "driving_license_number": "NFHAS13642",
        "mobile_phone": "+4724672948",
        "email": "john.doe@yardman.io",
        "notes": "GLS courier",
        "status": "unknown"
    },
    "event_name": "person_deleted"
}

Vehicle created event

Triggered when a Vehicle is created.

Webhook event name

vehicle_created

Webhook payload sample

POST /payloads HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Yardman-Hookshot/1.17.1
Content-Type: application/json
X-Yardman-Event: vehicle_created
X-Yardman-Delivery: 23e8e651-0704-4080-97f6-af846d95083e
X-Yardman-Signature: sha1=d643fe6c06802e11b26b9a4bfa682aa9a4888d48
Connection: close
Host: 880af687.ngrok.io
Content-Length: 235
X-Forwarded-Proto: https
X-Forwarded-For: 2a01:4f8:13b:2d45::2

{
    "vehicle": {
        "id": 656,
        "brand": "Opel",
        "model": "Movano",
        "registration_number": "WW723IK",
        "status": "unknown",
        "properties": {
            "vin": "VANSRASD1241F74HFASFV"
        },
        "vehicle_type": {
            "id": 25,
            "name": "Personal"
        }
    },
    "event_name": "vehicle_created"
}

Vehicle updated event

Triggered when a Vehicle is updated.

Webhook event name

vehicle_updated

Webhook payload sample

POST /payloads HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Yardman-Hookshot/1.17.1
Content-Type: application/json
X-Yardman-Event: vehicle_updated
X-Yardman-Delivery: 97e4eb00-24b1-47d2-a1d9-7ac461ebbc0f
X-Yardman-Signature: sha1=92244151f503837c8e45fdfbb392640d6ea6175e
Connection: close
Host: 880af687.ngrok.io
Content-Length: 235
X-Forwarded-Proto: https
X-Forwarded-For: 2a01:4f8:13b:2d45::2

{
    "vehicle": {
        "id": 656,
        "brand": "Opel",
        "model": "Movano",
        "registration_number": "WW723IK",
        "status": "unknown",
        "properties": {
            "vin": "VAIIRASD1241F74HFASFV"
        },
        "vehicle_type": {
            "id": 25,
            "name": "Personal"
        }
    },
    "event_name": "vehicle_updated"
}

Vehicle deleted event

Triggered when a Vehicle is deleted.

Webhook event name

vehicle_deleted

Webhook payload sample

POST /payloads HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Yardman-Hookshot/1.17.1
Content-Type: application/json
X-Yardman-Event: vehicle_deleted
X-Yardman-Delivery: eb5e5e74-8ea6-48d4-a604-bcb003e02355
X-Yardman-Signature: sha1=41ae0e93d4f80f595d12af6e303e5567069feab9
Connection: close
Host: 880af687.ngrok.io
Content-Length: 235
X-Forwarded-Proto: https
X-Forwarded-For: 2a01:4f8:13b:2d45::2

{
    "vehicle": {
        "id": 656,
        "brand": "Opel",
        "model": "Movano",
        "registration_number": "WW723IK",
        "status": "unknown",
        "properties": {
            "vin": "VAIIRASD1241F74HFASFV"
        },
        "vehicle_type": {
            "id": 25,
            "name": "Personal"
        }
    },
    "event_name": "vehicle_deleted"
}

Visit created event

Triggered when a Visit is created.

Webhook event name

visit_created

Webhook payload sample

POST /payloads HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Yardman-Hookshot/1.17.1
Content-Type: application/json
X-Yardman-Event: visit_created
X-Yardman-Delivery: d24c0f1a-a8d1-445f-9988-95263e0b0945
X-Yardman-Signature: sha1=ca72a7c843abb1239159968c45acc266ed38e752
Connection: close
Host: 880af687.ngrok.io
Content-Length: 1050
X-Forwarded-Proto: https
X-Forwarded-For: 2a01:4f8:13b:2d45::2

{
    "visit": {
        "id": 401,
        "created_at": "2018-12-01T06:23:18.391+01:00",
        "updated_at": "2018-12-01T06:23:18.391+01:00",
        "notes": null,
        "status": "planned",
        "person_called": false,
        "properties": null,
        "booking": {
            "id": 807,
            "check_in_at": "2018-12-29T06:30:00.000+01:00",
            "bookable_type": "Person",
            "notes": ""
        },
        "company": {
            "id": 67,
            "name": "Funk-Gerhold",
            "email": null,
            "notes": null
        },
        "person": {
            "id": 60,
            "first_name": "Jairo",
            "last_name": "Klein",
            "driving_license_number": null,
            "mobile_phone": null,
            "email": null,
            "notes": null,
            "status": "waiting"
        },
        "vehicle": {
            "id": 172,
            "brand": "MAN",
            "model": null,
            "registration_number": "GS38430",
            "status": "parked",
            "properties": null,
            "vehicle_type": {
                "id": 21,
                "name": "Special"
            }
        },
        "movement_plan": {
            "id": 33,
            "name": "Delivery to the shop",
            "properties": null,
            "yard": {
                "id": 28,
                "name": "Eladio Streets"
            },
            "checkpoints": [
                {
                    "id": 96,
                    "estimated_arrival_in": 300,
                    "estimated_departure_in": 900,
                    "area": {
                        "id": 67,
                        "name": "Waiting Spot"
                    }
                },
                {
                    "id": 97,
                    "estimated_arrival_in": 300,
                    "estimated_departure_in": 1800,
                    "area": {
                        "id": 68,
                        "name": "Shop"
                    }
                }
            ]
        },
        "asset_positions": []
    },
    "event_name": "visit_created"
}

Visit updated event

Triggered when a Visit is updated.

Webhook event name

visit_updated

Webhook payload sample

POST /payloads HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Yardman-Hookshot/1.17.1
Content-Type: application/json
X-Yardman-Event: visit_updated
X-Yardman-Delivery: 590eb279-d5ef-45b6-b319-65086be4754a
X-Yardman-Signature: sha1=9d87b8b2e8669b594105d3938720d26936fb8b07
Connection: close
Host: 880af687.ngrok.io
Content-Length: 1614
X-Forwarded-Proto: https
X-Forwarded-For: 2a01:4f8:13b:2d45::2

{
    "visit": {
        "id": 401,
        "created_at": "2018-12-01T06:23:18.391+01:00",
        "updated_at": "2018-12-01T06:26:48.937+01:00",
        "notes": null,
        "status": "in_progress",
        "person_called": false,
        "properties": null,
        "booking": {
            "id": 807,
            "check_in_at": "2018-12-29T06:30:00.000+01:00",
            "bookable_type": "Person",
            "notes": ""
        },
        "company": {
            "id": 67,
            "name": "Funk-Gerhold",
            "email": null,
            "notes": null
        },
        "person": {
            "id": 60,
            "first_name": "Jairo",
            "last_name": "Klein",
            "driving_license_number": null,
            "mobile_phone": null,
            "email": null,
            "notes": null,
            "status": "moving"
        },
        "vehicle": {
            "id": 172,
            "brand": "MAN",
            "model": null,
            "registration_number": "GS38430",
            "status": "parked",
            "properties": null,
            "vehicle_type": {
                "id": 21,
                "name": "Special"
            }
        },
        "movement_plan": {
            "id": 33,
            "name": "Delivery to the shop",
            "properties": null,
            "yard": {
                "id": 28,
                "name": "Eladio Streets"
            },
            "checkpoints": [
                {
                    "id": 96,
                    "estimated_arrival_in": 300,
                    "estimated_departure_in": 900,
                    "area": {
                        "id": 67,
                        "name": "Waiting Spot"
                    }
                },
                {
                    "id": 97,
                    "estimated_arrival_in": 300,
                    "estimated_departure_in": 1800,
                    "area": {
                        "id": 68,
                        "name": "Shop"
                    }
                }
            ]
        },
        "asset_positions": [
            {
                "id": 1255,
                "arrived_at": "2018-12-01T06:26:48.950+01:00",
                "departed_at": null,
                "positionable_id": 172,
                "positionable_type": "Vehicle",
                "checkpoint": {
                    "id": 96,
                    "estimated_arrival_in": 300,
                    "estimated_departure_in": 900,
                    "area": {
                        "id": 67,
                        "name": "Waiting Spot"
                    }
                },
                "place": {
                    "id": 189,
                    "name": "Place 1"
                }
            },
            {
                "id": 1256,
                "arrived_at": "2018-12-01T06:26:48.950+01:00",
                "departed_at": null,
                "positionable_id": 60,
                "positionable_type": "Person",
                "checkpoint": {
                    "id": 96,
                    "estimated_arrival_in": 300,
                    "estimated_departure_in": 900,
                    "area": {
                        "id": 67,
                        "name": "Waiting Spot"
                    }
                },
                "place": {
                    "id": 189,
                    "name": "Place 1"
                }
            }
        ]
    },
    "event_name": "visit_updated"
}

Visit deleted event

Triggered when a Visit is deleted.

Webhook event name

visit_deleted

Webhook payload sample

POST /payloads HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Yardman-Hookshot/1.17.1
Content-Type: application/json
X-Yardman-Event: visit_deleted
X-Yardman-Delivery: f225f14b-7f58-4f21-9cba-bdea61c4fc75
X-Yardman-Signature: sha1=48197b0d59a6d499ea456860e702b46c87d436ce
Connection: close
Host: 880af687.ngrok.io
Content-Length: 1052
X-Forwarded-Proto: https
X-Forwarded-For: 2a01:4f8:13b:2d45::2

{
    "visit": {
        "id": 401,
        "created_at": "2018-12-01T06:23:18.391+01:00",
        "updated_at": "2018-12-01T06:28:02.888+01:00",
        "notes": null,
        "status": "finished",
        "person_called": false,
        "properties": null,
        "booking": {
            "id": 807,
            "check_in_at": "2018-12-29T06:30:00.000+01:00",
            "bookable_type": "Person",
            "notes": ""
        },
        "company": {
            "id": 67,
            "name": "Funk-Gerhold",
            "email": null,
            "notes": null
        },
        "person": {
            "id": 60,
            "first_name": "Jairo",
            "last_name": "Klein",
            "driving_license_number": null,
            "mobile_phone": null,
            "email": null,
            "notes": null,
            "status": "unknown"
        },
        "vehicle": {
            "id": 172,
            "brand": "MAN",
            "model": null,
            "registration_number": "GS38430",
            "status": "unknown",
            "properties": null,
            "vehicle_type": {
                "id": 21,
                "name": "Special"
            }
        },
        "movement_plan": {
            "id": 33,
            "name": "Delivery to the shop",
            "properties": null,
            "yard": {
                "id": 28,
                "name": "Eladio Streets"
            },
            "checkpoints": [
                {
                    "id": 96,
                    "estimated_arrival_in": 300,
                    "estimated_departure_in": 900,
                    "area": {
                        "id": 67,
                        "name": "Waiting Spot"
                    }
                },
                {
                    "id": 97,
                    "estimated_arrival_in": 300,
                    "estimated_departure_in": 1800,
                    "area": {
                        "id": 68,
                        "name": "Shop"
                    }
                }
            ]
        },
        "asset_positions": []
    },
    "event_name": "visit_deleted"
}

Yardman, our YMS Software