union AddLedgerEntryResponse = AddLedgerEntryResult | BadRequestError | InternalError type AddLedgerEntryResult { """The ledger entry that was posted""" entry: LedgerEntry! """ True if this request successfully completed before and the previous response is being returned """ isIkReplay: Boolean! """The ledger lines that were created in that entry""" lines: [LedgerLine!]! } """A string that must be alphanumeric""" scalar AlphaNumericString """ Equivalent to an HTTP 400 - request either has missing or incorrect data """ type BadRequestError implements Error { """The status code of error. For example, 'ledger_not_found'.""" code: String! """The error message""" message: String! """Whether or not the operation is retryable""" retryable: Boolean! } """A single amount and the timestamp requested""" type BalanceChangeDuring { """The balance or balance change""" amount: CurrencyAmount! """The period of the requested balance change""" period: Period! } """A paginated list of amounts and their periods""" type BalanceChangeDuringConnection { """ The end time of the period across which the balance changes are requested """ endTime: LastMoment! """The granularity of the return data""" granularity: Granularity! """The current page of results""" nodes: [BalanceChangeDuring!]! """ The [pagination info](https://fragment.dev/api-reference/api-types#connection-types-pageinfo) for this list """ pageInfo: PageInfo! """ The start time of the period across which the balance changes are requested """ startTime: FirstMoment! } """ Used to configure the write-consistency of a Ledger Account's balance. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ enum BalanceUpdateConsistencyMode { eventual strong } """The input for your Chart of Accounts in a Schema.""" input ChartOfAccountsInput { """ The Ledger Accounts modeled by your Schema. Ledger Accounts may be nested up to a maximum depth of 10. """ accounts: [SchemaLedgerAccountInput!]! """ The default consistency configuration for all Ledger Accounts in this Schema. If a Ledger Account does not specify its own consistency configuration, it will use the default values provided here. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ defaultConsistencyConfig: LedgerAccountConsistencyConfigInput """ The default currency of each Ledger Account in the Chart Of Accounts. It must be provided if `defaultCurrencyMode` is set to `single`. Additionally, `defaultCurrency` must be omitted if `defaultCurrencyMode` is set to `multi`. """ defaultCurrency: CurrencyMatchInput """ The default currency mode of each Ledger Account in the Chart Of Accounts. """ defaultCurrencyMode: CurrencyMode } input CreateCustomCurrencyInput { """ The currency code for custom currencies. It can be up to 36 characters long. This is used for display purposes. """ customCode: String! """ The ID for a custom currency. This is specified when creating the custom currency using the [createCustomCurrency](https://fragment.dev/api-reference/api-mutations#createcustomcurrency) mutation. It can be up to 36 characters long. """ customCurrencyId: SafeString! """ A human readable name for the currency (e.g. United States Dollar). This is used for display purposes. """ name: String! """ The number of decimal places this currency goes to. For example, United States Dollars have a precision of 2 (i.e. 100 cents in a dollar), whereas the Jordanian Dinar has a precision of 3. This is used for display purposes. """ precision: Int! } union CreateCustomCurrencyResponse = BadRequestError | CreateCustomCurrencyResult | InternalError type CreateCustomCurrencyResult { """The Currency that was created.""" customCurrency: Currency! } union CreateCustomLinkResponse = BadRequestError | CreateCustomLinkResult | InternalError type CreateCustomLinkResult { isIkReplay: Boolean! """ The custom link that was created. Represents an instance of an external system. """ link: CustomLink! } input CreateLedgerAccountInput { """ The consistency configuration for this Ledger Account. This defines how updates to this Ledger Account's balance are handled. """ consistencyConfig: LedgerAccountConsistencyConfigInput """ The currency of this Ledger Account. If this is not set, and `currencyMode` is not set to `multi`, the workspace-level default is used. """ currency: CurrencyMatchInput """ If set to `multi`, creates a multi-currency Ledger Account. If set to `single`, creates a single-currency Ledger Account. """ currencyMode: CurrencyMode """The External Account to link to this Ledger Account.""" linkedAccount: ExternalAccountMatchInput """The human-readable name of this Ledger Account.""" name: String! """The parent of this Ledger Account.""" parent: LedgerAccountMatchInput """ The type of ledger account to create. Required if this is a top-level Ledger Account. If not provided, the type will be inferred from the parent. """ type: LedgerAccountTypes } union CreateLedgerAccountResponse = BadRequestError | CreateLedgerAccountResult | InternalError type CreateLedgerAccountResult { """true if a previous request successfully created this ledger account""" isIkReplay: Boolean! """The ledger account that was created""" ledgerAccount: LedgerAccount! } input CreateLedgerAccountsInput { """Ledger Accounts to create as children of this Ledger Account.""" childLedgerAccounts: [CreateLedgerAccountsInput!] """ The consistency configuration for this ledger account. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ consistencyConfig: LedgerAccountConsistencyConfigInput """ The currency of this Ledger Account. If this is not set, the workspace level default is used. """ currency: CurrencyMatchInput """ The currency mode of this Ledger Account. If this is not set, the workspace level default is used. """ currencyMode: CurrencyMode """The idempotency key for creating this Ledger Account.""" ik: SafeString! """ The External Account to link to this Ledger Account. This can only be specified on leaf Ledger Accounts. See [Reconcile payments](https://fragment.dev/docs/reconcile-payments). """ linkedAccount: ExternalAccountMatchInput """The name of the Ledger Account.""" name: String! """ The parent of this Ledger Account. This is only valid on the top level Ledger Account in the payload. """ parent: LedgerAccountMatchInput """ The type of this Ledger Account. This field is only required if this is a root Ledger Account. Otherwise, the type will get inherited from its parent. """ type: LedgerAccountTypes } union CreateLedgerAccountsResponse = BadRequestError | CreateLedgerAccountsResult | InternalError type CreateLedgerAccountsResult { """ Whether the ledger accounts were successfully created by a previous request """ ikReplays: [IkReplay!]! """The ledger accounts that were created""" ledgerAccounts: [LedgerAccount!]! } input CreateLedgerInput { """ Use this field to specify a timezone for queries to your Ledger. When aggregating balances, all transactions within a 24 hour period starting at midnight UTC are included in each day. You can specify a different starting hour for balances. For example, use "-08:00" to align balances with Pacific Standard Time. Balance queries would then consider the start of each local day to be at 8am UTC the next day in UTC. The default timezone is UTC. """ balanceUTCOffset: UTCOffset name: String! type: LedgerTypes } union CreateLedgerResponse = BadRequestError | CreateLedgerResult | InternalError type CreateLedgerResult { """ true if this request successfully completed before and the previous response is being returned """ isIkReplay: Boolean! """The Ledger that was created""" ledger: Ledger! } type Currency { """ The currency code. This is an [enum type](https://fragment.dev/api-reference/api-types#scalars-and-enums-currencycode) . """ code: CurrencyCode! """ The currency code for custom currencies. This is only set if 'currency' is set to CUSTOM. It can be up to 36 characters long. """ customCode: String """ The ID for a custom currency. This is specified when creating the custom currency using the [createCustomCurrency](https://fragment.dev/api-reference/api-mutations#createcustomcurrency) mutation. """ customCurrencyId: SafeString """ A human readable name for the currency (e.g. United States Dollar). This is used for display purposes. """ name: String! """ The number of decimal places this currency goes to. For example, United States Dollars have a precision of 2 (i.e. 100 cents in a dollar), whereas the Jordanian Dinar has a precision of 3. This is used for display purposes. """ precision: Int! } """A single amount accompanied by its currency""" type CurrencyAmount { """Numerical integer value, serialized as a string""" amount: Int96! """The currency this amount is in""" currency: Currency! } """A paginated list of amounts with their currencies""" type CurrencyAmountConnection { """The current page of results""" nodes: [CurrencyAmount!]! """ The [pagination info](https://fragment.dev/api-reference/api-types#connection-types-pageinfo) for this list """ pageInfo: PageInfo! } enum CurrencyCode { AAVE ADA AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BCH BDT BGN BHD BIF BMD BND BOB BRL BSD BTC BTN BWP BYR BZD CAD CADC CADT CDF CHF CLP CNY COP CRC CUC CUP CUSTOM CVE CZK DAI DJF DKK DOP DZD EGP ERN ETB ETH EUR EURC FJD FKP GBP GEL GGP GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS IMP INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LINK LKR LOGICAL LRD LSL LTC LYD MAD MATIC MDL MGA MKD MMK MNT MOP MUR MVR MWK MXN MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PTS PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLL SOL SOS SPL SRD STN SVC SYP SZL THB TJS TMT TND TOP TRY TTD TVD TWD TZS UAH UGX UNI USD USDC USDG USDT UYU UZS VEF VND VUV WST XAF XCD XLM XOF XPF YER ZAR ZMW } input CurrencyFilter { """Must match the value provided""" equalTo: CurrencyMatchInput """Must match one of the values provided. Limited to 100 items maximum.""" in: [CurrencyMatchInput!] } input CurrencyMatchInput { """ The currency code. This is an [enum type](https://fragment.dev/api-reference/api-types#scalars-and-enums-currencycode). """ code: CurrencyCode! """ The ID for a custom currency. This is specified when creating the custom currency using the [createCustomCurrency](https://fragment.dev/api-reference/api-mutations#createcustomcurrency) mutation. """ customCurrencyId: SafeString } """ Defines the currency handling of a LedgerAccount, which can either be restricted to a single currency or allow multiple currencies. """ enum CurrencyMode { multi single } input CustomAccountInput { """ The currency of this external account. If this is not set, the workspace level default is used. 'currency' cannot be set if 'currencyMode' is 'multi'. """ currency: CurrencyMatchInput """ The currency mode of this external account. If set to multi, creates a multi-currency account. """ currencyMode: CurrencyMode """ The ID of this account at the external system. This is used as the idempotency key, within the scope of its Custom Link. """ externalId: SafeString! """The name of the account at the external system.""" name: String! } """A paginated list of Custom Currencies""" type CustomCurrenciesConnection { """The current page of results""" nodes: [Currency!]! """ The [pagination info](https://fragment.dev/api-reference/api-types#connection-types-pageinfo) for this list """ pageInfo: PageInfo! } type CustomLink implements Link { """ISO-8601 timestamp when the Link was created.""" created: String! """URL to the Fragment Dashboard for this Link.""" dashboardUrl: String! """A list of External Accounts associated with this Link.""" externalAccounts: ExternalAccountsConnection! """FRAGMENT ID of the Custom Link.""" id: ID! """Name of the Link as it appears in the Fragment Dashboard.""" name: String! } input CustomTxInput { account: ExternalAccountMatchInput! amount: Int96! """The currency of this tx. Should be set for multi-currency accounts.""" currency: CurrencyMatchInput description: String! """ The ID of this tx at the external system. This is used as the idempotency key, within the scope of its Custom Account. """ externalId: SafeString! posted: DateTime! } """ISO 8601 Date e.g. `1969-07-21`""" scalar Date input DateFilter { equalTo: Date """Must match one of the values provided. Limited to 100 items maximum.""" in: [Date!] """ Must fall within the given period. Supports a year (e.g. "2026") or a month (e.g. "2026-05"). To match a specific day, use `equalTo`. """ within: PeriodFilter } """ ISO 8601 DateTime e.g. `1969-07-16T13:32:00.000Z`. You can also provide a date e.g. `1969-01-01` and it will be converted to `1969-01-01T00:00:00.000Z` """ scalar DateTime """Filters a timestamp field between two moments in time""" input DateTimeFilter { """ The timestamp value must be after this moment. Specified in ISO 8601 format e.g "1968-01-01T16:45:00Z" """ after: DateTime """ The timestamp value must be before this moment. Specified in ISO 8601 format e.g "1968-01-01T16:45:00Z" """ before: DateTime } union DeleteCustomTxsResponse = BadRequestError | DeleteCustomTxsResult | InternalError type DeleteCustomTxsResult { """List of Txs deleted in this operation""" txs: [DeletedCustomTx!]! } union DeleteLedgerResponse = BadRequestError | DeleteLedgerResult | InternalError type DeleteLedgerResult { success: Boolean! } union DeleteSchemaResponse = BadRequestError | DeleteSchemaResult | InternalError type DeleteSchemaResult { success: Boolean! } type DeletedCustomTx { """A deleted Tx""" tx: Tx! } input EntryGroupMatchInput { key: SafeString! value: SafeString! } """Base error interface""" interface Error { """The status code of error. For example, 'ledger_not_found'.""" code: String! """The error message""" message: String! """Whether or not the operation is retryable""" retryable: Boolean! } type ExternalAccount { """The currency of this external account.""" currency: Currency """ Indicates if the account allows multiple currencies or is restricted to a single currency """ currencyMode: CurrencyMode! """ID used for the external account""" externalId: ID! """FRAGMENT ID of External Account""" id: ID! """ Ledger Accounts linked to this External Account. Ledger Accounts are paginated and sorted in reverse-chronological order by created date. """ ledgerAccounts( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of Ledger Accounts to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Accounts to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerAccountsConnection! """The Link that this External Account belongs to.""" link: Link! """FRAGMENT ID of this transaction's external link""" linkId: ID! name: String! """All Txs in this External Account.""" txs( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of transactions to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of transactions to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): TxsConnection! } input ExternalAccountFilter { """Ledger Account must linked to the the specified external account""" equalTo: ExternalAccountMatchInput """ Ledger Account can be linked to any of the specified external accounts. Limited to 100 items maximum. """ in: [ExternalAccountMatchInput!] } """ Specify an External Account by using `id`, or `linkId` and `externalId`. """ input ExternalAccountMatchInput { """ The external system's ID of the External Account. If this is specified, `linkId` is required. `id` is optional, but will be validated if provided. """ externalId: ID """ The FRAGMENT ID of the External Account. If this is specified, both `linkId` and `externalId` are optional, but will be validated if provided. """ id: ID """ The FRAGMENT ID of the Link the External Account is in. If this is specified, `externalId` is required. `id` is optional, but will be validated if provided. """ linkId: ID } """A paginated list of External Accounts""" type ExternalAccountsConnection { """The current page of results""" nodes: [ExternalAccount!]! """ The [pagination info](https://fragment.dev/api-reference/api-types#connection-types-pageinfo) for this list """ pageInfo: PageInfo! } enum ExternalTransferType { ach card check internal wire } enum ExternalTxSource { increase } """ The first moment of a specific year, month or day or hour e.g. 1969 or 1969-1 or 1969-1-1 or 1969-1-1T00. All of the previous examples are equivalent to `1969-1-1T00:00:00.000`. """ scalar FirstMoment enum Granularity { daily hourly monthly } """A filter to query balances of a specific subset of accounts""" input GroupBalanceAccountFilter { """A filter that must match the account ID""" id: StringFilter """ A filter that must match the account path. Wildcards ('*') may be used only for template variables, and will only match a single variable each. """ path: StringMatchFilter } """Filter for finding entries by group membership""" input GroupFilter { """ Find entries that have ALL of the specified groups. Limited to 10 items maximum. """ all: [GroupMatchInput!] """Find groups that exactly match this group""" equalTo: GroupMatchInput """Find groups that match any of these groups""" in: [GroupMatchInput!] """Find groups with a specific key""" keyEqualTo: SafeString """Find groups with any of these keys""" keyIn: [SafeString!] """Find groups that do not match this predicate""" not: GroupNotFilter @deprecated(reason: "not filter is deprecated. Use notKeyIn or notKeyEqualTo instead.") """Find groups that do not exactly match this group""" notEqualTo: GroupMatchInput """Find groups that do not match any of these groups""" notIn: [GroupMatchInput!] """Find groups that do not have a specific key""" notKeyEqualTo: SafeString """Find groups that do not have any of these keys""" notKeyIn: [SafeString!] } """ A Group in a Schema. Group define sequences of Ledger Entries and can help with reconciliation tasks. """ input GroupInput { """Human-readable description of the Group.""" description: ParameterizedString """ The key of this Group. This combined with its value is a stable, unique identifier for this group. """ key: SafeString! """ The parameters that are used to enable reconciliation abilities in a group. """ reconciliation: GroupReconciliationParametersInput } """Input type for matching a specific group by key and value""" input GroupMatchInput { """The key of the group to match""" key: SafeString! """The value of the group to match""" value: SafeString! } """ DEPRECATED: Use GroupFilter and notKeyIn or notKeyEqualTo instead. Filter for finding entries that do not match this predicate """ input GroupNotFilter { """ DEPRECATED: Find entries that are not members of all of these groups. This is an AND filter. """ keyIn: [SafeString!] } """ A set of parameters that are used to enable reconciliation abilities in a group """ input GroupReconciliationParametersInput { """ The path to the clearing account for this group. A clearing account is an account that is used to indicate funds that are in transit. Also called a suspense account, pending account, or zero balance account. """ clearingAccountPath: SchemaLedgerAccountMatchInput! } """A single amount and the timestamp requested""" type HistoricalBalance { """The balance or balance change""" amount: CurrencyAmount! """The timestamp of the requested balance""" at: LastMoment! } """A paginated list of amounts and their periods""" type HistoricalBalanceConnection { """ The end time of the period across which the balance changes are requested """ endTime: LastMoment! """The granularity of the return data""" granularity: Granularity! """The current page of results""" nodes: [HistoricalBalance!]! """ The [pagination info](https://fragment.dev/api-reference/api-types#connection-types-pageinfo) for this list """ pageInfo: PageInfo! """ The start time of the period across which the balance changes are requested """ startTime: FirstMoment! } type IkReplay { ik: SafeString! isIkReplay: Boolean! } enum IncreaseEnv { production sandbox } type IncreaseLink implements Link { """ISO-8601 timestamp when the Link was created.""" created: String! """URL to the Fragment Dashboard for this Link.""" dashboardUrl: String! """A list of External Accounts associated with this Link.""" externalAccounts: ExternalAccountsConnection! """FRAGMENT ID of the Increase Link.""" id: ID! """The environment of the Increase Link, either sandbox or production.""" increaseEnv: IncreaseEnv! """Name of the Link as it appears in the Dashboard.""" name: String! } """ A string representing integers up to 9,223,372,036,854,775,807 (i.e. 2^63-1) """ scalar Int64 """ A string representing integers as big as 2^120-1. The number is signed so the range is from -1,329,227,995,784,915,872,903,807,060,280,344,575 to 1,329,227,995,784,915,872,903,807,060,280,344,575. """ scalar Int96 """A condition that must be met on an `Int96` field.""" type Int96Condition { """ Amount must exactly match this value. You may not specify this alongside `gte` or `lte`. """ eq: Int96 """Amount must be greater than or equal to this value.""" gte: Int96 """Amount must be less than or equal to this value.""" lte: Int96 } """A condition that must be met on an `Int96` field.""" input Int96ConditionInput { """ Amount must exactly match this value. You may not specify this alongside `gte` or `lte`. """ eq: Int96 """Amount must be greater than or equal to this value.""" gte: Int96 """Amount must be less than or equal to this value.""" lte: Int96 } input Int96Filter { """Must exactly equal this Int96 value""" eq: Int96 """Must be greater than or equal to this Int96 value""" gte: Int96 """Must be less than or equal to this Int96 value""" lte: Int96 """Must not equal this Int96 value""" ne: Int96 } """Equivalent to an HTTP 5XX - something went wrong with our API.""" type InternalError implements Error { """The status code of error. For example, 'ledger_not_found'.""" code: String! """The error message""" message: String! """Whether or not the operation is retryable""" retryable: Boolean! } """ The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). """ scalar JSON """ The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). """ scalar JSONObject """ The last moment of a specific year, month or day or hour e.g. 1969 or 1969-12 or 1969-12-31 or 1969-12-31T23. All of the previous examples are equivalent to `1969-12-31T23:59:59.999`. """ scalar LastMoment """Ledgers are databases designed for managing money""" type Ledger { """ When aggregating balances, all transactions within a 24 hour period starting at midnight UTC plus this offset are included in each day. """ balanceUTCOffset: UTCOffset! created: DateTime! """URL to the Fragment Dashboard for this Ledger.""" dashboardUrl: String! """Entry statistics for this Ledger.""" entryStats( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of Ledger Entry Stats to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Entry Stats to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerEntryStatsConnection! id: ID! """ The IK passed into the [createLedger](/api-reference/api-mutations#createledger) mutation. This is treated as a unique identifier for this Ledger. """ ik: SafeString! """Ledger Account data migrations affecting this Ledger.""" ledgerAccountDataMigrations( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """Filter the list of Ledger Account data migrations returned.""" filter: LedgerAccountDataMigrationsFilterSet """ The number of Ledger Account Data Migrations to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Account Data Migrations to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerAccountDataMigrationConnection! """ Query LedgerAccounts in Ledger. Ledger Accounts are paginated and returned in reverse-chronological order by their created date. """ ledgerAccounts( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ Filter the Ledger Accounts returned. Learn more about [querying Ledger Accounts](https://fragment.dev/docs/query-data/ledger-accounts). """ filter: LedgerAccountsFilterSet """ The number of Ledger Accounts to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Accounts to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerAccountsConnection! """ Query Ledger Entries in a Ledger. Ledger Entries are paginated and sorted in reverse-chronological order by posted date. """ ledgerEntries( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ Filter the Ledger Entries returned. Learn more about [querying Ledger Entries](https://fragment.dev/docs/query-data#ledger-entries). """ filter: LedgerEntriesFilterSet """ The number of Ledger Entries to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Entries to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerEntriesConnection! """Ledger Entry data migrations affecting this Ledger.""" ledgerEntryDataMigrations( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """Filter the list of Ledger Entry data migrations returned.""" filter: LedgerEntryDataMigrationsFilterSet """ The number of Ledger Entry Data Migrations to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Entry Data Migrations to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerEntryDataMigrationConnection! """Query a Ledger Entry Group for this Ledger given its key and value.""" ledgerEntryGroup(ledgerEntryGroup: EntryGroupMatchInput!): LedgerEntryGroup! """ Query LedgerEntryGroups in Ledger. Ledger Entry Groups are paginated and returned in order lexigraphically key then inverse chronologically by created. """ ledgerEntryGroups( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """Filter the Ledger Entry Groups returned.""" filter: LedgerEntryGroupsFilterSet """ The number of Ledger Entry Groups to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Entry Groups to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerEntryGroupsConnection! """ List Ledger Lines across accounts in this Ledger, sorted by `posted` in reverse chronological order. Specify a single Ledger Account via the `ledgerAccount` field, or query across multiple accounts using the `path` filter or `ledgerAccount.in`. """ lines( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ Filter the Ledger Lines returned. Either the `ledgerAccount` or `path` field is required. Learn more about [querying Ledger Lines](https://fragment.dev/docs/query-data#ledger-lines). """ filter: LedgerLinesFilterSet! """ The number of Ledger Lines to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Lines to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerLinesConnection! """Schema migrations affecting this Ledger.""" migrations( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of Ledger Migrations to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Migrations to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerMigrationConnection! """ The name of the Ledger. Can be updated with the [updateLedger](/api-reference/api-mutations#updateledger) mutation. """ name: String! """Schema key associated with this Ledger.""" schema: Schema type: LedgerTypes! workspaceId: ID! @deprecated(reason: "Callers should not need to query or store this value.") } """A ledger account is a container for money""" type LedgerAccount { """ Total of all lines in this ledger account and child ledger accounts of the same currency as this ledger account """ balance( """ Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-03 or 1969-07-21T02 """ at: LastMoment """ - eventual: Returns an eventually consistent balance, even if the Ledger Account's `totalBalanceUpdates` in its `consistencyConfig` is `strong` (default). - strong: Returns a strongly consistent balance or an error if the Ledger Account's `totalBalanceUpdates` in its `consistencyConfig` is `eventual`. - use_account: Returns a strongly consistent balance if the Ledger Account's `totalBalanceUpdates` in its `consistencyConfig` is `strong` and an eventually consistent balance otherwise. """ consistencyMode: ReadBalanceConsistencyMode """ The currency of the balance to query. Required if the account is a multi-currency Ledger Account or if the the Ledger Account has child Ledger Accounts with different currencies. """ currency: CurrencyMatchInput ): Int96! """ How much did the this ledger account's balance change during the specified period. This query will include all child accounts in the same currency as this ledger account. """ balanceChange( """ The currency of the balance change to query. Required if the account is a multi-currency Ledger Account or if the the Ledger Account has child Ledger Accounts with different currencies. """ currency: CurrencyMatchInput """ Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ period: Period! ): Int96! """ How much did the this ledger account's balances change during the specified period. This query will include all child accounts of all currencies. """ balanceChanges( """ Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ period: Period! ): CurrencyAmountConnection! """ How much did the ledger account's balances change over a time period with a specified granularity. For example, if the period is 1969-07 and the granularity is daily, the query will return the balance changes for each day in the month. """ balanceChangesDuring( """ The currency of the balance changes to query. Required if the account is a multi-currency Ledger Account. """ currency: CurrencyMatchInput """ The duration of the period to query in units of the granularity. The duration can be positive or negative. Negative durations will return the balance changes for the period before the startTime. """ duration: Int! """ The granularity of the balance changes to query. For yearly or quarterly periods, the granularity should be "monthly", "daily", or "hourly". For monthly periods, the granularity should be "daily" or "hourly". For daily periods, the granularity should be "hourly". """ granularity: Granularity! """ Specifies the start time from which to calculate the balance differences for the given duration e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ startTime: FirstMoment! ): BalanceChangeDuringConnection! """ Total of all lines in this ledger account and child ledger accounts in all currencies """ balances( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ at: LastMoment """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ - eventual: Returns an eventually consistent balance, even if the Ledger Account's `totalBalanceUpdates` in its `consistencyConfig` is `strong` (default). - strong: Returns a strongly consistent balance or an error if the Ledger Account's `totalBalanceUpdates` in its `consistencyConfig` is `eventual`. - use_account: Returns a strongly consistent balance if the Ledger Account's `totalBalanceUpdates` in its `consistencyConfig` is `strong` and an eventually consistent balance otherwise. """ consistencyMode: ReadBalanceConsistencyMode """ The number of currency amounts to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of currency amounts to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): CurrencyAmountConnection! """ The ledger account's balances over a time period with a specified granularity. For example, if the period is 1969-07 and the granularity is daily, the query will return the balance for each day in the month. """ balancesDuring( """ The currency of the balance changes to query. Required if the account is a multi-currency Ledger Account. """ currency: CurrencyMatchInput """ The duration of the period to query in units of the granularity. The duration can be positive or negative. Negative durations will return the balance changes for the period before the startTime. """ duration: Int! """ The granularity of the balance changes to query. For yearly or quarterly periods, the granularity should be "monthly", "daily", or "hourly". For monthly periods, the granularity should be "daily" or "hourly". For daily periods, the granularity should be "hourly". """ granularity: Granularity! """ Specifies the start time from which to calculate the balance differences for the given duration e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ startTime: FirstMoment! ): HistoricalBalanceConnection! """ Total of all lines in child ledger accounts of the same currency as this ledger account """ childBalance( """ Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ at: LastMoment """ - eventual: Returns an eventually consistent balance, even if the Ledger Account's `totalBalanceUpdates` in its `consistencyConfig` is `strong` (default). - strong: Returns a strongly consistent balance or an error if the Ledger Account's `totalBalanceUpdates` in its `consistencyConfig` is `eventual`. - use_account: Returns a strongly consistent balance if the Ledger Account's `totalBalanceUpdates` in its `consistencyConfig` is `strong` and an eventually consistent balance otherwise. """ consistencyMode: ReadBalanceConsistencyMode """ The currency of the balance to query. Required if the Ledger Account has child Ledger Accounts with different currencies. """ currency: CurrencyMatchInput ): Int96! """ How much did the this ledger account's childBalance change during the specified period. This query will only include child accounts which are in the same currency as this one. See childBalanceChanges to include children of different currencies. """ childBalanceChange( """ The currency of the balance change to query. Required if the Ledger Account has child Ledger Accounts with different currencies. """ currency: CurrencyMatchInput """ Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02. """ period: Period! ): Int96! """ How much did the this ledger account's child accounts' balances change during the specified period. This query will include all child accounts of all currencies. """ childBalanceChanges( """ Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ period: Period! ): CurrencyAmountConnection! """ How much did the ledger account's childBalances change over a time period with a specified granularity. For example, if the period is 1969-07 and the granularity is daily, the query will return the balance changes for each day in the month. """ childBalanceChangesDuring( """ The currency of the balance changes to query. Required if the account is a multi-currency Ledger Account. """ currency: CurrencyMatchInput """ The duration of the period to query in units of the granularity. The duration can be positive or negative. Negative durations will return the balance changes for the period before the startTime. """ duration: Int! """ The granularity of the balance changes to query. For yearly or quarterly periods, the granularity should be "monthly", "daily", or "hourly". For monthly periods, the granularity should be "daily" or "hourly". For daily periods, the granularity should be "hourly". """ granularity: Granularity! """ Specifies the start time from which to calculate the balance differences for the given duration e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ startTime: FirstMoment! ): BalanceChangeDuringConnection! """ Total of all lines in child ledger accounts of this ledger in all currencies """ childBalances( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ at: LastMoment """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ - eventual: Returns an eventually consistent balance, even if the Ledger Account's `totalBalanceUpdates` in its `consistencyConfig` is `strong` (default). - strong: Returns a strongly consistent balance or an error if the Ledger Account's `totalBalanceUpdates` in its `consistencyConfig` is `eventual`. - use_account: Returns a strongly consistent balance if the Ledger Account's `totalBalanceUpdates` in its `consistencyConfig` is `strong` and an eventually consistent balance otherwise. """ consistencyMode: ReadBalanceConsistencyMode """ The number of currency amounts to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of currency amounts to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): CurrencyAmountConnection! """ The ledger account's childBalances over a time period with a specified granularity. For example, if the period is 1969-07 and the granularity is daily, the query will return the balance for each day in the month. """ childBalancesDuring( """ The currency of the balance changes to query. Required if the account is a multi-currency Ledger Account. """ currency: CurrencyMatchInput """ The duration of the period to query in units of the granularity. The duration can be positive or negative. Negative durations will return the balance changes for the period before the startTime. """ duration: Int! """ The granularity of the balance changes to query. For yearly or quarterly periods, the granularity should be "monthly", "daily", or "hourly". For monthly periods, the granularity should be "daily" or "hourly". For daily periods, the granularity should be "hourly". """ granularity: Granularity! """ Specifies the start time from which to calculate the balance differences for the given duration e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ startTime: FirstMoment! ): HistoricalBalanceConnection! """The child Ledger Accounts of this Ledger Accountw""" childLedgerAccounts( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of Child Ledger Accounts to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Child Ledger Accounts to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerAccountsConnection! """ The clearing status of the Ledger Account. This field is null when the Ledger Account is not configured to be a Clearing account. """ clearingStatus: LedgerAccountClearingStatus """ The consistency configuration for this Ledger Account. This defines how updates to this Ledger Account's ownBalance are handled. """ consistencyConfig: LedgerAccountConsistencyConfig! created: DateTime! """Currency of this ledger account""" currency: Currency """ Indicates if the account allows multiple currencies or is restricted to a single currency """ currencyMode: CurrencyMode! """URL to the Fragment Dashboard for this Ledger Account.""" dashboardUrl: String! id: ID! """The idempotency key used to create this account""" ik: String! """Ledger this account is in""" ledger: Ledger! """ All Ledger Entries that have posted to this Ledger Account. Ledger Entries are paginated and sorted in reverse-chronological order by posted date. """ ledgerEntries( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of Ledger Entries to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Entries to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerEntriesConnection! """ID of the ledger this account is in""" ledgerId: ID! """ List Ledger Lines in this account, sorted by `posted` in reverse chronological order. Does not include Ledger Lines from child Ledger Accounts. """ lines( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ Filter the Ledger Lines returned. Learn more about [querying Ledger Lines](https://fragment.dev/docs/query-data#ledger-lines). """ filter: LedgerLinesFilterSet """ The number of Ledger Lines to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Lines to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerLinesConnection! """ The Link for the External Account that is linked to this ledger account """ link: Link """External Account that is linked to this ledger account""" linkedAccount: ExternalAccount """The name of your Ledger Account""" name: String """ Total of all lines in this ledger account, excluding all child ledger accounts """ ownBalance( """ Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ at: LastMoment """ - eventual: Returns an eventually consistent balance, even if the Ledger Account's `ownBalanceUpdates` in its `consistencyConfig` is `strong` (default). - strong: Returns a strongly consistent balance or an error if the Ledger Account's `ownBalanceUpdates` in its `consistencyConfig` is `eventual`. - use_account: Returns a strongly consistent balance if the Ledger Account's `ownBalanceUpdates` in its `consistencyConfig` is `strong` and an eventually consistent balance otherwise. """ consistencyMode: ReadBalanceConsistencyMode """ The currency of the balance to query. Required if the account is a multi-currency Ledger Account. """ currency: CurrencyMatchInput ): Int96! """ How much did the this ledger account's ownBalance change during the specified period. This query will exclude all child accounts. """ ownBalanceChange( """ The currency of the balance change to query. Required if the account is a multi-currency Ledger Account. """ currency: CurrencyMatchInput """ Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ period: Period! ): Int96! """ How much did the this ledger account's ownBalance change during the specified period. This is the total of all lines in this ledger account, excluding all child ledger accounts """ ownBalanceChanges( """ Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ period: Period! ): CurrencyAmountConnection! """ How much did the ledger account's ownBalances change over a time period with a specified granularity. For example, if the period is 1969-07 and the granularity is daily, the query will return the balance changes for each day in the month. """ ownBalanceChangesDuring( """ The currency of the balance changes to query. Required if the account is a multi-currency Ledger Account. """ currency: CurrencyMatchInput """ The duration of the period to query in units of the granularity. The duration can be positive or negative. Negative durations will return the balance changes for the period before the startTime. """ duration: Int! """ The granularity of the balance changes to query. For yearly or quarterly periods, the granularity should be "monthly", "daily", or "hourly". For monthly periods, the granularity should be "daily" or "hourly". For daily periods, the granularity should be "hourly". """ granularity: Granularity! """ Specifies the start time from which to calculate the balance differences for the given duration e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ startTime: FirstMoment! ): BalanceChangeDuringConnection! """ Total of all lines across all currencies in this ledger account, excluding all child ledger accounts """ ownBalances( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ at: LastMoment """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ - eventual: Returns an eventually consistent balance, even if the Ledger Account's `ownBalanceUpdates` in its `consistencyConfig` is `strong` (default). - strong: Returns a strongly consistent balance or an error if the Ledger Account's `ownBalanceUpdates` in its `consistencyConfig` is `eventual`. - use_account: Returns a strongly consistent balance if the Ledger Account's `ownBalanceUpdates` in its `consistencyConfig` is `strong` and an eventually consistent balance otherwise. """ consistencyMode: ReadBalanceConsistencyMode """ The number of currency amounts to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of currency amounts to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): CurrencyAmountConnection! """ The ledger account's ownBalances over a time period with a specified granularity. For example, if the period is 1969-07 and the granularity is daily, the query will return the balance for each day in the month. """ ownBalancesDuring( """ The currency of the balance changes to query. Required if the account is a multi-currency Ledger Account. """ currency: CurrencyMatchInput """ The duration of the period to query in units of the granularity. The duration can be positive or negative. Negative durations will return the balance changes for the period before the startTime. """ duration: Int! """ The granularity of the balance changes to query. For yearly or quarterly periods, the granularity should be "monthly", "daily", or "hourly". For monthly periods, the granularity should be "daily" or "hourly". For daily periods, the granularity should be "hourly". """ granularity: Granularity! """ Specifies the start time from which to calculate the balance differences for the given duration e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 """ startTime: FirstMoment! ): HistoricalBalanceConnection! """The parent ledger account of this ledger account""" parentLedgerAccount: LedgerAccount """ID of the parent ledger account of this ledger account""" parentLedgerAccountId: ID """ The unique Path of the ledger account. This is a slash-delimited string containing the location of an account in its chart of accounts. For accounts created with a schema, this will be composed of account keys. Else, for accounts created with the createLedgerAccounts API, this will be composed of the IKs of an account and its ancestors. """ path: String! """ The posted timestamp window for this clearing account, representing the earliest and latest posted timestamps across all currencies. This field is null when the Ledger Account is not configured to be a Clearing account or when no entries have been posted to this account. """ postedWindow: PostedWindow type: LedgerAccountTypes! """ A list of external account transactions that haven't been reconciled to this ledger account yet. Only populated for linked ledger accounts. Transactions are sorted in reverse chronological order by posted date. """ unreconciledTxs( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of unreconciled transactions to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of unreconciled transactions to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): TxsConnection! workspaceId: ID! @deprecated(reason: "Callers should not need to query or store this value.") } """The clearing status of a Ledger Account.""" enum LedgerAccountClearingStatus { """The account has no outstanding balances.""" cleared """The account has outstanding balances that have not been cleared.""" pending } input LedgerAccountClearingStatusFilter { """Results must match the specified clearing account status""" equalTo: LedgerAccountClearingStatus } """ A set of conditions that a Ledger Account must meet for an operation to succeed. """ type LedgerAccountCondition { """ A condition that the `ownBalance` field must satisfy. Note that this condition always applies to the latest balance, not to balances at a specific date or time. See [Read balances](https://fragment.dev/docs/read-balances) for more on the different types of Ledger Account balances. """ ownBalance: Int96Condition """ A condition that the `totalBalance` field must satisfy. Note that this condition always applies to the latest balance, not to balances at a specific date or time. See [Read balances](https://fragment.dev/docs/read-balances) for more on the different types of Ledger Account balances. """ totalBalance: Int96Condition } """ A set of conditions that a Ledger Account must meet for an operation to succeed. """ input LedgerAccountConditionInput { """ A condition that the ownBalance field must satisfy. Note that this condition always applies to the latest balance, not to balances at a specific date or time. See [Read balances](https://fragment.dev/read-balances) for more on the different types of Ledger Account balances. """ ownBalance: Int96ConditionInput """ A condition that the totalBalance field must satisfy. Note that this condition always applies to the latest balance, not to balances at a specific date or time. See [Read balances](https://fragment.dev/read-balances) for more on the different types of Ledger Account balances. """ totalBalance: Int96ConditionInput } """ The consistency configuration of a Ledger Account's balance updates. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ type LedgerAccountConsistencyConfig { lines: LedgerLinesConsistencyMode! """ If set to `strong`, then a Ledger Account's `ownBalance` updates will be strongly consistent with the API response. This Ledger Account's balance will be updated and available for strongly consistent reads once you receive an API response. Otherwise if not set or set to `eventual`, `ownBalance` updates are applied asynchronously and may not be immediately reflected in queries. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ ownBalanceUpdates: BalanceUpdateConsistencyMode! """ If set to `strong`, then a Ledger Account's `ownBalance`, `childBalance`, and `balance` fields' updates will be strongly consistent with the API response. This Ledger Account's balance will be updated and available for strongly consistent reads once you receive an API response. Otherwise if not set or set to `eventual`, updates are applied asynchronously and may not be immediately reflected in queries. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ totalBalanceUpdates: BalanceUpdateConsistencyMode } """ The payload configuring the consistency for this Ledger Account. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ input LedgerAccountConsistencyConfigInput { """ The consistency configuration for Ledger Entry Groups affecting this account. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ groups: [LedgerAccountGroupConsistencyConfigInput!] """ If set to `strong`, then a Ledger Account's `lines` updates will be strongly consistent with the API response. This Ledger Account's balance will be updated and available for strongly consistent reads before you receive an API response. Otherwise if unset or set to `eventual`, `lines` updates are applied asynchronously and may not be immediately reflected in queries. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ lines: LedgerLinesConsistencyMode """ If set to `strong`, then a Ledger Account's `ownBalance` updates will be strongly consistent with the API response. This Ledger Account's balance will be updated and available for strongly consistent reads before you receive an API response. Otherwise if unset or set to `eventual`, `ownBalance` updates are applied asynchronously and may not be immediately reflected in queries. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ ownBalanceUpdates: BalanceUpdateConsistencyMode """ EXPERIMENTAL: If set to `strong`, then a Ledger Account's `totalBalance` updates will be strongly consistent with the API response. This Ledger Account's balance will be updated and available for strongly consistent reads before you receive an API response. Otherwise if unset or set to `eventual`, `totalBalance` updates are applied asynchronously and may not be immediately reflected in queries. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ totalBalanceUpdates: BalanceUpdateConsistencyMode } """Represents a data migration for a specific Ledger Account in a Ledger.""" type LedgerAccountDataMigration implements LedgerDataMigration { """The path of the Ledger Account being migrated.""" accountPath: String! """Current active migration info (null if migration is inactive).""" currentMigration: LedgerDataMigrationHistoryEntry """The historical transitions of this migration.""" history( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of Migration History to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Migration History to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerDataMigrationHistoryConnection! """The ledger entries to be migrated.""" ledgerEntries( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of Ledger Entries to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Entries to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerEntriesConnection! """The status of the data migration.""" status: LedgerDataMigrationStatus! } type LedgerAccountDataMigrationConnection { """The current page of results""" nodes: [LedgerAccountDataMigration!]! """Pagination info for this list.""" pageInfo: PageInfo! } input LedgerAccountDataMigrationsFilterSet { """Filter by Ledger Account path.""" accountPath: StringFilter """Filter by the status of the data migration.""" status: LedgerDataMigrationStatus } input LedgerAccountFilter { """Result must match the specified Ledger Account""" equalTo: LedgerAccountMatchInput """Results can match any of specified Ledger Accounts""" in: [LedgerAccountMatchInput!] } """ The consistency configuration for a specific Ledger Entry Group in this account. """ input LedgerAccountGroupConsistencyConfigInput { """The group key for this configuration.""" key: SafeString! """ If set to `strong`, then Ledger Entry Group `ownBalance`s updates for this account will be strongly consistent with the API response. This Ledger Account's Ledger Entry Group balances will be updated and available for strongly consistent reads before you receive an API response. Otherwise if unset or set to `eventual`, Ledger Entry Group `ownBalance` updates are applied asynchronously and may not be immediately reflected in queries. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ ownBalanceUpdates: BalanceUpdateConsistencyMode! } """ Specify a Ledger Account by using `id` or `path`. When specifying a Ledger Account by `path`, you must provide `ledger`. """ input LedgerAccountMatchInput { """The FRAGMENT ID of the Ledger Account""" id: ID """ The Ledger to which this Ledger Account belongs. This is required if you are specifying the Ledger Account by `path`. """ ledger: LedgerMatchInput """ The unique path of the Ledger Account. This is a slash-delimited string containing the keys of an account and all its direct ancestors. """ path: String } input LedgerAccountTypeFilter { """Results must be of the specified Ledger Account type""" equalTo: LedgerAccountTypes """Results can have any of the specified Ledger Account types""" in: [LedgerAccountTypes!] } enum LedgerAccountTypes { asset expense income liability } """A paginated list of Ledger Accounts""" type LedgerAccountsConnection { """The current page of results""" nodes: [LedgerAccount!]! """ The [pagination info](https://fragment.dev/api-reference/api-types#connection-types-pageinfo) for this list """ pageInfo: PageInfo! } input LedgerAccountsFilterSet { """Use this to filter Ledger Accounts by their clearing account status""" clearingStatus: LedgerAccountClearingStatusFilter """ Filter by the earliest posted timestamp across all currencies for clearing accounts. You must also provide clearingStatus in the same filter. Only clearing accounts where the minimum posted timestamp (across all currencies) matches this filter will be included. """ earliestPosted: DateTimeFilter """Use this to filter Ledger Accounts by their parent status""" hasParentLedgerAccount: Boolean """Use this to filter Ledger Accounts by their linked status""" isLinkedAccount: Boolean """ Filter by the latest posted timestamp across all currencies for clearing accounts. You must also provide clearingStatus in the same filter. Only clearing accounts where the maximum posted timestamp (across all currencies) matches this filter will be included. """ latestPosted: DateTimeFilter """Use this to filter Ledger Accounts by their ID or path""" ledgerAccount: LedgerAccountFilter """Use this to filter Ledger Accounts by their external linked account ID""" linkedAccount: ExternalAccountFilter """Use this to filter Ledger Accounts by their parent account IDs""" parentLedgerAccount: LedgerAccountFilter """ A filter that must match the account path. Wildcards ('*') may be used only for template variables, and will only match a single variable each. For example: 'assets-root/accounts-receivable/merchant:*' would match: 'assets-root/accounts-receivable/merchant:1' and 'assets-root/accounts-receivable/merchant:1/child'. Wildcards may not be used outside of template variables. For example, passing in 'assets-root/*' as a filter is invalid and would raise a GraphQL error. """ path: StringMatchFilter """Use this to filter Ledger Accounts by their type""" type: LedgerAccountTypeFilter } """Represents a data migration for a Ledger.""" interface LedgerDataMigration { """Current active migration info (null if migration is inactive).""" currentMigration: LedgerDataMigrationHistoryEntry """The historical transitions of this migration.""" history( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of Migration History to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Migration History to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerDataMigrationHistoryConnection! """The ledger entries to be migrated.""" ledgerEntries( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of Ledger Entries to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Entries to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerEntriesConnection! """The status of the data migration.""" status: LedgerDataMigrationStatus! } """A paginated list of migration history entries.""" type LedgerDataMigrationHistoryConnection { """The current page of results""" nodes: [LedgerDataMigrationHistoryEntry!]! """Pagination info for this list.""" pageInfo: PageInfo! } """A single schema version in the migration history.""" type LedgerDataMigrationHistoryEntry { """The schema version.""" schemaVersion: Int! """ The current status of this schema version (active if it's the latest and migration is active, otherwise inactive). """ status: LedgerDataMigrationStatus! } """The status of a ledger data migration.""" enum LedgerDataMigrationStatus { """The migration is active.""" active """The migration is inactive.""" inactive } """A paginated list of Ledger Entries""" type LedgerEntriesConnection { """The current page of results""" nodes: [LedgerEntry!]! """ The [pagination info](https://fragment.dev/api-reference/api-types#connection-types-pageinfo) for this list """ pageInfo: PageInfo! } input LedgerEntriesFilterSet { """Use this filter to filter Ledger Entries by their `posted` date.""" date: DateFilter """ Use this to filter Ledger Entries by groups. The response will include entries that contain or do not contain specific groups. """ group: GroupFilter """ Use this to filter Ledger Entries that were posted using `reverseLedgerEntry`. """ isReversal: Boolean """Use this to filter Ledger Entries that have been reversed.""" isReversed: Boolean """Use to filter Ledger Entries by their IDs or IKs.""" ledgerEntry: LedgerEntryFilter """Use this filter to filter Ledger Entries by their `posted` timestamp.""" posted: DateTimeFilter """Use this filter to show hidden Ledger Entries.""" showHidden: Boolean """ Use this to filter Ledger Entries by tags. The response will include entries that contain tags matching the filter. """ tag: TagFilter """ Use this to filter Ledger Entries by type. Ledger Entry types are defined in Schemas. """ type: StringFilter """Use this to filter Ledger Entries by their type version.""" typeVersion: StringFilter } type LedgerEntry { """ The conditions that were satisfied by this Ledger Entry when it was posted. """ conditions: [LedgerEntryCondition!]! """ISO-8601 timestamp this LedgerEntry was created in Fragment.""" created: DateTime! """URL to the Fragment Dashboard for this Ledger Entry.""" dashboardUrl: String! """Date this LedgerEntry posted to its Ledger e.g. "2021-01-01".""" date: Date! """Description posted for this Ledger Entry.""" description: String """The Ledger Entry Groups this Ledger Entry is in.""" groups: [LedgerEntryGroup!]! """ Indicates whether this Ledger Entry is hidden when listing Ledger Entries. Reversed and Reversal Ledger Entries are hidden by default because taken together they have no impact on a Ledger's balances. """ hidden: Boolean! """The ID of this LedgerEntry.""" id: ID! """The idempotency key used to post this ledger entry""" ik: String! """ Indicates whether this Ledger Entry is a reversal of another Ledger Entry. If so, reverses will point to that Ledger Entry. """ isReversal: Boolean! """ Indicates whether this Ledger Entry has been reversed by another Ledger Entry. If so, reversedBy will point to that Ledger Entry. """ isReversed: Boolean! """The Ledger that this Ledger Entry is posted to.""" ledger: Ledger! """The ID of the Ledger this Ledger Entry is posted to.""" ledgerId: ID! """Lines posted in this Ledger Entry.""" lines: LedgerLinesConnection! """The parameters used to post this Ledger Entry.""" parameters: Parameters """ISO-8601 timestamp this LedgerEntry posted to its Ledger.""" posted: DateTime! """ The reversal history of this Ledger Entry. Each entry in this connection shares the same IK. """ reversalHistory: LedgerEntriesConnection! """ The position of this Ledger Entry in its reversalHistory. This is a one-indexed value, so the initial entry will have reversalPosition 1. """ reversalPosition: Int! """ISO-8601 timestamp of when this Ledger Entry was reversed.""" reversedAt: DateTime """The Ledger Entry that reversed this Ledger Entry.""" reversedBy: LedgerEntry """The Ledger Entry that was reversed by this Ledger Entry.""" reverses: LedgerEntry """The set of tags attached to this Ledger Entry.""" tags: [LedgerEntryTag!]! """The type of the Ledger Entry.""" type: SafeString """The version of the Ledger Entry type used when it was posted.""" typeVersion: Int workspaceId: ID! @deprecated(reason: "Callers should not need to query or store this value.") } """ A set of pre-conditions and post-conditions that a Ledger Account must have satisfied. Each `LedgerEntryCondition` has at least one of `precondition` or `postcondition`. """ type LedgerEntryCondition { """The Ledger Account that must satisfied the provided conditions.""" account: LedgerAccount! """ The currency of the balance associated with this `LedgerEntryCondition`. """ currency: Currency! """The conditions that must be satisfied after the operation.""" postcondition: LedgerAccountCondition """The conditions that must be satisfied prior to the operation.""" precondition: LedgerAccountCondition } """ A set of pre-conditions and post-conditions that a Ledger Account balance must meet for an operation to succeed. You must specify at least one of `precondition` or `postcondition` for each condition. """ input LedgerEntryConditionInput { """The Ledger Account that must satisfy the provided conditions.""" account: LedgerAccountMatchInput! """ For Ledger Accounts in the `multi` currency mode, you must specify the currency of the balance affected by the condition. You only need to specify this field for multi-currency accounts. """ currency: CurrencyMatchInput """The conditions that must hold after the operation.""" postcondition: LedgerAccountConditionInput """The conditions that must hold prior to the operation.""" precondition: LedgerAccountConditionInput } """Represents a data migration for a specific entry type in a Ledger.""" type LedgerEntryDataMigration implements LedgerDataMigration { """Current active migration info (null if migration is inactive).""" currentMigration: LedgerDataMigrationHistoryEntry """The entry type being migrated.""" entryType: SafeString! """The historical transitions of this migration.""" history( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of Migration History to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Migration History to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerDataMigrationHistoryConnection! """The ledger entries to be migrated.""" ledgerEntries( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of Ledger Entries to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Entries to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerEntriesConnection! """The status of the data migration.""" status: LedgerDataMigrationStatus! """The version of the entry type being migrated.""" typeVersion: Int! } type LedgerEntryDataMigrationConnection { """The current page of results""" nodes: [LedgerEntryDataMigration!]! """Pagination info for this list.""" pageInfo: PageInfo! } input LedgerEntryDataMigrationsFilterSet { """Filter by Ledger Entry type.""" entryType: StringFilter """Filter by the status of the data migration.""" status: LedgerDataMigrationStatus """Filter by Ledger Entry type version.""" typeVersion: StringFilter } input LedgerEntryFilter { """Result must be the specified Ledger Entry.""" equalTo: LedgerEntryMatchInput """ Result can be any of the specified Ledger Entries. Limited to 100 items maximum. """ in: [LedgerEntryMatchInput!] } """A group of Ledger Entries""" type LedgerEntryGroup { balances( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String filter: LedgerEntryGroupBalanceFilterSet """ The number of group balances to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of group balances to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerEntryGroupBalanceConnection! """ISO-8601 timestamp this LedgerEntryGroup was created in Fragment.""" created: DateTime """URL to the Fragment Dashboard for this Ledger Entry Group.""" dashboardUrl: String! """The key of this Ledger Entry Group.""" key: SafeString! """The Ledger that this Ledger Entry Group is within.""" ledger: Ledger! ledgerEntries( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String filter: LedgerEntriesFilterSet """ The number of Ledger Entries to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledger Entries to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgerEntriesConnection! """The ID of the Ledger this Ledger Entry Group is within.""" ledgerId: ID! """The value associated with Ledger Entry Group.""" value: SafeString! } """ Represents the total effect of a Ledger Entry Group on a Ledger Account balance for a single currency. """ type LedgerEntryGroupBalance { """The Ledger Account whose balance is affected.""" account: LedgerAccount! """The currency of the affected balance.""" currency: Currency! """The total balance change for this Ledger Account and currency.""" ownBalance( """ The consistency mode to use when fetching the balance. Use 'use_account' to match the configured consistency mode of the account. """ consistencyMode: ReadBalanceConsistencyMode ): Int96! } """A set of balance changes for a specific Ledger Entry Group.""" type LedgerEntryGroupBalanceConnection { nodes: [LedgerEntryGroupBalance!]! pageInfo: PageInfo! } """ Filter Ledger Entry Groups by their balance impact on a Ledger Account. If a group has a matching balance for the specified account, the group will be included in the results. """ input LedgerEntryGroupBalanceFilter { """ A Ledger Entry Group will be included in the result if it has a balance for the specified account. If 'account' is the only filter specified, then any non-null balance in any currency will match. """ account: GroupBalanceAccountFilter! """ A Ledger Entry Group will be included in the result if it has a balance for the specified account in the specified currency. If the 'ownBalance' filter is omitted then any non-null balance will match. """ currency: CurrencyFilter """ A Ledger Entry Group will be included in the result if it has a balance for the specified account that passes the specified value predicate. If the 'currency' filter is omitted then any balance in any currency that passes the predicate will match. If the 'currency' filter is included, the value predicate will only be evaluated against the specified currency. """ ownBalance: Int96Filter } """Optional filters for querying balances on a Ledger Entry Group.""" input LedgerEntryGroupBalanceFilterSet { """Filter to a subset of accounts""" account: GroupBalanceAccountFilter """Filter to one or more currencies""" currency: CurrencyFilter """Filter to only balances in a certain range""" ownBalance: Int96Filter } input LedgerEntryGroupInput { """The key of this group. Can be up to 128 characters long.""" key: SafeString! """ The value associated with this group's key. Can be up to 128 characters long. """ value: SafeString! } input LedgerEntryGroupMatchInput { key: SafeString! ledger: LedgerMatchInput! value: SafeString! } """A paginated list of Ledger Entry Groups""" type LedgerEntryGroupsConnection { """The current page of results""" nodes: [LedgerEntryGroup!]! """Pagination info for this list.""" pageInfo: PageInfo! } input LedgerEntryGroupsFilterSet { """ Filter Ledger Entry Groups by their balance impact on a Ledger Account. If a group has a matching balance for the specified account, the group will be included in the results. """ balance: LedgerEntryGroupBalanceFilter """Use to filter Ledger Entry Groups by their created timestamp""" created: DateTimeFilter """Use to filter Ledger Entry Groups by their key""" key: StringFilter """Use to filter Ledger Entry Groups by their value""" value: StringFilter } """Ledger Entries are limited to 30 Ledger Lines.""" input LedgerEntryInput { """ Conditions that must be satisfied to post this Ledger Entry. The Ledger Entry will reject with a BadRequestError if any condition is not met. You can only add a condition on a Ledger Account containing a Line in this Ledger Entry. """ conditions: [LedgerEntryConditionInput!] """ If specified, will also be used as the description for LedgerLines unless they specify their own description. """ description: String """Adds this Ledger Entry to this set of Ledger Entry Groups""" groups: [LedgerEntryGroupInput!] """ The Ledger to which to post this Ledger Entry. Must be linked to a Schema that defines the provided Ledger Entry type. """ ledger: LedgerMatchInput """ The Ledger Lines to create as part of this Ledger Entry. This cannot be used with Ledger Entries that have a 'type' i.e. Ledger Entries defined in the Schema. This can be useful during non-routine operations such as an incident. It is not recommended to use 'lines' during routine operations. """ lines: [LedgerLineInput!] """ Parameters to be included in a templated Ledger Entry. All provided parameters must be present in the typed Ledger Entry within the Schema linked to the provided Ledger. """ parameters: JSON """ ISO 8601 timestamp to post this Ledger Entry e.g. "2021-01-01" or "2021-01-01T16:45:00Z". Will error out if supplied to reconcileTx or createOrder since the transaction timestamp will be used instead """ posted: DateTime """A set of tags attached to this Ledger Entry.""" tags: [LedgerEntryTagInput!] """ The type of the Ledger Entry. Must be defined in the Schema linked to the Ledger specified below. """ type: String """ Experimental: This field is reserved for an upcoming feature and is not yet supported. """ typeVersion: Int } """Specify a Ledger Entry by using `id`.""" input LedgerEntryMatchInput { """The FRAGMENT ID of the Ledger Entry""" id: ID """ The IK provided to the `addLedgerEntry` mutation or the `ik` field returned from a `reconcileTx` mutation. This is required if you have not provided `id`. """ ik: SafeString """ The FRAGMENT ID of the Ledger to which this Ledger Entry belongs. This is required if you have not provided `id`. """ ledger: LedgerMatchInput } """ Posting count statistics for a specific type and typeVersion of entry in a Ledger. """ type LedgerEntryStats { """The total number of entries of this type.""" count: Int96! """The ledger ID these stats are for.""" ledgerId: SafeString! """The net number of entries (count - reversalsCount).""" netCount: Int96! """The number of entries that are reversals.""" reversalsCount: Int96! """The schema key associated with these stats.""" schemaKey: SafeString! """The type of entry these stats are for.""" type: SafeString! """The version of the entry type these stats are for.""" typeVersion: Int! } """A paginated list of Ledger Entry Stats""" type LedgerEntryStatsConnection { """The current page of results""" nodes: [LedgerEntryStats!]! """Pagination info for this list.""" pageInfo: PageInfo! } """A tag attached to a Ledger Entry.""" type LedgerEntryTag { """The key of this tag.""" key: SafeString! """The value associated with this tag's key.""" value: SafeString! } input LedgerEntryTagInput { """The key of this tag. Can be up to 128 characters long.""" key: SafeString! """ The value associated with this tag's key. Can be up to 128 characters long. """ value: SafeString! } type LedgerLine { """LedgerAccount that contains this line""" account: LedgerAccount! accountId: ID! """ How much this line's LedgerAccount's balance changed in integer cents (i.e. in USD 100 is 1 dollar, 100 cents) """ amount( """ If the absolute flag is passed, amount will always a positive integer in cents. Refer to type to see if this LedgerLine increased or decreased it's LedgerAccount's balance """ absolute: Boolean ): Int96! """ISO-8601 timestamp this LedgerLine was created in Fragment""" created: DateTime """Currency of this LedgerLine""" currency: Currency """ Date this LedgerLine posted to its LedgerAccount e.g. "2021-01-01" """ date: Date """Description of this LedgerLine""" description: String """ ID in the external system of the payment or transfer that created the transaction linked to this LedgerLine """ externalTransferId: String """ Whether the transaction linked to this LedgerLine was a payment or transfer """ externalTransferType: ExternalTransferType """ID in the external system of the transaction linked to this LedgerLine""" externalTxId: String """ Indicates whether this Ledger Line is hidden when listing Ledger Lines. Reversed and Reversal Ledger Lines are hidden by default because taken together they have no impact on a Ledger Account's balance """ hidden: Boolean! id: ID! """ Indicates whether this Ledger Line is a reversal of another Ledger Line. If so, reverses will point to that Ledger Line. """ isReversal: Boolean! """ Indicates whether this Ledger Line has been reversed by another Ledger Line. If so, reversedBy will point to that Ledger Line. """ isReversed: Boolean! key: String ledger: Ledger! """LedgerEntry that contains this line""" ledgerEntry: LedgerEntry! """ID of the LedgerEntry that contains this line""" ledgerEntryId: ID! """Ledger that contains this line""" ledgerId: ID! """ ID in the external system of destination or source bank account for an internal bank transfer. Only for internal bank transfers - see otherTxId """ otherTxExternalAccountExternalId: String """ FRAGMENT ID of destination or source bank account. Only for internal bank transfers - see otherTxId """ otherTxExternalAccountId: String """ ID in the external system of transaction in the destination or source bank account. Only for internal bank transfers - see otherTxId """ otherTxExternalId: String """ FRAGMENT ID of the transaction in the destination account (if sending money from this account) or source account (if pulling money into this account). Only applicable if this line is linked to a transaction created through an internal transfer """ otherTxId: String """ISO-8601 timestamp this LedgerLine posted to its LedgerAccount""" posted: DateTime """ISO-8601 timestamp of when this Ledger Line was reversed.""" reversedAt: DateTime """The Ledger Line that reverses the balance changes of this Ledger Line.""" reversedBy: LedgerLine """ The Ledger Line whose balance changes are reversed by this Ledger Line. """ reverses: LedgerLine """Tags attached to this Ledger Line.""" tags: [LedgerLineTag!]! """The transaction linked to this LedgerLine""" tx: Tx """Fragment ID of the transaction linked to this LedgerLine""" txId: String """credit or debit""" type: TxType! workspaceId: ID! @deprecated(reason: "Callers should not need to query or store this value.") } input LedgerLineInput { """The LedgerAccount this line is being added to""" account: LedgerAccountMatchInput! """ A positive amount increases the balance of its LedgerAccount, a negative amount reduces the balance of its LedgerAccount """ amount: Int96 """The currency the ledger line is in""" currency: CurrencyMatchInput """ If not specified the description from the parent LedgerEntryInput will be used """ description: String """ Optional identifier for Ledger Line. You can filter lines by key using [LedgerLinesFilterSet](https://fragment.dev/api-reference/api-types#filter-types-ledgerlinesfilterset). """ key: String """A set of tags attached to this Ledger Line.""" tags: [LedgerEntryTagInput!] """ Required for reconcileTx to specify the transaction being reconciled, you can specify either the FRAGMENT ID or external ID of the transaction """ tx: TxMatchInput } """Specify a Ledger Line by using `id`.""" input LedgerLineMatchInput { """The FRAGMENT ID of the ledger line""" id: ID! } """A tag attached to a Ledger Line.""" type LedgerLineTag { """The key of this tag.""" key: SafeString! """The value associated with this tag's key.""" value: SafeString! } """A paginated list of Ledger Lines""" type LedgerLinesConnection { """The current page of results""" nodes: [LedgerLine!]! """ The [pagination info](https://fragment.dev/api-reference/api-types#connection-types-pageinfo) for this list """ pageInfo: PageInfo! } enum LedgerLinesConsistencyMode { eventual strong } input LedgerLinesFilterSet { """ Filter by the created timestamp of the Ledger Line. This is the wall-clock time when the Ledger Line was created. """ created: DateTimeFilter """Filter by the currency of the Ledger Line.""" currency: CurrencyFilter """Use this filter to filter Ledger Lines by their `posted` date.""" date: DateFilter """ Use this to filter Ledger Lines that were posted to this Ledger Account, using `reverseLedgerEntry`. """ isReversal: Boolean """Use this to filter Ledger Lines that have been reversed.""" isReversed: Boolean """ Use this to filter Ledger Lines by key. Ledger Line keys are defined in Schemas. """ key: StringFilter """ Specify which Ledger Account to read lines from. Required when querying lines via `Ledger.lines` without a `path` filter. Not allowed when querying via `LedgerAccount.lines`. """ ledgerAccount: LedgerAccountFilter """ A filter that string matches the account path. Wildcards ('*') can be used to return lines across multiple accounts. To search for all instances of a a Ledger Account template, use the `matches` filter with an wildcard character in place of the template value e.g. `assets/user:*`. This returns lines from all instances of this template, interleaved by `posted` timestamp. To search for all descendant Ledger Accounts under a given path, use a trailing `/*` in the `matches` filter e.g. `assets/user:user-1>/*`. This returns lines from all descendants at any depth, but not lines from the parent account at `assets/user:user-1>`. To OR multiple `matches` patterns and get a single paginated list, use `matchesAny` — e.g. `matchesAny: ["assets/user:user-1/*", "assets/user:user-2/*"]` returns descendants of both prefixes interleaved by `posted` timestamp. Cannot be combined with `ledgerAccount` filter. Not allowed when querying via `LedgerAccount.lines`. You cannot use wildcards for both descendant and template instance matching in the same query. """ path: StringMatchFilter """Use this filter to filter Ledger Lines by their `posted` timestamp.""" posted: DateTimeFilter """Use this filter to find hidden Ledger Lines.""" showHidden: Boolean """ Filter Ledger Lines by tag. Only matches lines that have the specified tags attached directly to them. """ tag: TagFilter type: TxTypeFilter } """Specify a Ledger by using `id` or `ik`.""" input LedgerMatchInput { """The FRAGMENT ID of the Ledger""" id: ID """ The IK passed into the [createLedger](/api-reference/api-mutations#createledger) mutation. This is treated as a second unique identifier for this Ledger. """ ik: SafeString } """ Represents a Schema being applied to a Ledger. It contains metadata about the Ledger, the Schema, and the status of the migration. """ type LedgerMigration { """The Ledger that the migration is run on.""" ledger: Ledger! schemaVersion: SchemaVersion! """The status of the Ledger Migration.""" status: LedgerMigrationStatus! } """A paginated list of Ledger Migrations""" type LedgerMigrationConnection { """The current page of results""" nodes: [LedgerMigration!]! """Pagination info for this list.""" pageInfo: PageInfo! } """The status of a ledger migration.""" enum LedgerMigrationStatus { """ The Ledger Migration has been successfully completed. This is a terminal state. """ completed """ The Ledger Migration has failed. This can happen either due to an invalid schema or an internal error. This is a terminal state. """ failed """The Ledger Migration has been queued.""" queued """ The Ledger Migration has been skipped because a newer version is available. This is a terminal state. """ skipped """The Ledger Migration has been started.""" started } input LedgerTypeFilter { equalTo: LedgerTypes """Must match one of the values provided. Limited to 100 items maximum.""" in: [LedgerTypes!] } enum LedgerTypes { double } """A paginated list of Ledgers""" type LedgersConnection { """The current page of results""" nodes: [Ledger!]! """ The [pagination info](https://fragment.dev/api-reference/api-types#connection-types-pageinfo) for this list """ pageInfo: PageInfo! } input LedgersFilterSet { hasSchema: Boolean type: LedgerTypeFilter } interface Link { """ISO-8601 timestamp when the Link was created.""" created: String! """URL to the Fragment Dashboard for this Link.""" dashboardUrl: String! """A list of External Accounts associated with this Link.""" externalAccounts: ExternalAccountsConnection! """FRAGMENT ID of the Link.""" id: ID! """Name of the Link as it appears in the Dashboard.""" name: String! } input LinkMatchInput { id: ID! } """The type of Link an external account belongs to.""" enum LinkType { """A Custom Link""" CustomLink """An Increase Link""" IncreaseLink """A Stripe Link""" StripeLink """A Unit Link""" UnitLink } """A paginated list of Links""" type LinksConnection { """The current page of results""" nodes: [Link!]! """ The [pagination info](https://fragment.dev/api-reference/api-types#connection-types-pageinfo) for this list """ pageInfo: PageInfo! } """An object defining the input for migrating a Ledger Entry.""" input MigrateLedgerEntryInput { """The Ledger Entry to migrate""" id: ID! """The Ledger Entry you want to migrate it to""" newLedgerEntry: LedgerEntryInput! } union MigrateLedgerEntryResponse = BadRequestError | InternalError | MigrateLedgerEntryResult type MigrateLedgerEntryResult { """Whether this migration was an IK replay or not""" isIkReplay: Boolean! """The new Ledger Entry posted as a result of the migration""" newLedgerEntry: LedgerEntry! """The Ledger Entry that was migrated""" reversedLedgerEntry: LedgerEntry! """ The reversal Ledger Entry that was posted to reverse the Ledger Entry being migrated """ reversingLedgerEntry: LedgerEntry! } """ View the API guide [here](https://fragment.dev/api-reference/api-mutations) """ type Mutation { _empty: String """ Adds a Ledger Entry to a Ledger. This Ledger Entry cannot be into a Linked Ledger Account. For that, use [reconcileTx](https://fragment.dev/api-reference/api-mutations#reconciletx) """ addLedgerEntry( """ An object containing the [Ledger Lines](https://fragment.dev/api-reference/api-types#input-types-ledgerlineinput) as well as an optional description and posted timestamp. """ entry: LedgerEntryInput! """ The [Idempotency Key](https://fragment.dev/api-reference/api-overview#idempotency) """ ik: SafeString! ): AddLedgerEntryResponse! """Creates a custom currency. """ createCustomCurrency( """The custom currency to be created.""" customCurrency: CreateCustomCurrencyInput! ): CreateCustomCurrencyResponse! """ Custom Links let you integrate external systems that don't have native support. See [Custom Links](https://fragment.dev/docs/sync-payments#custom-link) """ createCustomLink( """ The [Idempotency Key](https://fragment.dev/api-reference/api-overview#idempotency) """ ik: SafeString! """The name of your custom link""" name: String! ): CreateCustomLinkResponse! """Creates a Ledger. """ createLedger( """ The [Idempotency Key](https://fragment.dev/api-reference/api-overview#idempotency) """ ik: SafeString! """The payload representing the Ledger to be created""" ledger: CreateLedgerInput! """The Schema to create this Ledger with""" schema: SchemaMatchInput ): CreateLedgerResponse! createLedgerAccount( """ The [Idempotency Key](https://fragment.dev/api-reference/api-overview#idempotency) """ ik: SafeString! """ An object containing the ID of the ledger under which to create the ledger account """ ledger: LedgerMatchInput! """The payload representing the ledger account to be created""" ledgerAccount: CreateLedgerAccountInput! ): CreateLedgerAccountResponse! """ This API call is used to create Ledger Accounts. It is only used if you are not using a Schema. Unlike other mutations that take a single IK, 'createLedgerAccount' accepts an IK for each of the ledger accounts in the request payload. This is so you can recover in the case of a partial failure. One API call can create up to 200 Ledger Accounts, up to 10 levels deep. """ createLedgerAccounts( """ An object containing the ID of the Ledger under which to create the Ledger Account. """ ledger: LedgerMatchInput! """The list of objects representing the Ledger Accounts to be created.""" ledgerAccounts: [CreateLedgerAccountsInput!]! ): CreateLedgerAccountsResponse! """ Delete Txs on a Custom Link. Once deleted, a Tx will not show up in listing queries, but can be resolved by if you lookup by its Fragment ID. """ deleteCustomTxs( """The Fragment IDs of the Txs to delete""" txs: [ID!]! ): DeleteCustomTxsResponse! """ Delete a Ledger. After using the deleteLedger mutation you can re-use the ik in a new ledger after a 30 second wait. """ deleteLedger(ledger: LedgerMatchInput!): DeleteLedgerResponse! """Delete a Schema""" deleteSchema(schema: SchemaMatchInput!): DeleteSchemaResponse! """ Migrate an existing Ledger Entry to a new type and typeVersion. Migrating a Ledger Entry will do the following: 1. Reverse the existing Ledger Entry 2. Post a new Ledger Entry with the new type, typeVersion, and parameters provided """ migrateLedgerEntry(input: MigrateLedgerEntryInput!): MigrateLedgerEntryResponse! """ This mutation is used to [reconcile](https://fragment.dev/docs/reconcile-payments#reconcile-a-tx) transactions from an external system into a Ledger Entry. This mutation does not require an idempotency key since a transaction can only be reconciled once per Linked Ledger Account. If you are reconciling a transfer between two Link Accounts which are both linked to the same Ledger, use a transit account in between to split the transfer into two `reconcileTx` calls. """ reconcileTx( """ The ledger entry containing lines that specify the transaction from a linked ledger account to reconcile, as well as the ledger account with which to offset the external transaction. """ entry: LedgerEntryInput! ): ReconcileTxResponse! """Reverses a Ledger Entry""" reverseLedgerEntry( """The Fragment ID of the Ledger Entry to reverse""" id: ID! ): ReverseLedgerEntryResponse! """ Stores a Schema in your workspace. If no Schema with the same key exists in your worksapce, a new Schema is created. Else, the Schema is updated, and every Ledger associated with it is migrated to the latest version. """ storeSchema( """The Schema to store.""" schema: SchemaInput! ): StoreSchemaResponse! """ Once you've created a [Custom Link](https://fragment.dev/docs/sync-payments#custom-link), create accounts under it using this mutation. Each Custom Account is an immutable, single-entry view of all the transactions in the external account. You can sync up to 100 Custom Accounts in one API call. """ syncCustomAccounts( """A list of external accounts to sync""" accounts: [CustomAccountInput!]! """An object containing the ID of a Custom Link.""" link: LinkMatchInput! ): SyncCustomAccountsResponse! """ You can create transactions under a Custom Account in a [Custom Link](https://fragment.dev/docs/sync-payments#custom-link) using this mutation. Once you've imported transactions, you can use the reconcileTx mutation to add them to a Ledger via the Linked Ledger Account. You can sync up to 100 Custom Transactions in one API call. """ syncCustomTxs( """An object containing the ID of a Custom Link.""" link: LinkMatchInput! """A list of external transactions to sync""" txs: [CustomTxInput!]! ): SyncCustomTxsResponse! """Updates a Ledger. Currently, you can change only the Ledger 'name'.""" updateLedger( """An object containing the ID of the Ledger to update.""" ledger: LedgerMatchInput! """ A payload of fields to update. Currently, you can change only the Ledger 'name'. """ update: UpdateLedgerInput! ): UpdateLedgerResponse! """Updates a ledger account. Only supports name right now.""" updateLedgerAccount( """The Ledger Account that is being updated""" ledgerAccount: LedgerAccountMatchInput! """ The payload containing the fields to update. Currency, only the name can be updated. """ update: UpdateLedgerAccountInput! ): UpdateLedgerAccountResponse! """Update a ledger entry""" updateLedgerEntry( """The Ledger Entry that is being updated""" ledgerEntry: LedgerEntryMatchInput! """ The payload containing the fields to update. Only a Ledger Entry's tags can be updated. """ update: UpdateLedgerEntryInput! ): UpdateLedgerEntryResponse! } """Equivalent to an HTTP 404""" type NotFoundError implements Error { """The status code of error. For example, 'ledger_not_found'.""" code: String! """The error message""" message: String! """Whether or not the operation is retryable""" retryable: Boolean! } """ An object containing [pagination](https://fragment.dev/docs/query-data#basics-pagination) details. """ type PageInfo { endCursor: String hasNextPage: Boolean! hasPreviousPage: Boolean! startCursor: String } """ A string of non-zero length that can contain parameterized values via handlebars syntax. ex: `"Hello from {{country}}"`. """ scalar ParameterizedString """A mapping of parameter keys to values.""" scalar Parameters """ A specific year ("2021"), quarter ("2021-Q1"), month ("2021-02"), day ("2021-02-03") or hour ("2021-02-03T04") """ scalar Period """ A specific year ("2026") or month ("2026-05") used to match dates that fall within it. """ scalar PeriodFilter """ Controls how lines are posted for a Ledger Entry. New entries created via the dashboard default to `net_amounts`. Existing entries without this field set are treated as `raw_lines`. """ enum PostLinesAs { """ Lines targeting the same account, currency, and tx are aggregated into a single line with the net amount. Lines that sum to zero are skipped. If all lines sum to zero, no lines are skipped. """ net_amounts """Lines are posted as-is without aggregation.""" raw_lines """ Lines with a zero amount are skipped, but lines are not aggregated. If all lines have a zero amount, no lines are skipped. """ skip_zero_lines } """ The posted timestamp window for a clearing account, representing the earliest and latest posted timestamps across all currencies. """ type PostedWindow { """ The earliest posted timestamp across all currencies for this clearing account. """ earliest: DateTime! """ The latest posted timestamp across all currencies for this clearing account. """ latest: DateTime! } """ View the API guide [here](https://fragment.dev/api-reference/api-queries) """ type Query { _empty: String """Query Custom Currencies in the workspace""" customCurrencies( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of currencies to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of currencies to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): CustomCurrenciesConnection! """Get External Account by Link and External ID or FRAGMENT ID.""" externalAccount(externalAccount: ExternalAccountMatchInput!): ExternalAccount """Get a Ledger by ID""" ledger( """An object specifying the ID of the ledger you want to query""" ledger: LedgerMatchInput! ): Ledger """Get a Ledger Account by ID""" ledgerAccount( """An object specifying the ID of the ledger account you want to query""" ledgerAccount: LedgerAccountMatchInput! ): LedgerAccount """Get Ledger Entry by ID.""" ledgerEntry( """An object specifying the ID of the Ledger Entry you want to query.""" ledgerEntry: LedgerEntryMatchInput! ): LedgerEntry """Query a Ledger Entry Group given its Ledger, key, and value.""" ledgerEntryGroup(ledgerEntryGroup: LedgerEntryGroupMatchInput!): LedgerEntryGroup """Get the reversal history of a Ledger Entry.""" ledgerEntryHistory( """ An object specifying the ID or IK of the Ledger Entry's reversal history to query. """ ledgerEntry: LedgerEntryMatchInput! ): LedgerEntriesConnection! """Get LedgerLine by ID""" ledgerLine( """An object specifying the ID of the LedgerLine you want to query""" ledgerLine: LedgerLineMatchInput! ): LedgerLine """ Query Ledgers in workspace. Ledgers are paginated and returned in reverse-chronological order by their created date. """ ledgers( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ Filter the Ledgers returned. Learn more about [querying Ledgers](https://fragment.dev/docs/query-data#ledgers). """ filter: LedgersFilterSet """ The number of Ledgers to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledgers to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgersConnection! """Get a Link by ID. Returns a BadRequestError if the Link is not found.""" link( """An object containing the ID of the Link you are querying""" link: LinkMatchInput! ): Link """Get all links in a workspace""" links: LinksConnection! """Get a Schema by key.""" schema( """This contains the key of the Schema you want to retrieve.""" schema: SchemaMatchInput! ): Schema """Retrieve all of the Schemas in the workspace.""" schemas( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of schemas to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of schemas to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): SchemaConnection! """Get a Tx by ID""" tx( """ The transaction you're querying. You can specify either: - The FRAGMENT ID of the transaction (id) - The external system's transaction ID (externalId) and FRAGMENT ID of the external account (accountId) - The external system's transaction ID (externalId), the external system's account ID (externalAccountId) and FRAGMENT ID of the Link (linkId) """ tx: TxMatchInput! ): Tx """Get the current Workspace""" workspace: Workspace! } """ The consistency configuration of a Ledger Account's balance queries. If not provided as an argument to a balance query, the default behavior is to read eventually consistent balances. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ enum ReadBalanceConsistencyMode { """ Balance queries will read eventually consistent balances. This is the default behavior if `ReadBalanceConsistencyMode` is not provided as an argument to the balance field. Both Ledger Accounts configured with strongly and eventually consistent balance updates support this enum. """ eventual """ Balance queries will read strongly consistent balances. This is only allowed if the Ledger Account's `ownBalanceUpdates` in its `consistencyConfig` is `strong`. """ strong """ Balance queries will use the value from the Ledger Account's `ownBalanceUpdates` in its `consistencyConfig`. """ use_account } union ReconcileTxResponse = BadRequestError | InternalError | ReconcileTxResult type ReconcileTxResult { """The ledger entry that was posted""" entry: LedgerEntry! """ True if this request successfully completed before and the previous response is being returned """ isIkReplay: Boolean! """The ledger lines that were created in that entry""" lines: [LedgerLine!]! } union ReverseLedgerEntryResponse = BadRequestError | InternalError | ReverseLedgerEntryResult type ReverseLedgerEntryResult { """Whether the reversal was an IK replay""" isIkReplay: Boolean! """The Ledger Entry that was reversed""" reversedLedgerEntry: LedgerEntry! """The reversal Ledger Entry that was created""" reversingLedgerEntry: LedgerEntry! } """ A string with delimiter characters `/`, `#`, and `:` disallowed, as well as parameters in {{handlebar}} syntax. """ scalar SafeString """A simulated Ledger Entry posted as a part of a Scene.""" input SceneEntryInput { """Any parameters to be used as inputs to this simulated Ledger Entry.""" parameters: JSON """ The type of the simulated Ledger Entry. Must match one of the types provided in schema.ledgerEntries.types. """ type: SafeString! """The version of the Ledger Entry type.""" typeVersion: Int } input SceneEventInput { """The simulated Ledger Entry.""" entry: SceneEntryInput! """The type of the Scene Event. Currently, only entries are supported.""" eventType: SceneEventType! } enum SceneEventType { entry } input SceneInput { """A list of simulated ledger entries that make up the Scene.""" events: [SceneEventInput!]! """The human-readable name of the Scene.""" name: String! } type Schema { """ The identifier for a Schema. `key` is unique to a Workspace. """ key: SafeString! """The paginated list of ledgers the Schema has been applied to.""" ledgers( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of Ledgers to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of Ledgers to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): LedgersConnection! """ The name of a Schema. It defaults to the `key` if not provided in your SchemaInput. """ name: String! """The metadata for a specific SchemaVersion.""" version( """ The version of the schema to retrieve. If this is not provided, the latest version will be returned. """ version: Int ): SchemaVersion! """A paginated list of SchemaVersions.""" versions( """ Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ after: String """ Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about [pagination](https://fragment.dev/docs/query-data#basics-pagination). """ before: String """ The number of schema versions to return per page, when paginating forwards. Defaults to 20, maximum is 200. """ first: Int """ The number of schema versions to return per page, when paginating backwards. Defaults to 20, maximum is 200. """ last: Int ): SchemaVersionConnection! } """ A condition that must be met on a Ledger Account balance. The condition can be either a `precondition` or `postcondition`. """ input SchemaConditionInput { """A condition on the `ownBalance` of the Ledger Account.""" ownBalance: SchemaInt96ConditionInput """A condition on the `totalBalance` of the Ledger Account.""" totalBalance: SchemaInt96ConditionInput } """A paginated list of Schemas in a Workspace.""" type SchemaConnection { """The current page of results""" nodes: [Schema!]! """Pagination info for this list.""" pageInfo: PageInfo! } """ The consistency configuration for entities created within Ledgers created by this Schema. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ input SchemaConsistencyConfigInput { """ The consistency mode for the Ledger Entries list query within Ledgers created by this Schema. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ entries: SchemaConsistencyMode } """ The consistency modes available for entities created within this Schema. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ enum SchemaConsistencyMode { """Eventually consistent entity updates""" eventual """Strongly consistent entity updates""" strong } """ Matches a Currency. Can be a built-in [CurrencyCode](https://fragment.dev/api-reference/api-types#scalars-and-enums-currencycode), custom Currency, or a parameterized string. If you supply a parameterized string, you must pass in a valid CurrencyCode as a parameter when posting a Ledger Entry. """ input SchemaCurrencyMatchInput { """ The currency code. This must either be a [CurrencyCode](https://fragment.dev/api-reference/api-types#scalars-and-enums-currencycode) or a parameterized string that resolves to a CurrencyCode . """ code: ParameterizedString! """ The ID for a custom currency. This is specified when creating the custom currency using the [createCustomCurrency](https://fragment.dev/api-reference/api-mutations#createcustomcurrency) mutation. """ customCurrencyId: ParameterizedString } input SchemaExternalAccountMatchInput { """The External systems's ID of the account""" externalId: ParameterizedString """The FRAGMENT ID of the external account""" id: ParameterizedString """The FRAGMENT ID of the link""" linkId: ParameterizedString """ The type of Link this external account belongs to. Must be one of: IncreaseLink, UnitLink, CustomLink, or StripeLink. """ linkType: LinkType } """Input to the API for creating a Schema.""" input SchemaInput { """The Chart of Accounts for the Schema.""" chartOfAccounts: ChartOfAccountsInput! """The consistency configuration for this Schema.""" consistencyConfig: SchemaConsistencyConfigInput """Any groups associated with this Schema.""" groups: [GroupInput!] """ The key of the Schema. This is a stable, unique identifier for the Schema. Uniqueness is enforced at the Workspace level. """ key: SafeString! """The Ledger Entries to add to the Schema.""" ledgerEntries: SchemaLedgerEntriesInput """The human-readable name of the Schema.""" name: ParameterizedString """Any scenes associated with this Schema.""" scenes: [SceneInput!] } """A condition that must be met on a field.""" input SchemaInt96ConditionInput { """ Amount must be exactly equal to this value. You may not specify this alongside `gte` or `lte`. """ eq: ParameterizedString """Amount must be greater than or equal to this value.""" gte: ParameterizedString """Amount must be less than or equal to this value.""" lte: ParameterizedString } """ Models a Ledger Account in a Schema. Upon successfully storing a [Schema](https://fragment.dev/api-reference/api-types#core-types-schema), a [LedgerAccount](https://fragment.dev/api-reference/api-types#core-types-ledgeraccount) will be created for each corresponding non-templated `SchemaLedgerAccountInput` in your Chart of Accounts. """ input SchemaLedgerAccountInput { """ Ledger Accounts to create as children of this Ledger Account. Ledger Accounts may be nested up to a maximum depth of 10. """ children: [SchemaLedgerAccountInput!] """ EXPERIMENTAL: Whether or not this Ledger Account is a Clearing Account. Clearing Accounts have balances that should tend to zero. They are used to track in-progress workflows and payments. """ clearing: Boolean """ The consistency configuration for this ledger account. See [Configure consistency](https://fragment.dev/docs/configure-consistency). """ consistencyConfig: LedgerAccountConsistencyConfigInput """ The currency of this Ledger Account. If this is not set, and `currencyMode` is not set to `multi`, it is derived from the Chart of Accounts' default. """ currency: SchemaCurrencyMatchInput """ If set to `multi`, creates a multi-currency Ledger Account. If set to `single`, creates a single-currency Ledger Account. """ currencyMode: CurrencyMode """ The key of this Ledger Account. Keys are used to formulate the unique path of the Ledger Account in your Chart of Accounts. Siblings must have unique keys. """ key: SafeString! """ The External Account to link to this Ledger Account. It must be provided of `linked` is true. """ linkedAccount: SchemaExternalAccountMatchInput """The human-readable name of this Ledger Account.""" name: ParameterizedString """EXPERIMENTAL: Marks this as a Payment Account.""" payment: SchemaPaymentInput """The status of this Ledger Account. Defaults to active.""" status: SchemaLedgerAccountStatus """Whether or not this Ledger Account should be templated.""" template: Boolean """ The type of ledger account to create. Required if this is a top-level Ledger Account. If not provided, the type will be inferred from the parent. """ type: LedgerAccountTypes } """Matches a Ledger Account in a Schema.""" input SchemaLedgerAccountMatchInput { """ The unique path of the Ledger Account in the Schema. This is a slash-delimited string containing the keys of a Ledger Account and all its direct ancestors. ex: expense-root/subscriptions/netflix For Templated Ledger Accounts, you must supply a parameter in the path that will be used to name an instance of the template. ex: `"expense-root/subscriptions/vendor:{{vendor_name}}"` """ path: ParameterizedString! } """The status of a Ledger Account.""" enum SchemaLedgerAccountStatus { """The Ledger Account is active.""" active """The Ledger Account is archived.""" archived """The Ledger Account is disabled.""" disabled } """The Ledger Entries in your Schema.""" input SchemaLedgerEntriesInput { """A list of Ledger Entry definitions.""" types: [SchemaLedgerEntryInput!]! } """ A condition that must be met on a Ledger Account when a Ledger Entry is posted. """ input SchemaLedgerEntryConditionInput { """The Ledger Account to apply the condition to.""" account: SchemaLedgerAccountMatchInput! """ The currency of the balance to apply the condition to. Required if the Ledger Account matched is a multi-currency Ledger Account. Otherwise, this field is defaults to the Ledger Account's currency. """ currency: SchemaCurrencyMatchInput """ A `postcondition` must be met after the Ledger Entry updates are applied. """ postcondition: SchemaConditionInput """ A `precondition` must be met before any Ledger Entry updates are applied. """ precondition: SchemaConditionInput """ Repeated expansion configuration. When set, this condition is expanded at runtime for each element in the array parameter named by the key. """ repeated: SchemaRepeatedConfigInput } """A Ledger Entry Group associated with a Ledger Entry type.""" input SchemaLedgerEntryGroupInput { """The key for this Ledger Entry Group.""" key: SafeString! """The value associated with this Ledger Entry Group.""" value: ParameterizedString! } """ A Ledger Entry in a Schema. All Ledger Entries defined in a Schema must have a unique `type`. """ input SchemaLedgerEntryInput { """ Conditions that must be satisfied to post this Ledger Entry. The Ledger Entry will reject with a BadRequestError if any condition is not met. You can only add a condition on a Ledger Account containing a Line in this Ledger Entry. """ conditions: [SchemaLedgerEntryConditionInput!] """Human-readable description of the Ledger Entry.""" description: ParameterizedString """ Ledger Entries posted with this type will be in these Ledger Entry Groups. """ groups: [SchemaLedgerEntryGroupInput!] """ The Ledger Lines in the Ledger Entry. If provided, when posting a Typed Entry, a [LedgerEntry](https://fragment.dev/api-reference/api-types#core-types-ledgerline) will be posted containing [LedgerLines](https://fragment.dev/api-reference/api-types#core-types-ledgerline) corresponding to the values you provide here. If your lines contain parameters, you must supply values for those parameters that balance out the Ledger Entry. If not provided, lines will be required when posting a Typed Entry. """ lines: [SchemaLedgerLineInput!] """ Fixed partial set of parameters to be included in a templated Ledger Entry. """ parameters: JSON """ Controls how lines are posted. When set to `net_amounts`, all lines targeting the same account, currency, and tx are aggregated into a single line with the net amount, and lines that sum to zero are skipped. When set to `skip_zero_lines`, lines with a zero amount are skipped but not aggregated. In both modes, if all lines are zero, no lines are skipped. When set to `raw_lines`, lines are posted as-is without aggregation. New entries created via the dashboard default to `net_amounts`. Existing entries without this field set are treated as `raw_lines`. """ postLinesAs: PostLinesAs """The status of this Ledger Entry. Defaults to active.""" status: SchemaLedgerEntryStatus """ Ledger Entries posted with this type will be associated with these tags. """ tags: [SchemaLedgerEntryTagInput!] """ The type of this Ledger Entry. This is a stable, unique identifier for this entry. Uniqueness is enforced at the Schema level. You can filter on this field when querying for Ledger Entries. See the docs on [LedgerEntryFilterSet](https://fragment.dev/api-reference/api-types#filter-types-ledgerentriesfilterset) """ type: SafeString! """The version of the Ledger Entry type.""" typeVersion: Int } """The status of a Ledger Entry.""" enum SchemaLedgerEntryStatus { """The Ledger Entry is active.""" active """The Ledger Entry is archived.""" archived """The Ledger Entry is disabled.""" disabled } """A tag associated with a Ledger Entry type.""" input SchemaLedgerEntryTagInput { """The key for this tag.""" key: SafeString! """The value associated with the given key for this tag.""" value: ParameterizedString! } """A Ledger Line in a Ledger Entry.""" input SchemaLedgerLineInput { """ The Ledger Account this Ledger Line will be posted to. It supports parameters in its attributes via handlebars syntax. """ account: SchemaLedgerAccountMatchInput! """ The amount of the Ledger Line. It supports parameters via the handlebars syntax and addition (+) and subtraction (-). """ amount: ParameterizedString """ The currency of the Ledger Line. This is required if the Ledger Account has currencyMode multi. It supports parameters in its attributes via handlebars syntax. """ currency: SchemaCurrencyMatchInput """Human-readable description of the line.""" description: ParameterizedString """ The key for the Ledger Line. Ledger Line keys must be unique within a Ledger Entry. Key can be filtered on as part of the LedgerLinesFilterSet. """ key: SafeString! """ Repeated expansion configuration. When set, this line is expanded at runtime for each element in the array parameter named by the key. """ repeated: SchemaRepeatedConfigInput """ Tags to attach to this Ledger Line. Supports parameterized values via handlebars syntax. """ tags: [SchemaLedgerEntryTagInput!] """ The external transaction to reconcile. This field is required if the Ledger Account being posted to is a Linked Ledger Account. Otherwise, this field is disallowed. It supports parameters in its attributes via handlebars syntax. See the docs on [reconciling payments](https://fragment.dev/docs/reconcile-payments). """ tx: SchemaTxMatchInput } """An object used to retrieve a Schema.""" input SchemaMatchInput { """ The key to retrieve a Schema by. `key` is unique to a Workspace. """ key: SafeString! """ Optional parameter to specify version of requested Schema. If not provided, it defaults to 0, representing the latest available version for the provided Schema key. """ version: Int } """EXPERIMENTAL: Marks a Ledger Account as a Payment Account.""" input SchemaPaymentInput { penguin: Boolean! } """ Configuration for repeated expansion of a line or condition. The key names a client-supplied array parameter whose elements each generate one copy of the line or condition at runtime. """ input SchemaRepeatedConfigInput { """ The key of the array parameter whose elements expand this line or condition. """ key: SafeString! } """ Matches a transaction at an external system. This is used to specify the transaction being reconciled into a Linked Ledger Account """ input SchemaTxMatchInput { """The external system's ID for the transaction.""" externalId: ParameterizedString """The FRAGMENT ID for the transaction.""" id: ParameterizedString } """ An instance of a Schema stored in a Workspace. A new SchemaVersion is created each time a Schema is stored. It stores the Chart of Accounts and list of Ledger Entries as well as a history of its Ledger migrations. """ type SchemaVersion { created: DateTime! json: JSON! migrations: LedgerMigrationConnection! """The version of the schema.""" version: Int! } """A paginated list of SchemaVersions for a given Schema.""" type SchemaVersionConnection { """The current page of results""" nodes: [SchemaVersion!]! """Pagination info for this list.""" pageInfo: PageInfo! } """ Returned by the [storeSchema](https://fragment.dev/api-reference/api-mutations#storeschema) mutation. """ union StoreSchemaResponse = BadRequestError | InternalError | StoreSchemaResult """ `StoreSchemaResult` represents a successful execution of `storeSchema`. """ type StoreSchemaResult { """The Schema that was stored as a result of calling `storeSchema`.""" schema: Schema! } input StringFilter { equalTo: String """Must match one of the values provided. Limited to 100 items maximum.""" in: [String!] """Must not equal this string value""" notEqualTo: String """ Must not match any of the values provided. Limited to 100 items maximum. """ notIn: [String!] } input StringMatchFilter { """ Must contain the provided pattern somewhere within the string. For example, 'contains: hat' will match 'hat', 'chat', and 'hate'. """ contains: String """Must exactly equal the provided value""" equalTo: String """ Must exactly equal one of the provided values. Limited to 100 items maximum. """ in: [String!] """ Must match the provided pattern. Wildcards ("*") will match any substring """ matches: String """ Must match any one of the provided `matches` patterns, OR-ed together — results are returned as a single paginated list. Each entry uses the same wildcard grammar as `matches`. Cannot be combined with `matches`. Limited to 100 entries. """ matchesAny: [String!] } enum StripeEnv { livemode testmode } type StripeLink implements Link { """ISO-8601 timestamp when the Link was created.""" created: String! """URL to the Fragment Dashboard for this Link.""" dashboardUrl: String! """A list of External Accounts associated with this Link.""" externalAccounts: ExternalAccountsConnection! """FRAGMENT ID of the Custom Link.""" id: ID! """Name of the Link as it appears in the Fragment Dashboard.""" name: String! """The environment of the Stripe Link, either testmode or livemode.""" stripeEnv: StripeEnv! } union SyncCustomAccountsResponse = BadRequestError | InternalError | SyncCustomAccountsResult type SyncCustomAccountsResult { """The external accounts that were synced.""" accounts: [ExternalAccount!]! } union SyncCustomTxsResponse = BadRequestError | InternalError | SyncCustomTxsResult type SyncCustomTxsResult { txs: [Tx!]! } """Filters a result set based on the tags it contains.""" input TagFilter { """ Matches entries that have ALL of the specified tags. The key and value are both matched exactly. Limited to 10 items maximum. """ all: [TagMatchInput!] """ Matches tag values based on the existence of the provided string within the tag value. The key is matched exactly. """ contains: TagMatchInput """ Matches tags based on the exact value provided. The key and value are both matched exactly. """ equalTo: TagMatchInput """ Matches tags based on a list of possible tag matches. The key and value are both matched exactly. Limited to 100 items maximum. """ in: [TagMatchInput!] """Matches tags where the key exactly equals the provided value.""" keyEqualTo: SafeString """ Matches tags where the key matches any of the provided values. Limited to 100 items maximum. """ keyIn: [SafeString!] """ Matches tags that do not equal the provided value. The key and value are both matched exactly. """ notEqualTo: TagMatchInput """ Matches tags that do not match any of the provided values. The key and value are both matched exactly. Limited to 100 items maximum. """ notIn: [TagMatchInput!] """Matches tags where the key does not equal the provided value.""" notKeyEqualTo: SafeString """ Matches tags where the key does not match any of the provided values. Limited to 100 items maximum. """ notKeyIn: [SafeString!] } """ Specifies a single tag that an entity is expected to have. You must specify both the key and the value. """ input TagMatchInput { """The key of this tag.""" key: SafeString! """The value associated with this tag's key.""" value: SafeString! } type Tx { """FRAGMENT ID of this transaction's external account""" accountId: ID! """ Integer amount in cents. Positive indicates money entering the external account, negative indicates money leaving """ amount: Int96! """Currency of this Tx""" currency: Currency """Date this Tx posted to the external account""" date: Date! """ISO-8601 timestamp when this Tx was deleted""" deletedAt: DateTime """Description at the external account""" description: String! """The External Account that this transaction belongs to.""" externalAccount: ExternalAccount! """ID in the external system of this transaction's external account""" externalAccountId: ID! """ID of this transaction in the external system""" externalId: ID! """ FRAGMENT ID of this Tx. If you delete a Tx via deleteCustomTxs, it will not show up in listing queries, but can be resolved by if you lookup by its Fragment ID. If you resync a Tx with the same externalId, its Fragment ID will be different than the previous Tx. """ id: ID! """Whether this Tx has been deleted via deleteCustomTxs""" isDeleted: Boolean! """ Returns ledger entries that are linked to this transaction. You can link the same external account to multiple ledgers, so there could be multiple entries associated with one transaction - one for each linked ledger account this transaction has been reconciled with """ ledgerEntries: LedgerEntriesConnection! """Same as ledgerEntries, but returns an array of IDs instead""" ledgerEntryIds: [ID!] """Same as ledgerLines, but returns an array of IDs instead""" ledgerLineIds: [ID!] """ Returns ledger lines that are linked to this transaction. You can link the same external account to multiple ledgers, so there could be multipe lines associated with one transaction - one for each linked ledger account this transaction has been reconciled with """ ledgerLines: LedgerLinesConnection! """This transaction's Link.""" link: Link! """FRAGMENT ID of this transaction's Link""" linkId: ID! """ISO-8601 timestamp when this Tx posted to the external account""" posted: DateTime! """ When a Tx is deleted and a new Tx is synced with the same externalId, its sequence will be higher than the previous Tx. You can use this to distinguish different instances of Txs that have the same externalId. """ sequence: Int! workspaceId: ID! @deprecated(reason: "Callers should not need to query or store this value.") } """ Specify a Tx by using `id` or `externalId`, the Link it belongs to by `linkId`, and the External Account it is a part of by `accountId` or `externalAccountId`. """ input TxMatchInput { """The FRAGMENT ID of the external account""" accountId: ID """The external system's ID for the account""" externalAccountId: ID """The external system's ID for the transaction""" externalId: ID """The FRAGMENT ID of the transaction""" id: ID """The FRAGMENT ID of the link""" linkId: ID } enum TxType { credit debit } input TxTypeFilter { equalTo: TxType """Must match one of the values provided. Limited to 100 items maximum.""" in: [TxType!] } """A paginated list of Txs""" type TxsConnection { """The current page of results""" nodes: [Tx!]! """ The [pagination info](https://fragment.dev/api-reference/api-types#connection-types-pageinfo) for this list """ pageInfo: PageInfo! } """ All hour-aligned offsets from -11:00 to +12:00 are supported, e.g. "-08:00" (PT), "-05:00" (ET), "+00:00" (UTC) """ scalar UTCOffset enum UnitEnv { production sandbox } type UnitLink implements Link { """ISO-8601 timestamp when the Link was created.""" created: String! """URL to the Fragment Dashboard for this Link.""" dashboardUrl: String! """A list of External Accounts associated with this Link.""" externalAccounts: ExternalAccountsConnection! """FRAGMENT ID of the Unit Link.""" id: ID! """Name of the Link as it appears in the Dashboard.""" name: String! """The environment of the Unit Link, either sandbox or production.""" unitEnv: UnitEnv! } input UpdateLedgerAccountInput { """ The consistency configuration for this ledger account. This defines how updates to this ledger account's balance are handled. """ consistencyConfig: LedgerAccountConsistencyConfigInput """The name to update the ledger account to""" name: String } union UpdateLedgerAccountResponse = BadRequestError | InternalError | UpdateLedgerAccountResult type UpdateLedgerAccountResult { """The ledger account that was updated""" ledgerAccount: LedgerAccount! } input UpdateLedgerEntryInput { """The list of Groups to add to this Ledger Entry.""" groups: [LedgerEntryGroupInput!] """The list of Tags to add and/or update on this Ledger Entry.""" tags: [LedgerEntryTagInput!] """The list of Tags to remove from this Ledger Entry.""" tagsToRemove: [LedgerEntryTagInput!] } union UpdateLedgerEntryResponse = BadRequestError | InternalError | UpdateLedgerEntryResult type UpdateLedgerEntryResult { """The Ledger Entry that was updated.""" entry: LedgerEntry! } input UpdateLedgerInput { """The new Ledger name. """ name: String } union UpdateLedgerResponse = BadRequestError | InternalError | UpdateLedgerResult type UpdateLedgerResult { """The updated Ledger. """ ledger: Ledger! } type Workspace { """The ID of the Workspace""" id: String! """The name of the Workspace""" name: String! }