Skip to main content

Link company to a customer

This endpoint links specified company to a customer.

Endpoint

POST /integration/company/{id}/customer

HTTP Request

POST /integration/company/{id}/customer

Customer

{
"customerId": "7ba4877cbf52"
}

Query Parameters

NameDescriptionRequiredType
idIdentifier of the company for attach to.Yesstring

Request parameters

NameDescriptionRequiredType
customerIdIdentifier of the customer which is attaching to company.Yesstring

Successful response

HTTP 200

{
"blueTapeId": "fb5637b2e5f3"
}

Erroneous response

HTTP 404

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

Responses

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

Examples

curl https://api.bluetape.com/genericBthubService/integration/company/<id>/customer \
-X POST \
-H "X-BlueTape-Key: <your-key>" \
-H "X-Integration-AccountId: <your-account-id>" \
-d "@request.json"
import fetch from 'node-fetch';

const companyId = 'a0b9cedc32ce';
const url = `https://api.bluetape.com/genericBthubService/integration/company/${companyId}/customer`;
const options = {
method: 'POST',
headers: {
'X-BlueTape-Key': '<your-key>',
'X-Integration-AccountId': '<your-account-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customerId: '7ba4877cbf52'
})
};

fetch(url, options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
using Flurl.Http;

var companyId = "a0b9cedc32ce";
var url = $"https://api.bluetape.com/genericBthubService/integration/company/{companyId}/customer";

var result = await url
.WithHeader("X-BlueTape-Key", "<your-key>")
.WithHeader("X-Integration-AccountId", "<your-account-id>")
.WithHeader("Content-Type", "application/json")
.PostJsonAsync(new() { customerId = "7ba4877cbf52" })
.ReceiveJson<BlueTapeIntegrationResult>();
import requests

companyId = "a0b9cedc32ce"
customerId = "7ba4877cbf52"
url = f'https://api.bluetape.com/genericBthubService/integration/{companyId}/customer'

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

body = {
"customerId": "7ba4877cbf52"
}

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

print(response.text)