Skip to main content

Create a customer

Creates a customer.

Endpoint

POST /integration/customer

HTTP Request

POST /integration/customer

Customer Object

{
"id": "dc506b22c7fa",
"firstName": "John",
"lastName": "Doe",
"emailAddress": "[email protected]",
"cellPhoneNumber": "+11234567890",
"sourceModifiedDate": "2023-01-04T09:47:57.477Z",
"companyId": "c506b22c7fad"
}

Request parameters

NameDescriptionRequiredType
idIdentifier for the customertruestring
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
companyIdOptional field to link a customer to a company in time of creationfalsestring

Successful response

HTTP 201

{
"blueTapeId": "fb5637b2e5f3",
"signUpUrl": "https://www.bluetape.com/signup?id=97bee7a043b58084"
}

Erroneous response

HTTP 409

{
"code": "409",
"reason": "Customer already exists."
}

Responses

CodeDescription
201Created, successful operation
400Invalid request
401Unauthorized
404Not found
500Unexpected error

Examples

curl https://api.bluetape.com/genericBthubService/integration/customer \
-X POST \
-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';
const options = {
method: 'POST',
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 content = new Customer() {
...
};

var result = await "https://api.bluetape.com/genericBthubService/integration/customer"
.WithHeader("X-BlueTape-Key", "<your-key>")
.WithHeader("X-Integration-AccountId", "<your-account-id>")
.WithHeader("Content-Type", "application/json")
.PostJsonAsync(content)
.ReceiveJson<BlueTapeIntegrationResult>();
import requests

url = "https://api.bluetape.com/genericBthubService/integration/customer"

headers = {
"X-BlueTape-Key": "<your-key>",
"X-Integration-AccountId": "<your-account-id>",
"Content-Type": "application/json"
}

data = <your-customer-data>

response = requests.post(url, headers=headers, data=data)

print(response.text)