# 7. Get Type List

Get Reference Types — Retrieve reference types for the selected sub-category; returns a standard response envelope (array of types) for dependent dropdowns.

# Overview

Auth
--
Method
GET

# Path

https://partners-api.tocobagus.net/api/v1 /partner/reference/types

# Request

# Query Parameters

Name Type Required Description
subCategoryId string

Required headers: None.

# Request Payload

Request payload: Not used for GET.

# Example Request

curl -X GET "http:///partner/reference/types?subCategoryId=%3CsubCategoryId%3E" \
  -H "Content-Type: application/json" \
const qs = new URLSearchParams({
  "subCategoryId": "<subCategoryId>"
});
const url = "http:///partner/reference/types" + (qs.toString() ? "?" + qs.toString() : "");
const res = await fetch(url, {
  method: "GET",
  headers: {}
});
const json = await res.json();
console.log(json);
qs := url.Values{}
qs.Set("subCategoryId", "<subCategoryId>")
u := "http:///partner/reference/types"
if q := qs.Encode(); q != "" { u = u + "?" + q }
req, _ := http.NewRequest("GET", u, nil)

req.Header.Set("Content-Type","application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
b, _ := io.ReadAll(resp.Body)
fmt.Println(string(b))
var client = java.net.http.HttpClient.newHttpClient();
var req = java.net.http.HttpRequest.newBuilder()
    .uri(java.net.URI.create("http:///partner/reference/types?subCategoryId=%3CsubCategoryId%3E"))
    .header("Content-Type","application/json")
    
    .method("GET", java.net.http.HttpRequest.BodyPublishers.noBody())
    .build();
var res = client.send(req, java.net.http.HttpResponse.BodyHandlers.ofString());
System.out.println(res.body());

# Responses

# Example Responses

{
  "success": true,
  "message": "Types retrieved successfully",
  "data": [
    {
      "id": "6e564d5f-df1e-4884-9e29-67fa9b3483b8",
      "name": "Audio Intercom Stations"
    },
    {
      "id": "e43e3721-bdaf-419d-b055-a82293a1f0dd",
      "name": "Emergency Intercoms"
    }
  ]
}

# Dictionary

None for this endpoint.

# Notes

None for this endpoint.