API
Create SWIFT Counterparty
| Verb | POST |
| URL | https://api.s.unit.sh/counterparties |
| Data Type | swiftCounterparty |
| Timeout (Seconds) | 5 |
Attributes
| Name | Type | Description |
|---|---|---|
| type Required | string | Either Business or Person. |
| name Required | string | The account holder's name (individual or business). Up to 255 characters. |
| bic Required | string | BIC (SWIFT Bank Identifier Code) of the recipient's bank. 8 or 11 alphanumeric characters. |
| accountNumber Required | string | Recipient bank account number or IBAN (International Bank Account Number). 1-34 alphanumeric characters (uppercase letters and digits only). |
| country Required | string | ISO 3166-1 alpha-2 destination country code. |
| currency Required | string | ISO 4217 destination currency (e.g. EUR, GBP). |
| address Required | object | Recipient International address. country is required within the object. |
| email Optional | string | Recipient email address. |
| tags Optional | object | See Tags. |
| idempotencyKey Required | string | Unique key to prevent duplicate counterparties. |
Relationships
| Name | Type | Description |
|---|---|---|
| customer Required | Relationship | The Customer who owns this counterparty. |
Example Request:
curl -X POST 'https://api.s.unit.sh/counterparties'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "swiftCounterparty",
"attributes": {
"type": "Person",
"name": "Hans Mueller",
"bic": "COBADEFFXXX",
"accountNumber": "DE89370400440532013000",
"country": "DE",
"currency": "EUR",
"address": {
"country": "DE",
"street": "Friedrichstrasse 123",
"city": "Berlin",
"postalCode": "10117"
},
"tags": {
"label": "EU supplier"
},
"idempotencyKey": "eur-swift-cp-001"
},
"relationships": {
"customer": {
"data": {
"type": "businessCustomer",
"id": "1000"
}
}
}
}
}'
Response
Response is a JSON:API document.
201 Created
| Name | Type | Description |
|---|---|---|
| data | SWIFT Counterparty | The target resource after the operation was completed. |
Example Response:
{
"data": {
"type": "swiftCounterparty",
"id": "200",
"attributes": {
"type": "Person",
"name": "Hans Mueller",
"bic": "COBADEFFXXX",
"accountNumber": "DE89370400440532013000",
"country": "DE",
"currency": "EUR",
"address": {
"country": "DE",
"street": "Friedrichstrasse 123",
"city": "Berlin",
"postalCode": "10117"
},
"tags": {
"label": "EU supplier"
},
"createdAt": "2024-01-15T10:02:00.000Z",
"updatedAt": "2024-01-15T10:02:00.000Z"
},
"relationships": {
"customer": {
"data": {
"type": "businessCustomer",
"id": "1000"
}
}
}
}
}
Get Counterparty
Get an international counterparty by id.
| Verb | GET |
| URL | https://api.s.unit.sh/counterparties/{counterpartyId} |
| Timeout (Seconds) | 5 |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| include | string | (empty) | Optional. A comma-separated list of related resources to include in the response. Related resources include: customer. See Getting Related Resources |
Response
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| data | ACH Counterparty or SWIFT Counterparty | Counterparty resource. |
| included | Array of Customer | Array of resources requested by the include query parameter. |
curl -X GET 'https://api.s.unit.sh/counterparties/200' \
-H "Authorization: Bearer ${TOKEN}"
List Counterparties
List international counterparties. Filtering, paging and sorting can be applied.
| Verb | GET |
| URL | https://api.s.unit.sh/counterparties |
| Timeout (Seconds) | 5 |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| page[limit] | integer | 100 | Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination. |
| page[offset] | integer | 0 | Optional. Number of resources to skip. See Pagination. |
| filter[customerId] | string | (empty) | Optional. Filters the results by the specified customer id. |
| filter[type] | string | (empty) | Optional. Filter counterparties by type. Set to swiftCounterparty to list only SWIFT counterparties. |
| filter[tags] | Tags (JSON) | (empty) | Optional. Filter counterparties by Tags. |
| sort | string | sort=createdAt | Optional. sort=createdAt for ascending order or sort=-createdAt (leading minus sign) for descending order. |
Polymorphic response
Without filter[type], the data array can mix counterparty types: achCounterparty and swiftCounterparty.
curl -X GET 'https://api.s.unit.sh/counterparties?filter[type]=swiftCounterparty&page[limit]=100' \
-H "Authorization: Bearer ${TOKEN}"
Response
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| data | Array of SWIFT Counterparty | Array of counterparty resources. |
| meta | JSON object that contains pagination data | Pagination data includes offset, limit and total (estimated total items). |
Example Response:
{
"data": [
{
"type": "swiftCounterparty",
"id": "200",
"attributes": {
"type": "Person",
"name": "Hans Mueller",
"bic": "COBADEFFXXX",
"accountNumber": "DE89370400440532013000",
"country": "DE",
"currency": "EUR",
"address": {
"country": "DE",
"street": "Friedrichstrasse 123",
"city": "Berlin",
"postalCode": "10117"
},
"tags": {
"label": "EU supplier"
},
"createdAt": "2024-01-15T10:02:00.000Z",
"updatedAt": "2024-01-15T10:02:00.000Z"
},
"relationships": {
"customer": {
"data": {
"type": "businessCustomer",
"id": "1000"
}
}
}
}
],
"meta": {
"pagination": {
"total": 1,
"limit": 10,
"offset": 0
}
}
}
Create Quote
| Verb | POST |
| URL | https://api.s.unit.sh/quotes |
| Timeout (Seconds) | 5 |
Attributes
Relationships
Example Request:
curl -X POST 'https://api.s.unit.sh/quotes'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "quote",
"attributes": {
"idempotencyKey": "quote-001",
"destinationAmount": 10000
},
"relationships": {
"customer": {
"data": {
"type": "businessCustomer",
"id": "1000"
}
},
"counterparty": {
"data": {
"type": "swiftCounterparty",
"id": "200"
}
}
}
}
}'
Response
Response is a JSON:API document.
201 Created
| Name | Type | Description |
|---|---|---|
| data | Quote | The target resource after the operation was completed. |
Example Response:
{
"data": {
"type": "quote",
"id": "300",
"attributes": {
"status": "New",
"sourceCurrency": "USD",
"destinationCurrency": "EUR",
"destinationAmount": 10000,
"exchangeRate": "1.085",
"sourceAmount": 10850,
"feeAmount": 1750,
"totalAmount": 12600,
"expiresAt": "2024-01-15T10:20:00.000Z",
"createdAt": "2024-01-15T10:05:00.000Z"
},
"relationships": {
"counterparty": {
"data": {
"type": "swiftCounterparty",
"id": "200"
}
},
"customer": {
"data": {
"type": "businessCustomer",
"id": "1000"
}
}
}
}
}
Get Quote
| Verb | GET |
| URL | https://api.s.unit.sh/quotes/{quoteId} |
| Timeout (Seconds) | 5 |
curl -X GET 'https://api.s.unit.sh/quotes/300' \
-H "Authorization: Bearer ${TOKEN}"
Response
Example Response:
{
"data": {
"type": "quote",
"id": "300",
"attributes": {
"status": "New",
"sourceCurrency": "USD",
"destinationCurrency": "EUR",
"destinationAmount": 10000,
"exchangeRate": "1.085",
"sourceAmount": 10850,
"feeAmount": 1750,
"totalAmount": 12600,
"expiresAt": "2024-01-15T10:20:00.000Z",
"createdAt": "2024-01-15T10:05:00.000Z"
},
"relationships": {
"counterparty": {
"data": {
"type": "swiftCounterparty",
"id": "200"
}
},
"customer": {
"data": {
"type": "businessCustomer",
"id": "1000"
}
}
}
}
}
Create International Payment
| Verb | POST |
| URL | https://api.s.unit.sh/payments |
| Data Type | internationalPayment |
| Timeout (Seconds) | 5 |
Attributes
| Name | Type | Description |
|---|---|---|
| purpose Required | string | The purpose of the payment. See International Payment Purpose Code for supported values. |
| sourceOfFunds Required | string | Describes the origin of the funds. One of Salary, PersonalSavings, PersonalWealth, RetirementFunds, BusinessOwner, LoanFacility, PersonalAccount, CorporateAccount. |
| description Optional | string | Payment description (maximum of 255 characters). |
| tags Optional | object | See Tags. |
| idempotencyKey Required | string | Unique key to prevent duplicate payments. |
Relationships
Example Request:
curl -X POST 'https://api.s.unit.sh/payments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "internationalPayment",
"attributes": {
"purpose": "Travel",
"sourceOfFunds": "PersonalSavings",
"description": "Travel expenses for trip to Berlin",
"idempotencyKey": "international-payment-001"
},
"relationships": {
"quote": {
"data": {
"type": "quote",
"id": "300"
}
},
"account": {
"data": {
"type": "depositAccount",
"id": "5000"
}
}
}
}
}'
Response
Response is a JSON:API document.
201 Created
| Name | Type | Description |
|---|---|---|
| data | International Payment | The target resource after the operation was completed. |
Example Response:
{
"data": {
"type": "internationalPayment",
"id": "400",
"attributes": {
"status": "Pending",
"direction": "Credit",
"sourceAmount": 10850,
"sourceCurrency": "USD",
"destinationAmount": 10000,
"destinationCurrency": "EUR",
"destinationCountry": "DE",
"purpose": "Travel",
"sourceOfFunds": "PersonalSavings",
"description": "Travel expenses for trip to Berlin",
"createdAt": "2024-01-15T10:10:00.000Z",
"updatedAt": "2024-01-15T10:10:00.000Z"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "5000"
}
},
"counterparty": {
"data": {
"type": "swiftCounterparty",
"id": "200"
}
},
"quote": {
"data": {
"type": "quote",
"id": "300"
}
},
"customers": {
"data": [
{
"type": "businessCustomer",
"id": "1000"
}
]
},
"transaction": {
"data": {
"type": "originatedInternationalTransaction",
"id": "6001"
}
}
}
}
}
Get Payment
Get an international payment by id.
| Verb | GET |
| URL | https://api.s.unit.sh/payments/{paymentId} |
| Timeout (Seconds) | 5 |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| include | string | (empty) | Optional. A comma-separated list of related resources to include in the response. Related resources include: customers, account, quote, counterparty, transaction. See Getting Related Resources |
Response
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| data | One of the following types (ACH Payment, Book Payment, International Payment, Realtime Payment, or Wire Payment) | Payment resource. |
| included | Array of DepositAccount, Customer, Quote, SWIFT Counterparty, or Transaction | Array of resources requested by the include query parameter. |
curl -X GET 'https://api.s.unit.sh/payments/400' \
-H "Authorization: Bearer ${TOKEN}"
List Payments
List international payments. Filtering, paging and sorting can be applied.
| Verb | GET |
| URL | https://api.s.unit.sh/payments |
| Timeout (Seconds) | 5 |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| page[limit] | integer | 100 | Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination. |
| page[offset] | integer | 0 | Optional. Number of resources to skip. See Pagination. |
| filter[accountId] | string | (empty) | Optional. Filters the results by the specified account id. |
| filter[customerId] | string | (empty) | Optional. Filters the results by the specified customer id. |
| filter[status][] | string | (empty) | Optional. Filter payments by status. Valid values: Pending, PendingReview, Sent, Rejected, Returned. Usage example: filter[status][0]=Sent |
| filter[type][] | string | (empty) | Optional. Filter payments by type. Valid values: Ach, Book, Wire, Realtime, International. Usage example: filter[type][0]=International |
| filter[since] | RFC3339 Date string | (empty) | Optional. Filters payments created after the specified date. e.g. 2026-01-13T16:01:19.346Z |
| filter[until] | RFC3339 Date string | (empty) | Optional. Filters payments created before the specified date. e.g. 2026-02-02T20:06:23.486Z |
| sort | string | sort=-createdAt | Optional. Leave empty or provide sort=createdAt for ascending order. Provide sort=-createdAt (leading minus sign) for descending order. |
curl -X GET 'https://api.s.unit.sh/payments?filter[type][]=International&page[limit]=100' \
-H "Authorization: Bearer ${TOKEN}"
Response
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| data | Array of Payments (one of ACH Payment, Book Payment, International Payment, Realtime Payment, or Wire Payment) | Array of payment resources. |
| meta | JSON object that contains pagination data | Pagination data includes offset, limit and total (estimated total items). |
Example Response:
{
"data": [
{
"type": "internationalPayment",
"id": "400",
"attributes": {
"status": "Pending",
"direction": "Credit",
"sourceAmount": 10850,
"sourceCurrency": "USD",
"destinationAmount": 10000,
"destinationCurrency": "EUR",
"destinationCountry": "DE",
"purpose": "Travel",
"sourceOfFunds": "PersonalSavings",
"description": "Travel expenses for trip to Berlin",
"createdAt": "2024-01-15T10:10:00.000Z",
"updatedAt": "2024-01-15T10:10:00.000Z"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "5000"
}
},
"counterparty": {
"data": {
"type": "swiftCounterparty",
"id": "200"
}
},
"quote": {
"data": {
"type": "quote",
"id": "300"
}
},
"customers": {
"data": [
{
"type": "businessCustomer",
"id": "1000"
}
]
},
"transaction": {
"data": {
"type": "originatedInternationalTransaction",
"id": "6001"
}
}
}
}
],
"meta": {
"pagination": {
"total": 1,
"limit": 10,
"offset": 0
}
}
}
Update Payment
Update an International Payment.
| Verb | PATCH |
| URL | https://api.s.unit.sh/payments/:paymentId |
| Timeout (Seconds) | 5 |
Attributes
| Name | Type | Description |
|---|---|---|
| tags Required | object | See Updating Tags. |
Update an international payment:
curl -X PATCH 'https://api.s.unit.sh/payments/:paymentId'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "internationalPayment",
"attributes": {
"tags": {
"by": null,
"uuid": "83033b64-38f8-4dbc-91a1-313ff0156d02"
}
}
}
}'
Response
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| data | International Payment | The updated international payment resource. |