Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Marketplace
    • Getting started
    • Access management
      • Getting started with the API
        • Overview
          • Overview
          • Write
    • Access management
    • Audit Trails events

In this article:

  • HTTP request
  • Body parameters
  • UsageRecord
  • Response
  • AcceptedUsageRecord
  • RejectedUsageRecord
  1. Partners
  2. Metering API reference
  3. REST
  4. ImageProductUsage
  5. Write

Marketplace Metering API, REST: ImageProductUsage.Write

Written by
Yandex Cloud
Updated at November 26, 2024
  • HTTP request
  • Body parameters
  • UsageRecord
  • Response
  • AcceptedUsageRecord
  • RejectedUsageRecord

Writes image product's usage. Authentication is by user's service account.

HTTP requestHTTP request

POST https://marketplace.api.cloud.yandex.net/marketplace/metering/v1/imageProductUsage/write

Body parametersBody 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[]

UsageRecord

List of product usage records (up to 25 per request).

UsageRecordUsageRecord

Field

Description

uuid

string

Required field. Unique identifier of the usage record (UUID format).

skuId

string

Required field. Consumed Marketplace SKU ID, linked to UsageRecord.product_id.

quantity

string (int64)

Quantity of SKU consumed, measured in sku.usage_unit units (e.g. bytes).

timestamp

string (date-time)

Required field. Timestamp in UTC for which the usage is being reported.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

ResponseResponse

HTTP Code: 200 - OK

{
  "accepted": [
    {
      "uuid": "string"
    }
  ],
  "rejected": [
    {
      "uuid": "string",
      "reason": "string"
    }
  ]
}

Field

Description

accepted[]

AcceptedUsageRecord

List of accepted product usage records.

rejected[]

RejectedUsageRecord

List of rejected product usage records (with reason).

AcceptedUsageRecordAcceptedUsageRecord

Field

Description

uuid

string

Unique identifier of the usage record (UUID format).

RejectedUsageRecordRejectedUsageRecord

Field

Description

uuid

string

Unique identifier of the usage record (UUID format).

reason

enum (Reason)

The reason of rejection.

  • REASON_UNSPECIFIED
  • DUPLICATE
  • EXPIRED
  • INVALID_TIMESTAMP
  • INVALID_SKU_ID
  • INVALID_PRODUCT_ID
  • INVALID_QUANTITY
  • INVALID_ID

Was the article helpful?

Previous
Overview
Next
Overview
© 2025 Direct Cursus Technology L.L.C.