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": [ { "typeCodecontent": "Work26287c3b-2db2-4af2-a70a-ecc63255de4c", "identifiertypeCode": "641.201.1234UUID" } ], ], "documentIdentifierSet": { "emailAddressCommunicationidentifier": {[ "identifier": "Joe.Example@smallbusinessA.com"{ }"content": "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": "LargeCustomerA", 2020-03-20T09:00:43.456-05:00", "endDateTime": "2020-04-20T09:00:43.456-05:00" "typeCode": "LegalName" } }, "locationtotalAmount": { "postalAddresscontent": { 8007.296725, "addressLinecurrencyCode": ["USD" }, "123 Customer St N" supplierParty": { ],"identifier": { "cityNamecontent": "Anytown123454321", "countrySubDivisionCodeschemeIdentifier": ["NA", "typeCode": "PartyIdentification" { }, "contenttaxIdentifier": "MN", { "typeCodecontent": "State51-12345678", "typeCode": "Federal" } }, ], "name": { "countryCodecontent": "USASmallSupplierA", "postalCodetypeCode": "55126LegalName" }, } "location": { }, "contactname": [ "Mason City Warehouse", "postalAddress": { "typeCodeaddressLine": "AP",[ "personName":123 {Example Street" "formattedName": "Bob NumberCruncher"], "cityName": "Mason }City", "telephoneCommunicationcountrySubDivisionCode": [ { "typeCodecontent": "WorkIA", "identifiertypeCode": "651.375.0001State" } ], "emailAddressCommunicationcountryCode": { "USA", "identifierpostalCode": "Bob.NumberCruncher@LargeCustomerA.com30316" } }, "contact": [ } { ], "buyerContactpersonName": { "identifierformattedName": "1232Joe Example", "personName": { }, "formattedNameroleCode": "Buyer Name""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", "typeCodeaccountIdentifier": "PartyIdentification58885", "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 Precise"Name" }, }, "jobTitle": "Buyer", "jobTitleorganizationUnitIdentifier": "LeadDirect AccountantProcurement", "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 { }, "physicalAddresspostalAddress": { "addressLine": [ "12345543 CoAccounting Hwy 8Way" ], "cityName": "Le Roy", "countrySubDivisionCode": [ { "content": "MN", "typeCode": "State" } ], "countryCode": "USA", "postalCode": "55951-1234" }, "postalCode": "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" } } ] },, "shipToParty": { "typeCode": "End Customer", "billToPartyidentifier": {"1232321", "identifiername": {"Happy Dairy Farm", "contentlocation": "125484",{ "schemeIdentifieridentifier": "NA", { "typeCodecontent": "PartyIdentificationLocation1232321" , }, "accountIdentifierschemeIdentifier": ["NA" "1232323"}, ], "coordinate": { "name": [ {"verticalMeasure": "15Z", "contentlatitudeMeasure": "string"43.580301503358996, "typeCodelongitudeMeasure": "string" -92.57476726492425 } }, ], "locationphysicalAddress": { [ { "addressLine": [ "postalAddress": [ "12345 Co Hwy 8" { ], "addressLinecityName": [ "Le Roy", "stringcountrySubDivisionCode": [ ],{ "cityNamecontent": "stringMN", "countrySubDivisionCodetypeCode": ["State" "string"} ], "countryCode": "stringUSA", "postalCode": "string" 55951-1234" } , ] "glnid": "123456789" } ]}, "contact": [ { "personNametypeCode": ["Owner", "personName": { "formattedName": "string"Mabel E. Farmer " }, } "telephoneCommunication": [ ], { "telephoneCommunication": [ {"typeCode": "Mobile", "identifier": [ "01.507.555.1234" } "string" ], "emailAddressCommunication": ]{ } "identifier": "mabel.e.farmer@happyfarmleroymn.com" ], } } "emailAddressCommunication": [ ] {}, "billToParty": { "identifier": [{ "string""content": "125484", "schemeIdentifier": "NA", ] "typeCode": "PartyIdentification" }, "taxIdentifier": "41-12345678", ] "dunsid": "3434343", } ]"accountIdentifier": "1232323", "buyerContactname": { "identifiercontent": ["LargeCustomerA", "typeCode": "stringLegalName" ] }, } "location": { }, "purchaseOrderReferencepostalAddress": { "identifieraddressLine": {[ "content": "123232",123 Customer St N" "typeCode": "string" ], }, "cityName": "documentIdentifierSetAnytown":, { "identifiercountrySubDivisionCode": [ { "content": "5yt643095485454MN", "typeCode": "State"Supplier Order Number" } ], "countryCode": "USA", ] },"postalCode": "55126" "typeCode": "DirectShip", } "documentDateTime": "2021-02-22T14:57:01-05:00" }, "statuscontact": [ { "typeCode": "OpenAP", "codepersonName": "string"{ } "formattedName": "Bob NumberCruncher" ] }, }, "contractReference": { "identifiertelephoneCommunication": "contract123232", "status": { "code": "string",[ "effectiveTimePeriod": { "startDateTimetypeCode": "stringWork", "endDateTimeidentifier": "string651.375.0001" } } ], }, "paymentemailAddressCommunication": { "identifier": [ "identifier": "Bob.NumberCruncher@LargeCustomerA.com" { } "content": "1", } "schemeIdentifier": "UNCL4461" ] }, ],"purchaseOrderReference": { "noteidentifier": "string123232", "paymentTermdocumentIdentifierSet": { "descriptionidentifier": "string",{ "dueDateTimecontent": "2020-04-20T09:00:43.456-05:00"5yt643095485454", }, "extensiontypeCode": ["Supplier Order Number" {} } ] }, }, "taxtypeCode": {"DirectShip", "typeCodedocumentDateTime": "Sales2021-02-22T14:57:01-05:00", "taxJurisdicationCodesstatus": { "code": "stringReceived" }, "basisAmount": 6516.9, "calculation": { }, "rateNumbercontractReference": 0.07525{ }"identifier": "contract123232", "exemptionstatus": { "typeCodecode": "stringActive", "descriptioneffectiveTimePeriod": { [ "startDateTime": "string"2021-01-01", "endDateTime": "2021-12-31" ] }, } "amount": { }, "contentpayment": 490.396725,{ "currencyCodeidentifier": [ "USD" } { }, "distributioncontent": ["15", { "amount": {"schemeIdentifier": "UNCL4461" } "content": 7849.7551, ], "currencyCodedescription": "stringBookentry credit", },"paymentTerm": { "generalLedgerElementdescription": { "NET 30", "elementdueDateTime": ["2020-04-20T09:00:43.456-05:00", "duration": "NA30" } ] }, }, "tax": { "enterpriseUnittypeCode": { "Sales", "costCenterIdentifieridentifier": "NA", }, "basisAmount": 6516.9, "projectReferencecalculation": { "identifierrateNumber": "NA" 0.07525 }, } "exemption": { ], "chargetypeCode": ["NotExempt", {"identifier": "NA", "typeCodedescription": "Product", [ "basisAmountNot Exempt": { ] "content": 3.6205, }, "currencyCodeamount": { "USD/LB" }"content": 490.396725, "basisQuantitycurrencyCode": {"USD" "content": 1800, } }, "unitCodedistribution": "LB"[ { }, "amount": { "content": 65167007.9296725, "currencyCode": "USD" }, "calculationgeneralLedgerElement": { "rateNumberelement": 1[ }, "ProductionCost" "reasonCode": [ ] { }, "contententerpriseUnit": "string", { "typeCodecostCenterIdentifier": "stringMC" }, } "projectReference": { ] } "identifier": "NA" ], "totalChargeAmount": {} "content": 7007.296725,} ], "currencyCode": "USD" "charge": [ }, { "allowance": { "typeCode": "NAProduct", "basisAmount": { "content": 13.6205, "currencyCode": "USD/LB" }, "basisQuantity": { "content": 01800, "unitCode": "LB" }, "amountdescription": { "Manufacturing Costs", "contentamount": 0,{ "currencyCodecontent": "USD"6516.9, }, "currencyCode": "USD" "calculation": { }, "rateNumber": 0 "calculation": { }, "reasonCoderateNumber": [1 {}, "content": "string", "reasonCode": [ "typeCode": "stringPurchased" }] ]} }], "totalAllowanceAmounttotalChargeAmount": 0,{ "transportationTermcontent": {7007.296725, "freightTermCodecurrencyCode": "DLVUSD" }, "shipmentReferenceallowance": { "identifiertypeCode": ["REBATE", "basisAmount": { "content": "2130948342"1, "typeCodecurrencyCode": "shipmentHeader.identifier"USD/LB" }, } "basisQuantity": { ], "documentIdentifierSetcontent": [ 0, "unitCode": "LB" { }, "description": "identifierNA":, [ "amount": { { "content": 0, "contentcurrencyCode": "2130948342USD", }, "typeCodecalculation": "ShipmentDocument" { "rateNumber": 1 }, "reasonCode": "NA" ] }, } "totalAllowanceAmount": 0, ],"transportationTerm": { "documentDateTimefreightTermCode": "2020-03-19T22:50:45.456-05:00DLV" }, "remittanceInstructionsshipmentReference": [ { "deliveryMethodCode": "string" 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" } ]} } ] } } |