# Requesting Product Types

## Get product types

<mark style="color:blue;">`GET`</mark> `https://api.disasteraware.com/products/types`

#### Headers

| Name          | Type   | Description                  |
| ------------- | ------ | ---------------------------- |
| Authorization | string | Authorize to access the API. |

{% tabs %}
{% tab title="200 " %}

```
[
    {
        "type": "FOLDER_PRODUCT",
        "description": "Termination"
    },
    {
        "type": "FILE_PRODUCT",
        "description": "Products of this type have an associated multi-media file e.g. PDF, Word Document, associated to them."
    },
    {
        "type": "TEXT_PRODUCT",
        "description": "These products have a text field that contains a message."
    },
    {
        "type": "URL_PRODUCT",
        "description": "These products are hyperlinks to external resources e.g. a web page."
    }
]
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
See [Authorizing Requests](https://api-docs.disasteraware.com/authentication/authorizing-requests#get-accesstoken-and-refreshtoken) page to get your accessToken.
{% endhint %}

{% tabs %}
{% tab title="cURL" %}

```
curl --location --request GET \
  'https://api.disasteraware.com/products/types'
```

{% endtab %}

{% tab title="Java" %}

```
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Scanner;

class Main {

	public static void main(String[] args) throws IOException {
		URL url = new URL("https://api.disasteraware.com/products/types");
		HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
		httpConn.setRequestMethod("GET");

		InputStream responseStream = httpConn.getResponseCode() / 100 == 2
				? httpConn.getInputStream()
				: httpConn.getErrorStream();
		Scanner s = new Scanner(responseStream).useDelimiter("\\A");
		String response = s.hasNext() ? s.next() : "";
		System.out.println(response);
	}
}

```

{% endtab %}

{% tab title="Node.js" %}

```
var fetch = require('node-fetch');

fetch('https://api.disasteraware.com/products/types');

```

{% endtab %}

{% tab title="PHP" %}

```
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array();
$response = Requests::get('https://api.disasteraware.com/products/types', $headers);

```

{% endtab %}

{% tab title="Python" %}

```
import requests

response = requests.get('https://api.disasteraware.com/products/types')

```

{% endtab %}
{% endtabs %}

A product will come in one of the four following types:

| Types               | Definitions                                                                                                    |
| ------------------- | -------------------------------------------------------------------------------------------------------------- |
| **FOLDER\_PRODUCT** | These products are used to organize products into logical hierarchies in the DisasterAWARE client application. |
| **FILE\_PRODUCT**   | Products of this type have an associated multi-media file e.g. PDF, Word Document, associated with them.       |
| **TEXT\_PRODUCT**   | These products have a text field that contains a message.                                                      |
| **URL\_PRODUCT**    | These products are hyperlinks to external resources e.g. a web page.                                           |
