Follow

Webhook for Jobs

Updated

This webhook will communicate status updates of the Jobs of the account: activities, interruptions, and forms.

 

You can read more information about webhooks here.

 

Authentication

Frotcom will send webhook requests with an authentication token in the request headers. Your application must validate this token before processing the request.

 

Request header

Header Description Format Mandatory Example
Authorization Token generated during configuration GUID Yes 1234-5678-9097-8466
Content-Type Specifies the format of the request payload Text Yes application/json

 

Your system should reject any request that does not contain a valid Authorization token.
 

 

Webhook request format

HTTPS Method and Endpoint

 

JSON Payload Structure

Frotcom will send a JSON object containing vehicle position data:

 

Field

Description

Format

Example

Token

Token generated on configuration in the header of the message

GUID

12345678909784646

Driver ID

Frotcom internal driver’s ID

Integer

123456

Driver Name

Driver’s name

Text

“John Doe”

Timestamp

Day and time in which the information refers.

The timezone used must be UTC.

 "timestamp": "2023-10-25T16:29:31.087Z",

Latitude

Current vehicle’s location (latitude)

Text

38.72148501310173

 

Longitude

Current vehicle’s location (longitude)

Text

-9.234022701031712

Vehicle

Frotcom License plate

Text

AA-001-AAA

Job ID

Job identifier

Integer

1234567

Task ID

Task identifier

Integer

7654321

Form Results ID

Form result identifier (when available for Stages and Interruptions)

Integer

0000001

Event type

Type of event (includes Tasks and Interruptions updates)

Text

Start/Finish
Stage
Status
Interruption
Special Interruption
Free Interruption
Status

Event name

Description of the event

Text

“Start”
“Moving to customer”
“In Progress”
“Refueling”
“Beginning of the day”
“On break”
“Reject”

 

Response Requirements

Your endpoint must respond promptly with the appropriate HTTP status code:

Status code When to use Example Response Body
200 OK Successful processing  {"status": "success"}
500 Server error Processing error {"error": "Internal server error"}
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request
Powered by Zendesk