Truck ===== Quick Reference --------------- .. list-table:: :header-rows: 1 :widths: 10 40 50 * - 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-apicompanycompanyidtruck: 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:** .. tabs:: .. tab:: Python .. code-block:: python 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) .. tab:: CLI .. code-block:: bash ab api raw get /api/company/{companyId}/truck \ companyId=ed282b80-54fe-4f42-bf1b-69103ce1f76c .. tab:: curl .. code-block:: bash curl -X GET \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ 'https://api.abconnect.co/api/company/ed282b80-54fe-4f42-bf1b-69103ce1f76c/truck' **Sample Response:** .. toggle:: .. code-block:: json :linenos: { "status": "success", "data": {} } ---- .. _post-apicompanycompanyidtruck: POST /api/company/{companyId}/truck ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **Parameters:** *Path Parameters:* - `companyId` (string, path) *(required)*: No description available **Example Request:** .. tabs:: .. tab:: Python .. code-block:: python 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) .. tab:: CLI .. code-block:: bash ab api raw post /api/company/{companyId}/truck \ companyId=ed282b80-54fe-4f42-bf1b-69103ce1f76c .. tab:: curl .. code-block:: bash curl -X POST \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "example": "data" }' \ 'https://api.abconnect.co/api/company/ed282b80-54fe-4f42-bf1b-69103ce1f76c/truck' **Sample Response:** .. toggle:: .. code-block:: json :linenos: { "id": "789e0123-e89b-12d3-a456-426614174002", "status": "created", "message": "Resource created successfully" } ---- .. _put-apicompanycompanyidtrucktruckid: 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:** .. tabs:: .. tab:: Python .. code-block:: python 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) .. tab:: CLI .. code-block:: bash ab api raw put /api/company/{companyId}/truck/{truckId} \ companyId=ed282b80-54fe-4f42-bf1b-69103ce1f76c \ truckId=789e0123-e89b-12d3-a456-426614174002 .. tab:: curl .. code-block:: bash curl -X PUT \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "example": "data" }' \ 'https://api.abconnect.co/api/company/ed282b80-54fe-4f42-bf1b-69103ce1f76c/truck/789e0123-e89b-12d3-a456-426614174002' **Sample Response:** .. toggle:: .. code-block:: json :linenos: { "id": "123e4567-e89b-12d3-a456-426614174000", "status": "updated", "message": "Resource updated successfully" } ---- .. _delete-apicompanycompanyidtrucktruckid: 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:** .. tabs:: .. tab:: Python .. code-block:: python 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) .. tab:: CLI .. code-block:: bash ab api raw delete /api/company/{companyId}/truck/{truckId} \ companyId=ed282b80-54fe-4f42-bf1b-69103ce1f76c \ truckId=789e0123-e89b-12d3-a456-426614174002 .. tab:: curl .. code-block:: bash curl -X DELETE \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ 'https://api.abconnect.co/api/company/ed282b80-54fe-4f42-bf1b-69103ce1f76c/truck/789e0123-e89b-12d3-a456-426614174002' **Sample Response:** .. toggle:: .. code-block:: json :linenos: { "status": "success", "message": "Resource deleted successfully" }