{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ledger.abivia.com/api/json/create-response.schema.json",
  "title": "Create Response",
  "description": "Response to a create ledger request",
  "type": "object",
  "oneOf": [
    {
      "$ref": "https://ledger.abivia.com/api/json/error-response.schema.json"
    },
    {
      "properties": {
        "time": {
          "description": "The time the request was processed.",
          "type": "string",
          "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z"
        },
        "ledger": {
          "description": "Attributes of the new Ledger",
          "type": "object",
          "properties": {
            "uuid": {
              "description": "UUID of the root account",
              "type": "string",
              "format": "uuid"
            },
            "revision": {
              "description": "A revision hash code",
              "type": "string"
            },
            "createdAt": {
              "description": "The time the ledger was created.",
              "type": "string",
              "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z"
            },
            "updatedAt": {
              "description": "The time the ledger was updated.",
              "type": "string",
              "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z"
            }
          },
          "required": [
            "createdAt",
            "revision",
            "updatedAt",
            "uuid"
          ]
        }
      }
    }
  ]
}
