MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Base URL

https://api-dieseldocs.com

Authenticating requests

This API is not authenticated.

Document

Usage stats

View a subscriber's document usage stats.

Example request:
curl --request GET \
    --get "https://api-dieseldocs.com/api/v1/molestiae/usage-stats?verbose=1&type=DL" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "DL-Authorization: {YOUR_API_KEY}"

Example response (200):


{
    "meta": {
        "usage": {
            "used": [],
            "max": 2
        }
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/{uid}/usage-stats

URL Parameters

uid  string  

subscriber_uid  string optional  

'ID' of the subscriber.

Query Parameters

verbose  boolean optional  

If set to true, the "usage.used" array will contain full document data instead of just IDs.

type  string optional  

Type of the user. Possible values: 'DL', 'X' (for DL-Authorization and X-Authorization correspondingly). Default: 'DL'.

List

Retrieve all documents

Example request:
curl --request GET \
    --get "https://api-dieseldocs.com/api/v1/document?subscriber_uid=impedit&document_type_id=8&system_type_id=14&not_categorized=1&sort_by=name&sort_dir=asc&page=11&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "DL-Authorization: {YOUR_API_KEY}"

Example response (200):


{
    "data": [
        {
            "id": 10,
            "document_type_id": 15,
            "name": "Cummins - B6.7 - 2012-2015.PDF",
            "token": "A2ZF...",
            "preview_url": "https://api-dieseldocs.com/api/v1/document/A2ZF.../preview?cache-buster=1584024861",
            "preview_pages": "1",
            "dependencies": {
                "documentType": {
                    "id": 15,
                    "model_id": 7,
                    "name": "Instruction"
                },
                "model": {
                    "id": 7,
                    "year_id": 4,
                    "name": "B6.7"
                },
                "year": {
                    "id": 4,
                    "type_id": 1,
                    "name": "2012-2015"
                },
                "type": {
                    "id": 1,
                    "make_id": 1,
                    "name": "Engine"
                },
                "make": {
                    "id": 1,
                    "industry_id": 1,
                    "name": "Cummins"
                },
                "industry": {
                    "id": 1,
                    "name": "On Highway"
                }
            },
            "url": ""
        }
    ],
    "links": {
        "first": "https://api-dieseldocs.com/api/v1/document?page=1",
        "last": "https://api-dieseldocs.com/api/v1/document?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api-dieseldocs.com/api/v1/document",
        "per_page": 10,
        "to": 9,
        "total": 9
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/document

Query Parameters

subscriber_uid  string optional  

'ID' of the customer. It must be specified to generate URL of the document.

document_type_id  integer optional  

'ID' of the document type to search.

system_type_id  integer optional  

'ID' of the system type to search.

not_categorized  boolean optional  

Retrieve only not categorized documents.

sort_by  string optional  

Field to sort by. Defaults to 'name'. Possible values: 'name'.

sort_dir  string optional  

Sort direction. Defaults to 'asc'. Possible values: 'asc' or 'desc'.

page  integer optional  

Page of result to return. Defaults to 1.

per_page  integer optional  

How many rows to return per page. Defaults to 10, maximum 100.

Retrieve

Retrieve the document

Example request:
curl --request GET \
    --get "https://api-dieseldocs.com/api/v1/document/15?subscriber_uid=omnis" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "DL-Authorization: {YOUR_API_KEY}"

Example response (200):


{
    "data": {
        "id": 10,
        "document_type_id": 15,
        "name": "Cummins - B6.7 - 2012-2015.PDF",
        "token": "O74s...",
        "preview_url": "https://api-dieseldocs.com/api/v1/document/O74s.../preview?cache-buster=1584024375",
        "preview_pages": "1",
        "dependencies": {
            "documentType": {
                "id": 15,
                "model_id": 7,
                "name": "Instruction"
            },
            "model": {
                "id": 7,
                "year_id": 4,
                "name": "B6.7"
            },
            "year": {
                "id": 4,
                "type_id": 1,
                "name": "2012-2015"
            },
            "type": {
                "id": 1,
                "make_id": 1,
                "name": "Engine"
            },
            "make": {
                "id": 1,
                "industry_id": 1,
                "name": "Cummins"
            },
            "industry": {
                "id": 1,
                "name": "On Highway"
            }
        },
        "url": ""
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/document/{id}

URL Parameters

id  integer  

'ID' of the document.

Query Parameters

subscriber_uid  string optional  

'ID' of the customer. It must be specified to generate URL of the document.

View PDF

View a document's PDF. NOTE: this counts towards the user's viewing quota.

Example request:
curl --request GET \
    --get "https://api-dieseldocs.com/api/v1/document/explicabo/view" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "DL-Authorization: {YOUR_API_KEY}"

Example response (200):


{}
 

Request   

GET api/v1/document/{jwt_token}/view

URL Parameters

jwt_token  string  

JWT encoding token and subscriber_uid.

Preview PDF

Preview PDF file

Example request:
curl --request GET \
    --get "https://api-dieseldocs.com/api/v1/document/saepe/preview" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "DL-Authorization: {YOUR_API_KEY}"

Example response (200):


{}
 

Request   

GET api/v1/document/{token}/preview

URL Parameters

token  string optional  

Token returned in the document data (preview_url field).

Document Type

List

Retrieve all document types

Example request:
curl --request GET \
    --get "https://api-dieseldocs.com/api/v1/document-type?model_id=17&sort_by=name&sort_dir=asc&page=17&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "DL-Authorization: {YOUR_API_KEY}"

Example response (200):


{
    "data": [
        {
            "id": 1,
            "model_id": 1,
            "name": "Instruction"
        }
    ],
    "links": {
        "first": "http://api-dieseldocs.com/api/v1/document-type?page=1",
        "last": "http://api-dieseldocs.com/api/v1/document-type?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": null,
        "last_page": 1,
        "path": "http://api-dieseldocs.com/api/v1/document-type",
        "per_page": 300,
        "to": null,
        "total": 0
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/document-type

Query Parameters

model_id  integer optional  

Filter by 'ID' of the model.

sort_by  string optional  

Field to sort by. Defaults to 'name'. Possible values: 'name'.

sort_dir  string optional  

Sort direction. Defaults to 'asc'. Possible values: 'asc' or 'desc'.

page  integer optional  

Page of result to return. Defaults to 1.

per_page  integer optional  

How many rows to return per page. Defaults to 300, maximum 300.

Industry

List

Retrieve all industries

Example request:
curl --request GET \
    --get "https://api-dieseldocs.com/api/v1/industry?sort_by=name&sort_dir=asc&page=4&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "DL-Authorization: {YOUR_API_KEY}"

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "On Highway"
        }
    ],
    "links": {
        "first": "http://api-dieseldocs.com/api/v1/industry?page=1",
        "last": "http://api-dieseldocs.com/api/v1/industry?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "http://api-dieseldocs.com/api/v1/industry",
        "per_page": 300,
        "to": 4,
        "total": 4
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/industry

Query Parameters

sort_by  string optional  

Field to sort by. Defaults to 'name'. Possible values: 'name'.

sort_dir  string optional  

Sort direction. Defaults to 'asc'. Possible values: 'asc' or 'desc'.

page  integer optional  

Page of result to return. Defaults to 1.

per_page  integer optional  

How many rows to return per page. Defaults to 300, maximum 300.

Make

List

Retrieve all makes

Example request:
curl --request GET \
    --get "https://api-dieseldocs.com/api/v1/make?industry_id=2&sort_by=name&sort_dir=asc&page=18&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "DL-Authorization: {YOUR_API_KEY}"

Example response (200):


{
    "data": [
        {
            "id": 1,
            "industry_id": 1,
            "name": "Cummins"
        }
    ],
    "links": {
        "first": "http://api-dieseldocs.com/api/v1/make?page=1",
        "last": "http://api-dieseldocs.com/api/v1/make?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": null,
        "last_page": 1,
        "path": "http://api-dieseldocs.com/api/v1/make",
        "per_page": 300,
        "to": null,
        "total": 0
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/make

Query Parameters

industry_id  integer optional  

'ID' of the industry.

sort_by  string optional  

Field to sort by. Defaults to 'name'. Possible values: 'name'.

sort_dir  string optional  

Sort direction. Defaults to 'asc'. Possible values: 'asc' or 'desc'.

page  integer optional  

Page of result to return. Defaults to 1.

per_page  integer optional  

How many rows to return per page. Defaults to 300, maximum 300.

Model

List

Retrieve all models

Example request:
curl --request GET \
    --get "https://api-dieseldocs.com/api/v1/model?year_id=18&sort_by=name&sort_dir=asc&page=6&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "DL-Authorization: {YOUR_API_KEY}"

Example response (200):


{
    "data": [
        {
            "id": 1,
            "year_id": 1,
            "name": "B6.7"
        }
    ],
    "links": {
        "first": "http://api-dieseldocs.com/api/v1/model?page=1",
        "last": "http://api-dieseldocs.com/api/v1/model?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": null,
        "last_page": 1,
        "path": "http://api-dieseldocs.com/api/v1/model",
        "per_page": 300,
        "to": null,
        "total": 0
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/model

Query Parameters

year_id  integer optional  

Filter by the 'ID' of the year.

sort_by  string optional  

Field to sort by. Defaults to 'name'. Possible values: 'name'.

sort_dir  string optional  

Sort direction. Defaults to 'asc'. Possible values: 'asc' or 'desc'.

page  integer optional  

Page of result to return. Defaults to 1.

per_page  integer optional  

How many rows to return per page. Defaults to 300, maximum 300.

System Type

List

Retrieve all system types

Example request:
curl --request GET \
    --get "https://api-dieseldocs.com/api/v1/system-type?document_type_id=3&sort_by=name&sort_dir=asc&page=18&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "DL-Authorization: {YOUR_API_KEY}"

Example response (200):


{
    "data": [
        {
            "id": 66744,
            "document_type_id": 8516,
            "name": "20V689000"
        }
    ],
    "links": {
        "first": "https://api-dieseldocs.com/api/v1/system-type?page=1",
        "last": "https://api-dieseldocs.com/api/v1/system-type?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api-dieseldocs.com/api/v1/system-type",
        "per_page": 300,
        "to": 1,
        "total": 1
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/system-type

Query Parameters

document_type_id  integer optional  

'ID' of the document type.

sort_by  string optional  

Field to sort by. Defaults to 'name'. Possible values: 'name'.

sort_dir  string optional  

Sort direction. Defaults to 'asc'. Possible values: 'asc' or 'desc'.

page  integer optional  

Page of result to return. Defaults to 1.

per_page  integer optional  

How many rows to return per page. Defaults to 300, maximum 300.

Type

List

Retrieve all types 'ID' of the make

Example request:
curl --request GET \
    --get "https://api-dieseldocs.com/api/v1/type?make_id=19&sort_by=name&sort_dir=asc&page=14&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "DL-Authorization: {YOUR_API_KEY}"

Example response (200):


{
    "data": [
        {
            "id": 1,
            "make_id": 1,
            "name": "Engine"
        }
    ],
    "links": {
        "first": "http://api-dieseldocs.com/api/v1/type?page=1",
        "last": "http://api-dieseldocs.com/api/v1/type?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": null,
        "last_page": 1,
        "path": "http://api-dieseldocs.com/api/v1/type",
        "per_page": 300,
        "to": null,
        "total": 0
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/type

Query Parameters

make_id  integer optional  

Filter by the 'ID' of the make.

sort_by  string optional  

Field to sort by. Defaults to 'name'. Possible values: 'name'.

sort_dir  string optional  

Sort direction. Defaults to 'asc'. Possible values: 'asc' or 'desc'.

page  integer optional  

Page of result to return. Defaults to 1.

per_page  integer optional  

How many rows to return per page. Defaults to 300, maximum 300.

Year

List

Retrieve all years

Example request:
curl --request GET \
    --get "https://api-dieseldocs.com/api/v1/year?type_id=13&sort_by=name&sort_dir=asc&page=4&per_page=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "DL-Authorization: {YOUR_API_KEY}"

Example response (200):


{
    "data": [
        {
            "id": 1,
            "type_id": 1,
            "name": "2017-2019"
        }
    ],
    "links": {
        "first": "http://api-dieseldocs.com/api/v1/year?page=1",
        "last": "http://api-dieseldocs.com/api/v1/year?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": null,
        "last_page": 1,
        "path": "http://api-dieseldocs.com/api/v1/year",
        "per_page": 300,
        "to": null,
        "total": 0
    }
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/year

Query Parameters

type_id  integer optional  

Filter by the 'ID' of the type.

sort_by  string optional  

Field to sort by. Defaults to 'name'. Possible values: 'name'.

sort_dir  string optional  

Sort direction. Defaults to 'asc'. Possible values: 'asc' or 'desc'.

page  integer optional  

Page of result to return. Defaults to 1.

per_page  integer optional  

How many rows to return per page. Defaults to 300, maximum 300.