Skip to main content

Fleet callback

POST {{base_url}}/public/webhooks/fleet/callback

Description

This API endpoint is used to create a new order with the provided details.

Request

Request Body Schema (JSON):

{
"ref": "string",
"public_id": "string",
"tracking_code": "string",
"sid": "string",
"state": 0,
"organization": "string",
"state_display": "string",
"notes": "string",
"payment_method": 0,
"payment_method_display": "string",
"paid": true,
"total_paid_by_mpesa": 0,
"modified": "string",
"created": "string",
"skills": {},
"priority": {},
"service_time": {},
"signature": {},
"signature_name": {},
"pod_images": {},
"datetime_failed": "string",
"datetime_ordered": "string",
"datetime_reviewed": "string",
"datetime_completed": "string",
"end_delivery_datetimetime_window": {},
"start_delivery_datetimetime_window": {},
"is_correct_tagged": {},
"price": 0,
"width": 0,
"weight": 0,
"length": 0,
"height": 0,
"pickup": {
"location": {
"address": "string",
"apartment": "string",
"coords": {
"lat": "string",
"lng": "string"
}
},
"contact": {
"name": "string",
"email": "string",
"phone_number": "string"
},
"notes": "string"
},
"dropoff": {
"location": {
"address": "string",
"apartment": "string",
"coords": {
"lat": "string",
"lng": "string"
}
},
"contact": {
"name": "string",
"email": "string",
"phone_number": "string"
},
"notes": "string"
},
"review": {},
"rating": {},
"order_rating": {},
"items": [
{
"id": 0,
"paid": true,
"price": 0,
"name": "string",
"metrics": {
"id": 0,
"status": 0,
"weight": 0,
"quantity": 0,
"quantity_received": 0,
"quantity_returned_to_warehouse": 0
}
}
],
"rider": {
"name": "string",
"phone_number": "string",
"id": 0
},
"sla": {},
"vehicle_type": 0,
"vehicle_type_display": "string",
"preffered_delivery_date": "string",
"preffered_delivery_period": 0,
"preffered_delivery_period_display": "string",
"tags": [
{}
],
"branch": {},
"route_id": {},
"job_number": "string",
"sequence_number": {},
"total_jobs": {},
"failure_reason": "string",
"zone": {},
"is_paid": true,
"ID": "string",
"ETA": "string"
}

Example:

<orderCreationRequest>
<ref>string</ref>
<public_id>string</public_id>
<tracking_code>string</tracking_code>
<sid>string</sid>
<state>0</state>
<organization>string</organization>
<state_display>string</state_display>
<notes>string</notes>
<payment_method>0</payment_method>
<payment_method_display>string</payment_method_display>
<paid>true</paid>
<total_paid_by_mpesa>0</total_paid_by_mpesa>
<modified>string</modified>
<created>string</created>
<skills></skills>
<priority></priority>
<service_time></service_time>
<signature></signature>
<signature_name></signature_name>
<pod_images></pod_images>
<datetime_failed>string</datetime_failed>
<datetime_ordered>string</datetime_ordered>
<datetime_reviewed>string</datetime_reviewed>
<datetime_completed>string</datetime_completed>
<end_delivery_datetimetime_window></end_delivery_datetimetime_window>
<start_delivery_datetimetime_window></start_delivery_datetimetime_window>
<is_correct_tagged></is_correct_tagged>
<price>0</price>
<width>0</width>
<weight>0</weight>
<length>0</length>
<height>0</height>
<pickup>
<location>
<address class=&#x27;preserveHtml&#x27; class=&#x27;preserveHtml&#x27; class=&#x27;preserveHtml&#x27; class=&#x27;preserveHtml&#x27; class=&#x27;preserveHtml&#x27; class=&#x27;preserveHtml&#x27;>string</address>
<apartment>string</apartment>
<coords>
<lat>string</lat>
<lng>string</lng>
</coords>
</location>
<contact>
<name>string</name>
<email>string</email>
<phone_number>string</phone_number>
</contact>

Responses: Status: 200 OK Description: Request received successfully.

Response Body Schema (JSON):

{
"status": "boolean",
"statusCode": "integer",
"message": "string",
"data": {},
"errors": [
{
"message": "string",
"descriptiveMessage": "string"
}
]
}

Example:

<orderCreationResponse>
<status>true</status>
<statusCode>0</statusCode>
<message>string</message>
<data></data>
<errors>
<error>
<message>string</message>
<descriptiveMessage>string</descriptiveMessage>
</error>
</errors>
</orderCreationResponse>

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--url /public/webhooks/fleet/callback \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!