blockchainpaper.advancedsecure.co.uk Open in urlscan Pro
3.125.62.136  Public Scan

URL: https://blockchainpaper.advancedsecure.co.uk/
Submission: On August 22 via automatic, source certstream-suspicious

Form analysis 0 forms found in the DOM

Text Content

API DOCUMENTATION

 * Introduction
 * Issuances
    * Create Issuance   POST
    * Send Issuance Signed Transaction   POST
    * Create multi-issuance   POST
    * Get Issuances   GET
    * Get Issuance   GET
    * Get Issuance documents details  GET
    * Download Issuance documents  GET
    * Get Issuance documents links  GET
    * Delete Issuance documents  DELETE
    * Revoke Issuance   DELETE
    * Send Revoke Issuance Signed Transaction  DELETE

 * Documents
    * Download document   GET
    * Revoke document   DELETE
    * Delete document   DELETE
    * Send Revoke Issuance documents Signed Transaction   DELETE
    * Validate document   POST

 * Sub-clients
    * Get sub-clients   GET
    * Create sub-client   POST

 * Generic
    * Set logo   POST
    * User data   GET





INTRODUCTION

TO USE ANY OF THE API ENDPOINTS, YOU FIRST NEED TO ACQUIRE AN API KEY. CONTACT
US ON ENQUIRIES@BLOCK.CO TO GET YOUR API KEY.

Block.co's API provides you with programmatic access to all of the platform's
functionality and features, allowing you to issue, revoke and disseminate
blockchain-anchored digital documents, without having to handle the low-level
technical challenges of blockchain systems.

To gain access to the API you need to request an API key at enquiries@block.co.

Every request should contain an HTTP header Authorization: Token YOUR_API_KEY.

Please note that all API endpoint URLs should have a trailing slash `/` at the
end.




CREATE ISSUANCE

POST/ISSUANCE/

Creates an issuance of one or more documents and anchors it on the blockchain.
The issuance will first have a "PROCESSING" (15) status where the documents are
being processed and then a "ISSUED_PENDING" (20) status until the next block is
added in the blockchain (average time ~10 minutes). The status then becomes
"ISSUED" (25). Until the issuance's status becomes "ISSUED" (25), the issuance's
documents will not be valid when validated. You can periodically check GET
/issuance/{issuance_id}/ for the issuance status change. If the client has the
private key is his ownership, the response is different, it contains information
about the transaction and the raw data of the unsigned transaction that has to
be signed and published to anchor the certificate files.

This request's Content-Type should be multipart/form-data. The "file" field
contains a list of PDFs that are to be anchored, and the rest of the options
provide access to the various issuance settings.


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. file file FormData Required A list
of the PDF(s) to be issued. Example: S0001-John_Smith.pdf,
S0002-Robert_Plant.pdf name string FormData Required The issuance name. It will
not be published on the blockchain, it is used for archiving purposes. Example:
Test issuance description string FormData Optional An optional description for
the issuance. It will not be published on the blockchain, it's used for
archiving purposes. Example: Test description expiry_date ISO date string
FormData Optional An optional expiry date for the documents of the issuance.
Example 2020-05-14T21:00:00.000Z metadata JSON string FormData Optional A JSON
string that contains individual information (metadata) for each document. This
information will be injected into each document. Example:
id,name,email\nS0001,John Smith,foo@example.com\nS0002,Robert
Plant,bar@example.com cert_metadata_columns JSON string FormData Optional An
optional JSON string that controls visibility, label and ordering and will be
used for each metadata column when validating a document. This is only used if
the metadata field was included in the request. If metadata is present and this
is ommitted, the metadata fields will all be visible and have random ordering.
Example:
{"columns":[{"id":{"order":0,"label":"id","hide":true}},{"name":{"order":1,"label":"name","hide":false}},{"email":{"order":2,"label":"email","hide":true}}]}.
certificates_public Boolean FormData Optional If set to true, a public link
(e.g. https://app.block.co/certificate/a1234-b56d7-....) will be created that
will display and validate the document when visited. . There's also the option
to provide a custom subdomain that you own that will be used for creating the
public links (contact us to enable this function). Default: false qr_code
Boolean FormData Optional If set to true, a page with a QR-code will be appended
to each PDF document. Scanning this code with any QR-code scanner application
will visit the public link of the document. This option requires
certificates_public option to be enabled. Default: false webhook String FormData
Optional If this is set to a URL, this URL will receive a POST request with body
{ issuanceId: XX } when the issuance with this ID is confirmed on the
blockchain. Example https://example.org/issuance-ready


RESPONSE

{ issuanceId: 212 }


OR

{
    'issuanceId': 73,
    'tx_raw': '0200000001239f415e2b221d58cd142b1e3b7d20fb57488a4c9c316bf351cb4879d153b3040000000000ffffffff02b11f000000000000160014bb2063399ef159d8647671e5f41d55ba049e3ab00000000000000000326a3043524544000100042020202020202020bf8b7b3fe6cf3f4b5cea6d5a0b50729e1707fd4183cc1778dfeb270598b0ae3100000000',
    'address': 'tltc1qhvsxxwv779vaserkw8jlg824hgzfuw4svevc27',
    'tx_inputs': {
    '04b353d17948cb51f36b319c4c8a4857fb207d3b1e2b14cd581d222b5e419f23': 0.00013183
    }
}
                                        


CREATE ISSUANCE

POST/ISSUANCE/{ISSUANCE_ID}/SENDSIGNEDTX/

This endpoint is only for users which have the private key in their ownership,
sends a signed transaction to server in order to be validated and published to
the network. The issuance will first have a "PROCESSING" (15) status where the
documents are being processed and then a "ISSUED_PENDING" (20) status until the
next block is added in the blockchain (average time ~10 minutes). The status
then becomes "ISSUED" (25). Until the issuance's status becomes "ISSUED" (25),
the issuance's documents will not be valid when validated. You can periodically
check GET /issuance/{issuance_id}/ for the issuance status change.

This request's Content-Type should be multipart/form-data. The "file" field
contains a list of PDFs that are to be anchored, and the rest of the options
provide access to the various issuance settings.


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. txraw String FormData Required The
raw data of signed transaction issuance_id int URL Required The id of the
issuance to be revoked.


RESPONSE

 { 'issuanceId': 71, 'txid': '04b353d17948cb51f36b319c4c8a4857fb207d3b1e2b14cd581d222b5e419f23' }


CREATE MULTI-ISSUANCE

POST/MULTI-ISSUANCE/

This endpoint is similar to the Create issuance endpoint, but it is meant to be
used to issue documents on behalf or your account's sub-clients (see Sub-clients
section). The only difference with the "Create Issuance" endpoint is that the
CSV string in the request should contain a column __SUB_CLIENT_ID__ associating
each document with a sub-client that was created by your account.)

Note: In order to use this feature your account should be authorized for this.
Please contact us for more details.

Creates an issuance of one or more documents and anchors it on the blockchain.
The issuance will be on a "ISSUED_PENDING" (20) state until the next block is
added in the blockchain (average time ~10 minutes). Until the issuance's status
becomes "ISSUED" (25), the issuance's documents will not be valid when
validated. You can periodically check GET /issuance/{issuance_id}/ for the
issuance status change.

This request's Content-Type should be multipart/form-data. The "file" field
contains a list of PDFs that are to be anchored, and the rest of the options
provide access to the various issuance settings.


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. file file FormData Required A list
of the PDF(s) to be issued. Example: S0001-John_Smith.pdf,
S0002-Robert_Plant.pdf name string FormData Required The issuance name. It will
not be published on the blockchain, it is used for archiving purposes. Example:
Test issuance description string FormData Optional An optional description for
the issuance. It will not be published on the blockchain, it's used for
archiving purposes. Example: Test description expiry_date ISO date string
FormData Optional An optional expiry date for the documents of the issuance.
Example 2020-05-14T21:00:00.000Z metadata JSON string FormData Required A JSON
string that contains individual information (metadata) for each document. This
information will be injected into each document. Example:
id,name,email\nS0001,John Smith,foo@example.com\nS0002,Robert
Plant,bar@example.com cert_metadata_columns JSON string FormData Optional An
optional JSON string that controls visibility, label and ordering and will be
used for each metadata column when validating a document. This is only used if
the metadata field was included in the request. If metadata is present and this
is ommitted, the metadata fields will all be visible and have random ordering.
Example:
{"columns":[{"id":{"order":0,"label":"id","hide":true}},{"name":{"order":1,"label":"name","hide":false}},{"email":{"order":2,"label":"email","hide":true}}]}.
certificates_public Boolean FormData Optional If set to true, a public link
(e.g. https://app.block.co/certificate/{document.link_id}) will be created that
will display and validate the document when visited. There's also the option to
provide a custom subdomain that you own that will be used for creating the
public links. Default: false qr_code Boolean FormData Optional If set to true, a
page with a QR-code will be appended to each PDF document. Scanning this code
with any QR-code scanner application will visit the public link of the document.
This option needs certificates_public option to be enabled. Default: false
webhook String FormData Optional If this is set to a URL, this URL will receive
a POST request with body { issuanceId: XX } when the issuance with this ID is
confirmed on the blockchain. Example https://example.org/issuance-ready


RESPONSE

{ issuanceId: 212 }


GET ISSUANCES

GET/ISSUANCE/

All account's issuances are returned.

Possible issuance statuses are:

    PROCESSING = 15
    ISSUED_PENDING = 20
    ISSUED = 25
    EXPIRED = 30
    REVOKED_PENDING = 40
    REVOKED = 45
    FAILED = 100




REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. page int Query parameter Optional
The resulting list of issuances is paginated in pages of 10 objects. If the
parameter is ommitted, the first page will be returned by default. A page query
parameter is required to get the appropriate page. Example: ?page=2


RESPONSE

    {
        "total": 12,
        "results": [
            {
                "id": 159,
                "issued_at": "2020-05-07T04:54:34.483291Z",
                "name": "Test Issuance",
                "status": 25
            }, ...
        ]
    }


GET ISSUANCE

GET/ISSUANCE/{ISSUANCE_ID}/

Returns issuance status and details.

Possible issuance statuses are:

    PROCESSING = 15
    ISSUED_PENDING = 20
    ISSUED = 25
    EXPIRED = 30
    REVOKED_PENDING = 40
    REVOKED = 45
    FAILED = 100




REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. issuance_id int URL Required The
details of the issuance with this id will be returned.


RESPONSE

    {
        "id": 159,
        "name": "Test Issuance",
        "description": "",
        "status": 25,
        "issued_at": "2020-05-07T04:54:34.483291Z",
        "uploaded_to_cloud": true,
        "expiry_date": null,
        "txid": "4fca946497e50209ff84b06471ca5173c8bd86d4d53b66e7a807fbe0db51f783",
        "user": "vasilis",
        "documents": {
            "total": 1000,
            "revoked": 5,
        }
    }


GET ISSUANCE DOCUMENT DETAILS

GET/ISSUANCE/{ISSUANCE_ID}/DOCUMENTS-DETAILS/

Returns a list of all document details in an issuance.

Possible document statuses are:

    ISSUED_PENDING = 20
    ISSUED = 25
    EXPIRED = 30
    REVOKED_PENDING = 40
    REVOKED = 45
    FAILED = 100




REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. issuance_id int URL Required The
issuance_id for which you want the document details page int Query parameter
Optional Document details results are paginated in pages of 50 objects. If the
parameter is ommitted, the first page will be returned by default. A page query
parameter is required to get the appropriate page. Example: ?page=2


RESPONSE

    {
        "total": 2,
        "page": 1,
        "results": [
            {
                "id": 52131,
                "original_name": "s01-John_Smith.pdf",
                "metadata": {
                    ...
                },
                "status": 25,
                "link_id": "12345-1234-12425-123213",
                "sub_client_name": null
            },
            {
                "id": 52132,
                "original_name": "s02-Robert_Plant.pdf",
                "metadata": {
                    ...
                },
                "status": 25,
                "link_id": "12345-1234-12425-123213",
                "sub_client_name": null
            }
        ]
    }


DOWNLOAD ISSUANCE DOCUMENTS

GET/ISSUANCE/{ISSUANCE_ID}/DOCUMENTS/

Returns all the documents of the requested issuance as a ZIP file. This is
allowed even when the issuance's status is pending, but the documents will not
be valid when validated until the next block is mined on the blockchain (average
10 minutes).


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. issuance_id int URL Required The ID
of the issuance.


RESPONSE

All PDF documents as a ZIP file.


GET ISSUANCE DOCUMENT LINKS

GET/ISSUANCE/{ISSUANCE_ID}/LINKS/

Returns a list of all document links in an issuance.


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. issuance_id int URL Required The
issuance_id for which you want the document details


RESPONSE

    {
        "s01-Kostas_Karasavvas.pdf": "https://block-test.co/certificate/26817703-23b9-4178-a241-d8c262b441af/",
        "s02-Andreas_Vlachos.pdf": "https://block-test.co/certificate/d78be6ef-00b7-44a8-8c67-a4704efc1ca3/"
    }
    


DELETE ISSUANCE DOCUMENTS

DELETE/ISSUANCE/{ISSUANCE_ID}/DOCUMENTS/

Delete all documents of the given issuance from Block.co's cloud (e.g. for GDPR
purposes). This action cannot be undone.

Deleting the documents of an issuance prevents many additional features from
working. You won't be able to download the documents again, Public links and
QR-codes validation (if selected when issuing) will stop working etc.


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. issuance_id int URL Required The ID
of the issuance.


RESPONSE

A response with status 200 will be returned on success.


REVOKE ISSUANCE

DELETE/ISSUANCE/{ISSUANCE_ID}/

Revokes the issuance (all of the documents). As with issuing, the issuance
status will be "REVOKED_PENDING" for an average of 10 minutes until the next
block is mined on the blockchain. If the client has the private key is his
ownership, the response is different, it contains information about the
transaction and the raw data of the unsigned transaction that has to be signed
and published to validate the revocation of the issuance certificate files.


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. issuance_id int URL Required The id
of the issuance to be revoked.


RESPONSE

On success an empty response with status 204


OR

{
  'issuanceId': 87,
  'tx_raw': '0200000001812ee21cff5fc6a0ffe0367f877a2912db61f1bed63d73cff3bf460ad49e61eb0000000000ffffffff029ed4000000000000160014bb2063399ef159d8647671e5f41d55ba049e3ab000000000000000002a6a284352454400010008f02659968d330acc8efb0ff37ee0347071262143749aa4d6423876e39321cff400000000',
  'address': 'tltc1qhvsxxwv779vaserkw8jlg824hgzfuw4svevc27',
  'tx_inputs': {
    'eb619ed40a46bff3cf733dd6bef161db12297a877f36e0ffa0c65fff1ce22e81': 0.00057972
  }
}
					


REVOKE ISSUANCE

DELETE/ISSUANCE/{ISSUANCE_ID}/SENDSIGNEDTX/

This endpoint is only for users which have the private key in their ownership,
sends a signed transaction to server in order to be validated and published to
the network. Revokes the issuance (all of the documents). As with issuing, the
issuance status will be "REVOKED_PENDING" for an average of 10 minutes until the
next block is mined on the blockchain.


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. txraw String FormData Required The
raw data of signed transaction issuance_id int URL Required The id of the
issuance to be revoked.


RESPONSE

On success empty response with status 204




DOWNLOAD DOCUMENT

GET/DOCUMENT/{DOCUMENT_ID}/

Returns the requested document as a PDF file. This is allowed even when the
issuance's status is pending, but the document will not be valid when validated
until the next block is mined on the blockchain (average 10 minutes).


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. document_id int URL Required The id
of the document to be downloaded


RESPONSE

The PDF file as an attachment




REVOKE DOCUMENT

DELETE/DOCUMENT/{DOCUMENT_ID}/

Revokes the specified document. The document's status will be "REVOKED_PENDING"
for an average of 10 minutes until the next block is mined on the blockchain. If
the client has the private key is his ownership, the response is different, it
contains information about the transaction and the raw data of the unsigned
transaction that has to be signed and published to validate the revocation of
the certificate files.




REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. document_id int URL Required The id
of the document to be revoked


RESPONSE

On success an empty response with status 204




REVOKE DOCUMENT

DELETE/DOCUMENT/{DOCUMENT_ID}/SENDSIGNEDTX/

This endpoint is only for users which have the private key in their ownership,
sends a signed transaction to server in order to be validated and published to
the network.Revokes the specified document. The document's status will be
"REVOKED_PENDING" for an average of 10 minutes until the next block is mined on
the blockchain.


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. document_id int URL Required The id
of the document to be revoked txraw String FormData Required The raw data of
signed transaction


RESPONSE

On success an empty response with status 204




DELETE DOCUMENT

DELETE/DELETE-DOCUMENT/{DOCUMENT_ID}/

Deletes the specified document from Block.co's storage. This could be done for
example to satisfy GDPR requirements.

WARNING: You won't be able to download this document again! Public link
validation (and QR-code validation) will not work anymore!

WARNING: The validation status of the document (if you have already downloaded
it and try to validate it in a validator) won't change with this action. If it
is valid, it will continue being valid. After this action, you won't be able to
revoke this document!


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. document_id int URL Required The id
of the document to be delete from Block.co's storage


RESPONSE

On success an empty response with status 204




VALIDATE DOCUMENT

POST/VALIDATE-DOCUMENT/

Check the validity of a document.

This request's Content-Type should be multipart/form-data. The "file" field
should be a list containing only the PDF that is to be validated.


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. file file FormData Required The PDF
to be validated. Example: S0001-John_Smith.pdf


RESPONSE

    On success a response with status 200 and a dict with document's information:
    {
        "cert": {PDF_FILENAME},
        "status": {VALIDATION_STATUS} ( "valid" / "invalid" ),
        "reason": {EXPLANATION_OF_THE_VALIDITY_RESULT}
    }
                                        




GET SUBCLIENTS

GET/AUTH/SUB-CLIENT/

Returns a list of all the sub-clients the client has created.

Note: In order to create sub-clients and issue on behalf of them your account
must have been authorized for it


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'.


RESPONSE

    [
        {
        "id": 25,
        "name": "Subclient of Account",
        "logo": null,
        "domain": "https://example.org"
        },
        {
        "id": 27,
        "name": "Subclient2 of Account",
        "logo": null,
        "domain": "https://example2.org"
        }
    ]
                                        


CREATE SUB-CLIENT

POST/AUTH/SUB-CLIENT/

Create a sub-client under your account's organization. You may then use the
Create multi-issuance endpoint to create issuances on behalf of sub-clients you
have created. You can set/change a sub-client's logo (visible when someone
validates a sub-client's document) using the Set client logo endpoint.

Note: This should be a POST request with `application/x-www-form-urlencoded`
content-type


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. name string Body Required
Organization name of the sub-client. Example: University of Nicosia` domain
string Body Required URL of the sub-client's domain. Example:
https://example.org


RESPONSE

{ "sub_client_id": 28 }




SET CLIENT LOGO

POST/CLIENT/{CLIENT_ID}/LOGO/

Set your organization's or one of your subclient's logo. The logo is visible
when validating a document, in the public link of the document and when sending
an email (through the web app).

Note: This request's Content-Type should be multipart/form-data. The "file"
field should contain only the logo you decide to show up in the link, email and
validate actions of a document.


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'. client_id int URL Required The ID
of the client. file file FormData Required The file of the logo to be set, it
should be in a picture format (jpeg,png...)


RESPONSE

{"logo": "{CLIENT_ID}/logo/{UPLOADED_FILENAME}"}




USER DATA

GET/AUTH/USER-DATA/

Get data for the current user (the associated account for the API_KEY).


REQUEST

Parameter Type Position # Description Authorization string Header Required
Should be of the form: 'Token YOUR_API_KEY'.


RESPONSE

    {
    "username": {CURRENT_USERNAME},
    "email": {USER'S_EMAIL},
    "verified_email": true,
    "client": {
        "id": {ORGANIZATION_ID},
        "name": {ORGANIZATION_NAME},
        "logo": {ORGANIZATION_ID}/logo/{UPLOADED_FILENAME},
        "domain": {ORGANIZATION_WEBSITE},
        "domain_identity_proof": true,
        "issuing_addresses": [
            {ORGANIZATION_BLOCKCHAIN_ADDRESS}
        ],
        "contract_type": "Contract",
        "has_pending_order": false,
        "client_links_domain": null,
        "options": {
            ...
            }
        }
    }
                                        



© 2020 Block.co. All Rights Reserved.