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

# Get Treatment

> API to fetch the details of a single treatment by ID

<Note>
  日本語版はAIによる翻訳です。正確な情報については[英語版](/api-reference/treatment-management/get-treatment)をご参照ください。
</Note>

このドキュメントでは、トリートメントIDを指定して単一のトリートメントを取得できるGetTreatment RPCのガイドと概要を提供します。

## API定義

```url theme={null}
POST https://apis.auxia.io/v1/GetTreatment
```

## エンティティ

### TreatmentPb

```
message TreatmentPb {
  string project_id = 1;
  string treatment_id = 2;
  TreatmentTypePb treatment_type = 3;
  string name = 4;
  string description = 5;
  repeated TreatmentVersionPb treatment_versions = 6;
  Status status = 7;
  string last_modified_by = 8;
  google.protobuf.Timestamp last_modified_timestamp = 9;
  ModificationSource modification_source = 10;
  string external_treatment_id = 11;
  optional MutualExclusionGroupPb mutual_exclusion_group = 12;

  enum Status {
    STATUS_UNSPECIFIED = 0;
    LIVE = 1;
    DRAFT = 2;
    SCHEDULED = 3;
    ARCHIVED = 4;
    PAUSED = 5;
  }

  enum ModificationSource {
    MODIFICATION_SOURCE_UNSPECIFIED = 0;
    AUXIA_CONSOLE = 1;
    API = 2;
  }
}
```

## GetTreatment

### IDを指定して単一のトリートメントの詳細を取得するAPI

```
message GetTreatmentRequest {
  // Required
  string project_id = 1;

  // Required
  string treatment_id = 2;
}

message GetTreatmentResponse {
  TreatmentPb treatment = 1;
}
```

### サンプルcURLリクエスト

```
curl --location --request POST 'https://apis.auxia.io/v1/GetTreatment' \
--header 'Content-Type: application/json' \
--header 'x-api-key: API_KEY' \
--data-raw '{
  "project_id": "PROJECT_ID",
  "treatment_id": "TREATMENT_ID"
}'
```

### サンプルレスポンス

```
treatment {
  project_id: "PROJECT_ID"
  treatment_id: "TREATMENT_ID"
  treatment_type {
    project_id: "PROJECT_ID"
    name: "TREATMENT_TYPE"
    delivery_type: EMAIL
    language_specific_content_field_types {
      field_name: "title"
      value_length_limit: 300
      data_type: STRING
    }
    language_specific_content_field_types {
      field_name: "body"
      value_length_limit: 800
      data_type: STRING
    }
    surfaces {
      name: "SURFACE"
    }
  }
  name: "NAME"
  description: "DESCRIPTION"
  treatment_versions {
    status: LIVE
    tags {
      name: "TAG_1"
    }
    start_timestamp {
      seconds: 1717200000
    }
    end_timestamp {
      seconds: 1735689599
    }
    content {
      content_by_language {
        language_code {
          language_code: "en"
        }
        content_fields {
          field_name: "title"
          string_value: "TITLE"
        }
        content_fields {
          field_name: "body"
          string_value: "BODY"
        }
      }
    }
    eligibility_rules {
      rules {
        data_field_id: DATA_FIELD_ID
        condition: GREATER_THAN
        rhs_value: "100"
      }
    }
    target_action {
      event_id: EVENT_ID
    }
  }
  status: LIVE
  last_modified_by: "user@example.com"
  last_modified_timestamp {
    seconds: 1717200000
  }
  modification_source: API
  mutual_exclusion_group {
    project_id: PROJECT_ID
    mutual_exclusion_group_id: MEG_ID
    name: "MUTUAL_EXCLUSION_GROUP"
  }
}
```
