Truck Visit Appointments ICTSI Webhooks
Posting truck visit appointments requires an API_KEY that is being sent in X-API-KEY header
Headers:
X-API-KEY ==> API_KEY
URL:
POST {{INTEGERATED-WEBHOOK-BASE-URL}}/ictsi/truck-visit-appointments-details
Integerated webhook base url |
Environment |
---|---|
Dev |
|
Stg |
|
Prd |
Request Body:
[
{
"id": "3117853c-a90a-4f1a-8b18-4749ad2f0cde",
"subject": "ICTSI_truck_visit_appointments_event",
"data": {
"event": {
"unique_key": "ICTSI/PH/SBITC/48161372",
"operator_id": "ICTSI",
"complex_id": "PH",
"facility_id": "SBITC",
"placed_by": "user:-system-",
"placed_time": "2023-09-12T04:04:23.763Z",
"event_type": "TVAPPT_LATE",
"event_descriptions": [
{
"language": "en-us",
"description": "Truck Visit Appointment late"
}
],
"applied_to_id": "2347",
"appointment_gkey": "ICTSI/PH/SBITC/720",
"category": "Standard",
"topics": "TMS"
},
"detail": {
"tv_appointment_nbr": 2347,
"tv_requested_time": "2023-09-12T02:00:00Z",
"tv_start_date": "2023-09-12T02:00:00Z",
"tv_end_date": "2023-09-12T03:59:00Z",
"tv_truck_license_nbr": "PM162",
"tv_truckco_id": "SBITC",
"tv_truckco_name": "SBITC ",
"tv_state": "LATE",
"tv_created": "2023-09-12T00:18:45.943Z",
"tv_changed": "2023-09-12T04:04:23.797Z",
"truckco_gkey": "ICTSI/PH/SBITC/2969",
"tv_truckco_gkey": "ICTSI/PH/SBITC/2969",
"appointment": [
{
"unique_key": "ICTSI/PH/SBITC/15260",
"operator_id": "ICTSI",
"complex_id": "PH",
"facility_id": "SBITC",
"appointment_nbr": 2344,
"gate_id": "SBITC_GATE",
"state": "LATE",
"requested_time": "2023-09-12T02:00:00Z",
"start_date": "2023-09-12T02:00:00Z",
"end_date": "2023-09-12T03:59:00Z",
"trans_type": "PUM",
"truckingco_id": "SBITC",
"trucking_company": "SBITC ",
"delivery_order_nbr": "SUBICTESTENVA",
"created": "2023-09-12T00:06:22.637Z",
"changed": "2023-09-12T04:04:23.783Z",
"line_operator": "ONE"
},
{
"unique_key": "ICTSI/PH/SBITC/15261",
"operator_id": "ICTSI",
"complex_id": "PH",
"facility_id": "SBITC",
"appointment_nbr": 2345,
"gate_id": "SBITC_GATE",
"state": "LATE",
"requested_time": "2023-09-12T02:00:00Z",
"start_date": "2023-09-12T02:00:00Z",
"end_date": "2023-09-12T03:59:00Z",
"trans_type": "PUM",
"truckingco_id": "SBITC",
"trucking_company": "SBITC ",
"delivery_order_nbr": "SUBICTESTENVA",
"created": "2023-09-12T00:06:39.807Z",
"changed": "2023-09-12T04:04:23.783Z",
"line_operator": "ONE"
}
]
},
"run_id": 0,
"job_id": 0,
"insert_ts": "2023-09-14T07:59:19.898Z",
"insert_dt": "2023-09-14"
},
"eventType": "ICTSI.TruckVisitAppointments.Event",
"dataVersion": "1.0",
"metadataVersion": "1",
"eventTime": "2023-09-14T07:59:33.949451Z",
"topic": "/subscriptions/da2a7767-6a99-4b7a-8ecd-b1a6f265d721/resourceGroups/edp-dev-sea-rg-dataplatform/providers/Microsoft.EventGrid/topics/edp-qas-sea-event-grid-tms-dataplatform"
}
]
Response Sent to connect data:
As the request body includes information about two appointments then two responses will be sent to connect The First response sent to connect data for appointment number 2344:
{
"action": "TRACE_RESULT",
"orgId": "ENVASE",
"svcId": "ICTSI-INTEGRATION",
"type": "APPOINTMENT",
"payload": {
"appointmentNumber": "2344",
"code": "LATE",
"containerNumber": "",
"created": "2023-09-12T00:06:22.637Z",
"updated": "2023-09-12T04:04:23.783Z",
"cancelled": "2023-09-12T04:04:23.783Z",
"deliveryOrder": "SUBICTESTENVA",
"endDate": "2023-09-12T03:59:00.000Z",
"event": {
"description": [
{
"description": "Truck Visit Appointment late",
"language": "en-us"
}
],
"locationCode": "SBITC",
"operatorId": "ICTSI",
"type": "TVAPPT_LATE"
},
"gateId": "SBITC_GATE",
"id": "",
"locationCode": "SBITC",
"providerId": "ictsi",
"referenceKey": "ICTSI/PH/SBITC/15260",
"requestedDate": "2023-09-12T02:00:00.000Z",
"startDate": "2023-09-12T02:00:00.000Z",
"company": "SBITC ",
"companyId": "SBITC",
"license": "PM162",
"truck": {
"id": "test reference",
"driverLicense": "test license",
"appointmentNumber": "2347",
"code": "LATE",
"company": "SBITC ",
"companyId": "SBITC",
"created": "2023-09-12T00:18:45.943Z",
"endDate": "2023-09-12T03:59:00.000Z",
"license": "PM162",
"startDate": "2023-09-12T02:00:00.000Z",
"updated": "2023-09-12T04:04:23.797Z",
"cancelled": "2023-09-12T04:04:23.797Z"
}
}
}
The Second response sent to connect data for appointment number 2345:
{
"action": "TRACE_RESULT",
"orgId": "ENVASE",
"svcId": "ICTSI-INTEGRATION",
"type": "APPOINTMENT",
"payload": {
"appointmentNumber": "2345",
"code": "LATE",
"containerNumber": "",
"created": "2023-09-12T00:06:39.807Z",
"updated": "2023-09-12T04:04:23.783Z",
"cancelled": "2023-09-12T04:04:23.783Z",
"deliveryOrder": "SUBICTESTENVA",
"endDate": "2023-09-12T03:59:00.000Z",
"event": {
"description": [
{
"description": "Truck Visit Appointment late",
"language": "en-us"
}
],
"locationCode": "SBITC",
"operatorId": "ICTSI",
"type": "TVAPPT_LATE"
},
"gateId": "SBITC_GATE",
"id": "",
"locationCode": "SBITC",
"providerId": "ictsi",
"referenceKey": "ICTSI/PH/SBITC/15261",
"requestedDate": "2023-09-12T02:00:00.000Z",
"startDate": "2023-09-12T02:00:00.000Z",
"company": "SBITC ",
"companyId": "SBITC",
"license": "PM162",
"truck": {
"id": "test reference",
"driverLicense": "test license",
"appointmentNumber": "2347",
"code": "LATE",
"company": "SBITC ",
"companyId": "SBITC",
"created": "2023-09-12T00:18:45.943Z",
"endDate": "2023-09-12T03:59:00.000Z",
"license": "PM162",
"startDate": "2023-09-12T02:00:00.000Z",
"updated": "2023-09-12T04:04:23.797Z",
"cancelled": "2023-09-12T04:04:23.797Z"
}
}
}
Note
The response sent to connect data is based on the returned response from GetAppointmentDetails ictsi API call.
Get Appointment Details API Response for appointment number 2344:
{
"data": [
{
"unique_key": "ICTSI/PH/SBITC/15260",
"operator_id": "ICTSI",
"complex_id": "PH",
"facility_id": "SBITC",
"external_reference_nbr": "",
"appointment_nbr": 2344,
"gate_id": "SBITC_GATE",
"state": "LATE",
"requested_time": "2023-09-12T02:00:00.000Z",
"start_date": "2023-09-12T02:00:00.000Z",
"end_date": "2023-09-12T03:59:00.000Z",
"trans_type": "PUM",
"truck_license_nbr": "",
"truckingco_id": "SBITC",
"trucking_company": "SBITC ",
"delivery_order_nbr": "SUBICTESTENVA",
"ctr_id": "",
"cancel_date": "",
"created": "2023-09-12T00:06:22.637Z",
"changed": "2023-09-12T04:04:23.783Z",
"is_haz": "",
"is_oog": "",
"line_operator": "ONE",
"tv_appointment_nbr": "2347",
"tv_requested_time": "2023-09-12T02:00:00.000Z",
"tv_start_date": "2023-09-12T02:00:00.000Z",
"tv_end_date": "2023-09-12T03:59:00.000Z",
"tv_truck_license_nbr": "PM162",
"tv_driver_license_nbr": "",
"tv_driver_name": "",
"tv_truckco_id": "SBITC",
"tv_truckco_name": "SBITC ",
"tv_cancel_date": "",
"tv_state": "LATE",
"tva_external_ref_nbr": "",
"tv_created": "2023-09-12T00:18:45.943Z",
"tv_changed": "2023-09-12T04:04:23.797Z",
"unit_gkey": "",
"truckco_gkey": "ICTSI/PH/SBITC/2969",
"tv_truckco_gkey": "ICTSI/PH/SBITC/2969"
}
],
"extra": {
"updatedTime": "2023-09-20T21:49:21Z"
}
}
- Data Mapping:
Property |
Source Property |
Description |
---|---|---|
orgId |
DEFAULT |
Identify the client application, defaulted to ENVASE. |
svcId |
DEFAULT |
Identify the client application, defaulted to ICTSI-INTEGRATION. |
type |
DEFAULT |
Identify the trace type, defaulted to APPOINTMENT. |
payload.appointmentNumber |
data.appointment_nbr |
Represents appointment number |
payload.cancelled |
data.cancel_date |
Represents the cancelled datetime for appointment |
payload.code |
data.state |
Represents the code for appointment |
payload.containerNumber |
data.ctr_id |
Represents the container number for appointment |
payload.license |
data.truck_license_nbr |
Represents the truck license. |
payload.companyId |
data.truckingco_id |
Represents the truck company id. |
payload.license |
data.trucking_company |
Represents the truck company name. |
payload.created |
data.created |
Represents the creation datetime for appointment |
payload.deliveryOrder |
data.delivery_order_nbr |
Represents the delivery order number for appointment |
payload.endDate |
data.end_date |
Represents the end datetime for appointment |
payload.event.description |
data.event.event_descriptions |
Represents the events related to the truck appointment |
payload.event.locationCode |
data.event.facility_id |
Represents the location code related to the truck appointment |
payload.event.operatorId |
data.event.operator_id |
Represents the operatorId related to the truck appointment |
payload.event.type |
data.event.event_type |
Represents the event type related to the truck appointment |
payload.gateId |
data.gate_id |
Represents the gateId for this appointment |
payload.id |
data.external_reference_nbr |
Represents the external reference number for this appointment |
payload.locationCode |
data.facility_id |
Represents the facility for this appointment |
payload.providerId |
DEFAULT |
Value is defaulted to ictsi |
payload.referenceKey |
data.appointment_gkey |
Represents the reference for this appointment |
payload.requestedDate |
data.requested_time |
Represents the requested datetime for this appointment |
payload.startDate |
data.start_date |
Represents the start datetime for this appointment |
payload.updated |
data.changed |
Represents the updated datetime for this appointment |
payload.truck.id |
data.tva_external_ref_nbr |
Represents the truck reference number |
payload.truck.driverLicense |
data.tv_driver_license_nbr |
Represents the truck driver license number |
payload.truck.appointmentNumber |
data.tv_appointment_nbr |
Represents the truck appointment number |
payload.truck.code |
data.tv_state |
Represents the truck code |
payload.truck.company |
data.tv_truckco_name |
Represents the truck company name |
payload.truck.companyId |
data.tv_truckco_id |
Represents the truck company id |
payload.truck.cancelled |
data.tv_cancel_date |
Represents the truck visit cancel datetime |
payload.truck.created |
data.tv_created |
Represents the truck creation datetime |
payload.truck.license |
data.tv_truck_license_nbr |
Represents the truck license number |
payload.truck.startDate |
data.tv_start_date |
Represents the truck visit start datetime |
payload.truck.endDate |
data.tv_end_date |
Represents the truck visit end datetime |
payload.truck.updated |
data.tv_changed |
Represents the truck visit updated datetime |