API (2.0.0)

Download OpenAPI specification:Download

Authentication

To authenticate with a MediLedger server, there are two steps:

  • Get an authentication token

  • Use an authentication token in later REST API requests

Get an authentication token

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:

  1. Make a POST request to the /tenant/{tenant_id}/oauth/token resource.
  2. Add the following header:

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 an authentication token in later REST API requests

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.

Log out of a session

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

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.

path Parameters
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 config.yaml. If you are not the server administrator, get tenant short name from your server administrator.

Request Body schema: application/json; charset=UTF-8
One of
email
required
string^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-...

Email address.

password
required
string^.{1,100000}$

Password. Maximum 100000 characters.

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "grant_type": "refresh_token",
  • "refresh_token": "string"
}

Response samples

Content type
application/json
{
  • "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": {
    }
}

Log out of a session

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.

Authorizations:
chron_auth

Responses

Response samples

Content type
application/json
{
  • "logout_time": "2018-10-13T21:11:57.060Z",
  • "user_id": "1234567"
}

Verification

Verify a product serial number, expiration date, and lot number (GS1 API)

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:

  1. 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.

  2. 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.

  3. The server contacts that Private Node and makes a peer-to-peer verification request (using a different internal REST API).

  4. 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.

path Parameters
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.

query Parameters
email
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 YYMMDD. To represent the last day of the month, pass the day (DD) as 00.

linkType
required
string
Value: "verificationService"

The link type. Always set to verificationService.

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

header Parameters
ATP-Authorization
string

Verification Credential authorization header from client.

Responses

Response samples

Content type
application/json
Example
{
  • "corrUUID": "19a1faa0-9222-11e9-8544-9d8142666fed",
  • "data": {
    },
  • "responderGLN": "0361111111116",
  • "verificationTimestamp": "2019-06-18T23:37:56.893Z"
}

EPCIS Integration

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.

The EPCIS repository must implement this interface (GS1 API except that reponder GLN is optional)

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:

  1. This interface must be implemented by EPCIS repositories or middleware that interfaces with the EPCIS system.

  2. 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.

path Parameters
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.

query Parameters
email
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 YYMMDD. To represent the last day of the month, pass the day (DD) as 00.

linkType
required
string
Value: "verificationService"

The link type. Always set to verificationService.

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

header Parameters
ATP-Authorization
string

Verification Credential authorization header from client.

Responses

Response samples

Content type
application/json
{
  • "responderGLN": "string",
  • "corrUUID": "string",
  • "verificationTimestamp": "2019-08-24T14:15:22Z",
  • "contactPoint": {
    },
  • "data": {
    }
}

Products

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).

Get my products and any past transfers

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).

Authorizations:
chron_auth
query 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 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 GET /product introduction for important details about what kinds of results can appear in results and whether the owned field would be true or false for each situation.

If you set this parameter to true, filters results only to products that are owned by you. If you set this parameter to false, filters results only to products that are not owned by you. If omitted, no filtering on this criteria.

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 owner=1.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new product

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.

Authorizations:
chron_auth
Request Body schema: application/json; charset=UTF-8
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 POST /endpoint request. To get a list of your registered endpoints, use a GET /endpoint request.

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.

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "display_name": "string",
  • "endpoint_routes": [
    ],
  • "gtin": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "company_prefix": "string",
  • "creator": "string",
  • "display_name": "string",
  • "gtin": "string",
  • "gtin_length": 14,
  • "item_reference": "string",
  • "endpoint_routes": [
    ],
  • "pending_endpoint_routes": [
    ],
  • "uris": [
    ],
  • "transfer_pending": true,
  • "transferring_to": "string",
  • "owned": true,
  • "owner": "string",
  • "blockchain_transactions": [
    ],
  • "blockchain_events": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}

Update product name

Update product display name

Authorizations:
chron_auth
path Parameters
product_uri
required
string^gs1:es:01(\d{14})$|^ml:product:[0-9]+$

A product URI, which is gs1:es:01 followed by 14 numeric digits that represent a GS1 GTIN-14 code.

Request Body schema: application/json; charset=UTF-8
display_name
required
string [ 2 .. 100 ] characters

The human-readable display name for this product. Format is 2 to 100 characters.

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "display_name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "company_prefix": "string",
  • "creator": "string",
  • "display_name": "string",
  • "gtin": "string",
  • "gtin_length": 14,
  • "item_reference": "string",
  • "endpoint_routes": [
    ],
  • "pending_endpoint_routes": [
    ],
  • "uris": [
    ],
  • "transfer_pending": true,
  • "transferring_to": "string",
  • "owned": true,
  • "owner": "string",
  • "blockchain_transactions": [
    ],
  • "blockchain_events": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}

Transfer a product

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.

Authorizations:
chron_auth
path Parameters
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 gs1:es:01 followed by the 14 numeric digits of a valid GS1 GTIN.

Request Body schema: application/json; charset=UTF-8
recipient_uri
required
string^gs1:company-prefix:[0-9]{4,12}$|^ml:member:[...

Identity URI. Pass either form:

  • GS1 URI - Begin with gs1: then a GS1 company prefix (4-12 numeric digits).

  • MediLedger URI - Begin with ml:member:, then a MediLedger member ID (numeric ID)

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "recipient_uri": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "company_prefix": "string",
  • "creator": "string",
  • "display_name": "string",
  • "gtin": "string",
  • "gtin_length": 14,
  • "item_reference": "string",
  • "endpoint_routes": [
    ],
  • "pending_endpoint_routes": [
    ],
  • "uris": [
    ],
  • "transfer_pending": true,
  • "transferring_to": "string",
  • "owned": true,
  • "owner": "string",
  • "blockchain_transactions": [
    ],
  • "blockchain_events": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}

Accept a product transfer

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.

Authorizations:
chron_auth
path Parameters
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 gs1:es:01 followed by the 14 numeric digits of a valid GS1 GTIN.

Request Body schema: application/json; charset=UTF-8
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 POST /endpoint request. To get a list of your registered endpoints, use a GET /endpoint request.

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "display_name": "string",
  • "endpoint_routes": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "company_prefix": "string",
  • "creator": "string",
  • "display_name": "string",
  • "gtin": "string",
  • "gtin_length": 14,
  • "item_reference": "string",
  • "endpoint_routes": [
    ],
  • "pending_endpoint_routes": [
    ],
  • "uris": [
    ],
  • "transfer_pending": true,
  • "transferring_to": "string",
  • "owned": true,
  • "owner": "string",
  • "blockchain_transactions": [
    ],
  • "blockchain_events": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}

Reject product transfer

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.

Authorizations:
chron_auth
path Parameters
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 gs1:es:01 followed by the 14 numeric digits of a valid GS1 GTIN.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "company_prefix": "string",
  • "creator": "string",
  • "display_name": "string",
  • "gtin": "string",
  • "gtin_length": 14,
  • "item_reference": "string",
  • "endpoint_routes": [
    ],
  • "pending_endpoint_routes": [
    ],
  • "uris": [
    ],
  • "transfer_pending": true,
  • "transferring_to": "string",
  • "owned": true,
  • "owner": "string",
  • "blockchain_transactions": [
    ],
  • "blockchain_events": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}

Cancel a product transfer

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.

Authorizations:
chron_auth
path Parameters
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 gs1:es:01 followed by the 14 numeric digits of a valid GS1 GTIN.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "company_prefix": "string",
  • "creator": "string",
  • "display_name": "string",
  • "gtin": "string",
  • "gtin_length": 14,
  • "item_reference": "string",
  • "endpoint_routes": [
    ],
  • "pending_endpoint_routes": [
    ],
  • "uris": [
    ],
  • "transfer_pending": true,
  • "transferring_to": "string",
  • "owned": true,
  • "owner": "string",
  • "blockchain_transactions": [
    ],
  • "blockchain_events": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}

Modify a product's endpoints

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.

Authorizations:
chron_auth
path Parameters
id
required
string^gs1:es:01(\d{14})$|^ml:product:[0-9]+$

A product URI, which is gs1:es:01 followed by 14 numeric digits that represent a GS1 GTIN-14 code.

Request Body schema: application/json; charset=UTF-8
Array of objects non-empty

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "endpoint_routes": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "company_prefix": "string",
  • "creator": "string",
  • "display_name": "string",
  • "gtin": "string",
  • "gtin_length": 14,
  • "item_reference": "string",
  • "endpoint_routes": [
    ],
  • "pending_endpoint_routes": [
    ],
  • "uris": [
    ],
  • "transfer_pending": true,
  • "transferring_to": "string",
  • "owned": true,
  • "owner": "string",
  • "blockchain_transactions": [
    ],
  • "blockchain_events": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}

Get a product

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).

Authorizations:
chron_auth
path Parameters
product_uri
required
string^gs1:es:01(\d{14})$|^ml:product:[0-9]+$

A product URI, which is gs1:es:01 followed by 14 numeric digits that represent a GS1 GTIN-14 code.

query Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "company_prefix": "string",
  • "creator": "string",
  • "display_name": "string",
  • "gtin": "string",
  • "gtin_length": 14,
  • "item_reference": "string",
  • "endpoint_routes": [
    ],
  • "pending_endpoint_routes": [
    ],
  • "uris": [
    ],
  • "transfer_pending": true,
  • "transferring_to": "string",
  • "owned": true,
  • "owner": "string",
  • "blockchain_transactions": [
    ],
  • "blockchain_events": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}

Delete a product

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.

Authorizations:
chron_auth
path Parameters
product_uri
required
string^gs1:es:01(\d{14})$|^ml:product:[0-9]+$

A product URI, which is gs1:es:01 followed by 14 numeric digits that represent a GS1 GTIN-14 code.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get all deleted products

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.

Authorizations:
chron_auth
query 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 only to products with this GTIN prefix. If omitted, no filtering on this criteria.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get one deleted product

Get one of your own organization's products that was previously deleted, specified by its product URI.

Authorizations:
chron_auth
path Parameters
product_uri
required
string^gs1:es:01(\d{14})$|^ml:product:[0-9]+$

A product URI, which is gs1:es:01 followed by 14 numeric digits that represent a GS1 GTIN-14 code.

query Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "blockchain_events": [
    ],
  • "blockchain_transactions": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "display_name": "string",
  • "gtin": "string",
  • "id": "string",
  • "uris": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z"
}

(Public Products) Get all public products

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.

Authorizations:
chron_auth
query 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.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

(Public Products) Get a public product by its Chronicled ID

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.

Authorizations:
chron_auth
path Parameters
_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.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "creator": "string",
  • "owner": "string",
  • "endpoint_routes": [
    ],
  • "blockchain_events": [
    ],
  • "display_name": "string",
  • "uris": [
    ],
  • "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"
}

(Public Products) Get a public product by its URI

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.

Authorizations:
chron_auth
path Parameters
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 gs1:es:01 prefix followed by a numeric code).

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "creator": "string",
  • "owner": "string",
  • "endpoint_routes": [
    ],
  • "blockchain_events": [
    ],
  • "display_name": "string",
  • "uris": [
    ],
  • "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"
}

Endpoints

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.

Find endpoints

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

Authorizations:
chron_auth
query 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.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create endpoint

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.

Authorizations:
chron_auth
Request Body schema: application/json; charset=UTF-8
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, https://api-server.mediledger.example.com

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "url": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "url": "string",
  • "blockchain_events": [
    ],
  • "status": "pending",
  • "member": "string",
  • "blockchain_transactions": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "uris": [
    ]
}

Get endpoint

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.

Authorizations:
chron_auth
path Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "url": "string",
  • "blockchain_events": [
    ],
  • "status": "pending",
  • "member": "string",
  • "blockchain_transactions": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "uris": [
    ]
}

Update endpoint

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

Authorizations:
chron_auth
path Parameters
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.

Request Body schema: application/json; charset=UTF-8
url
required
string\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d...

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "url": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "url": "string",
  • "blockchain_events": [
    ],
  • "status": "pending",
  • "member": "string",
  • "blockchain_transactions": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "uris": [
    ]
}

Find public endpoints

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.

Authorizations:
chron_auth
query 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.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get public endpoint

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.

Authorizations:
chron_auth
path Parameters
uris
required
string^.{0,100}$

The URI for an endpoint.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "member": "string",
  • "url": "string",
  • "blockchain_events": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "uris": [
    ]
}

Blockchain

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.

Get blocks

Returns a list of all blocks. Pagination is supported. Filtering is unsupported.

Authorizations:
chron_auth
query 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.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a block

Returns a block, specified by its block number.

Authorizations:
chron_auth
path Parameters
number
string^[0-9]{0,9}$

The block number of the block to read.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get blockchains

Returns a list of all available blockchains. For MediLedger PVS, there is always exactly one blockchain.

Authorizations:
chron_auth
query 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.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a blockchain

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.

Authorizations:
chron_auth
path Parameters
network_name
string^.{0,100}$

The network name for the blockchain.

Responses

Response samples

Content type
application/json
{
  • "description": "string",
  • "network_name": "string",
  • "parity_version": "string",
  • "rpc_url": "string",
  • "latest_confirmed_block_number": 0,
  • "gcp_check_relaxed": true
}

Get public transactions

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:

  • To get transactions that your organization initiated, including transactions that are in pending or error states, instead use the Get Private Transaction API.
Authorizations:
chron_auth
query 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.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a public transaction

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.

Authorizations:
chron_auth
path Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "transaction_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "decoded_events": [
    ],
  • "decoded_trace": [
    ],
  • "sender": {
    },
  • "destination": {
    },
  • "public_data": {
    },
  • "private_data": {
    },
  • "receipt": {
    },
  • "trace": {
    },
  • "protocol_primitive_label": "string",
  • "retracted": true,
  • "timestamp": 0,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "confirmations": 100,
  • "wrappers": [
    ],
  • "primary_trace_index": "string",
  • "id": "string"
}

Get private transactions

Returns all private transactions, with optional filtering by status.

To support pagination of results, see the _page and _per_page parameters.

Authorizations:
chron_auth
query 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:

  • A single blockchain status code. Specify the status directly.

  • Multiple status codes. Repeat the query parameter on the URL such as status=error&status=confirmed. If you pass multiple status codes, the transaction will be included in results if it matches any of the specified status values.

Note: In the HTML documentation, click the parameter name to view all status values.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a private transaction

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:

  • To get only the transactions that are on the blockchain, instead see the [get public transaction API] (#tag/Blockchain/paths/~1public-transaction/get). That API returns transactions with status 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.
Authorizations:
chron_auth
path Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "message_id": "string",
  • "tenant_id": "string",
  • "transaction_id": "string",
  • "context": {
    },
  • "contract_name": "string",
  • "dashboard": {
    },
  • "decoded_params": [
    ],
  • "data": "string",
  • "from": "string",
  • "function_name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "gasPrice": "string",
  • "input_params": [
    ],
  • "network_name": "string",
  • "sent_transactions": [
    ],
  • "status": "unsent",
  • "status_history": [
    ],
  • "status_recorded_at": "2019-08-24T14:15:22Z",
  • "to": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "value": "string",
  • "wrappers": [
    ],
  • "id": "string"
}

Retry a failed transaction

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.

Authorizations:
chron_auth
path Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "transaction_id": "string",
  • "block_number": "string",
  • "context": {
    },
  • "contract_name": "string",
  • "error_history": [
    ],
  • "dashboard": {
    },
  • "data": "string",
  • "from": "string",
  • "function_name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "gasPrice": "string",
  • "decoded_params": [
    ],
  • "network_name": "string",
  • "status": "unsent",
  • "status_history": [
    ],
  • "status_recorded_at": "2019-08-24T14:15:22Z",
  • "to": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "value": "string",
  • "wrappers": [
    ],
  • "gas": "string",
  • "confirmations": 100,
  • "error": "string"
}

Get smart contract events

Returns a list of all smart contract events.

Authorizations:
chron_auth
query 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.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get smart contract event

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.

Authorizations:
chron_auth
path Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "contract_event_id": "string",
  • "address": "string",
  • "blockHash": "string",
  • "blockNumber": 100,
  • "contract_name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "decoded_params": [
    ],
  • "event_name": "CertificateUpdated",
  • "network_name": "string",
  • "topics": [
    ],
  • "transactionHash": "string",
  • "transactionIndex": "string",
  • "transactionLogIndex": 10000,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "id": "string"
}

Assets

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.

Get my assets stored on this Private Node -- for testing only

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.

Authorizations:
chron_auth
query 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.

uses_template
boolean

INTERNAL. Do not use.

serial_number_prefix
string^.{0,100}$

If true, filters results to only assets with a serial number with the prefix specified by this parameter. If omitted or empty, does not filter.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an asset on this Private Node -- for testing only

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.

Authorizations:
chron_auth
Request Body schema: application/json; charset=UTF-8
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.

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "serial_number": "string",
  • "properties": {
    },
  • "gtin": "string"
}

Response samples

Content type
application/json
{
  • "urn_identities": [
    ],
  • "gtin": "string",
  • "serial_number": "string",
  • "properties": {
    },
  • "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"
}

Get my asset from this Private Node by URI -- for testing only

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.

Authorizations:
chron_auth
path Parameters
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:

  • GS1 URI - Starts with gs1:es:01 then 14 numeric chars then '21' then a max of 20 alphanumeric chars. Regular expression: ^gs1:es:01[0-9]{14}21[0-9a-zA-Z]{1,20}$. Example: gs1:es:010035024200023921SN1, where the 9 is the calculated check digit.

  • URN URI - Starts with urn:epc:id:sgtin: then company prefix (4-12 numeric) then '.' then item_reference (1-7 numeric) (these 2 must total 13 numeric) then a '.' then 1-20 alphanumeric chars Regular expression: ^urn:epc:id:sgtin:[0-9]{4,12}.[0-9]{1,7}.[0-9a-zA-Z]{1,20}$ Example: urn:epc:id:sgtin:0614141.812345.6789

query Parameters
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 expand parameter to define which fields to expand.

For this request, the only valid value is transfers.

Responses

Response samples

Content type
application/json
{
  • "urn_identities": [
    ],
  • "gtin": "string",
  • "serial_number": "string",
  • "properties": {
    },
  • "manufacturer": {
    },
  • "product": {
    },
  • "archived": true,
  • "registered": true,
  • "private_data": { },
  • "custodian": {
    },
  • "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 from its URI on this Private Node -- for testing only

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.

Authorizations:
chron_auth
path Parameters
asset_uri
required
string^(gs1:es:01[0-9]{14}21[0-9a-zA-Z]{1,20}|urn:e...

The URI of the Asset

header Parameters
ATP-Authorization
string

Verification Credential authorization header from client.

Request Body schema: application/json; charset=UTF-8
required
object

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "uri": "string",
  • "requestorGln": "string",
  • "correlationGuid": "string",
  • "data": {
    },
  • "vrsResponse": null,
  • "response_time_ms": 10000000000
}

Users and Groups

Get all users

Get a list of all users. There is no support for filtering.

Authorizations:
chron_auth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a user account

Create a new user account on the tenant that you used to authenticate.

Authorizations:
chron_auth
Request Body schema: application/json; charset=UTF-8
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

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "password": "string",
  • "email": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "chronicled_id": "string",
  • "email": "string",
  • "id_token": "string",
  • "name": "string"
}

Change user password

Changes a user password. Users can change their own password, and administrators can change the password for other users.

Authorizations:
chron_auth
path Parameters
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

Request Body schema: application/json; charset=UTF-8
old_password
required
string^.{1,100000}$

Old password

new_password
required
string^.{1,100000}$

New password

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "old_password": "string",
  • "new_password": "string"
}

Response samples

Content type
application/json
{
  • "user_id": "string",
  • "last_password_change": "2019-08-24T14:15:22Z"
}

Get a reset password link

Generates a reset password link for a user.

Authorizations:
chron_auth
Request Body schema: application/json; charset=UTF-8
email
required
string^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-...

Email address of the account to reset.

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "url": "string"
}

Disable a user

Allows an admin to disable a user.

Authorizations:
chron_auth
Request Body schema: application/json; charset=UTF-8
user_id
required
string^[0-9a-km-zA-HJ-Z]{7}$

User ID. The format is 7 characters in Base59 encoding.

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "user_id": "string"
}

Response samples

Content type
application/json
{
  • "user_id": "string"
}

Reset a password

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.

Authorizations:
chron_auth
path Parameters
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.

Request Body schema: application/json; charset=UTF-8
new_password
required
string^.{1,100000}$

New password. See the email settings object for details about restrictions for new passwords.

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "new_password": "string"
}

Response samples

Content type
application/json
{
  • "user_id": "string"
}

Get password settings

Get a set of password settings from the server. The settings vary from server to server

Authorizations:
chron_auth

Responses

Response samples

Content type
application/json
{
  • "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
}

Get User Profile

Allows clients to get the information of a specific User.

Authorizations:
chron_auth
path Parameters
user_id
required
string^[0-9a-km-zA-HJ-Z]{7}$

ID of the user profile to get

Responses

Response samples

Content type
application/json
{
  • "updated_at": "2019-08-24T14:15:22Z",
  • "user_id": "string",
  • "email": "string",
  • "last_password_change": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "group_ids": [
    ],
  • "seenSuggested": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "current_login_address": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
  • "groups": [
    ],
  • "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"
}

Delete User

Allows administrators to delete a User account.

Authorizations:
chron_auth
path Parameters
user_id
required
string^[0-9a-km-zA-HJ-Z]{7}$

ID of the user to delete

Responses

Response samples

Content type
application/json
{
  • "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": [
    ],
  • "seenSuggested": true,
  • "created_at": "2019-08-24T14:15:22Z"
}

Find User Invitations

Allows clients to view basic information about all Invitations they have within the Chronicled system.

Authorizations:
chron_auth
path Parameters
user_id
required
string^[0-9a-km-zA-HJ-Z]{7}$

User ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Read User Invitation

Allows clients to view basic information about an Invitation.

Authorizations:
chron_auth
path Parameters
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

Responses

Response samples

Content type
application/json
{
  • "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": {
    },
  • "user": {
    },
  • "invitation": {
    }
}

Accept User Invitation

Allows a user to accept an invitation he has been sent for a Group.

Authorizations:
chron_auth
path Parameters
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

Responses

Response samples

Content type
application/json
{
  • "invitation_id": "string",
  • "group_id": "string",
  • "added_user": {
    },
  • "group": {
    }
}

Delete User Invitation

Allows removing an existing invitation to a Group.

Authorizations:
chron_auth
path Parameters
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

Responses

Response samples

Content type
application/json
{
  • "invitation_id": "string",
  • "group_id": "string",
  • "added_user": {
    },
  • "group": {
    }
}

Find Groups

Allows clients to view basic information about all Groups within the MediLedger system.

Authorizations:
chron_auth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a Group

Allows a user who is not registered under a Group to create one

Authorizations:
chron_auth
Request Body schema: application/json; charset=UTF-8
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

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "name": "string",
  • "roles": [
    ],
  • "description": "string",
  • "user_ids": [
    ],
  • "admin_ids": [
    ],
  • "add_self_as_admin": true
}

Response samples

Content type
application/json
{
  • "created_by": "string",
  • "group": {
    }
}

Read a Group

Allows clients to view basic information about a specific group.

path Parameters
group_id
required
string^[0-9a-km-zA-HJ-Z]{7}$

Group ID

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "group_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "group": {
    }
}

Update a Group

Allows an admin of a group to update an existing group.

Authorizations:
chron_auth
path Parameters
group_id
required
string^[0-9a-km-zA-HJ-Z]{7}$

Group ID

Request Body schema: application/json; charset=UTF-8
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"

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "name": "string",
  • "description": "string",
  • "user_ids": [
    ],
  • "admin_ids": [
    ],
  • "roles": [
    ]
}

Response samples

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

Invite a User

Allows a group admin to invite a new member to the group.

Authorizations:
chron_auth
path Parameters
group_id
required
string^[0-9a-km-zA-HJ-Z]{7}$

Group ID

Request Body schema: application/json; charset=UTF-8
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 user or admin.

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "email": "string",
  • "name": "string",
  • "group_id": "string",
  • "role": "user"
}

Response samples

Content type
application/json
{
  • "invited_member": {
    },
  • "group": {
    }
}

Remove an Invited Member

Allows a group admin to un-invite a user.

Authorizations:
chron_auth
path Parameters
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

Responses

Response samples

Content type
application/json
{
  • "invitation_id": "string",
  • "group_id": "string",
  • "added_user": {
    },
  • "group": {
    }
}

Remove a Member

Allows an group admin to remove a user from the group.

Authorizations:
chron_auth
path Parameters
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

Responses

Response samples

Content type
application/json
{
  • "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": [
    ],
  • "invited_members": [
    ],
  • "admin_ids": [
    ],
  • "user_ids": [
    ]
}

Assign an Admin

Allows an admin of a group to promote another user to the role of admin within that group.

Authorizations:
chron_auth
path Parameters
group_id
required
string^[0-9a-km-zA-HJ-Z]{7}$

Group ID

Request Body schema: application/json; charset=UTF-8
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).

Responses

Request samples

Content type
application/json; charset=UTF-8
{
  • "user_id": "string"
}

Response samples

Content type
application/json
{
  • "invited_members": {
    },
  • "admin_ids": [
    ],
  • "user_ids": [
    ],
  • "id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "roles": [
    ],
  • "name": "string",
  • "description": "string",
  • "created_by": "string"
}

Members

The Member Component API manages MediLedger members from information registered on the blockchain.

Get members

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.

Authorizations:
chron_auth
query 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.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get member

Returns basic information of a Mediledger member.

Authorizations:
chron_auth
path Parameters
uri
required
string^gs1:company-prefix:[0-9]{4,12}$|^ml:member:[...

A unique identifier for a specific MediLedger member. Specify the id parameter as either a member ID (9 digit numeric) or Identity URI (gs1:company-prefix followed by the member ID).

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "account_address": "string",
  • "blockchain_events": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "gcp_check_relaxed": true,
  • "name": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "uris": [
    ],
  • "certificate_hash": "string",
  • "certificate_pem": "string",
  • "blockchain_status": "active"
}

(INTERNAL API) Get information about your own organization.

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.

Authorizations:
chron_auth

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "member": {
    },
  • "organization": {
    }
}

Verification History

Get a summary of verification requests and responses

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.

Authorizations:
chron_auth
query 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 <date-time>

Filter the results to those with a start date of the requested date/time or later.

Responses

Response samples

Content type
application/json
{
  • "requests": {
    },
  • "responses": {
    }
}

Get your previous verification requests

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.

Authorizations:
chron_auth
query 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 additional_info property. You can provide either a single value or an array of multiple values.

string or Array of strings

Filter the results by the VRS request connection status:

  • PVSError - PVS error. A MediLedger PVS node (or Gateway) is down, had connection issues, or the request timed out.
  • RepoLookupError - RepoLookupError error. The manufacturer EPCIS system is down, had connection issues, or the request timed out.
  • Success - Successful connection.
  • VRSError - VRS error. The external VRS service is down, had connection issues, or the request timed out.
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 verified property, which is a Boolean that specifies whether the item was verified.

vrs_name
string^.{0,1000}$

The name of the node responding to the verification request

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get all distinct labeler codes and VRS names from all records.

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.

Authorizations:
chron_auth

Responses

Response samples

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

Get your previous verification requests that match a correlation GUID.

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.

Authorizations:
chron_auth
path 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: 59bc5c88-15f7-49a7-9687-73b05d2c50a4

query 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.

Responses

Response samples

Content type
application/json
{
  • "additional_info": "string",
  • "correlation_guid": "string",
  • "connection_status": "PVSError",
  • "created_at": "2019-08-24T14:15:22Z",
  • "data": {
    },
  • "gtin": "string",
  • "responder_gln": "string",
  • "p2p_responder_prefix": "string",
  • "response_time_ms": 10000000000,
  • "p2p_responder": {
    },
  • "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 your previous verification responses

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.

Authorizations:
chron_auth
query 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 additional_info property. You can provide either a single value or an array of multiple values.

string or Array of strings

Filter the results by the VRS request connection status:

  • PVSError - PVS error. A MediLedger PVS node (or Gateway) is down, had connection issues, or the request timed out.
  • RepoLookupError - RepoLookupError error. The manufacturer EPCIS system is down, had connection issues, or the request timed out.
  • Success - Successful connection.
  • VRSError - VRS error. The external VRS service is down, had connection issues, or the request timed out.
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 verified property, which is a Boolean that specifies whether the item was verified.

vrs_name
string^.{0,1000}$

The name of the node responding to the verification request

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get the distinct requestor names and VRS names from all records.

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.

Authorizations:
chron_auth

Responses

Response samples

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

Get your previous verification responses that match a correlation GUID

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.

Authorizations:
chron_auth
path 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: 59bc5c88-15f7-49a7-9687-73b05d2c50a4

query 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.

Responses

Response samples

Content type
application/json
{
  • "additional_info": "string",
  • "connection_status": "PVSError",
  • "correlation_guid": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "data": {
    },
  • "id": "string",
  • "gtin": "string",
  • "p2p_failure_status": 0,
  • "requestor_gln": "string",
  • "p2p_requestor_prefix": "string",
  • "p2p_requestor": {
    },
  • "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 overall summary of your verification history

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.

query Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "sent": 0,
  • "received": 0,
  • "total": 0
}

Get monthly summary of your verification history

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.

query 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 YYYY-MM format.

to
string^([0-9]{4})-([0-1][0-9])$

The last month to return, specified in YYYY-MM format.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

VRS Gateway

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.

Push Synchronization: Submit an external LD entry to the Gateway

The api-server subdomain under the Service Provider subdomain (default is ml) of your cluster. Use the /api/2.0 URL prefix.

https://vrs.mlg.mlg.pvs-test.pulse.pharmacy/v1/ld/pushsynchronization

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).

Request Body schema: application/json
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 active.

The format is five groups of hexadecimal digits separated by hyphens, with group sizes as follows: 8, 4, 4, 4, 12. For example, 7765b290-1391-11e9-af8f-9710e89bdb3b

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 nextRecordOwner.

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 YYMMDD format. See related parameter endExpDate.

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 YYMMDD format. See related parameter startExpDate. This property is optional, but if nextRecordOwner is non-null, the endExpDate property must be non-null.

status
required
string
Enum: "active" "inactive" "deleted"

The status of the Lookup Directory entry:

  • Active — This LD entry is active.

  • Inactive — This LD entry is inactive.

  • Deleted — — This LD entry represents deleted data.

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 (recordOwner) of an LD entry cannot be changed. Any new entry for a GTIN can only be made by either (1) the record owner of the last entry for this GTIN or (2) the next ecord owner as specified in the nextRecordOwner property for that entry.

Format is 4-6 numeric digits. Contrast with related property recordOwner. If the LD entry property nextRecordOwner is non-null, the endExpDate property must also be non-null.

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 active.

The format is five groups of hexadecimal digits separated by hyphens, with group sizes as follows: 8, 4, 4, 4, 12. For example, 7765b290-1391-11e9-af8f-9710e89bdb3b

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "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"
}

Pull Synchronization: Get the latest MediLedger LD entries from a Gateway node

The api-server subdomain under the Service Provider subdomain (default is ml) of your cluster. Use the /api/2.0 URL prefix.

https://vrs.mlg.mlg.pvs-test.pulse.pharmacy/v1/ld

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.

query Parameters
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 1970-01-01T00:00:00.000Z, which will return all LD entries. For subsequent requests to this API, do not pass that value, which would unnecessarily return all LD entries. Instead, pass the date value that corresponds to when you last imported LD entries with this API.

Responses

Response samples

Content type
application/json
{
  • "sourceVrsId": "string",
  • "ldEntries": [
    ]
}

Verify an asset on a Gateway Node (GS1 API)

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.

https://vrs.mlg.mlg.pvs-test.pulse.pharmacy/verify/gtin/{gtin}/lot/{lot}/ser/{serialnumber}

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.

path Parameters
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.

query Parameters
email
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 YYMMDD. To represent the last day of the month, pass the day (DD) as 00.

linkType
required
string
Value: "verificationService"

The link type. Always set to verificationService.

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 active.

The format is five groups of hexadecimal digits separated by hyphens, with group sizes as follows: 8, 4, 4, 4, 12. For example, 7765b290-1391-11e9-af8f-9710e89bdb3b

Responses

Response samples

Content type
application/json
Example
{
  • "corrUUID": "19a1faa0-9222-11e9-8544-9d8142666fed",
  • "data": {
    },
  • "responderGLN": "0361111111116",
  • "verificationTimestamp": "2019-06-18T23:37:56.893Z"
}

Get Lookup Directory entries and optionally add filter criteria

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.

Authorizations:
chron_auth
query 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.

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 true, returns only products owned by MediLedger members. If set to false, returns only products owned by companies that are not MediLedger members. If omitted, no filtering.

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 (sourceVrsId) property. This is the VRS that sourced this LD entry. The VRS ID is an assigned 13 digit ID. If omitted, no filtering.

VrsProvider
String

Filter results to entries with the vrsProvider value set to the specified VRS provider name. If omitted, no filtering. To get the list of all VRS providers, make a GET /vrs-providers request.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get an LD entry

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.

Authorizations:
chron_auth
path Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "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"
}

Get a list of registered VRS service providers

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.

Authorizations:
chron_auth

Responses

Response samples

Content type
application/json
[
  • "string"
]

Protocol

(PROTOCOL) Verify an asset using peer-to-peer ports and X.509 certificates

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.

path Parameters
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:

  • '000' - connectivity testing.

  • '001' - Saleable Return Verification Request.

Request Body schema: application/json
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: 59bc5c88-15f7-49a7-9687-73b05d2c50a4

requestorGln
required
string^[0-9a-zA-Z]{13}$

GS1 Global Location Number (GLN) of the requestor.

email
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:

  • If this request was to a manufacturer's EPCIS system, this duration is the time in milliseconds that the EPCIS system took to respond.

  • If this request was to a MediLedger Gateway, this duration is the time in milliseconds that the external VRS system took to respond to the MediLedger Private Node.

upstream_status_code
integer or null

HTTP response code of the upstream system to the verification request:

  • If this request was to a manufacturer's EPCIS system, this is the HTTP response code of the EPCIS system.

  • If this request was to a MediLedger Gateway, this is the HTTP response code of the external VRS system.

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.

Responses

Request samples

Content type
application/json
{
  • "correlationGuid": "string",
  • "requestorGln": "string",
  • "email": "string",
  • "telephone": "string",
  • "context": "dscsaSaleableReturn",
  • "ctrlPossessAtt": "true",
  • "upstream_response_time": 10000000000,
  • "upstream_status_code": 0,
  • "requestorPrefix": "string",
  • "data": {
    },
  • "originalRequestInfo": {
    }
}

Response samples

Content type
application/json
{
  • "responderGln": "string",
  • "correlationGuid": "string",
  • "data": {
    },
  • "vrsName": "string",
  • "originalResponseInfo": {
    }
}