Upload or replace file of a quote
Uploads or replaces file of a quote.
Endpoint
POST /integration/quote/{id}/file
HTTP Request
POST /integration/quote/{id}/file
Use Content-Type: application/pdf header value.
Query parameters
| Name | Description | Required | Type |
|---|---|---|---|
| id | Identifier of the quote | Yes | string |
Successful response
{
"blueTapeId": "fb5637b2e5f3"
}
Erroneous response
{
"code": "404",
"reason": "Quote not found."
}
Responses
| Code | Description |
|---|---|
| 204 | No content |
| 400 | Invalid request |
| 401 | Unauthorized |
| 404 | Not found |
| 500 | Unexpected error |
Examples
curl https://api.bluetape.com/genericBthubService/integration/quote/<quoteId>/file \
-X POST \
-H "X-BlueTape-Key: <your-key>" \
-H "X-Integration-AccountId: <your-account-id>" \
-H "Content-Type: application/pdf" \
-F "file=@C:\Users\User\Desktop\Quote.pdf"
import fetch, {
Blob,
blobFrom,
blobFromSync,
File,
fileFrom,
fileFromSync,
} from 'node-fetch'
const mimetype = 'application/pdf'
const blob = fileFromSync('./Quote.pdf', mimetype)
const quoteId = "5ec12449be5a";
const url = `https://api.bluetape.com/genericBthubService/integration/quote/${quoteid}/file`
const response = await fetch(url, { method: 'POST', body: blob })
const data = await response.json()
console.log(data)
using Flurl.Http;
var quoteId = "5ec12449be5a";
var url = $"https://api.bluetape.com/genericBthubService/integration/quote/{quoteid}/file";
var fileName = @"C:\Users\User\Desktop\Quote.pdf";
var result = await url
.WithHeader("X-BlueTape-Key", "<your-key>")
.WithHeader("X-Integration-AccountId", "<your-account-id>")
.WithHeader("Content-Type", "application/pdf")
.PostMultipartAsync(part => part
.AddFile("file", stream, fileName)
);
import requests
url = "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"
}
file = {'file': open('C:\Users\User\Desktop\Quote.pdf','rb')}
response = requests.post(url, headers=headers, files=file)