# 套餐订购接口

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v3/package/orderPackage:
    post:
      summary: 套餐订购接口
      deprecated: false
      description: |+
        卡片套餐订购,主套餐是立即生效，只有流量包可以次月生效


      tags:
        - API接口/卡套餐订购相关接口
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              title: ''
              type: object
              properties:
                appkey:
                  type: string
                  default: '{{APPKEY}}'
                  description: >-
                    appkey平台用以确定客户端应用的身份。应用键对应一个密钥 secret。要基于服务平台开发应用，必须事先通过申请获取
                    appkey/secret 后，才能进行应用的开发。
                  x-apifox-mock: '{{APPKEY}}'
                timestamp:
                  type: integer
                  description: 当前时间戳，10位数字
                  x-apifox-mock: '{{TIMESTAMP}}'
                nonce:
                  type: integer
                  minimum: 10000
                  maximum: 99999
                  description: 5位随机正整数
                sign:
                  type: string
                  description: 签名串，请求参数的签名，服务平台通过它验证请求数据的合法性。
                  x-apifox-mock: '{{SIGN}}'
                iccid:
                  type: string
                  description: 卡号
                packageCode:
                  type: string
                  description: 套餐编码
                outTradeNo:
                  type: string
                  description: API调用方传入的唯一订单号标识 最大32位
                  x-apifox-mock: '{{$person.idCard}}'
              x-apifox-orders:
                - appkey
                - timestamp
                - nonce
                - sign
                - iccid
                - packageCode
                - outTradeNo
              required:
                - appkey
                - timestamp
                - nonce
                - sign
                - iccid
                - packageCode
                - outTradeNo
            example: |-
              {
                  "appkey": "{{APPKEY}}",
                  "timestamp": {{TIMESTAMP}},
                  "nonce": 81537,
                  "sign": "{{SIGN}}",
                  "iccid": "8988308650100524999",
                  "packageCode": "CN-5M-7D-C-US-20230103AC4BF927",
                  "outTradeNo": "630000198311142676"
              }
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: 200：表示成功其他失败
                  message:
                    type: string
                    description: 成功或失败原因
                  data:
                    type: object
                    properties:
                      orderNumber:
                        type: string
                        description: API订购唯一对应编号
                      orderId:
                        type: number
                        description: 套餐订单号
                    required:
                      - orderNumber
                      - orderId
                    x-apifox-orders:
                      - orderNumber
                      - orderId
                required:
                  - code
                  - message
                  - data
                x-apifox-orders:
                  - code
                  - message
                  - data
              example:
                code: '200'
                message: success
                data:
                  orderNumber: 1611558040873b105b2678de34504a35
                  orderId: 101106255
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: API接口/卡套餐订购相关接口
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/2330898/apis/api-63600569-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://oapi.eiotclub.com
    description: 生产环境
security: []

```
