---
title: Ik5Segment
summary: API reference for Ik5Segment.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-15
library: SAIF.Framework.Common.Files
reference_type: package
---

# Ik5Segment

`Ik5Segment` models the X12 IK5 transaction-set response trailer, the segment within a 999 functional acknowledgement that reports the overall accept/reject disposition for a single acknowledged transaction set. Beyond the standard `Build`/`Fill`/`Parse` members, it exposes two static convenience factories, `Acknowledgement()` and `Reject()`, that directly build an IK5 segment carrying response code `"A"` or `"R"` respectively ([BR-053](../../business-rules.md#br-053-ik5-acknowledgement-or-reject-response-codes)).

## Purpose
- Represents the IK5 segment identity via `SegmentId` returning the literal `"IK5"` ([BR-020](../../business-rules.md#br-020-first-element-is-the-segment-identifier)).
- Carries `ResponseCode`, the accept/reject disposition code for the acknowledged transaction set.
- Provides `Acknowledgement()` and `Reject()` static factories that construct and build an IK5 segment with response code `"A"` (accepted) or `"R"` (rejected) in a single call, without requiring the caller to instantiate and populate an `Ik5Segment` manually ([BR-053](../../business-rules.md#br-053-ik5-acknowledgement-or-reject-response-codes)).

## Context
- Namespace: `SAIF.Common.Files.Edi.Segments`
- Assembly/package: `SAIF.Framework.Common.Files`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| SegmentId | `string SegmentId { get; }` | Returns the literal X12 segment identifier `"IK5"`. |
| ResponseCode | `string ResponseCode { get; set; }` | The accept/reject disposition code for the transaction set (IK501), element 1 ([BR-053](../../business-rules.md#br-053-ik5-acknowledgement-or-reject-response-codes)). |
| Build | `IEdiSegment Build()` | Creates a `SegmentBuilder("IK5")` and adds `ResponseCode` at element 1, returning the built segment. |
| Fill | `void Fill(IEdiSegment segment)` | Reads element 1 via `GetChildValue` into `ResponseCode`. |
| Parse | `static Ik5Segment Parse(IEdiSegment segment)` | Instantiates a new `Ik5Segment`, calls `Fill(segment)` on it, and returns it. |
| Acknowledgement | `static IEdiSegment Acknowledgement()` | Constructs a new `Ik5Segment` with `ResponseCode` set to `"A"` and immediately calls `Build()` on it, returning the built accept segment ([BR-053](../../business-rules.md#br-053-ik5-acknowledgement-or-reject-response-codes)). |
| Reject | `static IEdiSegment Reject()` | Constructs a new `Ik5Segment` with `ResponseCode` set to `"R"` and immediately calls `Build()` on it, returning the built reject segment ([BR-053](../../business-rules.md#br-053-ik5-acknowledgement-or-reject-response-codes)). |

## Sources
- Common\SAIF.Common.Files\Edi\Segments\Ik5Segment.cs
