Skip to main content

Invoice Line Record

Represents a details line in an invoice or quotation.

Contained as a collection in Invoice Document Record

PROPERTIES

idx

A sequential number for the lines, starting at 1.

int

desc

The line description, a free text. Optional.

string?

src

Optional. The source language code of the service. To discover all languages see settings/languages

string?

trg

Optional. The target language code of the service. To discover all languages see settings/languages

string?

task

Optional. The service task code such as TR for translation or RV for revision. To discover all task types, see settings/tasks/codes

string?

code

Optional product / service code.

string?

Fuzzy match & Pre-translation

pretrans

Indicates if the line refers to a pre-translation or fuzzy match or repetition. Options are:

string?

pretransBoundary

If pretrans is other than Default, it indicates the match %:

  • <100 : Used with Default and indicates the fuzzy match or repetition %.

  • 100 : For MT and identical pre-translations. Used with Pretranslated, PretranslatedPrev, PretranslatedMT

  • 110 : For perfect (in-context) pre-translations. Used with PretranslatedCtx, PretranslatedPrevCtx

  • 0 : Default if none.

int

Unit price

serviceUnit

Optional. The unit that is costed. Such as “WD” (words) or “CH” (characters). See also: Price units. Null if the invoice lines does not state a unit price.

string?

serviceUnitCount

Optional. Number of units included in the unit price. 0 if not specified.

int

serviceUnitAmount

Optional. Unit price that is the price of serviceUnitCount units of type serviceUnit. For example: 1 EUR for 10 characters.

decimal?

count

Total count. Optional, can be null if the line does not state any counts.

int?

countIgnore

Boolean. True if count is null.

bool

Fees and reductions

reduction

Applicable reduction in %. Must be between 0 and 100. The reduction is applied to the base total in amountBase. This then gives the amount.

int

feePercent

If not null then the invoice line represents a fee or discount.

  • A positive percentage is a fee. Value up to 100.

  • A negative percentage is a discount. Value down to -100.

The fee is calculated from all invoice lines as per feeMode. The system then automatically calculates the amount. The amountBase is the same as amount.

When setting the fee, other properties such as unit prices, counts, etc. are not populated or used.

decimal?

feeMode

Optional, null if no fee defined.

Values are:

  • PercentBefore : The fee is a percentage of the original total (before applying any other fees).

  • PercentAfter : The fee is percentage of the original total and all previously applied fees.

Also see the Wordbee Translator system on how to configure fees in the invoice details page.

string?

amount

Total amount after reductions. See reduction and feeMode / feePercent. Null if not specified.

decimal?

amountBase

Total amount before reductions. Null if not specified.

decimal?

EXAMPLES

Example payload: with a unit price specified:

CODE
{
    "idx": 3,
    "desc": "One word.txt 2 updated",
    "src": "es",
    "trg": "de",
    "task": "RV",
    "code": "P-220",
    "pretrans": null,
    "pretransBoundary": 0,
    "serviceUnit": "WD",
    "serviceUnitCount": 1,
    "serviceUnitAmount": 0.2000,
    "count": 1200.00,
    "countIgnore": false,
    "reduction": 0.0000,
    "feeMode": null,
    "feePercent": null,
    "amount": 240.0000,
    "amountBase": 240.0000
}

Example payload with minimal information:

CODE
{
    "idx": 3,
    "desc": "Just a line without much info",
    "src": null,
    "trg": null,
    "task": null,
    "code": null,
    "pretrans": null,
    "pretransBoundary": 0,
    "serviceUnit": null,
    "serviceUnitCount": 0,
    "serviceUnitAmount": null,
    "count": null,
    "countIgnore": true,
    "reduction": 0.0000,
    "feeMode": null,
    "feePercent": null,
    "amount": 100.0000,
    "amountBase": 100.0000
}

An line with a fee. As you can see, most properties are not populated with fee-lines.

CODE
{
    "idx": 3,
    "desc": "10% fee",
    "src": null,
    "trg": null,
    "task": null,
    "code": null,
    "pretrans": null,
    "pretransBoundary": 0,
    "serviceUnit": null,
    "serviceUnitCount": 0,
    "serviceUnitAmount": null,
    "count": null,
    "countIgnore": true,
    "reduction": 0.0000,
    "feeMode": "PercentBefore",
    "feePercent": 10.0000,
    "amount": 17.9800,
    "amountBase": 17.9800
}

A line with a discount:

CODE
{
    "idx": 1,
    "desc": "20% discount",
    "src": null,
    "trg": null,
    "task": null,
    "code": null,
    "pretrans": null,
    "pretransBoundary": 0,
    "serviceUnit": null,
    "serviceUnitCount": 0,
    "serviceUnitAmount": null,
    "count": null,
    "countIgnore": true,
    "reduction": 0.0000,
    "feeMode": "PercentBefore",
    "feePercent": -20.0000,
    "amount": -35.9600,
    "amountBase": -35.9600
}

INSERTING AND UPDATING

When inserting or updating a line, you need to include all properties you want to assign to the line.

Comments:

  • idx : Not required and will be automatically assigned.

  • All properties are optional and you can literally submit an empty JSON such as { } just fine. It won't make sense of course…

At minimum we recommend to supply at minimum these properties:

  • desc

  • amount

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.