> ## 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.

# Preview

> Deterministic mapped output; no publication or delivery

### Request body

`MappingPreview`

**definition** `MappingDefinition` *required*

**MappingDefinition**

**arrays** `MappingArray[]`

**MappingArray**

**item** `MappingDefinition` *required*

**source** `string` *required*

**target** `string` *required*

**fields** `MappingField[]` *required*

**MappingField**

**default** `any`

**factor** `string,null`

Exact multiplication for unit conversion; input must be a string.

**lookup** `object`

Additional keys map to values of type `any`.

**required** `boolean`

**source** `string` *required*

RFC 6901 JSON pointer, relative to this object/array row.

**target** `string` *required*

**input** `any` *required*

### Response

No response body. Deterministic mapped output; no publication or delivery.

### Status codes

| Code | Meaning |
| - | - |
| `200` | Deterministic mapped output; no publication or delivery |

### Using this contract

Read the [source OpenAPI document](/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/mappings/preview' \
  --header "Authorization: Bearer $EDI_API_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "definition": {
    "fields": [
      {
        "target": "order_number",
        "source": "/po_number",
        "required": true
      }
    ],
    "arrays": []
  },
  "input": {
    "po_number": "PO-123"
  }
}'
```


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