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
| Name | Description | Required | Type |
|---|---|---|---|
| id | Identifier of the company for attach to. | Yes | string |
Request parameters
| Name | Description | Required | Type |
|---|---|---|---|
| customerId | Identifier of the customer which is attaching to company. | Yes | string |
Successful response
HTTP 200
{
"blueTapeId": "fb5637b2e5f3"
}
Erroneous response
HTTP 404
{
"code": "404",
"reason": "Customer not found."
}
Responses
| Code | Description |
|---|---|
| 201 | Created, successful operation |
| 400 | Invalid request |
| 401 | Unauthorized |
| 404 | Not found |
| 500 | Unexpected 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)