This is a html view of the json schema please take the json schema as reference DOWNLOAD THE JSON SCHEMA

Billing

Type: object

In Pilot: Billing event that can be either invoice or credit note. It contains global information of the billing (inside billingHeader object) or about the line (billingLines object)

It is mandatory that on first event for a credit note or invoice billingHeader is present.
No Additional Properties

Type: object

If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

Type: object

Type: object

Type: array
No Additional Items

At least one of the items must be:

Type: const
Specific value: "BILLING_HEADER"
Type: object

The following properties are required:

  • billingHeader
Type: object

If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

Type: object

Type: object

Type: array
No Additional Items

At least one of the items must be:

Type: const
Specific value: "BILLING_LINES"
Type: object

The following properties are required:

  • billingLines
Type: object

If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

Type: object

Type: object

Type: const
Specific value: "INVOICE"
Type: object

Type: object

The following properties are required:

  • dueDate
Type: object

If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

Type: object

This condition is used to ensure that the billingLines array contains the required fields when the issueTrigger is DELIVERY.

Type: object

Type: array
No Additional Items

At least one of the items must be:

Type: const
Specific value: "BILLING_LINES"

Type: object

Type: const
Specific value: "DELIVERY"
Type: object

Type: array
No Additional Items

Each item of this array must be:

Type: object

The following properties are required:

  • logisticOrderId
  • logisticOrderLineId
Type: object

If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

Type: object

Type: object

Type: array
No Additional Items

At least one of the items must be:

Type: const
Specific value: "PAYMENT"
Type: object

The following properties are required:

  • payment

EventHeader

Type: object

This object is used to describe some technical meta information related to the event

Type: enum (of string)

The application source of this event

Must be one of:

  • "OPCO"
  • "SPARK"

Type: enum (of string)

The version of the json format event

Must be one of:

  • "v1"

Type: array of enum (of string)

defines if the event contains information about Header or lines or both

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Type: enum (of string)

Must be one of:

  • "BILLING_HEADER"
  • "BILLING_LINES"
  • "PAYMENT"

identifier

Type: object

primary key of the document, cannot be modified once the document is created. can mono mono or composite

Type: string

unique internal billing id as known on the backend/source system

Must be at least 1 characters long

Type: object

It contains global information about the billing.

Type: string

represents the billing number of the document visible to customer

Must be at least 1 characters long

Type: string

The account id that uniquely identifies the account to which the amount is billed to, can be equal to sold to. In the case of OpCo organised with a regional model or commercial organisation this should be suffix by '{orgId}'. if the accountId is 13563 and the orgId is OVIA so this field should contains 13563OVIA

Must be at least 1 characters long


Examples:

"1234567"
"1234567_OVIA"

Type: string

The account id that uniquely identifies the account to which the billing's line items were sold to. In the case of OpCo organised with a regional model or commercial organisation this should be suffix by '{orgId}'. if the accountId is 13563 and the orgId is OVIA so this field should contains 13563OVIA

Must be at least 1 characters long


Examples:

"1234567"
"1234567_OVIA"

Type: string

The account id that uniquely identifies the account in case it's different from billTo. In the case of OpCo organised with a regional model or commercial organisation this should be suffix by '{orgId}'. if the accountId is 13563 and the orgId is OVIA so this field should contains 13563OVIA

Must be at least 1 characters long


Examples:

"1234567"
"1234567_OVIA"

Type: enum (of string)

Type of the document, invoice or credit notes

Must be one of:

  • "INVOICE"
  • "CREDIT_NOTE"

Type: enum (of string)

The status of the billing document. These statuses will be displayed to the user as CMS label mapped to the status.
- EFFECTIVE: The billing status when it is created.
- CANCELLED: The billing document has been cancelled.
- PAID: The invoice document has been paid in full.
- PARTIALLYPAID: The invoice document has been partially paid.
- PARTIALLY
REFUNDED: The credit note document has been partially refunded, deducted from the credit limit or refund to the customer bank.
- REFUNDED: The credit note document has been refunded, deducted from the credit limit or refund to the customer bank.
- PROCESSING: The payment has been issued and it's waiting for the OpCo validation

Must be one of:

  • "EFFECTIVE"
  • "CANCELLED"
  • "PAID"
  • "PARTIALLY_PAID"
  • "PARTIALLY_REFUNDED"
  • "REFUNDED"
  • "PROCESSING"

Type: enum (of string)

Defines if invoice is triggered at sales order capture or at goods issue

Must be one of:

  • "SALES"
  • "DELIVERY"

Type: stringFormat: date-time

date of issuing of the billing document

Type: stringFormat: date-time

date when the invoice is due

Type: stringFormat: date-time

last modification date (in date-time format)

Type: object

total amount to be paid with detailed included taxes, surcharges ( like freight / shipping cost)

Price

Type: object

total price including taxes, including all costs

Type: integer

The actual unscaled amount


Example:

205987

Type: integer

The scale to be applied on the unscaled amount


Example:

2

Type: string

The currency code following the ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Price

Type: object

Total shipping cost without taxes

Type: integer

The actual unscaled amount


Example:

205987

Type: integer

The scale to be applied on the unscaled amount


Example:

2

Type: string

The currency code following the ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: array

The total amount of each tax.
Total tax amounts should be grouped by (type, percentage) to cover the case of different percentages for the same taxe type.

No Additional Items

Each item of this array must be:

Tax

Type: object

Contains the tax informations with both percentage or exact amount as preferable.

Type: object

A tax with a fixed amount.

No Additional Properties

Type: object

A tax represented by a percentage.

No Additional Properties

Type: object

A tax with a code, fixed amount, rate. Used to describe a marketplace tax.

No Additional Properties

Price

Type: object

Type: integer

The actual unscaled amount


Example:

205987

Type: integer

The scale to be applied on the unscaled amount


Example:

2

Type: string

The currency code following the ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: string

Type of tax which is applicable to the underlying product.


Example:

"VAT"

Type: boolean Default: false

This flag determines if the tax is a surcharge to be added to netPrice/promotionalNetPrice before applying Tax. The Tax computation happens on top of ((netPrice or promotionalNetPrice)+surcharges)


Example:

true

Type: number

The percentage of the net price


Example:

20.0

Type: string

A tax code which identifies the tax applied to this item. It can be used to carry more details than the high level tax type information.


Examples:

"VAT_5_5"
"VAT_10"
"VAT_20"

Type: boolean Default: false

This flag determines if the tax applies to shipping costs.
Example: option and scenario costs.


Example:

[
    {
        "type": "VAT",
        "isSurcharge": false,
        "taxAmount": {
            "amount": 12000,
            "scale": 4,
            "currency": "EUR"
        },
        "percentage": 20
    },
    {
        "type": "VAT",
        "isSurcharge": false,
        "taxAmount": {
            "amount": 100,
            "scale": 4,
            "currency": "EUR"
        },
        "percentage": 5.5
    },
    {
        "type": "ECOTAXE",
        "isSurcharge": true,
        "taxAmount": {
            "amount": 260,
            "scale": 2,
            "currency": "EUR"
        }
    }
]

Type: object

due amount left to be paid with detailed included taxes

Price

Type: object

due amount without taxes

Type: integer

The actual unscaled amount


Example:

205987

Type: integer

The scale to be applied on the unscaled amount


Example:

2

Type: string

The currency code following the ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: array

The total amount of each tax.
Total tax amounts should be grouped by (type, percentage) to cover the case of different percentages for the same taxe type.

No Additional Items

Each item of this array must be:

Tax

Type: object

Contains the tax informations with both percentage or exact amount as preferable.

Type: object

A tax with a fixed amount.

No Additional Properties

Type: object

A tax represented by a percentage.

No Additional Properties

Type: object

A tax with a code, fixed amount, rate. Used to describe a marketplace tax.

No Additional Properties

Price

Type: object

Type: integer

The actual unscaled amount


Example:

205987

Type: integer

The scale to be applied on the unscaled amount


Example:

2

Type: string

The currency code following the ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: string

Type of tax which is applicable to the underlying product.


Example:

"VAT"

Type: boolean Default: false

This flag determines if the tax is a surcharge to be added to netPrice/promotionalNetPrice before applying Tax. The Tax computation happens on top of ((netPrice or promotionalNetPrice)+surcharges)


Example:

true

Type: number

The percentage of the net price


Example:

20.0

Type: string

A tax code which identifies the tax applied to this item. It can be used to carry more details than the high level tax type information.


Examples:

"VAT_5_5"
"VAT_10"
"VAT_20"

Type: boolean Default: false

This flag determines if the tax applies to shipping costs.
Example: option and scenario costs.


Example:

[
    {
        "type": "VAT",
        "isSurcharge": false,
        "taxAmount": {
            "amount": 12000,
            "scale": 4,
            "currency": "EUR"
        },
        "percentage": 20
    },
    {
        "type": "VAT",
        "isSurcharge": false,
        "taxAmount": {
            "amount": 100,
            "scale": 4,
            "currency": "EUR"
        },
        "percentage": 5.5
    },
    {
        "type": "ECOTAXE",
        "isSurcharge": true,
        "taxAmount": {
            "amount": 260,
            "scale": 2,
            "currency": "EUR"
        }
    }
]

Type: array of string

In case of credit note this will reference invoices (billing having billingNumber) for which the credit note is refunding

No Additional Items

Each item of this array must be:

Type: string

Must be at least 1 characters long

Type: array of object

List of billing lines.

No Additional Items

Each item of this array must be:

Type: object

Type: integer

billing line id of the billing document

Type: string

sales order id of the sales order related to that line

Must be at least 1 characters long

Type: integer

sales order line id reference in this sales order id for that line ( can cover more than 1 line, potentially with different delivery order id in case of a split )

Type: string

logistic order id of the logistic order related to that line

Must be at least 1 characters long

Type: integer

logistic order line id reference in this logistic order id for that line

Type: string

Unique identifier for the product.

Must be at least 1 characters long

Type: string

supplier id that has provided this product ( can be different from the manufacturer of the product )

Type: integer

quantity of this product in this line

Value must be greater or equal to 0

Price

Type: object

Total amount without shipping without taxes

Type: integer

The actual unscaled amount


Example:

205987

Type: integer

The scale to be applied on the unscaled amount


Example:

2

Type: string

The currency code following the ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Price

Type: object

Shipping cost applied to this line also without taxes

Type: integer

The actual unscaled amount


Example:

205987

Type: integer

The scale to be applied on the unscaled amount


Example:

2

Type: string

The currency code following the ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: array

all taxes applicable to this product

No Additional Items

Each item of this array must be:

Tax

Type: object

Contains the tax informations with both percentage or exact amount as preferable.

Type: object

A tax with a fixed amount.

No Additional Properties

Type: object

A tax represented by a percentage.

No Additional Properties

Type: object

A tax with a code, fixed amount, rate. Used to describe a marketplace tax.

No Additional Properties

Price

Type: object

Type: integer

The actual unscaled amount


Example:

205987

Type: integer

The scale to be applied on the unscaled amount


Example:

2

Type: string

The currency code following the ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Type: string

Type of tax which is applicable to the underlying product.


Example:

"VAT"

Type: boolean Default: false

This flag determines if the tax is a surcharge to be added to netPrice/promotionalNetPrice before applying Tax. The Tax computation happens on top of ((netPrice or promotionalNetPrice)+surcharges)


Example:

true

Type: number

The percentage of the net price


Example:

20.0

Type: string

A tax code which identifies the tax applied to this item. It can be used to carry more details than the high level tax type information.


Examples:

"VAT_5_5"
"VAT_10"
"VAT_20"

Type: boolean Default: false

This flag determines if the tax applies to shipping costs.
Example: option and scenario costs.

Type: object

Margins for the line.

Price

Type: object

margin related to this product for this line, as visible by the sales team

Type: integer

The actual unscaled amount


Example:

205987

Type: integer

The scale to be applied on the unscaled amount


Example:

2

Type: string

The currency code following the ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Price

Type: object

margin related to this product for this line, as published by accounting

Type: integer

The actual unscaled amount


Example:

205987

Type: integer

The scale to be applied on the unscaled amount


Example:

2

Type: string

The currency code following the ISO 4217 standard 3 letter in which the prices are being displayed

Must be at least 3 characters long

Must be at most 3 characters long


Example:

"EUR"

Payment

Type: object

Payment information related to this billing document. It contains the transaction id of the payment done by the customer for this invoice or credit note.

Type: string

Unique identifier of the payment transaction

Must be at least 1 characters long


Example:

"23456789"