Uploading Screenshots
The method allows you to upload application screenshots.
Limitations:
- screenshots can be vertical or horizontal;
- aspect ratio for screenshots — 16:9 (horizontal) and 9:16 (vertical);
- dimensions of the uploaded file — at least 320px and no more than 3840px;
- uploaded file format —
.jpgor.png; - file size — no more than 5 MB;
- minimum number of screenshots for publication — 3;
- uploading screenshots of different orientations is prohibited. For example, a user uploaded a vertical orientation (
PORTRAIT) and wants to upload a horizontal one (LANDSCAPE) — the request will return an error; - when uploading more than 10 screenshots, existing screenshots will become inactive. For example, if you upload two screenshots with the parameter
"ordinal" = 7, the last uploaded screenshot will be the active one.
Interaction Parameters
POST
https://public-api-m.rustore.ru/public/v1/application/{packageName}/version/{versionId}/image/screenshot/{orientation}/{ordinal}
| Attribute | Type | Required | Location | Description |
|---|---|---|---|---|
Public-Token | string | Yes | header | Access token for RuStore Public API. |
packageName | number | Yes | path | Application identifier. |
versionId | number | Yes | path | Application version. |
orientation | string | Yes | path | Image orientation. Possible values: • LANDSCAPE — horizontal orientation; • PORTRAIT — vertical orientation. |
ordinal | number | Yes | path | Screenshot ordinal number. Possible values: from 0 to 9. |
Form data
| Attribute | Type | Required | Description |
|---|---|---|---|
file | multipart/form-data | Yes | File. |
Response Parameters
| Attribute | Type | Required | Description | Example |
|---|---|---|---|---|
code | string | Yes | Response code. | error/OK |
message | string | No | Response code description. | N/A |
timestamp | timestamptz | Yes | Response time. | 2022-07-08T13:24:41.8328711+03:00 |
Request Example
curl --location --request POST 'https://public-api-m.rustore.ru/public/v1/application/com.package.example/version/123/image/screenshot/landscape/1' \
--header 'Content-Type: application/json' \
--header 'Public-Token: {YOURtoken}' \
--form 'file=@"/Users/User/Downloads/img.jpg"'
tip
The minimum number of screenshots for publication is 3. This requirement applies to both v1 and v2 versions of the screenshot upload method.