Skip to main content

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

CodeDescription
202Accepted, successful operation
400Invalid request
401Unauthorized
404Not found
500Unexpected error

Objects

Query parameters

NameDescriptionRequiredType
idIdentifier of the quote to updateYesstring

Request parameters

Quote Object

NameDescriptionRequiredType
quoteNumberFriendly reference for the quote. If available, this appears in the file name of quote attachments.truestring
customerIdReference to the customer the quote has been issued to.truestring
quoteDateDate of the quote as recorded in the accounting service provider.truestring (date)
dueDateDate the quote is due to be paid by.truestring (date)
expirationDateExpiration date of the quote.truestring (date)
subTotalValue of the quote, including discounts and excluding tax.truedecimal
totalAmountAmount of the quote, inclusive of tax.truedecimal
taxAmountAny tax applied to the quote amount.truedecimal
linesAn array of quote lines.falsearray
sourceModifiedDateDate the record was last changed in the accounting service provider.truestring (date)

Quote Line Object

NameDescriptionRequiredType
descriptionFriendly name of the goods or services received.falsestring
unitAmountPrice of each unit of goods or services.truedecimal
quantityNumber of units of goods or services.trueinteger
subTotalAmount of the line, inclusive of discounts but exclusive of tax.truedecimal
taxAmountAmount of tax for the line.truedecimal
totalAmountTotal amount of the line, inclusive of discounts and tax.truedecimal

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)