These open API specifications document the Traceability Module of CIRC4Life.

A standard (Swagger) UI for testing the endpoints is available for all capturing and accessing endpoints. The machine readable version of this specification can be found in JSON format at json.

Overview

This is the open API specification for the Endpoints of Webservices developed and provided by the EECC within CIRC4Life. This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 776503-CIRC4Life-H2020-IND-CE-2016-2017/CIRC-2017/TwoStage.

License information

License : This document is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
License URL : http://creativecommons.org/licenses/by-sa/4.0/
Terms of service : THIS DOCUMENT IS PROVIDED “AS IS” WITH NO WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY, NONINFRINGMENT, FITNESS FOR PARTICULAR PURPOSE, OR ANY WARRANTY OTHER WISE ARISING OUT OF THIS SPECIFICATION. EECC disclaims all liability for any damages arising from use or misuse of this Standard, whether special, indirect, consequential, or compensatory damages, and including liability for infringement of any intellectual property rights, relating to use of information in or reliance upon this document.

EECC retains the right to make changes to this document at any time, without notice. EECC makes no warranty for the use of this document and assumes no responsibility for any errors which may appear in the document, nor does it make a commitment to update the information contained herein.

URI scheme

Host : circ4life.eecc.info
BasePath : /

Paths

Bin Disposal Event Receiving Endpoint

POST /api/capture/bin-disposal-event

Description

Data from the intelligent bins control unit is send to this endpoint whenever an item is put into the bin.

Parameters

Type Name Description Schema

Body

binDisposalData
required

binDisposalData

Responses

HTTP Code Description Schema

200

Disposal event was successfully created and stored.

400

The request is invalid. Likely there is a problem with the data/format. See message for details.

500

Internal error: processing or storing the data failed. See message for details.

Consumes

  • application/json

Produces

  • application/json;charset=UTF-8

Tags

  • recycling-capture-controller

Bin Barcode Item Status Endpoint

GET /status/binbarcode/{binbarcode}

Description

The latest known location and disposition of an item can be queried here via its bin barcode.

Parameters

Type Name Description Schema

Path

binbarcode
required

binbarcode

string

Responses

HTTP Code Description Schema

200

Success

400

Bad request. (No ID or mal formatted ID given.)

404

Item not found.

Produces

  • application/json;charset=UTF-8

Tags

  • status-controller

Generic Impacts Capturing Endpoint (POST EPC)

POST /api/capture/impact

Description

This endpoint is the same as giving the EPC in the path, but might be more convenient due to the limitations of characters allowed in path.

Parameters

Type Name Description Schema

Body

impactAndMetaData
required

impactAndMetaData

Responses

HTTP Code Description Schema

200

Impacts recorded successfully.

400

The request is invalid. Likely there is a problem with the data/format. See message for details.

500

Internal error: processing or storing the data failed. See message for details.

Consumes

  • application/json;charset=UTF-8

Produces

  • application/json;charset=UTF-8

Tags

  • impact-only-capture-controller

Generic Impacts Capturing Endpoint (POST EPC)

POST /api/capture/impact

Description

This endpoint is the same as giving the EPC in the path, but might be more convenient due to the limitations of characters allowed in path.

Parameters

Type Name Description Schema

Body

epcAndImpactData
required

epcAndImpactData

Responses

HTTP Code Description Schema

200

Impacts recorded successfully.

400

The request is invalid. Likely there is a problem with the data/format. See message for details.

500

Internal error: processing or storing the data failed. See message for details.

Consumes

  • application/json;charset=UTF-8

Produces

  • application/json;charset=UTF-8

Tags

  • impact-only-capture-controller

Generic Impacts Capturing Endpoint (path EPC)

POST /api/capture/impact/{epc}/{location}

Description

This endpoint can be used to record impacts associated with a particular EPC without tracking the actual event where the impact occurred. Tracking impacts together with the corresponding event is preferable.

Parameters

Type Name Description Schema

Path

epc
required

epc

string

Path

location
required

location

string

Body

impactData
required

impactData

Responses

HTTP Code Description Schema

200

Impacts recorded successfully.

400

The request is invalid. Likely there is a problem with the data/format. See message for details.

500

Internal error: processing or storing the data failed. See message for details.

Consumes

  • application/json

Produces

  • application/json;charset=UTF-8

Tags

  • impact-only-capture-controller

Object Event Capturing Endpoint

POST /api/capture/objectEvent

Description

This endpoint is capable of capturing any CIRC4Life Object event, but all parameters have to be specified explicitly.

Parameters

Type Name Description Schema

Body

c4lObjectEventData
required

c4lObjectEventData

Responses

HTTP Code Description Schema

200

Event successfully captures.

No Content

400

Bad request, likely due to mal formatted input data. See message for details..

500

Internal error in transforming/loading the event. See message for details.

Consumes

  • application/json

Produces

  • application/json;charset=UTF-8

Tags

  • event-capture-controller

getDynamicLabelData

POST /api/dynamicLabel

Parameters

Type Name Description Schema

Query

epc
required

epc

string

Responses

HTTP Code Description Schema

200

OK

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • dynamic-label-controller

User Item Status List Endpoint

GET /status/user/{userid}

Description

Returns a list of all known item status data for the given user id.

Parameters

Type Name Description Schema

Path

userid
required

userid

string

Responses

HTTP Code Description Schema

200

Success

400

Bad request. (No ID or mal formatted ID given.)

404

Item not found.

Produces

  • application/json;charset=UTF-8

Tags

  • status-controller

EPC Item Status Endpoint

GET /status/epc/{epc}

Description

The latest known location and disposition of an item identified via its EPC.

Parameters

Type Name Description Schema

Path

epc
required

epc

string

Responses

HTTP Code Description Schema

200

Success

400

Bad request. (No ID or mal formatted ID given.)

404

Item not found.

Produces

  • application/json;charset=UTF-8

Tags

  • status-controller

getKosData

GET /api/kos

Parameters

Type Name Description Schema

Query

epc
required

epc

string

Responses

HTTP Code Description Schema

200

OK

No Content

Produces

  • */*

Tags

  • kos-controller

Get Masterdata for user

GET /api/masterdata

Description

This endpoint gives access to a minimal master data repository with exemplary data needed for the capturing UIs.

Parameters

Type Name Description Schema

Query

user
required

user

string

Responses

HTTP Code Description Schema

200

OK

No Content

Produces

  • application/json;charset=UTF-8

Tags

  • masterdata-controller

Bin Barcode Total Impact Endpoint

GET /impacts/binbarcode/{binbarcode}

Description

Returns the aggregated impacts for the given item identified by its bin barcode.

Parameters

Type Name Description Schema

Path

binbarcode
required

binbarcode

string

Responses

HTTP Code Description Schema

200

All known impacts associated with the given item are returned.

400

Bad request. (Most likely problem: No ID or mal formatted ID given.)

404

No impacts are known for this item.

500

Internal Server Error. Check the error message for details.

Produces

  • application/json;charset=UTF-8

Tags

  • impact-aggregation-controller

Item Total Impact Endpoint (POST EPC)

POST /impacts/epc

Description

Returns the aggregated impacts for the given item identified by its EPC. Posting a String is less restricted then path encoding it.

Parameters

Type Name Description Schema

Body

epcString
required

epcString

EPC

Responses

HTTP Code Description Schema

200

All known impacts associated with the given item are returned.

400

Bad request. (Most likely problem: No ID or mal formatted ID given.)

404

No impacts are known for this item.

500

Internal Server Error. Check the error message for details.

Consumes

  • application/json;charset=UTF-8

Produces

  • application/json;charset=UTF-8

Tags

  • impact-aggregation-controller

EPC Item Total Impact Endpoint

GET /impacts/epc/{epc}

Description

Returns the aggregated impacts for the given item identified by its EPC.

Parameters

Type Name Description Schema

Path

epc
required

epc

string

Responses

HTTP Code Description Schema

200

All known impacts associated with the given item are returned.

400

Bad request. (Most likely problem: No ID or mal formatted ID given.)

404

No impacts are known for this item.

500

Internal Server Error. Check the error message for details.

Produces

  • application/json;charset=UTF-8

Tags

  • impact-aggregation-controller

SGTIN Total Impact Endpoint

GET /impacts/sgtin/{gtin}/{serial}

Description

Returns the aggregated impacts for the given item identified by its SGTIN.

Parameters

Type Name Description Schema

Path

gtin
required

gtin

string

Path

serial
required

serial

string

Responses

HTTP Code Description Schema

200

All known impacts associated with the given item are returned.

400

Bad request. (Most likely problem: No ID or mal formatted ID given.)

404

No impacts are known for this item.

500

Internal Server Error. Check the error message for details.

Produces

  • application/json;charset=UTF-8

Tags

  • impact-aggregation-controller

Internal Inspection Event Endpoint

POST /api/capture/inspection-event

Description

Used to receive data from the recycling inspection web user interface.

Parameters

Type Name Description Schema

Body

inspectionEventUiData
required

inspectionEventUiData

Responses

HTTP Code Description Schema

200

Inspection event was successfully created

400

The request is invalid. Likely there is a problem with the data/format. See message for details.

500

Internal error: processing or storing the data failed. See message for details.

Consumes

  • application/json

Produces

  • application/json;charset=UTF-8

Tags

  • recycling-capture-controller

Captures bio waste assessment

POST /api/capture/biowaste

Parameters

Type Name Description Schema

Body

biowasteEventUiData
required

biowasteEventUiData

Responses

HTTP Code Description Schema

200

OK

400

The request is invalid. Likely there is a problem with the data/format. See message for details.

500

Internal error: processing or storing the data failed. See message for details.

Consumes

  • application/json;charset=UTF-8

Produces

  • application/json;charset=UTF-8

Tags

  • biowaste-capture-controller

Farming json capture endpoint

POST /api/capture/farming

Description

Creates a farming event within the received data.

Parameters

Type Name Description Schema

Body

farmingEventUiData
required

farmingEventUiData

Responses

HTTP Code Description Schema

200

OK

No Content

400

The request is invalid. Likely there is a problem with the data/format. See message for details.

500

Internal error: processing or storing the data failed. See message for details.

Consumes

  • application/json;charset=UTF-8

Produces

  • application/json;charset=UTF-8

Tags

  • farming-capture-controller

SGTIN Item Status Endpoint

GET /status/sgtin/{gtin}/{serial}

Description

The latest known location and disposition of an item can be queried here via its SGTIN.

Parameters

Type Name Description Schema

Path

gtin
required

The GTIN is expected to include the trailling check digit but may or may not include the leading indicator digit '0'.

string

Path

serial
required

The (url encoded) serial component.

string

Responses

HTTP Code Description Schema

200

Success

400

Bad request. (No ID or mal formatted ID given.)

404

Item not found.

Produces

  • application/json;charset=UTF-8

Tags

  • status-controller

Definitions

ApiResponse

Generic response including a message for debugging errors.

Name Description Schema

message
optional

Specific error message. Required if the status is not 2xx.
Example : "Write-only-memory subsystem too slow for this machine."

string

path
required

The requested path.
Example : "/"

string

reason
optional

Standard human readable reason for the HTTP status code.
Example : "Ok"

string

status
optional

Same code as returned in the HTTP header. Repeated here for logging/debugging purposes.
Example : 200

integer (int32)

timestamp
optional

Timestamp of response generation.

string (date-time)

BatchOrLotNumber

Name Schema

applicationIdentifier
optional

string

numeric
optional

boolean

value
optional

string

BinDisposalData

This format is used to send data about disposal of an item from the intelligent bin to the Traceability Module.

Name Description Schema

binBarcode
required

The same number as encoded into the printed bar code label. Contains the RecycleBinUserID as the first 11 digits.
Example : "16004000001181122000011"

string

eventTime
optional

Time when the event happens
Example : "2019-05-16T13:40:00+02:00"

string (date-time)

fillingLevel
optional

Filling level of the bin at the time of disposal in %
Example : 42.23

number (double)

BiowasteEventUiData

Name Description Schema

binBarcode
required

Barcode from bag label. Must be at least 22 digits long
Example : "16004000001181122000011"

string

compostable
required

Usable for compost?
Example : true

boolean

weightInKgm
optional

Weight in kg
Example : 5.0

number

BusinessTransaction

According to the EPCIS standard.

Name Description Schema

bizTransaction
required

Standard BusinessTransactionID
Example : "http://transaction.acme.com/shipment/34ABC8"

string

type
optional

Standard BusinessTransactionTypeID

string

C4lObjectEPCEventData

This is a JSON representation of an EPCIS object event as used in CIRC4Life. The Eco Impact Extension is explicitly included.

Name Description Schema

action
required

See EPCIS standard for details.
Example : "ADD"

enum (ADD, OBSERVE, DELETE)

bizLocation
optional

Standard epcis:BusinessLocationType

string

bizStep
optional

Standard epcis:BusinessStepIDType

string

bizTransactionList
optional

Standard epcis:BusinessTransactionListType

destinationList
optional

Standard epcis:DestinationListType

< SourceDestType > array

disposition
optional

Standard epcis:DispositionIDType

string

epcList
optional

Standard epcglobal:EPC list (epcs are to be represented in URI format)
Example : [ "urn:epc:id:sgtin:4047111.012345.012345678901" ]

< string > array

eventTime
required

When the event happened. (Contains offset)

string (date-time)

ilmd
optional

epcis:ILMDType

< object > array

impactData
optional

Data about the ecological or other impacts associated with the event

quantityList
optional

Standard epcis:QuantityListType

< QuantityElement > array

readPoint
optional

Standard epcis:ReadPointType

string

sourceList
optional

Standard epcis:SourceListType

< SourceDestType > array

Description

Name Schema

en
optional

string

es
optional

string

EPC

EPC URI.

Name Description Schema

epc
required

EPC URI
Example : "http://scillyorganics.com/epcis/obj/carrots.2019.3"

string

EpcAndImpactData

Name Schema

epc
optional

string

impactData
optional

FarmingEventUiData

Data Received from the UI in order to create a farming event

Name Description Schema

eventType
required

Type of the farming event
Example : "GROWING"

enum (GROWING, HARVESTING, PLANTING, RECYCLING, SOIL_PREPARATION)

impacts
optional

List of impacts
Example : "Fuel, Water"

lgtin
optional

Input LGTIN for transformation events

location
required

location of the farming event
Example : "http://www.scillyorganics.com/epcis/loc/east_field"

string

products
optional

EPC of processed products

< string > array

timestamp
required

Timestamp of the farming
Example : "2019-05-16T13:40:00+02:00"

string (date-time)

FarmingEventUiImpact

Name Schema

amount
optional

number

description
optional

string

type
optional

string

uom
optional

string

Impact

A concrete ecological (or other) impact. This is the JSON representation of <c4l:impactElementType>.

Name Description Schema

impactType
required

This is a URI as specified in <c4l:impactType>.
Example : "http://dbpedia.org/resource/Premises"

string

measure
optional

Quantifying the amount

ImpactAndMetaData

Name Schema

epc
optional

string

impactData
optional

locationId
optional

string

ImpactData

Data about product specific ecological impacts. Contains any elements from the c4l epcis extension.

Name Description Schema

impactList
optional

JSON representation of <c4l:impactList>. It can be used to track social or ecological impacts that are not associated with material flows such as e.g. land usage.

< Impact > array

resourceList
optional

This list represents the inflow of material into the process. It is the JSON representation of <c4l:resourceList>.

transportationList
optional

This is the JSON representation of <c4l:transportList>.If the environmental impact of transportation can not be broken down into resource consumption (fuel,…) and type (exhaust fumes,…) then a transportList can be used instead.

< Transportation > array

wasteList
optional

This represents the outflow (typically not including the actual products) of a process. JSON representation of <c4l:wasteList>.

InspectionEventUiData

Data Received from the UI in order to create an inspection event

Name Description Schema

age
optional

Estimated lifetime in ISO duration format. Need to be set if state is REUSABLE, BROKEN or WORKING
Example : "P10Y"

string

binBarcode
required

Barcode from the bin label. Must be at least 22 digits long
Example : "16004000001181122000011"

string

brand
optional

Brand of the item. Need only to be filled out if GTIN is missing and product is a EEE item
Example : "Apple"

string

gtin
optional

GTIN of the item. Required if product is a EEE item. If GTIN is not available, please provide manufacturer & model
Example : "4047111000006"

string

model
optional

Model of the item. Need only to be filled out if GTIN is missing and product is a EEE item
Example : "iPhone 7"

string

serialNumber
optional

Serialnumber of the item. Required if product is a EEE item
Example : "X01X23Y4XYXY"

string

state
required

Condition of the electronic device
Example : "WORKING"

enum (WORKING, REUSABLE, BROKEN, NO_EEE_ITEM)

timestamp
required

Timestamp of the inspection
Example : "2019-05-16T13:40:00+02:00"

string (date-time)

unuKey
optional

UNUkey of the electronic device. Need to be set if state is REUSABLE, BROKEN or WORKING
Example : "303"

enum (-1, 0, 303, 306, 401, 402, 406, 701, 702, 501, 504, 506)

Lgtin

Name Schema

gtin
optional

string

lot
optional

value
optional

string

MasterdataForUser

Name Schema

locations
optional

< NamedId > array

objects
optional

< NamedId > array

ownerId
optional

string

ownerName
optional

string

Measure

Data about product specific ecological impacts

Name Description Schema

quantity
required

Amount, measured in UOM.
Example : 1294.5

number

uom
optional

Unit of Measure. JSON representation of <c4l:measure>. May be omitted if there is a natural uom.
Example : "MTK"

string

NamedId

Name Schema

description
optional

epc
optional

string

QuantityElement

JSON form of the EPCIS standard epcis:QuantityElementType

Name Description Schema

epcClass
required

URI of the epc class, see standard.

string

measure
optional

Contains uom and quantity as in the epcis standard, although not named measure there.

ResourceOrWaste

Information about a specific type of waste produced or a resource consumed. Implements c4l:wasteElementType and c4l:wasteElementType.

Name Description Schema

amount
required

c4l:measure amount of waste produced/resource consumed

sourceOrSink
optional

c4l:sinkType or c4l:sourceType: Semantic web URI for how the waste was deposed/from where the resource is taken.
Example : "http://semanco02.hs-albsig.de/repository/ontology-releases/eu/semanco/ontology/SEMANCO/SEMANCO.owl#Not-Renewable_Energy_Source"

string

type
required

c4l:wasteType or c4l:resourceType: URI for the type of produced waste/consumed resource. Preferably using a semantic web URI.
Example : "http://w3id.org/saref#Electricity"

string

ResourceOrWasteList

This type represents a material flow and can be used to implement c4l:resourceList and c4l:wasteList. Notice that, as opposed to the XML Version, this JSON/Java version has 3 Lists of elements of one type instead of one list containing 3 different types.

Name Description Schema

epcList
optional

Standard epcglobal:EPC list (epcs are to be represented in URI format)
Example : [ "urn:epc:id:sgtin:4047111.012345.012345678901" ]

< string > array

quantityList
optional

Standard epcis:QuantityElementType list.

< QuantityElement > array

resourceOrWasteList
optional

CIRC4Life specific type element format

< ResourceOrWaste > array

SourceDestType

According to the EPCIS standard.

Name Description Schema

sourceDest
required

Standard SourceDestID. An identifier that denotes a specific source or destination.

string

type
optional

Standard SourceDestTypeID. An identifier that indicates what kind of source or destination this Source or Destination (respectively) denotes.

string

Status

The latest known status of an item

Name Description Schema

disposition
required

Last known disposition (status) of the item. The EPCIS standard core business vocabulary (cbv) is used.The meaning of typical values for Circ4Life is: 'urn:epcglobal:cbv:disp:returned': Item is returned into a smart recycling bin and awaiting collection 'urn:epcglobal:cbv:disp:sellable_not_accessible': Item is in working condition and will be reused 'urn:epcglobal:cbv:disp:damaged': Item is damaged and needs to be repaired before it can be reused 'urn:epcglobal:cbv:disp:disposed': Item is broken and will be recycled 'urn:epcglobal:cbv:disp:unknown': An item which was put into a smart bin was found to be not of a recyclable type
Example : "urn:epcglobal:cbv:disp:returned"

string

epc
required

The items identifier in EPC (URN) Format
Example : "http://circ4life.eecc.info/recycling/bin/obj/1600400000118112200001100001"

string

location
required

Last known location of the item
Example : "urn:epc:epc:sgln:4057847.0000018.0"

string

Transportation

JSON Format for c4l:transportElementType.

Name Description Schema

distance
optional

Distance travelled.

vehicle
required

c4l:vehicleType URI naming the vehicle type used for transportation
Example : "http://purl.org/vso/ns#Truck"

string