Patch

PATCH /participants/customers/:participantCode

const patchParticipantCustomer = () => {
  const body = {
    first_name: "Gaurav",
    last_name: "Mehta",
    address_one: "Near CST",
    address_two: "Fort Area",
    country: "Mumbai",
    state: "MH",
    city: "Mumbai",
    zip: "12345",
    email: "gewgawarv@gmail.com",
    id_number_type: "Passport",
    id_number: "123456789",
    platform_updated_at: 1603378501286
  }
  const timestamp = Math.round(Date.now() / 1000)
  const payload = timestamp + 'PATCH' + '/participants/customers/XXXXXX' + JSON.stringify(body)
  const decodedSecret = Buffer.from(apiSecret, 'base64')
  const hmac = crypto.createHmac('sha256', decodedSecret)
  const signedPayload = hmac.update(payload).digest('base64')

  // SET HEADERS
  const headers = {
    'X-NDAX-API-KEY': 'public_key',
    'X-NDAX-SIGNED': signedPayload,
    'X-NDAX-TIMESTAMP': timestamp,
    'X-NDAX-PASSPHRASE': 'passphrase'
  }
  const options = {
    headers,
    body,
    json: true
  }

  return request.post(
    `https://api.ndax.in/participants/customers/XXXXXX`,
    options
  )
}

Sample Request

{
  "request_id": "7fbab765-4579-4349-845b-945655c85",
   first_name: "Gaurav",
    last_name: "Mehta",
    address_one: "Near CST",
    address_two: "Fort Area",
    country: "Mumbai",
    state: "MH",
    city: "Mumbai",
    zip: "12345",
    email: "gewgawarv@gmail.com",
    id_number_type: "Passport",
    "platform_updated_at": 13453453534
}

Sample Response

{
  "message": {
    "first_name": "Gaurav",
    "last_name": "Mehta",
    "address_one": "Shivaji Nagar",
    "address_two": "Fort",
    "country": "India",
    "state": "CG",
    "city": "Mumbai",
    "zip": "450001",
    "email": "email-example@mail.com",
    "date_of_birth": "1994-00-13",
    "id_number_type": "aadhar_card",
    "id_number": "1731417314",
    "non_us_other_type": "",
    "id_issuing_authority": "",
    "signed_timestamp": 1603378501287,
    "risk_rating": "",
    "platform_code": "ABC123",
    "participant_code": "XYZ456",
    "platform_updated_at": 1603378501286
  }
}

This endpoint is only available to certain participants leveraging NDAX for customer settlements. Please contact us for more information on enabling this endpoint.

This endpoint enables you to update information that’s been validated with your customers. When making certain updates, groups of data must be sent together. If the data is not represented below, it’s not updatable. You can update more than one group of data at one time.

Request body:

ParameterDescriptionType

platform_updated_at

The UNIX timestamp in milliseconds of when your customer updated their information with you and you approved that update. Only one timestamp should be sent per call (i.e. if you update name and address at the same time, there should be one timestamp, not one timestamp for name and one timestamp for address)

number

first_name

The first name of the customer, required

string

last_name

The last name of the customer, required

string

address_one

First line for the customer's address, required Note: PO Box addresses are not accepted

string

address_two

First line for the customer's address, if applicable, optional

string

country

The country the customer resides in, required Note: must be one of the supported countries

string

state

The state the customer resides in, required if country is "United States" Note: must be one of the supported states

string

city

The city customer resides in, required

string

zip

Zip code of the customer in the format<5digits> or <5digits>-<4digits>, e.g. 77777 or 77777-7777, required if country is "India"

string

email

Customer email address, required Note: NDAX will validate that the email is a correctly formatted email, and that the value is unique per-platform

string

id_number_type

The type of ID document provided, required Note: must be one of the supported ID types

string

id_number

The ID number of the customer, required

string

Additional fields in response:

ParameterDescriptionType

platform_code

The unique identifier for the Platform onto which the customer has been created

string

participant_code

The NDAX identifier for the new customer Note: this value is key to enable you to submit trades and check account balances for this customer

string

platform_updated_at

The timestamp of when a customer updated their information with your platform

number

Possible Responses:

Status CodeDescription

200 OK

The customer was successfully created. Note: the request is idempotent only IF therequest_id and payload is the same as previously submitted

400 Bad Request

The request is invalid, OR the payload is the*same* as a previously submitted request, but the request_id is different, OR, the request_id is the same as a previously submitted request, but the payload is different

Last updated