# Scope Usage

### Scope Usage <a href="#scope-usage" id="scope-usage"></a>

| Name    | Description                                                                                     | Endpoint  |
| ------- | ----------------------------------------------------------------------------------------------- | --------- |
| `FISVC` | Read financial transactions and write financial transaction acknowledgements and confirmations. | GET, POST |

### Access Token Usage <a href="#access-token-usage" id="access-token-usage"></a>

This API only supports company-level access tokens.

### Get Financial Transactions <a href="#get-transactions" id="get-transactions"></a>

The request returns a list of financial documents that are ready to be processed. The request can include parameters to limit the results.

#### Request <a href="#request" id="request"></a>

**Parameters**

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>docType</code></td><td><code>string</code></td><td><code>path</code></td><td><strong>Required</strong> The financial document type to return. Only one type of transaction can be retrieved at a time. </td></tr><tr><td><code>page</code></td><td><code>int32</code></td><td><code>query</code></td><td>Starting page number.</td></tr><tr><td><code>limit</code></td><td><code>int32</code></td><td><code>query</code></td><td>Number of records to return per page. Default: 25.</td></tr><tr><td><code>docId</code></td><td><code>string</code></td><td><code>query</code></td><td>The transaction unique identifier, it could be expense report ID, payment request ID or cash advance ID. If specified, a single document that matches <code>docId</code> is returned.</td></tr><tr><td><code>ignoreDocumentStatus</code></td><td><code>string</code></td><td><code>query</code></td><td>Ignores the financial documents status. If <code>yes</code>, a document is returned regardless of status. If <code>no</code>, only documents that have not been acknowledged/confirmed are returned. Supported values: <code>yes</code>, <code>no</code>. (See note below)</td></tr><tr><td><code>systemId</code></td><td><code>string</code></td><td><code>query</code></td><td>The external system ID that processed the document. Maximum 50 characters.</td></tr></tbody></table>

**Headers**

* DocumentFormatAs: Value can be text or JSON. This determines the document format that’s returned from the API.
* RFC 7235 Authorization - Bearer token that identifies the caller. This is the Company access token.

**Payload**

None.

#### Response <a href="#response" id="response"></a>

**Status Codes**

* 200 OK
* 400 Bad Request
* 500 Internal Server Error

**Headers**

* `correlationid` is a specific custom header used for technical support in the form of a RFC 4122 universally unique identifier (UUID) URN Namespace.
* RFC 7231 Content-Type
* RFC 7230 Content-Length

**Payload**

Financial Documents

#### Example <a href="#example" id="example"></a>

**Response**

```
200 OK
Content-Type: application/json
Date: {date-requested}
Content-Length: 491
```

```
{
  "links" : [ {
    "rel" : "first",
    "href" : "https://fiserviceurlhere/fi/v4/companies/transactiontypes/expense/transactions?limit=3&page=0&size=3",
    "hreflang" : null,
    "media" : null,
    "title" : null,
    "type" : null,
    "deprecation" : null
  }, {
    "rel" : "self",
    "href" : "https://fiserviceurlhere/fi/v4/companies/transactiontypes/expense/transactions?limit=3&page=0&size=3",
    "hreflang" : null,
    "media" : null,
    "title" : null,
    "type" : null,
    "deprecation" : null
  }, {
    "rel" : "next",
    "href" : "https://fiserviceurlhere/fi/v4/companies/transactiontypes/expense/transactions?limit=3&page=1&size=3",
    "hreflang" : null,
    "media" : null,
    "title" : null,
    "type" : null,
    "deprecation" : null
  }, {
    "rel" : "last",
    "href" : "https://fiserviceurlhere/fi/v4/companies/transactiontypes/expense/transactions?limit=3&page=2&size=3",
    "hreflang" : null,
    "media" : null,
    "title" : null,
    "type" : null,
    "deprecation" : null
  } ],
  "content" : [ {
    "id" : "e7f810cabc8348cdb051dd9431c8cfbb",
    "docType" : "expense",
    "companyId" : "COMPANY_ID_HERE",
    "entityId" : "ENTITY_ID_HERE",
    "companyUuid" : "COMPANY_UUID_HERE",
    "erpSystemId" : "",
    "document" : "{THE_FINANCIAL_DOCUMENT}",
    "docStatus" : "READY",
    "links" : [ ]
  }, {
    "id" : "e1500222f16748718fdd2d493ee4c9dd",
    "docType" : "expense",
    "companyId" : "COMPANY_ID_HERE",
    "entityId" : "ENTITY_ID_HERE",
    "companyUuid" : "COMPANY_UUID_HERE",
    "erpSystemId" : null,
    "document" : "{THE_FINANCIAL_DOCUMENT}",
    "docStatus" : "READY",
    "links" : [ ]
  }, {
    "id" : "e2135678f16748718fdd2d493ee4c9dd",
    "docType" : "expense",
    "companyId" : "COMPANY_ID_HERE",
    "entityId" : "ENTITY_ID_HERE",
    "companyUuid" : "COMPANY_UUID_HERE",
    "erpSystemId" : null,
    "document" : "{THE_FINANCIAL_DOCUMENT}",
    "docStatus" : "READY",
    "links" : [ ]
  }
   ],
  "page" : {
    "size" : 3,
    "totalElements" : 8,
    "totalPages" : 3,
    "number" : 0
  }
}
```

### Post Financial Transaction Acknowledgements <a href="#post-financial-transaction-acknowledgements" id="post-financial-transaction-acknowledgements"></a>

Allows an external system to acknowledge that it has successfully retrieved one or more financial transactions from Turium Enigma and will begin processing those transactions. The transactions in the POST request are then taken out of the ready queue.

An app should execute the POST request immediately after the GET request. Eliminating any time between the requests will avoid a variance between the ERP and Turium Enigma. For example, if there is a time lag, the customer administrator could use the Turium Enigma Processor tool to recall or send a report (or invoice) back to the report owner where he or she can change it or even delete it. This would create a discrepancy between Turium Enigma and the ERP.

#### Request <a href="#request-2" id="request-2"></a>

**URI**

**Parameters**

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>docType</code></td><td><code>string</code></td><td><code>path</code></td><td><strong>Required</strong> The financial document type. Only one type of transaction can be acknowledged at a time. Supported values: <code>expense</code>, <code>invoice</code>, <code>cashadvance</code>, <code>payroll</code>, <code>requestobligation</code>.</td></tr></tbody></table>

**Headers**

* RFC 7235 Authorization - Bearer token that identifies the caller. This is the Company access token.
* RFC 7231 Content-Type

**Payload**

AcknowledgeRequest

#### Response <a href="#response-2" id="response-2"></a>

**Status Codes**

* 200 OK
* 400 Bad Request
* 500 Internal Server Error

**Headers**

* `correlationid` is a specific custom header used for technical support in the form of a RFC 4122 universally unique identifier (UUID) URN Namespace.
* RFC 7231 Content-Type
* RFC 7230 Content-Length

**Payload**

AcknowledgeResponse

#### Example <a href="#example-1" id="example-1"></a>

**Request**

```
{
  "ids": [ "5ab9224e02e840148e7cd7d9e8e72968", "2ac9224e02e840148e7cd7d9e8e12345" ]
}
```

**Response**

> This response shows both success and failure service code examples.

```
200 OK
Content-Type: application/json
Date: {date-requested}
Content-Length: 372
```

```
[
  {
    "code": 0,
    "docId": "5ab9224e02e840148e7cd7d9e8e72968",
    "systemId": null,
    "acknowledgeResult": "SUCCESS",
    "errorMessage": ""
  },
  {
    "code": 101,
    "docId": "2ac9224e02e840148e7cd7d9e8e12345",
    "systemId": null,
    "acknowledgeResult": "FAILURE",
    "errorMessage": "This document was previously acknowledged by SystemId: null."
  }
]
```

### Post Financial Transactions Confirmations <a href="#post-confirmations" id="post-confirmations"></a>

Allows financial posting results to be sent to Turium Enigma.

#### Request <a href="#request-4" id="request-4"></a>

**URI**

**Parameters**

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>docType</code></td><td><code>string</code></td><td><code>path</code></td><td><strong>Required</strong> The financial document type to return. Only one type of transaction can be retrieved at a time. </td></tr><tr><td><code>confirmationRequest</code></td><td>-</td><td>body</td><td><strong>Required</strong> The JSON request to be posted.</td></tr></tbody></table>

**Headers**

* RFC 7235 Authorization - Bearer token that identifies the caller. This is the Company access token.
* RFC 7231 Content-Type

**Payload**

Confirmation Request

#### Response <a href="#response-4" id="response-4"></a>

**Status Codes**

* 200 OK
* 400 Bad Request
* 500 Internal Server Error

**Headers**

* `correlationid` is a specific custom header used for technical support in the form of a RFC 4122 universally unique identifier (UUID) URN Namespace.
* RFC 7231 Content-Type
* RFC 7230 Content-Length

**Payload**

Posting Confirmation Response

#### Example <a href="#example-2" id="example-2"></a>

**Request**

```
{
  "systemId":"",
  "postingConfirmations":
  [
    {
      "docId":"0c06ab044834454d91f83cbd7b6431d2",
      "overallPostingStatusCode":"error",
      "postingDocs":[],
      "systemMessages":
      [
        {
          "TransactionLineItemId":"",
          "messageId":"010-CTE-POSTING",
          "messageLanguage":"EN",
          "messageLongText":"",
          "messageShortText":"Expense Report {ReportKey} of system could not be posted."
        },
        {
          "TransactionLineItemId":"",
          "messageId":"003-CC",
          "messageLanguage":"EN",
          "messageLongText":"",
          "messageShortText":"Profit centre /company code assignment is not correct. Check the entry."
        }
      ]
    },
    {
      "docId":"3331dbeb8e2240ffad7ab5b69492722a",
      "overallPostingStatusCode":"success",
      "postingDocs":
      [
        {
          "companyId":"0100",
          "documentNumber":"0123456",
          "fiscalYear":"2018",
          "paymentRelevantLineItems":[],
          "postingDate":"2018-03-02"
        },
        {
          "companyId":"0800",
          "documentNumber":"0123478",
          "fiscalYear":"2018",
          "paymentRelevantLineItems":[],
          "postingDate":"2018-03-02"
        }
      ],
      "systemMessages":[]
    }
  ]
}
```

**Response**

> This response shows both success and failure service code examples.

```
200 OK
Content-Type: application/json
Date: {date-requested}
Content-Length: 405
```

```
[
  {
    "code": 0,
    "docId": "0c06ab044834454d91f83cbd7b6431d2",
    "systemId": null,
    "postingConfirmationResult": "SUCCESS",
    "errorMessage": "",
    "detailMessage": ""
  },
  {
    "code": 116,
    "docId": "3331dbeb8e2240ffad7ab5b69492722a",
    "systemId": "",
    "postingConfirmationResult": "FAILURE",
    "errorMessage": "This document does not exist.",
    "detailMessage": ""
  }
]
```

### Post Financial Payment Confirmations <a href="#payment-confirmations" id="payment-confirmations"></a>

Allows financial payment results to be sent to Turium Enigma.

#### Request <a href="#request-6" id="request-6"></a>

**URI**

**Parameters**

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>docType</code></td><td><code>string</code></td><td><code>path</code></td><td><strong>Required</strong> The financial document type to return. Only one type of transaction can be retrieved at a time. </td></tr><tr><td><code>confirmationRequest</code></td><td> </td><td>body</td><td><strong>Required</strong> The JSON request to be posted.</td></tr></tbody></table>

**Headers**

* RFC 7235 Authorization - Bearer token that identifies the caller. This is the Company access token.
* RFC 7231 Content-Type

**Payload**

Payment Confirmation Request

#### Response <a href="#response-6" id="response-6"></a>

**Status Codes**

* 200 OK
* 400 Bad Request
* 500 Internal Server Error

**Headers**

* `correlationid` is a specific custom header used for technical support in the form of a RFC 4122 universally unique identifier (UUID) URN Namespace.
* RFC 7231 Content-Type
* RFC 7230 Content-Length

**Payload**

Payment Confirmation Response

#### Example <a href="#example-3" id="example-3"></a>

```
{
  "systemId":"",
  "processingConfirmation":
  [
    {
      "docId":"0c06ab044834454d91f83cbd7b6431d2",
      "processingStatusCode":"CP",
      "clearingDetails":[
        {
          "clearingDate":"2019-02-06T12:00:00.27Z","clearingAmount":220.00,
          "clearingCurrency":"USD","receiver":{"receiverId":"22344",
          "receiverName":"Charles","receiverType":"EMPLOYEE"},
          "clearingReference":{"companyCode":"US01","financialDocumentId":"667799",
          "fiscalYear":"2019","paymentRef":"US01/667799/2019/2","paymentMethod":"E"}
        }
      ]
    },
    {
      "docId":"454d91f83cbd7b6431d20c06ab044834",
      "processingStatusCode":"PP",
      "clearingDetails":[
        {
          "clearingDate":"2019-02-06T12:00:00.27Z","clearingAmount":40.00,
          "clearingCurrency":"USD","receiver":{"receiverId":"57",
          "receiverName":"John","receiverType":"EMPLOYEE"},
          "clearingReference":{"companyCode":"US01","financialDocumentId":"996675",
          "fiscalYear":"2019","paymentRef":"US01/996675/2019/2","paymentMethod":"E"}
        }
      ]
    },
    {
      "docId":"1d20c06ab0445d7b64348344d91f83cb",
      "processingStatusCode":"PP",
      "clearingDetails":[
        {
          "clearingDate":"2019-02-06T12:00:00.27Z","clearingAmount":23.00,
          "clearingCurrency":"USD","receiver":{"receiverId":"57",
          "receiverName":"Alice","receiverType":"EMPLOYEE"},
          "clearingReference":{"companyCode":"US01","financialDocumentId":"95432",
          "fiscalYear":"2019","paymentRef":"US01/95432/2019/2","paymentMethod":"E"}
        }
      ]
    },
    {
      "docId":"d2454d91fcb44834830c06ab0d7b6431",
      "processingStatusCode":"RE",
      "additionalMessage":"This report was sent to wrong system",
      "clearingDetails":[
        {
          "clearingDate":"2019-02-06T12:00:00.27Z","clearingAmount":10.00,
          "clearingCurrency":"USD","receiver":{"receiverId":"57",
          "receiverName":"Peter","receiverType":"EMPLOYEE"},
          "clearingReference":{"companyCode":"US01","financialDocumentId":"5498",
          "fiscalYear":"2019","paymentRef":"US01/5498/2019/2","paymentMethod":"E"}
        }
      ]
    },
    {
      "docId":"b6431d2454dcbd791f44834830c06ab0",
      "processingStatusCode":"OB",
      "additionalMessage":"Not required anymore",
      "clearingDetails":[
        {
          "clearingDate":"2019-02-06T12:00:00.27Z","clearingAmount":54.00,
          "clearingCurrency":"USD","receiver":{"receiverId":"57",
          "receiverName":"Kevin","receiverType":"EMPLOYEE"},
          "clearingReference":{"companyCode":"US01","financialDocumentId":"32478",
          "fiscalYear":"2019","paymentRef":"US01/32478/2019/2","paymentMethod":"E"}
        }
      ]
    }
  ]
}
```

**Response**

> This response shows both success and failure service code examples.

```
200 OK
Content-Type: application/json
Date: {date-requested}
Content-Length: 405
```

```
[
  {
  "code" : 0,
  "docId" : "0c06ab044834454d91f83cbd7b6431d2",
  "systemId" : "",
  "paymentConfirmationResult" : "SUCCESS",
  "errorMessage" : null,
  "paymentRef" : "US01/667799/2019/2",
  "detailMessage" : ""
  },
  {
  "code" : 116,
  "docId" : "454d91f83cbd7b6431d20c06ab044834",
  "systemId" : "",
  "paymentConfirmationResult" : "FAILURE",
  "errorMessage" : "This document does not exist.",
  "paymentRef" : "US01/996675/2019/2",
  "detailMessage" : ""
  },
  {
  "code" : 298,
  "docId" : "1d20c06ab0445d7b64348344d91f83cb",
  "systemId" : "",
  "paymentConfirmationResult" : "NOOP",
  "errorMessage" : "Payment confirmation already exist US01/95432/2019/2.",
  "paymentRef" : "US01/95432/2019/2",
  "detailMessage" : ""
  }
  {
  "code" : 0,
  "docId" : "d2454d91fcb44834830c06ab0d7b6431",
  "systemId" : "",
  "paymentConfirmationResult" : "SUCCESS",
  "errorMessage" : null,
  "paymentRef" : "US01/5498/2019/2",
  "detailMessage" : ""
  },
  {
  "code" : 0,
  "docId" : "b6431d2454dcbd791f44834830c06ab0",
  "systemId" : "",
  "paymentConfirmationResult" : "SUCCESS",
  "errorMessage" : null,
  "paymentRef" : "US01/32478/2019/2",
  "detailMessage" : ""
  }
]
```

#### Service Codes <a href="#service-codes" id="service-codes"></a>

The Financial Integration Service will return service codes based on the success and failure of individual records for acknowledging and posting confirmation of documents.

| Code | Description                                                               | Category    |
| ---- | ------------------------------------------------------------------------- | ----------- |
| 0    | Successfully processed                                                    | Any         |
| 99   | System ID in request does not match system ID in FI database.             | Any         |
| 101  | This document was previously acknowledged.                                | Acknowledge |
| 102  | This document has been recalled.                                          | Acknowledge |
| 103  | This document is not ready.                                               | Acknowledge |
| 104  | This document does not exist in the FI database.                          | Acknowledge |
| 105  | This document is not of type (expense, invoice, cashadvance).             | Acknowledge |
| 111  | This document has not been acknowledged.                                  | Posting     |
| 112  | This document has been recalled.                                          | Posting     |
| 113  | Confirmation has been posted for this document.                           | Posting     |
| 114  | Document is not in a known state.                                         | Posting     |
| 115  | This document is not of type (expense, invoice, cashadvance).             | Posting     |
| 116  | This document does not exist in the FI database.                          | Posting     |
| 198  | Invalid request - this same request will not work if tried again.         | Posting     |
| 199  | Unknown error, please try again later.                                    | Any         |
| 213  | Payment confirmation has been posted for this document.                   | Posting     |
| 298  | Invalid payment request - this same request will not work if tried again. | Posting     |

### Schema <a href="#schema" id="schema"></a>

#### Financial Documents <a href="#schema-pagedresources.resource.fidocument" id="schema-pagedresources.resource.fidocument"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>content</code></td><td><code>Array</code></td><td>FIDocument</td><td>The result collection.</td></tr><tr><td><code>page</code></td><td><code>string</code></td><td>PageMetadata</td><td>Pagination details.</td></tr><tr><td><code>links</code></td><td><code>Array</code></td><td>Link</td><td>Pagination links.</td></tr></tbody></table>

#### FIDocument <a href="#schema-resource.fidocument" id="schema-resource.fidocument"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>string</code></td><td>-</td><td>The unique identifier for the document.</td></tr><tr><td><code>docType</code></td><td><code>string</code></td><td>-</td><td>Transaction type. Supported values: <code>expense</code>, <code>invoice</code>, <code>cashadvance</code>, <code>payroll</code>, <code>requestobligation</code>.</td></tr><tr><td><code>companyId</code></td><td><code>string</code></td><td>-</td><td>Unique identifier for the company. Maximum 32 characters.</td></tr><tr><td><code>entityId</code></td><td><code>string</code></td><td>-</td><td>Unique identifier for the entity. Maximum 32 characters.</td></tr><tr><td><code>companyUuid</code></td><td><code>string</code></td><td><code>UUID</code></td><td>UUID for the company. Maximum 36 characters.</td></tr><tr><td><code>erpSystemId</code></td><td><code>string</code></td><td>-</td><td>The external System ID that processed the document. Maximum 50 characters.</td></tr><tr><td><code>document</code></td><td><code>Array</code></td><td>-</td><td>The JSON financial document. </td></tr><tr><td><code>docStatus</code></td><td><code>string</code></td><td>-</td><td>The financial document status. Supported values: <code>READY</code>, <code>ACKNOWLEDGED</code>, <code>POSTING_CONFIRMED_SUCCESS</code>, <code>POSTING_CONFIRMED_FAILURE</code>.</td></tr></tbody></table>

#### PageMetadata <a href="#schema-pagemetadata" id="schema-pagemetadata"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>size</code></td><td>int32</td><td>-</td><td>The number of transactions returned on the page.</td></tr><tr><td><code>totalElements</code></td><td>int32</td><td>-</td><td>The count of elements returned.</td></tr><tr><td><code>totalPages</code></td><td>int32</td><td>-</td><td>Total number of pages that are available.</td></tr><tr><td><code>number</code></td><td>int32</td><td>-</td><td>Page location for which the result is returned, for example: first page starts with 0, second page starts with 1.</td></tr></tbody></table>

#### Link <a href="#schema-link" id="schema-link"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>rel</code></td><td><code>string</code></td><td>-</td><td>Relation of link, for example: <code>first</code>, <code>self</code>, <code>next</code>, <code>last</code>.</td></tr><tr><td><code>href</code></td><td><code>string</code></td><td>-</td><td>Complete URL for the paginated link.</td></tr><tr><td><code>hreflang</code></td><td><code>string</code></td><td>-</td><td>Link language, if any.</td></tr><tr><td><code>media</code></td><td><code>string</code></td><td>-</td><td>Media type, if any.</td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>-</td><td>Link title, if any.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>-</td><td>Link type, if any.</td></tr><tr><td><code>deprecation</code></td><td><code>string</code></td><td>-</td><td>Deprecated indication, if any.</td></tr></tbody></table>

#### AcknowledgeRequest <a href="#schema-acknowledgerequest" id="schema-acknowledgerequest"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>ids</code></td><td><code>Array</code></td><td><code>string</code></td><td>The unique identifiers list for the financial documents.</td></tr><tr><td><code>systemId</code></td><td><code>string</code></td><td>-</td><td>The external system ID that acknowledged the documents.</td></tr></tbody></table>

#### AcknowledgeResponse <a href="#schema-acknowledgeresponse" id="schema-acknowledgeresponse"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>AcknowledgeResponse</code></td><td><code>array</code></td><td>AcknowledgeResponseItem</td><td>The JSON response.</td></tr></tbody></table>

**AcknowledgeResponseItem**

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>acknowledgeResult</code></td><td><code>string</code></td><td>-</td><td>Acknowledge processing result. Supported values are: <code>SUCCESS</code> or <code>FAILURE</code>.</td></tr><tr><td><code>code</code></td><td><code>Int32</code></td><td>Service Codes</td><td>The Financial Integration Service Code. This is a particular code based on the success and failure of individual records for Acknowledging documents.</td></tr><tr><td><code>docId</code></td><td><code>string</code></td><td>-</td><td>The financial document unique identifier. Maximum 32 characters.</td></tr><tr><td><code>errorMessage</code></td><td><code>string</code></td><td>-</td><td>The error message, if any.</td></tr><tr><td><code>systemId</code></td><td><code>string</code></td><td>-</td><td>The external system ID that acknowledged the documents. Maximum 50 characters.</td></tr></tbody></table>

#### Confirmation Request <a href="#schema-confirmationrequest" id="schema-confirmationrequest"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>systemId</code></td><td><code>string</code></td><td>-</td><td><strong>Required</strong> The external system ID that acknowledged the documents, it can be an empty string. Maximum 50 characters.</td></tr><tr><td><code>postingConfirmations</code></td><td><code>Array</code></td><td>Posting Confirmation request item</td><td>Posting confirmations JSON request.</td></tr></tbody></table>

#### Posting Confirmation Request Item <a href="#schema-postingrequest" id="schema-postingrequest"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>docId</code></td><td><code>string</code></td><td>-</td><td><strong>Required</strong> The financial document ID to confirm. Maximum 32 characters.</td></tr><tr><td><code>overallPostingStatusCode</code></td><td><code>string</code></td><td>-</td><td><strong>Required</strong> Posting status. VALUES: error or success.</td></tr><tr><td><code>postingDocs</code></td><td><code>array</code></td><td>Posting Documents Details</td><td>Posting documents details, if any.</td></tr><tr><td><code>systemMessages</code></td><td><code>array</code></td><td>System Messages</td><td><strong>Required</strong> Messages to post to Turium Enigma, if any.</td></tr></tbody></table>

#### Posting Documents Details <a href="#schema-postingdocs" id="schema-postingdocs"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>companyId</code></td><td><code>string</code></td><td>-</td><td><strong>Required</strong> External system organizational unit ID. Maximum 32 characters.</td></tr><tr><td><code>documentNumber</code></td><td><code>string</code></td><td>-</td><td>External system document identifier. Maximum 80 characters.</td></tr><tr><td><code>fiscalYear</code></td><td><code>int32</code></td><td>-</td><td>External system fiscal year.</td></tr><tr><td><code>paymentRelevantLineItems</code></td><td><code>array</code></td><td>-</td><td>Payment relevant line items. This array is usually empty.</td></tr><tr><td><code>postingDate</code></td><td><code>string</code></td><td><code>YYYY-MM-DD</code></td><td>External system posting date.</td></tr></tbody></table>

#### System Messages <a href="#schema-systemmsg" id="schema-systemmsg"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>TransactionLineItemId</code></td><td><code>string</code></td><td>-</td><td>Report relevant line item id.</td></tr><tr><td><code>messageId</code></td><td><code>string</code></td><td>-</td><td>External System message identifier.</td></tr><tr><td><code>messageLanguage</code></td><td><code>string</code></td><td>-</td><td>Message Language code, example <code>EN</code>, <code>FR</code>.</td></tr><tr><td><code>messageLongText</code></td><td><code>array</code></td><td>-</td><td>Message text, will be posted on the audit trail. Maximum 1300 characters.</td></tr><tr><td><code>messageShortText</code></td><td><code>string</code></td><td>-</td><td>Message text, will be posted on the audit trail. Maximum 1300 characters.</td></tr></tbody></table>

#### Posting Confirmation Response <a href="#schema-postingconfirmationresponse" id="schema-postingconfirmationresponse"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>PostingConfirmationResponse</code></td><td><code>array</code></td><td>Posting Confirmation Response Item</td><td>The JSON response body.</td></tr></tbody></table>

**PostingConfirmationResponseItem**

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>postingConfirmationResult</code></td><td><code>string</code></td><td>-</td><td>Posting confirmation result. Supported values: <code>SUCCESS</code>, <code>SYSTEM_ERROR_OCCURRED</code>, <code>NOT_YET_ACKNOWLEDGED</code>, <code>DOCUMENT_NOT_FOUND</code>, <code>FAILURE</code>, <code>WAS_RECALLED</code></td></tr><tr><td><code>detailMessage</code></td><td><code>string</code></td><td>-</td><td>Posting confirmation message.</td></tr><tr><td><code>code</code></td><td><code>Int32</code></td><td>-</td><td>The Financial Service return code.</td></tr><tr><td><code>docId</code></td><td><code>string</code></td><td>-</td><td>The document ID. Maximum 32 characters.</td></tr><tr><td><code>errorMessage</code></td><td><code>string</code></td><td>-</td><td>The error message, if any.</td></tr><tr><td><code>systemId</code></td><td><code>string</code></td><td>-</td><td>The external system ID that acknowledged the document. Maximum 50 characters.</td></tr></tbody></table>

#### Payment Confirmation Request <a href="#schema-paymentrequest" id="schema-paymentrequest"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>systemId</code></td><td><code>string</code></td><td>-</td><td><strong>Required</strong> The external system ID that acknowledged the documents, it can be an empty string. Maximum 50 characters.</td></tr><tr><td><code>processingConfirmation</code></td><td><code>Array</code></td><td>Payment Confirmation Request Item</td><td>Payment confirmations JSON request.</td></tr></tbody></table>

#### Payment Confirmation Request Item <a href="#schema-paymentconfirmationrequest" id="schema-paymentconfirmationrequest"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>docId</code></td><td><code>string</code></td><td>-</td><td>The financial document ID to confirm. Maximum 32 characters.</td></tr><tr><td><code>processingStatusCode</code></td><td><code>string</code></td><td>-</td><td>Payment status. Supported values: <code>CP</code>, <code>PP</code>, <code>RE</code>, <code>OB</code> (Completely Paid, Partially paid, Reversal, Obsolete). Maximum 3 characters.</td></tr><tr><td><code>additionalMessage</code></td><td><code>string</code></td><td>-</td><td>Reversal message or obsolete message, if any.</td></tr><tr><td><code>clearingDetails</code></td><td><code>array</code></td><td>Payment Documents Details</td><td>Payment documents details, if any.</td></tr></tbody></table>

#### Payment Documents Details <a href="#schema-paymentdocs" id="schema-paymentdocs"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>clearingDate</code></td><td><code>string</code></td><td>-</td><td>Date the payment cleared.</td></tr><tr><td><code>clearingAmount</code></td><td><code>double</code></td><td>-</td><td>Amount cleared.</td></tr><tr><td><code>clearingCurrency</code></td><td><code>string</code></td><td>-</td><td>Currency value.</td></tr><tr><td><code>receiver</code></td><td><code>array</code></td><td>Receiver Details</td><td>Receiver details.</td></tr><tr><td><code>clearingReference</code></td><td><code>array</code></td><td>Clearing Reference Details</td><td>Clearing reference details.</td></tr></tbody></table>

#### Receiver Details <a href="#schema-receiver" id="schema-receiver"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>receiverId</code></td><td><code>string</code></td><td>-</td><td>Receiver ID.</td></tr><tr><td><code>receiverName</code></td><td><code>double</code></td><td>-</td><td>Name of receiver.</td></tr><tr><td><code>receiverType</code></td><td><code>string</code></td><td>-</td><td>Type of receiver.</td></tr></tbody></table>

#### Clearing Reference Details <a href="#schema-clearing-reference" id="schema-clearing-reference"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>companyCode</code></td><td><code>string</code></td><td>-</td><td>Company code.</td></tr><tr><td><code>financialDocumentId</code></td><td><code>string</code></td><td>-</td><td>Document ID in ERP.</td></tr><tr><td><code>fiscalYear</code></td><td><code>string</code></td><td>-</td><td>Fiscal year.</td></tr><tr><td><code>paymentRef</code></td><td><code>string</code></td><td>-</td><td>Payment reference ID. Must be unique for each confirmation.</td></tr><tr><td><code>paymentMethod</code></td><td><code>string</code></td><td>-</td><td>Payment method Where <code>E</code> = Electronic Fund Transfer or <code>C</code> = Check.</td></tr></tbody></table>

#### Payment Confirmation Response <a href="#schema-paymentconfirmationresponse" id="schema-paymentconfirmationresponse"></a>

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>PaymentConfirmationResponse</code></td><td><code>array</code></td><td>Payment Confirmation Response Item</td><td>The JSON response body</td></tr></tbody></table>

**PaymentConfirmationResponseItem**

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Format</th><th>Description</th></tr></thead><tbody><tr><td><code>paymentConfirmationResult</code></td><td><code>string</code></td><td>-</td><td>Payment confirmation result. Supported values: <code>SUCCESS</code>, <code>SYSTEM_ERROR_OCCURRED</code>, <code>NOT_POSTING_CONFIRMED</code>, <code>DOCUMENT_NOT_FOUND</code>, <code>FAILURE</code>, <code>NOOP</code></td></tr><tr><td><code>paymentRef</code></td><td><code>string</code></td><td>-</td><td>Any message corresponding to payment reference being processed.</td></tr><tr><td><code>detailMessage</code></td><td><code>string</code></td><td>-</td><td>Payment confirmation message.</td></tr><tr><td><code>code</code></td><td><code>Int32</code></td><td>-</td><td>The financial service return code.</td></tr><tr><td><code>docId</code></td><td><code>string</code></td><td>-</td><td>The document ID. Maximum 32 characters.</td></tr><tr><td><code>errorMessage</code></td><td><code>string</code></td><td>-</td><td>The error message, if any.</td></tr><tr><td><code>systemId</code></td><td><code>string</code></td><td>-</td><td>The external system ID that acknowledged the document. Maximum 50 characters.</td></tr></tbody></table>

### Example Financial Document <a href="#example" id="example"></a>

#### Invoice <a href="#example-invoice" id="example-invoice"></a>

```
{
   "requestHeader":{
      "ledgerCode":"DEFAULT",
      "clearingAccountCode":null,
      "invoiceDate":"08/08/2018",
      "reqKey":35,
      "postingDate":null,
      "poNumber":null,
      "isTest":"N",
      "deliverySlipNumber":null,
      "discountPercentage":null,
      "paymentDueDate":"09/07/2018",
      "requestId":"9B1D30723CBF4F86A574",
      "requestOrgUnit4Code":null,
      "requestOrgUnit5Code":null,
      "requestOrgUnit6Code":null,
      "currencyAlphaCode":"USD",
      "ledgerName":"DEFAULT",
      "vendorInvoiceNumber":"25688",
      "multiplePurchaseOrder":"N",
      "invoicePayIndicator":"N",
      "payMethodType":"CLIENT",
      "submitDate":"2018-09-05T03:37:42.923Z",
      "requestTotal":50.00000000,
      "revisionNumber":"1",
      "processCompleteDate":null,
      "invoiceReceivedDate":null,
      "requestOrgUnit1Value":null,
      "requestOrgUnit2Value":null,
      "requestOrgUnit3Value":null,
      "requestOrgUnit4Value":null,
      "requestOrgUnit5Value":null,
      "requestOrgUnit6Value":null,
      "versionId":"4",
      "requestOrgUnit1Code":null,
      "requestOrgUnit2Code":null,
      "requestOrgUnit3Code":null,
      "requestCustom21Code":null,
      "requestCustom22Code":null,
      "requestCustom1Value":null,
      "requestCustom2Value":null,
      "requestCustom3Value":null,
      "requestCustom4Value":null,
      "requestCustom5Value":null,
      "requestCustom6Value":null,
      "requestCustom7Value":null,
      "requestCustom8Value":null,
      "requestCustom9Value":null,
      "requestCustom10Value":"Default-Change to Client",
      "requestCustom11Value":null,
      "requestCustom12Value":null,
      "requestCustom13Value":null,
      "requestCustom14Value":null,
      "requestCustom15Value":null,
      "requestCustom16Value":null,
      "requestCustom17Value":null,
      "requestCustom18Value":null,
      "requestCustom19Value":null,
      "requestCustom20Value":null,
      "requestCustom21Value":null,
      "requestCustom22Value":null,
      "requestCustom23Value":null,
      "requestCustom24Value":null,
      "amountNetInvoice":50.00000000,
      "amountShippingTotal":0E-8,
      "requestTitle":"FIS Test",
      "discountTermsDays":null,
      "requestCustom1Code":null,
      "requestCustom2Code":null,
      "requestCustom3Code":null,
      "requestCustom4Code":null,
      "requestCustom5Code":null,
      "requestCustom6Code":null,
      "requestCustom7Code":null,
      "requestCustom8Code":null,
      "requestCustom9Code":null,
      "requestCustom10Code":"Default",
      "requestCustom11Code":null,
      "requestCustom12Code":null,
      "requestCustom13Code":null,
      "requestCustom14Code":null,
      "requestCustom15Code":null,
      "requestCustom16Code":null,
      "requestCustom17Code":null,
      "requestCustom18Code":null,
      "requestCustom19Code":null,
      "requestCustom20Code":null,
      "requestCustom24Code":null,
      "netPaymentTermDays":"30",
      "requestCreationDate":"2018-09-05T03:37:00.143Z",
      "requestCustom23Code":null,
      "requestDescription":null,
      "vendorTaxId": null,
      "externalPolicyId": "BB015C3A7701469C93B1",
      "policyName": "FI"
   },
   "ownerEmployee":{
      "employeeCustom20Value":null,
      "employeeCustom21Value":"System",
      "employeeCustom10Code":"Default",
      "employeeOrgUnit1Code":null,
      "employeeOrgUnit2Code":null,
      "employeeOrgUnit3Code":null,
      "employeeOrgUnit4Code":null,
      "employeeOrgUnit5Code":null,
      "employeeOrgUnit6Code":null,
      "employeeOrgUnit1Value":null,
      "employeeOrgUnit2Value":null,
      "employeeOrgUnit3Value":null,
      "employeeOrgUnit4Value":null,
      "employeeOrgUnit5Value":null,
      "employeeOrgUnit6Value":null,
      "employeeCustom1Code":"ext-record-4",
      "employeeCustom2Code":null,
      "employeeCustom3Code":null,
      "employeeCustom4Code":null,
      "employeeCustom5Code":null,
      "employeeCustom6Code":null,
      "employeeCustom7Code":null,
      "employeeCustom8Code":null,
      "employeeCustom9Code":"28",
      "employeeCustom11Code":null,
      "employeeCustom13Code":null,
      "employeeCustom14Code":null,
      "employeeCustom15Code":null,
      "employeeCustom16Code":"N",
      "employeeCustom17Code":null,
      "employeeCustom18Code":null,
      "employeeCustom19Code":null,
      "employeeCustom20Code":null,
      "employeeCustom21Code":"SYS",
      "employeeCustom1Value":null,
      "employeeCustom2Value":null,
      "employeeCustom3Value":null,
      "employeeCustom4Value":null,
      "employeeCustom5Value":null,
      "employeeCustom6Value":null,
      "employeeCustom7Value":null,
      "employeeCustom8Value":null,
      "employeeCustom9Value":"522 Product",
      "employeeCustom10Value":"Default-Change to Client",
      "employeeCustom11Value":null,
      "employeeCustom12Value":null,
      "employeeCustom13Value":null,
      "employeeCustom14Value":null,
      "employeeCustom15Value":null,
      "employeeCustom16Value":null,
      "employeeCustom17Value":null,
      "employeeCustom18Value":null,
      "employeeCustom19Value":null,
      "employeeId":"12345AB",
      "employeeMI":"C",
      "employeeFirstName":"FirstName",
      "employeeLastName":"LastName",
      "employeeCustom12Code":null
   },
   "vendor":{
      "vendorName":"Test Vendor",
      "vendorCode":"94F538F2C3224C6E871CFED9F0F8333A",
      "vendorShipFromAddressCode":null,
      "vendorRemitToAddressCode":"333",
      "vendorContactFirstName":null,
      "vendorContactLastName":null
   },
   "lineItem":[
      {
         "allocation":[
            {
               "journal":{
                  "accountCode":"MATER",
                  "amountShipping":0,
                  "amountNet":50.00,
                  "amountGross":50.00,
                  "tax":null
               },
               "allocationAccountCode":"MATER",
               "allocationCustom6Code":null,
               "allocationCustom7Code":null,
               "allocationCustom8Code":null,
               "allocationCustom9Code":null,
               "allocationCustom10Code":null,
               "allocationCustom11Code":null,
               "allocationCustom12Code":null,
               "allocationCustom13Code":null,
               "allocationCustom14Code":null,
               "allocationCustom15Code":null,
               "allocationCustom16Code":null,
               "allocationCustom17Code":null,
               "allocationCustom18Code":null,
               "allocationCustom19Code":null,
               "allocationCustom20Code":null,
               "allocationCustom1Code":"",
               "allocationCustom2Code":"",
               "allocationCustom3Code":"",
               "allocationCustom4Code":null,
               "allocationCustom5Code":null,
               "allocationPercentage":100.00000000,
               "allocationCustom1Value":null,
               "allocationCustom2Value":null,
               "allocationCustom3Value":null,
               "allocationCustom4Value":null,
               "allocationCustom5Value":null,
               "allocationCustom6Value":null,
               "allocationCustom7Value":null,
               "allocationCustom8Value":null,
               "allocationCustom9Value":null,
               "allocationCustom10Value":null,
               "allocationCustom11Value":null,
               "allocationCustom12Value":null,
               "allocationCustom13Value":null,
               "allocationCustom14Value":null,
               "allocationCustom15Value":null,
               "allocationCustom16Value":null,
               "allocationCustom17Value":null,
               "allocationCustom18Value":null,
               "allocationCustom19Value":null,
               "allocationCustom20Value":null,
               "allocationKey":158
            }
         ],
         "receiptNumbers":[

         ],
         "expenseTypeName":"Material",
         "poLineNumber":null,
         "externalLineItemId":null,
         "expenseTypeCode":"2000   ",
         "lineItemPurchaseOrderNumber":null,
         "lineItemCode":null,
         "lineItemDeliverySlipNumber":null,
         "lineItemUnitPrice":50.00000000,
         "lineItemSequenceOrder":1,
         "lineItemQuantity":1.00000000,
         "lineItemCustom1Value":null,
         "lineItemCustom2Value":null,
         "lineItemCustom3Value":null,
         "lineItemCustom4Value":null,
         "lineItemCustom5Value":null,
         "lineItemCustom6Value":null,
         "lineItemCustom7Value":null,
         "lineItemCustom8Value":null,
         "lineItemCustom9Value":null,
         "lineItemCustom10Value":null,
         "lineItemCustom11Value":null,
         "lineItemCustom12Value":null,
         "lineItemCustom13Value":null,
         "lineItemCustom14Value":null,
         "lineItemCustom15Value":null,
         "lineItemCustom16Value":null,
         "lineItemCustom17Value":null,
         "lineItemCustom18Value":null,
         "lineItemCustom19Value":null,
         "lineItemCustom20Value":null,
         "lineItemCustom1Code":null,
         "lineItemCustom2Code":null,
         "lineItemCustom3Code":null,
         "lineItemCustom4Code":null,
         "lineItemCustom5Code":null,
         "lineItemCustom6Code":null,
         "lineItemCustom7Code":null,
         "lineItemCustom8Code":null,
         "lineItemCustom9Code":null,
         "lineItemCustom10Code":null,
         "lineItemCustom11Code":null,
         "lineItemCustom12Code":null,
         "lineItemCustom13Code":null,
         "lineItemCustom14Code":null,
         "lineItemCustom15Code":null,
         "lineItemCustom16Code":null,
         "lineItemCustom17Code":null,
         "lineItemCustom18Code":null,
         "lineItemCustom19Code":null,
         "lineItemCustom20Code":null,
         "lineItemDescription":"Merchandise"
      }
   ]
}

```
