Truck

Quick Reference

Method

Endpoint

Description

GET

/api/company/{companyId}/truck

POST

/api/company/{companyId}/truck

PUT

/api/company/{companyId}/truck/{truckId}

DELETE

/api/company/{companyId}/truck/{truckId}

GET /api/company/{companyId}/truck

Parameters:

Path Parameters:

  • companyId (string, path) (required): No description available

Query Parameters:

  • onlyOwnTrucks (boolean, query): No description available

Example Request:

from ABConnect import ABConnectAPI

# Initialize the API client
api = ABConnectAPI()

# Make the API call
response = api.raw.get(
    "/api/company/{companyId}/truck"
,
    companyId=ed282b80-54fe-4f42-bf1b-69103ce1f76c

)

# Process the response
print(response)

Sample Response:

1{
2  "status": "success",
3  "data": {}
4}

POST /api/company/{companyId}/truck

Parameters:

Path Parameters:

  • companyId (string, path) (required): No description available

Example Request:

from ABConnect import ABConnectAPI

# Initialize the API client
api = ABConnectAPI()

# Make the API call
response = api.raw.post(
    "/api/company/{companyId}/truck"
,
    companyId="ed282b80-54fe-4f42-bf1b-69103ce1f76c"
,
    data=
    {
        "example": "data"
}

)

# Process the response
print(response)

Sample Response:

1{
2  "id": "789e0123-e89b-12d3-a456-426614174002",
3  "status": "created",
4  "message": "Resource created successfully"
5}

PUT /api/company/{companyId}/truck/{truckId}

Parameters:

Path Parameters:

  • companyId (string, path) (required): No description available

  • truckId (integer, path) (required): No description available

Example Request:

from ABConnect import ABConnectAPI

# Initialize the API client
api = ABConnectAPI()

# Make the API call
response = api.raw.put(
    "/api/company/{companyId}/truck/{truckId}"
,
    companyId=ed282b80-54fe-4f42-bf1b-69103ce1f76c
,
    truckId=789e0123-e89b-12d3-a456-426614174002
,
    data=
    {
        "example": "data"
}

)

# Process the response
print(response)

Sample Response:

1{
2  "id": "123e4567-e89b-12d3-a456-426614174000",
3  "status": "updated",
4  "message": "Resource updated successfully"
5}

DELETE /api/company/{companyId}/truck/{truckId}

Parameters:

Path Parameters:

  • companyId (string, path) (required): No description available

  • truckId (integer, path) (required): No description available

Example Request:

from ABConnect import ABConnectAPI

# Initialize the API client
api = ABConnectAPI()

# Make the API call
response = api.raw.delete(
    "/api/company/{companyId}/truck/{truckId}"
,
    companyId=ed282b80-54fe-4f42-bf1b-69103ce1f76c
,
    truckId=789e0123-e89b-12d3-a456-426614174002

)

# Process the response
print(response)

Sample Response:

1{
2  "status": "success",
3  "message": "Resource deleted successfully"
4}