Skip to main content

GET /invoices/:id

A GET to the /invoices/:id endpoint allows your application to fetch a specific invoice by it's identifier. Requests made to this endpoint require an authorization header using your authentication token:

Auth Header
curl --request GET \
--url https://api.hopdrive.com/v1/invoices/:id \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your token>'

Example Request

GET /v1/invoices/12904

Example Response

200 /v1/invoices/12904
{
"invoices": [
{
"id": 12904,
"status": "closed",
"due_amount": 45.01,
"paid_amount": 35.01,
"discount_amount": 10,
"balance_remaining": 0,
"payments": [
{
"amount" : 45.01,
"date" : "2023-04-25T23:59:59+00:00",
"status": "paid",
"method": {
"id": 12,
"type": "ach/card",
"last4": 1234
},
"charges": [
{
"id": 123,
"amount": 123
}
]
}
],
"start_datetime": "2023-04-09T00:00:00+00:00",
"end_datetime": "2023-04-15T23:59:59+00:00",
"customer": {
"id": 108,
"name": "Dealer name"
},
"charges": [
{
"id": 123,
"move_id": 85788, // optional, only if charge type is move
"type": "move",
"status": "paid",
"disputed": false,
"dispute_reason": "description...",
"discount_amount": 12.00,
"discount_reason": "description...",
"due_amount": 45.01,
"paid_amount": 45.01,
"balance_remaining": 0,
"details": [
{
"name": "Transport",
"amount": 44.87,
"notes": "Standard transport cost of move",
"mileage_band": {
"rate": 6,
"type": "flat",
"distance_start": 0,
"distance_end": 666,
"contract": {
"begin_date": "2023-08-01T04:00:00+00:00",
"end_date": "2028-08-31T04:00:00+00:00"
}
}
},
{
"name": "Surge",
"amount": 0.14,
"notes": "uber ride service"
}
]
}
]
}
]
}

See the invoice object documentation for more information about the response object.