DFC standard specifications
DFC Use Cases
DFC Use Cases
  • Introduction
  • Sources and licences
  • Contact and partners
  • Semantic specifications
    • Business ontology
    • Product ontology
    • Technical ontology
  • Technical specifications
    • Protocols specifications
    • Decentralized identifier matching reference system
    • Specifics API
    • Authentication strategy
    • Architecture representations
  • Prototype specifications
  • 🚧Solid client protocol
  • 🚧Connector
    • Model specifications
    • Semantizer specifications
    • Connector specifications
  • Use Cases
    • Enterprise Use Cases
    • Product Use Cases
      • Product Transformations
      • CSA Use Cases
    • Orders
    • Order Use Cases
      • Wholesale Order Processing
    • Glossary of terms
  • Appendixes
    • Appendix 1. General decisions
      • Federation vs Syndication
      • Stateless or stateful?
      • Service granularity
      • Directionality
      • Identification and authentication
      • Centralized or decentralized data storage
      • Metadata repository
    • Appendix 2. Technical decisions
      • Libraries to develop in semantic
      • Transition strategy fron current to ideal
      • Service standard
      • Serialization
      • Transport layer
      • Multi- or single-resource requests?
      • Right delegation between platforms and DFC
      • Data validity and inferences
    • Appendix 3. Practical Examples
      • Version 1.9
      • Version 1.8.2
      • version 1.7.4
      • version 1.7.3
      • version 1.7.1
      • version 1.7
      • version 1.6.2
      • version 1.6.1
      • version 1.6
      • version 1.5.1
      • version 1.5
      • version 1.3
      • version 1.2
  • Contributing
    • Procedures
      • Updates to the ontology
        • Patch releases procedure
        • Minor releases procedure
        • Major releases procedure
      • Taxonomy enrichment
        • Taxonomy updates
    • Platform Notifcations
  • Platform Register
    • Platform Register
Powered by GitBook
On this page
  • Changes log from version 1.3
  • GET User Data
  • Patch Catalog item

Was this helpful?

  1. Appendixes
  2. Appendix 3. Practical Examples

version 1.5

Changes log from version 1.3

  • changes prefix according to ontology

  • rdfs:label was replaced by dfc-b description on CutomerCategory

  • units were added

  • context on @id was made more easier

  • change @context with static.datafoodconsortium.org instead datafoodconsortium.org

  • ProductType reference system

  • Patch example

GET User Data

{
  "@context": {
    "dfc-b": "http://static.datafoodconsortium.org/ontologies/dfc_FullModel.owl#",
    "dfc-p": "http://static.datafoodconsortium.org/ontologies/DFC_ProductOntology.owl#",
    "dfc-u": "http://static.datafoodconsortium.org/data/units.rdf#",
    "dfc-pt": "http://static.datafoodconsortium.org/data/types.rdf#",
    "dfc-p:hasUnit":{
      "@type":"@id"
    },
    "dfc-p:hasType":{
      "@type":"@id"
    },
    "dfc-b:references":{
      "@type":"@id"
    },
    "dfc-b:offeredThroug":{
      "@type":"@id"
    },
    "dfc-b:offeredTo":{
      "@type":"@id"
    },
    "@base": "http://maPlateformeNationale"
  },
  "@id": "/person/personId",
  "@type": "dfc-b:Person",
  "dfc-b:familyName": "Doe",
  "dfc-b:firtsName": "Jhon",
  "dfc-b:hasAdress": {
    "@type": "dfc-b:Address",
    "dfc-b:city": "",
    "dfc-b:country": "",
    "dfc-b:postcode": "",
    "dfc-b:street": ""
  },
  "dfc-b:affiliates": [
    {
      "@id": "/entreprise/entrepriseId",
      "@type": "dfc-b:Entreprise",
      "dfc-b:VATnumber": "",
      "dfc-b:defines": [
        {
          "@id": "/customerCategory/customerCategoryId1",
          "@type": "dfc-b:CustomerCategory",
          "dfc-b:description": "member"
        },
        {
          "@id": "/customerCategory/customerCategoryId2",
          "@type": "dfc-b:CustomerCategory",
          "dfc-b:description": "non member"
        }
      ],
      "dfc-b:supplies": [
        {
          "@id": "/suppliedProduct/item3",
          "@type": "dfc-b:SuppliedProduct",
          "dfc-p:hasUnit": "dfc-u:u",
          "dfc-b:quantity": "99.99",
          "dfc-p:hasType": "dfc-pt:egg",
          "dfc-b:description": "supply description 1",
          "dfc-b:totalTheoriticalStock": "999",
          "dfc-b:brand": "supply brand",
          "dfc-b:claim": "supply claim",
          "dfc-b:image": "supply image url",
          "dfc-b:lifeTime": "supply lifeTime",
          "dfc-b:physicalCharacterisctics": "supply physical characterisctics"
        },
        {
          "@id": "/suppliedProduct/item4",
          "@type": "dfc-b:SuppliedProduct",
          "dfc-p:hasUnit": "dfc-u:u",
          "dfc-b:quantity": "1",
          "dfc-p:hasType": "dfc-pt:strawberry",
          "dfc-b:description": "supply description 2",
          "dfc-b:totalTheoriticalStock": "999",
          "dfc-b:brand": "supply brand",
          "dfc-b:claim": "supply claim",
          "dfc-b:image": "supply image url",
          "dfc-b:lifeTime": "supply lifeTime",
          "dfc-b:physicalCharacterisctics": "supply physical characterisctics"
        }
      ],
      "dfc-b:manages": [
        {
          "@id": "/catalogItem/catalogItemId1",
          "@type": "dfc-b:CatalogItem",
          "dfc-b:references": "/suppliedProduct/item3",
          "dfc-b:sku": "catalog item gtin or sku",
          "dfc-b:stockLimitation": "999",
          "dfc-b:offeredThrough": [
            {
              "@id": "/offer/offerId1",
              "@type": "dfc-b:Offer",
              "dfc-b:offeresTo": "/customerCategory/customerCategoryId1",
              "dfc-b:price": "0",
              "dfc-b:stockLimitation": "999"
            },
            {
              "@id": "/offer/offerId2",
              "@type": "dfc-b:Offer",
              "dfc-b:offeresTo": "/customerCategory/customerCategoryId2",
              "dfc-b:price": "999",
              "dfc-b:stockLimitation": "999"
            }
          ]
        },
        {
          "@id": "/catalogItem/catalogItemId2",
          "@type": "dfc-b:CatalogItem",
          "dfc-b:sku": "catalog item gtin or sku",
          "dfc-b:stockLimitation": "999",
          "dfc-b:references": "/suppliedProduct/item4",
          "dfc-b:offeredThrough": [
            {
              "@id": "/offer/offerId3",
              "@type": "dfc-b:Offer",
              "dfc-b:offeresTo": "/customerCategory/customerCategoryId1",
              "dfc-b:price": "000",
              "dfc-b:stockLimitation": "999"
            },
            {
              "@id": "/offer/offerId4",
              "@type": "dfc-b:Offer",
              "dfc-b:offeresTo": "/customerCategory/customerCategoryId2",
              "dfc-b:price": "999",
              "dfc-b:stockLimitation": "999"
            }
          ]
        }
      ]
    }
  ]
}

Patch Catalog item

HTTP PATCH at uri provided by previous example :

PATCH http://maPlateformeNationale/catalogItem/catalogItemId1
{
  "@context": {
    "dfc-b": "http://static.datafoodconsortium.org/ontologies/dfc_FullModel.owl#",
    "dfc-u": "http://static.datafoodconsortium.org/data/units.rdf#",
    "dfc-p": "http://static.datafoodconsortium.org/ontologies/DFC_ProductOntology.owl#",
    "dfc-b:references":{
      "@type":"@id"
    },
    "dfc-b:b:offeredThrough":{
      "@type":"@id"
    },
    "@base": "http://maPlateformeNationale"
  },
  "@type": "dfc-b:CatalogItem",
  "dfc-b:references": "/suppliedProduct/item3",
  "dfc-b:sku": "an other catalog item gtin or sku",
  "dfc-b:stockLimitation": "10",
  "dfc-b:offeredThrough": ["/customerCategory/customerCategoryId1";"/customerCategory/customerCategoryId2"]  
}

LDP is atomic. Platform have to request and accept atomic request . One request has one subject scope. For example if offer have to be updated , a other request have to be executed. Same mechanism for all subject as SuppliedProduct.

PATCH http://maPlateformeNationale/offer/offerId1
{
  "@context": {
    "dfc-b": "http://static.datafoodconsortium.org/ontologies/dfc_FullModel.owl#",
    "dfc-p": "http://static.datafoodconsortium.org/ontologies/DFC_ProductOntology.owl#",
    "dfc-u": "http://static.datafoodconsortium.org/data/units.rdf#",
    "dfc-p:hasUnit":{
      "@type":"@id"
    },
    "dfc-b:references":{
      "@type":"@id"
    },
    "dfc-b:offeresTo":{
      "@type":"@id"
    },
    "@base": "http://maPlateformeNationale"
  },
  "@type": "dfc-b:Offer",
  "dfc-b:offeresTo": "/customerCategory/customerCategoryId1",
  "dfc-b:price": "20",
  "dfc-b:stockLimitation": "5"
}
Previousversion 1.5.1Nextversion 1.3

Last updated 10 months ago

Was this helpful?