Token Güncelle
Mevcut bir token'ı güncelleyin.
Endpoint: PUT /api/v1/integration/tokens/{id}
Kimlik Doğrulama: Gerekli (Bearer token)
Gerekli Header'lar:
Authorization: Bearer <access_token>
X-Target-Server: integration
Yol Parametreleri
| Parametre | Tip | Gerekli | Açıklama |
|---|---|---|---|
id | string (UUID) | Evet | Token ID |
Yanıt
Durum: 200 OK
Tam detaylarla güncellenmiş token nesnesini döndürür.
{
"id": "4c3e2fd0-cbed-4c01-aad5-e39fa9e17fa4",
"node_id": "e40efce4-38a3-46c4-a202-e8db95d0409c",
"distributor_id": "084a5159-1546-4ade-a7ba-956e0234a417",
"currency_token_id": "c94c94fc-479d-4d08-bba0-123a210c174c",
"chain_id": 1,
"name": "Updated Token Name Yeni bir at",
"description": "This is a sample token description",
"symbol": "MTK",
"value": 100.5,
"supply": 1000000,
"external_id": "ext_token_12345",
"contract": {
"address": "0x1234567890123456789012345678901234567890",
"hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
},
"rules": {
"max_purchase_limit": 10000,
"min_purchase_limit": 100
},
"status": 2,
"integration": {
"chain_id": 1,
"abi": "[{\"inputs\":[],\"name\":\"transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
"contract_address": "0x9876543210987654321098765432109876543210",
"function_name": "transfer",
"currency_token_address": "0x1111111111111111111111111111111111111111",
"is_approved": true,
"args": [
{
"type": "address",
"value": "0x2222222222222222222222222222222222222222",
"description": "Recipient address"
},
{
"type": "uint256",
"value": "1000000000000000000",
"description": "Amount to transfer"
}
]
},
"meta": {
"images": [
{
"id": "073a551e-583f-498d-8b2f-c8d088995d30",
"url": "https://example.com/images/token-logo.png",
"is_default": true,
"hash": "abc123def456",
"created_at": "2025-12-24T10:05:48.503461Z"
},
{
"id": "c89102a7-ded1-4d97-b503-d85af888ffc8",
"url": "https://example.com/images/token-banner.jpg",
"is_default": false,
"hash": "def456ghi789",
"created_at": "2025-12-24T10:05:48.504681Z"
}
],
"documents": [
{
"id": "56a00061-8336-4009-9247-01eaad054e7c",
"name": "Whitepaper",
"url": "https://example.com/documents/whitepaper.pdf",
"type": 2,
"hash": "whitepaper_hash_123",
"created_at": "2025-12-24T10:05:48.505861Z"
},
{
"id": "fc7a8a2a-7e35-4169-9293-0f272c1fb0eb",
"name": "Terms of Service",
"url": "https://example.com/documents/terms.pdf",
"type": 3,
"hash": "terms_hash_456",
"created_at": "2025-12-24T10:05:48.50757Z"
}
]
},
"created_at": "2025-12-24T10:05:48.497865Z",
"updated_at": "2025-12-24T10:05:48.497865Z"
}
Örnek cURL İsteği
curl -X PUT https://<base-url>/api/v1/integration/tokens/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer <access_token>" \
-H "X-Target-Server: integration" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Token Name",
"status": 2
}'