Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
SME Files
SME Files

Sample JSON instance (message payload)

Code Block
languagejson
{
  "invoice": {
    "typeCode": "380",
    "invoiceHeader": {
      "addressLineidentifier": [
        {
     "123 Example Street"             ],
 "content": "26287c3b-2db2-4af2-a70a-ecc63255de4c",
          "cityNametypeCode": "Mason CityUUID",
        }
   "countrySubDivisionCode": {  ],
            "content"documentIdentifierSet": "IA",{
              "typeCode"identifier": "State" [
          {
},             "countryCodecontent": "USA2130948342",
            "postalCodetypeCode": "30316ReceiptID"
          }
        ]
      },
 
      "contactdocumentDateTime": ["2020-03-20T09:00:43.456-05:00",
      "note": "You are 30 {days past due on the prior invoice",
      "personNamedocumentReference": [
        {
         { "identifier": "67d9dd71-5ca3-4f87-ac06-25d7488662f6",
            "typeCode": "InvoiceReference",
          "formattedNamedocumentDateTime": "Joe Example"2020-01-15"
        }
      ],
}      "status": {
     ],   "code": "Original",
        "roleCodereasonCode": "ManagerPastDueIncluded",
        "reason": "Partial amount paid "jobTitle": "Plant Manageron prior invoice",
        "effectiveTimePeriod": {
          "responsibilitystartDateTime": "NA2020-03-20T09:00:43.456-05:00",
            "organizationUnitIdentifierendDateTime": "123232",2020-04-20T09:00:43.456-05:00"
        }
   "telephoneCommunication": [  },
      "totalAmount": {
    {        "content": 8007.296725,
        "typeCodecurrencyCode": "WorkUSD",
        },
       "identifiersupplierParty": "641.201.1234"{
        "identifier": {
    }             ]"content": "123454321",
            "emailAddressCommunicationschemeIdentifier": {"NA",
              "identifiertypeCode": "Joe.Example@smallbusinessA.comPartyIdentification"
            },
   
        "internetAddressCommunicationtaxIdentifier": {
   {
          "typeCodecontent": "HomePage51-12345678",
  
           "webAddressUritypeCode": "http://www.smallbusinessa.com"Federal"
        },
     }   "name": {
      }    "content": "SmallSupplierA",
    ]       },"typeCode": "LegalName"
       "customerParty": { },
        "identifierlocation": {
          "contentname": "58885Mason City Warehouse",
          "schemeIdentifierpostalAddress": "NA", {
            "typeCodeaddressLine": "PartyIdentification"
[
       },         "dunsid": "3434343",   "123 Example Street"
   "accountIdentifier": "58885",        ],
"name": {           "contentcityName": "LargeCustomerAMason City",
            "typeCodecountrySubDivisionCode": "LegalName"[
          },    {
    "location": {           "postalAddresscontent": { "IA",
                "addressLinetypeCode": ["State"
              "123}
Customer St N"             ],
            "cityNamecountryCode": "AnytownUSA",
            "countrySubDivisionCodepostalCode": ["30316"
          }
   {     },
        "contact": [
 "content": "MN",         {
            "typeCodepersonName": "State"{
              "formattedName": "Joe }Example"
            ]},
            "countryCoderoleCode": "USAManager",
            "postalCodejobTitle": "55126Plant Manager",
          }    "responsibility": "NA",
    },         "contactorganizationUnitIdentifier": ["123232",
          {             "typeCode"telephoneCommunication": [
"AP",             "personName": {
                "formattedNametypeCode": "Bob NumberCruncherWork",
            },    "identifier": "641.201.1234"
       "telephoneCommunication": [      }
        {    ],
            "typeCodeemailAddressCommunication": "Work",
{
               "identifier": "651Joe.375Example@smallbusinessA.0001com"
            },
 }           "internetAddressCommunication": {
 ],             "emailAddressCommunicationtypeCode": {"HomePage",
              "identifierwebAddressUri": "Bob.NumberCruncher@LargeCustomerAhttp://www.smallbusinessa.com"
            }
          }
        ]
      },
      "customerParty": {
        "buyerContactidentifier": {
          "identifiercontent": "123258885",
          "personNameschemeIdentifier": {
"NA",
           "formattedNametypeCode": "Buyer NamePartyIdentification"

         },
          "jobTitledunsid": "string3434343",
 
        "organizationUnitIdentifieraccountIdentifier": "string58885",
 
        "telephoneCommunicationname": [{
            {
"content": "LargeCustomerA",
             "typeCode": "WorkLegalName",
        },
        "identifierlocation": "651.375.0002"{
          "postalAddress": {
}           ], "addressLine": [
        "emailAddressCommunication": {     "123 Customer St   N"
  "identifier": "Buyer.Name@LargeCustomerA.com"         ],
 },           "preferencecityName": {"Anytown",
            "notecountrySubDivisionCode": [
              "Email Preferred method of communication"
   {
        ]        "content": "MN",
 }         }       },"typeCode": "State"
      "remitToParty": {       }
 "identifier": {          ],
"content": "125484",           "schemeIdentifiercountryCode": "NAUSA",
            "typeCodepostalCode": "PartyIdentification55126"
          },
        "accountIdentifier": "1232323"},
        "namebuyerContact": "Mary's{
Accounting Services",         "locationidentifier": {"1232",
          "postalAddresspersonName": {
            "addressLineformattedName": ["Buyer Name"
             "543 Accounting Way"
},
           ],
 "jobTitle": "Buyer",
          "cityNameorganizationUnitIdentifier": "LeDirect RoyProcurement",
            "countrySubDivisionCodetelephoneCommunication": [
              {
 
              "contenttypeCode": "MNWork",

               "typeCodeidentifier": "State"
 651.375.0002"
            }
 
          ],
            "countryCodeemailAddressCommunication": "USA",{
            "postalCodeidentifier": "55951Buyer.Name@LargeCustomerA.com"
          }
      ,
 },         "contactpreference": [{
          {  "note": [
         "personName": {    "Email Preferred method of communication"
      "formattedName": "Mary Precise"       ]
     },     }
       "jobTitle": "Lead Accountant", }
      },
      "telephoneCommunicationremitToParty": [{
        "identifier": {
     {     "content": "125484",
          "typeCodeschemeIdentifier": "WorkNA",
   
            "identifiertypeCode": "01.507.555.4321PartyIdentification"
        },
     }   "accountIdentifier": "1232323",
        ],
   "name": "Mary's Accounting Services",
        "emailAddressCommunicationlocation": {
          "postalAddress": {
   "identifier": "Mary.Precise@marysaccounting.com"        "addressLine": [
   }           }"543 Accounting Way"
      ]       }],

     "shipToParty": {         "identifiercityName": "1232321Le Roy",
         "name": "Happy Dairy Farm"countrySubDivisionCode",: [
       "location": {      {
    "identifier": {             "content": "Location1232321MN",
                "schemeIdentifiertypeCode": "stringState"
              },
           "coordinate": { ],
            "verticalMeasurecountryCode": "15ZUSA",
            "latitudeMeasurepostalCode": 43.580301503358996,"55951"
          }
     "longitudeMeasure": -92.57476726492425  },
        },
"contact": [
         "physicalAddress": {
            "addressLinepersonName": [{
              "12345 Co Hwy 8formattedName": "Mary Precise"
            ]},
            "cityNamejobTitle": "LeLead RoyAccountant",
            "countrySubDivisionCodetelephoneCommunication": [
              {
                "contenttypeCode": "MNWork",
                "typeCodeidentifier": "State01.507.555.4321"
              }
            ],
            "countryCodeemailAddressCommunication": "USA", {
              "postalCodeidentifier": "55951-1234Mary.Precise@marysaccounting.com"
          },  }
          }
        ]
    "glnid": "123456789"  },
      "shipToParty": {
},         "contacttypeCode": ["End Customer",
         {
   "identifier": "1232321",
        "typeCodename": "OwnerHappy Dairy Farm",
  
         "personNamelocation": {
 
            "formattedNameidentifier": "Mabel{
E. Farmer "             }"content": "Location1232321",
            "telephoneCommunicationschemeIdentifier": "NA"
[          },
    {      "coordinate": {
            "typeCodeverticalMeasure": "Mobile15Z",
                "identifier": "01.507.555.1234"
 latitudeMeasure": 43.580301503358996,
            }
"longitudeMeasure": -92.57476726492425
           ]},
            "emailAddressCommunicationphysicalAddress": {
 
            "identifieraddressLine": "mabel.e.farmer@happyfarmleroymn.com"[
            }  "12345 Co Hwy 8"
     }         ],
      },      "cityName": "billToParty": {Le Roy",
            "identifiercountrySubDivisionCode": { [
              {
    "content": "125484",           "schemeIdentifiercontent": "NAMN",
                "typeCode": "PartyIdentification"": "State"
              },
         "accountIdentifier": [  ],
        "1232323"    "countryCode": "USA",
   ],         "namepostalCode": ["55951-1234"
          {
 },
          "contentglnid": "string123456789",
        },
   "typeCode": "string"    "contact": [
     }     {
   ],         "locationtypeCode": ["Owner",
            "personName": {
              "postalAddressformattedName": ["Mabel E. Farmer "
           { },
               "addressLinetelephoneCommunication": [
                  "string"{
                ]"typeCode": "Mobile",
                "cityNameidentifier": "string",01.507.555.1234"
              }
     "countrySubDivisionCode": [      ],
            "stringemailAddressCommunication": {
               ],"identifier": "mabel.e.farmer@happyfarmleroymn.com"
            }
   "countryCode": "string",      }
        ]
 "postalCode": "string"    },
      "billToParty": {
  }      "identifier": {
     ]     "content": "125484",
    }      "schemeIdentifier": "NA",
 ],         "contacttypeCode": ["PartyIdentification"
        },
     {   "taxIdentifier": "41-12345678",
        "personNamedunsid": ["3434343",
          "accountIdentifier": "1232323",
   {     "name": {
          "formattedNamecontent": "stringLargeCustomerA",
          "typeCode": "LegalName"
  }      },
      ],
   "location": {
          "telephoneCommunicationpostalAddress": [{
            "addressLine": [
{              "123 Customer St N"identifier":
[            ],
      "string"           "cityName": "Anytown",
     ]       "countrySubDivisionCode": [
      }         {
   ],             "emailAddressCommunicationcontent": ["MN",
              {  "typeCode": "State"
             "identifier": [}
            ],
     "string"       "countryCode": "USA",
        ]    "postalCode": "55126"
          }
        },
   ]     "contact": [
     }     {
   ],         "buyerContacttypeCode": {"AP",
            "identifierpersonName": {
[              "stringformattedName": "Bob NumberCruncher"
        ]         }
,
     },       "purchaseOrderReferencetelephoneCommunication": { [
       "identifier": {      {
    "content": "123232",           "typeCode": "stringWork",
        },        "identifier": "documentIdentifierSet651.375.0001":
{           "identifier": [  }
          {  ],
            "contentemailAddressCommunication": "5yt643095485454",{
              "typeCodeidentifier": "Supplier Order NumberBob.NumberCruncher@LargeCustomerA.com"
            }
          ]}
        },]
        "typeCode": "DirectShip"},
        "documentDateTimepurchaseOrderReference": "2021-02-22T14:57:01-05:00",{
        "statusidentifier": ["123232",
        "documentIdentifierSet":  {
            "typeCodeidentifier": "Open",{
            "codecontent": "string5yt643095485454",
          }  "typeCode": "Supplier Order Number"
   ]       },
       "contractReference": { },
        "identifiertypeCode": "contract123232DirectShip",
        "statusdocumentDateTime": {
          "code": "string"2021-02-22T14:57:01-05:00",
          "effectiveTimePeriodstatus": {

           "startDateTimecode": "stringReceived",
 
          "endDateTime": "string"     }
      },
      "contractReference": {
  }       }"identifier": "contract123232",
        "paymentstatus": {
          "identifiercode": ["Active",
          "effectiveTimePeriod": {
            "contentstartDateTime": "12021-01-01",
            "schemeIdentifierendDateTime": "UNCL44612021-12-31"
          }
         ],}
      },
      "notepayment": "string",{
        "paymentTermidentifier": [
{          {
"description": "string",           "dueDateTime": "2020-04-20T09:00:43.456-05:00"content": "15",
            "schemeIdentifier": "UNCL4461"
  }        },
       "tax": { ],
        "typeCodedescription": "SalesBookentry credit",
        "taxJurisdicationCodespaymentTerm": {
          "codedescription": "stringNET 30",
        },
        "basisAmountdueDateTime": 6516.9,"2020-04-20T09:00:43.456-05:00",
          "calculationduration": {"30"
        }
 "rateNumber": 0.07525         },
 
      "exemptiontax": {

         "typeCode": "stringSales",
 
        "identifier": "NA",
          "descriptionbasisAmount": [6516.9,
        "calculation": {
  "string"           ]"rateNumber": 0.07525
        },
        "amountexemption": {
          "contenttypeCode": 490.396725"NotExempt",
          "currencyCodeidentifier": "USDNA",
        }       },
      "distribution"description": [
        {    "Not Exempt"
     "amount": {    ]
        "content": 7007.296725,
            "currencyCode": "string"},
        "amount": {
},           "generalLedgerElementcontent": {490.396725,
          "currencyCode":  "element": [USD"
        }
      },
      "ProductionCostdistribution": [
        {
  ]        "amount": {
 },           "enterpriseUnitcontent": {7007.296725,
            "costCenterIdentifiercurrencyCode": "MCUSD"
          },
          "projectReferencegeneralLedgerElement": {
            "identifierelement": [
"NA"           }   "ProductionCost"
     }       ],
          },
 "charge": [        "enterpriseUnit": {
            "typeCodecostCenterIdentifier": "ProductMC",
  
       "basisAmount": {  },
          "contentprojectReference": 3.6205,{
            "currencyCodeidentifier": "USD/LBNA"
          },
        }
 "basisQuantity": {      ],
      "contentcharge": 1800,[
            "unitCode": "LB"{
           }"typeCode": "Product",
          "amountbasisAmount": {
            "content": 65163.96205,
            "currencyCode": "USD/LB"
          },
          "calculationbasisQuantity": {
            "rateNumber"content": 1800,
            "unitCode": 1"LB"
          },
          "reasonCodedescription": ["Manufacturing Costs",
          "amount": {
 
            "content": "string"6516.9,
              "typeCodecurrencyCode": "stringUSD"
          },
  }        "calculation": {
 ]          } "rateNumber": 1
    ],      },
"totalChargeAmount": {         "contentreasonCode": 7007.296725, [
           "currencyCode": "USDPurchased"
      },    ]
  "allowance": {     }
   "typeCode": "NA",  ],
      "basisAmounttotalChargeAmount": {

         "content": 17007.296725,
          "currencyCode": "USD/LB""
      },
      "allowance": {
        }"typeCode": "REBATE",
        "basisQuantitybasisAmount": {
          "content": 01,
          "unitCodecurrencyCode": "USD/LB"
        },
        "amountbasisQuantity": {
          "content": 0,
          "currencyCodeunitCode": "USDLB"
        },
        "calculationdescription": {
 "NA",
        "rateNumberamount": 0{
        },  "content": 0,
     "reasonCode": [    "currencyCode": "USD"
     {   },
         "contentcalculation": "string",{
            "typeCoderateNumber": "string"1
        },
 }       "reasonCode": "NA"
]       },
      "totalAllowanceAmount": 0,
      "transportationTerm": {
        "freightTermCode": "DLV"
      },
      "shipmentReference": {
        "identifier": [
         : {

           "content": "2130948342",
            "typeCode": "shipmentHeader.identifier"
          }
        ],
        "documentIdentifierSet": [
          {
            "identifier": [
              {
 
              "content": "2130948342",

               "typeCode": "ShipmentDocument"
 
            }
 
          ]
          }
        ],
        "documentDateTime": "2020-03-19T22:50:45.456-05:00"
      },
      "remittanceInstructions": [
        {
          "deliveryMethodCode": "OAGIS",
          "emailAddressIdentifier": [
            "NA"
          ],
          "uri": "https://api.smallsupplierA.com/remittance/v1"
        }
      ]
    },
    "invoiceLine": [
      {
        "lineNumberIdentifier": "1",
        "note": "stringNA",
        "documentReference": [
          {
            "identifier": "NA2130948342",
            "typeCode": "NAReceipt",
            "description": "NAReceiveDelivery"
          }
        ],
        "status": {
          "code": "Original",
          "effectiveTimePeriod": {
            "startDateTime": "string"2020-03-20T09:00:43.456-05:00",
            "endDateTime": "string2020-04-20T09:00:43.456-05:00"
          }
        },
        "item": {
          "identifier": {
            "content": "string1213579",
            "schemeIdentifier": "stringSKU"
          },
          "customerItemIdentification": {
            "identifier": "091818"
          },
          "manufacturerItemIdentification": {
            "identifier": {
              "content": "1213579",
              "typeCode": "SKU"
            }
          },
          "supplierItemIdentification": {
            "identifier": {
              "content": "1213579",
              "typeCode": "SKU"
            }
          },
          "description": "Custom Feed Blend - Derived from Milk Max Plus Basic",
          "classification": {
            "codes": {
              "code": [
                {
                  "content": "stringDairy Supplement",
                  "listIdentifier": "stringAnimal Feeds",
                  "listVersionIdentifier": "string"
       20b",
        }               ]
            }
          },
          "countryOfOriginCode"listAgencyIdentifier": "stringFDA"
        },
        "itemInstance": [    }
      {        ]
    "serialNumberIdentifier": "NA",       }
     "lot": {    },
          "identifiercountryOfOriginCode": "NAUSA"
        },
     }   "itemInstance": {
      }    "serialNumberIdentifier": [
   ],         "quantityNA":
[           {],
            "contentlot": 1800,{
            "unitCodetypeCode": "LBBatch",
            "typeCodeidentifier": "stringd6a6c7f0-3e07-4885-b4b8-f9b0d7a1ece9"
          }
        ]},
        "unitPricequantity": {
          "basisQuantitycontent": {1800,
            "contentunitCode": 1"LB",
          "typeCode": "InvoicedQuantity"
       "unitCode": "LB" },
        "unitPrice": {
},           "unitAmount": {
            "content": 3.6502,
            "currencyCode": "USD"
          }
        },
        "purchaseOrderReference": {
          "lineNumberIdentifier": "1"
        },
        "extendedAmount": {
          "content": 73006516.49,
          "currencyCode": "USD"
        },
        "totalAmount": {
          "content": 78497007.7551296725,
          "currencyCode": "USD"
        },
        "tax": [{
          {
"typeCode": "LineTotal",
           "taxJurisdicationCodescalculation": {
 
            "codeformula": "Mower County"
 SUM(invoiceLine[current].distributeTax[*].amount)"
          },
 
          "taxCurrencyCodeamount": "string",{
            "calculationcontent": {490.396725,
            "currencyCode":  "rateNumber": 0.07525USD"
          }
        },,
        "distributeTax": [
       "amount": {  {
            "contenttypeCode": 549.3551"Sales",
              "currencyCodeidentifier": "USDMower County",
            },"taxJurisdicationCodes": {
              "currencyExchangeRatecode": {
                "sourceCurrencyCodecontent": "stringCounty",
                "targetCurrencyCodetypeCode": "stringLocal Sales",
              "rateNumber": "string",}
            },
  "setDateTime": "string"         "taxCurrencyCode": "USD",
  }           }"basisAmount": 6516.9,
        ],       "calculation": {
 "distributeTax":  [           {
"rateNumber": 0.07525
           "typeCode": "string" },
            "taxJurisdicationCodesamount": {
 490.396725,
            "codecurrencyExchangeRate": {
                "contentsourceCurrencyCode": "stringUSD",
 
              "typeCodetargetCurrencyCode": "stringUSD",
              }"rateNumber": 1,
              },
"setDateTime": "2021-03-04T08:00:00-05:00"
           "amount": 0}
          }
        ],
        "distribution": {
          "generalLedgerElement": {
            "element": "532DEF"
          }
        },
        "invoiceCharge": [
          {
            "basisAmounttypeCode": 0,
            "amount": 0"Product",
            "calculationbasisAmount": {1800,
            "description": "Manufacturing Costs for Purchased Product"rateNumber":,
0             }"amount": 6516.9,
            "reasonCodecalculation": [{
              {
"rateNumber": 3.6502
               "content": "string"},
                "typeCodereasonCode": "stringManufactured"
          }
   }     ],
       ] "invoiceAllowance": [
        }  {
      ],      "typeCode":   "invoiceAllowanceREBATE":,
 [           {"basisAmount": 0,
            "basisAmountdescription": 0"NA",
            "amount": 0,
            "calculation": {
              "rateNumber": 01
            },
            "reasonCode": ["NA",
            "promotionReference":  {
 
              "contentrevisionIdentifier": "stringNA",
            }
   "typeCode": "string"      }
        }],
        "requestedDeliveryDate": "2021-03-04T08:00:00-05:00",
  ]      "actualDeliveryDateTime": "2020-03-04T07:50:45.456-05:00",
   }     "shipmentReference": {
  ],         "requestedDeliveryDateidentifier": "string2130948342",
          "actualDeliveryDateTimetypeCode": "CAD"ShipmentReference"
        }
      }
    ]
  }
}