Modify Customer
Modifies Customers in a specific database.
Note: To be able to modify customer, you need to mark at least one of the fields in your database as unique. This field also needs to be populated in the request body, so that the system identifies which record needs to be updated.
Request | |
---|---|
Method | PUT |
Resource | https://account.prod.vcc-live.app/api/v1/databases/{databaseId}/customers |
Options | N/A |
Body | N/A |
Response | |
Body | Project array, encoded in JSON |
Note: To authenticate for this API, provide your API token as a ‘Bearer’ token in the header: header ‘Authorization: Bearer yourtoken‘
Request
Resource parameters
Name | Type | Mandatory | Comment |
---|---|---|---|
databaseId | string | yes | ID of the database, format:uuid |
Response
Response object
Name | Type | Comment |
---|---|---|
name | string | Label of the field |
contacts | array | Describes contacts of a Customer |
Other custom fields created in your database can be added as objects and in the appropriate type (e.g. string, integer)
Customer Contact object
Name | Type | Comment |
---|---|---|
order | integer | Describes the contact position, from 1 to 9 |
name | string | Name of the contact |
phone | string | Phone of the contact |
string | Email of the contact | |
title | string | Title of the contact |
Example
Request
URL: https://account.prod.vcc-live.app/api/v1/databases/{databaseId}/customers
Request body
{
"name": "john",
"accountId": ["2428"],
"userName": ["kevon86"],
"creditCardType": ["American Express"],
"creditCardNumber": ["2544375993467898"],
"ip": ["146.7.172.176"],
"age": ["39"],
"height": ["177"],
"size": ["l"],
"intelligence": ["116"],
"city": ["North Alaska"],
"streetAddress": ["4076 Matilda Greens Apt. 589"],
"company": ["Cummerata, Romaguera and Feest"],
"jobTitle": ["WOHO Examiner"],
"contacts": [
{
"order": 1,
"name": "sue",
"phone": "36307658933",
"email": "[email protected]",
"title": "ms"
},
{
"order": 2,
"name": "michael",
"phone": "36708976654",
"email": "[email protected]",
"title": "mr"
}
]
}
Response body
{
"name": "john",
"contacts": [
{
"order": 1,
"name": "sue",
"phone": "36307658933",
"email": "[email protected]",
"title": "ms"
},
{
"order": 2,
"name": "michael",
"phone": "36708976654",
"email": "[email protected]",
"title": "mr"
}
]
}
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.