---
title: "Validate one bounded ERP transaction through Commerce Gate"
method: POST
path: "/v1/guard/validate"
deprecated: true
---

# Validate one bounded ERP transaction through Commerce Gate

`POST /v1/guard/validate`

## Request

- Base URL: `https://api.decionis.com`
- URL: `https://api.decionis.com/v1/guard/validate`
- Auth: API key in header `X-Decionis-API-Key`

> **Deprecated.**

Deprecated alias of `POST /v1/connections/{connectionId}/executions`: the same handler, which answers this sales contract unchanged for the installed Business Central extension 1.0.2.3 and MCP clients. Performs enforced binary policy validation and atomic agent-budget authorization for a complete Dynamics 365 transaction. It returns ALLOW or BLOCK but never writes, posts, releases, or modifies the ERP transaction. After policy clears, the candidate backend rejects a changed request for a tracked transaction when its timestamp is equal to or older than the stored revision, returning HTTP 200/BLOCK with AGENT_BUDGET_REQUEST_CONFLICT without changing the reservation or spent amount. Exact current retries reuse their budget result; strictly newer revisions undergo budget authorization. Transaction identity normalizes only tenant UUID casing, preserving organization, agent and transaction identifiers. One equivalent legacy reservation retains its original stored key. Multiple equivalent reservations return the same conflict and leave all rows and spent amount unchanged for reconciliation. This requires a configured agent budget and the matching backend deployment; it is not a wall-clock expiry rule or the sixteen-check Protocol preflight.

## Headers

- `X-ERP-Region` string, required

## Request body

- GuardRequest
  - `transaction_id` string, required: Opaque, case-sensitive transaction identity. Company prefixes and the complete suffix are preserved during budget reservation lookup.
  - `erp_type` 'D365_BC' | 'D365_FSCM', required
  - `tenant_id` string, uuid, required: Tenant UUID. The candidate backend normalizes its casing for transaction identity, consistently with the canonical request hash.
  - `timestamp` string, date-time, required: Submitted revision time, included in the canonical request hash. For a configured budget and tracked transaction, a changed request must be strictly newer than the stored revision; exact current retries remain idempotent. This is not an expiry based on the current clock.
  - `agent_id` string, required
  - `currency` string, required
  - `lines` GuardLine[], required
    - `line_id` integer, required
    - `sku` string, required
    - `quantity` number, required
    - `unit_price` number, required
    - `cost_base` number, required

## Response `200`

Central binary decision, including budget revision conflicts as BLOCK

- GuardResponse
  - `decision` 'ALLOW' | 'BLOCK', required
  - `transaction_id` string, required
  - `execution_time_ms` number, required
  - `reason_code` string, required: Central policy or budget reason. AGENT_BUDGET_REQUEST_CONFLICT indicates a changed request with an equal or older timestamp for a tracked budget reservation, or multiple stored reservations matching the same identity after tenant UUID casing is normalized. Both leave reservations and spent amount unchanged. It is a BLOCK decision, not a transport failure or evidence of historical overspend.
  - `message` string, required

## Other responses

- `400`: Bounded error response
- `401`: Bounded error response
- `429`: Bounded error response
- `500`: Bounded error response
- `503`: Bounded error response

---

[API](https://skmtc.dev/decionis/apis/decionis-commerce-gate-api.md) · [All operations](https://skmtc.dev/decionis/apis/decionis-commerce-gate-api/llms.txt) · [OpenAPI document](https://skmtc.dev/decionis/apis/decionis-commerce-gate-api/revisions/9fecb7109bf8?raw)
