Versions Compared

Key

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

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.

JSON Schema

View file
nameInvoice-oagis-id-12d76e9cf0164df2818c763d7edfd292.json

OpenAPI Spec (POST)

View file
nameInvoice-oagis-id-12d76e9cf0164df2818c763d7edfd292.yml

OpenAPI Spec (GET)

...

Include Page
All OAGi SME Express Pack Files
All OAGi SME Express Pack Files

Sample JSON instance (message payload)

Code Block
languagejson
{
  "invoice": {
    "typeCode": "380",
    "invoiceHeader": {
      "identifier": [
        {
          "content": "26287c3b-2db2-4af2-a70a-ecc63255de4c",
          "typeCode": "UUID"
        }
      ],
      "documentIdentifierSet": {
        "identifier": [
          {
            "content": "2130948342",
            "typeCode": "ReceiptID"
          }
        ]
      },
      "documentDateTime": "2020-03-20T09:00:43.456-05:00",
      "note": "You are 30 days past due on the prior invoice",
      "documentReference": [
        {
          "identifier": "67d9dd71-5ca3-4f87-ac06-25d7488662f6",
          "typeCode": "InvoiceReference",
          "documentDateTime": "2020-01-15"
        }
      ],
      "status": {
        "code": "Original",
        "reasonCode": "PastDueIncluded",
        "reason": "Partial amount paid on prior invoice",
        "effectiveTimePeriod": {
          "startDateTime": "2020-03-20T09:00:43.456-05:00",
          "endDateTime": "2020-04-20T09:00:43.456-05:00"
        }
      },
      "totalAmount": {
        "content": 8007.296725,
        "currencyCode": "USD"
      },
      "supplierParty": {
        "identifier": {
          "content": "123454321",
          "schemeIdentifier": "NA",
          "typeCode": "PartyIdentification"
        },
        "taxIdentifier": {
          "content": "51-12345678",
          "typeCode": "Federal"
        },
        "name": {
          "content": "SmallSupplierA",
          "typeCode": "LegalName"
        },
        "location": {
          "name": "Mason City Warehouse",
          "postalAddress": {
            "addressLine": [
              "123 Example Street"
            ],
            "cityName": "Mason City",
            "countrySubDivisionCode": [
              {
                "content": "IA",
                "typeCode": "State"
              }
            ],
            "countryCode": "USA",
            "postalCode": "30316"
          }
        },
        "contact": [
          {
            "personName": {
              "formattedName": "Joe Example"
            },
            "roleCode": "Manager",
            "jobTitle": "Plant Manager",
            "responsibility": "NA",
            "organizationUnitIdentifier": "123232",
            "telephoneCommunication": [
              {
                "typeCode": "Work",
                "identifier": "641.201.1234"
              }
            ],
            "emailAddressCommunication": {
              "identifier": "Joe.Example@smallbusinessA.com"
            },
            "internetAddressCommunication": {
              "typeCode": "HomePage",
              "webAddressUri": "http://www.smallbusinessa.com"
            }
          }
        ]
      },
      "customerParty": {
        "identifier": {
          "content": "58885",
          "schemeIdentifier": "NA",
          "typeCode": "PartyIdentification"
        },
        "dunsid": "3434343",
        "accountIdentifier": "58885",
        "name": {
          "content": "LargeCustomerA",
          "typeCode": "LegalName"
        },
        "location": {
          "postalAddress": {
            "addressLine": [
              "123 Customer St N"
            ],
            "cityName": "Anytown",
            "countrySubDivisionCode": [
              {
                "content": "MN",
                "typeCode": "State"
              }
            ],
            "countryCode": "USA",
            "postalCode": "55126"
          }
        },
        "buyerContact": {
          "identifier": "1232",
          "personName": {
            "formattedName": "Buyer Name"
          },
          "jobTitle": "Buyer",
          "organizationUnitIdentifier": "Direct Procurement",
          "telephoneCommunication": [
            {
              "typeCode": "Work",
              "identifier": "651.375.0002"
            }
          ],
          "emailAddressCommunication": {
            "identifier": "Buyer.Name@LargeCustomerA.com"
          },
          "preference": {
            "note": [
              "Email Preferred method of communication"
            ]
          }
        }
      },
      "remitToParty": {
        "identifier": {
          "content": "125484",
          "schemeIdentifier": "NA",
          "typeCode": "PartyIdentification"
        },
        "accountIdentifier": "1232323",
        "name": "Mary's Accounting Services",
        "location": {
          "postalAddress": {
            "addressLine": [
              "543 Accounting Way"
            ],
            "cityName": "Le Roy",
            "countrySubDivisionCode": [
              {
                "content": "MN",
                "typeCode": "State"
              }
            ],
            "countryCode": "USA",
            "postalCode": "55951"
          }
        },
        "contact": [
          {
            "personName": {
              "formattedName": "Mary Precise"
            },
            "jobTitle": "Lead Accountant",
            "telephoneCommunication": [
              {
                "typeCode": "Work",
                "identifier": "01.507.555.4321"
              }
            ],
            "emailAddressCommunication": {
              "identifier": "Mary.Precise@marysaccounting.com"
            }
          }
        ]
      },
      "shipToParty": {
        "typeCode": "End Customer",
        "identifier": "1232321",
        "name": "Happy Dairy Farm",
        "location": {
          "identifier": {
            "content": "Location1232321",
            "schemeIdentifier": "NA"
          },
          "coordinate": {
            "verticalMeasure": "15Z",
            "latitudeMeasure": 43.580301503358996,
            "longitudeMeasure": -92.57476726492425
          },
          "physicalAddress": {
            "addressLine": [
              "12345 Co Hwy 8"
            ],
            "cityName": "Le Roy",
            "countrySubDivisionCode": [
              {
                "content": "MN",
                "typeCode": "State"
              }
            ],
            "countryCode": "USA",
            "postalCode": "55951-1234"
          },
          "glnid": "123456789"
        },
        "contact": [
          {
            "typeCode": "Owner",
            "personName": {
              "formattedName": "Mabel E. Farmer "
            },
            "telephoneCommunication": [
              {
                "typeCode": "Mobile",
                "identifier": "01.507.555.1234"
              }
            ],
            "emailAddressCommunication": {
              "identifier": "mabel.e.farmer@happyfarmleroymn.com"
            }
          }
        ]
      },
      "billToParty": {
        "identifier": {
          "content": "125484",
          "schemeIdentifier": "NA",
          "typeCode": "PartyIdentification"
        },
        "taxIdentifier": "41-12345678",
        "dunsid": "3434343",
        "accountIdentifier": "1232323",
        "name": {
          "content": "LargeCustomerA",
          "typeCode": "LegalName"
        },
        "location": {
          "postalAddress": {
            "addressLine": [
              "123 Customer St N"
            ],
            "cityName": "Anytown",
            "countrySubDivisionCode": [
              {
                "content": "MN",
                "typeCode": "State"
              }
            ],
            "countryCode": "USA",
            "postalCode": "55126"
          }
        },
        "contact": [
          {
            "typeCode": "AP",
            "personName": {
              "formattedName": "Bob NumberCruncher"
            },
            "telephoneCommunication": [
              {
                "typeCode": "Work",
                "identifier": "651.375.0001"
              }
            ],
            "emailAddressCommunication": {
              "identifier": "Bob.NumberCruncher@LargeCustomerA.com"
            }
          }
        ]
      },
      "purchaseOrderReference": {
        "identifier": "123232",
        "documentIdentifierSet": {
          "identifier": {
            "content": "5yt643095485454",
            "typeCode": "Supplier Order Number"
          }
        },
        "typeCode": "DirectShip",
        "documentDateTime": "2021-02-22T14:57:01-05:00",
        "status": {
          "code": "Received"
        }
      },
      "contractReference": {
        "identifier": "contract123232",
        "status": {
          "code": "Active",
          "effectiveTimePeriod": {
            "startDateTime": "2021-01-01",
            "endDateTime": "2021-12-31"
          }
        }
      },
      "payment": {
        "identifier": [
          {
            "content": "15",
            "schemeIdentifier": "UNCL4461"
          }
        ],
        "description": "Bookentry credit",
        "paymentTerm": {
          "description": "NET 30",
          "dueDateTime": "2020-04-20T09:00:43.456-05:00",
          "duration": "30"
        }
      },
      "tax": {
        "typeCode": "Sales",
        "identifier": "NA",
        "basisAmount": 6516.9,
        "calculation": {
          "rateNumber": 0.07525
        },
        "exemption": {
          "typeCode": "NotExempt",
          "identifier": "NA",
          "description": [
            "Not Exempt"
          ]
        },
        "amount": {
          "content": 490.396725,
          "currencyCode": "USD"
        }
      },
      "distribution": [
        {
          "amount": {
            "content": 7007.296725,
            "currencyCode": "USD"
          },
          "generalLedgerElement": {
            "element": [
              "ProductionCost"
            ]
          },
          "enterpriseUnit": {
            "costCenterIdentifier": "MC"
          },
          "projectReference": {
            "identifier": "NA"
          }
        }
      ],
      "charge": [
        {
          "typeCode": "Product",
          "basisAmount": {
            "content": 3.6205,
            "currencyCode": "USD/LB"
          },
          "basisQuantity": {
            "content": 1800,
            "unitCode": "LB"
          },
          "description": "Manufacturing Costs",
          "amount": {
            "content": 6516.9,
            "currencyCode": "USD"
          },
          "calculation": {
            "rateNumber": 1
          },
          "reasonCode": [
            "Purchased"
          ]
        }
      ],
      "totalChargeAmount": {
        "content": 7007.296725,
        "currencyCode": "USD"
      },
      "allowance": {
        "typeCode": "REBATE",
        "basisAmount": {
          "content": 1,
          "currencyCode": "USD/LB"
        },
        "basisQuantity": {
          "content": 0,
          "unitCode": "LB"
        },
        "description": "NA",
        "amount": {
          "content": 0,
          "currencyCode": "USD"
        },
        "calculation": {
          "rateNumber": 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": "NA",
        "documentReference": [
          {
            "identifier": "2130948342",
            "typeCode": "Receipt",
            "description": "ReceiveDelivery"
          }
        ],
        "status": {
          "code": "Original",
          "effectiveTimePeriod": {
            "startDateTime": "2020-03-20T09:00:43.456-05:00",
            "endDateTime": "2020-04-20T09:00:43.456-05:00"
          }
        },
        "item": {
          "identifier": {
            "content": "1213579",
            "schemeIdentifier": "SKU"
          },
          "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": "Dairy Supplement",
                  "listIdentifier": "Animal Feeds",
                  "listVersionIdentifier": "20b",
                  "listAgencyIdentifier": "FDA"
                }
              ]
            }
          },
          "countryOfOriginCode": "USA"
        },
        "itemInstance": {
          "serialNumberIdentifier": [
            "NA"
          ],
          "lot": {
            "typeCode": "Batch",
            "identifier": "d6a6c7f0-3e07-4885-b4b8-f9b0d7a1ece9"
          }
        },
        "quantity": {
          "content": 1800,
          "unitCode": "LB",
          "typeCode": "InvoicedQuantity"
        },
        "unitPrice": {
          "unitAmount": {
            "content": 3.6502,
            "currencyCode": "USD"
          }
        },
        "purchaseOrderReference": {
          "lineNumberIdentifier": "1"
        },
        "extendedAmount": {
          "content": 6516.9,
          "currencyCode": "USD"
        },
        "totalAmount": {
          "content": 7007.296725,
          "currencyCode": "USD"
        },
        "tax": {
          "typeCode": "LineTotal",
          "calculation": {
            "formula": "SUM(invoiceLine[current].distributeTax[*].amount)"
          },
          "amount": {
            "content": 490.396725,
            "currencyCode": "USD"
          }
        },
        "distributeTax": [
          {
            "typeCode": "Sales",
            "identifier": "Mower County",
            "taxJurisdicationCodes": {
              "code": {
                "content": "County",
                "typeCode": "Local Sales"
              }
            },
            "taxCurrencyCode": "USD",
            "basisAmount": 6516.9,
            "calculation": {
              "rateNumber": 0.07525
            },
            "amount": 490.396725,
            "currencyExchangeRate": {
              "sourceCurrencyCode": "USD",
              "targetCurrencyCode": "USD",
              "rateNumber": 1,
              "setDateTime": "2021-03-04T08:00:00-05:00"
            }
          }
        ],
        "distribution": {
          "generalLedgerElement": {
            "element": "532DEF"
          }
        },
        "invoiceCharge": [
          {
            "typeCode": "Product",
            "basisAmount": 1800,
            "description": "Manufacturing Costs for Purchased Product",
            "amount": 6516.9,
            "calculation": {
              "rateNumber": 3.6502
            },
            "reasonCode": "Manufactured"
          }
        ],
        "invoiceAllowance": [
          {
            "typeCode": "REBATE",
            "basisAmount": 0,
            "description": "NA",
            "amount": 0,
            "calculation": {
              "rateNumber": 1
            },
            "reasonCode": "NA",
            "promotionReference": {
              "revisionIdentifier": "NA"
            }
          }
        ],
        "requestedDeliveryDate": "2021-03-04T08:00:00-05:00",
        "actualDeliveryDateTime": "2020-03-04T07:50:45.456-05:00",
        "shipmentReference": {
          "identifier": "2130948342",
          "typeCode": "ShipmentReference"
        }
      }
    ]
  }
}