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 |
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 |
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 |
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 |
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 |
epc |
string |
Path |
location |
location |
string |
Body |
impactData |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
epcString |
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 |
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 |
gtin |
string |
Path |
serial |
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 |
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 |
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 |
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 |
The GTIN is expected to include the trailling check digit but may or may not include the leading indicator digit '0'. |
string |
Path |
serial |
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 |
Specific error message. Required if the status is not 2xx. |
string |
path |
The requested path. |
string |
reason |
Standard human readable reason for the HTTP status code. |
string |
status |
Same code as returned in the HTTP header. Repeated here for logging/debugging purposes. |
integer (int32) |
timestamp |
Timestamp of response generation. |
string (date-time) |
BatchOrLotNumber
Name | Schema |
---|---|
applicationIdentifier |
string |
numeric |
boolean |
value |
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 |
The same number as encoded into the printed bar code label. Contains the RecycleBinUserID as the first 11 digits. |
string |
eventTime |
Time when the event happens |
string (date-time) |
fillingLevel |
Filling level of the bin at the time of disposal in % |
number (double) |
BiowasteEventUiData
Name | Description | Schema |
---|---|---|
binBarcode |
Barcode from bag label. Must be at least 22 digits long |
string |
compostable |
Usable for compost? |
boolean |
weightInKgm |
Weight in kg |
number |
BusinessTransaction
According to the EPCIS standard.
Name | Description | Schema |
---|---|---|
bizTransaction |
Standard BusinessTransactionID |
string |
type |
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 |
See EPCIS standard for details. |
enum (ADD, OBSERVE, DELETE) |
bizLocation |
Standard epcis:BusinessLocationType |
string |
bizStep |
Standard epcis:BusinessStepIDType |
string |
bizTransactionList |
Standard epcis:BusinessTransactionListType |
< BusinessTransaction > array |
destinationList |
Standard epcis:DestinationListType |
< SourceDestType > array |
disposition |
Standard epcis:DispositionIDType |
string |
epcList |
Standard epcglobal:EPC list (epcs are to be represented in URI format) |
< string > array |
eventTime |
When the event happened. (Contains offset) |
string (date-time) |
ilmd |
epcis:ILMDType |
< object > array |
impactData |
Data about the ecological or other impacts associated with the event |
|
quantityList |
Standard epcis:QuantityListType |
< QuantityElement > array |
readPoint |
Standard epcis:ReadPointType |
string |
sourceList |
Standard epcis:SourceListType |
< SourceDestType > array |
Description
Name | Schema |
---|---|
en |
string |
es |
string |
EPC
EPC URI.
Name | Description | Schema |
---|---|---|
epc |
EPC URI |
string |
EpcAndImpactData
Name | Schema |
---|---|
epc |
string |
impactData |
FarmingEventUiData
Data Received from the UI in order to create a farming event
Name | Description | Schema |
---|---|---|
eventType |
Type of the farming event |
enum (GROWING, HARVESTING, PLANTING, RECYCLING, SOIL_PREPARATION) |
impacts |
List of impacts |
< FarmingEventUiImpact > array |
lgtin |
Input LGTIN for transformation events |
|
location |
location of the farming event |
string |
products |
EPC of processed products |
< string > array |
timestamp |
Timestamp of the farming |
string (date-time) |
FarmingEventUiImpact
Name | Schema |
---|---|
amount |
number |
description |
string |
type |
string |
uom |
string |
Impact
A concrete ecological (or other) impact. This is the JSON representation of <c4l:impactElementType>.
Name | Description | Schema |
---|---|---|
impactType |
This is a URI as specified in <c4l:impactType>. |
string |
measure |
Quantifying the amount |
ImpactAndMetaData
Name | Schema |
---|---|
epc |
string |
impactData |
|
locationId |
string |
ImpactData
Data about product specific ecological impacts. Contains any elements from the c4l epcis extension.
Name | Description | Schema |
---|---|---|
impactList |
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 |
This list represents the inflow of material into the process. It is the JSON representation of <c4l:resourceList>. |
|
transportationList |
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 |
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 |
Estimated lifetime in ISO duration format. Need to be set if state is REUSABLE, BROKEN or WORKING |
string |
binBarcode |
Barcode from the bin label. Must be at least 22 digits long |
string |
brand |
Brand of the item. Need only to be filled out if GTIN is missing and product is a EEE item |
string |
gtin |
GTIN of the item. Required if product is a EEE item. If GTIN is not available, please provide manufacturer & model |
string |
model |
Model of the item. Need only to be filled out if GTIN is missing and product is a EEE item |
string |
serialNumber |
Serialnumber of the item. Required if product is a EEE item |
string |
state |
Condition of the electronic device |
enum (WORKING, REUSABLE, BROKEN, NO_EEE_ITEM) |
timestamp |
Timestamp of the inspection |
string (date-time) |
unuKey |
UNUkey of the electronic device. Need to be set if state is REUSABLE, BROKEN or WORKING |
enum (-1, 0, 303, 306, 401, 402, 406, 701, 702, 501, 504, 506) |
Lgtin
Name | Schema |
---|---|
gtin |
string |
lot |
|
value |
string |
MasterdataForUser
Name | Schema |
---|---|
locations |
< NamedId > array |
objects |
< NamedId > array |
ownerId |
string |
ownerName |
string |
Measure
Data about product specific ecological impacts
Name | Description | Schema |
---|---|---|
quantity |
Amount, measured in UOM. |
number |
uom |
Unit of Measure. JSON representation of <c4l:measure>. May be omitted if there is a natural uom. |
string |
NamedId
Name | Schema |
---|---|
description |
|
epc |
string |
QuantityElement
JSON form of the EPCIS standard epcis:QuantityElementType
Name | Description | Schema |
---|---|---|
epcClass |
URI of the epc class, see standard. |
string |
measure |
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 |
c4l:measure amount of waste produced/resource consumed |
|
sourceOrSink |
c4l:sinkType or c4l:sourceType: Semantic web URI for how the waste was deposed/from where the resource is taken. |
string |
type |
c4l:wasteType or c4l:resourceType: URI for the type of produced waste/consumed resource. Preferably using a semantic web URI. |
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 |
Standard epcglobal:EPC list (epcs are to be represented in URI format) |
< string > array |
quantityList |
Standard epcis:QuantityElementType list. |
< QuantityElement > array |
resourceOrWasteList |
CIRC4Life specific type element format |
< ResourceOrWaste > array |
SourceDestType
According to the EPCIS standard.
Name | Description | Schema |
---|---|---|
sourceDest |
Standard SourceDestID. An identifier that denotes a specific source or destination. |
string |
type |
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 |
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 |
string |
epc |
The items identifier in EPC (URN) Format |
string |
location |
Last known location of the item |
string |
Transportation
JSON Format for c4l:transportElementType.
Name | Description | Schema |
---|---|---|
distance |
Distance travelled. |
|
vehicle |
c4l:vehicleType URI naming the vehicle type used for transportation |
string |