OCS Bill Run Invoice Layout
This message is published when OCS Bill Run Invoice is created and needs to be formatted.
Default Topic |
rm-bill-run-invoice-layouts |
Content-Type |
application/json |
Payload |
Message Headers
Header | Description | Value |
---|---|---|
X-Ocs-Io-message-code |
Code of the Message |
ocsBillRunInvoice |
X-Ocs-Io-message-payload |
Name (JAVA’s Simple Name) of the Message’s Payload |
DocumentEx |
X-Ocs-Io-bc-ref-id |
Ref ID of the Bill Cycle |
|
X-Ocs-Io-bc-code |
Code of the Bill Cycle |
|
X-Ocs-Io-bc-run-ref-id |
Ref ID of the Bill Cycle Run |
|
X-Ocs-Io-account-ref-id |
Ref ID of the Account for which Document (excl. OCS Invoice) is created |
|
X-Ocs-Io-account-external-id |
External ID of the Account for which Document (excl. OCS Invoice) is created |
Message Example
{
"refId": "0",
"documentSource": {
"refId": "nPlFTO1BIgMwgU",
"code": "ocs",
"name": "OCS"
},
"documentType": {
"refId": "nPOu0bqoPUIvXV",
"code": "ocsInvoice",
"name": "OCS Invoice"
},
"documentNo": "ec5a40ee-090a-4eb0-9823-3380f98b5771",
"customer": {
"refId": "nPzW5JqUpmjKWA",
"externalId": "cust-test"
},
"account": {
"refId": "nPBjkidZsc2rUz",
"externalId": "acc-test"
},
"currency": {
"symbol": "Eur",
"refId": "nPOB8vqoP67JNH",
"code": "EUR",
"name": "EURO"
},
"documentCode": "pdf",
"documentName": "PDF",
"documentIssuedDate": "2020-10-29T16:54:46.150+01:00",
"documentTaxDate": "2020-10-29T16:54:46.150+01:00",
"documentDueDate": "2020-10-29T16:54:46.150+01:00",
"totalAmount": 333744627,
"totalAmountNet": 403831000,
"totalAmountTax": 70086373,
"totalInvoiced": 403831000,
"roundingCompensation": 0,
"taxSummary": [
{
"currency": {
"symbol": "Eur",
"refId": "nPOB8vqoP67JNH",
"code": "EUR",
"name": "EURO"
},
"tax": {
"refId": "nPSFkkXsuvfIOy",
"code": "S_VAT",
"name": "Standard VAT"
},
"taxValue": 2100,
"totalAmount": 333744627,
"totalAmountNet": 403831000,
"totalAmountTax": 70086373
}
],
"vatExemption": false,
"paymentRef1": "ref1",
"paymentRef2": "ref2",
"paymentRef3": "ref3",
"documentCreatedDate": "2020-10-29T16:54:47.787+01:00",
"documentCreatedBy": "usr01",
"billCycle": {
"refId": "nPgkU453oPIprE",
"code": "mnt01",
"name": "Monthly 1.",
"billingPeriodStart": "2020-10-01T00:00:00.000+02:00",
"billingPeriodEnd": "2020-11-01T00:00:00.000+01:00",
"billCycleRunRefId": "nPouY3kOp1W3rC"
},
"accounts": {
"nPBjkidZsc2rUz": {
"offerSubscriptionRefIds": [
"nPeWhtJAVz6VwM",
"nPEfQUJwoP9rgB"
],
"invoiceSectionsCount": 3,
"invoiceSections": [
{
"level": 1,
"hasChild": false,
"aggregatedEvents": [
{
"offer": {
"entityName": "Offer",
"refId": "nPN8AhYlHN02lc"
},
"productService": {
"entityName": "ProductService",
"refId": "nPRcFV7DSqXkxP"
},
"chargingClass": {
"entityName": "ChargingClass",
"refId": "nPdfmf39yuNyn2"
},
"tax": {
"entityName": "Tax",
"refId": "nPSFkkXsuvfIOy"
},
"taxValue": 2100,
"currency": {
"entityName": "Currency",
"refId": "nPOB8vqoP67JNH"
},
"eventStart": "2020-10-22T11:36:35.157+02:00",
"chargeType": "DEBIT",
"unitsOfMeasurement": "EVENT",
"eventTotalVolume": 1,
"eventTotalPrice": 82644628,
"eventTotalPriceNet": 100000000,
"eventTotalPriceTax": 17355372,
"eventInvoicedPrice": 82644628,
"ratedTotalPrice": 82644628,
"ratedTotalVolume": 1
}
],
"chargeableEvents": [
{
"refId": "nPQVzIn4AUKSwl",
"offer": {
"entityName": "Offer",
"refId": "nPN8AhYlHN02lc"
},
"productService": {
"entityName": "ProductService",
"refId": "nPRcFV7DSqXkxP"
},
"chargingClass": {
"entityName": "ChargingClass",
"refId": "nPdfmf39yuNyn2"
},
"tax": {
"entityName": "Tax",
"refId": "nPSFkkXsuvfIOy"
},
"taxValue": 2100,
"currency": {
"entityName": "Currency",
"refId": "nPOB8vqoP67JNH"
},
"eventEntry": "2020-10-22T11:36:35.157+02:00",
"eventStart": "2020-10-22T11:36:35.157+02:00",
"chargeType": "DEBIT",
"unitsOfMeasurement": "EVENT",
"eventTotalVolume": 1,
"eventTotalPrice": 82644628,
"eventTotalPriceNet": 100000000,
"eventTotalPriceTax": 17355372,
"ratedTotalPrice": 82644628,
"ratedTotalVolume": 1
}
],
"refId": "nPO1p1ViDvi9HK",
"code": "oneTimeFees",
"name": "One-Time Fees"
},
{
"level": 1,
"hasChild": false,
"aggregatedEvents": [
{
"offer": {
"entityName": "Offer",
"refId": "nPUPxylUbRbmQq"
},
"productService": {
"entityName": "ProductService",
"refId": "nPWb0CjpGOqvJJ"
},
"chargingClass": {
"entityName": "ChargingClass",
"refId": "nPJa7Y2vBsjtGe"
},
"tax": {
"entityName": "Tax",
"refId": "nPSFkkXsuvfIOy"
},
"taxValue": 2100,
"currency": {
"entityName": "Currency",
"refId": "nPOB8vqoP67JNH"
},
"eventStart": "2020-10-22T11:55:21.581+02:00",
"eventEnd": "2020-10-22T12:42:56.988+02:00",
"chargeType": "DEBIT",
"unitsOfMeasurement": "EVENT",
"eventTotalVolume": 2,
"eventTotalPrice": 251099999,
"eventTotalPriceNet": 303831000,
"eventTotalPriceTax": 52731001,
"eventInvoicedPrice": 125754545,
"ratedTotalPrice": 251099999,
"ratedTotalVolume": 2,
"discountTotalVolume": 0,
"discountTotalPrice": 0,
"freeUnitsTotalVolume": 0,
"freeUnitsTotalPrice": 0
}
],
"chargeableEvents": [
{
"refId": "nPUjsAQT6hW3PL",
"offer": {
"entityName": "Offer",
"refId": "nPUPxylUbRbmQq"
},
"productService": {
"entityName": "ProductService",
"refId": "nPWb0CjpGOqvJJ"
},
"chargingClass": {
"entityName": "ChargingClass",
"refId": "nPJa7Y2vBsjtGe"
},
"tax": {
"entityName": "Tax",
"refId": "nPSFkkXsuvfIOy"
},
"taxValue": 2100,
"currency": {
"entityName": "Currency",
"refId": "nPOB8vqoP67JNH"
},
"eventEntry": "2020-10-22T11:55:21.581+02:00",
"eventStart": "2020-10-22T11:55:21.581+02:00",
"chargeType": "DEBIT",
"unitsOfMeasurement": "EVENT",
"eventTotalVolume": 1,
"eventTotalPrice": 125754545,
"eventTotalPriceNet": 152163000,
"eventTotalPriceTax": 26408455,
"ratedTotalPrice": 125754545,
"ratedTotalVolume": 1,
"proRateRatio": 3074
},
{
"refId": "nPRz5roI5JSDyx",
"offer": {
"entityName": "Offer",
"refId": "nPUPxylUbRbmQq"
},
"productService": {
"entityName": "ProductService",
"refId": "nPWb0CjpGOqvJJ"
},
"chargingClass": {
"entityName": "ChargingClass",
"refId": "nPJa7Y2vBsjtGe"
},
"tax": {
"entityName": "Tax",
"refId": "nPSFkkXsuvfIOy"
},
"taxValue": 2100,
"currency": {
"entityName": "Currency",
"refId": "nPOB8vqoP67JNH"
},
"eventEntry": "2020-10-22T12:42:56.988+02:00",
"eventStart": "2020-10-22T12:42:56.988+02:00",
"chargeType": "DEBIT",
"unitsOfMeasurement": "EVENT",
"eventTotalVolume": 1,
"eventTotalPrice": 125345454,
"eventTotalPriceNet": 151668000,
"eventTotalPriceTax": 26322546,
"ratedTotalPrice": 125345454,
"ratedTotalVolume": 1,
"proRateRatio": 3064
}
],
"refId": "nPYdwnluvpeEVU",
"code": "recFees",
"name": "Recurrent Fees"
},
{
"level": 1,
"hasChild": false,
"refId": "nPxXpL5JaoMV3J",
"code": "disc",
"name": "Discounts"
}
],
"accountType": {
"refId": "nPXbTfTqgLcThR",
"code": "paymRsp",
"name": "Payment Responsible"
},
"customName": "Custom Name 1",
"paymentResponsible": true,
"state": {
"state": "ACTIVE",
"stateReason": {
"refId": "nPZL0AdmkaRhnl",
"code": "dfltActive",
"name": "Default Active"
},
"stateValidFrom": "2023-03-01T00:00:00.000+01:00"
},
"refId": "nPBjkidZsc2rUz",
"externalId": "acc-test"
}
},
"subscribers": {},
"offerSubscriptions": {
"nPeWhtJAVz6VwM": {
"state": {
"state": "ACTIVE",
"stateReason": {
"entityName": "StateReason",
"refId": "nPZL0AdmkaRhnl"
},
"stateValidFrom": "2023-03-01T00:00:00.000+01:00"
},
"offer": {
"entityName": "Offer",
"refId": "nPUPxylUbRbmQq"
},
"refId": "nPeWhtJAVz6VwM"
},
"nPEfQUJwoP9rgB": {
"state": {
"state": "ACTIVE",
"stateReason": {
"entityName": "StateReason",
"refId": "nPZL0AdmkaRhnl"
},
"stateValidFrom": "2023-03-01T00:00:00.000+01:00"
},
"offer": {
"entityName": "Offer",
"refId": "nPUPxylUbRbmQq"
},
"refId": "nPEfQUJwoP9rgB"
}
},
"invoiceTotalSectionsCount": 3,
"invoiceTotalSections": [
{
"level": 1,
"hasChild": false,
"aggregatedEvents": [
{
"offer": {
"entityName": "Offer",
"refId": "nPN8AhYlHN02lc"
},
"productService": {
"entityName": "ProductService",
"refId": "nPRcFV7DSqXkxP"
},
"chargingClass": {
"entityName": "ChargingClass",
"refId": "nPdfmf39yuNyn2"
},
"tax": {
"entityName": "Tax",
"refId": "nPSFkkXsuvfIOy"
},
"taxValue": 2100,
"currency": {
"entityName": "Currency",
"refId": "nPOB8vqoP67JNH"
},
"eventStart": "2020-10-22T11:36:35.157+02:00",
"chargeType": "DEBIT",
"unitsOfMeasurement": "EVENT",
"eventTotalVolume": 1,
"eventTotalPrice": 82644628,
"eventTotalPriceNet": 100000000,
"eventTotalPriceTax": 17355372,
"eventInvoicedPrice": 82644628,
"ratedTotalPrice": 82644628,
"ratedTotalVolume": 1
}
],
"refId": "nPO1p1ViDvi9HK",
"code": "oneTimeFees",
"name": "One-Time Fees"
},
{
"level": 1,
"hasChild": false,
"aggregatedEvents": [
{
"offer": {
"entityName": "Offer",
"refId": "nPUPxylUbRbmQq"
},
"productService": {
"entityName": "ProductService",
"refId": "nPWb0CjpGOqvJJ"
},
"chargingClass": {
"entityName": "ChargingClass",
"refId": "nPJa7Y2vBsjtGe"
},
"tax": {
"entityName": "Tax",
"refId": "nPSFkkXsuvfIOy"
},
"taxValue": 2100,
"currency": {
"entityName": "Currency",
"refId": "nPOB8vqoP67JNH"
},
"eventStart": "2020-10-22T11:55:21.581+02:00",
"eventEnd": "2020-10-22T12:42:56.988+02:00",
"chargeType": "DEBIT",
"unitsOfMeasurement": "EVENT",
"eventTotalVolume": 2,
"eventTotalPrice": 251099999,
"eventTotalPriceNet": 303831000,
"eventTotalPriceTax": 52731001,
"eventInvoicedPrice": 125754545,
"ratedTotalPrice": 251099999,
"ratedTotalVolume": 2,
"discountTotalVolume": 0,
"discountTotalPrice": 0,
"freeUnitsTotalVolume": 0,
"freeUnitsTotalPrice": 0
}
],
"refId": "nPYdwnluvpeEVU",
"code": "recFees",
"name": "Recurrent Fees"
},
{
"level": 1,
"hasChild": false,
"refId": "nPxXpL5JaoMV3J",
"code": "disc",
"name": "Discounts"
}
],
"_entities": {
"Offer": {
"nPN8AhYlHN02lc": {
"refId": "nPN8AhYlHN02lc",
"code": "fee100EUR",
"name": "One-Time Fee 100 EUR"
},
"nPUPxylUbRbmQq": {
"refId": "nPUPxylUbRbmQq",
"code": "TARIFF-60",
"name": "Tariff 60 EUR Monthly"
}
},
"StateReason": {
"nPZL0AdmkaRhnl": {
"refId": "nPZL0AdmkaRhnl",
"code": "dfltActive",
"name": "Default Active"
}
},
"ProductService": {
"nPWb0CjpGOqvJJ": {
"refId": "nPWb0CjpGOqvJJ",
"code": "recurrentFee",
"name": "Recurrent Fee"
},
"nPRcFV7DSqXkxP": {
"refId": "nPRcFV7DSqXkxP",
"code": "oneTimeFee",
"name": "One-Time Fee"
}
},
"Currency": {
"nPOB8vqoP67JNH": {
"symbol": "Eur",
"refId": "nPOB8vqoP67JNH",
"code": "EUR",
"name": "EURO"
}
},
"Tax": {
"nPSFkkXsuvfIOy": {
"refId": "nPSFkkXsuvfIOy",
"code": "S_VAT",
"name": "Standard VAT"
}
},
"AccountType": {
"nPXbTfTqgLcThR": {
"refId": "nPXbTfTqgLcThR",
"code": "paymRsp",
"name": "Payment Responsible"
}
},
"ChargingClass": {
"nPdfmf39yuNyn2": {
"refId": "nPdfmf39yuNyn2",
"code": "oneTimeFee",
"name": "One Time Fee"
},
"nPJa7Y2vBsjtGe": {
"refId": "nPJa7Y2vBsjtGe",
"code": "mntFeeTariff",
"name": "Monthly Fee Tariff"
}
}
}
}