# 订单推送通知

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /order/receive（这里仅做示例）:
    post:
      summary: 订单推送通知
      deprecated: false
      description: |-
        ###请商家自行在闲管家的开放平台填写真实的推送地址###

        注意事项：
        1：订单信息/订单状态/退款状态发生变更时推送
        2：请确保该接口稳定，如果推送失败，最多重试三次
        3：只有响应报文的result字段返回success，才认为成功 
        4：接口请求超时时间为3秒（建议接收到推送通知后，异步处理业务逻辑）
      tags:
        - 推送
      parameters:
        - name: appid
          in: query
          description: ''
          required: true
          example: '{{appid}}'
          schema:
            type: string
        - name: timestamp
          in: query
          description: 当前时间戳（单位秒，5分钟内有效）
          required: false
          example: '{{timestamp}}'
          schema:
            type: integer
            default: '{{timestamp}}'
        - name: sign
          in: query
          description: 签名MD5值（参考签名说明）
          required: true
          example: '{{sign}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                seller_id:
                  type: integer
                  format: int64
                  title: 商家ID
                user_name:
                  type: string
                  title: 闲鱼会员名
                  examples:
                    - tb924343042
                order_no:
                  type: string
                  title: 闲鱼订单号
                  examples:
                    - '2226688164543566229'
                order_type:
                  type: integer
                  title: 订单类型
                  format: int32
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 7
                    - 8
                    - 9
                    - 10
                  x-apifox-enum:
                    - name: ''
                      value: 1
                      description: 普通订单
                    - name: ''
                      value: 2
                      description: 分销订单
                    - name: ''
                      value: 3
                      description: 验货宝订单
                    - name: ''
                      value: 4
                      description: 拍卖订单
                    - name: ''
                      value: 7
                      description: 卡密订单
                    - name: ''
                      value: 8
                      description: 直充订单
                    - name: ''
                      value: 9
                      description: 严选订单
                    - name: ''
                      value: 10
                      description: 特卖订单
                order_status:
                  title: 订单状态
                  $ref: '#/components/schemas/order_status'
                refund_status:
                  title: 退款状态
                  $ref: '#/components/schemas/refund_status'
                modify_time:
                  type: integer
                  title: 订单更新时间
                  examples:
                    - 1636077365
                  format: int32
                product_id:
                  type: integer
                  title: 管家商品ID
                  format: int64
                item_id:
                  type: integer
                  title: 闲鱼商品ID
                  format: int64
                address_status:
                  type: integer
                  title: 地址变更状态
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                  x-apifox-enum:
                    - value: 1
                      name: 待卖家同意
                      description: ''
                    - value: 2
                      name: 卖家已同意
                      description: ''
                    - value: 3
                      name: 卖家已拒绝
                      description: ''
                    - value: 4
                      name: 卖家未处理
                      description: ''
              required:
                - seller_id
                - user_name
                - order_no
                - order_type
                - order_status
                - refund_status
                - modify_time
                - product_id
                - item_id
              x-apifox-orders:
                - seller_id
                - user_name
                - order_no
                - order_type
                - order_status
                - refund_status
                - modify_time
                - product_id
                - item_id
                - address_status
              x-apifox-ignore-properties: []
            example:
              order_no: '1339920336328048683'
              order_status: 11
              refund_status: 1
              modify_time: 1636013302
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notify_resp_ok'
              examples:
                '1':
                  summary: 成功示例
                  value:
                    result: success
                    msg: 接收成功
                '2':
                  summary: 异常示例
                  value:
                    result: fail
                    msg: mollit in tempor cupidatat in
          headers: {}
          x-apifox-name: 成功
        x-200:异常:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notify_resp_fail'
          headers: {}
          x-apifox-name: 异常
      security: []
      x-apifox-folder: 推送
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/2973339/apis/api-93586387-run
components:
  schemas:
    refund_status:
      type: integer
      title: 退款状态
      format: int32
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 8
      default: 0
      x-apifox-enum:
        - name: 未申请退款
          value: 0
          description: 表示买家没有申请退款
        - name: 待商家处理
          value: 1
          description: 买家已经申请退款，等待卖家同意
        - name: 待买家退货
          value: 2
          description: 卖家已经同意退款，等待买家退货
        - name: 待商家收货
          value: 3
          description: 买家已经退货，等待卖家确认收货
        - name: 退款关闭
          value: 4
          description: 买家取消退款/超时未处理自动关闭
        - name: 退款成功
          value: 5
          description: 卖家同意退款/超时未处理自动退款
        - name: 已拒绝退款
          value: 6
          description: 卖家拒绝退款
        - name: 待确认退货地址
          value: 8
          description: 等待卖家确认退货地址
      x-apifox-folder: ''
    order_status:
      type: integer
      title: 订单状态
      enum:
        - 11
        - 12
        - 21
        - 22
        - 23
        - 24
      format: int32
      x-apifox-enum:
        - name: ''
          value: 11
          description: 待付款
        - name: ''
          value: 12
          description: 待发货
        - name: ''
          value: 21
          description: 已发货
        - name: ''
          value: 22
          description: 已完成
        - name: ''
          value: 23
          description: 已退款
        - name: ''
          value: 24
          description: 已关闭
      x-apifox-folder: ''
    notify_resp_ok:
      type: object
      properties:
        result:
          type: string
          title: 结果
          enum:
            - success
            - fail
          x-apifox-enum:
            - value: success
              name: 成功
              description: ''
            - value: fail
              name: 失败
              description: ''
        msg:
          type: string
          title: 描述
          examples:
            - 接收成功
      required:
        - result
        - msg
      x-apifox-orders:
        - result
        - msg
      title: 推送成功响应报文
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    notify_resp_fail:
      type: object
      properties:
        result:
          type: string
          title: 结果
          const: fail
        msg:
          type: string
          title: 描述
          examples:
            - 签名失败
      required:
        - result
        - msg
      x-apifox-orders:
        - result
        - msg
      title: 推送失败响应报文
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
  securitySchemes:
    apiKey:
      type: apikey
      description: Enter JWT Bearer token **_only_**
      name: Authorization
      in: header
servers:
  - url: https://open.goofish.pro
    description: 新版正式环境
security: []

```
