NAV
bash javascript

Info

Welcome to the generated API reference. Get Postman Collection

Authentication

You should have been handed out an API key to use this service. (If not, please request yours)

The API expects you to include this API key in all your requests, in a header that looks like the following:

X-Authorization: api-key

Document

List

Retrieve all documents

Route Bindings

(no route bindings)

Query Parameters

Parameter Type Status Description
engine_id integer optional ID of the engine
sort_by string optional what column to sort the results on
sort_dir string optional sort direction; defaults to asc
Possible values: asc or desc
page number optional which page of results to return; defaults to 1
per_page number optional how many rows to return per page; defaults to 300, maximum 300

Example request:

curl -X GET \
    -G "https://api-ca.com/api/v1/document" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api-ca.com/api/v1/document"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": [
        {
            "id": 1,
            "engine_id": 1,
            "name": "Document Name",
            "notes": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...",
            "video": "https:\/\/youtu.be\/Cr0kpcgXIZI",
            "link_texa": "https:\/\/example.com\/path\/to\/document.html",
            "link_cojali": "https:\/\/example.com\/path\/to\/document.html",
            "link_texa2": "https:\/\/example.com\/path\/to\/document.html",
            "link_cojali2": "https:\/\/example.com\/path\/to\/document.html",
            "attachments": [
                {
                    "id": 3,
                    "name": "imagename.jpg",
                    "file": "FJ0oSkp4lRBBQ18df8FH46VkNs6kP78X.jpg",
                    "url": "https:\/\/api-cc.com\/storage\/attachments\/FJ0oSkp4lRBBQ18df8FH46VkNs6kP78X.jpg"
                }
            ],
            "parts": [
                {
                    "id": 2,
                    "document_id": 4,
                    "name": "Subheading name",
                    "notes": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...",
                    "video": "https:\/\/youtu.be\/Cr0kpcgXIZI",
                    "link_texa": "https:\/\/example.com\/path\/to\/document.html",
                    "link_cojali": "https:\/\/example.com\/path\/to\/document.html",
                    "link_texa2": "https:\/\/example.com\/path\/to\/document.html",
                    "link_cojali2": "https:\/\/example.com\/path\/to\/document.html",
                    "attachments": [
                        {
                            "id": 23,
                            "name": "imagename.png",
                            "file": "zuJNm249hYLKsDk3nuMRprr1y3oc7ZWx.png",
                            "url": "https:\/\/api-cc.com\/storage\/attachments\/zuJNm249hYLKsDk3nuMRprr1y3oc7ZWx.png"
                        }
                    ]
                }
            ]
        }
    ],
    "links": {
        "first": "https:\/\/api-cc.com\/api\/v1\/document?page=1",
        "last": "https:\/\/api-cc.com\/api\/v1\/document?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https:\/\/api-cc.com\/api\/v1\/document",
        "per_page": 100,
        "to": 4,
        "total": 4
    }
}

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/document

Retrieve

Retrieve the document

Route Bindings

Binding Type Status Description
id number required ID of the document

Query Parameters

(no query parameters)

Example request:

curl -X GET \
    -G "https://api-ca.com/api/v1/document/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api-ca.com/api/v1/document/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": {
        "id": 1,
        "engine_id": 1,
        "name": "Document Name",
        "notes": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...",
        "video": "https:\/\/youtu.be\/Cr0kpcgXIZI",
        "link_texa": "https:\/\/example.com\/path\/to\/document.html",
        "link_cojali": "https:\/\/example.com\/path\/to\/document.html",
        "link_texa2": "https:\/\/example.com\/path\/to\/document.html",
        "link_cojali2": "https:\/\/example.com\/path\/to\/document.html",
        "attachments": [
            {
                "id": 3,
                "name": "imagename.jpg",
                "file": "FJ0oSkp4lRBBQ18df8FH46VkNs6kP78X.jpg",
                "url": "https:\/\/api-cc.com\/storage\/attachments\/FJ0oSkp4lRBBQ18df8FH46VkNs6kP78X.jpg"
            }
        ],
        "parts": [
            {
                "id": 2,
                "document_id": 4,
                "name": "Subheading name",
                "notes": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...",
                "video": "https:\/\/youtu.be\/Cr0kpcgXIZI",
                "link_texa": "https:\/\/example.com\/path\/to\/document.html",
                "link_cojali": "https:\/\/example.com\/path\/to\/document.html",
                "link_texa2": "https:\/\/example.com\/path\/to\/document.html",
                "link_cojali2": "https:\/\/example.com\/path\/to\/document.html",
                "attachments": [
                    {
                        "id": 23,
                        "name": "ball.png",
                        "file": "zuJNm249hYLKsDk3nuMRprr1y3oc7ZWx.png",
                        "url": "https:\/\/api-cc.com\/storage\/attachments\/zuJNm249hYLKsDk3nuMRprr1y3oc7ZWx.png"
                    }
                ]
            }
        ]
    }
}

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/document/{id}

Engine

List

Retrieve all engines

Route Bindings

(no route bindings)

Query Parameters

Parameter Type Status Description
make_id integer optional ID of the make
sort_by string optional what column to sort the results on
sort_dir string optional sort direction; defaults to asc
Possible values: asc or desc
page number optional which page of results to return; defaults to 1
per_page number optional how many rows to return per page; defaults to 300, maximum 300

Example request:

curl -X GET \
    -G "https://api-ca.com/api/v1/engine" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api-ca.com/api/v1/engine"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": [
        {
            "id": 1,
            "industry_id": 3,
            "name": "Komatsu"
        }
    ],
    "links": {
        "first": "https:\/\/api-cc.com\/api\/v1\/make?page=1",
        "last": "https:\/\/api-cc.com\/api\/v1\/make?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https:\/\/api-cc.com\/api\/v1\/make",
        "per_page": 100,
        "to": 2,
        "total": 2
    }
}

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/engine

Industry

List

Retrieve all industries

Route Bindings

(no route bindings)

Query Parameters

Parameter Type Status Description
sort_by string optional what column to sort the results on
sort_dir string optional sort direction; defaults to asc
Possible values: asc or desc
page number optional which page of results to return; defaults to 1
per_page number optional how many rows to return per page; defaults to 300, maximum 300

Example request:

curl -X GET \
    -G "https://api-ca.com/api/v1/industry" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api-ca.com/api/v1/industry"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

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

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/industry

Make

List

Retrieve all makes

Route Bindings

(no route bindings)

Query Parameters

Parameter Type Status Description
industry_id integer optional ID of the industry
sort_by string optional what column to sort the results on
sort_dir string optional sort direction; defaults to asc
Possible values: asc or desc
page number optional which page of results to return; defaults to 1
per_page number optional how many rows to return per page; defaults to 300, maximum 300

Example request:

curl -X GET \
    -G "https://api-ca.com/api/v1/make" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api-ca.com/api/v1/make"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": [
        {
            "id": 1,
            "industry_id": 3,
            "name": "Komatsu"
        }
    ],
    "links": {
        "first": "https:\/\/api-cc.com\/api\/v1\/make?page=1",
        "last": "https:\/\/api-cc.com\/api\/v1\/make?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https:\/\/api-cc.com\/api\/v1\/make",
        "per_page": 100,
        "to": 2,
        "total": 2
    }
}

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/make