Vehicle Assets (Private Access)

Vehicle Assets are additional files that can be associated with the vehicle. The following extensions are supported.

File TypeSupported Extensions
Video.mp4

List Assets for a Vehicle

GET Request: https://api.autoznetwork.com/v1/inventory/{INVENTORY_ID}/assets

CURL
AUTOZNETWORK_TOKEN="your API token"
AUTOZNETWORK_ORG_ID="your organization id"
AUTOZNETWORK_INVENTORY_ID="your vehicle id"

curl https://api.autoznetwork.com/v1/inventory/$AUTOZNETWORK_INVENTORY_ID/assets \
  -H "Authorization: Bearer $AUTOZNETWORK_TOKEN" \
  -H "X-AutozNetwork-Organization-Id: $AUTOZNETWORK_ORG_ID" \
  -H 'Accept: application/json'
PHP
<?php 
$apiToken = 'ABCD12345 ...';
$organizationId = '1234';
$inventoryId = 'your vehicle id';

$autoZnetwork = new AutozNetwork($apiToken);

$assets = $autoznetwork
              ->withOrganization($organizationId)
              ->inventory($inventoryId)
              ->assets()
              ->get();

print($assets)

Add Assets to a Vehicle

POST Request: https://api.autoznetwork.com/v1/inventory/{INVENTORY_ID}/assets

CURL
AUTOZNETWORK_TOKEN="your API token"
AUTOZNETWORK_ORG_ID="your organization id"
AUTOZNETWORK_INVENTORY_ID="your vehicle id"

curl -X POST https://api.autoznetwork.com/v1/inventory/$AUTOZNETWORK_INVENTORY_ID/assets \
  -H "Authorization: Bearer $AUTOZNETWORK_TOKEN" \
  -H "X-AutozNetwork-Organization-Id: $AUTOZNETWORK_ORG_ID" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    'url':
      'http://yourdomain.com/video.mp4'
  }
PHP
<?php 
$apiToken = 'ABCD12345 ...';
$organizationId = '1234';
$inventoryId = 'your vehicle id';

$autoZnetwork = new AutozNetwork($apiToken);

$assets = $autoznetwork
              ->withOrganization($organizationId)
              ->inventory($inventoryId)
              ->assets()
              ->create('http://yourdomain.com/video.mp4');

print($assets)

Delete an Asset from a Vehicle

DELETE Request: https://api.autoznetwork.com/v1/inventory/{INVENTORY_ID}/assets/{ASSET_ID}

CURL
AUTOZNETWORK_TOKEN="your API token"
AUTOZNETWORK_ORG_ID="your organization id"
AUTOZNETWORK_INVENTORY_ID="your vehicle id"
AUTOZNETNETWORK_ASSET_ID="your vehicle asset id"

curl -X DELETE https://api.autoznetwork.com/v1/inventory/$AUTOZNETWORK_INVENTORY_ID/assets/$AUTOZNETNETWORK_ASSET_ID \
  -H "Authorization: Bearer $AUTOZNETWORK_TOKEN" \
  -H "X-AutozNetwork-Organization-Id: $AUTOZNETWORK_ORG_ID" \
  -H 'Accept: application/json'
PHP
<?php 
$apiToken = 'ABCD12345 ...';
$organizationId = '1234';
$inventoryId = 'your vehicle id';
$assetId = 'your vehicle asset id';

$autoZnetwork = new AutozNetwork($apiToken);

$asset = $autoznetwork
              ->withOrganization($organizationId)
              ->inventory($inventoryId)
              ->assets($assetId)
              ->delete();

print($asset)