Skip to main content

Tags

Introduction

This page explains the APIs for retrieving and updating the information, and transferring the ownership of a tag. For testing, please insert "https://sandbox-staging-app.berify.io" into the {domain} section of the URL.

Get specific tag

GET /tags/{tokenId}

Retrieves the information of a single tag.

Request header:

  • secretKey: string. Use "App-Berify-Secret".
  • secret: string

Request parameters:

  • tokenId: string. The tokenId is the tagTokenId obtained when scanning the tag. #Scan

Example:

https://{domain}/api/tags/{tokenId}

Response:

  • batchId: string
  • tokenId: string
  • batchSerialNumber: number
  • batch:
    • experience:
      • isGlobal: boolean
{
"batchId": "8a8dd60e-d5cf-4378-a1c7-b74110bc8373",
"tokenId": "c738ef3b-a882-40ef-a7e8-0474178f6631",
"batchSerialNumber": 1,
"batch": {
"experience": {
"isGlobal": true
}
}
}

HTTP status code summary:

  • 200 (OK) - Everything worked as expected.
  • 401 (Unauthorized) - Invalid or missing access token.
  • 405 (Method Not Allowed) - Unacceptable HTTP method for requested resource.

Get specific tags

GET /tags/{tokenId}?batchId={batchId}&batchSerialNumberGte={batchSerialNumberGte}&batchSerialNumberLte={batchSerialNumberLte}

Retrieves the tokenId of multiple tags.

Request header:

  • secretKey: string. Use "App-Berify-Secret".
  • secret: string

Request parameters:

  • tokenId: string.The tokenId is the tagTokenId obtained when scanning the tag. #Scan
  • batchId: string
  • batchSerialNumberGte: number (Range to GET)
  • batchSerialNumberLte: number (Range to GET)

Example:

https://{domain}/api/tags/{tokenId}?batchId={batchId}&batchSerialNumberGte=1&batchSerialNumberLte=2

Response:

  • tokenId: string
  • batchSerialNumber: number
{
{
"tokenId": "a17d2839-67b4-4e35-99ba-0d434eccd526",
"batchSerialNumber": 1
},
{
"tokenId": "41de7fe5-4459-45ae-9c8f-649d3fe9d1a4",
"batchSerialNumber": 2
}
}

HTTP status code summary:

  • 200 (OK) - Everything worked as expected.
  • 401 (Unauthorized) - Invalid or missing access token.
  • 405 (Method Not Allowed) - Unacceptable HTTP method for requested resource.

Update tag info visible

UPDATE /tags/{tokenId}/infoVisible

Updates the status of the infoVisible field of the tag.

Request header:

  • secretKey: string. Use "App-Berify-Secret".
  • secret: string

Request parameters:

  • tokenId: string. The tokenId is the tagTokenId obtained when scanning the tag. #Scan

Request body:

  • ownerId: string. The ownerId is the userId of oneself. It needs to be obtained through third party login to retrieve one's own userId.
  • isInfoVisible: boolean

Example:

https://{domain}/api/tags/{tokenId}/infoVisible

Response:

  • error: string | undefined
{}

HTTP status code summary:

  • 200 (OK) - Everything worked as expected.
  • 401 (Unauthorized) - Invalid or missing access token.
  • 405 (Method Not Allowed) - Unacceptable HTTP method for requested resource.

Update tag owner

POST /tags/{tokenId}

Updates the tag owner of a single tag.

Request header:

  • secretKey: string. Use "App-Berify-Secret".
  • secret: string

Request parameters:

  • tokenId: string. The tokenId is the tagTokenId obtained when scanning the tag. #Scan

Request body:

  • ownerId: string. The ownerId is the userId of oneself. It needs to be obtained through third party login to retrieve one's own userId.

Example:

https://{domain}/api/tags/{tokenId}

Response:

  • tagTokenId: string
  • error: string | undefined
{
"tagTokenId": "a17d2839-67b4-4e35-99ba-0d434eccd526"
}

HTTP status code summary:

  • 200 (OK) - Everything worked as expected.
  • 401 (Unauthorized) - Invalid or missing access token.
  • 405 (Method Not Allowed) - Unacceptable HTTP method for requested resource.

Undo transfer tag owner

DELETE /tags/{tokenId}/transfer

Deletes the ownership of the tag.

Request header :

  • secretKey : string. Use "App-Berify-Secret".
  • secret : string

Request parameters :

  • tokenId : string. The tokenId is the tagTokenId obtained when scanning the tag. #Scan

Request body :

  • ownerId : string. The ownerId is the userId of oneself. It needs to be obtained through third party login to retrieve one's own userId.

Example :

https://{domain}/api/tags/{tokenId}/transfer

Response :

  • tagTokenId : string
  • error : string | undefined
{
"tagTokenId": "a17d2839-67b4-4e35-99ba-0d434eccd526"
}

HTTP status code summary :

  • 200 (OK) - Everything worked as expected.
  • 401 (Unauthorized) - Invalid or missing access token.
  • 405 (Method Not Allowed) - Unacceptable HTTP method for requested resource.