Chips
A Chip
is a reference to an IYK-managed NFC chip.
Edit a chip
Edit the properties of chips belonging to your team.
Request
PATCH /chips
Headers
Header | Description | Required |
---|---|---|
x-iyk-api-key | API key for user | Yes |
Body
Field | Description | Type |
---|---|---|
tagUIDs | UniversalIDs of the tags to edit | string[] |
updates | Object of edits you want to apply across all chips | Updates (see below) |
Updates Properties
Field | Description | Type |
---|---|---|
redirectUrl | URL to redirect to when the chip is tapped. If set to null , chip returns to default behavior. If set to a Coinbase Wallet Deeplink (opens in a new tab), the iykRef will be properly encoded into the cb_url query parameter. | string | null |
Example Body
{
"tagUIDs": ["1111111111144444"],
"updates": {
"redirectUrl": "https://iyk.app/t/c/v1"
}
}
The above chip will now redirect to https://iyk.app/t/c/v1?iykRef=EXAMPLE
when tapped.
Response
{
"success": true
}
Find a chip via URL params
Get the UID of a chip from its URL parameters, and validate the link.
Request
GET /chips/find
Query Params
For NTAG 424:
Field | Description | Type |
---|---|---|
e | Encrypted payload from chip URL | string |
c | Encrypted payload from chip URL | string |
d | Encrypted payload from chip URL | number |
For KONG/ARX HaLo:
To be updated, as it is dependent on the version of the chip.
Response
{
"uid": "1148192980366208",
"isValidTap": true,
"linkedToken": {
"contractAddress": "0x7455c52486d32a1d8b3d48d2945ec7db25dce722",
"chainId": 137,
"tokenId": "51"
},
"otp": {
"code": "123456",
"expiresAt": "2023-06-30T00:00:00Z"
},
"poapEvent": {
"id": 10,
"poapEventId": 100,
"remainingCodesCount": 5
}
}
Field | Description | Type |
---|---|---|
uid | A unique identifier for the chip. | string |
isValidTap | A boolean indicating whether the tap is valid or not. | boolean |
linkedToken | Details of the linked token, if applicable. | object |
linkedToken.contractAddress | The contract address of the linked token. | string |
linkedToken.chainId | The chain ID of the linked token. | number |
linkedToken.tokenId | The token ID of the linked token. | string |
otp | Details about the OTP code for authenticating claims, if applicable. | object |
otp.code | The OTP code. | string |
otp.expiresAt | The expiration time of the OTP code. | string |
poapEvent | Details of the linked POAP event, if applicable. | object |
poapEvent.id | The ID of the POAP event. | number |
poapEvent.poapEventId | The POAP event ID. | number |
poapEvent.remainingCodesCount | The remaining number of codes for the POAP event. | number |
Get Chips by Chip Group
Retrieve a list of chips associated with a specific chip group in your workspace.
Request
GET /chips
Headers
Header | Description | Required |
---|---|---|
x-iyk-api-key | API key for user | Yes |
Query Parameters
Field | Type | Description | Required |
---|---|---|---|
chipGroupId | number | The unique identifier of the chip group. | Yes* |
name | string | The name associated with the chip group. | Yes* |
Note: At least one of chipGroupId
or name
must be provided. If both are provided, chipGroupId
takes precedence.
Example Query
curl --location 'https://iyk.app/chips?chipGroupId=234' \
--header 'x-iyk-api-key: <API_KEY>'
Response
The response is an array of objects, each representing a chip.
Response Object Properties
Field | Type | Description |
---|---|---|
uid | string | A unique identifier for the chip. |
createdAt | string | The timestamp when the chip was registered with IYK. |
isConfigured | boolean | Indicates whether the chip is configured (true ) or not (false ). |
Example Response
[
{
"uid": "1148192980366208",
"createdAt": "2022-11-05T14:37:06.357Z",
"isConfigured": true
},
...more items
]