Перейти до вмісту

Get an upload token

Цей контент ще не доступний вашою мовою.

getUploadToken starts a binary upload. It returns a token that identifies the upload and a one-time URL to send the file to. Then follow the progress with getUploadStatus.

The method supports trusted mode with i_customer.

Name Type Required Description
i_upload_type int yes What the file contains: 1 routes of a destination set, 2 rates of a tariff. The upload_types dictionary of getDictionary lists the values
params struct yes The object to load into: {"i_destination_set": <id>} for routes, {"i_tariff": <id>} for rates
process_on dateTime no When to start processing the file, in UTC. Default: now, that is as soon as the file arrives
expires_on dateTime no Until when the upload URL accepts the file, in UTC. Default: now plus one day
Name Type Description
result string OK
token string Unique token of this upload; pass it to getUploadStatus
url string Unique URL to POST the file to

Load rates into tariff 12 and process them at night:

request
from datetime import datetime
call("getUploadToken", {
"i_upload_type": 2,
"params": {"i_tariff": 12},
"process_on": datetime(2026, 1, 16, 2, 0, 0),
})
response
{
"result": "OK",
"token": "5f0c2a9e7b1d4c38a6e2f1b0c9d8e7a6",
"url": "https://panel.example.com/…", # use exactly as returned
}