---
title: "Create contract"
method: POST
path: "/rest/contracts"
tags: ["Contracts"]
---

# Create contract

`POST /rest/contracts`

Create a new contract based on a given set of transactions.

## Parameters

- `#/paths/~1auth~1user/post/parameters/0` — unresolved $ref

## Request body

- object
  - `payment_frequency` PaymentFrequency, required — unresolved $ref
  - `transaction_ids` Schema[], required — The transactions which should be part of the new contract. **Limitations:** * Currently **only one** transaction can be provided. * The transactions must not already be associated with another contract. — unresolved $ref

## Response `201`

Contract details.

- object
  - `id` Schema, required — unresolved $ref
  - `account_id` Schema, required — unresolved $ref
  - `is_active` boolean, required — Status of the contract. A contract is considered active if at least one corresponding payment has been observed in the last two payment periods.
  - `payment_frequency` PaymentFrequency, required — unresolved $ref
  - `payment_partner` object, required
    - `id` string, UUID, required — Payment partner ID.
    - `name` string, required — Name of payment partner.
    - `website_url` string, url — The HTTP URL of the partners website
    - `logo_url` string, url — The HTTP URL of the partners logo
    - `latitude` number, float — Latitude of the partners physical location. If the partner is an online retailer i.e. Amazon - then the field is not provided
    - `longitude` number, float — Longitude of the partners physical location. If the partner is an online retailer i.e. Amazon - then the field is not provided
  - `categories` Items[], required — Categories attached to the contract. — unresolved $ref
  - `is_recognized` boolean, required — Indicates if the contract has been automatically derived from the transaction history. All [user provided contracts](/reference/createcontract) initially have a value of `false`.
  - `transactions` object, required — Transaction statistics for this contract.
    - `href` string, uri, required — A link to the list of transactions issued in the scope of this contract.
    - `count` integer, required — Number of transactions of this contract.
    - `total` number, float, required — Total amount of transactions of this contract.
    - `average` number, float, required — Average amount transferred per payment.
    - `currency` Currency, required — unresolved $ref
  - `last_paid_at` EndedAt, required — unresolved $ref
  - `modified_at` string, date-time, required — Entity modification timestamp.
  - `created_at` CreatedAt, required — unresolved $ref

## Other responses

- `400` — unresolved $ref
- `401` — unresolved $ref
- `4XX` — unresolved $ref

---

[API](https://skmtc.net/qwist/apis/finx-api.md) · [All operations](https://skmtc.net/qwist/apis/finx-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qwist/finx-api/revisions/b75f5c1aa39e/schema)
