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

> ## Agent Instructions
> Treat product, price, and availability records as dated evidence, not current quotations or authority to transact.
> Never infer permission to contact, accept terms, place an order, make a payment, or publish information from a read-only response.

# Use any programming language

> Connect through HTTPS and JSON using your existing stack; the SDK is optional.

The integration boundary is **HTTPS plus JSON**, with an OpenAPI contract and JSON Schema. A TypeScript or Python SDK is a convenience; it is not an admission requirement. Use your existing server, script, automation tool or programming language.

<Warning>
  The supplier access and validation operations are a preview pending application rollout. This page demonstrates sample validation, not ingestion. Verify the [live OpenAPI](https://middlemantechnologies.com/openapi.json) and [release status](/suppliers/status) first. Buyer writes, recurring intake and email intake are not exposed by this contract.
</Warning>

## Use your existing stack

| Stack                               | Typical implementation                                                        |
| ----------------------------------- | ----------------------------------------------------------------------------- |
| JavaScript / TypeScript             | A server-side HTTP client or the [starter SDK](/suppliers/sdks)               |
| Python                              | An HTTP client or the standard-library [starter SDK](/suppliers/sdks)         |
| Java / Kotlin, C# / .NET, Go, Rust  | The runtime's HTTP client, or an OpenAPI-generated client compatible with 3.1 |
| PHP, Ruby, Elixir, another language | A server-side HTTPS request with JSON serialization                           |
| Shell or PowerShell                 | A scheduled script using an HTTP client                                       |
| Low-code automation                 | A scoped source connector, mapping step and HTTP request action               |

Choose a maintained client supported by your environment. Verify generated clients against the published schema and sample errors; generator support varies. No language-specific package is required. Do not embed a supplier key in public browser code or in a shared workbook cell.

## The wire contract

Once the preview endpoints are released:

1. Call `GET /api/v1/supplier/me` with the company key. Confirm the expected company identity, scopes, schema version and `capabilities.validate`.
2. Map a small approved source sample to the [record schema](https://middleman.mintlify.app/downloads/supplier-records.schema.json).
3. Send the JSON batch to `POST /api/v1/supplier/validate` with `Content-Type: application/json` and the same authorization header.
4. Interpret a valid result as validation only: `persisted: false`, `admitted: false`.

```http theme={"system"}
POST /api/v1/supplier/validate HTTP/1.1
Host: middlemantechnologies.com
Authorization: Bearer <value from your secret store>
Content-Type: application/json

<JSON batch matching the supplier schema>
```

This wire outline contains placeholders. Use the [synthetic example](https://middleman.mintlify.app/downloads/supplier-example.json) to understand the complete body. Live samples require a new source read and truthful timestamps.

<CodeGroup>
  ```bash cURL theme={"system"}
  # Disable shell tracing; provision this variable through your secret store.
  curl --fail-with-body --max-time 15 \
    'https://middlemantechnologies.com/api/v1/supplier/me' \
    -H "Authorization: Bearer $MIDDLEMAN_SUPPLIER_API_KEY"

  # After confirming the expected company and validation capability:
  curl --fail-with-body --max-time 15 \
    'https://middlemantechnologies.com/api/v1/supplier/validate' \
    -H "Authorization: Bearer $MIDDLEMAN_SUPPLIER_API_KEY" \
    -H 'Content-Type: application/json' \
    --data-binary @source-batch.json
  ```

  ```powershell PowerShell 7+ theme={"system"}
  # Provision the variable through your approved secret store.
  $headers = @{ Authorization = "Bearer $env:MIDDLEMAN_SUPPLIER_API_KEY" }
  $access = Invoke-RestMethod -Method Get -TimeoutSec 15 -MaximumRedirection 0 `
    -Uri 'https://middlemantechnologies.com/api/v1/supplier/me' -Headers $headers
  if (-not $access.data.capabilities.validate) { throw 'Validation unavailable' }
  # Verify $access.data.supplierId matches your company before continuing.
  $result = Invoke-RestMethod -Method Post -TimeoutSec 15 -MaximumRedirection 0 `
    -Uri 'https://middlemantechnologies.com/api/v1/supplier/validate' `
    -Headers $headers -ContentType 'application/json' -InFile './source-batch.json'
  $result # Log the validation result, not the key or source records.
  ```
</CodeGroup>

Send keys only to your verified Middleman application origin. Reject redirects and never pass the key to a source connector, email recipient, documentation service or agent message. Protect process arguments and logs on a shared runner; prefer a client that reads secrets directly from the runner's secret store.

## Rules every client must preserve

* At most 50 records per preview validation request, within 256 KiB of encoded JSON. This is not a bulk ingestion limit or endpoint.
* Identifiers and exact decimal prices remain strings; do not round them through floating-point conversions.
* Follow schema-required fields, units, null handling and timestamp rules. Never alter stale timestamps to pass validation.
* Parse HTTP status and JSON content. A redirect, HTML login page or `404` does not prove receipt.
* On `422`, correct field errors. Resolve `401`/`403` access failures before retrying. Honor `Retry-After` on `429`; use bounded backoff for transient errors and timeouts.
* Keep local validation separate from recurring delivery. Future write APIs need their documented idempotency and receipt behavior; an arbitrary header does not create those guarantees.

Next, prepare the [schedule and delivery checks](/integrations/recurring) that will run when an intake route is enabled.
