Create New Counterparty
POST /api/v1/Counterparties/save
Description
This endpoint is used to create a new counterparty.
Headers:
- None
ApiKey:
- No API key required
Content-Type:
-
text/plain
-
application/json
-
text/json
Query Parameters:
- version: string, required
Request Body:
- CreateCounterpartyRequest object.
URL:
{{baseUrl API url}}/api/v1/Counterparties/save
Response:
- A CounterpartyResponseResponse object.
Error Codes:
-
400: Bad Request
-
404: Resource not found
-
500: Internal server error
Example:
Request:
POST /api/v1/Counterparties/save
Content-Type: application/json
{
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
Response:
HTTP/1.1 200 OK
{
"counterpartyId": "1234567890",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
Method: POST
/api/v1/Counterparties/save
Headers
| Content-Type | Value |
|---|---|
Content-Type | application/json |
Headers
| Content-Type | Value |
|---|---|
| Accept | text/plain |
Body (raw)
{
"name": "<string>",
"email": "<string>",
"address": "<string>",
"lei": "<string>",
"country": "<string>",
"phoneCode": "<string>",
"phoneNumber": "<string>",
"state": "<string>",
"city": "<string>",
"postalCode": "<string>",
"bankAccounts": [
{
"counterpartyId": "<uuid>",
"account": 2,
"counterpartyType": 1,
"accountType": 2,
"bankCode": "<string>",
"bankName": "<string>",
"accountNumber": "<string>",
"accountName": "<string>",
"iban": "<string>",
"swiftCode": "<string>",
"bankAddress": "<string>",
"routingNumber": "<string>"
},
{
"counterpartyId": "<uuid>",
"account": 4,
"counterpartyType": 2,
"accountType": 1,
"bankCode": "<string>",
"bankName": "<string>",
"accountNumber": "<string>",
"accountName": "<string>",
"iban": "<string>",
"swiftCode": "<string>",
"bankAddress": "<string>",
"routingNumber": "<string>"
}
]
}
Response: 200
{
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": {
"id": "<uuid>",
"userId": "<uuid>",
"name": "<string>",
"email": "<string>",
"address": "<string>",
"lei": "<string>",
"country": "<string>",
"phoneCode": "<string>",
"phoneNumber": "<string>",
"state": "<string>",
"city": "<string>",
"postalCode": "<string>",
"merchantId": "<uuid>"
}
}
LANGUAGE
CURL REQUEST
curl --request POST \
--url /api/v1/Counterparties/save \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!