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

# 경로 수정하기

HTTP Method PATCH, PUT 을 지원합니다.

트래킹 링크의 최종 목적지 및 Fallback 경로를 수정합니다.

<Card title="Try API Request" icon="rectangle-api" horizontal href="https://www.postman.com/airbridge-engineering/workspace/airbridge-api/request/22395869-fd5cd6d3-1056-4214-973d-60cbd2ea1b2c" />

```text PATCH theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
https://api.airbridge.io/v1/tracking-links/{id}/routing
```

<h2 id="경로-수정하기-request">
  Request
</h2>

***

<h3 id="경로-수정하기-headers">
  Headers
</h3>

<ParamField header="Accept-Language" type="string">
  API 요청 및 결과 반환에 사용할 언어를 지정할 수 있습니다. ISO-639-1 포맷을 따릅니다.
</ParamField>

<ParamField header="Content-Type" type="string">
  리소스의 미디어 타입을 나타냅니다. 기본값으로 `application/json`을 사용합니다.
</ParamField>

<ParamField header="Authorization" type="string">
  API 요청에 사용하는 키값입니다. [키값 생성 및 조회 방법](/ko/references/introduction)을 확인하여 획득할 수 있습니다.
</ParamField>

<h3 id="경로-수정하기-path-params">
  Path Params
</h3>

<ParamField path="id" type="string" required>
  트래킹 링크 식별자. `idType`를 활용하면 트래킹 링크 식별자로 트래킹 링크 ID 대신 숏 링크 ID와 트래킹 링크 템플릿 ID를 사용할 수 있습니다. `idType`을 입력하지 않으면 트래킹 링크 식별자로 트래킹 링크 ID를 사용합니다.

  트래킹 링크 ID는 목록 가져오기 API를 통해 확인할 수 있습니다. 숏 링크 ID와 트래킹 링크 템플릿 ID는 에어브릿지 대시보드에서 확인할 수 있습니다.
</ParamField>

<h3 id="경로-수정하기-body-params">
  Body Params
</h3>

<ParamField body="idType" type="string">
  트래킹 링크 식별자의 형식. 기본 설정은 `id`입니다.

  * `id`: 일반적인 트래킹 링크의 식별자입니다. 목록 가져오기 API를 통해 확인할 수 있습니다.
  * `shortId`:  숏 링크 ID입니다. 숏 링크는 숏 링크 형식의 트래킹 링크입니다.
  * `trackingTemplateId`: 트래킹 링크 템플릿의 ID입니다.
</ParamField>

<ParamField body="deeplinkUrl" type="string">
  리다이렉트할 딥링크 URL.

  deeplinkUrl이 없거나 null일 경우 deeplink가 설정되지 않습니다.

  포멧은 다음과 같습니다 : **`URLScheme://path?key=value`**

  올바르지 않은 deeplink URL을 사용할 경우, 딥링크가 정상적으로 동작하지 않거나 **예상치 못한 동작으로 인해 문제가 발생할 수 있습니다.**
</ParamField>

<ParamField body="deeplinkOption" type="object">
  딥링크 옵션

  <Expandable title="하위 변수">
    <ParamField body="deeplinkOption.showAlertForInitialDeeplinkingIssue" type="boolean">
      스탑 오버 페이지

      true : 활성화

      false : 비활성화
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="fallbackPaths" type="object">
  플랫폼별 리다이렉트 경로.

  <Expandable title="하위 변수">
    <ParamField body="fallbackPaths.android" type="enum">
      안드로이드가 리다이렉트될 경로.

      | 벨류            | 설명                        |
      | ------------- | ------------------------- |
      | `google-play` | google play store로 랜딩합니다. |
      | `{HTTP_URL}`  | 설정한 url로 랜딩합니다.           |
    </ParamField>

    <ParamField body="fallbackPaths.ios" type="enum">
      iOS에서 리다이렉트될 경로.

      | 벨류                | 설명               |
      | ----------------- | ---------------- |
      | `itunes-appstore` | appstore로 랜딩합니다. |
      | `{HTTP_URL}`      | 설정한 url로 랜딩합니다.  |
    </ParamField>

    <ParamField body="fallbackPaths.desktop" type="enum">
      데스크톱에서 리다이렉트될 경로.

      | 벨류                | 설명                        |
      | ----------------- | ------------------------- |
      | `google-play`     | google play store로 랜딩합니다. |
      | `itunes-appstore` | appstore로 랜딩합니다.          |
      | `airpage`         | airpage로 랜딩합니다.           |
      | `{HTTP_URL}`      | 설정한 url로 랜딩합니다.           |
    </ParamField>

    <ParamField body="fallbackPaths.option" type="object">
      `fallback`의 옵션을 설정합니다.

      <Expandable title="하위 변수">
        <ParamField body="fallbackPaths.option.iosCustomProductPageId" type="string">
          애플 앱 스토어의 맞춤형 제품 페이지(Custom Product Page)의 ppid.
        </ParamField>

        <ParamField body="fallbackPaths.option.googlePlayCustomStoreListing" type="string">
          구글 플레이 스토어의 맞춤 스토어 등록정보(Custom Store Listing) listing 값.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<RequestExample>
  ```shellscript Request theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  curl -X PATCH 'https://api.airbridge.io/v1/tracking-links/10000/routing' \
    -H 'Accept-Language: ko' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}' \
    -d '{
    "idType": "id",
    "deeplinkOption": {
      "showAlertForInitialDeeplinkingIssue": true
    }
  }'
  ```
</RequestExample>

<h2 id="경로-수정하기-response">
  Response
</h2>

***

### 200

### 404

입력한 필드에 오류가 있거나 해당하는 리소스가 없습니다.

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  {}
  ```

  ```json 404 theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  {
    "type": "about:blank",
    "title": "Not Found",
    "detail": "Resource not found.",
    "status": 404,
    "traceId": "1-6450a21d-2b02e4d533589b625d875399"
  }
  ```
</ResponseExample>
