DoculaDevelopersDezvoltatori
API 0.8.0 · BuildVersiune produs 0.33.0
Documentation navigationNavigare documentație
PUT/api/v1/contracts/{contractId}

Update a contract draft using optimistic concurrencyActualizează o ciornă de contract cu verificarea reviziei

Update a contract draft using optimistic concurrency. Applies the documented change under the declared preconditions. Required inputs: contractId, Origin, X-CSRF-Token, request body. HTTP success: 200; documented failures: 401, 403, 404, 405, 409, 415, 422, 500, 503. Preserve draft revision, immutable version, publication, and deprecation identities.Actualizează o ciornă de contract cu verificarea reviziei. Aplică modificarea documentată cu precondițiile declarate. Intrări obligatorii: contractId, Origin, X-CSRF-Token, request body. Succes HTTP: 200; erori documentate: 401, 403, 404, 405, 409, 415, 422, 500, 503. Păstrează identitățile ciornei, versiunii imuabile, publicării și retragerii.

Roles: administrator, engineerRoluri: administrator (administrator), engineer (inginer)Host-local session requiredEste necesară sesiunea hostuluiBody ≤ 1,085,440 bytesBody ≤ 1.085.440 bytes

A session with must_change_password=true is forbidden regardless of role; only session read, password change, and logout remain authorized.O sesiune cu must_change_password=true este interzisă indiferent de rol; rămân autorizate doar citirea sesiunii, schimbarea parolei și deconectarea.

Required headers and parametersHeadere și parametri obligatorii

Content-TypeRequired request headerHeader obligatoriu al cererii
OriginRequired request headerHeader obligatoriu al cererii
X-CSRF-TokenRequired request headerHeader obligatoriu al cererii
contractIdpath · requiredobligatoriu
Immutable contract UUID.UUID-ul contractului imuabil.
11111111-1111-4111-8111-000000000001
Complete parameter schemaSchema completă a parametrului
{
  "type": "string",
  "format": "uuid"
}
Originheader · requiredobligatoriu
Must be one configured exact browser origin and its host must equal the request Host; no Referer fallback is accepted.Trebuie să fie una dintre originile exacte configurate pentru browser, iar hostul ei trebuie să coincidă cu Host-ul cererii. Un Referer corespunzător este acceptat numai când Origin lipsește.
http://127.0.0.1:18081
Complete parameter schemaSchema completă a parametrului
{
  "type": "string",
  "format": "uri"
}
X-CSRF-Tokenheader · requiredobligatoriu
Per-session HMAC token returned by login or session-read; it is accepted only with that host's session and exact matching Origin.Token HMAC specific sesiunii, returnat la autentificare sau la citirea sesiunii; este acceptat numai împreună cu sesiunea acelui host și cu un Origin exact corespunzător.
synthetic-csrf-token
Complete parameter schemaSchema completă a parametrului
{
  "type": "string",
  "minLength": 1
}

Lifecycle and conventionsCiclu și convenții

Open the related API conventionDeschide convenția API asociată

Request examplesExemple de cerere

Synthetic curl · copy onlycurl sintetic · numai pentru copiere
curl --request PUT "$DOCULA_URL/api/v1/contracts/$CONTRACT_ID" \
  --cookie "$COOKIE_JAR" \
  --header "Content-Type: application/json" \
  --header "Origin: $DOCULA_URL" \
  --header "X-CSRF-Token: $CSRF_TOKEN" \
  --data-binary @request.json

Request body: requiredBody cerere: obligatoriu

application/json

Structured response bodyBody structurat al răspunsului

Complete request schemaSchema completă a cererii
{
  "$ref": "#/components/schemas/UpdateContractRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "name",
    "description",
    "schema",
    "expected_revision"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "description": {
      "type": "string",
      "maxLength": 2000
    },
    "schema": {
      "type": "string",
      "minLength": 1,
      "x-docula-max-bytes": 524288
    },
    "expected_revision": {
      "type": "integer",
      "minimum": 1
    }
  }
}
Synthetic updateContractDraft request · syntheticExemplu sintetic · application/json
{
  "name": "synthetic-example",
  "description": "synthetic-example",
  "schema": "synthetic-example",
  "expected_revision": 1
}

Responses and failuresRăspunsuri și erori

200The expected draft revision was updated and audited.Revizia așteptată a ciornei a fost actualizată și auditată.

Structured response bodyBody structurat al răspunsului

application/json

Structured response bodyBody structurat al răspunsului

Complete response schemaSchema completă a răspunsului
{
  "$ref": "#/components/schemas/ContractMutation",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "contract",
    "correlation_id"
  ],
  "properties": {
    "contract": {
      "$ref": "#/components/schemas/Contract",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "name",
        "description",
        "draft_revision",
        "created_by",
        "created_at",
        "updated_at",
        "versions"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "draft_schema": {
          "type": "string"
        },
        "draft_revision": {
          "type": "integer",
          "minimum": 1
        },
        "created_by": {
          "type": "string",
          "format": "uuid"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "versions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/ContractVersion",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "contract_id",
              "number",
              "schema",
              "content_hash",
              "status",
              "source_revision",
              "created_by",
              "created_at"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "contract_id": {
                "type": "string",
                "format": "uuid"
              },
              "number": {
                "type": "integer",
                "minimum": 1
              },
              "schema": {
                "type": "string",
                "minLength": 1
              },
              "content_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "status": {
                "type": "string",
                "enum": [
                  "versioned",
                  "published",
                  "deprecated"
                ]
              },
              "source_revision": {
                "type": "integer",
                "minimum": 1
              },
              "created_by": {
                "type": "string",
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "published_at": {
                "type": "string",
                "format": "date-time"
              },
              "deprecated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      }
    },
    "correlation_id": {
      "type": "string",
      "minLength": 1
    }
  }
}
Synthetic ContractUpdated responseExemplu sintetic HTTP 200
{
  "contract": {
    "id": "11111111-1111-4111-8111-000000000001",
    "name": "synthetic-example",
    "description": "synthetic-example",
    "draft_revision": 1,
    "created_by": "11111111-1111-4111-8111-000000000001",
    "created_at": "2026-08-01T10:00:00Z",
    "updated_at": "2026-08-01T10:00:00Z",
    "versions": [
      {
        "id": "11111111-1111-4111-8111-000000000001",
        "contract_id": "11111111-1111-4111-8111-000000000001",
        "number": 1,
        "schema": "synthetic-example",
        "content_hash": "0000000000000000000000000000000000000000000000000000000000000000",
        "status": "versioned",
        "source_revision": 1,
        "created_by": "11111111-1111-4111-8111-000000000001",
        "created_at": "2026-08-01T10:00:00Z"
      }
    ]
  },
  "correlation_id": "11111111-1111-4111-8111-000000000001"
}
401A valid server-side session is required.Este necesară o sesiune validă pe server.

Structured response bodyBody structurat al răspunsului

application/problem+json

Structured response bodyBody structurat al răspunsului

Complete response schemaSchema completă a răspunsului
{
  "allOf": [
    {
      "$ref": "#/components/schemas/Problem",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "title",
        "status",
        "code",
        "detail",
        "correlation_id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^/problems/[a-z_]+$"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "integer",
          "minimum": 400,
          "maximum": 599
        },
        "code": {
          "type": "string",
          "enum": [
            "internal_error",
            "dependency_unavailable",
            "invalid_credentials",
            "origin_rejected",
            "validation_failed",
            "rate_limited",
            "authentication_required",
            "csrf_rejected",
            "forbidden",
            "conflict",
            "not_found",
            "method_not_allowed",
            "unsupported_media_type",
            "content_unavailable",
            "precondition_required",
            "precondition_failed"
          ]
        },
        "detail": {
          "type": "string",
          "minLength": 1
        },
        "correlation_id": {
          "type": "string",
          "minLength": 1
        },
        "dependencies": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "$ref": "#/components/schemas/PublicDependency",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "status"
            ],
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "postgresql",
                  "nats",
                  "s3",
                  "outbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "unavailable"
                ]
              }
            }
          }
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "const": 401
        },
        "code": {
          "const": "authentication_required"
        }
      }
    }
  ]
}
Synthetic AuthenticationRequired responseExemplu sintetic HTTP 401
{
  "type": "/problems/synthetic_example",
  "title": "synthetic-example",
  "status": 401,
  "code": "authentication_required",
  "detail": "synthetic-example",
  "correlation_id": "11111111-1111-4111-8111-000000000001"
}
403The session failed CSRF validation or lacks contract-write permission.Sesiunea nu a trecut validarea CSRF sau nu are permisiunea contract-write.

Structured response bodyBody structurat al răspunsului

application/problem+json

Structured response bodyBody structurat al răspunsului

Complete response schemaSchema completă a răspunsului
{
  "allOf": [
    {
      "$ref": "#/components/schemas/Problem",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "title",
        "status",
        "code",
        "detail",
        "correlation_id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^/problems/[a-z_]+$"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "integer",
          "minimum": 400,
          "maximum": 599
        },
        "code": {
          "type": "string",
          "enum": [
            "internal_error",
            "dependency_unavailable",
            "invalid_credentials",
            "origin_rejected",
            "validation_failed",
            "rate_limited",
            "authentication_required",
            "csrf_rejected",
            "forbidden",
            "conflict",
            "not_found",
            "method_not_allowed",
            "unsupported_media_type",
            "content_unavailable",
            "precondition_required",
            "precondition_failed"
          ]
        },
        "detail": {
          "type": "string",
          "minLength": 1
        },
        "correlation_id": {
          "type": "string",
          "minLength": 1
        },
        "dependencies": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "$ref": "#/components/schemas/PublicDependency",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "status"
            ],
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "postgresql",
                  "nats",
                  "s3",
                  "outbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "unavailable"
                ]
              }
            }
          }
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "const": 403
        },
        "code": {
          "enum": [
            "csrf_rejected",
            "forbidden"
          ]
        }
      }
    }
  ]
}
Synthetic ContractMutationDenied responseExemplu sintetic HTTP 403
{
  "type": "/problems/synthetic_example",
  "title": "synthetic-example",
  "status": 403,
  "code": "csrf_rejected",
  "detail": "synthetic-example",
  "correlation_id": "11111111-1111-4111-8111-000000000001"
}
404The API or health path is unknown.Calea API sau de health este necunoscută.

Structured response bodyBody structurat al răspunsului

application/problem+json

Structured response bodyBody structurat al răspunsului

Complete response schemaSchema completă a răspunsului
{
  "allOf": [
    {
      "$ref": "#/components/schemas/Problem",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "title",
        "status",
        "code",
        "detail",
        "correlation_id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^/problems/[a-z_]+$"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "integer",
          "minimum": 400,
          "maximum": 599
        },
        "code": {
          "type": "string",
          "enum": [
            "internal_error",
            "dependency_unavailable",
            "invalid_credentials",
            "origin_rejected",
            "validation_failed",
            "rate_limited",
            "authentication_required",
            "csrf_rejected",
            "forbidden",
            "conflict",
            "not_found",
            "method_not_allowed",
            "unsupported_media_type",
            "content_unavailable",
            "precondition_required",
            "precondition_failed"
          ]
        },
        "detail": {
          "type": "string",
          "minLength": 1
        },
        "correlation_id": {
          "type": "string",
          "minLength": 1
        },
        "dependencies": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "$ref": "#/components/schemas/PublicDependency",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "status"
            ],
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "postgresql",
                  "nats",
                  "s3",
                  "outbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "unavailable"
                ]
              }
            }
          }
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "const": 404
        },
        "code": {
          "const": "not_found"
        }
      }
    }
  ]
}
Synthetic NotFound responseExemplu sintetic HTTP 404
{
  "type": "/problems/synthetic_example",
  "title": "synthetic-example",
  "status": 404,
  "code": "not_found",
  "detail": "synthetic-example",
  "correlation_id": "11111111-1111-4111-8111-000000000001"
}
405The method is not supported by this path.Metoda nu este acceptată de această cale.

Structured response bodyBody structurat al răspunsului

Response headersHeaderele răspunsului

AllowThe exact method or method set supported by this path.Metoda sau setul exact de metode acceptate de această cale.

application/problem+json

Structured response bodyBody structurat al răspunsului

Complete response schemaSchema completă a răspunsului
{
  "allOf": [
    {
      "$ref": "#/components/schemas/Problem",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "title",
        "status",
        "code",
        "detail",
        "correlation_id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^/problems/[a-z_]+$"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "integer",
          "minimum": 400,
          "maximum": 599
        },
        "code": {
          "type": "string",
          "enum": [
            "internal_error",
            "dependency_unavailable",
            "invalid_credentials",
            "origin_rejected",
            "validation_failed",
            "rate_limited",
            "authentication_required",
            "csrf_rejected",
            "forbidden",
            "conflict",
            "not_found",
            "method_not_allowed",
            "unsupported_media_type",
            "content_unavailable",
            "precondition_required",
            "precondition_failed"
          ]
        },
        "detail": {
          "type": "string",
          "minLength": 1
        },
        "correlation_id": {
          "type": "string",
          "minLength": 1
        },
        "dependencies": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "$ref": "#/components/schemas/PublicDependency",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "status"
            ],
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "postgresql",
                  "nats",
                  "s3",
                  "outbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "unavailable"
                ]
              }
            }
          }
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "const": 405
        },
        "code": {
          "const": "method_not_allowed"
        }
      }
    }
  ]
}
Synthetic MethodNotAllowed responseExemplu sintetic HTTP 405
{
  "type": "/problems/synthetic_example",
  "title": "synthetic-example",
  "status": 405,
  "code": "method_not_allowed",
  "detail": "synthetic-example",
  "correlation_id": "11111111-1111-4111-8111-000000000001"
}
409The resource changed before the requested mutation could be applied.Resursa s-a schimbat înainte ca mutația solicitată să poată fi aplicată.

Structured response bodyBody structurat al răspunsului

application/problem+json

Structured response bodyBody structurat al răspunsului

Complete response schemaSchema completă a răspunsului
{
  "allOf": [
    {
      "$ref": "#/components/schemas/Problem",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "title",
        "status",
        "code",
        "detail",
        "correlation_id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^/problems/[a-z_]+$"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "integer",
          "minimum": 400,
          "maximum": 599
        },
        "code": {
          "type": "string",
          "enum": [
            "internal_error",
            "dependency_unavailable",
            "invalid_credentials",
            "origin_rejected",
            "validation_failed",
            "rate_limited",
            "authentication_required",
            "csrf_rejected",
            "forbidden",
            "conflict",
            "not_found",
            "method_not_allowed",
            "unsupported_media_type",
            "content_unavailable",
            "precondition_required",
            "precondition_failed"
          ]
        },
        "detail": {
          "type": "string",
          "minLength": 1
        },
        "correlation_id": {
          "type": "string",
          "minLength": 1
        },
        "dependencies": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "$ref": "#/components/schemas/PublicDependency",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "status"
            ],
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "postgresql",
                  "nats",
                  "s3",
                  "outbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "unavailable"
                ]
              }
            }
          }
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "const": 409
        },
        "code": {
          "const": "conflict"
        }
      }
    }
  ]
}
Synthetic Conflict responseExemplu sintetic HTTP 409
{
  "type": "/problems/synthetic_example",
  "title": "synthetic-example",
  "status": 409,
  "code": "conflict",
  "detail": "synthetic-example",
  "correlation_id": "11111111-1111-4111-8111-000000000001"
}
415The mutation is missing the exact supported JSON content type.Mutației îi lipsește tipul de conținut JSON acceptat exact.

Structured response bodyBody structurat al răspunsului

application/problem+json

Structured response bodyBody structurat al răspunsului

Complete response schemaSchema completă a răspunsului
{
  "allOf": [
    {
      "$ref": "#/components/schemas/Problem",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "title",
        "status",
        "code",
        "detail",
        "correlation_id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^/problems/[a-z_]+$"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "integer",
          "minimum": 400,
          "maximum": 599
        },
        "code": {
          "type": "string",
          "enum": [
            "internal_error",
            "dependency_unavailable",
            "invalid_credentials",
            "origin_rejected",
            "validation_failed",
            "rate_limited",
            "authentication_required",
            "csrf_rejected",
            "forbidden",
            "conflict",
            "not_found",
            "method_not_allowed",
            "unsupported_media_type",
            "content_unavailable",
            "precondition_required",
            "precondition_failed"
          ]
        },
        "detail": {
          "type": "string",
          "minLength": 1
        },
        "correlation_id": {
          "type": "string",
          "minLength": 1
        },
        "dependencies": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "$ref": "#/components/schemas/PublicDependency",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "status"
            ],
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "postgresql",
                  "nats",
                  "s3",
                  "outbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "unavailable"
                ]
              }
            }
          }
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "const": 415
        },
        "code": {
          "const": "unsupported_media_type"
        }
      }
    }
  ]
}
Synthetic UnsupportedMediaType responseExemplu sintetic HTTP 415
{
  "type": "/problems/synthetic_example",
  "title": "synthetic-example",
  "status": 415,
  "code": "unsupported_media_type",
  "detail": "synthetic-example",
  "correlation_id": "11111111-1111-4111-8111-000000000001"
}
422The request is invalid.Cererea este invalidă.

Structured response bodyBody structurat al răspunsului

application/problem+json

Structured response bodyBody structurat al răspunsului

Complete response schemaSchema completă a răspunsului
{
  "allOf": [
    {
      "$ref": "#/components/schemas/Problem",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "title",
        "status",
        "code",
        "detail",
        "correlation_id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^/problems/[a-z_]+$"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "integer",
          "minimum": 400,
          "maximum": 599
        },
        "code": {
          "type": "string",
          "enum": [
            "internal_error",
            "dependency_unavailable",
            "invalid_credentials",
            "origin_rejected",
            "validation_failed",
            "rate_limited",
            "authentication_required",
            "csrf_rejected",
            "forbidden",
            "conflict",
            "not_found",
            "method_not_allowed",
            "unsupported_media_type",
            "content_unavailable",
            "precondition_required",
            "precondition_failed"
          ]
        },
        "detail": {
          "type": "string",
          "minLength": 1
        },
        "correlation_id": {
          "type": "string",
          "minLength": 1
        },
        "dependencies": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "$ref": "#/components/schemas/PublicDependency",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "status"
            ],
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "postgresql",
                  "nats",
                  "s3",
                  "outbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "unavailable"
                ]
              }
            }
          }
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "const": 422
        },
        "code": {
          "const": "validation_failed"
        }
      }
    }
  ]
}
Synthetic ValidationFailed responseExemplu sintetic HTTP 422
{
  "type": "/problems/synthetic_example",
  "title": "synthetic-example",
  "status": 422,
  "code": "validation_failed",
  "detail": "synthetic-example",
  "correlation_id": "11111111-1111-4111-8111-000000000001"
}
500An internal handler failure occurred.A apărut o eroare internă în handler.

Structured response bodyBody structurat al răspunsului

application/problem+json

Structured response bodyBody structurat al răspunsului

Complete response schemaSchema completă a răspunsului
{
  "allOf": [
    {
      "$ref": "#/components/schemas/Problem",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "title",
        "status",
        "code",
        "detail",
        "correlation_id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^/problems/[a-z_]+$"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "integer",
          "minimum": 400,
          "maximum": 599
        },
        "code": {
          "type": "string",
          "enum": [
            "internal_error",
            "dependency_unavailable",
            "invalid_credentials",
            "origin_rejected",
            "validation_failed",
            "rate_limited",
            "authentication_required",
            "csrf_rejected",
            "forbidden",
            "conflict",
            "not_found",
            "method_not_allowed",
            "unsupported_media_type",
            "content_unavailable",
            "precondition_required",
            "precondition_failed"
          ]
        },
        "detail": {
          "type": "string",
          "minLength": 1
        },
        "correlation_id": {
          "type": "string",
          "minLength": 1
        },
        "dependencies": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "$ref": "#/components/schemas/PublicDependency",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "status"
            ],
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "postgresql",
                  "nats",
                  "s3",
                  "outbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "unavailable"
                ]
              }
            }
          }
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "const": 500
        },
        "code": {
          "const": "internal_error"
        }
      }
    }
  ]
}
Synthetic InternalError responseExemplu sintetic HTTP 500
{
  "type": "/problems/synthetic_example",
  "title": "synthetic-example",
  "status": 500,
  "code": "internal_error",
  "detail": "synthetic-example",
  "correlation_id": "11111111-1111-4111-8111-000000000001"
}
503A required dependency is unavailable.O dependență obligatorie este indisponibilă.

Structured response bodyBody structurat al răspunsului

application/problem+json

Structured response bodyBody structurat al răspunsului

Complete response schemaSchema completă a răspunsului
{
  "allOf": [
    {
      "$ref": "#/components/schemas/Problem",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "title",
        "status",
        "code",
        "detail",
        "correlation_id"
      ],
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^/problems/[a-z_]+$"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "integer",
          "minimum": 400,
          "maximum": 599
        },
        "code": {
          "type": "string",
          "enum": [
            "internal_error",
            "dependency_unavailable",
            "invalid_credentials",
            "origin_rejected",
            "validation_failed",
            "rate_limited",
            "authentication_required",
            "csrf_rejected",
            "forbidden",
            "conflict",
            "not_found",
            "method_not_allowed",
            "unsupported_media_type",
            "content_unavailable",
            "precondition_required",
            "precondition_failed"
          ]
        },
        "detail": {
          "type": "string",
          "minLength": 1
        },
        "correlation_id": {
          "type": "string",
          "minLength": 1
        },
        "dependencies": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "$ref": "#/components/schemas/PublicDependency",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "status"
            ],
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "postgresql",
                  "nats",
                  "s3",
                  "outbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "unavailable"
                ]
              }
            }
          }
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "const": 503
        },
        "code": {
          "const": "dependency_unavailable"
        }
      }
    }
  ]
}
Synthetic DependencyUnavailable responseExemplu sintetic HTTP 503
{
  "type": "/problems/synthetic_example",
  "title": "synthetic-example",
  "status": 503,
  "code": "dependency_unavailable",
  "detail": "synthetic-example",
  "correlation_id": "11111111-1111-4111-8111-000000000001"
}

Frontend capabilityCapabilitate frontend

API-onlyDoar API
PlannedPlanificatNoNuImplementedImplementatNoNuAcceptedAcceptatNoNu

Contract lifecycle workflows are API-only; see the operational tasks guide.Operația rămâne intenționat disponibilă doar prin API.

Guided courseCurs ghidat

This operation is not part of the finite Story 5.3 course.Această operație nu face parte din cursul finit Story 5.3.