Skip to main content

API 5: Update Details

Update details API

This API allows you to do the following changes to your current verify pages:

  • Update Document Details Table

  • Manage Access (Public/Private)

  • Update Viewer List for existing Private Verify Pages

  • Manage Verify Page Status: Raise Product Recall or Disable an active verify page or Enable a verify page which has been disabled or a product recall has been raised in the past.

ItemDescription
Provider Endpoint URIhttps://my.veridocglobal.com/api/update
Interface descriptionRequest to update details
Mode of InterfaceRESTFUL API (JSON)
SecurityAuthorization Header: Access Key
Supports Multi-RecordsNo
Method(s)POST
Request Body Content-TypeApplication/JSON

Sample update-details request header:

Request Header

Content-Type: application/x-www-form-urlencoded
Content-Length: 0
apikey: < To enter API Key as provided by VeriDoc Global >
payload: < SHA256 HASH of (APIKEY(All parameter’s data as included in your request body between double quotes without any extra spaces or characters in the order as given in the body below)SECRETKEY) >

Sample update-details request body:

Request Body

{
"uniqueid": "7f9f2b05-4cb7-4552-a1cb-88e2ba8889f6",
"metadata": "Product Name: Butter || Product Code: BT12345 || Expiry Date: 23/12/2022,
"parent_delimiter": "||",
"child_delimiter": ":",
"Ispublic": 0 or 1,
"authorizedusers": "john.smith@abc.com; andrew.white@def.com",
"qrcodestatus": "active OR productrecall OR disable",
"message": "enter message here",
}
Field NameDescriptionMandatory Comments
UniqueidEnter uniqueid received in API 1 responseYesEvery QR code received as response of Generate QR Code API contains a unique ID (uniqueid) that needs to be passed in this parameter for the verify page that needs to be updated
Metadata
parent_delimiter
child_delimiter
Pass new metadata string if you would like to reset the current Metadata String. Any information that you submit by calling this parameter using this API will replace the existing details in the Document Details Table of your verify page.NoPlease include all data as payload if you add this parameter to the request body.

If you are unsure on how to create and send metadata correctly, please check the submit document API for sample metadata.
Ispublic
authorizedusers
0 or 1

The verify page can be set to public or private access using this parameter

List of existing viewers can also be updated using this parameter. To do so, please send a new authorized user list which will overwrite existing users.

Please note:

1. You can change a private verify page to public and vice versa.
2. When declaring a page as private ("Ispublic": 0) please always send a list of authorized users.
NoIf Public QR code: 1 or NULL (i.e., no Ispublic required in the body)

If Private QR Code: 0 and add all the emails for the users whom you would like to grant access for view.

To add multiple emails for private QR code use the following file separator:
"Ispublic": 0,
"authorizedusers":
“john.smith@abc.com;
andrew.white@def.com;
peter.wood@xyz.com”

Please include all data as payload if you add this parameter to the request body.
qrcodestatus messageactive
By default all verify pages are active after the submit document API is called successfully. No message required for active verify pages.

productrecall
You can set a QR code to be recalled, this will add a red banner on the verify page.

disable
You can disable an active verify page and show a message to verifiers instead of the contents of verify page.
Status: productrecall is only valid for verification pages that are hosted on VeriDoc Global’s domain as banners can only be added on pages we control. For cases where you have opted for redirecturl, please set status as disable or manage the recall messages on your verify page after the user gets redirected to your domain.

Example of all available verify page status:

Active:https://veridocglobal.com/verify/mainnet/TestExtension/e9d8f7c7-7699-47c1-ac20-3fb6fc2fefbd

Product Recall:https://veridocglobal.com/verify/mainnet/TestExtension/2377067e-5de7-49b1-889b-f030f02cc14f

Disabled:https://veridocglobal.com/verify/mainnet/TestExtension/d06bc3a0-c21d-46be-8a07-c7dcd719732c

Sample update-details response:

{
"filehash": "56A91EE4F228C8A3DF3C0B6F2EE4379228F8204CB952AD300D7496309BA1F744",
"uniqueid": "da6d76d3-ac98-4ffc-95d0-f28d9dc0540a",
"returncode": 1,
"message": "Requested values updated successfully. "
}
Field NameDescriptionMandatory Comments
returncodeRefers to the status1 – Success
Any other returncode (e.g. 2,3,4… means Authorization failed or parameters are missing/empty)
uniqueid/guidUnique Identifier ID for Transaction
messageMessage describing the return codeFind all possible messages in Docs tab > Response Codes