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

Bills

Type: array

List of invoices and credit notes

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Bill

Type: object

Details of a bill that would either represent an invoice or a credit note

No Additional Properties

Type: string

The opco identifier of the credit note or the invoice.


Example:

"4999569661752721026"

Type: enum (of string)

Type of the document, invoice or credit notes

Must be one of:

  • "CREDIT_NOTE"
  • "INVOICE"

Type: string

OpCo's organizatinal customer number that uniquely identifies its account. 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


Examples:

"1234567"
"1234567_OVIA"

Type: stringFormat: date-time

The creation date and time of this credit notes.


Examples:

"2021-10-12T08:30:22.804Z"
"2021-10-12T08:30:22.804+01:00"

Price

Type: object

The total amount that should be credited to the customer


Example:

{
    "amount": 2000000,
    "scale": 2,
    "currency": "EUR"
}

Type: integer

the actual unscaled amount


Example:

205987

Type: integer

the scale to be applied on the unscaled amount

Value must be greater or equal to 0


Example:

2

Type: string

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


Example:

"EUR"


Invoice

Type: object

Details of an invoice. This document describe invoice meta informations, Invoice complete informations can be downloaded by the customer throught the get document endpoint of the order history api

No Additional Properties

Type: enum (of string)

The status of the bill document. These statuses will not be validated within Spark but will be displayed to the user as CMS label mapped to the status.

Must be one of:

  • "PENDING"
  • "PARTIALLY_PAID"
  • "PAID"

Example:

"PENDING"

Type: stringFormat: date-time

The due date and time where the total amount the should be payed by the customer


Examples:

"2021-10-12T08:30:22.804Z"
"2021-10-12T08:30:22.804+01:00"

Type: array of string

The list of order ids concerned by this invoice

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:


Examples:

[
    "order1"
]
[
    "order1",
    "order2"
]

CreditNote

Type: object

Details of a credit note; It's sort of a negative bill. It is an amount credited generally during a product return, but also to correct a price or invoicing error. It affects the value of customer invoices and credit line limit.

No Additional Properties

Type: enum (of string)

The status of the bill document. These statuses will not be validated within Spark but will be displayed to the user as CMS label mapped to the status.

Must be one of:

  • "PARTIALLY_USED"
  • "USED"
  • "UNUSED"

Example:

"PARTIALLY_USED"

Type: array of string

An optional list of order ids concerned by this credit note.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:


Examples:

[
    "order1"
]
[
    "order1",
    "order2"
]

Type: array of string

An optional list of invoice numbers concerned by this credit note.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:


Examples:

[
    "4999569661752721026"
]
[
    "4999569661752721027",
    "4999569661752721028"
]

Type: string

Optional field, needed by OpCo organised with a regional model or commercial organisation. It can be used to filter or route based on the orgId.


Examples:

"org123"
"SNE"

Price

Type: object

The amount due in case the bill is partially processed.


Example:

{
    "amount": 500000,
    "scale": 2,
    "currency": "EUR"
}

Type: integer

the actual unscaled amount


Example:

205987

Type: integer

the scale to be applied on the unscaled amount

Value must be greater or equal to 0


Example:

2

Type: string

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


Example:

"EUR"

Example:

[
    {
        "billNumber": "invoice1",
        "type": "INVOICE",
        "accountId": "account1",
        "createdDateTime": "2021-10-12T08:30:22.804Z",
        "totalAmount": {
            "amount": 552777,
            "scale": 2,
            "currency": "EUR"
        },
        "details": {
            "status": "PENDING",
            "dueDateTime": "2021-12-12T08:30:22.804Z",
            "orderIds": [
                "order1",
                "order2"
            ]
        }
    },
    {
        "billNumber": "invoice2",
        "type": "INVOICE",
        "accountId": "account1",
        "createdDateTime": "2021-10-12T08:30:22.804Z",
        "totalAmount": {
            "amount": 552777,
            "scale": 2,
            "currency": "EUR"
        },
        "details": {
            "status": "PARTIALLY_PAID",
            "dueDateTime": "2021-12-12T08:30:22.804Z",
            "orderIds": [
                "order1",
                "order2"
            ]
        },
        "dueAmount": {
            "amount": 100000,
            "scale": 2,
            "currency": "EUR"
        }
    },
    {
        "billNumber": "invoice3",
        "type": "INVOICE",
        "accountId": "account1",
        "createdDateTime": "2021-10-12T08:30:22.804Z",
        "totalAmount": {
            "amount": 552777,
            "scale": 2,
            "currency": "EUR"
        },
        "details": {
            "status": "PAID",
            "dueDateTime": "2021-11-12T08:30:22.804Z",
            "orderIds": [
                "order1",
                "order2"
            ]
        }
    },
    {
        "billNumber": "credit1",
        "type": "CREDIT_NOTE",
        "accountId": "account2",
        "createdDateTime": "2021-10-12T08:30:22.804+01:00",
        "totalAmount": {
            "amount": 50077,
            "scale": 2,
            "currency": "EUR"
        },
        "details": {
            "status": "USED",
            "orderIds": [
                "order1",
                "order2"
            ]
        }
    },
    {
        "billNumber": "credit2",
        "type": "CREDIT_NOTE",
        "accountId": "account3",
        "createdDateTime": "2021-10-12T08:30:22.804+01:00",
        "totalAmount": {
            "amount": 50077,
            "scale": 2,
            "currency": "EUR"
        },
        "details": {
            "status": "UNUSED",
            "invoiceNumbers": [
                "invoice1",
                "invoice2"
            ]
        }
    }
]