PATCH
/
v1
/
members
/
{id}
cURL
curl --request PATCH \
  --url https://api.onsi.com/v1/members/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "email": "jsmith@example.com",
  "firstName": "<string>",
  "lastName": "<string>",
  "phone": "<string>",
  "workerId": "ID_123",
  "tier": "<string>",
  "accountDetails": {
    "accountHolder": "John Smith",
    "sortCode": "123456",
    "accountNumber": "12345678"
  },
  "enablePayroll": true,
  "dob": "1990-01-01",
  "gender": "Female"
}'
{
  "email": "jsmith@example.com",
  "memberId": "mem_q5sdae3se6eg9m9dcvug",
  "firstName": "John",
  "lastName": "Smith",
  "phone": "+447123456789",
  "tier": "Gold",
  "workerId": "ID_123",
  "status": "active",
  "accountDetails": {
    "accountHolder": "John Smith",
    "sortCode": "123456",
    "accountNumber": "12345678"
  },
  "enablePayroll": true,
  "gender": "Female",
  "dob": "1990-01-01"
}
Updates an existing member, identified by their memberId.

Relevant Error Codes

If there are any issues with the update, the API will return a 400 status code with the following error codes:

Authorizations

x-api-key
string
header
required

Headers

x-idempotency-key
string

Unique key to ensure idempotency of the request

Path Parameters

id
string
required

The unique identifier for a Member, prefixed with mem_

Example:

"mem_<id>"

Body

application/json

Body

email
string<email>

This can only be changed if member status is invited

firstName
string

First name of the member

lastName
string

Last name of the member

phone
string

Phone number

workerId
string | null

Unique ID provided by API consumer, must be unique across all members (active, invited and inactive)

Example:

"ID_123"

tier
string

Tier name

accountDetails
object

A UK bank account

Example:
{
"accountHolder": "John Smith",
"sortCode": "123456",
"accountNumber": "12345678"
}
enablePayroll
boolean
dob
string

Date of birth of the member, must later than 1900

Example:

"1990-01-01"

gender
enum<string> | null

Gender of the member

Available options:
Female,
Male,
NonBinary

Response

200 - application/json

A member on the platform.

email
string<email>
required
memberId
string
required

Onsi's ID of the member

Example:

"mem_q5sdae3se6eg9m9dcvug"

firstName
string
required
Example:

"John"

lastName
string
required
Example:

"Smith"

phone
string | null
required
Example:

"+447123456789"

tier
string
required

Tier name for the member

Example:

"Gold"

workerId
string | null
required

Unique ID provided by API consumer, must be unique across all members (active, invited and inactive)

Example:

"ID_123"

status
enum<string>
required

The status of the member.

Available options:
active,
invited,
inactive
accountDetails
object
required

A UK bank account

Example:
{
"accountHolder": "John Smith",
"sortCode": "123456",
"accountNumber": "12345678"
}
enablePayroll
boolean
required
Example:

true

dob
string | null
required

Date of birth of the member, must later than 1900 Date in ISO8601 YYYY-MM-DD format

Example:

"1990-01-01"

gender
enum<string> | null

Gender of the member

Available options:
Female,
Male,
NonBinary