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

Purchase Bill

Type: object

purchase-bill topic object description.

Used to transfer Purchase Invoices and Credit Notes events from marketplace Sellers to OpCos.
It is not the same as the bill model which is used for OpCos to Customers billing events.

No Additional Properties
Example:

{
    "type": "INVOICE",
    "documents": [
        {
            "id": "4999569661752721026"
        }
    ],
    "issueDate": "2023-05-25T09:15:22.807Z",
    "opcoSellerId": "shop-2009",
    "sellerDocumentId": "SCHN-2812939182",
    "totalAmount": {
        "amount": 13800,
        "scale": 2,
        "currency": "EUR"
    },
    "totalAmountIncludingTaxes": {
        "amount": 17760,
        "scale": 2,
        "currency": "EUR"
    },
    "totalByTax": [
        {
            "code": "tax-fra-20",
            "taxAmount": {
                "amount": 12000,
                "scale": 4,
                "currency": "EUR"
            }
        },
        {
            "code": "tax-fra-shipping",
            "isShipping": true,
            "taxAmount": {
                "amount": 12000,
                "scale": 4,
                "currency": "EUR"
            }
        },
        {
            "code": "ecotax-deee",
            "isSurcharge": true,
            "taxAmount": {
                "amount": 260,
                "scale": 2,
                "currency": "EUR"
            }
        }
    ],
    "lineItems": [
        {
            "netPrice": {
                "amount": 138,
                "currency": "EUR"
            },
            "opCoPurchaseOrderId": "SON-PO-123456789",
            "opCoPurchaseOrderLineId": "SON-PO-123456789-1",
            "shippingCost": {
                "amount": 2,
                "currency": "EUR"
            },
            "taxes": [
                {
                    "code": "tax-fra-20",
                    "taxAmount": {
                        "amount": 133,
                        "scale": 2,
                        "currency": "EUR"
                    },
                    "percentage": 20
                },
                {
                    "code": "tax-fra-shipping",
                    "isShipping": true,
                    "taxAmount": {
                        "amount": 12,
                        "scale": 2,
                        "currency": "EUR"
                    },
                    "percentage": 20
                },
                {
                    "code": "ecotax-deee",
                    "isSurcharge": true,
                    "taxAmount": {
                        "amount": 3,
                        "scale": 1,
                        "currency": "EUR"
                    }
                }
            ],
            "unitNetPrice": {
                "amount": 13800,
                "scale": 2,
                "currency": "EUR"
            }
        }
    ]
}

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:

  • "MARKETPLACE"

Type: enum (of string)

The version of the json format event

Must be one of:

  • "v1"

Type: enum (of string)

Defines the type of document.
- INVOICE: Amounts are owed by the OpCo to the Seller.
- CREDIT_NOTE: Amounts are owed by the Seller to the OpCo.

Must be one of:

  • "INVOICE"
  • "CREDIT_NOTE"

Type: string

Seller ID, as known by the opCo. It represents the entity emitting the purchase bill.


Example:

"shop-2009"

Type: string

Identifier of the document as provided by the seller.

Type: stringFormat: date-time

Date on which this accounting document has been issued.


Example:

"2023-05-25T09:15:22.807Z"

Price

Type: object

The total amount of the purchase bill excluding taxes.


Example:

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

Type: integer

the actual unscaled amount based on list or customer


Example:

205987

Type: integer Default: 0

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


Example:

"EUR"

Price

Type: object

The total amount of the purchase bill including all taxes.


Example:

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

Type: integer

the actual unscaled amount based on list or customer


Example:

205987

Type: integer Default: 0

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


Example:

"EUR"

Type: array

This is the sum of tax amounts of all line items grouped by tax code.

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.

No Additional Properties

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:

"tax-fra-20"
"tax-fra-shipping"
"ecotax-deee"

Price

Type: object

contains the amount informations based on the type of prices we might have

Type: integer

the actual unscaled amount based on list or customer


Example:

205987

Type: integer Default: 0

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


Example:

"EUR"

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: boolean Default: false

This flag determines if the tax is applied on the shipping cost


Example:

true

Type: number

The percentage of the net price


Example:

20.0

Example:

[
    {
        "code": "tax-fra-20",
        "taxAmount": {
            "amount": 12000,
            "scale": 4,
            "currency": "EUR"
        }
    },
    {
        "code": "tax-fra-shipping",
        "isShipping": true,
        "taxAmount": {
            "amount": 12000,
            "scale": 4,
            "currency": "EUR"
        }
    },
    {
        "code": "ecotax-deee",
        "isSurcharge": true,
        "taxAmount": {
            "amount": 260,
            "scale": 2,
            "currency": "EUR"
        }
    }
]

Type: array

List of document representing this purchase bill

No Additional Items

Each item of this array must be:

DocumentReference

Type: object

Information identifying a document.

Type: string

The id of the document.
This can be used to download the document from Mirakl as the document_request_id parameter of the DR73 api.


Example:

"4999569661752721026"

Type: array

Line items that are part of this purchase bill.

Must contain a minimum of 1 items

No Additional Items

Each item of this array must be:

Type: object

A line item part of this purchase bill.

No Additional Properties

Type: string

Identifier of the purchase order initially sent by the OpCo to the Seller and associated to this purchase bill line item.
Note that one invoice document can reference line items from different purchase orders.

Type: string

The identifier of this lineItem in the opco purchase order

Price

Type: object

Purchase order line’s price excluding shipping charges

Type: integer

the actual unscaled amount based on list or customer


Example:

205987

Type: integer Default: 0

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


Example:

"EUR"

Price

Type: object

Purchase unit price (computed from the provided offer price)

Type: integer

the actual unscaled amount based on list or customer


Example:

205987

Type: integer Default: 0

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


Example:

"EUR"

Price

Type: object

This is the shipping cost for this line item excluding taxes.


Example:

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

Type: integer

the actual unscaled amount based on list or customer


Example:

205987

Type: integer Default: 0

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


Example:

"EUR"

Type: array

List of taxes applied on this line item (price, shipping costs, eco tax)

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.

No Additional Properties

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:

"tax-fra-20"
"tax-fra-shipping"
"ecotax-deee"

Price

Type: object

contains the amount informations based on the type of prices we might have

Type: integer

the actual unscaled amount based on list or customer


Example:

205987

Type: integer Default: 0

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


Example:

"EUR"

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: boolean Default: false

This flag determines if the tax is applied on the shipping cost


Example:

true

Type: number

The percentage of the net price


Example:

20.0

Example:

[
    {
        "code": "tax-fra-20",
        "taxAmount": {
            "amount": 133,
            "scale": 2,
            "currency": "EUR"
        },
        "percentage": 20
    },
    {
        "code": "tax-fra-shipping",
        "isShipping": true,
        "taxAmount": {
            "amount": 12,
            "scale": 2,
            "currency": "EUR"
        },
        "percentage": 20
    },
    {
        "code": "ecotax-deee",
        "isSurcharge": true,
        "taxAmount": {
            "amount": 3,
            "scale": 1,
            "currency": "EUR"
        }
    }
]