Документация API · v1.0.0
В кабинет
Авторизация Bearer API keyBase path /api/partner/v1Rate limit 429 / Retry-After

GET /health

Service health

Scope:

Responses / errors

{
  "200": {
    "description": "Healthy"
  }
}

GET /openapi.yaml

OpenAPI 3.1 document

Scope:

Responses / errors

{
  "200": {
    "description": "Specification"
  }
}

GET /me

Current partner and safe key data

Scope: partner:read

Responses / errors

{
  "200": {
    "description": "Partner"
  },
  "401": {
    "description": "Invalid key"
  },
  "403": {
    "description": "Forbidden"
  }
}

GET /balance

Balance in minor units

Scope: balance:read

Responses / errors

{
  "200": {
    "description": "Balance"
  }
}

GET /tariffs

Active tariffs

Scope: tariffs:read

Responses / errors

{
  "200": {
    "description": "Tariffs"
  }
}

GET /tariffs/{code}

Active tariff

Scope: tariffs:read

Headers и параметры

[
  {
    "name": "code",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses / errors

{
  "200": {
    "description": "Tariff"
  },
  "404": {
    "description": "Not found"
  }
}

GET /orders

List owned orders

Scope: orders:read

Responses / errors

{
  "200": {
    "description": "Orders"
  }
}

POST /orders

Atomically purchase a pending subscription gift

Scope: orders:write

Headers и параметры

[
  {
    "$ref": "#/components/parameters/RequestId"
  },
  {
    "$ref": "#/components/parameters/Idempotency"
  }
]

Request schema

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Purchase"
      }
    }
  }
}

Responses / errors

{
  "201": {
    "description": "Completed order and delivery"
  },
  "409": {
    "description": "Idempotency conflict"
  },
  "422": {
    "description": "Business validation"
  }
}

Destructive Try it отключён. Purchase и renewal выполняются только сервер-сервер.

GET /orders/{orderId}

Read owned order

Scope: orders:read

Headers и параметры

[
  {
    "name": "orderId",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses / errors

{
  "200": {
    "description": "Order"
  },
  "404": {
    "description": "Not found"
  }
}

GET /subscriptions/{subscriptionId}

Read owned delivery/subscription

Scope: subscriptions:read

Headers и параметры

[
  {
    "name": "subscriptionId",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string"
    }
  }
]

Responses / errors

{
  "200": {
    "description": "Subscription"
  },
  "404": {
    "description": "Not found"
  }
}

POST /subscriptions/{subscriptionId}/renew

Renew an activated owned subscription with reserve/compensation

Scope: subscriptions:renew

Headers и параметры

[
  {
    "name": "subscriptionId",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string"
    }
  },
  {
    "$ref": "#/components/parameters/Idempotency"
  }
]

Request schema

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "tariffCode"
        ],
        "properties": {
          "tariffCode": {
            "type": "string"
          },
          "externalOrderId": {
            "type": "string"
          }
        }
      }
    }
  }
}

Responses / errors

{
  "200": {
    "description": "Renewed"
  },
  "409": {
    "description": "Not active or idempotency conflict"
  },
  "503": {
    "description": "Provider unavailable and balance released"
  }
}

Destructive Try it отключён. Purchase и renewal выполняются только сервер-сервер.