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": { "cityNameidentifier": "string",[ "countrySubDivisionCode": "string", { "countryCodecontent": "string26287c3b-2db2-4af2-a70a-ecc63255de4c", "postalCodetypeCode": "stringUUID" } } ], }, "documentIdentifierSet": { "contactidentifier": [ { "personNamecontent": ["2130948342", "typeCode": "ReceiptID" { } "formattedName": "string" ] }, } "documentDateTime": "2020-03-20T09:00:43.456-05:00", "note": "You are 30 days ],past due on the prior invoice", "telephoneCommunicationdocumentReference": [ { "identifier": [ "67d9dd71-5ca3-4f87-ac06-25d7488662f6", "typeCode": "InvoiceReference", "stringdocumentDateTime": "2020-01-15" } ], "status": { } "code": "Original", ]"reasonCode": "PastDueIncluded", "reason": "Partial amount paid on prior "emailAddressCommunication": [invoice", "effectiveTimePeriod": { { "startDateTime": "2020-03-20T09:00:43.456-05:00", "identifierendDateTime": ["2020-04-20T09:00:43.456-05:00" } }, "string" "totalAmount": { "content": 8007.296725, ] "currencyCode": "USD" }, "supplierParty": { ] } ],"identifier": { "buyerContactcontent": {"123454321", "identifierschemeIdentifier": "stringNA", "personNametypeCode": "PartyIdentification" [ }, { "taxIdentifier": { "formattedNamecontent": "string51-12345678", }"typeCode": "Federal" ]}, "jobTitlename": "string",{ "organizationUnitIdentifiercontent": "stringSmallSupplierA", "telephoneCommunicationtypeCode": "LegalName" [ }, { "location": { "identifiername": ["Mason City Warehouse", "postalAddress": { "string" "addressLine": [ ] "123 Example Street" } ], "emailAddressCommunicationcityName": "Mason City", [ "countrySubDivisionCode": {[ "identifier":{ [ "content": "stringIA", ]"typeCode": "State" } ], "preferencecountryCode": {"USA", "notepostalCode": ["30316" } "string" }, ] "contact": [ } { } },"personName": { "remitToParty": { "formattedName": "Joe Example"identifier": { "content": "string" }, "schemeIdentifierroleCode": "stringManager", "typeCodejobTitle": "stringPlant Manager", }, "nameresponsibility": "NA", [ "stringorganizationUnitIdentifier": "123232", ], "locationtelephoneCommunication": {[ "postalAddress": { { "addressLine": [ "typeCode": "Work", "string" "identifier": "641.201.1234" ], "cityName": "string",} "countrySubDivisionCode": "string"], "countryCodeemailAddressCommunication": "string",{ "postalCodeidentifier": "stringJoe.Example@smallbusinessA.com" } }, }, "contactinternetAddressCommunication": [{ { "typeCode": "HomePage", "personName": [ "webAddressUri": "http://www.smallbusinessa.com" { } "formattedName": "string"} ] }, "customerParty": { ], "identifier": { "telephoneCommunicationcontent": "58885", [ "schemeIdentifier": "NA", { "typeCode": "PartyIdentification" "identifier": [}, "dunsid": "3434343", "accountIdentifier": "string58885", "name": { ] "content": "LargeCustomerA", } "typeCode": "LegalName" ]}, "emailAddressCommunicationlocation": [{ "postalAddress": { "identifieraddressLine": [ "123 Customer St N"string" ], ] "cityName": "Anytown", } "countrySubDivisionCode": [ ] { } ] }"content": "MN", "shipToParty": { "identifiertypeCode": "58885", State" "name": "Happy Dairy Farm", "location":} { "identifier": { ], "contentcountryCode": "Location1232321USA", "schemeIdentifierpostalCode": "string55126" }, }, "coordinatebuyerContact": { "verticalMeasureidentifier": "string1232", "latitudeMeasurepersonName": "string",{ "longitudeMeasureformattedName": "stringBuyer Name" }, "postalAddressjobTitle": {"Buyer", "addressLineorganizationUnitIdentifier": ["Direct Procurement", "telephoneCommunication": [ "string" { ], "cityNametypeCode": "stringWork", "countrySubDivisionCode": [ "identifier": "651.375.0002" "string" } ], "countryCodeemailAddressCommunication": "string",{ "postalCodeidentifier": "stringBuyer.Name@LargeCustomerA.com" }, "physicalAddresspreference": { "addressLinenote": [ "12345Email Preferred Comethod Hwyof 8communication" ], } "cityName": "string",} }, "countrySubDivisionCoderemitToParty": { "identifier": { "content": "string125484", "schemeIdentifier": "NA", "typeCode": "StatePartyIdentification" }, }, "accountIdentifier": "1232323", "countryCodename": "stringMary's Accounting Services", "location": { "postalCode": "string" "postalAddress": { }, "glnidaddressLine": "123456789"[ }, "543 Accounting Way" "contact": [ {], "typeCodecityName": "OwnerLe Roy", "personNamecountrySubDivisionCode": [ { "formattedNamecontent": "stringMN", } "typeCode": "State" ], } "telephoneCommunication": [ { ], "typeCodecountryCode": "MobileUSA", "identifier": ["postalCode": "55951" } "string"}, "contact": [ "01.507.555.1234" { "personName": { ] "formattedName": "Mary }Precise" ]}, "emailAddressCommunicationjobTitle": ["Lead Accountant", "telephoneCommunication": {[ { "identifier": [ "typeCode": "stringWork", "identifier": "mabel01.e507.farmer@emailaddress555.com" 4321" ] } } ], ] "emailAddressCommunication": { } ] "identifier": "Mary.Precise@marysaccounting.com" }, "billToParty":} { "identifier": {} ] "content": "125484", }, "schemeIdentifiershipToParty": "string",{ "typeCode": "string" }End Customer", "accountIdentifieridentifier": [ "1232321", "1232323name": "Happy ]Dairy Farm", "namelocation": [{ "identifier": { "content": "Mary's Accounting ServicesLocation1232321", "typeCodeschemeIdentifier": "stringNA" } , ], "location"coordinate": [ { "postalAddressverticalMeasure": ["15Z", "latitudeMeasure": 43.580301503358996, { "addressLine": ["longitudeMeasure": -92.57476726492425 }, "stringphysicalAddress": { "addressLine": [ ], "12345 Co Hwy 8" "cityName": "string", ], "countrySubDivisionCode": [ "cityName": "Le Roy", "stringcountrySubDivisionCode": [ { ], "countryCodecontent": "stringMN", "postalCodetypeCode": "stringState" } ], } "countryCode": "USA", ], "contactpostalCode": ["55951-1234" { }, "personNameglnid": ["123456789" { }, "formattedName"contact": "string"[ { } ]"typeCode": "Owner", "telephoneCommunicationpersonName": [ { { "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" ], "cityName": "typeCodeAnytown":, "Supplier Order Number" "countrySubDivisionCode": [ } ] { }, "typeCodecontent": "DirectShipMN", "documentDateTime "typeCode": "2021-02-22T14:57:01-05:00",State" "note": [ } "Urgent Need for 1800 lbs" ], ], "statuscountryCode": ["USA", { "postalCode": "55126" "typeCode": "Open" } }, } "contact": [ ] }, { "contractReference": { "identifiertypeCode": "contract123232AP", "status": [ "personName": { { "effectiveTimePeriodformattedName": {"Bob NumberCruncher" "startDateTime": "string", }, "endDateTimetelephoneCommunication": "string"[ } { } ]"typeCode": "Work", }, "paymentidentifier": { "651.375.0001" } "identifier": [ {], "contentemailAddressCommunication": "string", { "schemeIdentifieridentifier": "string"Bob.NumberCruncher@LargeCustomerA.com" } } ], ] "note": [ }, "stringpurchaseOrderReference": { ] "identifier": "123232", "paymentTermdocumentIdentifierSet": { "descriptionidentifier": "string", { "dueDateTimecontent": "string5yt643095485454" , }, "extensiontypeCode": ["Supplier Order Number" {} } ] }, }, "taxtypeCode": ["DirectShip", { "typeCode": "Sales", "documentDateTime": "2021-02-22T14:57:01-05:00", "taxJurisdicationCodesstatus": { "code": "stringReceived" } }, }, "basisAmountcontractReference": 0,{ "calculationidentifier": { "contract123232", "rateNumberstatus": 0{ }"code": "Active", "exemptioneffectiveTimePeriod": { "typeCodestartDateTime": "string2021-01-01", "descriptionendDateTime": [ "2021-12-31" } "string"} }, ] "payment": { }, "identifier": [ "amount": { "content": 549.3551"15", "currencyCodeschemeIdentifier": "USDUNCL4461" } }], ], "distributiondescription": ["Bookentry credit", "paymentTerm": { "amountdescription": { "NET 30", "contentdueDateTime": 0"2020-04-20T09:00:43.456-05:00", "currencyCodeduration": "string30" } }, }, "generalLedgerElementtax": "string", { "enterpriseUnittypeCode": { "Sales", "costCenterIdentifieridentifier": "stringNA", }, "basisAmount": 6516.9, "projectReferencecalculation": { "identifierrateNumber": [0.07525 }, "stringexemption": { ]"typeCode": "NotExempt", } "identifier": "NA", } "description": [ ], "charge": [ "Not Exempt" { ] "basisAmount": 0, }, "amount": 0,{ "calculationcontent": {490.396725, "currencyCode": "rateNumberUSD": 0 } }, }, "reasonCodedistribution": [ { "amount": { "content": "string"7007.296725, "typeCodecurrencyCode": "stringUSD" }, } "generalLedgerElement": { ] }"element": [ ], "allowanceProductionCost": [ { ] "basisAmount": 0}, "amountenterpriseUnit": { 0, "calculationcostCenterIdentifier": {"MC" }, "rateNumber": 0 "projectReference": { }, "reasonCodeidentifier": ["NA" } { } ], "contentcharge": "string", [ { "typeCode": "stringProduct", "basisAmount": { } ]"content": 3.6205, } "currencyCode": "USD/LB" ], }, "transportationTerm": { "freightTermCodebasisQuantity": "DLV"{ }, "shipmentReferencecontent": {1800, "identifierunitCode": ["LB" { }, "contentdescription": "2130948342Manufacturing Costs", "typeCodeamount": "shipmentHeader.identifier"{ } "content": 6516.9, ], "documentIdentifierSetcurrencyCode": ["USD" { }, "identifiercalculation": [{ "rateNumber": 1 { }, "content": "2130948342", "reasonCode": [ "typeCode": "ShipmentDocumentPurchased" ] } } ], "totalChargeAmount": { } ]"content": 7007.296725, "documentDateTimecurrencyCode": "2020-03-19T22:50:45.456-05:00USD" }, "allowance": { "extensiontypeCode": ["REBATE", "basisAmount": { "dateTimecontent": [1, "currencyCode": "USD/LB" { }, "contentbasisQuantity": "2021-03-04T08:00:00-05:00", { "typeCodecontent": "Requested0, Delivery Date" "unitCode": "LB" } ]}, "textdescription": ["NA", "amount": { "content": "string"0, "typeCodecurrencyCode": "stringUSD" }, } "calculation": { ] "rateNumber": 1 } ] }, }, "invoiceLinereasonCode": ["NA" {}, "lineNumberIdentifiertotalAllowanceAmount": "1"0, "notetransportationTerm": [{ "freightTermCode": "stringDLV" }, ], "shipmentReference": { "documentReferenceidentifier": [{ { "content": "2130948342", "typeCode": "shipmentHeader.identifier": { }, "contentdocumentIdentifierSet": "string",[ { "typeCode": "string" "identifier": { } } "content": "2130948342", ], "statustypeCode": ["ShipmentDocument" {} } "effectiveTimePeriod": { ], "startDateTimedocumentDateTime": "string",2020-03-19T22:50:45.456-05:00" }, "endDateTimeremittanceInstructions": "string"[ { } "deliveryMethodCode": "OAGIS", } ]"emailAddressIdentifier": "NA", "item": { "uri": "https://api.smallsupplierA.com/remittance/v1" } "identifier": { ] }, "contentinvoiceLine": "string",[ { "schemeIdentifierlineNumberIdentifier": "string" }, 1", "customerItemIdentificationnote": {"NA", "identifierdocumentReference": "091818"[ { }, "manufacturerItemIdentificationidentifier": {"2130948342", "identifiertypeCode": { "Receipt", "contentdescription": "1213579ReceiveDelivery", } "typeCode": "SKU" ], "status": { } }"code": "Original", "supplierItemIdentificationeffectiveTimePeriod": { "identifierstartDateTime": {"2020-03-20T09:00:43.456-05:00", "contentendDateTime": "1213579",2020-04-20T09:00:43.456-05:00" } "typeCode": "SKU" }, "item": { } "identifier": { }, "upcidcontent": "NA1213579", "epcidschemeIdentifier": "NASKU", }, "description": [ "customerItemIdentification": { "Custom Feed Blend - Derived from Milk Max Plus Basic"identifier": "091818" ]}, "classificationmanufacturerItemIdentification": [{ "identifier": { "codescontent": {"1213579", "typeCode": "codeSKU": [ } { }, "supplierItemIdentification": { "content": "string", "identifier": { "listIdentifiercontent": "string1213579", "listVersionIdentifiertypeCode": "stringSKU" } } }, ] "description": "Custom Feed Blend - Derived from Milk Max Plus Basic", } "classification": { } "codes": { ], "countryOfOriginCodecode": "string"[ }, { "itemInstance": [ { "content": "Dairy Supplement", "serialNumberIdentifier": [ "listIdentifier": "Animal Feeds"string", ], "listVersionIdentifier": "20b", "lot": [ "listAgencyIdentifier": "FDA" { } "identifier": [ ] "string" } ] }, "countryOfOriginCode": "USA" } }, ] "itemInstance": { } "serialNumberIdentifier": [ ], "quantityNA": [ {], "contentlot": 2000,{ "unitCodetypeCode": "LBBatch", "typeCodeidentifier": "stringd6a6c7f0-3e07-4885-b4b8-f9b0d7a1ece9" } ]}, "unitPricequantity": { "basisQuantitycontent": {1800, "contentunitCode": 1"LB", "unitCodetypeCode": "LBInvoicedQuantity" }, },"unitPrice": { "unitAmount": { "content": 3.6502, "currencyCode": "USD" } }, "purchaseOrderReference": [ } { }, "lineNumberIdentifierpurchaseOrderReference": "string"{ }"lineNumberIdentifier": "1" ]}, "buyerPartyextendedAmount": { "accountIdentifiercontent": [6516.9, "currencyCode": "stringUSD" ] }, "extendedAmounttotalAmount": { "content": 73007007.4296725, "currencyCode": "USD" }, "totalAmounttax": { "contenttypeCode": 7849.7551, "LineTotal", "calculation": { "currencyCodeformula": "USD"SUM(invoiceLine[current].distributeTax[*].amount)" }, "taxamount": { [ {"content": 490.396725, "taxJurisdicationCodescurrencyCode": {"USD" } "code": "string" }, }, "distributeTax": [ "calculation": { "rateNumbertypeCode": "stringSales", }"identifier": "Mower County", "amounttaxJurisdicationCodes": { "contentcode": 549.3551,{ "currencyCodecontent": "USDCounty", }, "typeCode": "Local Sales" "currencyExchangeRate": { } "sourceCurrencyCode": "string", }, "targetCurrencyCodetaxCurrencyCode": "stringUSD", "rateNumberbasisAmount": "string"6516.9, "setDateTimecalculation": "string"{ } "rateNumber": 0.07525 } }, ], "distributeTaxamount": [490.396725, { "identifier"currencyExchangeRate": { "contentsourceCurrencyCode": "stringUSD", "schemeIdentifiertargetCurrencyCode": "stringUSD", }, "rateNumber": 1, "taxJurisdicationCodes": { "setDateTime": "2021-03-04T08:00:00-05:00" "code": [ } {} ], "contentdistribution": "string",{ "typeCode"generalLedgerElement": "string"{ "element": "532DEF" } } ] }, "invoiceCharge": [ }, { "amount": 0 } "typeCode": "Product", ], "invoiceChargebasisAmount": [1800, { "description": "Manufacturing Costs for "basisAmount": 0Purchased Product", "amount": 06516.9, "calculation": { "rateNumber": 03.6502 }, "reasonCode": ["Manufactured" } { ], "contentinvoiceAllowance": "string",[ { "typeCode": "string" "typeCode": "REBATE", } "basisAmount": 0, ] "description": "NA", } ], "invoiceAllowanceamount": [ {0, "basisAmountcalculation": 0,{ "amountrateNumber": 0,1 "calculation": { }, "rateNumberreasonCode": "NA", 0 },"promotionReference": { "reasonCoderevisionIdentifier": ["NA" } { } "content": "string" ], "requestedDeliveryDate": "2021-03-04T08:00:00-05:00", "typeCodeactualDeliveryDateTime": "string"2020-03-04T07:50:45.456-05:00", "shipmentReference": { } "identifier": "2130948342", ] "typeCode": "ShipmentReference" } ]} } ] } } |