# Models

## The ErrorResponse object

```json
{"openapi":"3.0.3","info":{"title":"Dashboard API","version":"1.0.0"},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code from the ErrorCode enum."},"message":{"type":"string","description":"Human-readable error message."},"details":{"type":"object","properties":{"url":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string","format":"uuid","description":"Unique request identifier for tracing."},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the error occurred."},"issues":{"type":"object","description":"Additional error details (e.g., validation errors).","additionalProperties":true}},"required":["url","method","requestId","timestamp"]}},"required":["code","message","details"]}},"required":["error"]}}}}
```

## The MonetaryData object

```json
{"openapi":"3.0.3","info":{"title":"Dashboard API","version":"1.0.0"},"components":{"schemas":{"MonetaryData":{"type":"object","properties":{"amount":{"type":"string","description":"Decimal amount as a string to preserve precision."},"currency":{"type":"string","description":"ISO 4217 currency code (e.g., USD, EUR, GBP)."}},"required":["amount","currency"],"additionalProperties":false}}}}
```

## The PaymentRequest object

```json
{"openapi":"3.0.3","info":{"title":"Dashboard API","version":"1.0.0"},"components":{"schemas":{"PaymentRequest":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"amount":{"$ref":"#/components/schemas/MonetaryData"},"description":{"type":"string"},"reference":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"payerId":{"type":"string","nullable":true},"payeeId":{"type":"string","nullable":true}},"required":["id","organizationId","amount","status","createdAt","updatedAt"],"additionalProperties":true},"MonetaryData":{"type":"object","properties":{"amount":{"type":"string","description":"Decimal amount as a string to preserve precision."},"currency":{"type":"string","description":"ISO 4217 currency code (e.g., USD, EUR, GBP)."}},"required":["amount","currency"],"additionalProperties":false}}}}
```
