Write method
Writes product image usage statistics. A user's service account is used for authentication.
HTTP request
POST https://marketplace.api.cloud.yandex.net/marketplace/v1/metering/imageProductUsage/write
Request parameters
{
"validateOnly": true,
"productId": "string",
"usageRecords": [
{
"uuid": "string",
"skuId": "string",
"quantity": "string",
"timestamp": "string"
}
]
}
Field | Description |
---|---|
validateOnly | boolean (boolean) A message with the |
productId | string This is a required field. Marketplace product ID. The maximum string length is 50 characters. |
usageRecords[] | object Required field. List of product usage records (up to 25 records per request). List item numbers must fall in the range between 1 and 25. |
usageRecords[]. uuid |
string Required field. Unique identifier of a usage record in UUID format. The maximum string length is 36 characters. |
usageRecords[]. skuId |
string Required field. Marketplace SKU ID for consumption, related to The maximum string length is 50 characters. |
usageRecords[]. quantity |
string (int64) Number of consumed SKUs measured in The value must be greater than 0. |
usageRecords[]. timestamp |
string (date-time) Required field. Reporting period UTC timestamp. String in the text format: RFC3339. |
Response
HTTP Code: 200: OK
{
"accepted": [
{
"uuid": "string"
}
],
"rejected": [
{
"uuid": "string",
"reason": "string"
}
]
}
Field | Description |
---|---|
accepted[] | object List of accepted product consumption records. |
accepted[]. uuid |
string Unique ID of a consumption record in UUID format. |
rejected[] | object List of rejected product consumption records with the reason specified. |
rejected[]. uuid |
string Unique ID of a consumption record in UUID format. |
rejected[]. reason |
string Reason for rejecting a record. |