Get all inventory

  curl "https://kushy.net/api/v1/inventory/"
var api = 'https://kushy.net/api/v1/inventory/';
fetch(api)
    .then(function(response) {
        if (!response.ok) {
            console.log(response.statusText);
            return response.json();
        }
    });
<?php
$client = new GuzzleHttp\Client(['base_uri' => 'https://kushy.net/api/v1/']);
$apiEndpoint = 'inventory';

$response = $client->request('GET', $apiEndpoint);
$response = json_decode($response->getBody()->getContents(), true);

echo 'State Name'. $response['california']['title'];
echo 'State Slug'. $response['california']['slug'];
foreach($response['california']['cities'] as $city) {
    echo $city
}
?>

The above command returns JSON structured like this:

{
}

This endpoint retrieves all US states and their city data.

HTTP Request

GET https://kushy.net/api/v1/inventory/

The states object

Attributes Type Description
[ stateName ] object State object (see specific state section)