{
  "name": "edi.acknowledge",
  "group": "edi",
  "summary": "Read a 997 or 999 acknowledgment and say which documents were accepted, which were rejected, and why.",
  "description": "Decodes a Functional Acknowledgment into an answer rather than a code. A 997 reports its verdict as bare letters and numbers — AK5 of R with error 5, AK3 of 7, AK4 element 2 code 7 — which say nothing without a code table. This resolves every one into plain language, points at the failing segment position and element, and, if you supply the control numbers you sent, reconciles them so you can see what was acknowledged, what was rejected, and what never came back at all. Silence is the failure mode that costs money: an unacknowledged document is not a delivered one.",
  "keywords": [
    "997",
    "999",
    "functional acknowledgment",
    "ak5",
    "ak9",
    "edi rejected",
    "was my edi accepted",
    "ack",
    "acknowledgement",
    "edi status",
    "ik5",
    "reconcile 997",
    "edi error codes",
    "rejection reason"
  ],
  "endpoint": "https://fluentedi.com/v1/edi/acknowledge",
  "mcp_name": "edi_acknowledge",
  "makes_network_request": false,
  "parameters": {
    "type": "object",
    "properties": {
      "input": {
        "description": "Raw 997 or 999 acknowledgment text.",
        "type": "string",
        "maxLength": 500000
      },
      "sent": {
        "description": "Transaction set control numbers you sent (ST02 values), to reconcile against. e.g. [\"0001\",\"0002\"].",
        "type": "array",
        "default": [],
        "items": {
          "type": "string"
        }
      }
    },
    "required": [
      "input"
    ],
    "additionalProperties": false
  },
  "examples": [
    {
      "description": "A clean acceptance",
      "url": "https://fluentedi.com/v1/edi/acknowledge?input=ST*997*0001~AK1*SH*1~AK2*856*0001~AK5*A~AK9*A*1*1*1~SE*6*0001~",
      "args": {
        "input": "ST*997*0001~AK1*SH*1~AK2*856*0001~AK5*A~AK9*A*1*1*1~SE*6*0001~"
      }
    },
    {
      "description": "A rejection, decoded down to the element",
      "url": "https://fluentedi.com/v1/edi/acknowledge?input=ST*997*0002~AK1*SH*12~AK2*856*0001~AK3*HL*4**7~AK4*2**7*XX~AK5*R*5~AK9*R*1*1*0~SE*8*0002~",
      "args": {
        "input": "ST*997*0002~AK1*SH*12~AK2*856*0001~AK3*HL*4**7~AK4*2**7*XX~AK5*R*5~AK9*R*1*1*0~SE*8*0002~"
      }
    },
    {
      "description": "Reconcile against what you sent",
      "url": "https://fluentedi.com/v1/edi/acknowledge?input=ST*997*0003~AK1*SH*5~AK2*856*0001~AK5*A~AK9*P*2*2*1~SE*6*0003~&sent=%5B%220001%22%2C%220002%22%5D",
      "args": {
        "input": "ST*997*0003~AK1*SH*5~AK2*856*0001~AK5*A~AK9*P*2*2*1~SE*6*0003~",
        "sent": [
          "0001",
          "0002"
        ]
      }
    }
  ],
  "suggestion": null
}