PATCH
/
customers
/
{customer_id}
curl --request PATCH \
  --url https://api.togai.com/customers/{customer_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "ACME Enterprise",
  "primaryEmail": "admin@example.com",
  "address": {
    "phoneNumber": "+919876543210",
    "line1": "2281 Broadway Street",
    "line2": "G-31",
    "postalCode": "29501",
    "city": "Florence",
    "state": "South Carolina",
    "country": "US"
  }
}'
{
  "id": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
  "togaiCustomerId": "customer.dsvvre314.dcs14",
  "name": "ACME Enterprise",
  "primaryEmail": "admin@example.com",
  "address": {
    "phoneNumber": "+919876543210",
    "line1": "2281 Broadway Street",
    "line2": "G-31",
    "postalCode": "29501",
    "city": "Florence",
    "state": "South Carolina",
    "country": "US"
  },
  "billingAddress": "2281 Broadway Street, G-31, 29501, Florence, South Carolina, US",
  "status": "ACTIVE",
  "updatedAt": "2020-07-04T12:00:00.000Z",
  "createdAt": "2020-07-04T12:00:00.000Z"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

customer_id
string
required
Maximum length: 50

Body

application/json
Payload to update customer

Payload to update customer

name
string

Name of the Customer

Required string length: 3 - 255
primaryEmail
string

Primary email of the customer

Maximum length: 320
address
object

billing address of the customer

Response

200
application/json
Response for Get customer requests

Structure of customer

id
string
required

Identifier of customer

Maximum length: 50
togaiCustomerId
string
required

Unique identifier of customer

name
string
required

Name of the Customer

Required string length: 3 - 255
primaryEmail
string
required

Primary email of the customer

Maximum length: 320
billingAddress
string
required

billing address of the customer

Maximum length: 1000
address
object
required

billing address of the customer

status
enum<string>
required

Status of the customer

Available options:
ACTIVE,
ARCHIVED
createdAt
string
required
updatedAt
string
required