Skip to main content
PATCH
/
v1
/
customers
/
{id}
Update Customer
curl --request PATCH \
  --url https://api.withflex.com/v1/customers/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "joh.doe@example.com",
    "phone": "+15555555555",
    "employer": "Flex",
    "shipping": {
      "line1": "123 Main St",
      "line2": "Suite 100",
      "city": "San Francisco",
      "state": "CA",
      "postal_code": "94107",
      "country": "US"
    },
    "metadata": "{\"key\": \"value\"}"
  }
}
'
{
  "customer": {
    "customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
    "first_name": "John",
    "last_name": "Doe",
    "email": "joh.doe@example.com",
    "phone": "+15555555555",
    "employer": "Flex",
    "shipping": {
      "shipping_address_id": "obj_01EXAMPLE00000000000000000",
      "line1": "123 Main St",
      "line2": "Suite 100",
      "city": "San Francisco",
      "state": "CA",
      "postal_code": "94107",
      "country": "US"
    },
    "metadata": {},
    "created_at": "2024-01-01T00:00:00Z",
    "test_mode": false
  }
}

Authorizations

Authorization
string
header
required

Use a Bearer token to access this API.

Path Parameters

id
string
required
Example:

"obj_01EXAMPLE00000000000000000"

Body

application/json
customer
object
required
Example:
{
  "first_name": "John",
  "last_name": "Doe",
  "email": "joh.doe@example.com",
  "phone": "+15555555555",
  "employer": "Flex",
  "shipping": {
    "line1": "123 Main St",
    "line2": "Suite 100",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94107",
    "country": "US"
  },
  "metadata": "{\"key\": \"value\"}"
}

Response

Success

customer
object
required
Example:
{
  "customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
  "first_name": "John",
  "last_name": "Doe",
  "email": "joh.doe@example.com",
  "phone": "+15555555555",
  "employer": "Flex",
  "shipping": {
    "shipping_address_id": "obj_01EXAMPLE00000000000000000",
    "line1": "123 Main St",
    "line2": "Suite 100",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94107",
    "country": "US"
  },
  "metadata": {},
  "created_at": "2024-01-01T00:00:00Z",
  "test_mode": false
}