> ## Documentation Index
> Fetch the complete documentation index at: https://steamgold.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Создание намерения

> Создает намерение для покупки снаряжения



## OpenAPI

````yaml POST /gear
openapi: 3.0.1
info:
  title: OpenAPI SteamGold
  description: Is used for steamgold API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.steamgold.dev/v1
security:
  - bearerAuth: []
paths:
  /gear:
    post:
      description: Создает намерение для покупки снаряжения
      requestBody:
        description: Описание намерения
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IntentGearRequest'
        required: true
      responses:
        '200':
          description: intent response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntentGearResponse'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    IntentGearRequest:
      required:
        - account
        - additionalFields
        - email
        - platform
        - item
      type: object
      properties:
        account:
          description: Идентификатор аккаунта геймера в Steam (steam64 ID)
          type: string
        additionalFields:
          description: Дополнительные поля для создания намерения
          type: object
          required:
            - steamId
            - tradeLink
          properties:
            steamId:
              description: Идентификатор аккаунта геймера в Steam (steam64 ID)
              type: string
            tradeLink:
              description: >-
                Ссылка на обмен для предметов формата
                https://steamcommunity.com/tradeoffer/new/?partner=<partner_id>&token=<token>
              type: string
        email:
          description: Электронная почта геймера
          type: string
        platform:
          description: >-
            Идентификатор приложения Steam, для которого создается намерение.
            Например, для CS2 это `730`, для Dota 2 это `570`.
          type: string
        item:
          description: Снаряжение для которого создается намерение
          type: string
        code:
          description: Промокод приминяемый к покупке
          type: string
        fee:
          description: Для снаряжения мы пока поддерживаем только `excluded`
          type: string
          enum:
            - excluded
          default: excluded
        attribution:
          description: >-
            Атрибуция трафика (если есть). Подробнее в
            [документации](/attribution)
          type: object
          properties:
            utm_source:
              description: Источник трафика
              type: string
            utm_medium:
              description: Тип трафика
              type: string
        successUrl:
          description: URL для перенаправления после успешной оплаты
          type: string
        failureUrl:
          description: URL для перенаправления после неуспешной оплаты
          type: string
        callbackUrl:
          description: URL для оповещения об успешной оплате
          type: string
    IntentGearResponse:
      required:
        - code
        - intentId
        - verified
      type: object
      properties:
        code:
          description: HTTP-код ответа
          type: integer
          format: int32
        intentId:
          description: Идентификатор намерения
          type: string
          format: uuid
        verified:
          description: Сообщение об успешной резервации снаряжения
          type: boolean
        intentAmount:
          description: Сумма пополнения
          type: number
        intentCurrency:
          description: Валюта пополнения
          type: string
        paymentAmount:
          description: Сумма оплаты для геймера
          type: number
        paymentCurrency:
          description: Валюта платежа
          type: string
        message:
          description: Сообщение об успешном выполнении операции
          type: string
    Error:
      required:
        - code
        - message
      type: object
      properties:
        code:
          description: HTTP-код ответа
          type: integer
          format: int32
        message:
          description: Сообщение об ошибке
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````