Get Quote

Resource:
/api/quote/<<quote id>>
Method:
GET

Returns information about a quote. This API is useful for polling

Arguments

  • Quote ID: The onDemand Quote ID. You will receive this ID from Generate Quote

Return Codes

Status Code Comments
Success 200 Successful request
Bad Request 400  
Unauthorized 401

The request did not

pass authentication or

the customer is not a

member of an enterprise

site.

Not Found 404

The URL does not relate

to a quote that the

account owns.

Response Body

The response body contains information about the quote.

Parameter Type Comment
QuoteID
Integer onDemand ID for this quote.
CreationDate
String

String representing the

date/time in the ISO

8601 format. that the project

was created in UTC.

Status
String

Status of the quote.

 Authorized means that

the projects have been

paid for and the

project can start.

 Pending means that the

merchant must execute a

transaction to pay for

the project.  Look for

a PaymentURL for the

merchant to click

through.

AuthorizeURL
String See Authorize Quote
RejectURL
String See Reject Quote
Currency
String

Currency that the price

is in. See glossary

for list of valid

currencies.

TotalCost
Decimal

Total price that needs

to be paid. Exclude

translation credit.

PrepaidCredit
Decimal

If a merchant has a

positive credit balance

with onDemand, it will

be reported here.

AmountDue
Decimal TotalCost - Prepaid Credit
TranslationAcceptanceMethod
String

Tells onDemand how you would

like to track file

file acceptance. With the

default method, “implicit,”

we consider a file accepted

when it is downloaded.

With the optional “explicit”

method we do not mark the

file as accepted until we

receive a request to the

Accept Translation API,

see

Accept File Translation.

File acceptance/rejection

is only intended to be used

by API clients that do

integrity checks on

deliveries.

These methods are not

intended to be used for

subjective feedback on

translation quality.

Projects
Container

A list of projects that

have been generated by

this transaction.

Payments
Container

If the quote has been

authorized, the payments

section shows details

about how the quote was

paid.

Payments

.Payment
Container

Contains information

about an individual

transaction

Payments

.Payment

.PaymentType

String

PayPal, American

Express, Master Card,

Visa, Prepaid, Purchase

Order, Translation

Credit.

Payments

.Payment

.PaymentDescription

String

A string describing

the funding source

such as Amex Charge to

card ending in 1234

Payments

.Payment

.PaymentAmount

Decimal Amount paid

Payments

.Payment

.PaymentCurrency

String

Three letter currency

code of the currency

used in the transaction.

Projects

.Project

.ProjectID

Integer

onDemand Project ID for

the project.

Projects

.Project

.ProjectURL

String

A URL that can be

checked for the status

of the project.

Projects

.Project

.ProjectDueDate

String

String representing the

date/time (ISO 8601)

that the project will

be completed by.

Projects

.Project

.ServiceID

Integer ID of Service

Projects

.Project

.Products

Container

List of products

included in the

product.

Projects

.Project

.Products

.Product

.SKUs

Container List of SKUs under product

Projects

.Project

.Products

.Product

.SKUs

.SKU

Container Contains a SKU

Projects

.Project

.Products

.Product

.SKUs

.SKU

.SKUNumber

String Client supplied SKU Number

Projects

.Project

.Products

.Product

.AssetID

Integer

Internal onDemand ID

for this product.

Projects

.Project

.Files

.File

.AssetID

Integer Asset ID of the file.

Projects

.Project

.Files

.File

.FileName

String Original name of the file.

Projects

.Project

.Files

.File

.Status

String

See List Files

for a list of file

statuses.

Projects

.Project

.ReferenceFiles

.ReferenceFile

Container Container for a reference file.

Projects

.Project

.ReferenceFiles

.ReferenceFile

.AssetID

Integer Asset ID of the file.

Projects

.Project

.ReferenceFiles

.ReferenceFile

.FileName

String Original name of the file.

Projects

.Project

.ReferenceFiles

.ReferenceFile

.URL

String

URL where the file

can be downloaded.

Projects

.Project

.ReferenceFiles

.ReferenceFile

.TargetLanguages

Container Empty element.

Projects

.Project

.SourceLanguage

.LanguageCode

String See LanguageCode in glossary

Projects

.Project

.TargetLanguages

Container

Container containing

target languages.

Projects

.Project

.TargetLanguages

.TargetLanguage

.LanguageCode

String See LanguageCode in glossary

Projects

.Project

.TargetLanguages

.TargetLanguage

.Units

Integer

The estimated number of words,

minutes, or pages counted in the

source file. Depending on the

pricing algorithm, this unit count

could be used to price the project.

This feature is only enabled on

certain enterprise sites. Talk to

your account representatives for

details.

Product-Based Quote Response Example

Quote is ready for payment.

<Quote>
     <QuoteID>132</QuoteID>
     <CreationDate>2014-01-25T10:32:02Z</CreationDate>
     <Status>Pending</Status>
     <TotalCost>10.00</TotalCost>
     <PrepaidCredit>5.00</PrepaidCredit>
     <AmountDue>5.00</AmountDue>
     <Currency>EUR</Currency>
     <TranslationAcceptanceMethod>implicit</TranslationAcceptanceMethod>
     <Projects>
         <Project>
             <ProjectID>123</ProjectID>
             <ProjectURL>https://</ProjectURL>
             <ProjectDueDate>2014-02-11T10:22:46Z</ProjectDueDate>
             <ServiceID>54</ServiceID>
             <SourceLanguage>
                 <LanguageCode>en-gb</LanguageCode>
             </SourceLanguage>
             <TargetLanguages>
                 <TargetLanguage>
                     <LanguageCode>it-it</LanguageCode>
                     <Units>21</Units>
                 </TargetLanguage>
                 <TargetLanguage>
                     <LanguageCode>fr-fr</LanguageCode>
                     <Units>21</Units>
                 </TargetLanguage>
             </TargetLanguages>
             <Products>
                 <Product>
                     <AssetID>999</AssetID>
                     <SKUs>
                         <SKU>
                             <SKUNumber>123</SKUNumber>
                         </SKU>
                     </SKUs>
                 </Product>
             </Products>
             <SpecialInstructions/>
         </Project>
     </Projects>
 </Quote>

Quote that has been authorized.

<Quote>
     <QuoteID>132</QuoteID>
     <CreationDate>2014-01-25T10:32:02Z</CreationDate>
     <Status>Authorized</Status>
     <TotalCost>10.00</TotalCost>
     <Currency>EUR</Currency>
     <Payments>
         <Payment>
             <PaymentType>PayPal</PaymentType>
             <PaymentDescription>PayPal charge to buyer@example.com</PaymentDescription>
             <PaymentAmount>10.00</PaymentAmount>
             <PaymentCurrency>EURO</PaymentCurrency>
         </Payment>
     <Payments>
     <TranslationAcceptanceMethod>implicit</TranslationAcceptanceMethod>
     <Projects>
         <Project>
             <ProjectID>123</ProjectID>
             <ProjectURL>https://</ProjectURL>
             <ProjectDueDate>2014-02-11T10:22:46Z</ProjectDueDate>
             <ServiceID>54</ServiceID>
             <SourceLanguage>
                 <LanguageCode>en-gb</LanguageCode>
             </SourceLanguage>
             <TargetLanguages>
                 <TargetLanguage>
                     <LanguageCode>it-it</LanguageCode>
                     <Units>21</Units>
                 </TargetLanguage>
                 <TargetLanguage>
                     <LanguageCode>fr-fr</LanguageCode>
                     <Units>21</Units>
                 </TargetLanguage>
             </TargetLanguages>
             <Products>
                 <Product>
                     <AssetID>999</AssetID>
                     <SKUs>
                         <SKU>
                             <SKUNumber>123</SKUNumber>
                         </SKU>
                     </SKUs>
                 </Product>
             </Products>
             <SpecialInstructions/>
         </Project>
     </Projects>
 </Quote>

File-Based Quote Response Example

Quote is ready for payment

<Quote>
     <QuoteID>132</QuoteID>
     <CreationDate>2014-01-25T10:32:02Z</CreationDate>
     <Status>Pending</Status>
     <AuthorizeURL>https://…</AuthorizeURL>
     <RejectURL>https://…</RejectURL>
     <TotalCost>10.00</TotalCost>
     <PrepaidCredit>5.00</PrepaidCredit>
     <AmountDue>5.00</AmountDue>
     <Currency>EUR</Currency>
     <TranslationAcceptanceMethod>implicit</TranslationAcceptanceMethod>
     <Projects>
         <Project>
             <ProjectID>123</ProjectID>
             <ProjectName>Name of project</ProjectName>
             <ProjectURL>https://</ProjectURL>
             <ProjectDueDate>2014-02-11T10:22:46Z</ProjectDueDate>
             <ServiceID>54</ServiceID>
             <SourceLanguage>
                 <LanguageCode>en-gb</LanguageCode>
             </SourceLanguage>
             <TargetLanguages>
                 <TargetLanguage>
                     <LanguageCode>it-it</LanguageCode>
                     <Units>21</Units>
                 </TargetLanguage>
                 <TargetLanguage>
                     <LanguageCode>fr-fr</LanguageCode>
                     <Units>21</Units>
                 </TargetLanguage>
             </TargetLanguages>
             <Files>
                 <File>
                     <Status>Analyzed</Status>
                     <AssetID>999</AssetID>
                     <FileName>example.txt</FileName>
                 </File>
             </Files>
             <SpecialInstructions/>
         </Project>
     </Projects>
 </Quote>

Quote has been authorized

<Quote>
     <QuoteID>132</QuoteID>
     <CreationDate>2014-01-25T10:32:02Z</CreationDate>
     <Status>Pending</Status>
     <AuthorizeURL>https://…</AuthorizeURL>
     <RejectURL>https://…</RejectURL>
     <TotalCost>10.00</TotalCost>
     <PrepaidCredit>5.00</PrepaidCredit>
     <AmountDue>0.00</AmountDue>
     <Currency>EUR</Currency>
     <Payments>
         <Payment>
             <PaymentType>PayPal</PaymentType>
             <PaymentDescription>PayPal charge to buyer@example.com</PaymentDescription>
             <PaymentAmount>10.00</PaymentAmount>
             <PaymentCurrency>EURO</PaymentCurrency>
         </Payment>
     <Payments>
     <TranslationAcceptanceMethod>implicit</TranslationAcceptanceMethod>
     <Projects>
         <Project>
             <ProjectID>123</ProjectID>
             <ProjectName>Name of project</ProjectName>
             <ProjectURL>https://</ProjectURL>
             <ProjectDueDate>2014-02-11T10:22:46Z</ProjectDueDate>
             <ServiceID>54</ServiceID>
             <SourceLanguage>
                 <LanguageCode>en-gb</LanguageCode>
             </SourceLanguage>
             <TargetLanguages>
                 <TargetLanguage>
                     <LanguageCode>it-it</LanguageCode>
                     <Units>21</Units>
                 </TargetLanguage>
                 <TargetLanguage>
                     <LanguageCode>fr-fr</LanguageCode>
                     <Units>21</Units>
                 </TargetLanguage>
             </TargetLanguages>
             <Files>
                 <File>
                     <Status>Analyzed</Status>
                     <AssetID>999</AssetID>
                     <FileName>example.txt</FileName>
                 </File>
             </Files>
             <SpecialInstructions/>
         </Project>
     </Projects>
 </Quote>

Price has not been calculated yet

<Quote>
     <QuoteID>132</QuoteID>
     <CreationDate>2014-01-25T10:32:02Z</CreationDate>
     <Status>New</Status>
     <TotalCost/>
     <TranslationAcceptanceMethod>implicit</TranslationAcceptanceMethod>
     <Projects>
         <Project>
             <ProjectID>123</ProjectID>
             <ProjectName>Name of project</ProjectName>
             <ProjectURL>https://</ProjectURL>
             <ProjectDueDate>2014-02-11T10:22:46Z</ProjectDueDate>
             <ServiceID>54</ServiceID>
             <SourceLanguage>
                 <LanguageCode>en-gb</LanguageCode>
             </SourceLanguage>
             <TargetLanguages>
                 <TargetLanguage>
                     <LanguageCode>it-it</LanguageCode>
                     <Units>21</Units>
                 </TargetLanguage>
                 <TargetLanguage>
                     <LanguageCode>fr-fr</LanguageCode>
                     <Units>21</Units>
                 </TargetLanguage>
             </TargetLanguages>
             <Files>
                 <File>
                     <Status>Analyzing</Status>
                     <AssetID>999</AssetID>
                     <FileName>example.txt</FileName>
                 </File>
             </Files>
             <SpecialInstructions/>
         </Project>
     </Projects>
 </Quote>

Quote contains a file that could not be parsed

<Quote>
     <QuoteID>132</QuoteID>
     <CreationDate>2014-01-25T10:32:02Z</CreationDate>
     <Status>Error</Status>
     <TotalCost>/>
     <TranslationAcceptanceMethod>implicit</TranslationAcceptanceMethod>
     <Projects>
         <Project>
             <ProjectID>123</ProjectID>
             <ProjectName>Name of project</ProjectName>
             <ProjectURL>https://</ProjectURL>
             <ProjectDueDate>2014-02-11T10:22:46Z</ProjectDueDate>
             <ServiceID>54</ServiceID>
             <SourceLanguage>
                 <LanguageCode>en-gb</LanguageCode>
             </SourceLanguage>
             <TargetLanguages>
                 <TargetLanguage>
                     <LanguageCode>it-it</LanguageCode>
                     <Units>21</Units>
                 </TargetLanguage>
                 <TargetLanguage>
                     <LanguageCode>fr-fr</LanguageCode>
                     <Units>21</Units>
                 </TargetLanguage>
             </TargetLanguages>
             <Files>
                 <File>
                     <Status>Analysis Failed</Status>
                     <AssetID>999</AssetID>
                     <FileName>example.txt</FileName>
                 </File>
             </Files>
             <SpecialInstructions/>
         </Project>
     </Projects>
 </Quote>