Download OpenAPI specification:Download
To authenticate with a MediLedger server, there are two steps:
Get an authentication token
Use an authentication token in later REST API requests
Authenticate to the server using your account's email address and
password. You will also need your tenant's short name, which you can get
from your MediLedger administrator. The tenant short name parameter is
required, even for a single-tenant deployment. For example, a company
called Acme might use the short name acme
To get an authentication token:
POST request to the /tenant/{tenant_id}/oauth/token resource. Content-Type: application/json; charset=UTF-8
3. Include the version prefix /api/2.0 before the endpoint
path. Note that nearly all MediLedger PVS REST APIs require this version
prefix. However, GS1 verification queries omit the version prefix.
4. Include the authentication email address and password in the request
as JSON data:
'{"email": "jsmith@mycompany.com", "password": "mypassword" }'
Using cURL syntax, the following command gets a token :
curl --request POST --header "Content-Type: application/json;
charset=UTF-8" --data '{"email": "jsmith@mycompany.com", "password":
"mypassword" }'
https://api-server.mediledger.mycompany.com/api/2.0/tenant/acme/oauth/token
The JSON result includes a id_token property, which is your token.
Use the token to make other REST API request by passing the token in the HTTP header Authorization.
Using cURL, you can put the HTTP header name and the token in a file
and use this file in later REST API requests. First, create a file
called tokenheader and with the following text, substituting YOUR_TOKEN with your token:
Authorization: Bearer YOUR_TOKEN
For cURL version 7.55.0 or later, use the @ syntax:
curl -X GET -H 'Content-Type: application/json;charset=utf-8'
-H 'cache-control: no-cache' -H @tokenheader
https://api-server.mediledger.mycompany.com/api/2.0/product
For earlier versions of cURL, use this alternative syntax as a workaround:
curl -X GET -H 'Content-Type: application/json;charset=utf-8'
-H 'cache-control: no-cache' -H "$(cat tokenheader)"
https://api-server.mediledger.mycompany.com/api/2.0/product
You can alternatively use an existing token to login with a GET /tenant/{tenant_id}/oauth/token request to refresh (re-issue) a new token.
To end a session, make a DELETE /oauth/token request, which invalidates the token. To log in again, request a new token.
Start
a new session and get an authentication token that you can use to call
other REST APIs. Use an email address and password to login and generate
the token. You must already be registered as a user on this MediLedger
Private Node. The tenant short name part of the path is required, even
for single-tenant deployments. Use the token to make other REST API
request by passing the authentication token in the HTTP header Authorization. Read the Authentication API introduction in this documentation for examples of how to use the token with cURL.
For a multi-tenant installation of a MediLedger Private Node, each email address is associated only with a single tenant. Therefore, any REST API calls that use this authentication token work only with the appropriate tenant data.
This API is typically used with email and password to generate a new token. Alternatively, you can use this API to log in with an existing token (instead of email and password) to generate a new token in case the previous one was compromised.
To end a session, make a DELETE /oauth/token request, which invalidates the token. To log in again, request a new token.
| tenant_id required | string^.{0,100}$ The tenant short name for your tenant. This corresponds to the shortName field in the tenant's configuration file |
| email required | string^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-... Email address. |
| password required | string^.{1,100000}$ Password. Maximum 100000 characters. |
{- "grant_type": "refresh_token",
- "refresh_token": "string"
}{- "chronicled_id": "string",
- "email": "string",
- "grant_type": "refresh_token",
- "id_token": "string",
- "refresh_token": "string",
- "user_id": "string",
- "last_password_change": "2019-08-24T14:15:22Z",
- "last_login": "2019-08-24T14:15:22Z",
- "context": {
- "id": 0,
- "sessionId": "string",
- "user": {
- "profile": {
- "anonymous": true,
- "roles": [
- "string"
]
}, - "ip_address": "string",
- "user_agent": "string",
- "tenant_id": "string"
}
}
}Log out of a session, which also invalidates the token.
See the beginning of the Authentication section of this documentation for examples of how to create and use tokens.
{- "logout_time": "2018-10-13T21:11:57.060Z",
- "user_id": "1234567"
}Submits a GS1-compliant verification request to the MediLedger PVS system. Distributors can use this API to integrate with their existing systems. For example, an ERP or warehouse system could call this REST API to verify a saleable return by specifying the product ID (GTIN), serial number, lot number, and expiration date.
This follows the GS1 lightweight verification messaging standard decribed in this GS1 specification.
The implementation of this API is as follows:
If the asset was stored locally on this Private Node, it is verified immediately. Locally stored assets (SGTINs) is a feature for use in manufacturer testing only as an alternative to setting up an EPCIS repository for this information during testing. For more details, see the POST /asset request.
The server uses blockchain data to determine which Private Node is responsible for that product code (GTIN). The blockchain registration for the product includes an endpoint route that includes an endpoint URL which is the URL to the MediLedger Private Node that can validate the request for that product.
The server contacts that Private Node and makes a peer-to-peer verification request (using a different internal REST API).
That server responds to the verification request, possibly
calling out to external EPCIS systems to look up the product ID (GTIN),
serial number, lot number, and expiration date.
IMPORTANT: Omit the /api/2.0 URL prefix for this GS1 API.
| gtin required | string^\d{8}|\d{12}|\d{13}|\d{14}$ Global Trade Item Number (GTIN) |
| lot required | string^.{0,100}$ Lot number, which is also known as a batch number. |
| ser required | string^[0-9a-zA-Z]{1,20}$ Serial number. |
string^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-... Example: email=anyone@anynet.com Email of contact point responsible for verification request or response | |
| exp required | string^([0-9][0-9])(0[1-9]|1[0-2])(0[0-9]|[1-2][0-9... Expiry date in date format |
| linkType required | string Value: "verificationService" The link type. Always set to |
| context required | string Enum: "dscsaSaleableReturn" "dscsaStatusCheck" "dscsaExceptionVerification" "dscsaSuspectIllegitimate" The verification context |
| telephone | string Example: telephone=011234567890 Telephone number of contact point responsible for verification request or response |
| ctrlPossessAtt required | boolean Example: ctrlPossessAtt=true Requestor is making an attestation that they have possession or control of the product if a value of true is supplied. |
| reqGLN | string^[0-9a-zA-Z]{13}$ GS1 Global Location Number (GLN) of the requestor. |
| corrUUID | string^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4{1}[a-fA-F0-9... Correlation UUID |
| ATP-Authorization | string Verification Credential authorization header from client. |
{- "corrUUID": "19a1faa0-9222-11e9-8544-9d8142666fed",
- "data": {
- "verified": true
}, - "responderGLN": "0361111111116",
- "verificationTimestamp": "2019-06-18T23:37:56.893Z"
}The interface that external EPCIS systems must implement for verification requests from the MediLedger application.
IMPORTANT: There is one important difference between this interface and the GS1 verification request specification: the responder GLN (responderGLN)
in the response is optional not required. If the EPCIS system sets the
responder GLN explicitly, by default the MediLedger node uses the EPCIS
response GLN in its own response to the verification request that it
received. If omitted, the MediLedger node uses its own tenant default
GLN. If instead you want to always return verification responses with
the tenant’s default GLN independent of the behavior of the EPCIS system
response, contact support for help configuring an advanced setting that
overrides the default behavior.
This interface documents a webhook that allows a MediLedger application tenant that represents a manufacturer to connect an EPCIS repository. The EPCIS repository contains important information that is not stored on the MediLedger blockchain: product serial numbers, expiration dates, and lot numbers.
This is an OpenAPI specification of an interface that must be implemented by external EPCIS system or middleware that connects to an external EPCIS system. This is provided as a reference for manufacturers who need to implement this interface. Because this is based on a GS1 standard, an equivalent REST API is implemented on the MediLedger Private Node, but this OpenAPI REST API request is intended as your reference for what to implement.
With one exception, this is the GS1 lightweight verification messaging standard decribed in this GS1 specification.
IMPORTANT: There is one important difference between this interface and the GS1 verification request specification: the responder GLN (responderGLN)
in the EPCIS response is optional not required. If the EPCIS system
sets the responder GLN explicitly, by default the MediLedger node uses
the EPCIS response GLN in its own response to the verification request
that it received. If omitted, the MediLedger node uses its own tenant
default GLN. If instead you want to always return verification responses
with the tenant’s default GLN independent of the behavior of the EPCIS
system response, contact support for help configuring an advanced
setting that overrides the default behavior.
There are two parts to this integration for the MediLedger PVS
application:
This interface must be implemented by EPCIS repositories or middleware that interfaces with the EPCIS system.
When creating a new tenant on a MediLedger Private Node, you will run the add-tenant script, which generates a configuration file at tenants/TENANT_SHORT_NAME/config.yaml. See the Getting Started Guide for more details.
Before you run the start-tenant script, you must edit the tenant-specific config.yaml file to configure the webhooks property with mappings for one or more EPCIS servers. See the Getting Started Guide in the section EPCIS Configuration for Manufacturers Only. You cannot edit the webhook settings after you start the tenant.
For complete instructions, see the Getting Started Guide in the section EPCIS Configuration for Manufacturers Only. If you do not already have the Getting Started Guide, or if you have any questions, please email Chronicled Support at mlsupport@pulse.pharmacy.
IMPORTANT: Omit the /api/2.0 URL prefix for this GS1 API.
| gtin required | string^\d{8}|\d{12}|\d{13}|\d{14}$ Global Trade Item Number (GTIN) |
| lot required | string^.{0,100}$ Lot number, which is also known as a batch number. |
| ser required | string^[0-9a-zA-Z]{1,20}$ Serial number. |
string^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-... Example: email=anyone@anynet.com Email of contact point responsible for verification request or response | |
| exp required | string^([0-9][0-9])(0[1-9]|1[0-2])(0[0-9]|[1-2][0-9... Expiry date in date format |
| linkType required | string Value: "verificationService" The link type. Always set to |
| context required | string Enum: "dscsaSaleableReturn" "dscsaStatusCheck" "dscsaExceptionVerification" "dscsaSuspectIllegitimate" The verification context |
| telephone | string Example: telephone=011234567890 Telephone number of contact point responsible for verification request or response |
| ctrlPossessAtt required | boolean Example: ctrlPossessAtt=true Requestor is making an attestation that they have possession or control of the product if a value of true is supplied. |
| reqGLN | string^[0-9a-zA-Z]{13}$ GS1 Global Location Number (GLN) of the requestor. |
| corrUUID | string^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4{1}[a-fA-F0-9... Correlation UUID |
| ATP-Authorization | string Verification Credential authorization header from client. |
{- "responderGLN": "string",
- "corrUUID": "string",
- "verificationTimestamp": "2019-08-24T14:15:22Z",
- "contactPoint": {
- "email": "anyone@anynet.com",
- "telephone": "011234567890"
}, - "data": {
- "verified": false,
- "verificationFailureReason": "Manufacturer_policy",
- "additionalInfo": "Expired"
}
}The Product API manages a set of products that are registered on the blockchain. A product represents a model and size of a specific pharamaceutical product saleable unit.
Every product has a product ID called a GS1 GTIN-14 code, which is a 14-digit numeric code that it is assigned by the GS1 organization. In documentation and APIs, this is often called by the shorter name GTIN. See https://www.gs1.org/standards/id-keys/gtin. The GTIN codes for all products are stored on the blockchain. The beginning numbers of each GTIN are the GS1 company prefix of the product's original creator. For more information about the GS1 company prefix, see https://www.gs1.org/standards/id-keys/company-prefix.
The main purpose of the MediLedger PVS application is to verify a saleable return package's basic information with its manufacturer before it can be resold. While the MediLedger PVS application stores product IDs (GTINs) on the blockchain, asset information like serial numbers are NOT stored on the blockchain. If a distributor wants to verify a saleable return, data on the blockchain for a specific GTIN indicates which MediLedger Private Node or Gateway Node (represented as a MediLedger endpoint URL) controls that product. The distributor then requests validation of the GTIN and serial number (encapsulated together as an SGTIN code) along with the lot number and expiration date. The manufacturer Private Node searches their own Electronic Product Code Information Services (EPCIS) repository to validate the saleable return.
The product APIs are grouped in two resources:
/product — Manages the MediLedger products that you
currently own, but also lists products that were involved with attempted
or complete transfers to or from other members. See the GET /product
operation for important discussion about what kinds of products will be
found with this API and which categories of products that you have
official ownership of.
/public-product — Manages the MediLedger public
products, which are products that were successfully registered by any
MediLedger member. Public products are part of the public blockchain.
Results do not include any pending transfers or new products that are
pending creation.
In addition to registering new products, a critical part of managing products is handling product transfers. If you transfer a product from you to another member, this is an outgoing transfer. The other MediLedger member must accept or reject the transfer using the REST API or through their own MediLedger Dashboard Web application. If another member attempts to transfer a product to you, this is an incoming transfer and you must accept or reject it before the transfer is complete. After a transfer is complete, the recipient is the new official owner as reflected in the blockchain.
Related REST API resources in other documents:
/endpoint - Create a new endpoint, which encapsulates a
URL to a MediLedger Private Node (or Gateway Node) REST API that can
fulfill a validation request for a specific product ID (GTIN).Returns basic information about MediLedger products that your organization has created, including ones that are still pending or had errors. The results also include plus all products that were ever involved with transfers with me, whether or not it was completed (or cancelled) and even if it was transferred to someone else since then.
You can optionally filter the results list by various criteria. For
example, return product IDs (GTINs) with a specified prefix by setting gtin_prefix. Return products in the process of transfer by setting transfer_pending to true. See the parameters list for details and other filter criteria.
To understand the business meaning of the products in the results, it
is important to distinguish between products that you currently own
versus products that appear in results because of past transfers or
attempted transfers with you. You can check if you currently own a
product in the results by checking the owned field in the JSON results. Alternatively, you could check to see if the owner_id field matches your member ID. If you want to only return products you currently own, on your request set the owned filter parameter to true.
The products in results include the following five categories:
Products that you officially own right now, independent of
whether you created it or it was transferred to you from someone else
and you accepted it. The owned field has the value true.
Recently created products that are still pending creation and
confirmation on the blockchain. Technically, no one owns it yet. The owned field has the value false.
You used to own it, but you successfully transferred it to
another MediLedger member (a completed outgoing transfer). It will be
visible to you in your API results forever, even if the new owner
transfers it to another member eventually. The owned field has the value false. Note: If a recipient later transfers it back to you and you accept it, you own it again and owned again becomes true.
It is pending transfer to you (an incoming transfer), but you
have not yet accepted or rejected the request. It will be visible to you
in your API results forever, even if the new owner transfers it to
another member eventually. The owned field has the value false. The transfer_pending field has the value true.
Another member initiated a transfer of it to you but cancelled
it. It will be visible to you in your API results forever, even if the
new owner transfers it to another member eventually. The owned field has the value false. The transfer_pending field has the value false (unless a transfer is attemped again).
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
| gtin_prefix | string^[0-9]{0,14}$ Filters results only to products with this GTIN prefix. If omitted, no filtering on this criteria. |
| transferring_to | string^[0-9]{0,9}$ Filters results only to products being transferred to a particular MediLedger member. Specify the member by member ID, which is a numeric ID. Member URIs are unsupported. If omitted, no filtering on this criteria. |
| transfer_pending | boolean Filters results only to products that are pending transfer. Pending transfer means that the product is being transferred to you or from you, but the recipient has not yet accepted or rejected the request. If omitted, no filtering on this criteria. |
| owned | boolean Filters results based on whether you own the product. See If you set this parameter to |
| owner | string^[0-9]{0,9}$ Filters results only to products that are owned by the ID stored in this parameter. For example, the URL might include |
[- {
- "id": "string",
- "company_prefix": "string",
- "creator": "string",
- "display_name": "string",
- "gtin": "string",
- "gtin_length": 14,
- "item_reference": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "pending_endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "uris": [
- "string"
], - "transfer_pending": true,
- "transferring_to": "string",
- "owned": true,
- "owner": "string",
- "blockchain_transactions": [
- "string"
], - "blockchain_events": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}
]Creates a new product. The most important information you need to create a product is the GS1 GTIN-14 code for the product.
Additionally, for each GTIN you must also provide an ID for a
Validation Endpoint. Validation Endpoints are objects on the blockchain
that encapsulate validation URLs. A validation URL represents a
MediLedger Private Node (or in some cases a Gateway Node) that can
validate product information for a saleable return using MediLedger REST
APIs. To register a new Validation Endpoint on the blockchain, use the
separate REST API resource called /endpoint, which is documented in a separate OpenAPI document. Each Validation Endpoint has an ID. For the POST /product request, encapsulate the ID for a Validation Endpoint in an object called an endpoint route. See the description of the parameter endpoint_routes for its structure.
| display_name required | string [ 2 .. 100 ] characters The human-readable display name for this product. Format is 2 to 100 characters. |
required | Array of objects non-empty An array of endpoint routes, each of which represents a verification URL on a MediLedger Private Node or Gateway Node that can validate this product for a range of pharamaceutical expiry dates. Each object contains a required endpoint ID, a required start date, and an optional end date. To create a new endpoint, use a |
| gtin required | string^\d{14}$ A product ID that conforms to the GS1 GTIN-14 standard. Format is 14 numeric digits, including a checksum digit. |
{- "display_name": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string"
}
], - "gtin": "string"
}{- "id": "string",
- "company_prefix": "string",
- "creator": "string",
- "display_name": "string",
- "gtin": "string",
- "gtin_length": 14,
- "item_reference": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "pending_endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "uris": [
- "string"
], - "transfer_pending": true,
- "transferring_to": "string",
- "owned": true,
- "owner": "string",
- "blockchain_transactions": [
- "string"
], - "blockchain_events": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}Update product display name
| product_uri required | string^gs1:es:01(\d{14})$|^ml:product:[0-9]+$ A product URI, which is |
| display_name required | string [ 2 .. 100 ] characters The human-readable display name for this product. Format is 2 to 100 characters. |
{- "display_name": "string"
}{- "id": "string",
- "company_prefix": "string",
- "creator": "string",
- "display_name": "string",
- "gtin": "string",
- "gtin_length": 14,
- "item_reference": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "pending_endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "uris": [
- "string"
], - "transfer_pending": true,
- "transferring_to": "string",
- "owned": true,
- "owner": "string",
- "blockchain_transactions": [
- "string"
], - "blockchain_events": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}Begins a transfer of a product. The product is considered pending transfer until such time as one of the following happens:
The recipient (transferee) accepts the transfer. If this happens, the product's owner ID changes to the new recipient.
The recipient (transferee) rejects the transfer. If this happens, your organization continues to own the product.
You cancel the transfer before the recipient can accept or reject the transfer. If this happens, your organization continues to own the product.
If your organization does not own the product, this returns error HTTP response code 409.
| id required | string^([0-9a-km-zA-HJ-Z]{7})|(gs1:es:01(\d{14}))$|... An
ID for a product. Specify this parameter as either a Chronicled ID
(which is unique to this Private Node) or the product URI. The product
URI embeds the GTIN. The product URI syntax must be |
| recipient_uri required | string^gs1:company-prefix:[0-9]{4,12}$|^ml:member:[... Identity URI. Pass either form:
|
{- "recipient_uri": "string"
}{- "id": "string",
- "company_prefix": "string",
- "creator": "string",
- "display_name": "string",
- "gtin": "string",
- "gtin_length": 14,
- "item_reference": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "pending_endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "uris": [
- "string"
], - "transfer_pending": true,
- "transferring_to": "string",
- "owned": true,
- "owner": "string",
- "blockchain_transactions": [
- "string"
], - "blockchain_events": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}Accepts the transfer of a product.
If you do not want to accept the transfer, instead use a Reject Product Transfer request (/product/{public_product_uri}/reject).
If the product's owner did not initiate transfer of this product to your organization, this returns error HTTP 404. If the product is already owned by you, this returns error HTTP 400.
| id required | string^([0-9a-km-zA-HJ-Z]{7})|(gs1:es:01(\d{14}))$|... An
ID for a product. Specify this parameter as either a Chronicled ID
(which is unique to this Private Node) or the product URI. The product
URI embeds the GTIN. The product URI syntax must be |
| display_name required | string [ 2 .. 100 ] characters The human-readable display name for this product. Format is 2 to 100 characters. |
required | Array of objects non-empty An array of endpoint routes, each of which represents a verification URL on a MediLedger Private Node or Gateway Node that can validate this product for a range of pharamaceutical expiry dates. Each object contains a required endpoint ID, a required start date, and an optional end date. To create a new endpoint, use a |
{- "display_name": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string"
}
]
}{- "id": "string",
- "company_prefix": "string",
- "creator": "string",
- "display_name": "string",
- "gtin": "string",
- "gtin_length": 14,
- "item_reference": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "pending_endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "uris": [
- "string"
], - "transfer_pending": true,
- "transferring_to": "string",
- "owned": true,
- "owner": "string",
- "blockchain_transactions": [
- "string"
], - "blockchain_events": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}Reject a pending transfer of a product. This API assumes that a product transfer of the product has already been initiated by another member.
If you initiated a pending transfer and do not want it to succeed, instead use a Cancel Product Transfer request (/product/{public_product_uri}/cancel).
If the product's owner did not initiate transfer of this product to your organization, this returns error HTTP 404. If the product is already owned by you, this returns error HTTP 400.
| id required | string^([0-9a-km-zA-HJ-Z]{7})|(gs1:es:01(\d{14}))$|... An
ID for a product. Specify this parameter as either a Chronicled ID
(which is unique to this Private Node) or the product URI. The product
URI embeds the GTIN. The product URI syntax must be |
{- "id": "string",
- "company_prefix": "string",
- "creator": "string",
- "display_name": "string",
- "gtin": "string",
- "gtin_length": 14,
- "item_reference": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "pending_endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "uris": [
- "string"
], - "transfer_pending": true,
- "transferring_to": "string",
- "owned": true,
- "owner": "string",
- "blockchain_transactions": [
- "string"
], - "blockchain_events": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}Cancels the transfer of a Product. Use this API to cancel a product transfer that you previously initiated.
If you are the recipient of a pending transfer and do not want to accept it, instead use a Reject Product Transfer request (/product/{public_product_uri}/reject).
If you are not the product owner and initiated transfer of this product to your organization, this returns error HTTP 409.
| id required | string^([0-9a-km-zA-HJ-Z]{7})|(gs1:es:01(\d{14}))$|... An
ID for a product. Specify this parameter as either a Chronicled ID
(which is unique to this Private Node) or the product URI. The product
URI embeds the GTIN. The product URI syntax must be |
{- "id": "string",
- "company_prefix": "string",
- "creator": "string",
- "display_name": "string",
- "gtin": "string",
- "gtin_length": 14,
- "item_reference": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "pending_endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "uris": [
- "string"
], - "transfer_pending": true,
- "transferring_to": "string",
- "owned": true,
- "owner": "string",
- "blockchain_transactions": [
- "string"
], - "blockchain_events": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}Update the endpoint routes of a product. For the MediLedger PVS product, endpoints are always Validation Endpoints, which are objects on the blockchain that encapsulate validation URLs.
A validation URL represents a MediLedger Private Node (or in some cases a Gateway Node) that can validate product information for a saleable return using MediLedger REST APIs.
Only manufacturers (not distributors) need to register an endpoint for a product. For every product spcified by its GTIN, the blockchain tells other MediLedger members which server to contact to validate serial numbers for that product.
| id required | string^gs1:es:01(\d{14})$|^ml:product:[0-9]+$ A product URI, which is |
Array of objects non-empty |
{- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string"
}
]
}{- "id": "string",
- "company_prefix": "string",
- "creator": "string",
- "display_name": "string",
- "gtin": "string",
- "gtin_length": 14,
- "item_reference": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "pending_endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "uris": [
- "string"
], - "transfer_pending": true,
- "transferring_to": "string",
- "owned": true,
- "owner": "string",
- "blockchain_transactions": [
- "string"
], - "blockchain_events": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}Get basic information of a product, specified by its Chronicled ID (which is unique to this Private Node) or its product URI (which includes its GTIN).
| product_uri required | string^gs1:es:01(\d{14})$|^ml:product:[0-9]+$ A product URI, which is |
string or Array of strings One or more fields to expand. By default some fields return only the ID to represent a business object. Use this parameter to request that the API return the entire object in JSON format instead. To expand more than one field, repeat the parameter in the query with different values. Refer to the enumeration types on this parameter for the list of supported fields that you can expand for this request. |
{- "id": "string",
- "company_prefix": "string",
- "creator": "string",
- "display_name": "string",
- "gtin": "string",
- "gtin_length": 14,
- "item_reference": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "pending_endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "uris": [
- "string"
], - "transfer_pending": true,
- "transferring_to": "string",
- "owned": true,
- "owner": "string",
- "blockchain_transactions": [
- "string"
], - "blockchain_events": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}Delete a product. You must currently own this product. Also, the product must NOT have been deleted before.
WARNING: It is unsupported to attempt delete a product more than once. Deleting an already-deleted product can result in unexpected behaviors or disruption to services.
| product_uri required | string^gs1:es:01(\d{14})$|^ml:product:[0-9]+$ A product URI, which is |
[- {
- "detail": [
- {
- "keyword": "pattern,",
- "dataPath": ".MyParameterName\"",
- "schemaPath": "#/properties/MyParameterName/pattern",
- "params": [
- {
- "pattern": "regular_expression_here"
}
], - "message": "Should match pattern \"regular_expression_here"
}
], - "error": "10001",
- "message": "Invalid Property"
}
]Get a list of your own organization's products that were previously deleted.
To page results, use the _page and _per_page
parameters.
This API does not support the expand parameter to look at the details of
the blockchain transactions and events. This API alwyas returns the
IDs only. If you want to see the whole object, use the /product/deleted/{product_uri} API to return a single product from its product URI.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
| gtin_prefix | string^[0-9]{0,14}$ Filters results only to products with this GTIN prefix. If omitted, no filtering on this criteria. |
[- {
- "blockchain_events": [
- "string"
], - "blockchain_transactions": [
- "string"
], - "created_at": "2019-08-24T14:15:22Z",
- "display_name": "string",
- "gtin": "string",
- "id": "string",
- "uris": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z"
}
]Get one of your own organization's products that was previously deleted, specified by its product URI.
| product_uri required | string^gs1:es:01(\d{14})$|^ml:product:[0-9]+$ A product URI, which is |
string or Array of strings One or more fields to expand. By default some fields return only the ID to represent a business object. Use this parameter to request that the API return the entire object in JSON format instead. To expand more than one field, repeat the parameter in the query with different values. Refer to the enumeration types on this parameter for the list of supported fields that you can expand for this request. |
{- "blockchain_events": [
- "string"
], - "blockchain_transactions": [
- "string"
], - "created_at": "2019-08-24T14:15:22Z",
- "display_name": "string",
- "gtin": "string",
- "id": "string",
- "uris": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z"
}Get information about public products, which are the set of products visible to all members and confirmed on the blockchain.
IMPORTANT: Unlike the GET /product request, a GET /public-product
request will never include pending products, error products, or
endpoint routes that were recently changed but are pending confirmation
on the blockchain.
To support paging results, see the _page and _per_page parameters.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
| gtin_prefix | string^[0-9]{0,14}$ Filters results to display public products only if the GTIN starts with this specified prefix. If omitted, no filtering. |
| in_network_product | boolean Filters results to only show products based on whether they are currently owned by a MediLedger member. If true, filters only to products owned by a MediLedger member. If false, filters only to products owned by an external VRS manufacturer. If omitted or null, no filtering occurs. |
[- {
- "id": "string",
- "creator": "string",
- "owner": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "blockchain_events": [
- "string"
], - "display_name": "string",
- "uris": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "in_network_product": true,
- "gtin": "string",
- "blockchain_status": "active",
- "transferring_to": "string"
}
]Get information about public products, which are the set of products visible to all members and confirmed on the blockchain.
IMPORTANT: Unlike the GET /product request, a GET /public-product
request will never include pending products, error products, or
endpoint routes that were recently changed but are pending confirmation
on the blockchain.
| _id required | string^[0-9a-km-zA-HJ-Z]{7}$ The Chronicled ID of the product to get. Note that unlike a product URI, a Chronicled ID is unique to this Private Node. |
{- "id": "string",
- "creator": "string",
- "owner": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "blockchain_events": [
- "string"
], - "display_name": "string",
- "uris": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "in_network_product": true,
- "gtin": "string",
- "blockchain_status": "active",
- "transferring_to": "string"
}Get information about a public product by its URI. Public products are the set of products visible to all members and confirmed on the blockchain.
IMPORTANT: Unlike the GET /product request, a GET /public-product
request will never include pending products, error products, or
endpoint routes that were recently changed but are pending confirmation
on the blockchain.
| product_uris required | string^gs1:es:01(\d{14})$|^ml:product:[0-9]+$ A unique URI for this product. You can pass a product URI (with |
{- "id": "string",
- "creator": "string",
- "owner": "string",
- "endpoint_routes": [
- {
- "endpoint_id": "string",
- "start_date": "string",
- "end_date": "string",
- "url": "string"
}
], - "blockchain_events": [
- "string"
], - "display_name": "string",
- "uris": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "in_network_product": true,
- "gtin": "string",
- "blockchain_status": "active",
- "transferring_to": "string"
}The Endpoint API manages a set of endpoints URLs that are registered on the blockchain.
For the MediLedger PVS product, endpoints are always Validation Endpoints, which are objects on the blockchain that encapsulate validation URLs. A validation URL represents a MediLedger Private Node (or in some cases a Gateway Node) that can validate product information for a saleable return using MediLedger REST APIs. This validation request includes a serial number (SGTIN), a product ID (a GTIN, which is embedded in the SGTIN), a lot number, and an expiration date. Note that only manufacturers (not distributors) need to register an endpoint.
If you are a manufacturer and want to register product IDs (GTINs),
you must first register a new endpoint URL in the blockchain using a POST request on the /endpoint resource. Temporarily it will be in status pending (and not yet on the blockchain) but eventually becomes status registered which means it is on the public blockchain. If then endpoint has status error, there were errors and it is not on the public blockchain.
The JSON result of creating a new MediLedger endpoint has an id
property that represents the unique ID for that endpoint. Use that
Endpoint ID for some other REST APIs. For example, when you want to
register a product ID (GTIN) on the blockchain, make a POST request to the /product endpoint and include that ID.
The endpoint APIs are grouped in two resources:
/endpoint — Manages the MediLedger endpoints
that your own company registered. Return results include endpoints that
you tried to create but are still pending or had errors.
/public-endpoint — Manages the MediLedger
endpoints that were successfully registered by any MediLedger member.
Use these APIs for testing or general information about other members of
the MediLedger peer-to-peer network.
Related REST API resources in other documents:
/product - Create a new product on the blockchain. Each
product is represented primarily by its GTIN, but is registered on the
blockchain along with the ID of a Validation Endpoint created by the
manufacturer. Manufacturers can register a new validation endpoint with
the /endpoint API.Returns
basic information about all MediLedger endpoints that your organization
has attempted to register. Includes endpoints that are still pending or
had errors during creation. Each result includes a status field that indicates whether the endpoint is still pending, successfully on the blockchain, or had errors during creation
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
[- {
- "id": "string",
- "url": "string",
- "blockchain_events": [
- "string"
], - "status": "pending",
- "member": "string",
- "blockchain_transactions": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "uris": [
- "string"
]
}
]Registers a new MediLedger endpoint for your company. Save the id
field from the result. An endpoint ID is necessary to pass to some
other APIs to represent this endpoint. For exampe, when creating a new
product with a POST /product request. The return result includes a status field that indicates whether the endpoint is still pending, successfully on the blockchain, or had errors during creation.
In the normal case, the endpoint URL would be to the api-server domain with no REST API specific suffix like /api/2.0. For example, https://api-server.mediledger.mycompany.com. However, you might use proxies that use domain names or URLs that forward connections to that URL, in which case your endpoint URL might look different and might use specific port numbers.
curl -X POST -H "Content-Type: application/json;charset=utf-8"
-H "$authtoken" \ -d '{"url":
"https://api-server.mediledger.example.com"}' \
https://api-server.mediledger.example.com/api/2.0/endpoint
It returns a JSON result such as:
{"updated_at":"2019-05-08T17:14:45.540Z",
"url":"https://api-server.mediledger.example.com", "status":"pending",
"blockchain_transactions":[], "created_at":"2019-05-08T17:14:45.539Z",
"id":"cxAgv1W", "member":"1",
"uris":["ml:endpoint:1:32a835a6b09d4033a2580f483292dd81"],
"blockchain_events":[]}
It is important to understand the URI in the response. Look at the first result in the uris property. The full value of that string is the URI for this endpoint. You can use that URI for other /endpoint requests, such as a GET /endpoint/{uri} request for information about the endpoint.
However, for the API that creates GTIN (POST /product),
you need to use only the endpoint URI part after the last colon as its
ID. In this example it is 32a835a6b09d4033a2580f483292dd81. Do not use
the entire URI for the endpoint ID in the POST /product request.
| url required | string\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d... The
endpoint URL. Generally speaking this should be to the api-server
domain and not including any REST API specific suffix like /api/2.0. For
example, |
{- "url": "string"
}{- "id": "string",
- "url": "string",
- "blockchain_events": [
- "string"
], - "status": "pending",
- "member": "string",
- "blockchain_transactions": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "uris": [
- "string"
]
}Returns basic information about a specific MediLedger endpoint that you created. The return result includes a status field that indicates whether the endpoint is still pending, successfully on the blockchain, or had errors during creation.
| uris required | string^.{0,100}$ The Chronicled ID for an endpoint. This is an integer value encoded as 7 digits of Base 59 text, which avoids inclusion of 1 and I (uppercase i) characters. |
{- "id": "string",
- "url": "string",
- "blockchain_events": [
- "string"
], - "status": "pending",
- "member": "string",
- "blockchain_transactions": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "uris": [
- "string"
]
}Updates an existing Endpoint that the company owns. Note that update requires a POST not a PUT request. PUT is unsupported.
The return result includes a status field that indicates whether the endpoint is still pending, successfully on the blockchain, or had errors during creation
| uris required | string^.{0,100}$ The Chronicled ID for an endpoint. This is an integer value encoded as 7 digits of Base 59 text, which avoids inclusion of 1 and I (uppercase i) characters. |
| url required | string\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d... |
{- "url": "string"
}{- "id": "string",
- "url": "string",
- "blockchain_events": [
- "string"
], - "status": "pending",
- "member": "string",
- "blockchain_transactions": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "uris": [
- "string"
]
}Returns information from the public blockchain about all MediLedger endpoints from all members. The list of public endpoints never includes endpoints that are still pending or had errors during creation.
IMPORTANT: Unlike the GET /endpoint request, a GET /public-endpoint
request will never include pending endpoints, error endpoints, or
endpoints that were recently changed but are pending confirmation on the
blockchain.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
[- {
- "id": "string",
- "member": "string",
- "url": "string",
- "blockchain_events": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "uris": [
- "string"
]
}
]Returns basic information about a specific public endpoint on the public blockchain. The endpoint is specified by URI. It can be from any MediLedger member.
IMPORTANT: Unlike the GET /endpoint request, a GET /public-endpoint
request will never include pending endpoints, error endpoints, or
endpoints that were recently changed but are pending confirmation on the
blockchain.
| uris required | string^.{0,100}$ The URI for an endpoint. |
{- "id": "string",
- "member": "string",
- "url": "string",
- "blockchain_events": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "uris": [
- "string"
]
}The blockchain APIs are advanced APIs intended only for advanced debugging. They are not intended for general use. Instead, use APIs that are specific to the type of object you are interested in, such as products, endpoints, or members.
Be aware that MediLedger blockchain APIs uses the term 'public'
slightly differently than some other Mediledger APIs. For blockchain
APIs, public means that the transaction is on the public
MediLedger blockchain at all. If it has not yet been added successfully
due to network or other issues, it will not yet appear in this list.
However, these APIs are unusual in that transactions will appear in this
public list when its status is either confirming or confirmed.
In contrast, most other MediLedger APIs have a concept of public data (such as the Public Product API), and those return records only if the status is confirmed. The status confirming means that at least one validating node on the network has confirmed the transaction, but it is not completely validated on the blockchain.
However, similar to other MediLedger APIs, for blockchain APIs, the term private means all transactions created by your organization, including transactions that are still pending, have error conditions, as well as transactions that are fully validated on the public blockchain.
Returns a list of all blocks. Pagination is supported. Filtering is unsupported.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
[- {
- "author": "string",
- "block_confirmations": 10000,
- "block_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "difficulty": "string",
- "extraData": "string",
- "gasLimit": 10000000000,
- "gasUsed": 10000000000,
- "hash": "string",
- "logsBloom": "string",
- "miner": "string",
- "network_name": "string",
- "number": 100,
- "parentHash": "string",
- "retracted": true,
- "sealer_name": {
- "address": "string",
- "metadata": [
- {
- "name": "string",
- "name_type": "contract-name",
- "account_type": "contract-name"
}
]
}, - "sealFields": [
- "string"
], - "sha3Uncles": "string",
- "signature": "string",
- "size": 10000,
- "stateRoot": "string",
- "step": 10000000000,
- "timestamp": 0,
- "totalDifficulty": "string",
- "transactions": [
- "string"
], - "transactionsRoot": "string",
- "uncles": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "validator_count": 100
}
]Returns a block, specified by its block number.
| number | string^[0-9]{0,9}$ The block number of the block to read. |
[- {
- "author": "string",
- "block_confirmations": 10000,
- "block_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "difficulty": "string",
- "extraData": "string",
- "gasLimit": 10000000000,
- "gasUsed": 10000000000,
- "hash": "string",
- "logsBloom": "string",
- "miner": "string",
- "network_name": "string",
- "number": 100,
- "parentHash": "string",
- "retracted": true,
- "sealer_name": {
- "address": "string",
- "metadata": [
- {
- "name": "string",
- "name_type": "contract-name",
- "account_type": "contract-name"
}
]
}, - "sealFields": [
- "string"
], - "sha3Uncles": "string",
- "signature": "string",
- "size": 10000,
- "stateRoot": "string",
- "step": 10000000000,
- "timestamp": 0,
- "totalDifficulty": "string",
- "transactions": [
- "string"
], - "transactionsRoot": "string",
- "uncles": [
- "string"
], - "updated_at": "2019-08-24T14:15:22Z",
- "validator_count": 100
}
]Returns a list of all available blockchains. For MediLedger PVS, there is always exactly one blockchain.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
[- {
- "description": "string",
- "network_name": "string",
- "parity_version": "string",
- "rpc_url": "string",
- "latest_confirmed_block_number": 0,
- "gcp_check_relaxed": true
}
]Returns a blockchain, specified by its network name. See related API to get the list of blockchains. For MediLedger PVS, there is always exactly one blockchain.
| network_name | string^.{0,100}$ The network name for the blockchain. |
{- "description": "string",
- "network_name": "string",
- "parity_version": "string",
- "rpc_url": "string",
- "latest_confirmed_block_number": 0,
- "gcp_check_relaxed": true
}Returns public transactions, inluding public data, decoded events, receipts, and traces.
Be aware that this API uses the word 'public' differently than some
other APIs. In this API context, public means that the transaction is on
the public MediLedger blockchain at all. If it has not yet been added
successfully due to network or other issues, it will not yet appear in
this list. However, this API is unusual in that transactions will appear
in this public list when its status is either confirming or confirmed. In contrast, several other MediLedger APIs have a concept of public data (such as the Public Product API), which return records only if the status is confirmed. The status confirming means that at least one validating node on the network has confirmed the transaction, but it is not completely validated on the blockchain.
For transactions that your organization initiated, the response includes private data in the private_data property. The private data object includes additional fields, such as the human-readable list of property changes in its decoded_params property.
In the response, an important value for each transaction is its receipt.transactionHash property, which contains what is called the transaction hash. Use it to lookup a specific transaction by its hash with the get a specific transaction API.
See also:
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
[- {
- "transaction_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "decoded_events": [
- {
- "params": [
- {
- "value": "string",
- "name": "string"
}
], - "name": "string",
- "contract_name": "string",
- "abi_name": "string"
}
], - "decoded_trace": [
- {
- "action": {
- "callType": "call",
- "from": {
- "metadata": [
- {
- "name": "string",
- "name_type": "contract-name",
- "account_type": "contract-name"
}
], - "address": "string"
}, - "gas": "string",
- "to": {
- "metadata": [
- {
- "name": "string",
- "name_type": "contract-name",
- "account_type": "contract-name"
}
], - "address": "string"
}, - "value": "string",
- "decoded_function": {
- "name": "string",
- "params": [
- {
- "name": "string",
- "value": "string"
}
]
}, - "contract_name": "string",
- "abi_name": "string"
}, - "result": {
- "gasUsed": "string",
- "output": "string"
}, - "subtraces": 100,
- "traceAddress": [
- 100
], - "type": "call"
}
], - "sender": {
- "metadata": [
- {
- "name": "string",
- "name_type": "contract-name",
- "account_type": "contract-name"
}
], - "address": "string"
}, - "destination": {
- "metadata": [
- {
- "name": "string",
- "name_type": "contract-name",
- "account_type": "contract-name"
}
], - "address": "string"
}, - "public_data": {
- "blockHash": "string",
- "blockNumber": "string",
- "chainId": "string",
- "condition": {
- "block": 0,
- "message": "string"
}, - "creates": "string",
- "from": "string",
- "gas": "string",
- "gasPrice": "string",
- "hash": "string",
- "input": "string",
- "nonce": "string",
- "publicKey": "string",
- "r": "string",
- "raw": "string",
- "retracted": true,
- "s": "string",
- "standardV": "string",
- "to": "string",
- "traces": {
- "output": "string",
- "trace": [
- {
- "action": {
- "callType": "call",
- "from": "string",
- "gas": "string",
- "input": "string",
- "to": "string",
- "value": "string"
}, - "result": {
- "gasUsed": "string",
- "output": "string"
}, - "subtraces": 100,
- "traceAddress": [
- "string"
], - "type": "call"
}
]
}, - "transactionIndex": "string",
- "v": "string",
- "value": "string"
}, - "private_data": {
- "transaction_id": "string",
- "block_number": "string",
- "context": {
- "name": "string",
- "product_id": "string"
}, - "contract_name": "string",
- "dashboard": {
- "transaction_object": "string",
- "transaction_type": "string"
}, - "decoded_params": [
- "string"
], - "function_name": "string",
- "network_name": "string",
- "status": "unsent",
- "status_history": [
- {
- "status": "unsent",
- "status_recorded_at": "2019-08-24T14:15:22Z"
}
], - "status_recorded_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "receipt": {
- "blockHash": "string",
- "blockNumber": "string",
- "contractAddress": "string",
- "cumulativeGasUsed": "string",
- "gasUsed": "string",
- "logs": [
- {
- "address": "string",
- "blockHash": "string",
- "blockNumber": "string",
- "data": "string",
- "logIndex": "string",
- "topics": [
- "string"
], - "transactionHash": "string",
- "transactionIndex": "string",
- "transactionLogIndex": "string"
}
], - "logsBloom": "string",
- "root": "string",
- "status": "string",
- "transactionHash": "string",
- "transactionIndex": "string"
}, - "trace": {
- "output": "string",
- "trace": [
- {
- "action": {
- "callType": "call",
- "from": "string",
- "gas": "string",
- "input": "string",
- "to": "string",
- "value": "string"
}, - "result": {
- "gasUsed": "string",
- "output": "string"
}, - "subtraces": 100,
- "traceAddress": [
- "string"
], - "type": "call"
}
]
}, - "protocol_primitive_label": "string",
- "retracted": true,
- "timestamp": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "confirmations": 100,
- "wrappers": [
- {
- "contractName": "string",
- "functionName": "string",
- "abiName": "string"
}
], - "primary_trace_index": "string",
- "id": "string"
}
]Returns a public transaction, specified by its transaction hash. To get a list of all transactions and their transaction hashes, see the get public transactions API. The response includes public data, decoded events, receipts, and traces.
Be aware that this API uses the word 'public' differently than some
other APIs. In this API context, public means that the transaction is on
the public MediLedger blockchain at all. If it has not yet been added
successfully due to network or other issues, it will not yet appear in
this list. However, this API is unusual in that transactions will appear
in this public list when its status is either confirming or confirmed. In contrast, several other MediLedger APIs have a concept of public data (such as the Public Product API), which return records only if the status is confirmed. The status confirming means that at least one validating node on the network has confirmed the transaction, but it is not completely validated on the blockchain.
For transactions that your organization initiated, the response includes private data (data from your organization) in the private_data property. This object includes additional fields such as the human-readable list of property changes in its decoded_params property.
| transaction_hash | string^[0-9a-fA-F]{1,1000}$ The transaction hash of the transaction to read. To get a list of all transactions and their transaction hashes, see the Get public transactions API. |
{- "transaction_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "decoded_events": [
- {
- "params": [
- {
- "value": "string",
- "name": "string"
}
], - "name": "string",
- "contract_name": "string",
- "abi_name": "string"
}
], - "decoded_trace": [
- {
- "action": {
- "callType": "call",
- "from": {
- "metadata": [
- {
- "name": "string",
- "name_type": "contract-name",
- "account_type": "contract-name"
}
], - "address": "string"
}, - "gas": "string",
- "to": {
- "metadata": [
- {
- "name": "string",
- "name_type": "contract-name",
- "account_type": "contract-name"
}
], - "address": "string"
}, - "value": "string",
- "decoded_function": {
- "name": "string",
- "params": [
- {
- "name": "string",
- "value": "string"
}
]
}, - "contract_name": "string",
- "abi_name": "string"
}, - "result": {
- "gasUsed": "string",
- "output": "string"
}, - "subtraces": 100,
- "traceAddress": [
- 100
], - "type": "call"
}
], - "sender": {
- "metadata": [
- {
- "name": "string",
- "name_type": "contract-name",
- "account_type": "contract-name"
}
], - "address": "string"
}, - "destination": {
- "metadata": [
- {
- "name": "string",
- "name_type": "contract-name",
- "account_type": "contract-name"
}
], - "address": "string"
}, - "public_data": {
- "blockHash": "string",
- "blockNumber": "string",
- "chainId": "string",
- "condition": {
- "block": 0,
- "message": "string"
}, - "creates": "string",
- "from": "string",
- "gas": "string",
- "gasPrice": "string",
- "hash": "string",
- "input": "string",
- "nonce": "string",
- "publicKey": "string",
- "r": "string",
- "raw": "string",
- "retracted": true,
- "s": "string",
- "standardV": "string",
- "to": "string",
- "traces": {
- "output": "string",
- "trace": [
- {
- "action": {
- "callType": "call",
- "from": "string",
- "gas": "string",
- "input": "string",
- "to": "string",
- "value": "string"
}, - "result": {
- "gasUsed": "string",
- "output": "string"
}, - "subtraces": 100,
- "traceAddress": [
- "string"
], - "type": "call"
}
]
}, - "transactionIndex": "string",
- "v": "string",
- "value": "string"
}, - "private_data": {
- "transaction_id": "string",
- "block_number": "string",
- "context": {
- "name": "string",
- "product_id": "string"
}, - "contract_name": "string",
- "dashboard": {
- "transaction_object": "string",
- "transaction_type": "string"
}, - "decoded_params": [
- "string"
], - "function_name": "string",
- "network_name": "string",
- "status": "unsent",
- "status_history": [
- {
- "status": "unsent",
- "status_recorded_at": "2019-08-24T14:15:22Z"
}
], - "status_recorded_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "receipt": {
- "blockHash": "string",
- "blockNumber": "string",
- "contractAddress": "string",
- "cumulativeGasUsed": "string",
- "gasUsed": "string",
- "logs": [
- {
- "address": "string",
- "blockHash": "string",
- "blockNumber": "string",
- "data": "string",
- "logIndex": "string",
- "topics": [
- "string"
], - "transactionHash": "string",
- "transactionIndex": "string",
- "transactionLogIndex": "string"
}
], - "logsBloom": "string",
- "root": "string",
- "status": "string",
- "transactionHash": "string",
- "transactionIndex": "string"
}, - "trace": {
- "output": "string",
- "trace": [
- {
- "action": {
- "callType": "call",
- "from": "string",
- "gas": "string",
- "input": "string",
- "to": "string",
- "value": "string"
}, - "result": {
- "gasUsed": "string",
- "output": "string"
}, - "subtraces": 100,
- "traceAddress": [
- "string"
], - "type": "call"
}
]
}, - "protocol_primitive_label": "string",
- "retracted": true,
- "timestamp": 0,
- "updated_at": "2019-08-24T14:15:22Z",
- "confirmations": 100,
- "wrappers": [
- {
- "contractName": "string",
- "functionName": "string",
- "abiName": "string"
}
], - "primary_trace_index": "string",
- "id": "string"
}Returns all private transactions, with optional filtering by status.
To support pagination of results, see the _page and _per_page parameters.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
string or Array of strings Filters the results to only transactions with the status as specified in this parameter. You can pass either:
Note: In the HTML documentation, click the parameter name to view all status values. |
[- {
- "message_id": "string",
- "tenant_id": "string",
- "transaction_id": "string",
- "context": {
- "name": "string",
- "product_id": "string"
}, - "contract_name": "string",
- "dashboard": {
- "transaction_object": "string",
- "transaction_type": "string"
}, - "decoded_params": [
- "string"
], - "data": "string",
- "from": "string",
- "function_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "gasPrice": "string",
- "input_params": [
- 100
], - "network_name": "string",
- "sent_transactions": [
- {
- "doc_id": "string",
- "hash": "string",
- "nonce": "string",
- "transaction_id": "string",
- "status": "unsent",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "status": "unsent",
- "status_history": [
- {
- "status": "unsent",
- "status_recorded_at": "2019-08-24T14:15:22Z"
}
], - "status_recorded_at": "2019-08-24T14:15:22Z",
- "to": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "value": "string",
- "wrappers": [
- {
- "contractName": "string",
- "functionName": "string",
- "abiName": "string"
}
], - "id": "string"
}
]Returns a private transaction, specified by its transaction ID. In this context, private means all transactions created by your organization, including transactions that may be pending, have error conditions, as well as ones that are confirmed on the public blockchain.
See also:
confirmed (fully validated) but also those with status confirming, which means that at least one validator has confirmed it but it is not fully confirmed.| transaction_id | string The transaction ID of the transaction to get. Each transaction ID was created by the current Private Node (or Gateway Node). It is valid only on the current MediLedger node. It has no meaning on other nodes. The format is 7 characters in Base59 encoding, which avoids inclusion of 1 and I (uppercase i) characters. |
{- "message_id": "string",
- "tenant_id": "string",
- "transaction_id": "string",
- "context": {
- "name": "string",
- "product_id": "string"
}, - "contract_name": "string",
- "dashboard": {
- "transaction_object": "string",
- "transaction_type": "string"
}, - "decoded_params": [
- "string"
], - "data": "string",
- "from": "string",
- "function_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "gasPrice": "string",
- "input_params": [
- 100
], - "network_name": "string",
- "sent_transactions": [
- {
- "doc_id": "string",
- "hash": "string",
- "nonce": "string",
- "transaction_id": "string",
- "status": "unsent",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "status": "unsent",
- "status_history": [
- {
- "status": "unsent",
- "status_recorded_at": "2019-08-24T14:15:22Z"
}
], - "status_recorded_at": "2019-08-24T14:15:22Z",
- "to": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "value": "string",
- "wrappers": [
- {
- "contractName": "string",
- "functionName": "string",
- "abiName": "string"
}
], - "id": "string"
}Retry a failed transaction that was initated by the current MediLedger member.
If the current organization did not initiate this transaction, this request fails with a HTTP 409 response code.
| transaction_id | string^[0-9a-km-zA-HJ-Z]{7}$ The transaction ID of the transaction to retry. Each transaction ID was created by the current Private Node (or Gateway Node). It is valid only on the current MediLedger node. It has no meaning on other nodes. The format is 7 characters in Base59 encoding, which avoids inclusion of 1 and I (uppercase i) characters. |
{- "transaction_id": "string",
- "block_number": "string",
- "context": {
- "name": "string",
- "product_id": "string"
}, - "contract_name": "string",
- "error_history": [
- "string"
], - "dashboard": {
- "transaction_object": "string",
- "transaction_type": "string"
}, - "data": "string",
- "from": "string",
- "function_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "gasPrice": "string",
- "decoded_params": [
- "string"
], - "network_name": "string",
- "status": "unsent",
- "status_history": [
- {
- "status": "unsent",
- "status_recorded_at": "2019-08-24T14:15:22Z"
}
], - "status_recorded_at": "2019-08-24T14:15:22Z",
- "to": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "value": "string",
- "wrappers": [
- {
- "contractName": "string",
- "functionName": "string",
- "abiName": "string"
}
], - "gas": "string",
- "confirmations": 100,
- "error": "string"
}Returns a list of all smart contract events.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
[- {
- "contract_event_id": "string",
- "address": "string",
- "blockHash": "string",
- "blockNumber": 100,
- "contract_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "decoded_params": [
- "string"
], - "event_name": "CertificateUpdated",
- "network_name": "string",
- "topics": [
- "string"
], - "transactionHash": "string",
- "transactionIndex": "string",
- "transactionLogIndex": 10000,
- "updated_at": "2019-08-24T14:15:22Z",
- "id": "string"
}
]Returns a smart contract event, specified by its ID.
To get a list of all smart contract events, see the main GET /contract-event request.
| id | string^[0-9a-km-zA-HJ-Z]{7}$ The ID of the smart contract event. Each ID was created by the current Private Node (or Gateway Node). It is valid only on the current MediLedger node. It has no meaning on other nodes. The format is 7 characters in Base59 encoding, which avoids inclusion of 1 and I (uppercase i) characters. |
{- "contract_event_id": "string",
- "address": "string",
- "blockHash": "string",
- "blockNumber": 100,
- "contract_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "decoded_params": [
- "string"
], - "event_name": "CertificateUpdated",
- "network_name": "string",
- "topics": [
- "string"
], - "transactionHash": "string",
- "transactionIndex": "string",
- "transactionLogIndex": 10000,
- "updated_at": "2019-08-24T14:15:22Z",
- "id": "string"
}For the MediLedger PVS product, an asset represents a sellable unit of pharamaceutical product. An asset has a product ID (called a GTIN) and a serial number. The GTIN and the serial number are combined into a single code called an SGTIN, with the GTIN as the prefix. A verification request for an asset involves using REST APIs on a MediLedger Private Node. A verification lookup for a saleable return uses the following input data:
The SGTIN (the product code and serial number)
The lot number
The expiration date
Unlike the product IDs (GTINs), serial numbers are not stored on the blockchain. For production use, a manufacturer's MediLedger Private Node (or the manufacturer's service provider Private Node) queries an external system that is sometimes referred to as an Electronic Product Code Information Services (EPCIS) server. If the manufacturer EPCIS system does not already publish a REST API that conforms to the standard GS1 interface, the manufacturer must create middleware that the MediLedger Private Node can call to query the EPCIS system. For the format of the expected REST API and more information about registering an EPCIS system, refer to the EPCIS Integration tab in this documentation.
For testing only, there are MediLedger Private Node
REST APIs that you can use to create assets to the Private Node's
internal MongoDB database. These APIs have the /asset
prefix. When doing a verification lookup, your own Private Node would
first look for the asset in its internal MongoDB database. This can be
useful if you want to test asset verifications with serial numbers but
do not yet have an EPCIS integration set up. If an asset is found
locally, the verification request succeeds and does not need to call out
to an external EPCIS system. To add an asset to the internal Mongo
database, make a POST /asset request to the MediLedger Private Node.
For production verification requests as part of integration between
your own ERP or warehouse system and a MediLedger Private Node (or a
solution provider's Private Node), make a GET /verify/gtin/{gtin}/lot/{lot}/ser/{ser}
request, which is documented in the Verifications tab of this
documentation. For external VRS integration with a MediLedger Gateway
Node, make a GET /verify/gtin/{gtin}/lot/{lot}/ser/{serialnumber}
request, which is documented in the VRS Gateway tab of this
documentation.
View all assets that are stored locally on this Private Node. You can optionally filter the results by GTIN prefix.
If there are zero results, the response uses HTTP code 200 and returns an empty array of results (not an error code).
To support paging results, see the _page and _per_page parameters.
IMPORTANT: The /asset REST APIs for storing and retrieving assets in the local database on this Private Node are for testing only.
For production use by a manufacturer, the MediLedger application would
call out to your EPCIS server or middleware that talks to your EPCIS
server. For details, see the EPCIS Integration tab in this
documentation. To verify an asset from your own ERP or warehouse system
to your MediLedger Private Node (or your solution provider's Private
Node), make a GET /verify/gtin/{gtin}/lot/{lot}/ser/{ser} request. For details, see the Verifications tab of this documentation.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
| uses_template | boolean INTERNAL. Do not use. |
| serial_number_prefix | string^.{0,100}$ If |
[- {
- "urn_identities": [
- "string"
], - "gtin": "string",
- "serial_number": "string",
- "properties": {
- "Expiration Date": "string",
- "Lot Number": "string"
}, - "manufacturer": {
- "name": "string",
- "uris": [
- "string"
]
}, - "product": {
- "display_name": "string",
- "gtin": "string",
- "json_schema": { },
- "shared_properties": { }
}, - "archived": true,
- "registered": true,
- "private_data": { },
- "custodian": {
- "name": "string",
- "uris": [
- "string"
]
}, - "custodian_id": "string",
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "template_name": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
]Creates an asset based on the serial number, product ID (GTIN), lot number, and expiration date. This information is stored in the local database on this Private Node only. It is not stored on the blockchain.
IMPORTANT: The MediLedger REST APIs for storing and retrieving assets in the local database on this Private Node are for testing only. For production use by a manufacturer, the MediLedger application would call out to your EPCIS server or middleware that talks to your EPCIS server. For the format of the expected REST API and more information about registering an EPCIS system to handle specific ranges of GTINs, refer to the EPCIS Integration tab in this documentation.
| serial_number required | string^[0-9a-zA-Z]{1,20}$ A serial number. 1-20 alphanumeric characters. |
required | object This object encapsulates asset properties such as expiry date and lot number. |
| gtin required | string^\d{14}$ A product ID that conforms to the GS1 GTIN-14 standard. Format is 14 numeric digits, including a checksum digit. |
{- "serial_number": "string",
- "properties": {
- "Expiration Date": "string",
- "Lot Number": "string"
}, - "gtin": "string"
}{- "urn_identities": [
- "string"
], - "gtin": "string",
- "serial_number": "string",
- "properties": {
- "Expiration Date": "string",
- "Lot Number": "string"
}, - "custodian_id": "string",
- "archived": true,
- "registered": true,
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "template_name": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}View a locally-stored asset, which is specified by its ID. This asset information is queried only in the local database on this Private Node only. The server does not use the blockchain or an external EPCIS server to service this request.
If the asset cannot be found, the response is HTTP code 404.
IMPORTANT: The MediLedger REST APIs for storing and retrieving assets in the local database on this Private Node are for testing only.
| asset_uri required | string^(gs1:es:01[0-9]{14}21[0-9a-zA-Z]{1,20}|urn:e... An asset URI, which can take one of two forms:
|
| expand | string Value: "transfers" By
default, there are result fields that include only the ID not the full
object, but the OpenAPI schema for the field in results permits
returning the full object instead. You can use the For this request, the only valid value is |
{- "urn_identities": [
- "string"
], - "gtin": "string",
- "serial_number": "string",
- "properties": {
- "Expiration Date": "string",
- "Lot Number": "string"
}, - "manufacturer": {
- "name": "string",
- "uris": [
- "string"
]
}, - "product": {
- "display_name": "string",
- "gtin": "string",
- "json_schema": { },
- "shared_properties": { }
}, - "archived": true,
- "registered": true,
- "private_data": { },
- "custodian": {
- "name": "string",
- "uris": [
- "string"
]
}, - "custodian_id": "string",
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "template_name": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}Verify an asset exists and gets its properties. This is intended for customers who are using the /asset
REST APIs to get information from the local database about assets that
were manually added using the REST APIs, typically for testing purposes.
This does a full product verification, similar to the GS1 API, GET /verify/gtin/{gtin}/lot/{lot}/ser/{ser}.
In both cases, the server will find any (for testing only) assets
stored locally, and will call out to the manufacturer Private Node or
EPCIS servers as appropraite.
Differences between this API and the GS1 API include:
The response codes are different. A well formed response to this API returns response code 201 not 200.
The response JSON formats are different.
This is a MediLedger specific API that requires the /api/2.0 URL prefix. In contrast, the GS1 API requires that you omit the URL prefix.
IMPORTANT: The MediLedger REST APIs for storing and retrieving assets in the local database on this Private Node are for testing only. For production use by a manufacturer, the MediLedger application would call out to your EPCIS server or middleware that talks to your EPCIS server. For the format of the expected REST API and more information about registering an EPCIS system to handle specific ranges of GTINs, refer to the EPCIS Integration tab in this documentation.
| asset_uri required | string^(gs1:es:01[0-9]{14}21[0-9a-zA-Z]{1,20}|urn:e... The URI of the Asset |
| ATP-Authorization | string Verification Credential authorization header from client. |
required | object |
{- "data": {
- "Lot Number": "string",
- "Expiration Date": "string",
- "ctrlPossessAtt": "true",
- "context": "dscsaSaleableReturn"
}
}{- "uri": "string",
- "requestorGln": "string",
- "correlationGuid": "string",
- "data": {
- "Expiration Date": "string",
- "Lot Number": "string"
}, - "vrsResponse": null,
- "response_time_ms": 10000000000
}Get a list of all users. There is no support for filtering.
[- {
- "user_id": "string",
- "id": null,
- "created_at": "2019-08-24T14:15:22Z",
- "current_login": "2019-08-24T14:15:22Z",
- "current_login_address": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
- "email": "string",
- "group_ids": [
- "string"
], - "groups": [
- {
- "description": "string",
- "group_id": "string",
- "name": "string",
- "role": "user"
}
], - "last_login": "2019-08-24T14:15:22Z",
- "last_login_address": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
- "last_password_change": "2019-08-24T14:15:22Z",
- "seenSuggested": true,
- "updated_at": "2019-08-24T14:15:22Z"
}
]Create a new user account on the tenant that you used to authenticate.
| password required | string^.{1,100000}$ Password. Maximum 100000 characters. |
| email required | string^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-... Email address. |
| name | string^.{0,100}$ User name. Maximum 100 characters |
{- "password": "string",
- "email": "string",
- "name": "string"
}{- "chronicled_id": "string",
- "email": "string",
- "id_token": "string",
- "name": "string"
}Changes a user password. Users can change their own password, and administrators can change the password for other users.
| user_id required | string^[0-9a-km-zA-HJ-Z]{7}$ User ID. On a multi-tenant system, the user ID must represent a user on the tenant that you used to authenticate |
| old_password required | string^.{1,100000}$ Old password |
| new_password required | string^.{1,100000}$ New password |
{- "old_password": "string",
- "new_password": "string"
}{- "user_id": "string",
- "last_password_change": "2019-08-24T14:15:22Z"
}Generates a reset password link for a user.
| email required | string^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-... Email address of the account to reset. |
{- "email": "string"
}{- "url": "string"
}Allows an admin to disable a user.
| user_id required | string^[0-9a-km-zA-HJ-Z]{7}$ User ID. The format is 7 characters in Base59 encoding. |
{- "user_id": "string"
}{- "user_id": "string"
}Resets a user password. Users can reset their own password. administrators can reset other user passwords. On a multi-tenant system, the user ID must correspond to a user on the current tenant.
| user_id required | string^[0-9a-km-zA-HJ-Z]{7}$ User ID |
| hash required | string^[0-9a-fA-F]{1,1000}$ Single-use cryptographic hash to use just for this reset password request. |
| new_password required | string^.{1,100000}$ New password. See the email settings object for details about restrictions for new passwords. |
{- "new_password": "string"
}{- "user_id": "string"
}Get a set of password settings from the server. The settings vary from server to server
{- "min_length": 1,
- "max_length": 2,
- "require_uppercase": true,
- "require_lowercase": true,
- "require_number": true,
- "require_non_alphanumeric": true,
- "enable_password_expiration": true,
- "password_expiration_period_days": 0,
- "allowed_login_attempts": 0,
- "prevent_password_reuse": true,
- "number_of_passwords_to_remember": 0
}Allows clients to get the information of a specific User.
| user_id required | string^[0-9a-km-zA-HJ-Z]{7}$ ID of the user profile to get |
{- "updated_at": "2019-08-24T14:15:22Z",
- "user_id": "string",
- "email": "string",
- "last_password_change": "2019-08-24T14:15:22Z",
- "name": "string",
- "group_ids": [
- "string"
], - "seenSuggested": true,
- "created_at": "2019-08-24T14:15:22Z",
- "current_login_address": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
- "groups": [
- {
- "description": "string",
- "group_id": "string",
- "name": "string",
- "role": "user"
}
], - "current_login": "2019-08-24T14:15:22Z",
- "last_login": "2019-08-24T14:15:22Z",
- "last_login_address": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
- "id": "string"
}Allows administrators to delete a User account.
| user_id required | string^[0-9a-km-zA-HJ-Z]{7}$ ID of the user to delete |
{- "updated_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "user_id": "string",
- "email": "string",
- "name": "string",
- "last_password_change": "2019-08-24T14:15:22Z",
- "roles": [
- "user"
], - "seenSuggested": true,
- "created_at": "2019-08-24T14:15:22Z"
}Allows clients to view basic information about all Invitations they have within the Chronicled system.
| user_id required | string^[0-9a-km-zA-HJ-Z]{7}$ User ID |
[- {
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "invitation_id": "string",
- "email": "string",
- "group_id": "string",
- "user_id": "string",
- "group": {
- "name": "string",
- "description": "string"
}, - "user": {
- "user_id": "string",
- "email": "string",
- "name": "string"
}, - "invitation": {
- "email": "string",
- "name": "string",
- "group_id": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "role": "user"
}
}
]Allows clients to view basic information about an Invitation.
| user_id required | string^[0-9a-km-zA-HJ-Z]{7}$ User ID |
| invitation_id required | string^[0-9a-km-zA-HJ-Z]{7}$ Invitation ID |
{- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "invitation_id": "string",
- "email": "string",
- "group_id": "string",
- "user_id": "string",
- "group": {
- "name": "string",
- "description": "string"
}, - "user": {
- "user_id": "string",
- "email": "string",
- "name": "string"
}, - "invitation": {
- "email": "string",
- "name": "string",
- "group_id": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "role": "user"
}
}Allows a user to accept an invitation he has been sent for a Group.
| user_id required | string^[0-9a-km-zA-HJ-Z]{7}$ User ID |
| invitation_id required | string^[0-9a-km-zA-HJ-Z]{7}$ Invitation ID |
{- "invitation_id": "string",
- "group_id": "string",
- "added_user": {
- "user_id": "string",
- "email": "string",
- "role": "user"
}, - "group": {
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "name": "string",
- "description": "string",
- "created_by": "string",
- "group_id": "string",
- "roles": [
- [
- "write:*",
- "read:endpoints",
- "write:endpoints",
- "write:endpoints/*",
- "write:endpoints/* read:users",
- "write:endpoints/* read:users read:blockchains"
]
], - "invited_members": [
- {
- "name": "string",
- "email": "string",
- "role": "user"
}
], - "admin_ids": [
- "string"
], - "user_ids": [
- "string"
]
}
}Allows removing an existing invitation to a Group.
| user_id required | string^[0-9a-km-zA-HJ-Z]{7}$ User ID |
| invitation_id required | string^[0-9a-km-zA-HJ-Z]{7}$ Invitation ID |
{- "invitation_id": "string",
- "group_id": "string",
- "added_user": {
- "user_id": "string",
- "email": "string"
}, - "group": {
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "name": "string",
- "description": "string",
- "created_by": "string",
- "group_id": "string",
- "roles": [
- [
- "write:*",
- "read:endpoints",
- "write:endpoints",
- "write:endpoints/*",
- "write:endpoints/* read:users",
- "write:endpoints/* read:users read:blockchains"
]
], - "invited_members": [
- {
- "name": "string",
- "email": "string",
- "role": "user"
}
], - "admin_ids": [
- "string"
], - "user_ids": [
- "string"
]
}
}Allows clients to view basic information about all Groups within the MediLedger system.
[- {
- "id": "string",
- "group_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "group": {
- "roles": [
- "string"
], - "description": "string",
- "created_by": "string",
- "name": "string"
}
}
]Allows a user who is not registered under a Group to create one
| name required | string^.{0,100}$ Medium string, maximum 100 characters. |
| roles required | Array of strings Items Enum: "user" "admin" |
| description | string^.{0,100}$ Medium string, maximum 100 characters. |
| user_ids | Array of strings |
| admin_ids | Array of strings |
| add_self_as_admin | boolean |
{- "name": "string",
- "roles": [
- "user"
], - "description": "string",
- "user_ids": [
- "string"
], - "admin_ids": [
- "string"
], - "add_self_as_admin": true
}{- "created_by": "string",
- "group": {
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "name": "string",
- "description": "string",
- "created_by": "string",
- "group_id": "string",
- "roles": [
- [
- "write:*",
- "read:endpoints",
- "write:endpoints",
- "write:endpoints/*",
- "write:endpoints/* read:users",
- "write:endpoints/* read:users read:blockchains"
]
], - "invited_members": [
- {
- "name": "string",
- "email": "string",
- "role": "user"
}
], - "admin_ids": [
- "string"
], - "user_ids": [
- "string"
]
}
}Allows clients to view basic information about a specific group.
| group_id required | string^[0-9a-km-zA-HJ-Z]{7}$ Group ID |
{- "id": "string",
- "group_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "group": {
- "roles": [
- "string"
], - "description": "string",
- "created_by": "string",
- "name": "string"
}
}Allows an admin of a group to update an existing group.
| group_id required | string^[0-9a-km-zA-HJ-Z]{7}$ Group ID |
| name | string^.{0,100}$ Medium string, maximum 100 characters. |
| description | string^.{0,1000}$ Large string, maximum 1,000 characters. |
| user_ids | Array of strings |
| admin_ids | Array of strings |
| roles | Array of strings Items Enum: "user" "admin" |
{- "name": "string",
- "description": "string",
- "user_ids": [
- "string"
], - "admin_ids": [
- "string"
], - "roles": [
- "user"
]
}{- "group": {
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "name": "string",
- "description": "string",
- "created_by": "string",
- "group_id": "string",
- "roles": [
- [
- "write:*",
- "read:endpoints",
- "write:endpoints",
- "write:endpoints/*",
- "write:endpoints/* read:users",
- "write:endpoints/* read:users read:blockchains"
]
], - "invited_members": [
- {
- "name": "string",
- "email": "string",
- "role": "user"
}
], - "admin_ids": [
- "string"
], - "user_ids": [
- "string"
]
}
}Allows a group admin to invite a new member to the group.
| group_id required | string^[0-9a-km-zA-HJ-Z]{7}$ Group ID |
| email required | string^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-... Email address. |
| name | string^.{0,100}$ Medium string, maximum 100 characters. |
| group_id | string^[0-9a-km-zA-HJ-Z]{7}$ The Chronicled ID for this object. The Chronicled ID was created by the current Private Node (or Gateway Node). It is valid only on the current node and has no meaning on other nodes. A Chronicled ID has 7 characters in Base59 encoding, which avoids characters 1 and I (uppercase i). |
| role | string Enum: "user" "admin" The user role assigned within this group, either |
{- "email": "string",
- "name": "string",
- "group_id": "string",
- "role": "user"
}{- "invited_member": {
- "name": "string",
- "group_id": "string",
- "email": "string",
- "role": "user"
}, - "group": {
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "name": "string",
- "description": "string",
- "created_by": "string",
- "group_id": "string",
- "roles": [
- [
- "write:*",
- "read:endpoints",
- "write:endpoints",
- "write:endpoints/*",
- "write:endpoints/* read:users",
- "write:endpoints/* read:users read:blockchains"
]
], - "invited_members": [
- {
- "name": "string",
- "email": "string",
- "role": "user"
}
], - "admin_ids": [
- "string"
], - "user_ids": [
- "string"
]
}
}Allows a group admin to un-invite a user.
| group_id required | string^[0-9a-km-zA-HJ-Z]{7}$ Group ID |
| invitation_id required | string^[0-9a-km-zA-HJ-Z]{7}$ Invitation ID |
{- "invitation_id": "string",
- "group_id": "string",
- "added_user": {
- "user_id": "string",
- "email": "string"
}, - "group": {
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "name": "string",
- "description": "string",
- "created_by": "string",
- "group_id": "string",
- "roles": [
- [
- "write:*",
- "read:endpoints",
- "write:endpoints",
- "write:endpoints/*",
- "write:endpoints/* read:users",
- "write:endpoints/* read:users read:blockchains"
]
], - "invited_members": [
- {
- "name": "string",
- "email": "string",
- "role": "user"
}
], - "admin_ids": [
- "string"
], - "user_ids": [
- "string"
]
}
}Allows an group admin to remove a user from the group.
| group_id required | string^[0-9a-km-zA-HJ-Z]{7}$ Group ID |
| user_id required | string^[0-9a-km-zA-HJ-Z]{7}$ User ID |
{- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "name": "string",
- "description": "string",
- "created_by": "string",
- "group_id": "string",
- "roles": [
- [
- "write:*",
- "read:endpoints",
- "write:endpoints",
- "write:endpoints/*",
- "write:endpoints/* read:users",
- "write:endpoints/* read:users read:blockchains"
]
], - "invited_members": [
- {
- "name": "string",
- "email": "string",
- "role": "user"
}
], - "admin_ids": [
- "string"
], - "user_ids": [
- "string"
]
}Allows an admin of a group to promote another user to the role of admin within that group.
| group_id required | string^[0-9a-km-zA-HJ-Z]{7}$ Group ID |
| user_id required | string^[0-9a-km-zA-HJ-Z]{7}$ The Chronicled ID for this object. The Chronicled ID was created by the current Private Node (or Gateway Node). It is valid only on the current node and has no meaning on other nodes. A Chronicled ID has 7 characters in Base59 encoding, which avoids characters 1 and I (uppercase i). |
{- "user_id": "string"
}{- "invited_members": {
- "name": "string",
- "email": "string",
- "role": "user"
}, - "admin_ids": [
- "string"
], - "user_ids": [
- "string"
], - "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "roles": [
- [
- "write:*",
- "read:endpoints",
- "write:endpoints",
- "write:endpoints/*",
- "write:endpoints/* read:users",
- "write:endpoints/* read:users read:blockchains"
]
], - "name": "string",
- "description": "string",
- "created_by": "string"
}The Member Component API manages MediLedger members from information registered on the blockchain.
Returns basic information about all Mediledger members. There is no filtering. Return results in pages by passing the _page and _perPage parameters. For information about a specific member specified by ID, see the other GET request that takes an id parameter.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
[- {
- "id": "string",
- "account_address": "string",
- "blockchain_events": [
- "string"
], - "created_at": "2019-08-24T14:15:22Z",
- "gcp_check_relaxed": true,
- "name": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "uris": [
- "string"
], - "certificate_hash": "string",
- "certificate_pem": "string",
- "blockchain_status": "active"
}
]Returns basic information of a Mediledger member.
| uri required | string^gs1:company-prefix:[0-9]{4,12}$|^ml:member:[... A unique identifier for a specific MediLedger member. Specify the |
{- "id": "string",
- "account_address": "string",
- "blockchain_events": [
- "string"
], - "created_at": "2019-08-24T14:15:22Z",
- "gcp_check_relaxed": true,
- "name": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "uris": [
- "string"
], - "certificate_hash": "string",
- "certificate_pem": "string",
- "blockchain_status": "active"
}This is an internal API. Do not use.
Get information about your own organization.
For reading information about other MediLedger members, use /members requests not /organization.
{- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "member": {
- "account_address": "string",
- "certificate_der": "string",
- "uris": [
- "string"
], - "network_name": "string",
- "permissions": "string",
- "name": "string"
}, - "organization": {
- "blockchain_status": "pending",
- "member_id": "string",
- "identity_uris": [
- "string"
], - "website": "string",
- "description": "string",
- "organization_type": "gateway",
- "name": "string"
}
}Get
a summary of product verification requests and responses for your
organization. The Web Dashboard uses this API to summarize verification
statistics. Optionally filter results those with start time after a
specified date/time by setting the from paramater.
The results JSON object aggregates statistics separately for requests
and for responses as separate subobjects. Each subobject includes the
number of success connections, failure connections, and the total (the
sum of success and failure). For requests, the average time in
milliseconds is included.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
| from | string <date-time> Filter the results to those with a start date of the requested date/time or later. |
{- "requests": {
- "average_verification_time_ms": 0,
- "connection_error": 0,
- "not_verified": 0,
- "total": 0,
- "verified": 0,
- "verified_with_info": 0
}, - "responses": {
- "connection_error": 0,
- "not_verified": 0,
- "total": 0,
- "verified": 0,
- "verified_with_info": 0
}
}Get
all product verification requests (VRS) that were initiated from your
organization. The list includes requests that failed due to errors. You
can filter results by the start time after a specified date/time (the from parameter) and by the minimum response time (the min_response_time_ms parameter))
To support paging results, see the _page and _per_page parameters.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
(string or null) or Array of strings Filter the results by the VRS record | |
string or Array of strings Filter the results by the VRS request connection status:
| |
| from | string <date-time> Filter the results to those with a start date of the requested date/time or later. |
| labeler_code | string^[0-9]{0,9}$ FDA labeler code |
| min_response_time_ms | string^[0-9]{0,9}$ Filter the results to those with a specified response time (in milliseconds) or longer duration. |
| responder_id | string^[0-9a-km-zA-HJ-Z]{7}$ The ID of the verification request's responder |
| verified | boolean Filters the results by the VRS record |
| vrs_name | string^.{0,1000}$ The name of the node responding to the verification request |
[- {
- "additional_info": "string",
- "correlation_guid": "string",
- "connection_status": "PVSError",
- "created_at": "2019-08-24T14:15:22Z",
- "data": {
- "Expiration Date": "string",
- "Lot Number": "string"
}, - "gtin": "string",
- "responder_gln": "string",
- "p2p_responder_prefix": "string",
- "response_time_ms": 10000000000,
- "p2p_responder": {
- "id": "string",
- "contractAddress": "string",
- "certificate_pem": "string",
- "certificate_hash": "string",
- "certificate_der": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "permissions": "string",
- "network_name": "string",
- "name": "string",
- "member_id": "string",
- "contract_event_id": "string",
- "uris": [
- "string"
]
}, - "serial_number": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "uri": "string",
- "verified": true,
- "verified_info": "string",
- "labeler_code": "string",
- "responder_name": "string",
- "vrs_name": "string"
}
]Get all the distinct values for labeler codes and VRS names from the entire set of VRS request records in the server's database. This API is useful to populate user interface pickers for optional filtering by these values.
{- "labeler_code": [
- "string"
], - "vrs_name": [
- "string"
]
}Get all VRS requests that were initiated from your organization and also relate to a particular correlation GUID.
To support paging results, see the _page and _per_page parameters.
| correlation_guid required | string^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4{1}[a-fA-F0-9... Correlation
GUID, which is an ID that links peristent data related to both the
request and response for a saleable return verification request. The
format is hexadecimal digits and hyphens in the following format: <8
chars>-<4 chars>-<4 chars>-<4 chars>-<12
chars>. Both lowercase a-f and uppercase A-F are supported. For
example: |
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
{- "additional_info": "string",
- "correlation_guid": "string",
- "connection_status": "PVSError",
- "created_at": "2019-08-24T14:15:22Z",
- "data": {
- "Expiration Date": "string",
- "Lot Number": "string"
}, - "gtin": "string",
- "responder_gln": "string",
- "p2p_responder_prefix": "string",
- "response_time_ms": 10000000000,
- "p2p_responder": {
- "id": "string",
- "contractAddress": "string",
- "certificate_pem": "string",
- "certificate_hash": "string",
- "certificate_der": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "permissions": "string",
- "network_name": "string",
- "name": "string",
- "member_id": "string",
- "contract_event_id": "string",
- "uris": [
- "string"
]
}, - "serial_number": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "uri": "string",
- "verified": true,
- "verified_info": "string",
- "labeler_code": "string",
- "responder_name": "string",
- "vrs_name": "string"
}Get a list of responses to VRS requests from your organization.
To instead get the list of requests, see the GET /vrs-requests API.
To support paging results, see the _page and _per_page parameters.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
(string or null) or Array of strings Filter the results by the VRS record | |
string or Array of strings Filter the results by the VRS request connection status:
| |
| from | string <date-time> Filter the results to those with a start date of the requested date/time or later. |
| requestor_id | string^[0-9a-km-zA-HJ-Z]{7}$ The ID of the participant requesting the verification |
| requestor_name | string^.{0,1000}$ The name of the node requesting a verification |
| verified | boolean Filters the results by the VRS record |
| vrs_name | string^.{0,1000}$ The name of the node responding to the verification request |
[- {
- "additional_info": "string",
- "connection_status": "PVSError",
- "correlation_guid": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "data": {
- "expiry": "string",
- "lotNum": "string"
}, - "id": "string",
- "gtin": "string",
- "p2p_failure_status": 0,
- "requestor_gln": "string",
- "p2p_requestor_prefix": "string",
- "p2p_requestor": {
- "id": "string",
- "contractAddress": "string",
- "certificate_pem": "string",
- "certificate_hash": "string",
- "certificate_der": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "permissions": "string",
- "network_name": "string",
- "name": "string",
- "member_id": "string",
- "contract_event_id": "string",
- "uris": [
- "string"
]
}, - "serial_number": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "upstream_status_code": 0,
- "uri": "string",
- "verified": true,
- "verified_info": "string",
- "vrs_name": "string",
- "requestor_name": "string"
}
]Get all the distinct requestor names and VRS names from the entire set of VRS response records in the server's database. This API is useful to populate user interface pickers for optional filtering by these values.
{- "requestor_name": [
- "string"
], - "vrs_name": [
- "string"
]
}Get a list of responses to verification requests from your organization, filtered to only requests that relate to a particular correlation GUID. A correlation GUID is a generated ID that links a verification request and its response.
To instead get the list of your requests by correlation GUID, see the GET /vrs-requests/{correlation_guid} API.
| correlation_guid required | string^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4{1}[a-fA-F0-9... Correlation
GUID, which is an ID that links peristent data related to both the
request and response for a saleable return verification request. The
format is hexadecimal digits and hyphens in the following format: <8
chars>-<4 chars>-<4 chars>-<4 chars>-<12
chars>. Both lowercase a-f and uppercase A-F are supported. For
example: |
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
{- "additional_info": "string",
- "connection_status": "PVSError",
- "correlation_guid": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "data": {
- "expiry": "string",
- "lotNum": "string"
}, - "id": "string",
- "gtin": "string",
- "p2p_failure_status": 0,
- "requestor_gln": "string",
- "p2p_requestor_prefix": "string",
- "p2p_requestor": {
- "id": "string",
- "contractAddress": "string",
- "certificate_pem": "string",
- "certificate_hash": "string",
- "certificate_der": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "permissions": "string",
- "network_name": "string",
- "name": "string",
- "member_id": "string",
- "contract_event_id": "string",
- "uris": [
- "string"
]
}, - "serial_number": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "upstream_status_code": 0,
- "uri": "string",
- "verified": true,
- "verified_info": "string",
- "vrs_name": "string",
- "requestor_name": "string"
}Calculates and returns summary statistics about verification history for your organization (your MediLedger tenant) based on a specific date range.
The response JSON object includes:
Number of verification requests sent (initiated) by your organization).
Number of verification requests received.
Total requests, which is the sum of these previous two values.
To get these statistics but grouped by month, see the Monthly Reports API /report/by-month.
| from required | string <date-time> The start date and time, specified in ISO 8601 date format. |
| to required | string <date-time> The end date and time, specified in ISO 8601 date format. |
{- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z",
- "sent": 0,
- "received": 0,
- "total": 0
}Calculates and returns monthly statistics about verification history for your organization (your MediLedger tenant) based on a range of months.
The response JSON object is an array of objects with the following information:
Number of verification requests sent (initiated) by your organization).
Number of verification requests received.
Total requests, which is the sum of these previous two values.
To get these statistics but as a summary for the date range rather than grouped by month, see the Overall Summary Reports API /report
To support paging results, see the _page and _per_page parameters.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
| from | string^([0-9]{4})-([0-1][0-9])$ The first month to return, specified in |
| to | string^([0-9]{4})-([0-1][0-9])$ The last month to return, specified in |
[- {
- "month": "string",
- "sent": 0,
- "received": 0,
- "total": 0
}
]IMPORTANT: This section contains APIs published by VRS Gateway servers, which are the Gateway Nodes of the MediLedger network. For the main verification API for a Private Node, see here instead.
The most important VRS Gateway API is the GS1-compliant verification endpoint GET /verify/gtin/{gtin}/lot/{lot}/ser/{serialnumber}.
It has the same structure (URL request path, parameters, and response)
as the Private Node GS1 verification endpoint that is documented here.
They are effectively duplicates, though the final path component is
spelled differently in the docs for technical reasons. Both requests
implement the same formal specification.
The pharamaceutical industry defines API specifications that coordinate data flow between the MediLedger network and external VRS systems and in both directions:
Push Synchronization - Submits Lookup Directory entries to the MediLedger network from an external system. In this case, new Lookup Directory entries represent products (identified by their GTINs) from manufacturers that use external VRS systems. This information will be used by MediLedger to determine when and how to contact external VRS systems for product verification.
Pull Synchronization - Gets Lookup Directory entries from the MediLedger network. In this case, the Lookup Directory entries represent products (identified by their GTINs) from manufacturers in the MediLedger network. This information will be used by external VRS systems to determine when to contact MediLedger for product verification.
The api-server subdomain under the Service Provider subdomain (default is ml) of your cluster. Use the /api/2.0 URL prefix.
If you are a recognized VRS service provider, you can submit a Lookup Directory (LD) entry to the MediLedger network by calling this API on a Gateway Node. In this case, new Lookup Directory entries represent products (identified by their GTINs) from manufacturers that use external VRS systems. This information will be used by MediLedger to determine when and how to contact external VRS systems for product verification.
This endpoint requires TLS mutual authentication using X.509 certificates. To register an external VRS system to authenticate with this API, contact mlsupport@pulse.pharmacy.
Only submit GTINs with this API for products owned by manufacturers that use external VRS systems. To submit products for manufacturers in the MediLedger, instead make a POST /product request on a Private Node (not a Gateway Node).
| recordGuid required | string^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4{1}[a-fA-F0-9... A
Lookup Directory Correlation GUID uniquely identifies a Lookup
Directory entry. Although a Lookup Directory entry includes a GTIN, one
GTIN may have multiple Lookup Directory entries because different
entries may represent different expiration date ranges or status values
other than The format is five groups of hexadecimal digits separated by hyphens, with group sizes as follows: 8, 4, 4, 4, 12. For example, |
| recordOwner required | string^\d{4,6}$ FDA labeller code for the owner of this product as specified by this LD entry. Format is 4-6 numeric digits. Contrast with related property |
| gtin required | string^\d{8}|\d{12}|\d{13}|\d{14}$ A product ID that conforms to any of the GS1 GTIN standards, which vary by length: 8, 12, 13, or 14 digits. |
| ci required | string^.{0,255}$ Connectivity Information, which is the VRS verification URL. This is a verification URL to either a designated VRS provider or possibly the GTIN owner if they respond directly to verification requests. |
| startExpDate required | string^([0-9][0-9])(0[1-9]|1[0-2])(0[0-9]|[1-2][0-9... Lower bound of expiry date, specified in |
| endExpDate | string or null^([0-9][0-9])(0[1-9]|1[0-2])(0[0-9]|[1-2][0-9... Upper bound of expiry date, specified in |
| status required | string Enum: "active" "inactive" "deleted" The status of the Lookup Directory entry:
Be aware that a single GTIN may be represented by multiple Lookup Directory entries, varying by effective date ranges and also by this status value. |
| nextRecordOwner | string or null^\d{4,6}$ FDA labeller code for this product as specified by the next LD entry for this GTIN and date range. This optional value is used when transferring a product to a new owner. The record owner ( Format is 4-6 numeric digits. Contrast with related property |
| lastModifiedDateTime required | string <date-time> Last modified date of the LD entry as modified by the owner's VRS system, in ISO 8601 date format. |
| sourceVrsId required | string^.{0,13}$ The VRS that sourced this LD entry. This is specified as a VRS ID, which is an assigned 13 digit ID value. |
| syncerRecordVrsId | string^.{0,13}$ INTERNAL. Do not use. |
| pullLogGuid | string^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4{1}[a-fA-F0-9... A
Lookup Directory Correlation GUID uniquely identifies a Lookup
Directory entry. Although a Lookup Directory entry includes a GTIN, one
GTIN may have multiple Lookup Directory entries because different
entries may represent different expiration date ranges or status values
other than The format is five groups of hexadecimal digits separated by hyphens, with group sizes as follows: 8, 4, 4, 4, 12. For example, |
{- "recordGuid": "string",
- "recordOwner": "string",
- "gtin": "string",
- "ci": "string",
- "startExpDate": "string",
- "endExpDate": "string",
- "status": "active",
- "nextRecordOwner": "string",
- "lastModifiedDateTime": "2019-08-24T14:15:22Z",
- "sourceVrsId": "string",
- "syncerRecordVrsId": "string",
- "pullLogGuid": "string"
}{- "recordGuid": "string",
- "recordOwner": "string",
- "gtin": "string",
- "ci": "string",
- "startExpDate": "string",
- "endExpDate": "string",
- "status": "active",
- "nextRecordOwner": "string",
- "lastModifiedDateTime": "2019-08-24T14:15:22Z",
- "sourceVrsId": "string",
- "syncerRecordVrsId": "string",
- "vrsProvider": "string",
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}The api-server subdomain under the Service Provider subdomain (default is ml) of your cluster. Use the /api/2.0 URL prefix.
If you are a recognized VRS service provider, you can get the latest Lookup Directory (LD) entries from the MediLedger PVS system by calling this API on a Gateway Node. In this case, the Lookup Directory entries represent products (identified by their GTINs) from manufacturers in the MediLedger network. This information will be used by external VRS systems to determine when to contact MediLedger for product verification This endpoint requires TLS mutual authentication using X.509 certificates. To register an external VRS system to authenticate with this API, contact mlsupport@pulse.pharmacy.
All product in this API's results are owned by manufacturers in the MediLedger network.
| lastModifiedDateTime required | string <date-time> This required field specifies the date that you last used this API. This request returns only VRS entries whose last modified time is greater than or equal to this date parameter, which must be specified in ISO 8601 date format. This parameter is always required even if you have never used this
API before. It is important that before (not after) calling this API,
check and save the current date/time. For the first time you call this
API, pass the special value |
{- "sourceVrsId": "string",
- "ldEntries": [
- {
- "recordGuid": "string",
- "recordOwner": "string",
- "gtin": "string",
- "ci": "string",
- "startExpDate": "string",
- "endExpDate": "string",
- "status": "active",
- "nextRecordOwner": "string",
- "lastModifiedDateTime": "2019-08-24T14:15:22Z"
}
]
}The api-server subdomain under the Service Provider subdomain (default is ml) of your cluster. DO NOT ADD THE /api/2.0 URL PREFIX FOR THIS GS1 API.
This is the main GS1 verification endpoint for a Gateway Node. It responds to verification requests for product identifiers. This endpoint requires TLS mutual authentication using X.509 certificates. To register an external VRS system to authenticate with X.509 certificates, contact mlsupport@pulse.pharmacy.
This has the same request structure (URL request path, parameters, and response) as the Private Node GS1 verification endpoint that is documented here. They are effectively duplicates, though the final path component is spelled differently in the docs for technical reasons. Both requests implement the same GS1 specification.
If the GTIN or date has the wrong format, this returns response code
400. If the GTIN was not found or the expiry date is out of its valid
range, you get response code 404. For both those cases, the manufacturer
Private Node was not contacted. If you get response code 200, the
manufacturer Private Node and its EPCIS system was contacted
successfully, but to determine if verification was successul, you must
check the JSON response response.data.verified property.
IMPORTANT: Omit the /api/2.0 URL prefix for this GS1 API.
| gtin required | string^\d{8}|\d{12}|\d{13}|\d{14}$ Global Trade Item Number (GTIN) |
| lot required | string^.{0,100}$ Lot number, which is also known as a batch number. |
| ser required | string^[0-9a-zA-Z]{1,20}$ Serial number. |
string^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-... Example: email=anyone@anynet.com Email of contact point responsible for verification request or response | |
| exp required | string^([0-9][0-9])(0[1-9]|1[0-2])(0[0-9]|[1-2][0-9... Expiry date in date format |
| linkType required | string Value: "verificationService" The link type. Always set to |
| context required | string Enum: "dscsaSaleableReturn" "dscsaStatusCheck" "dscsaExceptionVerification" "dscsaSuspectIllegitimate" The verification context |
| telephone | string Example: telephone=011234567890 Telephone number of contact point responsible for verification request or response |
| ctrlPossessAtt required | boolean Example: ctrlPossessAtt=true Requestor is making an attestation that they have possession or control of the product if a value of true is supplied. |
| reqGLN required | string^[0-9a-zA-Z]{13}$ The GS1 Global Location Number (GLN) of the requestor. |
| corrUUID required | string^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4{1}[a-fA-F0-9... A
Lookup Directory Correlation GUID uniquely identifies a Lookup
Directory entry. Although a Lookup Directory entry includes a GTIN, one
GTIN may have multiple Lookup Directory entries because different
entries may represent different expiration date ranges or status values
other than The format is five groups of hexadecimal digits separated by hyphens, with group sizes as follows: 8, 4, 4, 4, 12. For example, |
{- "corrUUID": "19a1faa0-9222-11e9-8544-9d8142666fed",
- "data": {
- "verified": true
}, - "responderGLN": "0361111111116",
- "verificationTimestamp": "2019-06-18T23:37:56.893Z"
}If you are a recognized VRS service provider, this API gets Lookup Directory entries. By default, all LD entries are returned, but you can set various optional parameters that can filter the results based on different LD entry properties, such as GTIN prefix, last synchronization time, and the name of a specific VRS system.
This endpoint requires TLS mutual authentication using X.509 certificates. To register an external VRS system to authenticate with X.509 certificates, contact mlsupport@pulse.pharmacy. If you are not a recognized VRS service provider, this API always returns an empty list.
Note: All dates returned by this API are 8 digit dates of format YYYYMMDD, not the more common date format YYMMDD.
| _page | integer [ 1 .. 10000 ] The offset from which to start returning results. Default value is 1. |
| _perPage | integer [ 1 .. 100 ] The number of results to return in each page. Default value is 20. |
| last_synced_time | string <date-time> Filters the response to LD entries that were modified since a last synchornized date and time, which you specify in ISO 8601 date format. If omitted, no filtering. |
| in_network | boolean Filters the response to LD entries based on the product owner membership in the MediLedger network. If set to |
| gtin_prefix | string^[0-9]{0,14}$ Filters the response to LD entries with a specified GTIN prefix. If omitted, no filtering. |
| status | string Enum: "active" "inactive" "deleted" Filters results by the status of the record (active, inactive, or deleted). By default, new LD entries have active status. If omitted, no filtering. |
| sourceVrsId | string^.{0,13}$ Filter results to entries with a specified source VRS ID ( |
| VrsProvider | String Filter results to entries with the |
[- {
- "recordGuid": "string",
- "recordOwner": "string",
- "gtin": "string",
- "ci": "string",
- "startExpDate": "string",
- "endExpDate": "string",
- "status": "active",
- "nextRecordOwner": "string",
- "lastModifiedDateTime": "2019-08-24T14:15:22Z",
- "sourceVrsId": "string",
- "syncerRecordVrsId": "string",
- "vrsProvider": "string",
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]If you are a recognized VRS service provider, this API returns a Lookup Directory (LD) entry, specified by its LD entry correlation GUID.
This endpoint requires TLS mutual authentication using X.509 certificates. To register an external VRS system to authenticate with this API, contact mlsupport@pulse.pharmacy. If you are not a recognized VRS service provider, this API always returns an empty list.
Note: All dates returned by this API are 8 digit dates of format YYYYMMDD, not the more common date format YYMMDD.
| guid required | string^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4{1}[a-fA-F0-9... A Lookup Directory Correlation GUID uniquely identifies a Lookup Directory entry. |
{- "recordGuid": "string",
- "recordOwner": "string",
- "gtin": "string",
- "ci": "string",
- "startExpDate": "string",
- "endExpDate": "string",
- "status": "active",
- "nextRecordOwner": "string",
- "lastModifiedDateTime": "2019-08-24T14:15:22Z",
- "sourceVrsId": "string",
- "syncerRecordVrsId": "string",
- "vrsProvider": "string",
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}If you are a recognized VRS service provider, this API returns are human-readable names for each external VRS system.
You can use these names to filter LD entry results with the VrsProvider parameter of a GET /vrs-record request.
This endpoint requires TLS mutual authentication using X.509 certificates. To register an external VRS system to authenticate with X.509 certificates, contact mlsupport@pulse.pharmacy.
[- "string"
]This endpoint is used in Private Node peer-to-peer communications to validate the presence and properties of an Asset. This endpoint requires TLS mutual authentication using X.509 certificates.
IMPORTANT: This is an internal peer-to-peer API that
is described here to assist in debugging. It is unsupported for
customers to call this API for integration with other Private Nodes,
Gateway Nodes, or other external systems. For integration of external
systems use the GS1 compliant REST API by making a GET /verify/gtin/{gtin}/lot/{lot}/ser/{ser} request, which is in this documentation in the Verification category.
This endpoint triggers a local-only Asset lookup by the SGTIN identifier on the client that receives the request:
If it is not found, a response will be sent indicating that the Asset could not be found.
If it is found, then the client will test the properties supplied in the request and confirm whether or not they match the properties stored in the Asset.
The result of this verification is sent back to the client that initiated the request.
| gtin required | string^\d{14}$ GTIN-14 code that can identify the asset. |
| sn required | string^[0-9a-zA-Z]{1,20}$ The unique serial number of the asset. |
| requestType required | string Enum: "000" "001" The request type:
|
| correlationGuid required | string^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4{1}[a-fA-F0-9... Correlation
GUID, which is an ID that links peristent data related to both the
request and response for a saleable return verification request. The
format is hexadecimal digits and hyphens in the following format: <8
chars>-<4 chars>-<4 chars>-<4 chars>-<12
chars>. Both lowercase a-f and uppercase A-F are supported. For
example: |
| requestorGln required | string^[0-9a-zA-Z]{13}$ GS1 Global Location Number (GLN) of the requestor. |
string^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-... Email address. | |
| telephone | string Telephone number |
| context | string Enum: "dscsaSaleableReturn" "dscsaStatusCheck" "dscsaExceptionVerification" "dscsaSuspectIllegitimate" |
| ctrlPossessAtt | boolean Requestor is making an attestation that they have possession or control of the product if a value of true is supplied. |
| upstream_response_time | integer [ 0 .. 10000000000 ] Response time of the upstream system to the verification request:
|
| upstream_status_code | integer or null HTTP response code of the upstream system to the verification request:
|
| requestorPrefix required | string^[0-9]{4,12}$ A company GS1 prefix. Format is 4-12 numeric digits. |
required | object This object encapsulates asset properties such as expiry date and lot number. |
object An object that describes the original verification request. |
{- "correlationGuid": "string",
- "requestorGln": "string",
- "email": "string",
- "telephone": "string",
- "context": "dscsaSaleableReturn",
- "ctrlPossessAtt": "true",
- "upstream_response_time": 10000000000,
- "upstream_status_code": 0,
- "requestorPrefix": "string",
- "data": {
- "lotNum": "string",
- "expiry": "string"
}, - "originalRequestInfo": {
- "originalRequestUrl": "string",
- "originalRequestHeaders": { },
- "originalRequestParams": { },
- "originalRequestBody": { },
- "externalVrsInfo": { },
- "originalRequestExtra": { }
}
}{- "responderGln": "string",
- "correlationGuid": "string",
- "data": {
- "verified": true,
- "verifiedInfo": "001",
- "errorMessage": "string",
- "additionalInfo": "001"
}, - "vrsName": "string",
- "originalResponseInfo": {
- "originalResponderName": "string",
- "originalResponderUrl": "string",
- "originalResponseBody": { },
- "originalResponseStatus": "string",
- "responderOutOfNetwork": true,
- "externalVrsName": "string",
- "externalSourceVrsId": "string",
- "externalVrsUrl": "string"
}
}