{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/monite/json-schema/monite-sync-record-resource-list-schema.json",
  "title": "SyncRecordResourceList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/monite-accounting-synchronized-records-api-openapi.yml#/components/schemas/SyncRecordResourceList",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/SyncRecordResource"
      },
      "type": "array"
    },
    "next_pagination_token": {
      "type": "string",
      "description": "A token that can be sent in the `pagination_token` query parameter to get the next page of results, or `null` if there is no next page (i.e. you've reached the last page)."
    },
    "prev_pagination_token": {
      "type": "string",
      "description": "A token that can be sent in the `pagination_token` query parameter to get the previous page of results, or `null` if there is no previous page (i.e. you've reached the first page)."
    }
  },
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "ObjectMatchTypes": {
      "type": "string",
      "enum": [
        "product",
        "customer",
        "vendor",
        "receivable",
        "bill",
        "payment_record"
      ]
    },
    "Platform": {
      "type": "string",
      "enum": [
        "xero",
        "quickbooks",
        "quickbooks_online",
        "quickbooks_online_sandbox"
      ]
    },
    "ServiceProvidersEnum": {
      "type": "string",
      "enum": [
        "codat",
        "railz"
      ]
    },
    "SyncRecordResource": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "errors": {
          "type": "object"
        },
        "last_pulled_at": {
          "type": "string",
          "format": "date-time"
        },
        "object_id": {
          "type": "string",
          "format": "uuid"
        },
        "object_type": {
          "$ref": "#/$defs/ObjectMatchTypes"
        },
        "object_updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "platform": {
          "$ref": "#/$defs/Platform"
        },
        "platform_object_id": {
          "type": "string"
        },
        "platform_updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "provider": {
          "$ref": "#/$defs/ServiceProvidersEnum"
        },
        "provider_object_id": {
          "type": "string"
        },
        "provider_updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "sync_status": {
          "$ref": "#/$defs/SyncStatus"
        }
      },
      "type": "object",
      "required": [
        "id",
        "created_at",
        "updated_at",
        "last_pulled_at",
        "sync_status",
        "object_type"
      ]
    },
    "SyncStatus": {
      "type": "string",
      "enum": [
        "pending",
        "error",
        "done"
      ]
    }
  }
}