Skip to main content
PUT
/
customers
/
{customerId}
Update Customer
curl --request PUT \
  --url https://www.withvayu.org/customers/{customerId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "aliases": [],
  "contacts": [
    {
      "name": "<string>",
      "email": "[email protected]",
      "title": "<string>",
      "phone": "<string>",
      "receiveInvoiceEmail": true
    }
  ],
  "source": "Stripe",
  "taxId": "<string>",
  "externalId": "<string>",
  "customerErpId": "<string>",
  "address": {
    "country": "<string>",
    "city": "<string>",
    "addressText": "<string>",
    "state": "<string>",
    "postalCode": "<string>"
  },
  "salesForceAccountId": "<string>",
  "dueDays": "END_OF_MONTH",
  "customFields": [
    {
      "vayuCustomFieldName": "<string>",
      "valueType": "String",
      "integrationSource": "NetSuite",
      "integrationEntityType": "<string>",
      "fieldPath": "<string>",
      "value": "<unknown>"
    }
  ]
}
'
{
  "customer": {
    "name": "<string>",
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "aliases": [],
    "contacts": [
      {
        "name": "<string>",
        "email": "[email protected]",
        "title": "<string>",
        "phone": "<string>",
        "receiveInvoiceEmail": true
      }
    ],
    "source": "Stripe",
    "taxId": "<string>",
    "externalId": "<string>",
    "customerErpId": "<string>",
    "address": {
      "country": "<string>",
      "city": "<string>",
      "addressText": "<string>",
      "state": "<string>",
      "postalCode": "<string>"
    },
    "salesForceAccountId": "<string>",
    "dueDays": "END_OF_MONTH",
    "customFields": [
      {
        "vayuCustomFieldName": "<string>",
        "valueType": "String",
        "integrationSource": "NetSuite",
        "integrationEntityType": "<string>",
        "fieldPath": "<string>",
        "value": "<unknown>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

customerId
string
required

Body

application/json
name
string

The name of the customer

aliases
string[] | null

The aliases of the customer used to match events to the customer.

contacts
object[] | null

The contacts of the customer. Contact marked as primary is the target for invoice sharing.

source
enum<string> | null

The source of the customer

Available options:
Stripe,
VayuEventsApi,
Api,
Salesforce,
HubSpot
taxId
string | null

The tax ID of the customer

externalId
string

The external ID of the customer

customerErpId
string | null

The ID of the customer in the ERP system

address
object

The address of the customer

salesForceAccountId
string | null

The ID of the customer in the Salesforce system

dueDays
enum<string> | null

The due days of the customer

Available options:
END_OF_MONTH,
SAME_DAY,
15_DAYS,
30_DAYS,
45_DAYS,
60_DAYS,
90_DAYS
customFields
object[] | null

Custom fields from CRM systems (Salesforce, HubSpot, etc.)

Response

RequestSuccess

customer
object
required