Skip to main content
POST
/
v5
/
mileage
/
mileages
Save mileages
curl --request POST \
  --url https://sandbox.hurdlr.com/rest/v5/mileage/mileages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: */*' \
  --data '
{
  "mileages": [
    {
      "distance": 123,
      "id": 123,
      "distanceType": "MILE",
      "type": "PENDING",
      "date": "2023-11-07T05:31:56Z",
      "businessId": 123,
      "clientId": 123,
      "duration": 123,
      "description": "<string>",
      "startLat": 123,
      "startLong": 123,
      "endLat": 123,
      "endLong": 123,
      "startTime": "2023-11-07T05:31:56Z",
      "customData": {}
    }
  ]
}
'
[
  {
    "result": "SUCCESS",
    "errors": {
      "fieldErrors": {},
      "globalErrors": [
        {
          "type": "DUPLICATE",
          "errorMessage": "<string>"
        }
      ]
    },
    "id": "<string>",
    "webhook": {
      "userId": "<string>",
      "accountantUserId": "<string>",
      "type": "ENTITY_UPDATE"
    }
  }
]

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

*/*

mileages object

mileages
object[]

Response

200 - application/json

Successful operation

result
enum<string>

The result of the action performed

Available options:
SUCCESS,
FAILURE
errors
object

Error object containing details errors incurred, if any

id
string

Id of the entity being acted upon

webhook
object