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

# Create jurisdiction exemption

> Add a new jurisdiction exemption to an exemption certificate

Creates a new jurisdiction exemption for an existing exemption certificate.

<ParamField path="exemption_certificate_id" type="string" required>
  The unique identifier of the exemption certificate.
</ParamField>

<ParamField body="country" type="string" required>
  ISO 3166-1 alpha-2 country code. Currently only "US" is supported.
</ParamField>

<ParamField body="state" type="string" required>
  ISO 3166-2 subdivision code (e.g., "CA" for California).
</ParamField>

<ParamField body="reason" type="string" required>
  The reason for the exemption. Valid values:

  * `PURPOSE_RESALE`
  * `ENTITY_TYPE_NON_PROFIT`
  * `GOVERNMENT`
  * `MANUFACTURER`
  * `AGRICULTURAL`
  * `OTHER`
</ParamField>

<ParamField body="identification_type" type="string" required>
  The type of identification for the exemption.
</ParamField>

<ParamField body="identification_number" type="string" required>
  The identification number for the exemption.
</ParamField>

<ParamField body="end_date" type="string">
  The end date of the exemption in ISO 8601 format (YYYY-MM-DD).
</ParamField>

<ParamField body="is_active" type="boolean">
  Whether the exemption is active. Defaults to true.
</ParamField>

<ResponseField name="exemption" type="object">
  The created jurisdiction exemption.

  <Expandable title="Jurisdiction exemption object">
    <ResponseField name="country" type="string" required>
      ISO 3166-1 alpha-2 country code.
    </ResponseField>

    <ResponseField name="state" type="string" required>
      ISO 3166-2 subdivision code.
    </ResponseField>

    <ResponseField name="reason" type="string" required>
      The reason for the exemption.
    </ResponseField>

    <ResponseField name="identification_type" type="string" required>
      The type of identification.
    </ResponseField>

    <ResponseField name="identification_number" type="string" required>
      The identification number.
    </ResponseField>

    <ResponseField name="is_active" type="boolean" required>
      Whether the exemption is active.
    </ResponseField>

    <ResponseField name="is_expired" type="boolean" required>
      Whether the exemption has expired.
    </ResponseField>

    <ResponseField name="end_date" type="string">
      The end date of the exemption.
    </ResponseField>

    <ResponseField name="created_at" type="integer" required>
      Unix timestamp of when the exemption was created.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 201 theme={null}
  {
    "message": "Successfully created exemption.",
    "data": {
      "country": "US",
      "state": "CA",
      "reason": "PURPOSE_RESALE",
      "identification_type": "STATE_TAX_ID",
      "identification_number": "12-3456789",
      "is_active": true,
      "is_expired": false,
      "end_date": "2025-12-31",
      "created_at": 1704067200
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": {
      "code": "DUPLICATE_STATE_FOR_CERTIFICATE",
      "message": "A jurisdiction exemption already exists for this state"
    }
  }
  ```

  ```json 404 theme={null}
  {
    "error": {
      "code": "EXEMPTION_CERTIFICATE_NOT_FOUND",
      "message": "Exemption certificate not found"
    }
  }
  ```
</ResponseExample>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://transaction-tax.api.in.commenda.io/api/v1/exemption-certificates/{exemption_certificate_id}/jurisdictions' \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "country": "US",
      "state": "CA",
      "reason": "PURPOSE_RESALE",
      "identification_type": "STATE_TAX_ID",
      "identification_number": "12-3456789",
      "end_date": "2025-12-31",
      "is_active": true
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://transaction-tax.api.in.commenda.io/api/v1/exemption-certificates/{exemption_certificate_id}/jurisdictions', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer <token>',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      country: 'US',
      state: 'CA',
      reason: 'PURPOSE_RESALE',
      identification_type: 'STATE_TAX_ID',
      identification_number: '12-3456789',
      end_date: '2025-12-31',
      is_active: true
    })
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
    'https://transaction-tax.api.in.commenda.io/api/v1/exemption-certificates/{exemption_certificate_id}/jurisdictions',
    headers={'Authorization': 'Bearer <token>'},
    json={
      'country': 'US',
      'state': 'CA',
      'reason': 'PURPOSE_RESALE',
      'identification_type': 'STATE_TAX_ID',
      'identification_number': '12-3456789',
      'end_date': '2025-12-31',
      'is_active': True
    }
  )

  data = response.json()
  ```
</RequestExample>
