> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useautumn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Licenses

> Lists a customer's license pools and available seats.

export const DynamicResponseExample = ({json, statusCode = "200"}) => {
  const toCamelCase = str => {
    return str.replace(/_([a-z])/g, (_, c) => c.toUpperCase());
  };
  const convertKeysToCamelCase = obj => {
    if (Array.isArray(obj)) {
      return obj.map(item => convertKeysToCamelCase(item));
    }
    if (obj !== null && typeof obj === "object") {
      return Object.keys(obj).reduce((acc, key) => {
        const camelKey = toCamelCase(key);
        acc[camelKey] = convertKeysToCamelCase(obj[key]);
        return acc;
      }, {});
    }
    return obj;
  };
  const [isTypeScript, setIsTypeScript] = useState(() => {
    if (typeof window !== "undefined") {
      try {
        const lang = localStorage.getItem("code");
        return JSON.parse(lang) === "typescript";
      } catch {
        return true;
      }
    }
    return true;
  });
  useEffect(() => {
    const onMintlifyStorage = event => {
      if (event.detail?.key === "code") {
        try {
          const value = JSON.parse(event.detail.value);
          setIsTypeScript(value === "typescript");
        } catch {}
      }
    };
    const pollInterval = setInterval(() => {
      try {
        const lang = localStorage.getItem("code");
        const value = JSON.parse(lang);
        setIsTypeScript(value === "typescript");
      } catch {}
    }, 300);
    document.addEventListener("mintlify-localstorage", onMintlifyStorage);
    return () => {
      document.removeEventListener("mintlify-localstorage", onMintlifyStorage);
      clearInterval(pollInterval);
    };
  }, []);
  const camelCaseJson = useMemo(() => convertKeysToCamelCase(json), [json]);
  const snakeCaseString = JSON.stringify(json, null, 2);
  const camelCaseString = JSON.stringify(camelCaseJson, null, 2);
  return <ResponseExample>
			{isTypeScript ? <CodeBlock language="json" filename={statusCode}>
					{camelCaseString}
				</CodeBlock> : <CodeBlock language="json" filename={statusCode}>
					{snakeCaseString}
				</CodeBlock>}
		</ResponseExample>;
};

export const DynamicResponseField = ({children, name, ...props}) => {
  const convertToCamelCase = str => {
    if (typeof str !== "string") return str;
    return str.replace(/[_-](\w)/g, (_, c) => c.toUpperCase());
  };
  const [lang, setLang] = useState(() => {
    if (typeof window !== "undefined") {
      const stored = localStorage.getItem("code");
      return stored || '"typescript"';
    }
    return '"typescript"';
  });
  useEffect(() => {
    const onMintlifyStorage = event => {
      const key = event.detail?.key;
      if (key === "code") {
        setLang(event.detail.value);
      }
    };
    const pollInterval = setInterval(() => {
      const current = localStorage.getItem("code");
      if (current && current !== lang) {
        setLang(current);
      }
    }, 500);
    document.addEventListener("mintlify-localstorage", onMintlifyStorage);
    return () => {
      document.removeEventListener("mintlify-localstorage", onMintlifyStorage);
      clearInterval(pollInterval);
    };
  }, [lang]);
  const resolvedName = useMemo(() => {
    try {
      const value = JSON.parse(lang);
      const useCamelCase = value === "typescript";
      return useCamelCase ? convertToCamelCase(name) : name;
    } catch {
      return name;
    }
  }, [name, lang]);
  return <ResponseField name={resolvedName} {...props}>
			{children}
		</ResponseField>;
};

export const DynamicParamField = ({children, body, path, ...props}) => {
  const convertToCamelCase = str => {
    if (typeof str !== "string") return str;
    return str.replace(/[_-](\w)/g, (_, c) => c.toUpperCase());
  };
  const [lang, setLang] = useState(() => {
    if (typeof window !== "undefined") {
      const stored = localStorage.getItem("code");
      return stored || '"typescript"';
    }
    return '"typescript"';
  });
  useEffect(() => {
    const onMintlifyStorage = event => {
      const key = event.detail?.key;
      if (key === "code") {
        setLang(event.detail.value);
      }
    };
    const pollInterval = setInterval(() => {
      const current = localStorage.getItem("code");
      if (current && current !== lang) {
        setLang(current);
      }
    }, 500);
    document.addEventListener("mintlify-localstorage", onMintlifyStorage);
    return () => {
      document.removeEventListener("mintlify-localstorage", onMintlifyStorage);
      clearInterval(pollInterval);
    };
  }, [lang]);
  const resolvedBody = useMemo(() => {
    try {
      const value = JSON.parse(lang);
      const useCamelCase = value === "typescript";
      return useCamelCase ? convertToCamelCase(body) : body;
    } catch {
      return body;
    }
  }, [body, lang]);
  const resolvedPath = useMemo(() => {
    try {
      const value = JSON.parse(lang);
      const useCamelCase = value === "typescript";
      return useCamelCase ? convertToCamelCase(path) : path;
    } catch {
      return path;
    }
  }, [path, lang]);
  return <ParamField body={resolvedBody} path={resolvedPath} {...props}>
			{children}
		</ParamField>;
};

### Body Parameters

<DynamicParamField body="customer_id" type="string" required />

<DynamicParamField body="entity_id" type="string" />

### Response

<DynamicResponseField name="list" type="object[]">
  <Expandable title="properties">
    <DynamicResponseField name="license_plan_id" type="string">
      The plan offered as an assignable license.
    </DynamicResponseField>

    <DynamicResponseField name="parent_plan_id" type="string">
      The plan that offers this license.
    </DynamicResponseField>

    <DynamicResponseField name="license_plan_name" type="string">
      Display name of the license plan.
    </DynamicResponseField>

    <DynamicResponseField name="granted" type="number">
      Total seats the customer has for this license, included plus paid.
    </DynamicResponseField>

    <DynamicResponseField name="usage" type="number">
      Seats currently assigned to entities.
    </DynamicResponseField>

    <DynamicResponseField name="remaining" type="number">
      Seats still available to assign.
    </DynamicResponseField>

    <DynamicResponseField name="paid_quantity" type="number">
      Paid seats purchased on top of the plan's included amount.
    </DynamicResponseField>
  </Expandable>
</DynamicResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "list": [
      {
        "license_plan_id": "seat_plan",
        "parent_plan_id": "pro_plan",
        "license_plan_name": "Seat",
        "granted": 10,
        "usage": 3,
        "remaining": 7,
        "paid_quantity": 5
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi POST /v1/licenses.list
openapi: 3.1.0
info:
  title: Autumn API
  version: 2.3.0
servers:
  - url: https://api.useautumn.com
    description: Production server
security:
  - secretKey: []
paths:
  /v1/licenses.list:
    post:
      tags:
        - licenses
      description: Lists a customer's license pools and available seats.
      operationId: listLicenses
      parameters:
        - name: x-api-version
          in: header
          required: true
          schema:
            type: string
            default: 2.3.0
          x-speakeasy-globals-hidden: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: string
                entity_id:
                  type: string
              required:
                - customer_id
              title: ListLicensesParams
              examples:
                - customer_id: cus_123
            example:
              customer_id: cus_123
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  list:
                    type: array
                    items:
                      type: object
                      properties:
                        license_plan_id:
                          type: string
                          description: The plan offered as an assignable license.
                        parent_plan_id:
                          type: string
                          description: The plan that offers this license.
                        license_plan_name:
                          type: string
                          description: Display name of the license plan.
                        granted:
                          type: number
                          description: >-
                            Total seats the customer has for this license,
                            included plus paid.
                        usage:
                          type: number
                          description: Seats currently assigned to entities.
                        remaining:
                          type: number
                          description: Seats still available to assign.
                        paid_quantity:
                          type: number
                          description: >-
                            Paid seats purchased on top of the plan's included
                            amount.
                      required:
                        - license_plan_id
                        - parent_plan_id
                        - license_plan_name
                        - granted
                        - usage
                        - remaining
                        - paid_quantity
                required:
                  - list
                examples:
                  - list:
                      - license_plan_id: seat_plan
                        parent_plan_id: pro_plan
                        license_plan_name: Seat
                        granted: 10
                        usage: 3
                        remaining: 7
                        paid_quantity: 5
              example:
                list:
                  - license_plan_id: seat_plan
                    parent_plan_id: pro_plan
                    license_plan_name: Seat
                    granted: 10
                    usage: 3
                    remaining: 7
                    paid_quantity: 5
components:
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````