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": { "telephoneCommunicationidentifier": [ { "typeCode"content": "Work26287c3b-2db2-4af2-a70a-ecc63255de4c", "identifiertypeCode": "641.201.1234UUID" } }], "documentIdentifierSet": { ], "identifier": [ "emailAddressCommunication": { { "identifiercontent": "Joe.Example@smallbusinessA.com" }2130948342", "internetAddressCommunicationtypeCode": {"ReceiptID" } "typeCode": "HomePage", ] }, "webAddressUridocumentDateTime": "http://www.smallbusinessa.com"2020-03-20T09:00:43.456-05:00", "note": "You are 30 days past }due on the prior invoice", }"documentReference": [ ] { }, "identifier": "customerParty": {67d9dd71-5ca3-4f87-ac06-25d7488662f6", "identifiertypeCode": {"InvoiceReference", "contentdocumentDateTime": "588852020-01-15", } "schemeIdentifier": "NA", ], "typeCodestatus": "PartyIdentification"{ }"code": "Original", "dunsidreasonCode": "3434343PastDueIncluded", "accountIdentifierreason": "58885Partial amount paid on prior invoice", "nameeffectiveTimePeriod": { "contentstartDateTime": "LargeCustomerA2020-03-20T09:00:43.456-05:00", "typeCodeendDateTime": "LegalName2020-04-20T09:00:43.456-05:00" }, }, "locationtotalAmount": { "postalAddresscontent": 8007.296725, { "currencyCode": "USD" "addressLine": [ }, "supplierParty": { "123 Customer St N"identifier": { ], "content": "123454321", "cityNameschemeIdentifier": "AnytownNA", "countrySubDivisionCodetypeCode": ["PartyIdentification" }, { "taxIdentifier": { "content": "MN51-12345678", "typeCode": "StateFederal" }, ], "name": { "countryCodecontent": "USASmallSupplierA", "postalCodetypeCode": "55126" }LegalName" }, "contactlocation": [ { "typeCodename": "APMason City Warehouse", "personNamepostalAddress": [{ { "addressLine": [ "formattedName": "Bob NumberCruncher123 Example Street" ], } "cityName": "Mason ]City", "telephoneCommunicationcountrySubDivisionCode": [ { "typeCodecontent": "WorkIA", "identifiertypeCode": "651.375.0001State" } ], "emailAddressCommunication": { "identifier"countryCode": "Bob.NumberCruncher@LargeCustomerA.comUSA", }"postalCode": "30316" } ]}, "buyerContactcontact": [ { { "identifier": "1232", "personName": [ { "formattedName": "Joe Example" { }, "formattedName": "Buyer Name" "roleCode": "Manager", } "jobTitle": "Plant ]Manager", "jobTitleresponsibility": "stringNA", "organizationUnitIdentifier": "string123232", "telephoneCommunication": [ { "typeCode": "Work", "identifier": "651641.375201.00021234" } ], "emailAddressCommunication": { { "identifier": "BuyerJoe.Name@LargeCustomerAExample@smallbusinessA.com" }, "preferenceinternetAddressCommunication": { "notetypeCode": ["HomePage", "Email Preferred method of communicationwebAddressUri": "http://www.smallbusinessa.com" ]} } }] }, "remitToPartycustomerParty": { "identifier": { "content": "12548458885", "schemeIdentifier": "NA", "typeCode": "PartyIdentification" }, "dunsid": "3434343", "accountIdentifier": "58885", "name": { }, "accountIdentifiercontent": "1232323LargeCustomerA", "nametypeCode": "Mary's Accounting Services""LegalName" }, "location": { "postalAddress": { "addressLine": [ "543123 Customer AccountingSt WayN" ], "cityName": "Le RoyAnytown", "countrySubDivisionCode": [ { "content": "MN", "typeCode": "State" } ], "countryCode": "USA", "postalCode": "5595155126" } }, "contactbuyerContact": [{ { "identifier": "1232", "personName": [ { "formattedName": "MaryBuyer PreciseName" }, ]"jobTitle": "Buyer", "jobTitleorganizationUnitIdentifier": "stringDirect Procurement", "telephoneCommunication": [ { "typeCode": "Work", "identifier": "01651.507375.555.43210002" } ], "emailAddressCommunication": { "identifier": "MaryBuyer.Precise@marysaccountingName@LargeCustomerA.com" }, } "preference": { } "note": [ ] }, "shipToParty": {Email Preferred method of communication" ] } "identifier": "1232321", } "name": "Happy Dairy Farm", }, "locationremitToParty": { "identifier": { "content": "Location1232321125484", "schemeIdentifier": "stringNA", }, "typeCode": "PartyIdentification" "coordinate": { }, "verticalMeasureaccountIdentifier": "15Z1232323", "latitudeMeasurename": 43.580301503358996, "Mary's Accounting Services", "longitudeMeasurelocation": -92.57476726492425 { }, "physicalAddress"postalAddress": { "addressLine": [ "12345543 CoAccounting Hwy 8Way" ], "cityName": "Le Roy", "countrySubDivisionCode": [ { "content": "MN", "typeCode": "State" } ], "countryCode": "USA", "postalCode": "55951-1234" }, ": "55951" "glnid": "123456789" } }, "contact": [ { "typeCodepersonName": "Owner",{ "personNameformattedName": {"Mary Precise" "formattedName": "Mabel E. Farmer "}, "jobTitle": }"Lead Accountant", "telephoneCommunication": [ { "typeCode": "MobileWork", "identifier": "01.507.555.12344321" } ], "emailAddressCommunication": { "identifier": "mabelMary.e.farmer@happyfarmleroymnPrecise@marysaccounting.com" } } ] }, "billToParty": { "identifier": { "content": "125484", shipToParty": { "schemeIdentifiertypeCode": "NAEnd Customer", "typeCodeidentifier": "PartyIdentification1232321", }"name": "Happy Dairy Farm", "accountIdentifierlocation": [{ "1232323identifier": { ], "namecontent": ["Location1232321", { "schemeIdentifier": "NA" "content": "string", }, "typeCodecoordinate": "string"{ } "verticalMeasure": "15Z", ], "locationlatitudeMeasure": [43.580301503358996, { "longitudeMeasure": -92.57476726492425 "postalAddress": [ }, "physicalAddress": { "addressLine": [ "12345 Co Hwy "string" 8" ], "cityName": "stringLe Roy", "countrySubDivisionCode": [ "string" ],{ "countryCodecontent": "stringMN", "postalCodetypeCode": "stringState" } ] } , ], "contactcountryCode": [ "USA", { "postalCode": "55951-1234" "personName": [ }, "glnid": "123456789" { }, "formattedNamecontact": "string"[ { } ]"typeCode": "Owner", "telephoneCommunicationpersonName": [{ { "formattedName": "Mabel E. Farmer " "identifier": [}, "telephoneCommunication": [ "string" { ] "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": [ { "contentaddressLine": "5yt643095485454",[ "typeCode": "Supplier Order Number" }123 Customer St N" ], }, "typeCodecityName": "DirectShipAnytown", "documentDateTimecountrySubDivisionCode": "2021-02-22T14:57:01-05:00", [ "status": [ { { "typeCodecontent": "OpenMN", "codetypeCode": "stringState" } ], }, "countryCode": "contractReference": {USA", "identifierpostalCode": "contract123232",55126" } "status": { }, "codecontact": "string",[ "effectiveTimePeriod": { "startDateTimetypeCode": "stringAP", "endDateTimepersonName": "string" { "formattedName": "Bob NumberCruncher" } }, }, "paymenttelephoneCommunication": { [ "identifier": [ { { "contenttypeCode": "stringWork", "schemeIdentifieridentifier": "string"651.375.0001" } } ], ], "note": "string", "paymentTermemailAddressCommunication": { "description": "string", "dueDateTimeidentifier": "2020-04-20T09:00:43.456-05:00" Bob.NumberCruncher@LargeCustomerA.com" }, } "extension": [ {} ] }, "taxpurchaseOrderReference": [{ { "identifier": "123232", "typeCodedocumentIdentifierSet": "Sales",{ "taxJurisdicationCodesidentifier": { "codecontent": "string5yt643095485454", }, "typeCode": "Supplier Order Number" "basisAmount": 0, } "calculation": { }, "rateNumbertypeCode": 0"DirectShip", }"documentDateTime": "2021-02-22T14:57:01-05:00", "exemptionstatus": { "typeCodecode": "stringReceived", } "description": [ }, "contractReference": { "stringidentifier": "contract123232", "status": { ] }"code": "Active", "amounteffectiveTimePeriod": { "contentstartDateTime": 549.3551"2021-01-01", "currencyCodeendDateTime": "USD2021-12-31" } } ]}, "distributionpayment": [ { "amountidentifier": {[ "content": 7849.7551,{ "currencyCodecontent": "string" 15", }, "generalLedgerElementschemeIdentifier": {"UNCL4461" } "element": [ ], "description"NA: "Bookentry credit", "paymentTerm": { ] "description": "NET }30", "enterpriseUnitdueDateTime": {"2020-04-20T09:00:43.456-05:00", "costCenterIdentifierduration": "NA30" } }, }, "projectReferencetax": { "identifiertypeCode": "NASales", } } ],"identifier": "NA", "chargebasisAmount": [6516.9, "calculation": { "basisAmountrateNumber": {0.07525 }, "contentexemption": 3.6205,{ "currencyCodetypeCode": "USD/LBNotExempt", }"identifier": "NA", "basisQuantitydescription": {[ "content": 1800,Not Exempt" ] "unitCode": "LB" }, "amount": { "content": 7849490.7551396725, "currencyCode": "USD" }, "calculation": { }, "rateNumberdistribution": 1[ },{ "reasonCodeamount": [{ { "content": 7007.296725, "contentcurrencyCode": "stringUSD", }, "typeCode": "string" "generalLedgerElement": { } "element": [ ] } "ProductionCost" ], "allowance":] { "basisAmount": { }, "contententerpriseUnit": { 1, "currencyCodecostCenterIdentifier": "USD/LBMC" }, "basisQuantity": { "content"projectReference": { 0, "unitCodeidentifier": "LBNA" }, } "amount": { ], "contentcharge": 0,[ { "currencyCode": "USD" }"typeCode": "Product", "calculationbasisAmount": { "rateNumbercontent": 03.6205, }, "reasonCodecurrencyCode": ["USD/LB" { }, "contentbasisQuantity": "string",{ "typeCodecontent": "string" 1800, } "unitCode": "LB" ] }, }, "transportationTermdescription": {"Manufacturing Costs", "freightTermCodeamount": "DLV"{ }, "shipmentReferencecontent": { 6516.9, "identifiercurrencyCode": ["USD" {}, "contentcalculation": "2130948342",{ "typeCoderateNumber": "shipmentHeader.identifier"1 }, "reasonCode": [ ], "documentIdentifierSetPurchased": [ ] { } "identifier": [], "totalChargeAmount": { {"content": 7007.296725, "currencyCode": "USD" "content": "2130948342"}, "allowance": { "typeCode": "ShipmentDocumentREBATE", "basisAmount": { } "content": 1, ] "currencyCode": "USD/LB" } ]}, "documentDateTimebasisQuantity": "2020-03-19T22:50:45.456-05:00" { }, "extensioncontent": [0, {"unitCode": "LB" }, "dateTime": [ "description": "NA", { "amount": { "content": "2021-03-04T08:00:00-05:00"0, "typeCodecurrencyCode": "Requested Delivery DateUSD" }, } "calculation": { ], "rateNumber": 1 "text": [ }, { "reasonCode": "NA" }, "contenttotalAllowanceAmount": "string"0, "transportationTerm": { "typeCodefreightTermCode": "stringDLV" }, } "shipmentReference": { ] "identifier": { } "content": "2130948342", ] }, "invoiceLinetypeCode": ["shipmentHeader.identifier" {}, "lineNumberIdentifierdocumentIdentifierSet": "1",[ { "note": [ "stringidentifier": { ], "content": "documentReference2130948342":, [ { "typeCode": "ShipmentDocument" "identifier": { } } "content": "string", ], "typeCodedocumentDateTime": "string" 2020-03-19T22:50:45.456-05:00" }, "remittanceInstructions": [ } { ], "statusdeliveryMethodCode": ["OAGIS", { "emailAddressIdentifier": "NA", "effectiveTimePerioduri": {"https://api.smallsupplierA.com/remittance/v1" } "startDateTime": "string", ] }, "endDateTimeinvoiceLine": "string"[ { } "lineNumberIdentifier": "1", } ]"note": "NA", "itemdocumentReference": { [ "identifier": { "contentidentifier": "string2130948342", "schemeIdentifiertypeCode": "stringReceipt", }, "description": "ReceiveDelivery" "customerItemIdentification": { } "identifier": "091818" ], "status": { }, "manufacturerItemIdentificationcode": {"Original", "identifiereffectiveTimePeriod": { "contentstartDateTime": "12135792020-03-20T09:00:43.456-05:00", "typeCodeendDateTime": "SKU" 2020-04-20T09:00:43.456-05:00" } }, "supplierItemIdentificationitem": { "identifier": { "content": "1213579", "typeCodeschemeIdentifier": "SKU" }, } "customerItemIdentification": { }, "upcididentifier": "NA"091818" }, "epcidmanufacturerItemIdentification": { "NA",identifier": { "descriptioncontent": ["1213579", "typeCode": "Custom Feed Blend - Derived from Milk Max Plus Basic""SKU" } ]}, "classificationsupplierItemIdentification":: { [ "identifier": { "codescontent": { "1213579", "codetypeCode": ["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": "20b"string", }, "itemInstancelistAgencyIdentifier": ["FDA" { } "serialNumberIdentifier": [ ] "string" } ], }, "lotcountryOfOriginCode": ["USA" }, { "itemInstance": { "identifierserialNumberIdentifier": [ "NA" "string" ], "lot": ]{ "typeCode": "Batch", } ]"identifier": "d6a6c7f0-3e07-4885-b4b8-f9b0d7a1ece9" } ]}, "quantity": [ { "content": 20001800, "unitCode": "LB", "typeCode": "stringInvoicedQuantity" } ], "unitPrice": { "basisQuantityunitAmount": { "content": 13.6502, "unitCodecurrencyCode": "LBUSD" }, "unitAmount": { }, "contentpurchaseOrderReference": 3.6502, { "currencyCodelineNumberIdentifier": "USD1" }, } "extendedAmount": { }, "purchaseOrderReferencecontent": {6516.9, "lineNumberIdentifiercurrencyCode": "1USD" }, "buyerPartytotalAmount": { "accountIdentifiercontent": [7007.296725, "currencyCode": "stringUSD" }, ] "tax": { }, "extendedAmounttypeCode": {"LineTotal", "contentcalculation": 7300.4,{ "currencyCodeformula": "USDSUM(invoiceLine[current].distributeTax[*].amount)" }, "totalAmountamount": { "content": 7849490.7551396725, "currencyCode": "USD" } }, "taxdistributeTax": [ { "taxJurisdicationCodestypeCode": { "Sales", "codeidentifier": "Mower County", "taxJurisdicationCodes": { }, "calculationcode": { "rateNumbercontent": 0.07525 "County", }, "typeCode": "Local Sales" "amount": { } "content": 549.3551 }, "currencyCodetaxCurrencyCode": "USD", }"basisAmount": 6516.9, "currencyExchangeRatecalculation": { "sourceCurrencyCoderateNumber": "string",0.07525 "targetCurrencyCode": "string", }, "rateNumberamount": "string", 490.396725, "setDateTimecurrencyExchangeRate": "string"{ } "sourceCurrencyCode": "USD", } ]"targetCurrencyCode": "USD", "distributeTax": [ "rateNumber": 1, { "typeCodesetDateTime": "string",2021-03-04T08:00:00-05:00" } "taxJurisdicationCodes": { } "code": { ], "distribution": { "content": "string", "generalLedgerElement": { "typeCodeelement": "string532DEF" } } }, }, "invoiceCharge": [ "amount":{ 0 } "typeCode": "Product", ], "invoiceChargebasisAmount": [1800, { "basisAmount": 0"description": "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" } ]} } ] } } |