Skip to main content
PUT
/
v1
/
customers
/
{customerId}
Update a customer
curl --request PUT \
  --url https://api-eu.flexportal.io/v1/customers/{customerId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Tenant-ID: <tenant-id>' \
  --data '
{
  "customerId": "<string>",
  "firstName": "<string>",
  "lastName": "<string>",
  "company": "<string>",
  "phone": "<string>",
  "customerType": "individual",
  "status": "active",
  "billingAddress": {
    "contactName": "<string>",
    "streetAddress": "<string>",
    "city": "<string>",
    "country": "<string>",
    "company": "<string>",
    "buildingInfo": "<string>",
    "locality": "<string>",
    "adminArea": "<string>",
    "postalCode": "<string>"
  },
  "shippingAddress": {
    "contactName": "<string>",
    "streetAddress": "<string>",
    "city": "<string>",
    "country": "<string>",
    "company": "<string>",
    "buildingInfo": "<string>",
    "locality": "<string>",
    "adminArea": "<string>",
    "postalCode": "<string>"
  }
}
'
{
  "success": true,
  "message": "<string>",
  "customerId": "<string>",
  "customer": {
    "customerId": "<string>",
    "tenantId": "<string>",
    "email": "<string>",
    "firstName": "<string>",
    "lastName": "<string>",
    "customerType": "individual",
    "totalOrders": 123,
    "totalDevicesRented": 123,
    "totalMonthlyRevenue": 123,
    "status": "active",
    "orderIds": [
      "<string>"
    ],
    "rentalIds": [
      "<string>"
    ],
    "createdBy": "<string>",
    "company": "<string>",
    "phone": "<string>",
    "customFields": {},
    "lastBillingAddress": {
      "contactName": "<string>",
      "streetAddress": "<string>",
      "city": "<string>",
      "country": "<string>",
      "company": "<string>",
      "buildingInfo": "<string>",
      "locality": "<string>",
      "adminArea": "<string>",
      "postalCode": "<string>"
    },
    "lastShippingAddress": {
      "contactName": "<string>",
      "streetAddress": "<string>",
      "city": "<string>",
      "country": "<string>",
      "company": "<string>",
      "buildingInfo": "<string>",
      "locality": "<string>",
      "adminArea": "<string>",
      "postalCode": "<string>"
    },
    "createdAt": "<unknown>",
    "updatedAt": "<unknown>"
  }
}

Authorizations

Authorization
string
header
required

API key obtained from FlexPortal dashboard

Headers

Tenant-ID
string
required

Your tenant identifier

Path Parameters

customerId
string
required

The customer ID

Body

application/json
customerId
string
required
Minimum string length: 1
firstName
string
Minimum string length: 1
lastName
string
Minimum string length: 1
company
string
phone
string
customerType
enum<string>
Available options:
individual,
business
status
enum<string>
Available options:
active,
inactive
billingAddress
object
shippingAddress
object

Response

Customer updated

success
enum<boolean>
required
Available options:
true,
false
message
string
required
customerId
string
required
customer
object
required