Reject File Translation

Resource:
/api/files/<<asset id>>/<<language code>>/reject/
Method:
POST

This API is typically used to report structural issues with the deliverables such as validation failures or missing tokens. When the Reject API is called, the translated file goes into a “rejected” status and a remediation workflow is started at Lionbridge. When the issue is resolved, the project is re-delivered with a “project complete” notification.

Request Body

Parameter Type Comments
RejectFile
Container

Contains information

on rejecting

translated file.

RejectFile

.ReasonCode
String

Integer representing

the reason number of

rejecting translated file.

RejectFile

.ReasonDescription
String (optional)

String representing

the description of rejecting

translated file.

Reject File Translation Example

<RejectFile>
    <ReasonCode>5000</ReasonCode>
    <ReasonDescription>
        Failed .po file validation

        Failure Details:

        <![CDATA[
          #: od_api/exceptions.py:239 od_api/serializers.py:454
          msgid "Asset is already in use."
          msgstr "
                 ^^^^^ expected end quote
        ]>

    </ReasonDescription>
</RejectFile>

Response Body

Parameter Type Comments
AssetID
Integer

ID of the uploaded file

this ID will be used

when creating a quote

Name
String Name of the file passed
Status
String

The status of the file.

Rejected

SourceLanguage

.LanguageCode
String

See LanguageCode in

glossary

The LanguageCode element

will be empty if the

client requested

language detection and

the file has not been

analyzed yet or if

language detection

failed.

TargetLanguage

.LanguageCode
String

String represents

the rejected

language code

See LanguageCode in

glossary

Rejection
Container

Contains information

on rejecting

translated file.

Rejection

.ReasonCode
String

Integer representing

the reason number of

rejecting translated file.

Rejection

.ReasonDescription
String (optional)

String representing

the description of rejecting

translated file.

Project
Container

Contains information

on project

Project

.ProjectID
Integer

onDemand ID of the

project

Project

.URL
String

A URL that can be

checked for the status

of the project.

Project

.Status
String Status of the project

Project

.ProjectName
String Name of the project

Project

.ServiceID
Integer  

Project

.Price
Decimal  

Project

.Currency
String

Currency paid for the

project.  See glossary

for list of valid

currencies.

Project

.CreationDate
String

String representing

Date/Time (ISO 8601)

that the Item was

added to onDemand.

Project

.DueDate
String

String representing

Date/Time (ISO 8601)

that the translation

of the project is

scheduled to be

completed.

Project

.CompletionDate
String

String representing

Date/Time (ISO 8601)

that the translation of

the item was completed.

Project

.SourceLanguage

.LanguageCode
String

See LanguageCode in

glossary

Project

.TargetLanguages
Container

Container containing

target languages.

Project

.TargetLanguages

.TargetLanguage

.LanguageCode
String

See LanguageCode in

glossary

Response Body

<File>
  <AssetID>1711</AssetID>
  <Name>500errors.txt</Name>
  <Status>Rejected</Status>
  <SourceLanguage>
    <LanguageCode>en-gb</LanguageCode>
  </SourceLanguage>
  <TargetLanguage>
    <LanguageCode>es-us</LanguageCode>
  </TargetLanguage>
  <Rejection>
    <ReasonCode>5000</ReasonCode>
    <ReasonDescription>
        Failed .po file validation

        Failure Details:

        <![CDATA[
          #: od_api/exceptions.py:239 od_api/serializers.py:454
          msgid "Asset is already in use."
          msgstr "
                 ^^^^^ expected end quote
        ]>
    </ReasonDescription>
  </Rejection>
  <Project>
    <ProjectID>423</ProjectID>
    <URL>http://localhost:8000/api/projects/423</URL>
    <ProjectName>test job 1234</ProjectName>
    <Status>Complete</Status>
    <ServiceID>14</ServiceID>
    <Price>2947.86</Price>
    <Currency>EUR</Currency>
    <CreationDate>2015-10-21T16:56:51Z</CreationDate>
    <DueDate>2015-10-27T15:57:00Z</DueDate>
    <CompletionDate>2016-02-16T17:20:03Z</CompletionDate>
    <SourceLanguage>
      <LanguageCode>en-gb</LanguageCode>
    </SourceLanguage>
    <TargetLanguages>
      <TargetLanguage>
        <LanguageCode>he-il</LanguageCode>
      </TargetLanguage>
      <TargetLanguage>
        <LanguageCode>hi-in</LanguageCode>
      </TargetLanguage>
      <TargetLanguage>
        <LanguageCode>it-it</LanguageCode>
      </TargetLanguage>
      <TargetLanguage>
        <LanguageCode>pl-pl</LanguageCode>
      </TargetLanguage>
      <TargetLanguage>
        <LanguageCode>es-us</LanguageCode>
      </TargetLanguage>
    </TargetLanguages>
  </Project>
</File>

Return Codes

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

The request did not

pass authentication or

the customer is not a

member of an enterprise

site.