Skip to main content
POST
/
customers
Create Customer
curl --request POST \
  --url https://connect.withvayu.com/customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "aliases": [],
  "contacts": [
    {
      "name": "<string>",
      "email": "jsmith@example.com",
      "title": "<string>",
      "phone": "<string>",
      "receiveInvoiceEmail": true
    }
  ],
  "source": "Stripe",
  "legalName": "<string>",
  "taxId": "<string>",
  "cloudProviderSettings": {
    "cloudProvider": "AWS",
    "cloudProviderMarketplaceId": "<string>",
    "marketplaceAccountId": "<string>"
  },
  "externalId": "<string>",
  "customerErpId": "<string>",
  "address": {
    "country": "<string>",
    "city": "<string>",
    "addressText": "<string>",
    "state": "<string>",
    "postalCode": "<string>"
  },
  "salesForceAccountId": "<string>",
  "dueDays": "END_OF_MONTH",
  "currency": "USD",
  "customFields": [
    {
      "vayuCustomFieldName": "<string>",
      "valueType": "String",
      "integrationSource": "NetSuite",
      "integrationEntityType": "<string>",
      "fieldPath": "<string>",
      "value": "<unknown>"
    }
  ],
  "subsidiary": "<string>"
}
'
{
  "customer": {
    "name": "<string>",
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "aliases": [],
    "contacts": [
      {
        "name": "<string>",
        "email": "jsmith@example.com",
        "title": "<string>",
        "phone": "<string>",
        "receiveInvoiceEmail": true
      }
    ],
    "source": "Stripe",
    "legalName": "<string>",
    "taxId": "<string>",
    "cloudProviderSettings": {
      "cloudProvider": "AWS",
      "cloudProviderMarketplaceId": "<string>",
      "marketplaceAccountId": "<string>"
    },
    "externalId": "<string>",
    "customerErpId": "<string>",
    "address": {
      "country": "<string>",
      "city": "<string>",
      "addressText": "<string>",
      "state": "<string>",
      "postalCode": "<string>"
    },
    "salesForceAccountId": "<string>",
    "dueDays": "END_OF_MONTH",
    "currency": "USD",
    "customFields": [
      {
        "vayuCustomFieldName": "<string>",
        "valueType": "String",
        "integrationSource": "NetSuite",
        "integrationEntityType": "<string>",
        "fieldPath": "<string>",
        "value": "<unknown>"
      }
    ],
    "subsidiary": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required

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

The legal name of the customer

taxId
string | null

The tax ID of the customer

cloudProviderSettings
object

Cloud provider settings for 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
currency
enum<string> | null

The billing currency of the customer

Available options:
USD,
EUR,
GBP,
ILS,
CAD,
AUD,
COP,
BRL
customFields
object[] | null

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

subsidiary
string | null

The name of the subsidiary of the customer

Response

RequestSuccess

customer
object
required