Update a customer
Updates a specified customer.
Endpoint
PUT /integration/customer/{id}
HTTP Request
PUT /integration/customer/{id}
Customer Object
{
"firstName": "John",
"lastName": "Doe",
"emailAddress": "[email protected]",
"cellPhoneNumber": "+11234567890",
"sourceModifiedDate": "2023-01-04T09:47:57.477Z"
}
Query parameters
| Name | Description | Required | Type |
|---|---|---|---|
| id | Identifier of the customer to update | Yes | string |
Request parameters
| Name | Description | Required | Type |
|---|---|---|---|
| firstName | First name of the main contact for the customer / company | true | string |
| lastName | Last name of the main contact for the customer / company | true | string |
| emailAddress | Email address of the main contact for the customer / company. This email address will be used to send the notifications out | true | string |
| cellPhoneNumber | Cellphone number of the main contact for the customer / company. This phone number will be used to send the notifications out | true | string |
| sourceModifiedDate | Date the record was last changed in the accounting service provider | true | datetime |
Successful response
{
"blueTapeId": "fb5637b2e5f3"
}
Erroneous response
{
"code": "404",
"reason": "Customer not found."
}
Responses
| Code | Description |
|---|---|
| 202 | Accepted, successful operation |
| 400 | Invalid request |
| 401 | Unauthorized |
| 404 | Not found |
| 500 | Unexpected error |
Examples
curl https://api.bluetape.com/genericBthubService/integration/customer \
-X PUT \
-H "X-BlueTape-Key: <your-key>" \
-H "X-Integration-AccountId: <your-account-id>" \
-H "Content-Type: application/json" \
-d "@request.json"
import fetch from 'node-fetch';
const customer = { ... };
const url = `https://api.bluetape.com/genericBthubService/integration/customer/${customer.Id}`;
const options = {
method: 'PUT',
headers: {
'X-BlueTape-Key': '<your-key>',
'X-Integration-AccountId': '<your-account-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify(customer)
};
fetch(url, options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
using Flurl.Http;
var customerId = "dc506b22c7fa";
var content = <your-customer-to-update>;
var result = await "https://api.bluetape.com/genericBthubService/integration/customer"
.AppendPathSegment(customerId)
.WithHeader("X-BlueTape-Key", "<your-key>")
.WithHeader("X-Integration-AccountId", "<your-account-id>")
.WithHeader("Content-Type", "application/json")
.PutJsonAsync(content)
.ReceiveJson<BlueTapeIntegrationResult>();
import requests
customerId = "dc506b22c7fa"
url = f'https://api.bluetape.com/genericBthubService/integration/customer/{customerId}'
headers = {
"X-BlueTape-Key": "<your-key>",
"X-Integration-AccountId": "<your-account-id>",
"Content-Type": "application/json"
}
data = <your-customer-data>
response = requests.put(url, headers=headers, data=data)
print(response.text)