The ownership box allows merchants to issue digital twins at the customer’s account page in any e-commerce platform via a Universal Name.
To make integration possible, you should break the procedure into two parts. The primary step (/validate-name) will authenticate the UNS name and provide you with certain information required for the second step (/issue-digital-twin).
Step 1
GET /v1/validate-name?name=aunsname
Code: 200 OK
{
"data": {
"available": false,
"payload": {
"uns_name": "aunsname",
"uns_name_id": "uns_name_id",
"public_key": "public_key"
}
}
}
Step 2
POST /v1/issue-digital-twin
{
"public_key": "{{public_key}}",
"name_id": "{{uns_name_id}}",
"title": "My first DT",
"creator": "olyn",
"description": "First DT from the ownership box",
"quantity": 1,
"price": 100,
"currency": "EUR",
"brand": "",
"categories": ["Cat1", "Cat2"],
"links": ["https://google.com"],
"images": ["https://google.com/my_image.jpg"]
}