Skip to main content

How to create a trip

This document is designed to help you understand how you can create a trip using the pickup delivery API. To create trips, you first need your credentials. If you don't already have one, head over to the Authentication and Authorization page to see how you can request for credentials from us.

The endpoint mentioned below can help you with creating a trip -

  • Parameters Used:
  1. {{requesterUserUuid}} - UUID of the user who is creating the trip
  2. {{dealerAssociateUuid}} - UUID of the dealer associate who is creating the trip
  3. {{dealerDepartmentUuid}} - UUID of the dealer department you want to create trip for
  4. {{dealerUuid}} - UUID of the dealer you want to create trip for
  5. {{customerUuid}} - UUID of the customer for which the trip is to be created
  6. {{appointmentTime}} - Start time for the created trip. eg. "2023-01-06T12:00:03-0500"
  7. {{rideType}} - Ride type of trip to be created. Possible values are "PICKUP_CUSTOMER", "PICKUP_VEHICLE", "DROPOFF_CUSTOMER", "DROPOFF_VEHICLE", "LOANER_SWAP", "MISCELLANEOUS", "RIDE_SHARE"
  8. {{tripStatus}} - Status of the trip to be created. eg. "UNASSIGNED"
  9. {{originLocationLon}}, {{originLocationLat}} - Coordinates (in double) of the origin address for the trip
  10. {{destLocationLon}}, {{destLocationLat}} - Coordinates (in double) of the destination address for the trip
  11. {{originAddress}} - Origin address string for the trip
  12. {{destinationAddress}} - Destination address string for the trip
  13. {{basic_auth_token}} - Authorization: Basic "generate using username password"
  • Scope: The service subscriber needs to have the following scope for the department in the request - pickupdelivery.trip.create

  • Endpoint

curl --location --request PUT 'https://api.mykaarma.com/pickupdelivery/v3/event/create' \
--header 'Authorization: {{basic_auth_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"requesterUserUUID": "{{requesterUserUuid}}",
"dealerDepartmentUUIDList": [
"{{dealerDepartmentUuid}}"
],
"pickupDeliveryTripEvent": {
"optionalFields": {},
"sendMessageToCustomer": true,
"isDropCar": false,
"isValid": true,
"sharedRidePartner": null,
"assignedByDealerAssociateUUID": "{{dealerAssociateUuid}}",
"rideType": "{{rideType}}",
"loanerVehicleRequired": false,
"customerDlVerified": false,
"customerInsuranceVerified": false,
"loanerVehicleUuid": null,
"loanerModel": null,
"primaryDriverLastName": null,
"primaryDriverFirstName": null,
"primaryDriverUUID": null,
"tripStatus": {{tripStatus}},
"secondaryDriverLastName": null,
"secondaryDriverFirstName": null,
"secondaryDriverUUID": null,
"vehicleIdentifiers": null,
"originLocationLon": {{originLocationLon}},
"originLocationLat": {{originLocationLat}},
"originAddress": "{{originAddress}}",
"destLocationLon": {{destLocationLon}},
"destLocationLat": {{destLocationLat}},
"destinationAddress": "{{destinationAddress}}",
"appointmentTime": "{{appointmentTime}}",
"mustStartBy": null,
"dealerUUID": "{{dealerUuid}}",
"dealerDepartmentUUID": "{{dealerDepartmentUuid}}",
"subTrips": null,
"customerFirstName": null,
"customerLastName": null,
"customerUUID": "{{customerUuid}}"
"createdDate": null
}
}'
  • Response
{
"statusCode": integer,
"error": {
"errorCode": "string",
"errorDescription": "string",
"metadata": "string"
},
"warnings": [
{
"warningCode": "string",
"warningDescription": "string"
}
],
"eventUUID": "string"
}


{eventUUID} - the UUID of the created trip