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

# Truy xuất nguồn gốc sản phẩm vật chất



## OpenAPI

````yaml /vi/openapi/fireant-v1.yaml post /mxv/traceability/product
openapi: 3.1.0
info:
  version: v1
  title: FireAnt RESTFUL API
  description: Tài liệu đặc tả FireAnt RESTFUL API v1.0.0
servers:
  - url: https://api.fireant.vn
security: []
paths:
  /mxv/traceability/product:
    post:
      tags:
        - MXV
      summary: Truy xuất nguồn gốc sản phẩm vật chất
      operationId: MXV_GetProductTraceability
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/FireAnt.Api.Models.MXV.MXVProductTraceabilityRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/FireAnt.Api.Models.MXV.MXVProductTraceabilityRequest
      responses:
        '200':
          description: Trả về thông tin sản phẩm
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/FireAnt.Api.Models.MXV.MXVPhysicalDeliveryResponseOfMXVTraceabilityProduct
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/FireAnt.Api.Models.MXV.MXVPhysicalDeliveryResponseOfMXVTraceabilityProduct
        '400':
          description: Thiếu dữ liệu hoặc chưa có tài khoản MXV
        '404':
          description: Không tìm thấy sản phẩm
      security:
        - oauth2:
            - user-data-read
components:
  schemas:
    FireAnt.Api.Models.MXV.MXVProductTraceabilityRequest:
      description: "Request từ app FireAnt gửi lên backend khi quét QR trên thỏi Bạc.\r\nApp gửi nguyên nội dung quét được (thường là URL dạng\r\nhttps://sp.phuquygroup.vn/Home/VM?id=CBETDRX12); backend tự tách mã sản phẩm."
      type: object
      properties:
        qrContent:
          description: Nội dung đầy đủ đọc được từ QR code (URL hoặc trực tiếp serial/id).
          type: string
    FireAnt.Api.Models.MXV.MXVPhysicalDeliveryResponseOfMXVTraceabilityProduct:
      description: "Wrapper response của MXV REST API cho các nghiệp vụ giao nhận hàng vật chất.\r\nKhác với MXVResponse&lt;T&gt; (dùng status/message/data),\r\ncác API section 3.3/3.4 trả về success/code/msg/confirmationCode/payload."
      type: object
      properties:
        time:
          description: Thời điểm server xử lý
          type: string
        success:
          description: true = thành công, false = lỗi
          type: boolean
        code:
          description: 'Mã kết quả: "0" = thành công'
          type: string
        msg:
          description: 'Thông báo kết quả (VD: "[0]: Thành công!")'
          type: string
        confirmationCode:
          description: "Mã xác nhận đăng ký do MXV cấp (top-level field).\r\nEnd user cần lưu lại để dùng cho API huỷ và truy vấn."
          type: string
        payload:
          description: Dữ liệu chi tiết (array, mỗi phần tử chứa confirmationcode)
          type: array
          items:
            $ref: '#/components/schemas/FireAnt.Api.Models.MXV.MXVTraceabilityProduct'
    FireAnt.Api.Models.MXV.MXVTraceabilityProduct:
      description: "Thông tin sản phẩm trả về từ API truy xuất nguồn gốc của MXV\r\n(payload của POST /api/v1/traceability/product)."
      type: object
      properties:
        qrCode:
          description: 'Mã QR do nhà sản xuất cấp (VD: 0000541H3N1)'
          type: string
        serial:
          description: 'Serial sản phẩm (VD: CBETDRX12)'
          type: string
        productName:
          description: 'Tên sản phẩm (VD: Bạc Thanh Long Phú Quý 999 1KG -M)'
          type: string
        productCode:
          description: 'Mã sản phẩm (VD: BTL1KGM)'
          type: string
        material:
          description: 'Chất liệu (VD: Bạc 999)'
          type: string
        purity:
          format: int32
          description: 'Hàm lượng (VD: 999)'
          type: integer
        weightChi:
          description: Khối lượng quy đổi (chỉ)
          type: string
        weightGram:
          description: 'Khối lượng (VD: 1 kg)'
          type: string
        origin:
          description: 'Xuất xứ (VD: Việt Nam)'
          type: string
        manufacturedAt:
          format: date-time
          description: Ngày xuất xưởng
          type: string
        inspectedAt:
          format: date-time
          description: Ngày kiểm định
          type: string
        inspectionUnit:
          description: 'Đơn vị kiểm định (VD: VGVLab)'
          type: string
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        implicit:
          scopes:
            accounts-read: Đọc danh sách tài khoản giao dịch chứng khoán
            accounts-write: Liên kết tài khoản chứng khoán
            orders-read: Đọc danh sách lệnh giao dịch chứng khoán
            orders-write: Đặt, sửa, hủy lệnh giao dịch chứng khoán
            companies-read: Đọc thông tin doanh nghiệp
            companies-write: Tạo mới, cập nhật, xóa thông tin doanh nghiệp
            individuals-read: Đọc thông tin cá nhân
            individuals-write: Tạo mới, cập nhật, xóa thông tin cá nhân
            finance-read: Đọc thông tin tài chính
            finance-write: Tạo mới, cập nhật, xóa thông tin tài chính
            posts-write: Đăng bài viết
            posts-read: Lấy nội dung các bài viết của cộng đồng
            symbols-read: Đọc thông tin mã chứng khoán
            symbols-write: Tạo mới, cập nhật, xóa mã chứng khoán
            users-read: Đọc dữ liệu công khai của người dùng
            user-data-read: Đọc tất cả dữ liệu của người dùng hiện tại
            user-data-write: Cập nhật tất cả dữ liệu của người dùng hiện tại
            search: Tìm kiếm
            academy-read: Đọc dữ liệu các khóa học
            academy-write: Đăng ký khóa học
            blog-read: Đọc dữ liệu blog
            investopedia-read: Đọc dữ liệu thuật ngữ
            commodities-read: Đọc dữ liệu hàng hóa phái sinh
            all_claims: All
            roles: Role
          authorizationUrl: https://accounts.fireant.vn/connect/authorize
      description: OAuth2 Implicit Grant

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.