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

# Информация о заказе



## OpenAPI

````yaml GET /order/{id}
openapi: 3.1.0
info:
  version: 1.0.0
  title: OpenAPI B2B Every SIM
  description: API для работы с eSIM картами в B2B
servers:
  - url: https://api.every.ru/b2b/esim
security:
  - bearerAuth: []
paths:
  /order/{id}:
    get:
      summary: Получить заказ по ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: uint
          description: ID заказа
          example: 1234567890
      responses:
        '200':
          description: Заказ успешно найден
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
        '404':
          description: Заказ не найден
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth:
            - read
components:
  schemas:
    OrderResponse:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/Order'
          description: Детали заказа
        esim:
          $ref: '#/components/schemas/Esim'
          description: Данные ESIM
      required:
        - order
    Error:
      type: object
      properties:
        code:
          type: integer
          description: Код ошибки
          example: -32602
        message:
          type: string
          description: Сообщение об ошибке
          example: Заказ не найден
        data:
          type: object
          properties:
            code:
              type: integer
              description: Внутренний код ошибки
              example: 1
          required:
            - code
      required:
        - code
        - message
        - data
    Order:
      type: object
      properties:
        id:
          type: integer
          format: uint
          description: Индетификатор заказа
          example: 1234567890
        country:
          type: string
          pattern: ^[A-Z]{2}$
          description: Код страны в формате ISO 3166-1 alpha-2
          example: RU
        packet:
          type: integer
          format: uint
          description: Идентификатор пакета
          example: 1234567890
        count:
          type: integer
          format: uint
          description: Количество eSIM в заказе
          example: 1
        created_at:
          type: string
          format: date-time
          description: Временная метка создания заказа в формате ISO 8601 UTC
          example: '2023-12-01T10:30:00Z'
        expired_at:
          type: string
          format: date-time
          description: Временная метка истечения заказа в формате ISO 8601 UTC
          example: '2023-12-08T10:30:00Z'
        status:
          type: string
          enum:
            - inited
            - paid
            - canceled
            - expired
          description: Статус заказа
          example: inited
      required:
        - id
        - country
        - packet
        - count
        - created_at
        - expired_at
        - status
        - payment
    Esim:
      type: object
      properties:
        iccid:
          type: string
          description: Идентификатор интегральной схемы карты
          example: '89882470000012345678'
        name:
          type: string
          description: >-
            Имя eSIM в формате country.$seq (пример) - генерируется при привязке
            первого пакета
          example: US.1
        smdp:
          type: string
          description: Адрес сервера SM-DP+
          example: https://smdp.example.com
        activation:
          type: string
          description: Код активации
          example: LPA:1$smdp.example.com$1234567890
        provisioned_at:
          type: string
          format: date-time
          description: Временная метка подготовки в формате ISO 8601 UTC
          example: '2023-12-01T10:35:00Z'
      required:
        - iccid
        - name
        - smdp
        - activation
        - provisioned_at
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````