POST /api/v3/private/files/upload-intents HTTP/1.1
Host: your-exchange
Accept: application/json
Authorization: Bearer <token>
X-Api-Signature-Version: v2
X-Api-Timestamp: <unix_timestamp>
X-Api-Nonce: <nonce>
X-Api-Signature: sha256=<hex_digest>
Idempotency-Key: <idempotency_key>
Content-Type: application/json
{
"purpose": "identity_verification",
"field_key": "proof"
}
{
"state": 0,
"message": "<string>",
"result": {
"upload_intent": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"purpose": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"field_key": "<string>",
"status": "pending",
"allowed_extensions": [
"<string>"
],
"max_bytes": 123,
"file": {},
"expires_at": "2023-11-07T05:31:56Z",
"committed_at": "2023-11-07T05:31:56Z",
"consumed_at": "2023-11-07T05:31:56Z"
}
},
"meta": {
"request_id": "<string>",
"correlation_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"mode": "page",
"current_page": 2,
"per_page": 2,
"total": 1,
"last_page": 2,
"from": 123,
"to": 123,
"has_more": true
},
"filters": {},
"sort": [
"<string>"
],
"summary": {
"total": 123,
"bonus_sum": "<string>",
"currency": "<string>",
"confirmed_accruals": 123,
"by_currency": [
{
"currency": "<string>",
"bonus_sum": "<string>",
"confirmed_accruals": 123
}
]
}
}
}Файлы
Создать одноразовое разрешение на загрузку
Создайте одноразовое разрешение на загрузку файла для проверки. Используйте полученный идентификатор при загрузке.
POST
/
private
/
files
/
upload-intents
POST /api/v3/private/files/upload-intents HTTP/1.1
Host: your-exchange
Accept: application/json
Authorization: Bearer <token>
X-Api-Signature-Version: v2
X-Api-Timestamp: <unix_timestamp>
X-Api-Nonce: <nonce>
X-Api-Signature: sha256=<hex_digest>
Idempotency-Key: <idempotency_key>
Content-Type: application/json
{
"purpose": "identity_verification",
"field_key": "proof"
}
{
"state": 0,
"message": "<string>",
"result": {
"upload_intent": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"purpose": "<string>",
"resource_type": "<string>",
"resource_id": "<string>",
"field_key": "<string>",
"status": "pending",
"allowed_extensions": [
"<string>"
],
"max_bytes": 123,
"file": {},
"expires_at": "2023-11-07T05:31:56Z",
"committed_at": "2023-11-07T05:31:56Z",
"consumed_at": "2023-11-07T05:31:56Z"
}
},
"meta": {
"request_id": "<string>",
"correlation_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"mode": "page",
"current_page": 2,
"per_page": 2,
"total": 1,
"last_page": 2,
"from": 123,
"to": 123,
"has_more": true
},
"filters": {},
"sort": [
"<string>"
],
"summary": {
"total": 123,
"bonus_sum": "<string>",
"currency": "<string>",
"confirmed_accruals": 123,
"by_currency": [
{
"currency": "<string>",
"bonus_sum": "<string>",
"confirmed_accruals": 123
}
]
}
}
}English version
Подпишите запрос HMAC v2. Требуется право
public-api:files:write. Принимает заголовок Idempotency-Key.
Для resource_type: order передайте resource_id собственной заявки. max_bytes начинается с 1024 и может быть уменьшен настройками проверки. Используйте фактические allowed_extensions, max_bytes и expires_at из ответа.
HTTP-пример содержит тестовые значения. Подставьте идентификаторы вашей тестовой установки и подпишите фактически отправляемые данные.
Связанные методы
POST /api/v3/private/files/upload-intents HTTP/1.1
Host: your-exchange
Accept: application/json
Authorization: Bearer <token>
X-Api-Signature-Version: v2
X-Api-Timestamp: <unix_timestamp>
X-Api-Nonce: <nonce>
X-Api-Signature: sha256=<hex_digest>
Idempotency-Key: <idempotency_key>
Content-Type: application/json
{
"purpose": "identity_verification",
"field_key": "proof"
}
Авторизации
Заголовки
Обязательная версия подписи запроса. Укажите v2 первой строкой канонического представления. Восьмой строкой добавьте Idempotency-Key без крайних пробелов или пустую строку при отсутствии ключа. Подписывайте исходные значения разобранного query.
Allowed value:
"v2"Тело
application/json