Skip to main content

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

NameDescriptionRequiredType
idIdentifier of the customer to updateYesstring

Request parameters

NameDescriptionRequiredType
firstNameFirst name of the main contact for the customer / companytruestring
lastNameLast name of the main contact for the customer / companytruestring
emailAddressEmail address of the main contact for the customer / company. This email address will be used to send the notifications outtruestring
cellPhoneNumberCellphone number of the main contact for the customer / company. This phone number will be used to send the notifications outtruestring
sourceModifiedDateDate the record was last changed in the accounting service providertruedatetime

Successful response

{
"blueTapeId": "fb5637b2e5f3"
}

Erroneous response

{
"code": "404",
"reason": "Customer not found."
}

Responses

CodeDescription
202Accepted, successful operation
400Invalid request
401Unauthorized
404Not found
500Unexpected 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)