Enterprises (Private Access)

A dealer must be a Paid Enterprise Customer in order to operate across multiple organizations. Please reference Organizations for the default usage of autoZnetwork. Enterprise functionality is intended for large dealer groups only at this point in time.

Example Usage

To use the enterprise account across the API replace the X-AutozNetwork-Organization-Id header with the X-AutozNetwork-Enterprise-Id header.

GET Request: https://api.autoznetwork.com/v1/inventory

CURL
AUTOZNETWORK_TOKEN="your API token"
AUTOZNETWORK_ENTERPRISE_ID="your enterprise id"

curl -X GET https://api.autoznetwork.com/v1/enterprises \
  -H "Authorization: Bearer $AUTOZNETWORK_TOKEN" \
  -H "X-AutozNetwork-Enterprise-Id: $AUTOZNETWORK_ENTERPRISE_ID" \
  -H 'Accept: application/json'
PHP
<?php 
$apiToken = 'ABCD12345 ...';
$enterpriseId = 'your enterprise id';

$autoZnetwork = new AutozNetwork($apiToken);

$vehicles = $autoznetwork
              ->withEnterprise($enterpriseId)
              ->inventory()
              ->get();

print($vehicles)

List Enterprises

GET Request: https://api.autoznetwork.com/v1/enterprises

CURL
AUTOZNETWORK_TOKEN="your API token"

curl -X GET https://api.autoznetwork.com/v1/enterprises \
  -H "Authorization: Bearer $AUTOZNETWORK_TOKEN" \
  -H 'Accept: application/json'
PHP
<?php 
$apiToken = 'ABCD12345 ...';

$autoZnetwork = new AutozNetwork($apiToken);

$enterprises = $autoznetwork
                  ->enterprises()
                  ->get();

print($enterprises)

Add an Organization to an Enterprise

POST Request: https://api.autoznetwork.com/v1/enterprises/organizations/{AUTOZNETWORK_ORG_ID}

CURL
AUTOZNETWORK_TOKEN="your API token"
AUTOZNETWORK_ENTERPRISE_ID="your enterprise id"
AUTOZNETWORK_ORG_ID="your organization id"

curl -X POST https://api.autoznetwork.com/v1/enterprises/organizations/$AUTOZNETWORK_ORG_ID \
  -H "Authorization: Bearer $AUTOZNETWORK_TOKEN" \
  -H "X-AutozNetwork-Enterprise-Id: $AUTOZNETWORK_ENTERPRISE_ID" \
  -H 'Accept: application/json'
PHP
<?php 
$apiToken = 'ABCD12345 ...';
$enterpriseId = 'your enterprise id';
$organizationId = 'your organization id';

$autoZnetwork = new AutozNetwork($apiToken);

$enterprise = $autoznetwork
                  ->withEnterprise($enterpriseId)
                  ->organization($organizationId)
                  ->add();

print($enterprise)

Remove an Organization from an Enterprise

DELETE Request: https://api.autoznetwork.com/v1/enterprises/organizations/{AUTOZNETWORK_ORG_ID}

CURL
AUTOZNETWORK_TOKEN="your API token"
AUTOZNETWORK_ENTERPRISE_ID="your enterprise id"
AUTOZNETWORK_ORG_ID="your organization id"

curl -X DELETE https://api.autoznetwork.com/v1/enterprises/organizations/$AUTOZNETWORK_ORG_ID \
  -H "Authorization: Bearer $AUTOZNETWORK_TOKEN" \
  -H "X-AutozNetwork-Enterprise-Id: $AUTOZNETWORK_ENTERPRISE_ID" \
  -H 'Accept: application/json'
PHP
<?php 
$apiToken = 'ABCD12345 ...';
$enterpriseId = 'your enterprise id';
$organizationId = 'your organization id';

$autoZnetwork = new AutozNetwork($apiToken);

$enterprise = $autoznetwork
                  ->withEnterprise($enterpriseId)
                  ->organization($organizationId)
                  ->remove();

print($enterprise)