Signed PUT URL for direct storage upload.
Why this method exists
Signed PUT URL for direct storage upload.
When to use
Large files or non-multipart clients.
Endpoint
POST /v1/internal/promo-code-incoming/upload-url
Authentication: JWT via Authorization: Bearer <token>. User must have project access and inventory_promo_codes permission.
Permission: inventory_promo_codes.import
Request example
{
"meta": { "requestId": "optional-uuid" },
"data": { "projectId": "a1b2…", "incomingId": "f47ac10b-…", "fileName": "codes.xlsx", "fileSizeBytes": 5242880 }
}
Response example
{
"success": true,
"data": {
"incomingId": "f47ac10b-…",
"uploadUrl": "https://supabase.promanta.ru/storage/v1/object/upload/sign/…",
"uploadMethod": "PUT",
"expiresAt": "2026-07-13T10:15:00Z",
"maxFileSizeBytes": 52428800
}
}
Errors
UNAUTHORIZED/ACCESS_DENIED— access deniedVALIDATION_ERROR— invalid bodyNOT_FOUND— resource not foundRATE_LIMIT_EXCEEDED(429) — rate limit
cURL
curl -X POST "https://api-external.promanta.ru/v1/internal/promo-code-incoming/upload-url" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT" \
-d '{"data": { "projectId": "a1b2…", "incomingId": "f47ac10b-…", "fileName": "codes.xlsx", "fileSizeBytes": 5242880 }}'