> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Runs a certification test pack against a partner: every sample interchange is…

> Diagnostic report and onboarding/template disposition

### Path parameters

**id** `string` *required*

Partner ID

### Request body

`TestPack`

**cases** `TestCase[]` *required*

**TestCase**

**description** `string,null`

**direction** `CaseDirection`

Defaults to inbound. Outbound checks validate supplied wire files only; they do not compare quantities to stored orders or send documents. Allowed values: `'inbound'`, `'outbound'`.

**expect\_valid** `boolean` *required*

Whether the guide expects this interchange to validate clean. A negative case (`false`) certifies that the partner's rules *reject* a malformed or non-compliant document — not just that good documents pass.

**expected\_rejection** `string,null`

Optional case-sensitive substring required in the rejection detail. Only valid for negative cases; prevents rejection for an unrelated cause from satisfying a guide-specific qualification case.

**name** `string` *required*

**raw** `string` *required*

Raw inbound X12/EDIFACT or outbound X12 interchange to validate.

**transaction\_set** `string,null`

Required for outbound cases: 855, 856 or 810. Omit for inbound cases.

**name** `string` *required*

### Response

`CertificationResponse`

**advanced\_to\_certified** `boolean` *required*

Internal fixture runs never automatically advance onboarding.

**data** `CertificationReport` *required*

The full certification report for a partner against a pack.

**CertificationReport**

**configuration\_hash** `string`

Readiness configuration captured before evaluating any sample.

**pack\_hash** `string`

SHA-256 of the serialized test pack, including sample payloads and expectations.

**pack\_name** `string` *required*

**partner\_id** `string` *required*

**passed** `boolean` *required*

True only when every case passed.

**passed\_count** `integer` *required*

Minimum: `0`.

**results** `CaseResult[]` *required*

**CaseResult**

**actual\_valid** `boolean` *required*

**detail** `string,null`

Why the validator reached its verdict — structural error or the first rejected document's reason — surfaced so a failing case is debuggable.

**direction** `CaseDirection`

Allowed values: `'inbound'`, `'outbound'`.

**expected\_rejection** `string,null`

**expected\_valid** `boolean` *required*

**name** `string` *required*

**passed** `boolean` *required*

**transaction\_set** `string,null`

**total** `integer` *required*

Minimum: `0`.

**usage** `string`

Envelope environment of the immutable partner snapshot evaluated (T/P). Readiness hashes allow promotion, so this must be checked separately.

**published\_template** `string,null` *required*

Internal fixture runs never publish customer configuration as a template.

**success** `boolean` *required*

The request completed; inspect data.passed for the fixture verdict.

### Status codes

| Code | Meaning |
| - | - |
| `200` | Diagnostic report and onboarding/template disposition |
| `403` | Not this credential's partner |
| `404` | Unknown partner |
| `422` | Invalid test pack |

### Using this contract

Read the [source OpenAPI document](https://docs.stateset.com/spec/edi.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

```bash cURL theme={null}
curl --silent --show-error --fail-with-body --request POST \
  --url 'https://api.edi.stateset.com/v1/partners/{id}/certification/run' \
  --header "Authorization: Bearer $EDI_API_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "cases": [
    {
      "description": "Two-person tent, green — replacement for damaged pole set.",
      "direction": "inbound",
      "expect_valid": true,
      "expected_rejection": "string",
      "name": "Two-Person Tent",
      "raw": "string",
      "transaction_set": "string"
    }
  ],
  "name": "Two-Person Tent"
}'
```

```json 200 theme={null}
{
  "advanced_to_certified": true,
  "data": {
    "configuration_hash": "string",
    "pack_hash": "string",
    "pack_name": "string",
    "partner_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "passed": true,
    "passed_count": 1,
    "results": [
      {
        "actual_valid": true,
        "detail": "string",
        "direction": "inbound",
        "expected_rejection": "string",
        "expected_valid": true,
        "name": "Two-Person Tent",
        "passed": true,
        "transaction_set": "string"
      }
    ],
    "total": 102,
    "usage": "string"
  },
  "published_template": "string",
  "success": true
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.