---
title: "Search agreements by query params"
method: GET
path: "/v1/agreement"
tags: ["Agreements"]
---

# Search agreements by query params

`GET /v1/agreement`

## Query parameters

- `service_id` string[]
- `live` boolean
- `account_id` string[]
- `override_account_or_service_id_restriction` boolean
- `status` 'CREATED' | 'ACTIVE' | 'INACTIVE' | 'CANCELLED'
- `exact_reference_match` boolean
- `reference` string
- `page` integer
- `display_size` integer

## Response `200`

OK

- AgreementSearchResponse
  - `_links` PaginationBuilder
    - `first_page` PaginationLink
      - `href` string
    - `last_page` PaginationLink
      - `href` string
    - `next_page` PaginationLink
      - `href` string
    - `prev_page` PaginationLink
      - `href` string
    - `self` PaginationLink
      - `href` string
  - `count` integer
  - `page` integer
  - `results` Agreement[]
    - `cancelled_by_user_email` string
    - `cancelled_date` string, date-time
    - `created_date` string, date-time
    - `description` string
    - `external_id` string
    - `live` boolean
    - `payment_instrument` PaymentInstrument
      - `agreement_external_id` string
      - `card_details` CardDetails
        - `billing_address` Address
          - `city` string
          - `country` string
          - `county` string
          - `line1` string
          - `line2` string
          - `postcode` string
        - `card_brand` string
        - `card_type` 'CREDIT' | 'DEBIT'
        - `cardholder_name` string
        - `expiry_date` string
        - `first_digits_card_number` string
        - `last_digits_card_number` string
      - `created_date` string, date-time
      - `external_id` string
      - `type` 'CARD'
    - `reference` string
    - `service_id` string
    - `status` 'CREATED' | 'ACTIVE' | 'INACTIVE' | 'CANCELLED'
    - `user_identifier` string
  - `total` integer

## Other responses

- `404` — Not found

---

[API](https://skmtc.net/government-digital-service/apis/ledger-api.md) · [All operations](https://skmtc.net/government-digital-service/apis/ledger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/government-digital-service/ledger-api/versions/10ffeffca918/schema)
