Skip to main content
POST
/
v1
/
counterparties
Register a counterparty
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    legalName: '<string>',
    displayName: '<string>',
    jurisdiction: '<string>',
    defaultCurrency: '<string>',
    taxId: '<string>',
    taxWithholdingRate: '<string>',
    ledgerAccountCode: '<string>',
    tags: ['<string>'],
    active: true
  })
};

fetch('https://sandbox.api.enfinitos.com/v1/counterparties', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "ok": true,
  "data": {
    "counterparty": {
      "id": "<string>",
      "orgId": "<string>",
      "legalName": "<string>",
      "displayName": "<string>",
      "jurisdiction": "<string>",
      "taxId": "<string>",
      "defaultCurrency": "<string>",
      "taxWithholdingRate": "<string>",
      "ledgerAccountCode": "<string>",
      "tags": [
        "<string>"
      ],
      "active": true,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  },
  "contractVersion": "<string>"
}

Authorizations

Authorization
string
header
required

API key sent as Authorization: Bearer <api-key>.

Body

application/json
kind
enum<string>
required
Available options:
VENUE,
CUSTOMER,
AGENCY,
AFFILIATE,
RESELLER,
TAX_AUTHORITY
taxTreatment
enum<string>
required
Available options:
STANDARD_VAT,
ZERO_RATED,
EXEMPT,
REVERSE_CHARGE,
NON_VAT_JURISDICTION
displayName
string
required
jurisdiction
string
required

ISO 3166-1 alpha-2 country code (upper-cased).

defaultCurrency
string
required

ISO 4217 currency code (upper-cased).

taxId
string | null
taxWithholdingRate
string | null

Decimal string, e.g. "0.15".

ledgerAccountCode
string | null
tags
string[]
active
boolean
default:true

Response

The created counterparty.

ok
boolean
required
data
object
required

Route-specific payload. Operation responses refine this.

contractVersion
string
required
Allowed value: "v1.0"