Skip to main content

Reference Types

Internal Reference

An property with a reference type "InternalReference" does not contain all the object information directly. The object links to an element within the same document of the type matching the referencing objects className property. This referenced object contains the full set of properties of the referencing object.

Example

In the example below, the "seller" property is an internal reference which references internally to a "BusinessPartner" object, via the "uniqueText" value in the seller's keys array.

The nature of the reference is denoted by the "@type" property's value in the seller object being set to "InternalReference".

Seller as a Business Partner

{
"seller": {
"@type": "InternalReference",
"id": "656abbb7-3154-4362-8958-5e21d022929f",
"className": "BusinessPartner",
"externalIdentities": [
{
"integrationKey": "SapS4",
"externalId": "6900"
}
],
"keys": [
{
"uniqueText": "656abbb7-3154-4362-8958-5e21d022929f"
}
]
},

"businessPartner": [
{
"@type": "BusinessPartner",
"externalIdentity": [
{
"@type": "ExternalID",
"internalType": "BusinessPartner",
"externalSystemCode": "SapS4",
"externalId": "6900"
}
],
"emailAddress": {
"@type": "EmailAddress",
"email": "[email protected]",
"uniqueText": "a729bdf4-9da5-42b0-83b8-f418014007c6"
},
"phoneAddress": {
"@type": "PhoneAddress",
"addressType": {
"@type": "DataReference",
"schemaName": "limber",
"shapeName": "PhoneAddressType",
"iri": "https://schema.limbergraph.com/limber/PhoneAddressType#Landline",
"keys": [
{
"code": "Landline"
}
],
"label": "Landline"
},
"phoneNumber": "09 234 1234",
"uniqueText": "cc6acf1f-17cd-4210-b45f-46342d467798"
}
"code": "6900",
"businessPartnerRole": [
{
"@type": "DataReference",
"schemaName": "limber",
"shapeName": "BusinessPartnerRole",
"iri": "https://schema.limbergraph.com/limber/BusinessPartnerRole#Seller",
"keys": [
{
"code": "Seller"
}
],
"label": "Seller"
}
],
"uniqueText": "656abbb7-3154-4362-8958-5e21d022929f"
}
]
}

Document Reference

For a property with a reference type of "DataReference" the Data for the referenced object is stored in its own separate document and is referenced by the parent object via an identifier stored in the parent object. The referenced object can be retrieved via subsequent API calls by using the IRI.

Example

In the examples below, the property "customerAccount" in the SalesOrder document, references a CustomerAccount document.

The nature of the reference is denoted by the "@type" property's value being set to "DataReference" in the customerAccount object within the SalesOrder Document.

Sales Order document containing a document reference to a Customer Account document

{
"shapeName": "SalesOrder",
"customerAccount": {
"@type": "DataReference",
"schemaName": "limber",
"shapeName": "CustomerAccount",
"iri": "https://schema.limbergraph.com/limber/CustomerAccount#41f5a383-5394-43aa-aa51-d05283874017",
"externalIdentities": [
{
"integrationKey": "SapS4",
"externalId": "1001035::6900::10::03"
}
],
"keys": [
{
"accountCode": "SapS4-1001035::6900::10::03"
},
{
"uniqueText": "41f5a383-5394-43aa-aa51-d05283874017"
}
],
"label": "SapS4-1001035::6900::10::03"
}
}

The Customer Account document referenced from the Sales Order document

{
"shapeName": "CustomerAccount",
"data": {
"@type": "CustomerAccount",
"externalIdentity": [
{
}
],
"extendedBy": [
],
"attributeField": [
],
"sourceSystemCode": "SapS4",
"sourceSystemId": "1001035::6900::10::03",
"recordedBy": [
{
}
],
"accountCode": "SapS4-1001035::6900::10::03",
"seller": {},
"payer": {},
"businessPartner": [
],
"uniqueText": "41f5a383-5394-43aa-aa51-d05283874017",
"@version": 1
},
}

Value

The data is stored inside the document and can only be accessed from within the object.

Example

{
"buyerPoNumber": "1234",
"deliveryDate": "2021-11-02T00:00:00Z",
"orderDate": "2021-10-04T00:00:00Z"
}