Download file of a quote
Downloads file of a quote.
Endpoint
GET /integration/quote/{id}/file
HTTP Request
GET /integration/quote/{id}/file
Query parameters
| Name | Description | Required | Type |
|---|---|---|---|
| id | Identifier of the quote | Yes | string |
Successful response, binary content
Erroneous response
HTTP 404
{
"code": "404",
"reason": "Quote not found."
}
Responses
| Code | Description |
|---|---|
| 200 | Successful operation |
| 400 | Invalid request |
| 401 | Unauthorized |
| 404 | Not found |
| 500 | Unexpected error |
Examples
curl https://api.bluetape.com/genericBthubService/integration/quote/<quoteId>/file \
-H "X-BlueTape-Key: <your-key>" \
-H "X-Integration-AccountId: <your-account-id>" \
import fetch from 'node-fetch';
const quoteId = 'b22c7fadc506';
const url = `https://api.bluetape.com/genericBthubService/integration/quote/${quoteId}/file`;
const options = {
method: 'GET',
headers: {
'X-BlueTape-Key': '<your-key>',
'X-Integration-AccountId': '<your-account-id>',
'Content-Type': 'application/pdf'
}
};
fetch(url, options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
using Flurl.Http;
var quoteId = "b22c7fadc506";
var url = $"https://api.bluetape.com/genericBthubService/integration/quote/{quoteId}/file";
var resultStream = await url
.WithHeader("X-BlueTape-Key", "<your-key>")
.WithHeader("X-Integration-AccountId", "<your-account-id>")
.WithHeader("Content-Type", "application/pdf")
.GetStreamAsync();
import requests
quoteId = "b22c7fadc506"
url = f'https://api.bluetape.com/genericBthubService/integration/quote/{quoteId}/file'
headers = {
"X-BlueTape-Key": "<your-key>",
"X-Integration-AccountId": "<your-account-id>",
"Content-Type": "application/pdf"
}
response = requests.get(url, headers=headers, allow_redirects=True)
open('filename.pdf', 'wb').write(r.content)