Skip to main content

Create new quote

Creates a new quote.

HTTP Request

POST /integration/quote

Quote Object

{
"id": "cbabdcfecfeb",
"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",
"projectDetails": {
"projectId": "generic_project_id_1",
"name": "A new huge building",
"address": "285 Fulton St, New York, NY 10007, United States",
"contractValue": 50000,
"sourceModifiedDate": "2023-11-14T15:18:19.576Z",
"startDate": "2024-05-20T00:00:00.000Z",
"endDate": "2025-12-31T00:00:00.000Z",
"jobId": "generic_job_id_1",
"jobAddress": {
"address": "285 Fulton St",
"unitNo": "",
"state": "NY",
"zipCode": "10007",
"city": "New York",
"lotNumber": "",
"blockNumber": ""
},
"role": "PrimeOrGeneralContractor",
"primeContractorDetails": {
"businessName": "Builders",
"firstName": "John",
"lastName": "Doe",
"businessPhoneNumber": "202-555-0583",
"businessEmail": "[email protected]",
"businessAddress": "Washington str. 123",
"state": "California",
"city": "San Francisco",
"zipCode": "31702"
},
"type": "public",
"privateProjectDetails": {
"privateProjectType": "Сommercial",
"builtFor": {
"type": "PropertyOwnerNewBuilding",
"notes": "Test note"
}
},
"publicProjectDetails": {
"description": "Public description",
"hasBond": true,
"isBondRequired": true
},
"federalProjectDetails": {
"hasBond": true
},
"individualOwners": [
{
"firstName": "John",
"lastName": "Doe",
"phone": "202-555-0583",
"homeAddress": "Washington str. 123",
"state": "California",
"city": "San Francisco",
"zipCode": "31702"
}
],
"businessOwners": [
{
"businessName": "Builders",
"firstName": "Mary",
"lastName": "Matheson",
"businessPhoneNumber": "202-555-0583",
"businessAddress": "Washington str. 123",
"state": "California",
"city": "San Francisco",
"zipCode": "31702"
}
],
"shippingAddress": {
"attention": "John Doe",
"address": "285 Fulton St, New York, NY 10007", // fill address or addressModel
"addressModel": {
"address": "285 Fulton St",
"city": "New York",
"state": "New York",
"zipCode": "10007",
"country": "US" // optional
}
}
}
}

Successful response

HTTP 201

{
"blueTapeId": "9d86480a5a5d"
}

Erroneous response

HTTP 409

{
"code": "409",
"reason": "Quote already exists."
}

Responses

CodeDescription
201Created, successful operation
400Invalid request
401Unauthorized
404Not found
500Unexpected error

Objects

Quote Object

NameDescriptionRequiredType
idIdentifier of the quote.truestring
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)
projectDetailsDetails of the attached project.falseobject

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

Project Object

NameDescriptionRequiredType
projectIdIdentifier for the project.truestring
nameProject name.falsestring
addressProject address.falsestring
contractValueThe total amount of contracted amount for the project.falsedecimal
sourceModifiedDateDate the record was last changed in the accounting service providerfalsedatetime
startDateFirst day on the job.falsedate
endDateExpected last day on the job.falsedate
jobIdThe job id.falsestring
jobAddressProject address in details.falseobject
  addressStreet address.falsestring
  unitNoUnit number (if applicable).falsestring
  stateState.falsestring
  zipCodeZIP Code.falsestring
  cityCity.falsestring
  lotNumberLot number.falsestring
  blockNumberBlock number.falsestring
roleRole on this project.falsestring(enum)
primeContractorDetailsFilled if role is one of subcontractor, subcontractor for another subcontractor, material supplier, property developer.falseobject
  businessNameThe prime contractor's business name.falsestring
  firstNameThe prime contractor's first name.falsestring
  lastNameThe prime contractor's last name.falsestring
  businessPhoneNumberThe prime contractor's business phone number.falsestring
  businessEmailThe prime contractor's business email address.falsestring
  businessAddressThe prime contractor's business address.falsestring
  stateThe prime contractor's business address state.falsestring
  cityThe prime contractor's business address city.falsestring
  zipCodeThe prime contractor's business address zipcode.falsestring
typeProject's typefalsestring(enum)
privateProjectDetailsFilled if project's type is private.falseobject
  privateProjectTypeSubtype of private project.falsestring(enum)
  builtForBuilt for which purpose.falseobject
   typeType of purposefalsestring(enum)
   notesFilled if type other.falsestring
publicProjectDetailsFilled if project's type is public.falseobject
  descriptionDescription of the public project.falsestring
  hasBondDetermines, is there a bond for this project.falsebool
  isBondRequiredIs the bond required to carry by the sub-contractor.falsebool
federalProjectDetailsFilled if project's type is federal.falseobject
  hasBondDetermines, is there a bond for this project.falsebool
propertyIndividualOwnersThe property individual owner's details.falsearray
  firstNameThe property owners's first name.falsestring
  lastNameThe property owners's last name.falsestring
  phoneNumberThe property owners's phone number.falsestring
  homeAddressThe property owners's home address.falsestring
  stateThe property owners's home address state.falsestring
  cityThe property owners's home address city.falsestring
  zipCodeThe property owners's home address zipcode.falsestring
propertyBusinessOwnersThe property business owner's details.falsearray
  businessNameThe property owners's business name.falsestring
  firstNameThe property owners's first name.falsestring
  lastNameThe property owners's last name.falsestring
  businessPhoneNumberThe property owners's business phone number.falsestring
  businessEmailThe property owners's business email address.falsestring
  businessAddressThe property owners's business address.falsestring
  stateThe property owners's business address state.falsestring
  cityThe property owners's business address city.falsestring
  zipCodeThe property owners's business address zipcode.falsestring

ShippingAddress object

Address or AddressModel to be filled.

NameDescriptionRequiredType
attentionAttention namefalsestring
addressFull shipping addressfalsestring
addressModelShipping address modelfalsestring

AddressModel object

NameDescriptionRequiredType
addressAddressfalsestring
cityCityfalsestring
stateStatefalsestring
zipCodeZip Codefalsestring
countryCountryfalsestring

Enums

Status

  • active
  • inactive

Role

  • PrimeOrGeneralContractor
  • SubContractor
  • SubContractorForAnotherSubContractor
  • MaterialSupplier
  • PropertyDeveloper
  • Owner
  • Tenant

Type

  • Private
  • Public
  • Federal

PrivateProjectType

  • Сommercial
  • Residential

BuiltFor.Type

  • Spec
  • PropertyOwnerNewBuilding
  • PropertyOwnerRenovation
  • Other

Examples

curl https://api.bluetape.com/genericBthubService/integration/quote \
-X POST \
-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';
const options = {
method: 'POST',
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 quote = new Quote() {
...
};

var result = await "https://api.bluetape.com/genericBthubService/integration/quote"
.WithHeader("X-BlueTape-Key", "<your-key>")
.WithHeader("X-Integration-AccountId", "<your-account-id>")
.WithHeader("Content-Type", "application/json")
.PostJsonAsync(quote)
.ReceiveJson<BlueTapeIntegrationResult>();
import requests

url = "https://api.bluetape.com/genericBthubService/integration/quote"

headers = {
"X-BlueTape-Key": "<your-key>",
"X-Integration-AccountId": "<your-account-id>",
"Content-Type": "application/json"
}

data = <your-quote-data>

response = requests.post(url, headers=headers, data=data)

print(response.text)