Modify attributes of an owned item (only if the product is 'platform managed'). Only attributes that are put on DYNAMIC will be taken into consideration.
curl --request POST \
--url https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes \
--header 'Content-Type: application/json' \
--data '
{
"ApiKey": "<string>",
"ProjectGuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TokenID": "<string>",
"IsIgnoreErrors": false,
"Atrtibutes": [
{
"Name": "<string>",
"Value": "<string>"
}
]
}
'import requests
url = "https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes"
payload = {
"ApiKey": "<string>",
"ProjectGuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TokenID": "<string>",
"IsIgnoreErrors": False,
"Atrtibutes": [
{
"Name": "<string>",
"Value": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
ApiKey: '<string>',
ProjectGuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
TokenID: '<string>',
IsIgnoreErrors: false,
Atrtibutes: [{Name: '<string>', Value: '<string>'}]
})
};
fetch('https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ApiKey' => '<string>',
'ProjectGuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'TokenID' => '<string>',
'IsIgnoreErrors' => false,
'Atrtibutes' => [
[
'Name' => '<string>',
'Value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes"
payload := strings.NewReader("{\n \"ApiKey\": \"<string>\",\n \"ProjectGuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"TokenID\": \"<string>\",\n \"IsIgnoreErrors\": false,\n \"Atrtibutes\": [\n {\n \"Name\": \"<string>\",\n \"Value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes")
.header("Content-Type", "application/json")
.body("{\n \"ApiKey\": \"<string>\",\n \"ProjectGuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"TokenID\": \"<string>\",\n \"IsIgnoreErrors\": false,\n \"Atrtibutes\": [\n {\n \"Name\": \"<string>\",\n \"Value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"ApiKey\": \"<string>\",\n \"ProjectGuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"TokenID\": \"<string>\",\n \"IsIgnoreErrors\": false,\n \"Atrtibutes\": [\n {\n \"Name\": \"<string>\",\n \"Value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"isError": "0",
"Error": ""
}Player Endpoints
Update Attributes
POST
/
Attributes
Modify attributes of an owned item (only if the product is 'platform managed'). Only attributes that are put on DYNAMIC will be taken into consideration.
curl --request POST \
--url https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes \
--header 'Content-Type: application/json' \
--data '
{
"ApiKey": "<string>",
"ProjectGuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TokenID": "<string>",
"IsIgnoreErrors": false,
"Atrtibutes": [
{
"Name": "<string>",
"Value": "<string>"
}
]
}
'import requests
url = "https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes"
payload = {
"ApiKey": "<string>",
"ProjectGuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"TokenID": "<string>",
"IsIgnoreErrors": False,
"Atrtibutes": [
{
"Name": "<string>",
"Value": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
ApiKey: '<string>',
ProjectGuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
TokenID: '<string>',
IsIgnoreErrors: false,
Atrtibutes: [{Name: '<string>', Value: '<string>'}]
})
};
fetch('https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ApiKey' => '<string>',
'ProjectGuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'TokenID' => '<string>',
'IsIgnoreErrors' => false,
'Atrtibutes' => [
[
'Name' => '<string>',
'Value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes"
payload := strings.NewReader("{\n \"ApiKey\": \"<string>\",\n \"ProjectGuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"TokenID\": \"<string>\",\n \"IsIgnoreErrors\": false,\n \"Atrtibutes\": [\n {\n \"Name\": \"<string>\",\n \"Value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes")
.header("Content-Type", "application/json")
.body("{\n \"ApiKey\": \"<string>\",\n \"ProjectGuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"TokenID\": \"<string>\",\n \"IsIgnoreErrors\": false,\n \"Atrtibutes\": [\n {\n \"Name\": \"<string>\",\n \"Value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://intern.payingame.io/rest/PayIngame/PublicAPI/Attributes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"ApiKey\": \"<string>\",\n \"ProjectGuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"TokenID\": \"<string>\",\n \"IsIgnoreErrors\": false,\n \"Atrtibutes\": [\n {\n \"Name\": \"<string>\",\n \"Value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"isError": "0",
"Error": ""
}Will update the attributes of an Item (if the item is put on DYNAMIC), based on the Token ID. In case of a web3 item, it will reconstruct the Json attached to the NFT.
This will only work if the product is identified as “platform managed”.
Body
application/json
The ID of the item that needs to be changed. This can be found by calling the 'items' or 'item' endpoint.
When this field is set to true, then the system will ignore items that are not existing in the attributes. If set to false, then it will not save any attribute in case of a problem.
Available options:
false Minimum array length:
1Show child attributes
Show child attributes
⌘I