Update a quote
This endpoint updates a specified quote.
Endpoint
PUT /integration/quote/{id}
HTTP Request
PUT /integration/quote/{id}
Quote Object
{
"quoteNumber": "QUOT/0567/2022",
"customerId": "7ba4877cbf52",
"quoteDate": "2023-01-04",
"dueDate": "2023-01-12",
"expirationDate": "2023-01-12",
"subTotal": 1000,
"totalAmount": 1100,
"taxAmount": 100,
"lines": [
{
"description": "Item 1",
"unitAmount": 500,
"quantity": 2,
"subTotal": 1000,
"taxAmount": 100,
"totalAmount": 1100
}
],
"sourceModifiedDate": "2023-01-04T09:47:57.477Z"
}
Successful response
{
"blueTapeId": "9d86480a5a5d"
}
Erroneous response
HTTP 404
{
"code": "404",
"reason": "Quote not found."
}
Responses
| Code | Description |
|---|---|
| 202 | Accepted, successful operation |
| 400 | Invalid request |
| 401 | Unauthorized |
| 404 | Not found |
| 500 | Unexpected error |
Objects
Query parameters
| Name | Description | Required | Type |
|---|---|---|---|
| id | Identifier of the quote to update | Yes | string |
Request parameters
Quote Object
| Name | Description | Required | Type |
|---|---|---|---|
| quoteNumber | Friendly reference for the quote. If available, this appears in the file name of quote attachments. | true | string |
| customerId | Reference to the customer the quote has been issued to. | true | string |
| quoteDate | Date of the quote as recorded in the accounting service provider. | true | string (date) |
| dueDate | Date the quote is due to be paid by. | true | string (date) |
| expirationDate | Expiration date of the quote. | true | string (date) |
| subTotal | Value of the quote, including discounts and excluding tax. | true | decimal |
| totalAmount | Amount of the quote, inclusive of tax. | true | decimal |
| taxAmount | Any tax applied to the quote amount. | true | decimal |
| lines | An array of quote lines. | false | array |
| sourceModifiedDate | Date the record was last changed in the accounting service provider. | true | string (date) |
Quote Line Object
| Name | Description | Required | Type |
|---|---|---|---|
| description | Friendly name of the goods or services received. | false | string |
| unitAmount | Price of each unit of goods or services. | true | decimal |
| quantity | Number of units of goods or services. | true | integer |
| subTotal | Amount of the line, inclusive of discounts but exclusive of tax. | true | decimal |
| taxAmount | Amount of tax for the line. | true | decimal |
| totalAmount | Total amount of the line, inclusive of discounts and tax. | true | decimal |
Examples
curl https://api.bluetape.com/genericBthubService/integration/quote/<quoteId> \
-X PUT \
-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 quote = { ... };
const url = `https://api.bluetape.com/genericBthubService/integration/quote/${quote.Id}`;
const options = {
method: 'PUT',
headers: {
'X-BlueTape-Key': '<your-key>',
'X-Integration-AccountId': '<your-account-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify(quote)
};
fetch(url, options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
using Flurl.Http;
var quoteId = "cbabdcfecfeb";
var quote = <your-quote-to-update>;
var result = await "https://api.bluetape.com/genericBthubService/integration/quote"
.AppendPathSegment(quoteId)
.WithHeader("X-BlueTape-Key", "<your-key>")
.WithHeader("X-Integration-AccountId", "<your-account-id>")
.WithHeader("Content-Type", "application/json")
.PutJsonAsync(quote)
.ReceiveJson<BlueTapeIntegrationResult>();
import requests
quoteId = "cbabdcfecfeb"
url = "https://api.bluetape.com/genericBthubService/integration/quote/{quoteId}"
headers = {
"X-BlueTape-Key": "<your-key>",
"X-Integration-AccountId": "<your-account-id>",
"Content-Type": "application/json"
}
data = <your-quote-data>
response = requests.put(url, headers=headers, data=data)
print(response.text)