Add Project

Resource:
/api/projects/add
Method:
POST

Adds a new project to onDemand. Should be used in conjunction with Generate Quote to make a purchase.

Depending on the service, either files or products can be submitted to be translated. Files can be uploaded prior to creating the project. (see Add File)

Request Body

Parameter Type Comments
ProjectName
String (optional)

String representing the

name of the project.

Maximum 75 characters.

If this element is not

included, a name will

be generated.

TranslationOptions
Container

Contains information

specifying the

translation project.

TranslationOptions

.ServiceID
Integer

Numeric service code

for the translation

service.  The service

defines a set of

options such as machine

translation with post

edit on the title and

raw machine translation

on the body.  This

element is optional.

TranslationOptions

.SourceLanguage
Container

Contains 1 source

language

TranslationOptions

.SourceLanguage

.LanguageCode

String

See LanguageCode in

glossary

TranslationOptions

.SpecialInstructions
String (optional)

Special instructions for use

by translators. This will be

recorded on each project in the

quote.

TranslationOptions

.TargetLanguages
Container

Contains 1 or more

target languages

TranslationOptions

.TargetLanguages

.TargetLanguage

.LanguageCode

String

See LanguageCode in

glossary

Products
List

List of Product

Elements. Products

are only allowed as

input if the service

supports products.

Products

.Product

.Title

String

The title of the

product

Products

.Product

.PrimaryCategory

Integer

ID of the product’s

primary category

Products

.Product

.TopLevelCategory

Integer

ID of the top level

category that the

product sits in

Products

.Product

.Category

String

Delimited string

showing the path

through the category

hierarchy to the

primary category.  This

is mainly for

contextual information

for the translators.

Products

.Product

.Description

String

The description of the

item.  This element can

contain sub-elements.

HTML that is not well

formed XML should be

wrapped in CDATA tags.

Products

.Product

.SKUs

Container Contains a SKU elements

Products

.Product

.SKUs

.SKU

Container

Contains a SKU Number

and a list of

ItemSpecifics that are

relevant to the SKU

Products

.Product

.SKUs

.SKU

.SKUNumber

String SKU Number

Products

.Product

.SKUs

.SKU

.ItemSpecifics

Container

Contains elements

representing

specifications.

Products

.Product

.SKUs

.SKU

.ItemSpecifics

.ItemSepecific

Container

Contains elements

representing name-value

pairs

Products

.Product

.SKUs

.SKU

.ItemSpecifics

.ItemSpecific

.Name

String

The name of the name

value pair

Products

.Product

.SKUs

.SKU

.ItemSpecifics

.ItemSpecific

.Value

String

The name of the name

value pair

Files
Container

A collection of file

elements. The files

referenced need to

supported by the

selected service.

See List Services

Files

.File
Container

A file is described

with a AssetID of a

previously uploaded file

(see Add File)

Files

.File

.AssetID

Integer

AssetID of previously

uploaded file. Note:

the file type needs to

be consistent with the

valid file types for

the service. Also,

a file cannot be

associated with more

that one quote.

ReferenceFiles

.ReferenceFile
Container

Container for a

reference file. A

reference file is used

to inform the work that

is being done. There is

no charge for reference

files.

ReferenceFiles

.ReferenceFile

.AssetID

Integer

Asset ID of the

reference file.

NotificationSubscriptions

.NotificationSubscription
Container

Container for a notification

subscription. See the

Notification Subscriptions

page for more information

NotificationSubscriptions

.NotificationSubscription

.EventName

String

Event in a project’s life cycle

that will trigger the sending of

the notification.

NotificationSubscriptions

.NotificationSubscription

.Endpoint

String

Where the notification should be

sent.

Product Request Example

<AddProject>
    <ProjectName>Name of the project</ProjectName>
    <TranslationOptions>
        <Currency>EUR</Currency>
        <ServiceID>54</ServiceID>
        <SourceLanguage>
            <LanguageCode>en-gb</LanguageCode>
        </SourceLanguage>
        <TargetLanguages>
            <TargetLanguage>
                <LanguageCode>it-it</LanguageCode>
            </TargetLanguage>
                <TargetLanguage>
                    <LanguageCode>fr-fr</LanguageCode>
                </TargetLanguage>
         </TargetLanguages>
        <SpecialInstructions>Special instructions for this project</SpecialInstructions>
    </TranslationOptions>
    <Products>
        <Product>
            <Title>The title of the item</Title>
            <PrimaryCategory>123</PrimaryCategory>
            <TopLevelCategory>1</TopLevelCategory>
            <CategoryPath>Clothing : Menswear : Shoes</CategoryPath>
            <Description>
                <!--
                    This can be an XML block containing arbitrary,
                    well formed sub elements.
                -->

                <Summary>
                    <![CDATA[
                            This is a summary it can contain HTML markup.
                            To tell the translation service to ignore some
                            text, wrap it in a
                            [do-not-translate]
                            do not translate
                            [/do-not-translate]
                            tag
                            ]]>

                </Summary>
                <Features>
                    <Feature1>Feature 1</Feature1>
                    <Feature2>Feature 2</Feature2>
                </Features>
            </Description>
            <SKUs>
                <SKU>
                   <SKUNumber>1234</SKUNumber>
                    <ItemSpecifics>
                        <ItemSpecific>
                            <Name>Color</Name>
                            <Value>White</Value>
                        </ItemSpecific>
                        <ItemSpecific>
                            <Name>Size</Name>
                            <Value>Large</Value>
                        </ItemSpecific>
                  </ItemSpecifics>
                </SKU>
            </SKUs>
        </Product>

    </Products>
    <ReferenceFiles>
        <ReferenceFile>
            <AssetID>12345</AssetID>
        </ReferenceFile>
        <ReferenceFile>
            <AssetID>12346</AssetID>
        </ReferenceFile>
    </ReferenceFiles>

    <NotificationSubscriptions>
        <NotificationSubscription>
            <EventName>quote-ready</EventName>
            <Endpoint>mailto:test@test.com</Endpoint>
        </NotificationSubscription>
        <NotificationSubscription>
            <EventName>quote-ready</EventName>
            <Endpoint>http://www.test.com</Endpoint>
        </NotificationSubscription>
    </NotificationSubscription>

</AddProject>

File Request Example

<AddProject>
    <ProjectName>Name of the project</ProjectName>
    <TranslationOptions>
        <ServiceID>54</ServiceID>
        <SourceLanguage>
            <LanguageCode>en-gb</LanguageCode>
        </SourceLanguage>
        <TargetLanguages>
            <TargetLanguage>
                <LanguageCode>it-it</LanguageCode>
            </TargetLanguage>
                <TargetLanguage>
                    <LanguageCode>fr-fr</LanguageCode>
                </TargetLanguage>
         </TargetLanguages>
    </TranslationOptions>
    <Files>
        <File>
            <AssetID>123456</AssetID>
        </File>
    </Files>
    <ReferenceFiles>
        <ReferenceFile>
            <AssetID>12345</AssetID>
        </ReferenceFile>
        <ReferenceFile>
            <AssetID>12346</AssetID>
        </ReferenceFile>
    </ReferenceFiles>
    <NotificationSubscriptions>
        <NotificationSubscription>
            <EventName>quote-ready</EventName>
            <Endpoint>mailto:test@test.com</Endpoint>
        </NotificationSubscription>
        <NotificationSubscription>
            <EventName>quote-ready</EventName>
            <Endpoint>http://www.test.com</Endpoint>
        </NotificationSubscription>
    </NotificationSubscription>
</AddProject>

Return Codes

Status Code Comments
Created 201 The project was created
Bad Request 400

This is probably

because of a malformed

request body.

Unauthorized 401

The request did not

pass authentication or

the customer is not a

member of an enterprise

site.

Conflict 409

This is probably

because of an invalid

parameter such as the

wrong service id or

incompatible file types

Response Body

The response body contains a quote for a project. Please note: the response may not contain a price. If the submitted files

Property Type | Comments
ProjectID
Integer | onDemand ID of the

Project.

ProjectName
String

Either the submitted or

or generated project

name.

CreationDate
String

String representing the

date/time in the ISO

8601 format. that the

project was created in

UTC.

Status
String

The status of the

project.

source content has been

analyzed and the

project(s) has/have

been priced.

“Analyzing” means that

the price is still

being determined and

the client should

call Get Quote

later to check on the

status.

ServiceID
Integer ID of Service

SourceLanguage

.LanguageCode
String

See LanguageCode in

glossary

TargetLanguages
Container

Container containing

target languages.

TargetLanguages

.TargetLanguage

.LanguageCode

String

See LanguageCode in

glossary

Price
Decimal

Total price that needs

to be paid. Exclude

translation credit.

Currency
String

Currency of the price

This is taken from the

default currency of the

account profile

Products
Container Container of products

Products

.Product

.SKUs

Container

Container of SKU

elements

Products

.Product

.SKUs

.SKU

Container Container of a SKU

Products

.Product

.SKUs

.SKU

.SKUNumber

String Item SKU

Products

.Product

.AssetID

Integer

onDemand internal ID

for the listing

Products

.Product

.DueDate

String

String representing

date/time (ISO 8601

format) that the

translation of the item

is scheduled to be

completed in UTC

Files

.File

.AssetID

Integer Asset ID of the file.

Files

.File

.FileName

String

Original name of the

file.

ReferenceFiles

.ReferenceFile
Container

Container for a

reference file. A

reference file is used

to inform the work that

is being done. There is

no charge for reference

files.

ReferenceFiles

.ReferenceFile

.AssetID

Integer

Asset ID of the

reference file.

ReferenceFiles

.ReferenceFile

.FileName

String

Original name of

the file.

ReferenceFiles

.ReferenceFile

.URL

String

URL where the file can

be downloaded.

ReferenceFiles

.ReferenceFile

.TargetLanguages

Container Empty element.
SpecialInstructions
String

Container for Special instructions

that will be used by translators.

NotificationSubscriptions

.NotificationSubscription
Container

Container for a notification

subscription. See the

Notification Subscriptions

page for more information

NotificationSubscriptions

.NotificationSubscription

.EventName

String

Event in a project’s life cycle

that will trigger the sending of

the notification.

NotificationSubscriptions

.NotificationSubscription

.Endpoint

String

Where the notification should be

sent.

Product-Based Project Response Example

<Project>
    <ProjectID>132</ProjectID>
    <ProjectName>Name of the project</ProjectName>
    <CreationDate>2014-01-25T10:32:02Z</CreationDate>
    <Status>New</Status>
    <ServiceID>54</ServiceID>
    <SourceLanguage>
        <LanguageCode>en-gb</LanguageCode>
    </SourceLanguage>
    <TargetLanguages>
        <TargetLanguage>
            <LanguageCode>it-it</LanguageCode>
        </TargetLanguage>
        <TargetLanguage>
            <LanguageCode>fr-fr</LanguageCode>
        </TargetLanguage>
    </TargetLanguages>
    <TotalCost>10.00</TotalCost>
    <Currency>EUR</Currency>

    <Products>
        <Product>
            <AssetID>999</AssetID>
            <SKUs>
                <SKU>
                    <SKUNumber>123</SKUNumber>
                </SKU>
            </SKUs>
            <DueDate>2014-02-11T10:22:46Z</DueDate>
        </Product>
    </Products>
    <ReferenceFiles/>
    <SpecialInstructions>Special instructions for this project</SpecialInstructions>
    <Errors></Errors>
    <NotificationSubscriptions>
        <NotificationSubscription>
            <EventName>quote-ready</EventName>
            <Endpoint>mailto:test@test.com</Endpoint>
        </NotificationSubscription>
        <NotificationSubscription>
            <EventName>quote-ready</EventName>
            <Endpoint>http://www.test.com</Endpoint>
        </NotificationSubscription>
    </NotificationSubscription>
</Project>

If the price is not yet ready, the response will look like:

<Project>
    <ProjectID>132</ProjectID>
    <ProjectName>Name of the project</ProjectName>
    <CreationDate>2014-01-25T10:32:02Z</CreationDate>
    <Status>New</Status>
    <ServiceID>54</ServiceID>
    <SourceLanguage>
        <LanguageCode>en-gb</LanguageCode>
    </SourceLanguage>
    <TargetLanguages>
        <TargetLanguage>
            <LanguageCode>it-it</LanguageCode>
        </TargetLanguage>
        <TargetLanguage>
            <LanguageCode>fr-fr</LanguageCode>
        </TargetLanguage>
    </TargetLanguages>
    <TotalCost/>
    <Currency>EUR</Currency>

    <Products>
        <Product>
            <AssetID>999</AssetID>
            <SKUs>
                <SKU>
                    <SKUNumber>123</SKUNumber>
                </SKU>
            </SKUs>
        </Product>
    </Products>
    <ReferenceFiles/>
    <SpecialInstructions>Special instructions for this project</SpecialInstructions>
    <Errors></Errors>
    <NotificationSubscriptions>
        <NotificationSubscription>
            <EventName>quote-ready</EventName>
            <Endpoint>mailto:test@test.com</Endpoint>
        </NotificationSubscription>
        <NotificationSubscription>
            <EventName>quote-ready</EventName>
            <Endpoint>http://www.test.com</Endpoint>
        </NotificationSubscription>
    </NotificationSubscription>
</Project>

File-Based Project Response Example

<Project>
    <ProjectID>132</ProjectID>
    <ProjectName>Name of the project</ProjectName>
    <CreationDate>2014-01-25T10:32:02Z</CreationDate>
    <Status>New</Status>
    <ServiceID>54</ServiceID>
    <SourceLanguage>
        <LanguageCode>en-gb</LanguageCode>
    </SourceLanguage>
    <TargetLanguages>
        <TargetLanguage>
            <LanguageCode>it-it</LanguageCode>
        </TargetLanguage>
        <TargetLanguage>
            <LanguageCode>fr-fr</LanguageCode>
        </TargetLanguage>
    </TargetLanguages>
    <Price>10.00</Price>
    <Currency>EUR</Currency>

    <Files>
        <File>
            <AssetID>999</AssetID>
            <FileName>example.txt</FileName>
        </File>
    </Files>
    <ReferenceFiles/>
    <SpecialInstructions/>
    <Errors></Errors>
    <NotificationSubscriptions>
        <NotificationSubscription>
            <EventName>quote-ready</EventName>
            <Endpoint>mailto:test@test.com</Endpoint>
        </NotificationSubscription>
        <NotificationSubscription>
            <EventName>quote-ready</EventName>
            <Endpoint>http://www.test.com</Endpoint>
        </NotificationSubscription>
    </NotificationSubscription>
</Project>

If the price is not yet ready, the response will look like:

<Project>
    <ProjectID>132</ProjectID>
    <ProjectName>Name of the project</ProjectName>
    <CreationDate>2014-01-25T10:32:02Z</CreationDate>
    <Status>New</Status>
    <ServiceID>54</ServiceID>
    <SourceLanguage>
        <LanguageCode>en-gb</LanguageCode>
    </SourceLanguage>
    <TargetLanguages>
        <TargetLanguage>
            <LanguageCode>it-it</LanguageCode>
        </TargetLanguage>
        <TargetLanguage>
            <LanguageCode>fr-fr</LanguageCode>
        </TargetLanguage>
    </TargetLanguages>
    <Price/>
    <AmountDue/>
    <Currency>EUR</Currency>

    <Files>
        <File>
            <AssetID>999</AssetID>
            <FileName>example.txt</FileName>
        </File>
    </Files>
    <ReferenceFiles/>
    <SpecialInstructions/>
    <Errors></Errors>
    <NotificationSubscriptions>
        <NotificationSubscription>
            <EventName>quote-ready</EventName>
            <Endpoint>mailto:test@test.com</Endpoint>
        </NotificationSubscription>
        <NotificationSubscription>
            <EventName>quote-ready</EventName>
            <Endpoint>http://www.test.com</Endpoint>
        </NotificationSubscription>
    </NotificationSubscription>
</Project>

If one of or more files submitted are not compatible with the selected service, the response will look like

<Project>
    <Error>
        <ReasonCode>202</ReasonCode>
        <SimpleMessage>The file example.txt, is not supported by the Voiceover Translation Service</SimpleMessage>
        <DetailedMessage>The Video Translation Service only supports the following file types: .mov, .mp4, .flv, and .wmv</DetailedMessage>
    </Error>
</Project>

Errors

If generate quote encountered an error, the response will contain an Error element consisting of a ReasonCode, SimpleMessage, and DetailedMessage elements. See Error Handling and Rate Throttling for more information. Here are some common cases.

ReasonCode SimpleMessage DetailedMessage
200 Miscellaneous error

A miscellaneous or

unexpected error

has occured.

201

There was a problem

with the source content.

Request body could not

parsed. Please verify

that the XML is well-

formd and the encoding

is correct.

202

This service is not

compatable with the

submitted source

content.

The selected service

does not support the

submitted source

content.

203 Asset does not exist.

A file with this asset

ID does not exist in

the system.

204 Asset is already in use.

One or more of the

referenced assets is

being used in another

project.

205

Incompatible Source

Language.

File with id {id} is in

the wrong language for

this project