Browse Developer Tooling

stable · api · 0.1.0

Validate the MiniCenter request contract

POST /api/v1/noop

Capability Domain: Developer Tooling

Authentication

No authentication required

Scope: None

Parameters and request body

  • Idempotency-Key — header, required
    Idempotency-Key schema
    {
        "type": "string",
        "maxLength": 255
    }
  • X-Correlation-ID — header, optional
    X-Correlation-ID schema
    {
        "type": "string",
        "format": "uuid"
    }

Request schema

application/json

application/json request schema
{
    "type": "object",
    "required": [
        "money"
    ],
    "properties": {
        "money": {
            "type": "object",
            "additionalProperties": false,
            "required": [
                "currency",
                "minor"
            ],
            "properties": {
                "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                },
                "minor": {
                    "type": "integer"
                }
            }
        }
    }
}

application/json request example

application/json request example
{
    "money": {
        "currency": "TWD",
        "minor": 100
    }
}

Responses and errors

StatusDescription
202Contract accepted without a side effect
422Invalid public request
409Idempotency key reused for another payload

202 schema

202 response schema
{
    "type": "object",
    "required": [
        "data",
        "meta"
    ],
    "properties": {
        "data": {
            "type": "object",
            "required": [
                "money",
                "status"
            ],
            "properties": {
                "money": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                        "currency",
                        "minor"
                    ],
                    "properties": {
                        "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                        },
                        "minor": {
                            "type": "integer"
                        }
                    }
                },
                "status": {
                    "type": "string",
                    "enum": [
                        "queued",
                        "completed"
                    ]
                }
            }
        },
        "meta": {
            "type": "object",
            "required": [
                "release",
                "idempotency_key",
                "correlation_id",
                "replayed"
            ],
            "properties": {
                "release": {
                    "type": "string"
                },
                "idempotency_key": {
                    "type": "string"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "replayed": {
                    "type": "boolean"
                }
            }
        }
    }
}

422 schema

422 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

409 schema

409 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

202 example

202 response example
{
    "data": {
        "money": {
            "currency": "TWD",
            "minor": 100
        },
        "status": "queued"
    },
    "meta": {
        "release": "0.1.0",
        "idempotency_key": "contract-example",
        "correlation_id": "123e4567-e89b-12d3-a456-426614174000",
        "replayed": false
    }
}

Idempotency

Idempotency-Key is required. Reusing the same key with the same payload replays the original result; using it with another payload returns 409.