# Flex request XML samples (plain text)

Companion to [KNOWLEDGE-SIGNiX-FOR-AI-AGENTS.md](./KNOWLEDGE-SIGNiX-FOR-AI-AGENTS.md) (see that file’s **Agent reading list** for what to load per task).

**Why this file exists:** Some coding tools cannot usefully read the [Postman FlexAPI collection](https://documenter.getpostman.com/view/53111289/2sBYB1MTVQ), and the main Flex API page is too large to dump into an AI context window. A **plain XML sample per common method** is enough to copy shape and child order. Replace placeholders; do not commit real passwords.

**Transport (every method below):**

- `POST` `application/x-www-form-urlencoded`
- `method` = root element name with `Rq` removed (e.g. `SubmitDocumentRq` → `SubmitDocument`)
- `request` = the full XML document

Webtest: `https://webtest.signix.biz/sdd/b2b/sdddc_ns.jsp`  
Production: `https://signix.net/sdd/b2b/sdddc_ns.jsp`

---

## Schema validation (what to expect)

| Need | Reality |
|------|---------|
| **Live validation** | Prefer the **Webtest** B2B endpoint. Schema/content errors come back in the Flex response (`StatusCode` / `StatusDesc`). Messages often name **one** offending element at a time (e.g. unexpected `Demo` or `FieldType`)—fix, fix, resubmit. |
| **Offline / bulk XSD** | Do **not** rely on older packaged Flex XSD / “Supporting Files” schema ZIPs—they can be **out of date** relative to the live service. Do not invent a private XSD that “looks like” Flex either. |
| **Best offline check** | Diff your XML against the samples in this file and the [tagging cheat sheet](./FORM-TAGGING-ELEMENTS-CHEAT-SHEET.md), then confirm against current [Flex API docs](https://www.signix.com/apidocumentation) / Webtest. |

---

## Placeholders

| Token | Meaning |
|-------|---------|
| `YOUR_SPONSOR` / `YOUR_CLIENT` / `YOUR_USER` / `YOUR_PASSWORD` / `YOUR_WORKGROUP` | CustInfo from SIGNiX |
| `YOUR_DOCUMENT_SET_ID` | From SubmitDocument response |
| `YOUR_TRANSACTION_ID` | Your 36-char client id (when used) |
| `BASE64_PDF` | Base64 of a **real PDF** |
| `PDF_BYTE_LENGTH` | **Decoded** PDF byte length (not Base64 string length) |

---

## 1. SubmitDocument (minimal — one signer, AcroForm-style line)

`method=SubmitDocument`  
**CustInfo includes `Demo` (required here only).**

```xml
<?xml version="1.0"?>
<SubmitDocumentRq xmlns="urn:com:signix:schema:sdddc-1-1">
  <CustInfo>
    <Sponsor>YOUR_SPONSOR</Sponsor>
    <Client>YOUR_CLIENT</Client>
    <UserId>YOUR_USER</UserId>
    <Pswd>YOUR_PASSWORD</Pswd>
    <Workgroup>YOUR_WORKGROUP</Workgroup>
    <Demo>yes</Demo>
  </CustInfo>
  <Data>
    <TransactionID>YOUR_TRANSACTION_ID</TransactionID>
    <DocSetDescription>Sample - One Signer</DocSetDescription>
    <SubmitterEmail>submitter@example.com</SubmitterEmail>
    <SubmitterName>Sample Submitter</SubmitterName>
    <ContactInfo></ContactInfo>
    <DeliveryType>SDDDC</DeliveryType>
    <SuspendOnStart>no</SuspendOnStart>
    <!-- Optional: include the next two ClientPreferences ONLY if you want a per-transaction
         push URL. If push is already configured at the SIGNiX account level (Base URL), omit them. -->
    <!--
    <ClientPreference name="UseClientNotifyVersion2">yes</ClientPreference>
    <ClientPreference name="TransactionClientNotifyURL">https://your-app.example.com/signix/push</ClientPreference>
    -->
    <!-- Optional: per-transaction reminder + expiry schedule. Earlier numbers = reminders;
         last number = transaction expiry. Omit to use the account / SIGNiX default schedule.
         Units may be days, hours, or minutes (no space before the unit). -->
    <ClientPreference name="NotificationSchedule">{3,5,7,10}days</ClientPreference>
    <MemberInfo>
      <RefID>Signer 1</RefID>
      <SSN>910000000</SSN>
      <DOB>00/00/0000</DOB>
      <FirstName>Sam</FirstName>
      <MiddleName></MiddleName>
      <LastName>Signer</LastName>
      <Email>signer@example.com</Email>
      <Service>SelectOneClick</Service>
    </MemberInfo>
    <Form>
      <RefID>doc-1</RefID>
      <Desc>Sample PDF</Desc>
      <FileName>sample.pdf</FileName>
      <MimeType>application/pdf</MimeType>
      <SignatureLine>
        <MemberInfoNumber>1</MemberInfoNumber>
        <SignField>Signature1</SignField>
      </SignatureLine>
      <Length>PDF_BYTE_LENGTH</Length>
      <Data>BASE64_PDF</Data>
    </Form>
  </Data>
</SubmitDocumentRq>
```

For text-tag or fixed-positioning Form children, see [FORM-TAGGING-ELEMENTS-CHEAT-SHEET.md](./FORM-TAGGING-ELEMENTS-CHEAT-SHEET.md)—swap the `SignatureLine` block for the matching field/signature elements (fields first).

---

## 2. GetAccessLink — signer (party 1, new window)

`method=GetAccessLink` — **no `Demo`**

```xml
<?xml version="1.0"?>
<GetAccessLinkRq xmlns="urn:com:signix:schema:sdddc-1-1">
  <CustInfo>
    <Sponsor>YOUR_SPONSOR</Sponsor>
    <Client>YOUR_CLIENT</Client>
    <UserId>YOUR_USER</UserId>
    <Pswd>YOUR_PASSWORD</Pswd>
    <Workgroup>YOUR_WORKGROUP</Workgroup>
  </CustInfo>
  <Data>
    <DocumentSetID>YOUR_DOCUMENT_SET_ID</DocumentSetID>
    <TransactionRole>1</TransactionRole>
    <Embedded>no</Embedded>
    <ContainerOrigin>https://your-app.example.com</ContainerOrigin>
  </Data>
</GetAccessLinkRq>
```

Iframe / in-person: use an embed mode such as `sameframe` or `iframe`, set `ContainerOrigin` to the host origin, and set `InpersonAuthentication` only when you intend kiosk-style auth (see knowledge file GAL table).

---

## 3. GetAccessLink — submitter (wizard after SuspendOnStart=yes)

`method=GetAccessLink` — **no `Demo`**

```xml
<?xml version="1.0"?>
<GetAccessLinkRq xmlns="urn:com:signix:schema:sdddc-1-1">
  <CustInfo>
    <Sponsor>YOUR_SPONSOR</Sponsor>
    <Client>YOUR_CLIENT</Client>
    <UserId>YOUR_USER</UserId>
    <Pswd>YOUR_PASSWORD</Pswd>
    <Workgroup>YOUR_WORKGROUP</Workgroup>
  </CustInfo>
  <Data>
    <DocumentSetID>YOUR_DOCUMENT_SET_ID</DocumentSetID>
    <TransactionRole>Submitter</TransactionRole>
    <AllowTransactionStatusViewing>false</AllowTransactionStatusViewing>
    <AllowTransactionContextEditing>false</AllowTransactionContextEditing>
    <AllowDocumentFieldAndTaskEditing>true</AllowDocumentFieldAndTaskEditing>
    <AllowDocumentEditing>false</AllowDocumentEditing>
    <AllowParticipantEditing>false</AllowParticipantEditing>
    <Embedded>iframe</Embedded>
    <ContainerOrigin>https://your-app.example.com</ContainerOrigin>
  </Data>
</GetAccessLinkRq>
```

Confirm Allow\* flags against current Flex/Postman samples for your tenant.

---

## 4. DownloadDocument

`method=DownloadDocument` — **no `Demo`**. Note **`AuditDataFormat` before `UseConfirmDownload`**.

```xml
<?xml version="1.0"?>
<DownloadDocumentRq xmlns="urn:com:signix:schema:sdddc-1-1">
  <CustInfo>
    <Sponsor>YOUR_SPONSOR</Sponsor>
    <Client>YOUR_CLIENT</Client>
    <UserId>YOUR_USER</UserId>
    <Pswd>YOUR_PASSWORD</Pswd>
    <Workgroup>YOUR_WORKGROUP</Workgroup>
  </CustInfo>
  <Data>
    <DocumentSetID>YOUR_DOCUMENT_SET_ID</DocumentSetID>
    <IncludeAuditData>true</IncludeAuditData>
    <AuditDataFormat>pdf</AuditDataFormat>
    <UseConfirmDownload>true</UseConfirmDownload>
    <IncludeCertificateOfCompletion>true</IncludeCertificateOfCompletion>
  </Data>
</DownloadDocumentRq>
```

If you need signer uploads: add **`IncludeAttachmentData`** `true` **above** `IncludeAuditData` per Flex rules.

---

## 5. ConfirmDownload

`method=ConfirmDownload` — **no `Demo`**. Call only after durable storage of download artifacts.

```xml
<?xml version="1.0"?>
<ConfirmDownloadRq xmlns="urn:com:signix:schema:sdddc-1-1">
  <CustInfo>
    <Sponsor>YOUR_SPONSOR</Sponsor>
    <Client>YOUR_CLIENT</Client>
    <UserId>YOUR_USER</UserId>
    <Pswd>YOUR_PASSWORD</Pswd>
    <Workgroup>YOUR_WORKGROUP</Workgroup>
  </CustInfo>
  <Data>
    <DocumentSetID>YOUR_DOCUMENT_SET_ID</DocumentSetID>
  </Data>
</ConfirmDownloadRq>
```

---

## 6. SubmitAjax — Transaction_Cancel

`method=SubmitAjax` — **no `Demo`**. JSON inside `<Request>` (escape if needed for `&` / `<`).

```xml
<?xml version="1.0"?>
<SubmitAjaxRq xmlns="urn:com:signix:schema:sdddc-1-1">
  <CustInfo>
    <Sponsor>YOUR_SPONSOR</Sponsor>
    <Client>YOUR_CLIENT</Client>
    <UserId>YOUR_USER</UserId>
    <Pswd>YOUR_PASSWORD</Pswd>
    <Workgroup>YOUR_WORKGROUP</Workgroup>
  </CustInfo>
  <Data>
    <DocumentSetID>YOUR_DOCUMENT_SET_ID</DocumentSetID>
    <Request>{'objectType':'Transaction_Cancel'}</Request>
  </Data>
</SubmitAjaxRq>
```

Resume / Suspend use the same envelope with `Transaction_Resume` or `Transaction_Suspend`.

---

## 7. SubmitAjax — QueryTransactionStatus (fallback poll)

`method=SubmitAjax` — **not** `method=QueryTransactionStatus`. Poll interval **≥ 10 minutes**.

```xml
<?xml version="1.0"?>
<SubmitAjaxRq xmlns="urn:com:signix:schema:sdddc-1-1">
  <CustInfo>
    <Sponsor>YOUR_SPONSOR</Sponsor>
    <Client>YOUR_CLIENT</Client>
    <UserId>YOUR_USER</UserId>
    <Pswd>YOUR_PASSWORD</Pswd>
    <Workgroup>YOUR_WORKGROUP</Workgroup>
  </CustInfo>
  <Data>
    <DocumentSetID>YOUR_DOCUMENT_SET_ID</DocumentSetID>
    <Request>{"objectType":"QueryTransactionStatus"}</Request>
  </Data>
</SubmitAjaxRq>
```

Parse status from the AJAX JSON in the response `Response` body; prefer push for live completion. Details: [Push Notifications](https://www.signix.com/pndocumentation).

---

## Suggested agent workflow

1. Copy the sample for the method you are building.  
2. Diff your generated XML against it (element names and **order**).  
3. POST to **Webtest**; fix the **first** schema/`StatusDesc` error; repeat.  
4. Keep Postman as a human browser reference; treat **this file** as the machine-readable sample pack.
