JSON Schema
OpenAPI Spec (POST)
OpenAPI Spec (GET)
Sample Payload
...
Introduction
The following Schema is compliant with the Business Payments Coalition (BPC) Invoice as of June 1, 2021, which is a canonical representation of multiple business process scenarios based on the OASIS UBL 2.1 Invoice as referenced in CEN EN16931 and Peppol 3.0 Invoice PEPPOL BIS Billing 3.0 | Structure.
A MVP rendition can be made from this schema, to serve as the official Express Pack invoice.
Include Page | ||||
---|---|---|---|---|
|
Sample JSON instance (message payload)
Code Block | ||
---|---|---|
| ||
{ "invoice": { "typeCode": "380", "invoiceHeader": { "identifier": [ { "identifiercontent": "string26287c3b-2db2-4af2-a70a-ecc63255de4c", "personNametypeCode": ["UUID" } { ], "formattedNamedocumentIdentifierSet": "string"{ "identifier": [ } { ], "jobTitlecontent": "string", "organizationUnitIdentifier": "string", 2130948342", "telephoneCommunication": [ "typeCode": "ReceiptID" { } ] "identifier": [ }, "documentDateTime": "2020-03-20T09:00:43.456-05:00", "stringnote": "You are 30 days past due on the prior invoice", ] "documentReference": [ { } ]"identifier": "67d9dd71-5ca3-4f87-ac06-25d7488662f6", "emailAddressCommunicationtypeCode": ["InvoiceReference", "documentDateTime": "2020-01-15" { } "identifier": [ ], "status": { "stringcode": "Original", "reasonCode": "PastDueIncluded", ] "reason": "Partial amount paid on prior invoice", } "effectiveTimePeriod": { ], "preferencestartDateTime": { "2020-03-20T09:00:43.456-05:00", "noteendDateTime": ["2020-04-20T09:00:43.456-05:00" } "string" }, ]"totalAmount": { "content": 8007.296725, } }"currencyCode": "USD" }, "remitToPartysupplierParty": { "identifier": [ { "content": "string123454321", "schemeIdentifier": "stringNA", "typeCode": "stringPartyIdentification" } ], "nametaxIdentifier": [{ "stringcontent": "51-12345678", ], "location"typeCode": ["Federal" }, { "postalAddress"name": [{ { "content": "SmallSupplierA", "addressLinetypeCode": ["LegalName" }, "stringlocation": { "name": "Mason City ]Warehouse", "cityName"postalAddress": "string",{ "countrySubDivisionCodeaddressLine": "string",[ "123 Example "countryCodeStreet": "string", ], "postalCode": "string" "cityName": "Mason City", } "countrySubDivisionCode": [ ] }{ ], "content": "contactIA":, [ { "typeCode": "State" "personName": [ } { ], "formattedNamecountryCode": "stringUSA", "postalCode": "30316" } } ], }, "telephoneCommunicationcontact": [ { { "personName": { "identifier": [ "formattedName": "Joe Example" "string" }, "roleCode": "Manager", ] "jobTitle": "Plant Manager", } ]"responsibility": "NA", "emailAddressCommunicationorganizationUnitIdentifier": [ "123232", { "telephoneCommunication": [ "identifier": [ { "typeCode": "stringWork", ]"identifier": "641.201.1234" } ], } "emailAddressCommunication": { ] }, "identifier": "Joe.Example@smallbusinessA.com" "shipToParty": [ }, { "identifierinternetAddressCommunication": [{ "58885typeCode" : "HomePage", ], "namewebAddressUri": [ "http://www.smallbusinessa.com" "Happy Dairy Farm" } ], } "location": [ ] }, { "customerParty": { "identifier": [{ "content": "58885", { "schemeIdentifier": "NA", "contenttypeCode": "Location1232321PartyIdentification", }, "schemeIdentifierdunsid": "string3434343", "accountIdentifier": "58885", } "name": { ]"content": "LargeCustomerA", "coordinatetypeCode": ["LegalName" }, {} "location": { ], "postalAddress": { "postalAddressaddressLine": [ "123 Customer {St N" ], "addressLine": [ "cityName": "Anytown", "stringcountrySubDivisionCode": [ { ], "cityNamecontent": "stringMN", "countrySubDivisionCodetypeCode": ["State" "string" } ], "countryCode": "stringUSA", "postalCode": "string55126" } }, "buyerContact": { ], "identifier": "1232", "physicalAddresspersonName": [{ "formattedName": "Buyer Name" { }, "addressLinejobTitle": ["Buyer", "organizationUnitIdentifier": "Direct Procurement", "12345 Co Hwy 8"telephoneCommunication": [ { ], "typeCode": "Work", "countrySubDivisionCode": [ "identifier": "651.375.0002" } { ], "typeCodeemailAddressCommunication": "State"{ "identifier": "Buyer.Name@LargeCustomerA.com" } }, "preference": { ] "note": [ } "Email Preferred method of ],communication" ] "glnid": "123456789" } } } ]}, "remitToParty": { "contact": [ "identifier": { { "content": "125484", "typeCodeschemeIdentifier": "OwnerNA", "typeCode": "PartyIdentification" "personName": [ }, "accountIdentifier": "1232323", {} "name": "Mary's Accounting Services", ], "location": { "telephoneCommunicationpostalAddress": { [ "addressLine": [ { "543 Accounting Way" "typeCode": "Mobile", ], "identifiercityName": [ "Le Roy", "countrySubDivisionCode": [ null, { "01.507.555.1234" "content": "MN", ] "typeCode": "State" } } ], "emailAddressCommunicationcountryCode": ["USA", "postalCode": "55951" { } }, "identifier": [ "contact": [ null, { "mabel.e.farmer@emailaddress.com" personName": { "formattedName": "Mary Precise" ] }, "jobTitle": "Lead ]Accountant", }"telephoneCommunication": [ ] { } ], "billToPartytypeCode": { "Work", "identifier": { "contentidentifier": "125484",01.507.555.4321" "schemeIdentifier": "string", } "typeCode": "string" ], }, "accountIdentifieremailAddressCommunication": [{ "1232323identifier": "Mary.Precise@marysaccounting.com" ], } "name": [ } { ] }, "content": "Mary's Accounting Services", "shipToParty": { "typeCode": "stringEnd Customer", "identifier": "1232321", } "name": "Happy Dairy ]Farm", "location": [{ "identifier": { "postalAddresscontent": ["Location1232321", "schemeIdentifier": {"NA" }, "addressLinecoordinate": [ { "verticalMeasure": "15Z", "stringlatitudeMeasure": 43.580301503358996, "longitudeMeasure": -92.57476726492425 ], }, "cityNamephysicalAddress": "string", { "countrySubDivisionCodeaddressLine": [ "12345 Co Hwy "string" 8" ], "countryCodecityName": "stringLe Roy", "countrySubDivisionCode": [ "postalCode": "string" { } "content": "MN", ] } "typeCode": "State" ], } "contact": [ {], "personNamecountryCode": ["USA", "postalCode": {"55951-1234" }, "formattedNameglnid": "string123456789" }, } "contact": [ ],{ "telephoneCommunicationtypeCode": "Owner", [ "personName": { { "formattedName": "Mabel E. Farmer "identifier": [ }, "stringtelephoneCommunication": [ { ] }"typeCode": "Mobile", ], "identifier": "01.507.555.1234" "emailAddressCommunication": [ } { ], "identifieremailAddressCommunication": [{ "string"identifier": "mabel.e.farmer@happyfarmleroymn.com" } ] } } ] }, ] "billToParty": { } "identifier": { ], "buyerContactcontent": {"125484", "identifierschemeIdentifier": ["NA", "typeCode": "stringPartyIdentification" }, ] "taxIdentifier": "41-12345678", } "dunsid": "3434343", }, "purchaseOrderReferenceaccountIdentifier": {"1232323", "identifiername": { "content": "123232LargeCustomerA", "typeCode": "stringLegalName" }, "documentIdentifierSetlocation": { "identifierpostalAddress": [{ {"addressLine": [ "content": "5yt643095485454", 123 Customer St N" ], "typeCodecityName": "Anytown"Supplier, Order Number" "countrySubDivisionCode": [ } ] { }, "typeCodecontent": "DirectShipMN", "documentDateTime": "2021-02-22T14:57:01-05:00", "notetypeCode": ["State" "Urgent Need for 1800 lbs"} ], ], "status": [ "countryCode": "USA", { "typeCodepostalCode": "Open55126" } ]}, }, "contact": [ "contractReference": { { "identifier": "contract123232", "statustypeCode": ["AP", "personName": { "effectiveTimePeriodformattedName": {"Bob NumberCruncher" "startDateTime": "2021-03-18T00:24:29.982Z", }, "endDateTimetelephoneCommunication": "2021-03-18T00:24:29.982Z"[ } { } ]"typeCode": "Work", }, "paymentidentifier": { "651.375.0001" } "identifier": [ {], "contentemailAddressCommunication": "string", { "schemeIdentifieridentifier": "stringBob.NumberCruncher@LargeCustomerA.com" } } ], } "note": [ ] }, "string" "purchaseOrderReference": { ], "paymentTermidentifier": { "123232", "descriptiondocumentIdentifierSet": "string",{ "dueDateTimeidentifier": "2021-03-18T00:24:29.982Z"{ }, "extensioncontent": ["5yt643095485454", {} "typeCode": "Supplier Order Number" ] }, "tax": [ }, { "typeCode": "DirectShip", "typeCodedocumentDateTime": "Sales2021-02-22T14:57:01-05:00", "taxJurisdicationCodesstatus": { "code": "string" },Received" } "basisAmount": 0, }, "calculationcontractReference": { "rateNumberidentifier": 0"contract123232", },"status": { "exemptioncode": { "Active", "typeCodeeffectiveTimePeriod": "string",{ "descriptionstartDateTime": ["2021-01-01", "endDateTime": "string2021-12-31" } ] } }, }, "amountpayment": { "contentidentifier": 549.3551,[ { "currencyCode": "USD" }"content": "15", } "schemeIdentifier": "UNCL4461" ], "distribution": [ } { ], "amountdescription": { "Bookentry credit", "contentpaymentTerm": 0, { "currencyCodedescription": "string" }NET 30", "enterpriseUnitdueDateTime": {"2020-04-20T09:00:43.456-05:00", "costCenterIdentifierduration": "string30" } }, }, "projectReferencetax": { "identifiertypeCode": [ "Sales", "identifier": "stringNA", "basisAmount": 6516.9, ] "calculation": { } "rateNumber": 0.07525 } ]}, "chargeexemption": [ { "basisAmounttypeCode": 0"NotExempt", "amountidentifier": 0"NA", "calculationdescription": {[ "rateNumber": 0Not Exempt" ] }, "reasonCodeamount": [{ "content": 490.396725, { "currencyCode": "USD" "content": "string", } }, "typeCodedistribution": "string"[ { } "amount": { ] } "content": 7007.296725, ], "allowancecurrencyCode": "USD" [ {}, "basisAmountgeneralLedgerElement": { 0, "amountelement": [ 0, "calculationProductionCost": { ] "rateNumber": 0 }, "reasonCodeenterpriseUnit": [{ "costCenterIdentifier": "MC" { }, "contentprojectReference": "string", { "typeCodeidentifier": "stringNA" } } ] ], } "charge": [ ], { "transportationTerm": { "freightTermCodetypeCode": "DLVProduct", }, "extensionbasisAmount": { [ { "content": 3.6205, "dateTime": [ "currencyCode": "USD/LB" { }, "contentbasisQuantity": "2021-03-04T08:00:00-05:00",{ "typeCodecontent": "Requested1800, Delivery Date" }"unitCode": "LB" ]}, "textdescription": ["Manufacturing Costs", "amount": { "content": "string", 6516.9, "typeCodecurrencyCode": "stringUSD" }, } "calculation": { ], "currencyCoderateNumber": [1 }, { "content"reasonCode": "CAD",[ "Purchased" "listIdentifier": "Tax" ] } } ], "paymentMethodtotalChargeAmount": [{ { "content": 7007.296725, "typeCodecurrencyCode": "stringUSD", }, "identifierallowance": { [ "typeCode": "REBATE", "stringbasisAmount": { ]"content": 1, "currencyCode": "USD/LB" "creditCard": {}, }, "debitCardbasisQuantity": {}, "electronicFundsTransfercontent": { 0, "typeCodeunitCode": "stringLB", }, "identifierdescription": ["NA", "amount": { { "content": 0, "contentcurrencyCode": "string", USD" }, "typeCodecalculation": "string"{ "rateNumber": 1 }, "reasonCode": "NA" ]}, "nameOnAccount"totalAllowanceAmount": "string"0, "transportationTerm": { "routingNumberIdentifierfreightTermCode": "stringDLV" }, "shipmentReference": { } "identifier": { } "content": "2130948342", ] }"typeCode": "shipmentHeader.identifier" ] }, }, "invoiceLinedocumentIdentifierSet": [ { { "lineNumberIdentifier": "1", "noteidentifier": { [ "stringcontent": "2130948342", ], "typeCode": "documentReferenceShipmentDocument": [ {} } "identifier": { ], "contentdocumentDateTime": "string",2020-03-19T22:50:45.456-05:00" }, "typeCoderemittanceInstructions": "string"[ { } "deliveryMethodCode": "OAGIS", } ]"emailAddressIdentifier": "NA", "status": [ "uri": "https://api.smallsupplierA.com/remittance/v1" } { ] }, "effectiveTimePeriodinvoiceLine": [ { { "startDateTimelineNumberIdentifier": "2021-03-18T00:24:29.982Z1", "endDateTime"note": "2021-03-18T00:24:29.982Z"NA", "documentReference": [ } { } ], "item": { "identifier": "2130948342", "identifiertypeCode": {"Receipt", "contentdescription": "stringReceiveDelivery", "schemeIdentifier": "string"} }], "customerItemIdentificationstatus": { "identifiercode": "091818Original", "effectiveTimePeriod": { }, "manufacturerItemIdentificationstartDateTime": {"2020-03-20T09:00:43.456-05:00", "identifierendDateTime": {"2020-04-20T09:00:43.456-05:00" } "content": "1213579", }, "typeCodeitem": "SKU"{ "identifier": { } },"content": "1213579", "supplierItemIdentificationschemeIdentifier": { "SKU" "identifier": { }, "contentcustomerItemIdentification": "1213579",{ "typeCodeidentifier": "SKU091818" }, } "manufacturerItemIdentification": { }, "upcididentifier": "NA",{ "epcidcontent": "NA1213579", "description": [ "typeCode": "SKU" "Custom Feed Blend - Derived} from Milk Max Plus Basic" ]}, "classificationsupplierItemIdentification": [{ "identifier": { "codescontent": { "1213579", "code": [ "typeCode": "SKU" } { }, "contentdescription": "string",Custom Feed Blend - Derived from Milk Max Plus Basic", "listIdentifierclassification": "string",{ "codes": { "listVersionIdentifier": "string" "code": [ } { ] "content": "Dairy Supplement", } } "listIdentifier": "Animal Feeds", ], "countryOfOriginCodelistVersionIdentifier": "string20b", }, "itemInstancelistAgencyIdentifier": "FDA" [ { } "serialNumberIdentifier": [ ] "string" } ], }, "lotcountryOfOriginCode": ["USA" }, { "itemInstance": { "identifierserialNumberIdentifier": [ "NA" "string" ], "lot": ]{ "typeCode": "Batch", } ]"identifier": "d6a6c7f0-3e07-4885-b4b8-f9b0d7a1ece9" } ]}, "quantity": [{ { "content": 1800, "contentunitCode": 2000"LB", "unitCodetypeCode": "LB", InvoicedQuantity" }, "unitPrice": { "typeCodeunitAmount": "string"{ } "content": 3.6502, ], "currencyCode": "unitPriceUSD": { } "basisQuantity": { }, "contentpurchaseOrderReference": 1,{ "unitCodelineNumberIdentifier": "LB1" }, "unitAmountextendedAmount": { "content": 36516.65029, "currencyCode": "USD" } }, "purchaseOrderReferencetotalAmount": [{ { "content": 7007.296725, "lineNumberIdentifiercurrencyCode": "stringUSD" }, } "tax": { ], "buyerPartytypeCode": {"LineTotal", "accountIdentifiercalculation": [{ "stringformula": "SUM(invoiceLine[current].distributeTax[*].amount)" ] }, }, "extendedAmount"amount": { "content": 7300490.4396725, "currencyCode": "USD" }, } "totalAmount": { }, "contentdistributeTax": 7849.7551,[ "currencyCode": "USD"{ }, "typeCode": "Sales", "tax": [ "identifier": "Mower County", { "taxJurisdicationCodes": {}, "calculationcode": {}, "amountcontent": {"County", "contenttypeCode": 549.3551, "Local Sales" "currencyCode": "USD" } }, "currencyExchangeRatetaxCurrencyCode": {}"USD", } "basisAmount": 6516.9, ], "distributeTaxcalculation": [{ { "rateNumber": 0.07525 "identifier": { }, "contentamount": "string"490.396725, "schemeIdentifiercurrencyExchangeRate": "string" { "sourceCurrencyCode": "USD", }, "taxJurisdicationCodestargetCurrencyCode": {"USD", "coderateNumber": [1, "setDateTime": {"2021-03-04T08:00:00-05:00" } "content": "string", } ], "typeCodedistribution": { "string" "generalLedgerElement": { } "element": "532DEF" ] } }, "amountinvoiceCharge": 0[ }{ ], "typeCode": "Product", "invoiceCharge": [ {"basisAmount": 1800, "basisAmountdescription": 0 "Manufacturing Costs for Purchased Product", "amount": 06516.9, "calculation": { "rateNumber": 03.6502 }, "reasonCode": "Manufactured" [ } { ], "invoiceAllowance": [ "content": "string", { "typeCode": "stringREBATE", "basisAmount": 0, } ]"description": "NA", } "amount": 0, ], "invoiceAllowancecalculation": [ { { "basisAmount"rateNumber": 0,1 "amount": 0}, "calculationreasonCode": { "NA", "rateNumberpromotionReference": 0{ }, "revisionIdentifier": "NA" "reasonCode": [ } } { ], "contentrequestedDeliveryDate": "string", 2021-03-04T08:00:00-05:00", "typeCodeactualDeliveryDateTime": "string"2020-03-04T07:50:45.456-05:00", "shipmentReference": { } "identifier": "2130948342", ] "typeCode": "ShipmentReference" } } ] } ] } } |