---
title: "Create a quote"
url: "https://docs.unified.to/accounting/quote/Create_a_quote"
description: "API reference for Create a quote. Launch multiple pre-built Quote integrations today with zero maintenance — all through a single API."
---
# Create a quote

 POST/accounting/{connection\_id}/quote

## Parameters

**fields**string array 

id

created\_at

updated\_at

quote\_number

reference

title

summary

payment\_terms

customer\_message

memo

contact\_id

contacts

issued\_at

expires\_at

sent\_at

accepted\_at

declined\_at

status

currency

currency\_rate

sub\_total\_amount

tax\_amount

discount\_amount

total\_amount

tax\_mode

lineitems

invoice\_id

project\_id

group\_id

category\_ids

url

organization\_id

raw

Fields to return

**raw**string 

Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar

**connection\_id**string  required 

ID of the connection

## Payload

**id**string 

**created\_at**date 

(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**updated\_at**date 

(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**quote\_number**string 

External identifier for this quote (Xero QuoteNumber, QBO DocNumber, NetSuite tranId)

**reference**string 

customer-side reference / PO number

**title**string 

short title (Xero Title, max 100)

**summary**string 

longer summary (Xero Summary, max 3000)

**payment\_terms** enum

Valid values:

 "ON\_RECEIPT" 

 "NET\_7" 

 "NET\_10" 

 "NET\_15" 

 "NET\_20" 

unified payment terms enum, as on accounting\_invoice / accounting\_bill

**customer\_message**string 

customer-visible message

**memo**string 

internal note, not customer-visible

**contact\_id**string 

(reference to AccountingContact)

**contacts** array 

denormalized parties, reusing the transaction contact shape

**issued\_at**date 

Xero Date, QBO TxnDate (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**expires\_at**date 

Xero ExpiryDate, QBO ExpirationDate (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**sent\_at**date 

(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**accepted\_at**date 

(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**declined\_at**date 

(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**status** enum

Valid values:

 "DRAFT" 

 "SENT" 

 "ACCEPTED" 

 "DECLINED" 

 "INVOICED" 

where EXPIRED is derived (expires\_at < now), the source status is preserved in raw

**currency**string 

**currency\_rate**number 

exchange rate to the organization's base currency

**sub\_total\_amount**number 

**tax\_amount**number 

**discount\_amount**number 

**total\_amount**number 

**tax\_mode** enum

Valid values:

 "INCLUSIVE" 

 "EXCLUSIVE" 

 "NONE" 

INCLUSIVE / EXCLUSIVE / NONE; maps Xero LineAmountTypes (a boolean cannot represent NoTax)

**lineitems** array 

**invoice\_id**string 

populated once the quote is converted to an invoice; left null when the source cannot supply it (reference to AccountingInvoice)

**project\_id**string 

points to an AccountingProject (accounting costing project) (reference to TaskProject)

**group\_id**string 

points to a HRIS Group (reference to HrisGroup)

**category\_ids**string array 

tracking categories / classes (AccountingCategory dimensions)

**url**string 

public online-quote link where exposed

**organization\_id**string 

**raw**any 

## Returns

[AccountingQuote](/accounting/quote/model)

**id**string 

**created\_at**date 

(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**updated\_at**date 

(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**quote\_number**string 

External identifier for this quote (Xero QuoteNumber, QBO DocNumber, NetSuite tranId)

**reference**string 

customer-side reference / PO number

**title**string 

short title (Xero Title, max 100)

**summary**string 

longer summary (Xero Summary, max 3000)

**payment\_terms** enum

Valid values:

 "ON\_RECEIPT" 

 "NET\_7" 

 "NET\_10" 

 "NET\_15" 

 "NET\_20" 

unified payment terms enum, as on accounting\_invoice / accounting\_bill

**customer\_message**string 

customer-visible message

**memo**string 

internal note, not customer-visible

**contact\_id**string 

(reference to AccountingContact)

**contacts** array 

denormalized parties, reusing the transaction contact shape

**issued\_at**date 

Xero Date, QBO TxnDate (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**expires\_at**date 

Xero ExpiryDate, QBO ExpirationDate (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**sent\_at**date 

(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**accepted\_at**date 

(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**declined\_at**date 

(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**status** enum

Valid values:

 "DRAFT" 

 "SENT" 

 "ACCEPTED" 

 "DECLINED" 

 "INVOICED" 

where EXPIRED is derived (expires\_at < now), the source status is preserved in raw

**currency**string 

**currency\_rate**number 

exchange rate to the organization's base currency

**sub\_total\_amount**number 

**tax\_amount**number 

**discount\_amount**number 

**total\_amount**number 

**tax\_mode** enum

Valid values:

 "INCLUSIVE" 

 "EXCLUSIVE" 

 "NONE" 

INCLUSIVE / EXCLUSIVE / NONE; maps Xero LineAmountTypes (a boolean cannot represent NoTax)

**lineitems** array 

**invoice\_id**string 

populated once the quote is converted to an invoice; left null when the source cannot supply it (reference to AccountingInvoice)

**project\_id**string 

points to an AccountingProject (accounting costing project) (reference to TaskProject)

**group\_id**string 

points to a HRIS Group (reference to HrisGroup)

**category\_ids**string array 

tracking categories / classes (AccountingCategory dimensions)

**url**string 

public online-quote link where exposed

**organization\_id**string 

**raw**any 

## Code Samples

### Node.js SDK

```
import { UnifiedTo } from '@unified-api/typescript-sdk';

const sdk = new UnifiedTo({
    security: {
        jwt: '<YOUR_API_KEY_HERE>',
    },
});

const connectionId = '5de520f96e439b002043d8dc';

const results = await sdk.accounting.createAccountingQuote({ connectionId, accountingQuote: { }, 
    fields: '',
    raw: '',
 });
```

### Node.js (axios)

```
const options = {
  method: 'POST',
  url: 'https://api.unified.to/accounting/5de520f96e439b002043d8dc/quote',
  headers: {
    authorization: 'bearer .....'
  },
  data: undefined,
  params: {
    fields: '',
    raw: '',
  }
};

const results = await axios.request(options);
```

### Java

```
AsyncHttpClient client = new DefaultAsyncHttpClient();

client.prepare("POST", "https://api.unified.to/accounting/5de520f96e439b002043d8dc/quote?fields=&raw=")
  .setHeader("accept", "application/json")
  .setHeader("authorization", ".....")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
```

### Go

```
import (
	"fmt"
	"net/http"
	"io/ioutil"
)

url := `https://api.unified.to/accounting/5de520f96e439b002043d8dc/quote?fields=&raw=

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("accept", "application/json")
req.Header.Add("authorization", ".....")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
```

### Python

```
import requests

url = "https://api.unified.to/accounting/5de520f96e439b002043d8dc/quote?fields=&raw="

headers = {
    "accept": "application/json",
    "authorization": "....."
}

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

### PHP

```
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.unified.to/accounting/5de520f96e439b002043d8dc/quote?fields=&raw=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "accept: application/json",
    "authorization: ....."
  ],
]);
```

### Ruby

```
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.unified.to/accounting/5de520f96e439b002043d8dc/quote?fields=&raw=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["authorization"] = '....'

response = http.request(request)
puts response.read_body
```

### cURL

```
curl --request POST \
  --url 'https://api.unified.to/accounting/5de520f96e439b002043d8dc/quote?fields=&raw=' \
  --header 'accept: application/json' \
  --header 'authorization: .....'
```
