# 套餐生效

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /customerNotifyUrl:
    post:
      summary: 套餐生效
      deprecated: false
      description: |-
        客户提供接收异步通知的地址（HTTP/HTTPS）
        套餐生效通知
      tags:
        - API接口/CloudESIM异步通知
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                timestamp:
                  type: integer
                  description: 当前时间戳，10位数字
                  x-apifox-mock: '{{TIMESTAMP}}'
                nonce:
                  type: integer
                  description: 5位随机正整数
                  minimum: 10000
                  maximum: 99999
                sign:
                  type: string
                  description: 签名串，通知参数的签名，通过它验证请求数据的合法性。
                  x-apifox-mock: '{{SIGN}}'
                id:
                  type: string
                  description: 请求的唯一标识
                event:
                  type: string
                  description: 通知的类型是CloudESimPkgActivate
                data:
                  type: object
                  properties:
                    packageName:
                      type: string
                      description: 套餐名称
                    packageCode:
                      type: string
                      description: 套餐编码
                    state:
                      type: integer
                      description: 套餐使用状态 0:待使用 1:使用中 2:已完成
                    gzhPackageName:
                      type: string
                      description: 商品套餐名称
                    packageType:
                      type: integer
                      description: 套餐类型，2 限量流量包 3 限时流量包 4 限时限速包
                    createDate:
                      type: string
                      description: 订购时间
                    outTradeNo:
                      type: string
                      description: API调用方传入的唯一订单号标识 最大32位
                    fromOrderId:
                      type: integer
                      description: 转移的套餐会记录从哪个orderId转移而来
                    salesChannel:
                      type: string
                      description: >-
                        销售渠道：USER 用户自己购买，SYSTEM 保底套餐，TRANSFER 转移的套餐， PLATFORM
                        后台平台购买
                    startDate:
                      type: string
                      description: '套餐开始时间，格式: 2026-01-02 15:04:05'
                    endDate:
                      type: string
                      description: '套餐预期结束时间, 格式: 2026-01-02 15:04:05'
                    eid:
                      type: string
                      description: eid
                    eshopOrderId:
                      type: number
                      description: 内部订单号
                    fromEid:
                      type: string
                      description: 转移的套餐会记录从哪个eid转移而来
                  x-apifox-orders:
                    - eid
                    - eshopOrderId
                    - packageName
                    - packageCode
                    - state
                    - gzhPackageName
                    - packageType
                    - createDate
                    - startDate
                    - endDate
                    - outTradeNo
                    - fromEid
                    - fromOrderId
                    - salesChannel
                  description: 订购套餐数据
                  x-apifox-refs: {}
                  required:
                    - eid
                    - eshopOrderId
                    - packageName
                    - packageCode
                    - state
                    - salesChannel
                    - createDate
                    - packageType
                    - gzhPackageName
                    - endDate
                    - startDate
              x-apifox-orders:
                - id
                - timestamp
                - nonce
                - sign
                - event
                - data
              required:
                - timestamp
                - nonce
                - sign
                - id
                - data
                - event
            example:
              data: >-
                {"eid":"894230533232910993641111111","eshopOrderId":10004728,"packageName":"A-TM-50M-1天","packageCode":"A-TM-50M-1D-A-CN-TEST-2024052489FC722C","state":0,"gzhPackageName":"","createDate":"2024-05-28
                09:34:47","packageType":3,"outTradeNo":"6300001983111426769635"}
              event: CloudESimPkgActivate
              id: ue5Y0qNC8QQIRtUR3UgV4xzg
              nonce: 40604
              sign: F0D19FA6945B21C0D61BDEFD4DCC41B64B29272B
              timestamp: 1716860340
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: 成功接收响应SUCCESS
                x-apifox-orders:
                  - status
                required:
                  - status
              example:
                status: SUCCESS
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: API接口/CloudESIM异步通知
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/2330898/apis/api-441022834-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://oapi.eiotclub.com
    description: 生产环境
security: []

```
