Skip to main content
POST
/
external
/
customer
/
{buyer_id}
Update customer with its tags, internal stakeholders and contacts
curl --request POST \
  --url https://api.valyx.com/external/customer/{buyer_id} \
  --header 'Content-Type: application/json' \
  --header 'X-Valyx-Signature: <x-valyx-signature>' \
  --data '
{
  "customer": {
    "name": "<string>",
    "alias": "<string>",
    "registeredAddress": {
      "line1": "<string>",
      "line2": "<string>",
      "state": "<string>",
      "city": "<string>",
      "country": "<string>",
      "zipCode": "<string>"
    },
    "addresses": [
      {
        "line1": "<string>",
        "line2": "<string>",
        "state": "<string>",
        "city": "<string>",
        "country": "<string>",
        "zipCode": "<string>"
      }
    ],
    "contactsData": {
      "add": [
        {
          "name": "<string>",
          "primaryPhone": "<string>",
          "primaryEmail": "<string>",
          "role": "<string>"
        }
      ],
      "update": [
        {
          "id": "<string>",
          "name": "<string>",
          "role": "<string>",
          "primaryPhone": "<string>",
          "primaryEmail": "<string>"
        }
      ],
      "delete": [
        {
          "name": "<string>",
          "role": "<string>"
        }
      ]
    },
    "internalStakeholdersData": {
      "add": [
        {
          "name": "<string>",
          "primaryEmail": "<string>",
          "role": "<string>",
          "primaryPhone": "<string>"
        }
      ],
      "update": [
        {
          "name": "<string>",
          "primaryEmail": "<string>",
          "role": "<string>",
          "primaryPhone": "<string>"
        }
      ],
      "delete": [
        {
          "name": "<string>",
          "role": "<string>"
        }
      ]
    },
    "stateCode": "<string>",
    "countryCode": "IN",
    "country": "<string>",
    "primaryPhone": "<string>",
    "primaryEmail": "<string>",
    "customerContactPerson": "<string>",
    "currency": "INR",
    "currencyId": "<string>",
    "tags": {},
    "metaData": {},
    "customerStatus": "PROSPECT",
    "upcomingCustomerStatus": "PROSPECT",
    "upcomingCustomerStatusChangeDate": "2023-12-25",
    "upcomingCustomerStatusChangeReason": "<string>",
    "upcomingCustomerStatusChangeByUserid": "<string>"
  }
}
'
{}

Headers

X-Valyx-Signature
string
required

Auth key for creating customers

Path Parameters

buyer_id
string
required

Body

application/json
customer
object

Response

200 - application/json

Success

The response is of type object.