Edit party

This endpoint allows you to update the details of a specific party and user within an escrow service.

Edit party

PATCH v2/escrow/party/edit/:transaction_party_id/:user_id

Params

NameStringDescriptions

transaction_partiy_id

String

The ID of the transaction party to be edited

user_id

String

The ID of the user

Headers

NameTypeDescription

Accept*

string

application/json

V-PRIVATE-KEY*

string

your vesicash private key

V-PUBLIC-KEY*

String

your vesicash public key

Request body

The request should include a JSON payload with the following parameters:

  • email (string): The email address of the party.

  • first_name (string): The first name of the party.

  • last_name (string): The last name of the party.

  • phone (string): The phone number of the party.

  • is_initiator (boolean): Indicates whether the party is an initiator.

  • role_description (string): Description of the role of the party.

  • bank_account (object): An object containing bank account details including:

    • bank_name (string): The name of the bank.

    • bank_code (string): The bank code.

    • account_number (string): The account number.

    • account_name (string): The name associated with the account.

{
    "email": "user@email.com",
    "first_name": "Ade",
    "last_name": "Tolu",
    "phone": "+2349043956435",
    "is_initiator": false,
    "role_description": "service seller",
    "bank_account": {
        "bank_name": "Vesicash",
        "bank_code": "VE000",
        "account_number": "{{account_id}}",
        "account_name": "Chi H"
    }
}

Response

Upon successful execution, the endpoint returns a status code of 200 and a JSON response with the following structure:

{
    "status": "success",
    "code": 200,
    "message": "success",
    "data": {
        "bank_account": {
            "account_name": "Chi H",
            "account_number": "1234567890",
            "bank_code": "VE000",
            "bank_name": "Vesicash"
        },
        "created_at": "2024-07-15T14:00:22.711256Z",
        "email": "ade10@inboxkitten.com",
        "first_name": "Ade",
        "has_accepted": true,
        "id": 264,
        "is_initiator": false,
        "last_name": "Tolu",
        "percentage": 0,
        "phone": "+2349043956435",
        "role": "buyer",
        "role_description": "service seller",
        "transaction_id": "tr50fa18ad05e647b8b910",
        "transaction_party_id": "a97abd76ff8745e3b7b0",
        "updated_at": "2024-07-15T14:38:25.08535343Z",
        "user_id": "9226511842"
    }
}

For example, you can make a PATCH request to the endpoint above and pass in the raw json data below to edit party.

{
    "email": "ade10@inboxkitten.com",
    "first_name": "Ade",
    "last_name": "Tolu",
    "phone": "+2349043956435",
    "is_initiator": false,
    "role_description": "service seller",
    "bank_account": {
        "bank_name": "Vesicash",
        "bank_code": "VE000",
        "account_number": "",
        "account_name": "Chi H"
    }
}

Last updated