Returns the account receivables for the customer

​

Returns a paginated list of account receivables for the customer. The information can be filtered using the different parameters. Custom field filtering is supported using the custom_field_{field_name} parameter format.

Query Parameters

  • If present, filter by external ID

  • If present, filter by payee ID

  • If present, filter by payee name (case-insensitive partial match)

  • If present, filter by account receivable state(s). Repeat the parameter to pass more than one value (?state[]=pending&state[]=expired).

    values
    pendingexpiredpartially_reconciledreconciledarchived
  • If present, filter by account receivable type(s). Repeat the parameter to pass more than one value (?type[]=receivable&type[]=credit_note).

    values
    unknownreceivablecredit_notedebit_note
  • If present, filter by description (case-insensitive partial match)

  • If present, filter by amount greater than or equal to the given value

  • If present, filter by amount less than or equal to the given value

  • If present, filter by updated date greater than or equal to the given value

  • If present, filter by updated date less than or equal to the given value

  • If present, filter by inserted date greater than or equal to the given value

  • If present, filter by inserted date less than or equal to the given value

  • If present, filter by lower bound due date greater than or equal to the given value

  • If present, filter by upper bound due date less than or equal to the given value

  • If present, filter by tag codes. Repeat the parameter to pass more than one value (?tag_codes[]=payroll&tag_codes[]=utilities).

  • Filter by custom fields. Replace {field_name} with the actual custom field name. Only alphanumeric characters, underscores, and hyphens are allowed in field names. Example: custom_field_department=sales

  • Maximum number of account receivables to return per page (can't be greater than 1000). Defaults to 10 if not specified.

  • Current page to fetch (defaults to 1 if not specified)

Responses

  • application/json
  • text/plain
  • text/plain
Request Example for get/account_receivables
curl https://api.treasury.shinkansen.finance/v1/account_receivables \
  --header 'Shinkansen-Treasury-Api-Key: YOUR_SECRET_TOKEN'
{
  "account_receivables": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440001",
      "external_id": "AR-001",
      "payee_id": "12345678",
      "payee_id_schema": "CLID",
      "payee_name": "Test Payee",
      "amount": "1000.00",
      "unreconciled_amount": "500.00",
      "currency": "CLP",
      "description": "Test account receivable",
      "state": "pending",
      "type": "account_receivable",
      "lowerbound_due_date": "2024-12-31",
      "upperbound_due_date": "2025-01-31",
      "inserted_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z",
      "custom_fields": {
        "invoice_number": "INV-001",
        "department": "sales"
      },
      "entities": [
        {
          "amount": "500.00",
          "linked_amount": "500.00",
          "unreconciled_amount": "0.00",
          "currency": "CLP",
          "debtor_id": "12345678",
          "debtor_schema_name": "CLID",
          "debtor_name": "Test Debtor",
          "debtor_account": "1234567890",
          "debtor_account_type": "current_account",
          "debtor_account_schema_name": "SHINKANSEN",
          "debtor_account_schema_id": "BANCO_BICE_CL",
          "creditor_account": 987654321,
          "creditor_account_type": "current_account",
          "creditor_account_schema_name": "SHINKANSEN",
          "creditor_account_schema_id": "SCOTIABANK_CL",
          "execution_date": "2024-01-15T10:30:00Z",
          "lowerbound_execution_date": "2024-01-15",
          "upperbound_execution_date": "2024-01-15",
          "lowerbound_booking_date": "2024-01-15",
          "upperbound_booking_date": "2024-01-15",
          "description": "Payment for invoice INV-001",
          "created_by": "user@example.com",
          "state": "completed",
          "updated_at": "2024-01-15T10:30:00Z",
          "inserted_at": "2024-01-15T10:30:00Z"
        }
      ],
      "tags": [
        {
          "name": "High Priority",
          "code": "high_priority",
          "inserted_at": "2024-01-01T00:00:00Z",
          "updated_at": "2024-01-01T00:00:00Z"
        }
      ]
    }
  ],
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1
  }
}