Marketplace Metering API, REST: ImageProductUsage.Write
Writes image product's usage. Authentication is by user's service account.
HTTP request
POST https://marketplace.api.cloud.yandex.net/marketplace/metering/v1/imageProductUsage/write
Body parameters
{
"validateOnly": "boolean",
"productId": "string",
"usageRecords": [
{
"uuid": "string",
"skuId": "string",
"quantity": "string",
"timestamp": "string"
}
]
}
Field |
Description |
validateOnly |
boolean Checks whether you have the access required for the emit usage. |
productId |
string Required field. Marketplace Product's ID. |
usageRecords[] |
List of product usage records (up to 25 per request). |
UsageRecord
Field |
Description |
uuid |
string Required field. Unique identifier of the usage record (UUID format). |
skuId |
string Required field. Consumed Marketplace SKU ID, linked to |
quantity |
string (int64) Quantity of SKU consumed, measured in |
timestamp |
string (date-time) Required field. Timestamp in UTC for which the usage is being reported. String in RFC3339 To work with values in this field, use the APIs described in the |
Response
HTTP Code: 200 - OK
{
"accepted": [
{
"uuid": "string"
}
],
"rejected": [
{
"uuid": "string",
"reason": "string"
}
]
}
Field |
Description |
accepted[] |
List of accepted product usage records. |
rejected[] |
List of rejected product usage records (with reason). |
AcceptedUsageRecord
Field |
Description |
uuid |
string Unique identifier of the usage record (UUID format). |
RejectedUsageRecord
Field |
Description |
uuid |
string Unique identifier of the usage record (UUID format). |
reason |
enum (Reason) The reason of rejection.
|