Skip to main content
POST
/
counterparties
Create a counterparty
curl --request POST \
  --url http://localhost:3015/counterparties \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "Acme Corporation",
  "status": "active",
  "attributes": [
    {
      "attributeDefinitionId": "ff093e5d-39af-4cf6-8920-c07c9e3f5921",
      "value": "value1"
    }
  ]
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Acme Corporation",
  "status": "active",
  "logoUrl": "https://example.com/logo.png",
  "fields": {
    "ff093e5d-39af-4cf6-8920-c07c9e3f5921": "value1"
  },
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-02T00:00:00.000Z"
}

Authorizations

x-api-key
string
header
required

API key for authentication. Get your key at https://app.tomorro.com/settings/api

Body

application/json
name
string
required

Name of the counterparty (company or individual name)

Example:

"Acme Corporation"

status
enum<string>
default:active

Status of the counterparty

Available options:
active,
archived
Example:

"active"

attributes
object[]

Custom attributes for the counterparty

Example:
[
{
"attributeDefinitionId": "ff093e5d-39af-4cf6-8920-c07c9e3f5921",
"value": "value1"
}
]

Response

Counterparty created successfully

id
string
required

Unique identifier for the counterparty

Example:

"550e8400-e29b-41d4-a716-446655440000"

name
string
required

Name of the counterparty (company or individual name)

Example:

"Acme Corporation"

status
enum<string>
required

Current status of the counterparty

Available options:
active,
archived
Example:

"active"

logoUrl
object
required

URL of the counterparty logo

Example:

"https://example.com/logo.png"

fields
object
required

Custom field values for the counterparty

Example:
{
"ff093e5d-39af-4cf6-8920-c07c9e3f5921": "value1"
}
createdAt
string<date-time>
required

Time at which the counterparty was created. Formatted as an ISO 8601 date-time string.

Example:

"2024-01-01T00:00:00.000Z"

updatedAt
string<date-time>
required

Time at which the counterparty was last updated. Formatted as an ISO 8601 date-time string.

Example:

"2024-01-02T00:00:00.000Z"