# Schemas

Data models used by the PNSL API.

Product: PNSL API
API reference version: 2.0.0 (current)
OpenAPI contract: https://docs.axiym.io/openapi/pnsl-api/2.0.0.json
Canonical page: https://docs.axiym.io/pnsl-api/api-reference/2.0.0/schemas

[Compact reference](/pnsl-api/api-reference/2.0.0/schemas.md)

## Schema 1: Client

```json
{
  "type": "object",
  "properties": {
    "clientId": {
      "type": "string",
      "format": "uuid",
      "description": "Client identifier (UUID).",
      "examples": [
        "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
      ]
    },
    "code": {
      "type": "string",
      "description": "Human-readable client code.",
      "examples": [
        "AXI000221"
      ]
    },
    "legalEntityName": {
      "type": "string",
      "description": "Official name of the company",
      "examples": [
        "Acme Corporation"
      ]
    },
    "legalAddress": {
      "description": "Legal Address",
      "$ref": "#/components/schemas/Address"
    },
    "incorporationDate": {
      "type": "string",
      "description": "Date legal entity was established",
      "format": "date",
      "examples": [
        "2020-01-15"
      ]
    },
    "registrationDate": {
      "type": "string",
      "description": "Date when the company registered / joined your network",
      "format": "date",
      "examples": [
        "2020-02-01"
      ]
    },
    "status": {
      "type": "string",
      "description": "Client status.",
      "enum": [
        "ONBOARDING",
        "ACTIVE",
        "DISABLED"
      ],
      "examples": [
        "ONBOARDING"
      ]
    },
    "currency": {
      "$ref": "#/components/schemas/Currency",
      "description": "Currency code (ISO 4217 fiat or supported stablecoin).",
      "examples": [
        "USD"
      ]
    },
    "disbursementAccount": {
      "$ref": "#/components/schemas/DisbursementAccount",
      "description": "Payment Network bank account that receives funding disbursements for this client (the funding destination)."
    },
    "partnerClientId": {
      "type": "string",
      "description": "Your own identifier for this client.",
      "examples": [
        "my-internal-ref-001"
      ]
    },
    "paymentRails": {
      "type": "string",
      "description": "Payment rail — a configured settlement channel Axiym uses to hold and move funds: a banking partner for fiat (e.g. `ZENUS_BANK`, `FREEMARKET`) or a blockchain network for crypto (e.g. `TRON`, `AVALANCHE`). Codes are returned by `GET /settings/payment-rails`.",
      "examples": [
        "ZENUS_BANK"
      ]
    }
  },
  "required": [
    "clientId",
    "legalEntityName",
    "legalAddress",
    "status",
    "incorporationDate",
    "registrationDate",
    "paymentRails",
    "currency",
    "code"
  ]
}
```

## Schema 2: PageInfo

```json
{
  "type": "object",
  "properties": {
    "hasNextPage": {
      "type": "boolean",
      "description": "When paginating forwards, are there more items?",
      "examples": [
        true
      ]
    },
    "endCursor": {
      "type": "string",
      "description": "When paginating forwards, the cursor to continue.",
      "examples": [
        "eyJvZmZzZXQiOjI1fQ=="
      ]
    }
  },
  "required": [
    "hasNextPage"
  ]
}
```

## Schema 3: Receivable

```json
{
  "type": "object",
  "properties": {
    "receivableId": {
      "type": "string",
      "description": "Receivable identifier (UUID).",
      "examples": [
        "e5a9c3d1-7b2f-4a8e-9c1d-3f6b8a0e2c4d"
      ]
    },
    "clientId": {
      "type": "string",
      "format": "uuid",
      "description": "Client identifier (UUID).",
      "examples": [
        "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
      ]
    },
    "issueDate": {
      "type": "string",
      "format": "date-time",
      "description": "Issue Date. Formatted in ISO 8601",
      "examples": [
        "2026-06-23T14:05:09Z"
      ]
    },
    "initialPrincipal": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Original loan amount at the start"
    },
    "currentPrincipal": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Remaining unpaid principal"
    },
    "repaymentAmount": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Total due including interest and fees"
    },
    "currency": {
      "$ref": "#/components/schemas/Currency",
      "description": "Currency code (ISO 4217 fiat or supported stablecoin).",
      "examples": [
        "USD"
      ]
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ReceivableStatus"
        }
      ],
      "description": "Receivable lifecycle status.",
      "examples": [
        "PENDING"
      ]
    },
    "paymentTransaction": {
      "allOf": [
        {
          "$ref": "#/components/schemas/TransactionRef"
        }
      ],
      "description": "Payment Transaction"
    },
    "disbursedTransaction": {
      "allOf": [
        {
          "$ref": "#/components/schemas/TransactionRef"
        }
      ],
      "description": "Disbursed Transaction"
    },
    "repaymentTransactions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/TransactionRef"
      },
      "description": "Repayment transactions"
    },
    "paymentRails": {
      "type": "string",
      "description": "Payment rail — a configured settlement channel Axiym uses to hold and move funds: a banking partner for fiat (e.g. `ZENUS_BANK`, `FREEMARKET`) or a blockchain network for crypto (e.g. `TRON`, `AVALANCHE`). Codes are returned by `GET /settings/payment-rails`.",
      "examples": [
        "ZENUS_BANK"
      ]
    }
  },
  "required": [
    "receivableId",
    "clientId",
    "issueDate",
    "initialPrincipal",
    "status",
    "currency",
    "currentPrincipal",
    "repaymentAmount",
    "paymentTransaction",
    "paymentRails"
  ]
}
```

## Schema 4: ReceivableStatus

```json
{
  "type": "string",
  "description": "`PENDING` while the funding request is accepted and the disbursement is in progress; `ACTIVE` once the disbursement settled and principal is outstanding (stays `ACTIVE` after a partial repayment); `PAID` when the obligation is fully repaid; `CANCELED` if the receivable did not complete.",
  "enum": [
    "PENDING",
    "ACTIVE",
    "PAID",
    "CANCELED"
  ],
  "examples": [
    "PENDING"
  ]
}
```

## Schema 5: Address

```json
{
  "type": "object",
  "properties": {
    "city": {
      "type": "string",
      "description": "City portion of the address.",
      "examples": [
        "New York"
      ]
    },
    "country": {
      "type": "string",
      "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.",
      "examples": [
        "US"
      ]
    },
    "address": {
      "type": "string",
      "description": "Line one of the street address.",
      "examples": [
        "350 Fifth Avenue"
      ]
    },
    "addressExtended": {
      "type": "string",
      "description": "Line two of the street address.",
      "examples": [
        "Suite 1200"
      ]
    },
    "district": {
      "type": "string",
      "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.",
      "examples": [
        "NY"
      ]
    },
    "postalCode": {
      "type": "string",
      "description": "Postal / ZIP code of the address.",
      "examples": [
        "10115"
      ]
    }
  },
  "required": [
    "postalCode",
    "country",
    "address"
  ]
}
```

## Schema 6: RequestStatus

```json
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Request status.",
      "examples": [
        "OK"
      ],
      "default": "OK",
      "enum": [
        "OK"
      ]
    }
  },
  "required": [
    "status"
  ]
}
```

## Schema 7: Subscription

```json
{
  "type": "object",
  "properties": {
    "subscriptionId": {
      "type": "string",
      "description": "Subscription identifier (UUID).",
      "format": "uuid",
      "examples": [
        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      ]
    },
    "endpoint": {
      "type": "string",
      "description": "URL of the endpoint to subscribe to notifications. Must be publicly accessible, use HTTPS, and respond with a 2XX status to a POST request.",
      "title": "",
      "format": "uri",
      "examples": [
        "https://api.acme.example/webhooks"
      ]
    }
  },
  "required": [
    "subscriptionId",
    "endpoint"
  ]
}
```

## Schema 8: PublicKey

```json
{
  "type": "object",
  "properties": {
    "publicKeyId": {
      "type": "string",
      "description": "Public key identifier (UUID).",
      "format": "uuid",
      "examples": [
        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      ]
    },
    "active": {
      "type": "boolean",
      "description": "Indicates whether the key is active",
      "examples": [
        true
      ]
    },
    "algorithm": {
      "type": "string",
      "description": "Encryption algorithm",
      "examples": [
        "ED25519"
      ]
    },
    "publicKey": {
      "type": "string",
      "description": "Public Key",
      "examples": [
        "string"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Creation timestamp. Formatted in ISO 8601.",
      "examples": [
        "2026-06-23T14:05:09Z"
      ]
    }
  },
  "required": [
    "publicKeyId",
    "algorithm",
    "publicKey",
    "createdAt",
    "active"
  ]
}
```

## Schema 9: PaymentRails

```json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Payment rail code (e.g. `ZENUS_BANK`, `TRON`).",
      "examples": [
        "ZENUS_BANK"
      ]
    },
    "description": {
      "type": "string",
      "description": "Human-readable description.",
      "examples": [
        "Zenus Bank — USD/EUR wire settlement"
      ]
    },
    "currencies": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Currency"
      },
      "description": "Allowed currencies."
    }
  },
  "required": [
    "code",
    "description",
    "currencies"
  ]
}
```

## Schema 10: DisbursementAccount

```json
{
  "type": "object",
  "properties": {
    "accountNumber": {
      "type": "string",
      "description": "Bank account number.",
      "examples": [
        "0123456789"
      ]
    }
  },
  "description": "Bank account at the Payment Network that receives funding disbursements."
}
```

## Schema 11: ValidationError

```json
{
  "type": "object",
  "description": "Single validation error from the `validator` crate.",
  "properties": {
    "code": {
      "type": "string",
      "description": "Validation rule code (e.g. 'length', 'email', 'invalid_currency', 'disbursement_account_required').",
      "examples": [
        "length"
      ]
    },
    "message": {
      "type": [
        "string",
        "null"
      ],
      "description": "Human-readable message.",
      "examples": [
        "string"
      ]
    },
    "params": {
      "type": "object",
      "description": "Rule-specific parameters. Always includes `value` (the offending input). Additional keys depend on the rule (e.g. `min`, `max` for length).",
      "additionalProperties": true,
      "properties": {
        "value": {
          "description": "The submitted value that failed validation.",
          "examples": [
            "string"
          ]
        }
      }
    }
  },
  "required": [
    "code",
    "params"
  ]
}
```

## Schema 12: ValidationFieldErrors

```json
{
  "description": "Recursive structure: either an array of ValidationError records (leaf field), an object keyed by nested field names (Struct variant), or an object keyed by array indices (List variant).",
  "anyOf": [
    {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      }
    },
    {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/ValidationFieldErrors"
      },
      "properties": {}
    }
  ]
}
```

## Schema 13: TransactionRef

```json
{
  "type": "object",
  "description": "Reference to a settled transaction.",
  "required": [
    "txId",
    "txTimestamp"
  ],
  "properties": {
    "txId": {
      "type": "string",
      "description": "Transaction ID",
      "examples": [
        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      ]
    },
    "txTimestamp": {
      "type": "string",
      "format": "date-time",
      "description": "Transaction timestamp (ISO 8601)",
      "examples": [
        "2026-06-23T14:05:09Z"
      ]
    }
  }
}
```

## Schema 14: Currency

```json
{
  "type": "string",
  "description": "Currency code — ISO 4217 fiat (e.g. USD, EUR) or a supported stablecoin (USDT, USDC).",
  "examples": [
    "USD"
  ]
}
```

## Schema 15: Decimal

```json
{
  "type": "string",
  "description": "Decimal number serialized as a string to preserve precision.",
  "examples": [
    "1000.00"
  ]
}
```

## Schema 16: CreditAccount

```json
{
  "type": "object",
  "properties": {
    "creditAccountId": {
      "type": "string",
      "format": "uuid",
      "description": "Credit account identifier (UUID).",
      "examples": [
        "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
      ]
    },
    "currency": {
      "$ref": "#/components/schemas/Currency",
      "description": "Currency code (ISO 4217 fiat or supported stablecoin).",
      "examples": [
        "USD"
      ]
    },
    "creditLimit": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Maximum credit available to the client."
    },
    "availableBalance": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Amount currently available to borrow — i.e., available to finance a payment."
    },
    "balance": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Client settlement balance for this currency and payment rail: funds received from the client and not yet used for repayment. Absent until the client's settlement account is provisioned."
    },
    "principalOutstanding": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Total principal currently borrowed (outstanding)."
    },
    "totalRepaymentAmount": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Total amount due to repay (principal, interest and fees)."
    },
    "totalInterestAmount": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Total interest accrued."
    },
    "status": {
      "type": "string",
      "description": "CreditAccount status.",
      "enum": [
        "PENDING",
        "ACTIVE",
        "DISABLED"
      ],
      "examples": [
        "PENDING"
      ]
    },
    "paymentRails": {
      "type": "string",
      "description": "Payment rail — a configured settlement channel Axiym uses to hold and move funds: a banking partner for fiat (e.g. `ZENUS_BANK`, `FREEMARKET`) or a blockchain network for crypto (e.g. `TRON`, `AVALANCHE`). Codes are returned by `GET /settings/payment-rails`.",
      "examples": [
        "ZENUS_BANK"
      ]
    }
  },
  "required": [
    "creditAccountId",
    "paymentRails",
    "currency",
    "creditLimit",
    "availableBalance",
    "principalOutstanding",
    "totalRepaymentAmount",
    "totalInterestAmount",
    "status"
  ],
  "description": "A credit (borrowing) account."
}
```

## Schema 17: OnboardingCase

```json
{
  "type": "object",
  "properties": {
    "clientId": {
      "type": "string",
      "format": "uuid",
      "description": "Client identifier (UUID).",
      "examples": [
        "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
      ]
    },
    "code": {
      "type": "string",
      "description": "Human-readable client code.",
      "examples": [
        "AXI000221"
      ]
    },
    "legalEntityName": {
      "type": "string",
      "description": "Official name of the company",
      "examples": [
        "Acme Corporation"
      ]
    },
    "legalAddress": {
      "description": "Legal Address",
      "$ref": "#/components/schemas/Address"
    },
    "incorporationDate": {
      "type": "string",
      "description": "Date legal entity was established",
      "format": "date",
      "examples": [
        "2020-01-15"
      ]
    },
    "registrationDate": {
      "type": "string",
      "description": "Date when the company registered / joined your network",
      "format": "date",
      "examples": [
        "2020-02-01"
      ]
    },
    "status": {
      "type": "string",
      "description": "Onboarding application status.",
      "enum": [
        "ONBOARDING",
        "APPROVED",
        "REJECTED"
      ],
      "examples": [
        "ONBOARDING"
      ]
    },
    "currency": {
      "$ref": "#/components/schemas/Currency",
      "description": "Currency code (ISO 4217 fiat or supported stablecoin).",
      "examples": [
        "USD"
      ]
    },
    "disbursementAccount": {
      "$ref": "#/components/schemas/DisbursementAccount",
      "description": "Payment Network bank account that receives funding disbursements for this client (the funding destination)."
    },
    "partnerClientId": {
      "type": "string",
      "description": "Your own identifier for this client.",
      "examples": [
        "my-internal-ref-001"
      ]
    },
    "paymentRails": {
      "type": "string",
      "description": "Payment rail — a configured settlement channel Axiym uses to hold and move funds: a banking partner for fiat (e.g. `ZENUS_BANK`, `FREEMARKET`) or a blockchain network for crypto (e.g. `TRON`, `AVALANCHE`). Codes are returned by `GET /settings/payment-rails`.",
      "examples": [
        "ZENUS_BANK"
      ]
    }
  },
  "required": [
    "clientId",
    "code",
    "legalEntityName",
    "status"
  ],
  "description": "Snapshot of a client onboarding application. Created in the submitted state and reviewed by Axiym compliance; while the review is in progress the status stays ONBOARDING. Once approved, the client appears in `GET /clients`; a rejected application ends in REJECTED."
}
```

## Referenced definitions

- [`#/components/schemas/Address`](#definition-1)
- [`#/components/schemas/Currency`](#definition-2)
- [`#/components/schemas/DisbursementAccount`](#definition-3)
- [`#/components/schemas/Decimal`](#definition-4)
- [`#/components/schemas/ReceivableStatus`](#definition-5)
- [`#/components/schemas/TransactionRef`](#definition-6)
- [`#/components/schemas/ValidationError`](#definition-7)
- [`#/components/schemas/ValidationFieldErrors`](#definition-8)

### definition-1

`#/components/schemas/Address`

```json
{
  "type": "object",
  "properties": {
    "city": {
      "type": "string",
      "description": "City portion of the address.",
      "examples": [
        "New York"
      ]
    },
    "country": {
      "type": "string",
      "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.",
      "examples": [
        "US"
      ]
    },
    "address": {
      "type": "string",
      "description": "Line one of the street address.",
      "examples": [
        "350 Fifth Avenue"
      ]
    },
    "addressExtended": {
      "type": "string",
      "description": "Line two of the street address.",
      "examples": [
        "Suite 1200"
      ]
    },
    "district": {
      "type": "string",
      "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.",
      "examples": [
        "NY"
      ]
    },
    "postalCode": {
      "type": "string",
      "description": "Postal / ZIP code of the address.",
      "examples": [
        "10115"
      ]
    }
  },
  "required": [
    "postalCode",
    "country",
    "address"
  ]
}
```

### definition-2

`#/components/schemas/Currency`

```json
{
  "type": "string",
  "description": "Currency code — ISO 4217 fiat (e.g. USD, EUR) or a supported stablecoin (USDT, USDC).",
  "examples": [
    "USD"
  ]
}
```

### definition-3

`#/components/schemas/DisbursementAccount`

```json
{
  "type": "object",
  "properties": {
    "accountNumber": {
      "type": "string",
      "description": "Bank account number.",
      "examples": [
        "0123456789"
      ]
    }
  },
  "description": "Bank account at the Payment Network that receives funding disbursements."
}
```

### definition-4

`#/components/schemas/Decimal`

```json
{
  "type": "string",
  "description": "Decimal number serialized as a string to preserve precision.",
  "examples": [
    "1000.00"
  ]
}
```

### definition-5

`#/components/schemas/ReceivableStatus`

```json
{
  "type": "string",
  "description": "`PENDING` while the funding request is accepted and the disbursement is in progress; `ACTIVE` once the disbursement settled and principal is outstanding (stays `ACTIVE` after a partial repayment); `PAID` when the obligation is fully repaid; `CANCELED` if the receivable did not complete.",
  "enum": [
    "PENDING",
    "ACTIVE",
    "PAID",
    "CANCELED"
  ],
  "examples": [
    "PENDING"
  ]
}
```

### definition-6

`#/components/schemas/TransactionRef`

```json
{
  "type": "object",
  "description": "Reference to a settled transaction.",
  "required": [
    "txId",
    "txTimestamp"
  ],
  "properties": {
    "txId": {
      "type": "string",
      "description": "Transaction ID",
      "examples": [
        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      ]
    },
    "txTimestamp": {
      "type": "string",
      "format": "date-time",
      "description": "Transaction timestamp (ISO 8601)",
      "examples": [
        "2026-06-23T14:05:09Z"
      ]
    }
  }
}
```

### definition-7

`#/components/schemas/ValidationError`

```json
{
  "type": "object",
  "description": "Single validation error from the `validator` crate.",
  "properties": {
    "code": {
      "type": "string",
      "description": "Validation rule code (e.g. 'length', 'email', 'invalid_currency', 'disbursement_account_required').",
      "examples": [
        "length"
      ]
    },
    "message": {
      "type": [
        "string",
        "null"
      ],
      "description": "Human-readable message.",
      "examples": [
        "string"
      ]
    },
    "params": {
      "type": "object",
      "description": "Rule-specific parameters. Always includes `value` (the offending input). Additional keys depend on the rule (e.g. `min`, `max` for length).",
      "additionalProperties": true,
      "properties": {
        "value": {
          "description": "The submitted value that failed validation.",
          "examples": [
            "string"
          ]
        }
      }
    }
  },
  "required": [
    "code",
    "params"
  ]
}
```

### definition-8

`#/components/schemas/ValidationFieldErrors`

```json
{
  "description": "Recursive structure: either an array of ValidationError records (leaf field), an object keyed by nested field names (Struct variant), or an object keyed by array indices (List variant).",
  "anyOf": [
    {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      }
    },
    {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/ValidationFieldErrors"
      },
      "properties": {}
    }
  ]
}
```
