Open Food Trust API (0.1.0)

Download OpenAPI specification:Download

Open Food TrustThe Open Food Trust API provides insights into the food and ag supply chain with an emphasis towards supporting initiatives around sustainability, reduction of food waste, and to enable track and trace of agricultural products in a reliable and secure manner.

info

Retrieves Version and Other Informatoin

Gets version and other information related to the current deployment of Open Food Trust

Responses

Response samples

Content type
application/json
[
  • "string"
]

Weather

Weather specific data

Gets a list of fields available for querying

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Gets daily or hourly weather over the specified time range and returns it in the response body.

Gets weather data at desired location and over time range

path Parameters
operation
required
string
Enum: "daily" "hourly"

request parameters to specify time range and location

Request Body schema: application/json

Parameters for issuing the credential.

string or Array of strings
From
number
To
number
Latitude
number
Longitude
number

Responses

Request samples

Content type
application/json
{
  • "Field": "all",
  • "From": 1590517644,
  • "To": 1622053644,
  • "Latitude": 35.883543,
  • "Longitude": -79.016313
}

Response samples

Content type
application/json
[
  • {
    }
]

Gets a sum of a particular field over the specified time range and returns it in the response body.

Gets the aggregate value(s) of a specified field at desired location and over time range

path Parameters
operation
required
string
Enum: "sum" "avg" "min" "max" "summary" "daily" "hourly"

type of aggregation to perform

Request Body schema: application/json

Parameters for issuing the credential.

string or Array of strings
From
number
To
number
Latitude
number
Longitude
number

Responses

Request samples

Content type
application/json
{
  • "Field": "all",
  • "From": 1590517644,
  • "To": 1622053644,
  • "Latitude": 35.883543,
  • "Longitude": -79.016313
}

Response samples

Content type
application/json
{
  • "Field": "string",
  • "Latitude": 0,
  • "Longitude": 0,
  • "Data": {
    }
}

Climate

Mode broad climate data

Risks

Modeling results for risks and other advanced areas of concern

Documents

Creates a new document

Creates a new document with the specified properties and content (via file upload) and permissions information.

Request body

The request body must include valid MIME multipart/form-data. While the properties piece is required, the content and permissions pieces are optional. By default permissions is set to private so that only the document owners can access it.

Properties

Request Body schema: multipart/form-data
properties
string
content
string <binary>
permissions
string

Responses

Response samples

Content type
application/json
{
  • "id": "doc123"
}

Retrieves a list of documents

Retrieves data about the supplied array of documents such as their properties and attachments. Use GET /documents/{docId}/content to retrieve the contents of the documents.

query Parameters
docIds
required
Array of strings

Array of document IDs

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieves a document

Retrieves data about a specific document such as its properties and attachments. Use GET /documents/{docId}/content to retrieve the content of the document.

path Parameters
docId
required
string

Document ID

query Parameters
version
integer <int32>

Document version

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "orgId": "string",
  • "version": 1,
  • "timestamp": "2019-09-12T03:04:23+00:00",
  • "permissions": {
    },
  • "categories": [
    ],
  • "properties": {
    },
  • "content": {
    },
  • "attachments": {
    }
}

Updates a document

Updates a document's properties and, optionally, permissions and content. A successful update of a document will result in an increase in the version number

The request body's MIME type should be application/json

path Parameters
docId
required
string

Document ID

Request Body schema: multipart/form-data
properties
string
content
string <binary>
permissions
string

Responses

Response samples

Content type
application/json
{
  • "id": "doc123"
}

Deletes a document

Deletes the document from the system.

path Parameters
docId
required
string

Document ID

Responses

Response samples

Content type
application/json
{
  • "code": "genericError",
  • "message": "An unexpected error has occurred"
}

Retrieves the content of a document

If the document has content, it will be retrieved.

path Parameters
docId
required
string

Document ID

query Parameters
version
integer <int32>

Document version

Responses

Response samples

Content type
application/json
{
  • "code": "genericError",
  • "message": "An unexpected error has occurred"
}

Updates the content of a document

Uploads a file to the document. A successful upload will result in the document version being increased.

path Parameters
docId
required
string

Document ID

Request Body schema: multipart/form-data
content
string <binary>

Responses

Response samples

Content type
application/json
{
  • "id": "doc123"
}

Retrieves the permissions information of a document

Retrieves the permissions information of a document

path Parameters
docId
required
string

Document ID

Responses

Response samples

Content type
application/json
{
  • "permissionsMode": "linked",
  • "permittedOrgIds": [
    ]
}

Updates a document's permissions

Updating the permissions will not change the version number of the document. Both permissionsMode and permittedOrgIds should be present to properly update the document

path Parameters
docId
required
string

Document ID

Request Body schema: application/json

Permissions information

permissionsMode
string (PermissionsMode)
Enum: "linked" "private"

Permissions mode

permittedOrgIds
Array of strings

Organization IDs permitted to access the document

Responses

Request samples

Content type
application/json
{
  • "permissionsMode": "linked",
  • "permittedOrgIds": [
    ]
}

Response samples

Content type
application/json
{
  • "permissionsMode": "linked",
  • "permittedOrgIds": [
    ]
}

Search

Searches for documents

Searches across all documents using the provided parameters. The full properties and contents of the documents will not be used to reduce load. Other calls should be used to retrieve the full set of document information.

query Parameters
limit
number <double>
Default: 500

Limits the total number of document summaries returned. Valid range is 0 thru 1000.

offset
number <double>
Default: 0

Start position for the next set of paginated document summaries.

count
boolean
Default: false

Specifies whether to retrieve the total count of document summaries that match the search conditions.

Request Body schema: application/json

Must be valid JSON. Supported search conditions are TBD

orgId
string
orgIdNot
string
object (Timestamp)
categories
Array of strings
object (Properties)

Responses

Request samples

Content type
application/json
{
  • "orgId": "org12345",
  • "orgIdNot": "org12345",
  • "timestamp": {
    },
  • "categories": [
    ],
  • "properties": {
    }
}

Response samples

Content type
application/json
{
  • "count": 100,
  • "documentSummaries": [
    ]
}

Attachments

Creates a new document attachment

Adds and uploads a new attachment to the document. A successful upload will result in the version number being increased.

path Parameters
docId
required
string

Document ID

Request Body schema: multipart/form-data
type
string
content
string <binary>

Responses

Response samples

Content type
application/json
{
  • "id": "att123"
}

Attachment retrieval

Retrieves a specific attachment from a specific document.

path Parameters
docId
required
string

Document ID

attachmentId
required
string

attachment ID

Responses

Response samples

Content type
application/json
{
  • "code": "genericError",
  • "message": "An unexpected error has occurred"
}

Updates a document's attachment

Updates a documents attachment. A successful upload will increase the document's version number

path Parameters
docId
required
string

Document ID

attachmentId
required
string

attachment ID

Request Body schema: multipart/form-data
content
string <binary>

Responses

Response samples

Content type
application/json
{
  • "id": "att123"
}

Attachment deletion

Deletes a documents attechment. A successful deletion will result in the version number being increased.

path Parameters
docId
required
string

Document ID

attachmentId
required
string

attachment ID

Responses

Response samples

Content type
application/json
{
  • "code": "genericError",
  • "message": "An unexpected error has occurred"
}

Transactions

Document transaction status

Returns the status document trasnactions that may be in progress. These transactions are identified using correlation IDs that were returned when the transaction was begun.

query Parameters
correlationIds
required
Array of strings

Array of correlation IDs, obtained from previous create or update requests.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Categories

Retrieves document categories

If document categories are desired, a map is returned of the specified categories

Responses

Response samples

Content type
application/json
{
  • "Certificate": {
    },
  • "Other": {
    }
}

Templates

Products

APIs for products

Retrieves product information

Retrieves product information

query Parameters
entity_id[]
Array of strings <uuid>

Array of entity IDs.

description
string

A general search string used to return matching product data.

asset_id[]
Array of strings

An array of asset IDs, such as lots and serials.

product_id[]
Array of strings

An array of product IDs.

limit
number <double>
Default: 500

A numerical limit to the number of records initially returned. Paging can then be used via the startPage parameter for futher retrieval. Default limit 500.

startPage
string

Specifies the record number at which to start the page of results. The number of records returned will be based on the limit parameter.

Responses

Response samples

Content type
application/json
{}

Creates a new product

Creates a new product

Request Body schema: application/json

Request body with the parameters for product post.

entity_id
Array of strings <uuid>
description
string
asset_id
Array of strings
product_id
Array of strings

Responses

Request samples

Content type
application/json
{
  • "entity_id": [
    ],
  • "description": "string",
  • "asset_id": [
    ],
  • "product_id": [
    ]
}

Response samples

Content type
application/json
{}

Updates an existing product

Updates an existing product

path Parameters
product_id
required
any

Product ID

Request Body schema: application/json

Request body with updates to the product entry.

entity_id
Array of strings <uuid>
description
string
asset_id
Array of strings

Responses

Request samples

Content type
application/json
{
  • "entity_id": [
    ],
  • "description": "string",
  • "asset_id": [
    ]
}

Response samples

Content type
application/json
{}

Deletes a product

Deletes the product from the system.

path Parameters
product_id
required
any

Product ID

Responses

Locations

APIs for locations

get_locations

Retrieves information on the facility location

query Parameters
entity_id[]
Array of strings <uuid>

Array of entity IDs.

location_id[]
Array of strings

An array of location IDs.

limit
number <double>
Default: 500

A numerical limit to the number of records initially returned. Paging can then be used for further retrieval. Default limit 500.

startPage
string

Specifies the record number at which to start the page of results. The number of records returned will be based on the limit parameter.

Responses

Response samples

Content type
application/json
{
  • "locations": [
    ],
}

Creates a new location entry.

Creates a new location entry.

Request Body schema: application/json

Parameters of the location to post.

entity_id
string
location_type
string
street_address
string
location_name
string
city
string
country_code
string
po_box_number
string
postal_code
string
state
string
latitude
number <double>
longitude
number <double>

Responses

Request samples

Content type
application/json
{
  • "entity_id": "string",
  • "location_type": "FARM",
  • "location_name": "Bia Orchards",
  • "street_address": "123 Jakers Street",
  • "city": "Kimberton",
  • "country_code": "US",
  • "po_box_number": null,
  • "postal_code": "19460",
  • "state": "PA",
  • "latitude": 0,
  • "longitude": 0
}

Response samples

Content type
application/json
{
  • "locations": [
    ],
}

Updates an existing location

Updates an existing location

Request Body schema: application/json

Parameters of the location to update.

id
string
entity_id
string
location_type
string
street_address
string
location_name
string
city
string
country_code
string
po_box_number
string
postal_code
string
state
string
latitude
number <double>
longitude
number <double>

Responses

Request samples

Content type
application/json
{
  • "id": "9876543example",
  • "entity_id": "string",
  • "location_type": "FARM",
  • "location_name": "Bia Orchards",
  • "street_address": "123 Jakers Street",
  • "city": "Kimberton",
  • "country_code": "US",
  • "po_box_number": null,
  • "postal_code": "19460",
  • "state": "PA",
  • "latitude": 0,
  • "longitude": 0
}

Response samples

Content type
application/json
{
  • "locations": [
    ],
}

Deletes a location

Deletes the location from the system.

path Parameters
location_id
required
any

Location ID

Responses

Metadata

APIS for metadata

get_metadata

Retrieves metadata related to items such as products, locations, etc.

query Parameters
metadata_id[]
Array of strings

Array of IDs for metadata.

product_id[]
Array of strings

An array of product IDs.

entity_id[]
Array of strings <uuid>

Array of entity IDs.

location_id[]
Array of strings

An array of location IDs.

event_id[]
Array of strings

Array of event identifiers.

metadata_start_timestamp
string

Returns records with a payload timestamp on or after the timestamp provided

metadata_end_timestamp
string

Returns records with a payload timestamp strictly before the timestamp provided

limit
number <double>
Default: 500

A numerical limit to the number of records initially returned. Paging can then be used for further retrieval. Default limit 500.

startPage
string

Specifies the record number at which to start the page of results. The number of records returned will be based on the limit parameter.

Responses

Response samples

Content type
application/json
{
  • "metadata_id": "3jh43u2i5u3i4",
  • "metadata_timestamp": "2019-03-13T14:52:48.350Z",
  • "metadata_content_type": "shipping delay",
  • "product_ids": [
    ],
  • "location_ids": [
    ],
  • "customData": {
    }
}

Creates a new metadata entry.

Creates a new metadata entry.

Request Body schema: application/json

Parameters of the metadata to post.

entity_id
string
metadata_timestamp
string
metadata_content_type
string
event_ids
Array of strings
asset_ids
Array of strings
location_ids
Array of strings
customData
object

Responses

Request samples

Content type
application/json
{
  • "metadata_timestamp": "2019-03-13T14:52:48.350Z",
  • "metadata_content_type": "shipping delay",
  • "product_ids": [
    ],
  • "location_ids": [
    ],
  • "customData": {
    }
}

Response samples

Content type
application/json
{
  • "metadata_id": "3jh43u2i5u3i4",
  • "metadata_timestamp": "2019-03-13T14:52:48.350Z",
  • "metadata_content_type": "shipping delay",
  • "product_ids": [
    ],
  • "location_ids": [
    ],
  • "customData": {
    }
}

Updates an existing metadata entry

Updates existing metadata entry

Request Body schema: application/json

Parameters of the metadata to update.

metadata_id
string
entity_id
string
metadata_timestamp
string
metadata_content_type
string
event_ids
Array of strings
asset_ids
Array of strings
location_ids
Array of strings
customData
object

Responses

Request samples

Content type
application/json
{
  • "metadata_id": "3jh43u2i5u3i4",
  • "metadata_timestamp": "2019-03-13T14:52:48.350Z",
  • "metadata_content_type": "shipping delay",
  • "product_ids": [
    ],
  • "location_ids": [
    ],
  • "customData": {
    }
}

Response samples

Content type
application/json
{
  • "metadata_id": "3jh43u2i5u3i4",
  • "metadata_timestamp": "2019-03-13T14:52:48.350Z",
  • "metadata_content_type": "shipping delay",
  • "product_ids": [
    ],
  • "location_ids": [
    ],
  • "customData": {
    }
}

Deletes a metadata entry

Deletes the entry from the system.

path Parameters
metadata_id
required
any

Metadata ID

Responses

Events

APIs for events

Retrieves events

Retrieves details of events

query Parameters
entity_id[]
Array of strings <uuid>

Array of entity IDs.

asset_id[]
Array of strings

Return records with the asset identifiers provided.

location_id[]
Array of strings

An array of location IDs.

product_id[]
Array of strings

An array of product IDs.

event_type[]
Array of strings

An array of event types.

transaction_id[]
Array of strings

An array of IDs for the business transaction.

transaction_type[]
Array of strings

Array transaction types to retrieve records.

step[]
Array of strings

Array of Business Step IDs

event_start_timestamp
string

Returns results based on events on or after the provided timestamp.

event_end_timestamp
string

Returns results based on events before the provided timestamp.

limit
number <double>
Default: 500

A numerical limit to the number of records initially returned. Paging can then be used for further retrieval. Default limit 500.

startPage
string

Specifies the record number at which to start the page of results. The number of records returned will be based on the limit parameter.

Responses

Response samples

Content type
application/json
{
  • "events": [
    ],
}

Creates a new event entry.

Creates a new event entry.

Request Body schema: application/json

Parameters of the event to post.

Array of objects (event)

Responses

Request samples

Content type
application/json
{
  • "entity_id": "12entity34",
  • "event_type": "observation",
  • "event_time": "2019-03-13T14:52:48.350Z",
  • "transformation_id": "exampleIDforTransformation",
  • "asset_ids": [
    ],
  • "parent_asset_id": "parentAssetIDExample",
  • "quantities": {
    },
  • "source_location_ids": [
    ],
  • "destination_location_ids": [
    ],
  • "transaction_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "entity_id": "string",
  • "event_type": "aggregation",
  • "event_time": "string",
  • "transformation_id": "string",
  • "biz_step": "string",
  • "disposition": "string",
  • "read_point_location_id": "string",
  • "read_point_sub_location_id": "string",
  • "biz_location_id": "string",
  • "biz_sub_location_id": "string",
  • "asset_ids": [
    ],
  • "parent_asset_id": "string",
  • "child_asset_ids": [
    ],
  • "quantities": { }
}

Updates an existing event entry

Updates existing event entry

Request Body schema: application/json

Parameters of the event to update.

Array of objects (event)

Responses

Request samples

Content type
application/json
{
  • "event_id": "eventIDexample",
  • "entity_id": "12entity34",
  • "event_type": "observation",
  • "event_time": "2019-03-13T14:52:48.350Z",
  • "transformation_id": "exampleIDforTransformation",
  • "asset_ids": [
    ],
  • "parent_asset_id": "parentAssetIDExample",
  • "quantities": {
    },
  • "source_location_ids": [
    ],
  • "destination_location_ids": [
    ],
  • "transaction_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "entity_id": "string",
  • "event_type": "aggregation",
  • "event_time": "string",
  • "transformation_id": "string",
  • "biz_step": "string",
  • "disposition": "string",
  • "read_point_location_id": "string",
  • "read_point_sub_location_id": "string",
  • "biz_location_id": "string",
  • "biz_sub_location_id": "string",
  • "asset_ids": [
    ],
  • "parent_asset_id": "string",
  • "child_asset_ids": [
    ],
  • "quantities": { }
}

Deletes a event entry

Deletes the entry from the system.

path Parameters
event_id
required
any

Event ID

Responses

Assets

APIs for assets

get_assets

Finds an asset of any type, whether it be a lot, serial, or EPC.

query Parameters
product_id[]
Array of strings

An array of product IDs.

asset_id[]
Array of strings

An array of EPC, lot or serial IDs.

asset_type
Array of strings

An array of asset types.

event_start_timestamp
string

Returns results based on events on or after the provided timestamp.

event_end_timestamp
string

Returns results based on events before the provided timestamp.

limit
number <double>
Default: 500

A numerical limit to the number of records initially returned. Paging can then be used for further retrieval. Default limit 500.

startPage
string

Specifies the record number at which to start the page of results. The number of records returned will be based on the limit parameter.

Responses

Response samples

Content type
application/json
{
  • "assets": [
    ]
}

Creates a new asset entry.

Creates a new asset entry.

Request Body schema: application/json

Parameters of the asset to post.

id
string
asset_type
string
product_id
string

Responses

Request samples

Content type
application/json
{
  • "id": "thisAssetID",
  • "asset_type": "pallet",
  • "product_id": "productIDExample"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "entity_id": "string",
  • "event_type": "aggregation",
  • "event_time": "string",
  • "transformation_id": "string",
  • "biz_step": "string",
  • "disposition": "string",
  • "read_point_location_id": "string",
  • "read_point_sub_location_id": "string",
  • "biz_location_id": "string",
  • "biz_sub_location_id": "string",
  • "asset_ids": [
    ],
  • "parent_asset_id": "string",
  • "child_asset_ids": [
    ],
  • "quantities": { }
}

Updates an existing asset entry

Updates existing asset entry

Request Body schema: application/json

Parameters of the event to update.

id
string
asset_type
string
product_id
string

Responses

Request samples

Content type
application/json
{
  • "id": "thisAssetID",
  • "asset_type": "pallet",
  • "product_id": "productIDExample"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "entity_id": "string",
  • "event_type": "aggregation",
  • "event_time": "string",
  • "transformation_id": "string",
  • "biz_step": "string",
  • "disposition": "string",
  • "read_point_location_id": "string",
  • "read_point_sub_location_id": "string",
  • "biz_location_id": "string",
  • "biz_sub_location_id": "string",
  • "asset_ids": [
    ],
  • "parent_asset_id": "string",
  • "child_asset_ids": [
    ],
  • "quantities": { }
}

Deletes an asset entry

Deletes the entry from the system.

path Parameters
asset_id
required
any

Asset ID

Responses

retrieve a trace for a specific lot, serial, or pallet

Retrieve a consumer trace for a specific lot, serial, or pallet

path Parameters
asset_id
required
string

EPC of lot, serial, pallet, or GRAI to trace

query Parameters
product_id[]
Array of strings

An array of product IDs.

depth
integer <int32> [ 1 .. 10 ]
Default: 5

Returns the number of steps to traverse in the trace.

upstream
boolean
Default: true

Boolean value indicating whether or not to trace upstream.

downstream
boolean
Default: true

Boolean value indicating whether or not to trace downstream.

Responses

Response samples

Content type
application/json
{
  • "trace": {
    }
}

Retrieves imld data

Retrieves imld data related to assets and products.

query Parameters
asset_id[]
Array of strings
product_id[]
Array of strings
best_before_date_start_timestamp
string
best_before_date_end_timestamp
string
first_freeze_date_start_timestamp
string
first_freeze_date_end_timestamp
string
harvest_start_date_start_timestamp
string
harvest_start_date_end_timestamp
string
harvest_end_date_start_timestamp
string
harvest_end_date_end_timestamp
string
item_expiration_date_start_timestamp
string
item_expiration_date_end_timestamp
string
sell_by_date_start_timestamp
string
sell_by_date_end_timestamp
string
limit
number <double>
Default: 500
start
string

Responses

Response samples

Content type
application/json
{
  • "ilmds": [
    ]
}

Creates new ilmd entry

Creates new ilmd entry.

Request Body schema: application/json

Object to submit post a new ilmds entry.

Array of objects (ilmd)

Responses

Request samples

Content type
application/json
{
  • "events": [
    ]
}

Response samples

Content type
application/json
{
  • "ilmds": [
    ]
}

Updates an existing ilmds entry

Updates existing ilmds entry

Request Body schema: application/json

Parameters of the ilmds record to update.

Array of objects (ilmd)

Responses

Request samples

Content type
application/json
{
  • "events": [
    ]
}

Response samples

Content type
application/json
{
  • "ilmds": [
    ]
}

Deletes an ilmds entry

Deletes the entry from the system.

path Parameters
ilmds_id
required
any

Ilmds ID

Responses

Entities

APIs for entities

get_entities

Retrieves information for entities.

query Parameters
entity_id[]
Array of strings <uuid>

Array of entity IDs.

entity_name[]
Array of strings

An array of entity names.

company_prefix[]
Array of strings

An array of company prefixes.

asset_id[]
Array of strings

Array of EPC or relevant product identifiers.

product_id[]
Array of strings

An array of product IDs.

location_id[]
Array of strings

An array of location IDs to use in returning records.

limit
number <double>
Default: 500

A numerical limit to the number of records initially returned. Paging can then be used for further retrieval. Default limit 500.

startPage
string

Specifies the record number at which to start the page of results. The number of records returned will be based on the limit parameter.

Responses

Response samples

Content type
application/json
{
  • "entities": [
    ]
}

Creates new entity entry

Creates new entity entry.

Request Body schema: application/json

Object to post a new entity entry.

Array of objects (entity)

Responses

Request samples

Content type
application/json
{
  • "name": "CJ Berries",
  • "company_prefix": "CJB",
  • "asset_id": "assetIDexample",
  • "product_id": "prodIDexample",
  • "location_id": "locationIDexample"
}

Response samples

Content type
application/json
{
  • "entities": [
    ]
}

Updates an existing entity entry

Updates existing entity entry

Request Body schema: application/json

Parameters of the entity record to update.

Array of objects (entity)

Responses

Request samples

Content type
application/json
{
  • "id": "entityIDexample",
  • "name": "CJ Berries",
  • "company_prefix": "CJB",
  • "asset_id": "assetIDexample",
  • "product_id": "prodIDexample",
  • "location_id": "locationIDexample"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "company_prefix": [
    ],
  • "asset_id": [
    ],
  • "product_id": [
    ],
  • "location_id": [
    ]
}

Deletes an entity entry

Deletes the entry from the system.

path Parameters
entity_id
required
any

Entity ID

Responses

Sources

APIs for sources

retrieve source material

Returns assets used as source materials for other assets. For example, avocados used to make guacamole.

query Parameters
asset_id[]
required
Array of strings

Returns records with the asset identifiers (URN) provided.

Responses

Response samples

Content type
application/json
{
  • "asset_ids": [
    ],
  • "sources": [
    ]
}

Creates new source entry

Creates new source entry.

Request Body schema: application/json

Object to post a new source entry.

Array of objects (sources)

Responses

Request samples

Content type
application/json
{
  • "asset_ids": [
    ],
  • "sources": [
    ]
}

Response samples

Content type
application/json
{
  • "asset_ids": [
    ],
  • "sources": [
    ]
}

Updates an existing sources entry

Updates existing sources entry

Request Body schema: application/json

Parameters of the source record to update.

Array of objects (sources)

Responses

Request samples

Content type
application/json
{
  • "asset_ids": [
    ],
  • "sources": [
    ]
}

Response samples

Content type
application/json
{
  • "asset_ids": [
    ],
  • "sources": [
    ]
}

Deletes an sources entry

Deletes the entry from the system.

path Parameters
source_id
required
any

Source ID

Responses

Issuer

APIs for Issuers.

Issues a credential and returns it in the response body.

Issues a credential and returns it in the response body.

Request Body schema: application/json

Parameters for issuing the credential.

object (Credential)

A JSON-LD Verifiable Credential without a proof.

object (IssueCredentialOptions)

Options for specifying how the LinkedDataProof is created.

Responses

Request samples

Content type
application/json
{
  • "credential": {},
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "type": [
    ],
  • "issuer": "did:example:123",
  • "issuanceDate": "2020-03-16T22:37:26.544Z",
  • "credentialSubject": {
    },
  • "proof": {
    }
}

Updates the status of an issued credential

Updates the status of an issued credential.

Request Body schema: application/json

Parameters for updating the status of the issued credential.

One of
credentialId
string
type
string
status
number

Responses

Request samples

Content type
application/json
{
  • "credentialId": "urn:uuid:45a44711-e457-4fa8-9b89-69fe0287c86a",
  • "type": "RevocationList2020Status",
  • "status": 0
}

Verifier

APIs for Verifiers.

Verifies a verifiableCredential and returns a verificationResult in the response body.

Verifies a verifiableCredential and returns a verificationResult in the response body.

Request Body schema: application/json

Parameters for verifying a verifiableCredential.

object (VerifiableCredential)

A JSON-LD Verifiable Credential with a proof.

object (VerifyOptions)

Options for specifying how the LinkedDataProof is created.

Responses

Request samples

Content type
application/json
{
  • "verifiableCredential": {
    },
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "checks": [
    ],
  • "warnings": [ ],
  • "errors": [ ]
}

Verifies a Presentation with or without proofs attached and returns a verificationResult in the response body.

Verifies a verifiablePresentation and returns a verificationResult in the response body. Given the possibility of denial of service, buffer overflow, or other style attacks, an implementation is permitted to rate limit or restrict requests against this API endpoint to those requests that contain only a single credential with a 413 or 429 error code as appropriate.

Request Body schema: application/json

Parameters for verifying a verifiablePresentation.

One of
object (VerifiablePresentation)

A JSON-LD Verifiable Presentation with a proof.

object (VerifyOptions)

Options for specifying how the LinkedDataProof is created.

Responses

Request samples

Content type
application/json
Example
{
  • "verifiablePresentation": {
    },
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "checks": [
    ],
  • "warnings": [ ],
  • "errors": [ ]
}

Holder

Optional APIs for Holders.

Proves a presentation and returns it in the response body.

Proves a presentation and returns it in the response body.

Request Body schema: application/json

Parameters for proving the presentation.

object (Presentation)

A JSON-LD Verifiable Presentation without a proof.

object (PresentCredentialOptions)

Options for specifying how the LinkedDataProof is created.

Responses

Request samples

Content type
application/json
{
  • "presentation": {},
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "holder": "did:example:123",
  • "type": "VerifiablePresentation",
  • "verifiableCredential": [
    ],
  • "proof": {
    }
}