## Hl7Message.getAckType() method [​](/content/docs/sdk/core.hl7message.getacktype#hl7messagegetacktype-method "Direct link to Hl7Message.getAckType(/index.html) method")

Returns this message's acknowledgment code (MSA-1), if it is a recognized HL7 ACK code.

Useful on an ACK message to decide the outcome of the acknowledged message — e.g. AA/CA (accepted) vs AR/CR (rejected) vs AE/CE (error). The value is upper-cased before matching. Returns undefined when there is no MSA segment, MSA-1 is empty, or the value is not a known `AckCode`.

**Signature:**

```typescript
getAckType(): AckCode | undefined;
```

**Returns:**

[AckCode](/content/docs/sdk/core.ackcode) | undefined

The `AckCode`, or undefined.

- [Hl7Message.getAckType() method](/content/docs/sdk/core.hl7message.getacktype#hl7messagegetacktype-method/index.html)
