Xinghan Invoice Cloud (星瀚发票云)

website·Indexed 31 days ago

https://open.piaozone.com

A next-generation invoicing product based on the Kingdee Cloud Cangqiong platform. It provides APIs for digital invoicing, direct and document-based invoicing, red-letter cancellations, and electronic archive management. The platform supports various invoice types including digital electronic invoices, tax-controlled general invoices, and motor vehicle sales invoices, offering comprehensive capabilities for invoice issuance, verification, and archival.

Tokens
172.6K
Snippets
521
Records
763
Agent score
47%

What's inside Xinghan Invoice Cloud

  1. Overview of Direct Invoicing (直接开票)

    Direct Invoicing is designed for merchants who possess their own order systems and have the development capability to transform upstream order data into invoicing data. This is typically used in industries like e-commerce.

    Supported invoicing channels include:

    • Jin San (金三)
    • Jin Si (金四), which includes Leqi (乐企) and RPA invoicing.
  2. Overview of Kingdee Invoice Cloud Flagship Edition

    Kingdee Invoice Cloud Flagship Edition (also known as Xinghan Invoice Cloud) is a next-generation product built on the Kingdee Cloud Cosmos platform. It extends the basic functionality of the Standard Edition with advanced enterprise features, including:

    • Private cloud deployment capabilities
    • Multi-tenant and multi-organization management
    • Document-based invoicing (e.g., invoice item matching, merging, and splitting)
    • Low-code secondary development capabilities
  3. Overview of Document-based Invoicing (单据开票)

    Document-based invoicing is designed for merchants with their own order systems. It allows order data to be pushed into 'Invoicing Application Forms' (开票申请单), which then handle invoice data processing, including matching invoice items and managing the merging or splitting of invoices. This method is suitable for enterprises with order system integration capabilities and supports Jin3 and Jin4 invoicing channels (where Jin4 includes Leqi and RPA invoicing).
  4. Overview of Scan-to-Invoice (扫码开票) Scenarios

    The Scan-to-Invoice feature supports two primary integration scenarios based on where the QR code is generated:

    1. Push-based QR Generation: The merchant's order system pushes order information to the Invoice Cloud (发票云) to generate a QR code.
    2. Business System QR Generation: The service provider generates the QR code using a specific format, and the Invoice Cloud queries the provider's order interface to retrieve details.
  5. Data structure for Fully Digital Aviation Electronic Ticket Itineraries

    The Fully Digital Aviation Electronic Ticket Itinerary (数电发票-航空运输电子客票行程单) uses invoiceType: 28. It contains detailed information about the passenger, flight details, tax amounts, and digital file metadata.
    {
      "invoiceType": "28",
      "isElectricInvoice": "0|1", // 0-No, 1-Yes
      "needCheck": "0|1", // 0-Not needed, 1-Needed
      "serialNo": "string(36)",
      "orgNumber": "string(20)",
      "orgName": "string(120)",
      "originalState": "0|1", // 0-Not signed, 1-Signed
      "customerName": "string(150)",
      "customerIdentityNum": "string(25)",
      "endorsement": "string(32)",
      "invoiceNo": "string(32)",
      "gpOrderNo": "string(32)",
      "invoiceAmount": "decimal(13)", // Amount excluding tax
      "ticketPrice": "decimal(23)",
      "fuelSurcharge": "decimal(13)",
      "taxRate": "decimal(13)",
      "totalTaxAmount": "decimal(13)",
      "airportConstructionFee": "decimal(13)",
      "otherTotalTaxAmount": "decimal(13)",
      "totalAmount": "decimal(13)",
      "electronicTicketNum": "string(32)",
      "verificationCode": "string(32)",
      "insurancePremium": "decimal(13)",
      "fillingUnit": "string(100)",
      "issueDate": "yyyy-mm-dd",
      "invoiceStatus": "0|7|8", // 0: Normal, 7: Partial Red-ink, 8: Full Red-ink
      "internationalFlag": "0|1|2", // 0: None, 1: Domestic, 2: International
      "buyerName": "string(100)",
      "purchaserUnifiedSocialCreditCode": "string(20)",
      "salerName": "string(100)",
      "salerTaxNo": "string(100)",
      "originalInvoiceNo": "string(32)",
      "reasonOfRushRed": "string(32)",
      "invoiceDate": "yyyy-mm-dd",
      "carrierDate": "yyyy-mm-dd",
      "airTime": "HH:mm",
      "placeOfDeparture": "string(32)",
      "destination": "string(32)",
      "carrier": "string(32)",
      "flightNum": "string(32)",
      "seatGrade": "string(10)",
      "expendStatus": "1|30|60|65|70", // 1-Unused, 30-In use, 60-Used, 65-Booked, 70-Archived
      "billCreateTime": "YYYY-MM-DD HH:MM:SS",
      "taxPeriod": "string(10)", // e.g., 202104
      "deductionFlag": "0|1", // 0-Not deductible, 1-Deductible
      "effectiveTaxAmount": "decimal(20)",
      "checkStatus": "1|2|3|4", // 1: Pass, 2: Fail, 3: Not checked, 4: No check
      "downloadUrl": "string(512)",
      "pdfurl": "string(512)",
      "snapshotUrl": "string(512)",
      "fileName": "string(30)",
      "fileType": "1|2|4|9", // 1-pdf, 2-image, 4-ofd, 9-xml
      "rotationAngle": "string(4)",
      "region": "string(35)",
      "pixel": "string(20)",
      "xbrlName": "string(1000)",
      "xbrlUrl": "string(512)",
      "xbrlType": "airele", // Specifically for aviation electronic tickets
      "taxPdfUrl": "string(512)",
      "taxOfdUrl": "string(512)",
      "taxXmlUrl": "string(512)",
      "errorLevel": "0|1|2|3", // 0-Strict, 1-Medium, 2-Light, 3-No control
      "validateMessage": "string(500)",
      "attachment": "Array",
      "verifyResult": "Array"
    }
  6. Data structure for Used Car Sales Unified Invoices (二手车销售统一发票)

    The Used Car Sales Unified Invoice data structure is used for invoices with invoiceType: '13'. It contains detailed information about the buyer, seller, vehicle specifications (license plate, VIN), and auction/market details.
    {
      "invoiceType": "13", // Invoice Type: Used Car Sales Unified Invoice
      "isElectricInvoice": "0/1", // 0-No, 1-Yes
      "needCheck": "0/1", // 0-No, 1-Yes
      "serialNo": "string", // Invoice serial number
      "orgNumber": "string", // Organization code
      "orgName": "string", // Organization name
      "originalState": "0/1", // Receipt status: 0-Unsigned, 1-Signed
      "invoiceCode": "string", // Invoice code
      "invoiceNo": "string", // Invoice number
      "invoiceDate": "YYYY-MM-DD", // Issuance date
      "buyerPhoneNumber": "string", // Buyer phone
      "buyerName": "string", // Buyer name
      "buyerIdNo": "string", // Buyer Org Code/ID
      "buyerAddress": "string", // Buyer address
      "salerName": "string", // Seller name
      "salerPhoneNumber": "string", // Seller phone
      "salerIdNo": "string", // Seller Org Code/ID
      "salerAddress": "string", // Seller address
      "licensePlateNumber": "string", // License plate
      "registrationNumber": "string", // Registration certificate number
      "vehicleType": "string", // Vehicle type
      "vehicleIdentificationNo": "string", // VIN/Driver number
      "bandModel": "string", // Brand/Model
      "vehicleManagementName": "string", // Transfer vehicle management office
      "totalAmount": "number", // Total vehicle price
      "auctionName": "string", // Auction/Business name
      "auctionPhoneNumber": "string", // Auction/Business phone
      "auctionAddress": "string", // Auction/Business address
      "auctionTaxpayerId": "string", // Auction/Business tax ID
      "auctionBankAccout": "string", // Auction/Business bank account
      "marketName": "string", // Second-hand market unit
      "marketPhoneNumber": "string", // Second-hand market phone
      "marketAddress": "string", // Second-hand market address
      "marketTaxpayerId": "string", // Second-hand market tax ID
      "marketBankAccout": "string", // Second-hand market bank account
      "remark": "string", // Remarks
      "invoiceStatus": "0/1/2/3/4", // Status: 0-Normal, 1-Out of control, 2-Void, 3-Red-reversed, 4-Abnormal
      "issuingOffice": "string", // Issuing unit
      "drawer": "string", // Issuer
      "checkCode": "string", // Verification code
      "machineNo": "string", // Machine code
      "expendStatus": "1/30/60/65/70", // Status: 1-Unused, 30-In use, 60-Used, 65-Booked, 70-Archived
      "billCreateTime": "YYYY-MM-DD HH:mm:ss", // Entry time
      "checkStatus": "1/2/3/4", // Verification: 1-Pass, 2-Fail, 3-Not verified, 4-Not required
      "downloadUrl": "string", // Original file URL
      "pdfurl": "string", // PDF URL
      "snapshotUrl": "string", // Snapshot URL
      "fileName": "string", // File name
      "fileType": "1/2/4/9", // 1-pdf, 2-image, 4-ofd, 9-xml
      "rotationAngle": "number", // Rotation angle
      "region": "string", // Invoice region
      "pixel": "string", // Pixels
      "errorLevel": "0/1/2/3", // Compliance level: 0-Strict, 1-Medium, 2-Light, 3-None
      "validateMessage": "string", // Compliance description
      "attachment": [], // Associated attachments
      "verifyResult": [] // Compliance verification results
    }
  7. Query a single digital electronic invoice

    The digital electronic invoice query API returns detailed information about a specific invoice. The response includes seller and buyer details, financial totals, invoice status, and file URLs for OFD and XML versions of the invoice. It also provides a detailed list of line items (invoiceDetail) containing goods names, quantities, prices, and tax calculations.
    {
      "errorCode": "0",
      "success": true,
      "errorMsg": "",
      "data": {
        "batch": "",
        "orderNo": "3ZUAOD4LKWG90BQG9O1L",
        "buyerType": 2,
        "systemSource": "",
        "serialNo": "300_20240311134422540_0001",
        "invoiceType": "02",
        "sellerTaxpayerId": "91440300MA5G9GK78Y",
        "sellerName": "金蝶票据云科技(深圳)有限公司",
        "buyerTaxpayerId": "91440300358768292H",
        "buyerName": "深圳金蝶账无忧网络科技有限公司",
        "includeTaxAmount": 9.54,
        "totalAmount": 9,
        "totalTaxAmount": 0.54,
        "invoiceDate": "2024-03-11 12:06:51",
        "invoiceNum": "24952000000028787793",
        "invoiceStatus": "0",
        "ofdFileUrl": "https://api-sit.piaozone.com/doc/free/fileInfo/preview/...",
        "xmlFileUrl": "https://api-sit.piaozone.com/test/rpa/free/preview/...",
        "invoiceDetail": [
          {
            "seq": 0,
            "revenueCode": "3040201010000000000",
            "goodsName": "*信息技术服务*纸电一体开收票",
            "units": "件",
            "quantity": "1.0000000000000",
            "price": "2.0000000000000",
            "amount": 2,
            "includeTaxAmount": 2.12,
            "taxRate": "0.06",
            "taxAmount": 0.12
          }
        ]
      }
    }
  8. Extract detailed invoice header information via extJson

    The extJson.header object provides deep metadata about the invoice, categorized into seller details, buyer details, payment terms, and basic document info.
    {
      "extJson": {
        "header": {
          "billFrom": {
            "billFromBankAccount": "Seller bank account",
            "billFromCity": "City",
            "billFromEmail": "Email",
            "billFromComposite": "Full address",
            "billFromTelephone": "Phone",
            "billFromFax": "Fax",
            "billFromStateOrProvince": "State/Province",
            "billFromPostalCode": "Postal code",
            "billFromBankOfAccount": "Bank name",
            "billFromCountry": "Country code/name"
          },
          "billTo": {
            "billToBankOfAccount": "Buyer bank account name",
            "billToEmail": "Email",
            "billToPostalCode": "Postal code",
            "billToCity": "City",
            "billToComposite": "Full registered/billing address",
            "billToTelephone": "Phone",
            "billToRecipient": "Recipient name",
            "billToBankAccount": "Bank account number",
            "billToFax": "Fax",
            "billToCountry": "Country",
            "billToStateOrProvince": "State/Province"
          },
          "payment": {
            "exchangeRate": "Conversion rate",
            "dueDate": "Payment deadline",
            "paymentMethod": "Method (e.g., Bank Transfer, Cash)",
            "paymentCurrency": "Currency used for payment",
            "paidAmount": "Amount already paid",
            "paymentStatus": "Current payment status",
            "paymentTerms": "Terms (e.g., Net 30)"
          },
          "basic": {
            "nameOfInvoice": "Official title of the invoice",
            "sourceFileHash": "Hash of the attachment file",
            "page": ["Page numbers"],
            "invoiceCode": "Invoice code"
          }
        }
      }
    }
  9. Data structure for Fully Digital Electronic Invoices (Used Car Sales)

    The Fully Digital Electronic Invoice for Used Car Sales (数电发票-二手车销售统一发票) uses invoiceType: 84. This data structure captures detailed information about the vehicle, the buyer, the seller, and auction/market details if applicable.
    {
      "invoiceType": "84",
      "isElectricInvoice": "0|1", // 0: No, 1: Yes
      "needCheck": "0|1", // 0: No, 1: Yes
      "serialNo": "string", // Invoice serial number
      "orgNumber": "string", // Organization code
      "orgName": "string", // Organization name
      "originalState": "0|1", // 0: Not signed, 1: Signed
      "invoiceNo": "string", // Invoice number
      "invoiceDate": "YYYY-MM-DD",
      "specialTypeMark": "27|28", // 27: Normal, 28: Reverse
      "buyerName": "string",
      "buyerTaxNo": "string",
      "buyerAddress": "string",
      "buyerPhoneNumber": "string",
      "salerName": "string",
      "salerTaxNo": "string",
      "salerAddress": "string",
      "salerPhoneNumber": "string",
      "licensePlateNumber": "string", // License plate
      "registrationNumber": "string", // Registration certificate number
      "vehicleType": "string",
      "vehicleIdentificationNo": "string", // VIN/Driver number
      "bandModel": "string", // Brand/Model
      "vehicleManagementName": "string", // Transfer-in vehicle management office
      "totalAmount": "number", // Total vehicle price
      "auctionName": "string", // Auction/Operating name
      "auctionPhoneNumber": "string",
      "auctionAddress": "string",
      "auctionTaxpayerId": "string",
      "auctionBankAccout": "string",
      "marketName": "string", // Used car market unit
      "marketPhoneNumber": "string",
      "marketAddress": "string",
      "marketTaxpayerId": "string",
      "marketBankAccout": "string",
      "remark": "string",
      "invoiceStatus": "0-8", // 0: Normal, 1: Out of control, 2: Void, 3: Red-stamped, 4: Abnormal, 5: Non-normal, 6: Red-letter pending, 7: Partial red-stamp, 8: Full red-stamp
      "deductionFlag": "0|1", // 0: Non-deductible, 1: Deductible
      "effectiveTaxAmount": "number", // Deductible tax amount
      "drawer": "string", // Issuer
      "expendStatus": "1|30|60|65|70", // 1: Unused, 30: In use, 60: Used, 65: Booked, 70: Archived
      "billCreateTime": "YYYY-MM-DD HH:MM:SS",
      "checkStatus": "1-4", // 1: Passed, 2: Failed, 3: Not checked, 4: No check required
      "downloadUrl": "string",
      "pdfurl": "string",
      "snapshotUrl": "string",
      "fileType": "1|2|4|9", // 1: pdf, 2: image, 4: ofd, 9: xml
      "rotationAngle": "number",
      "region": "string",
      "pixel": "string",
      "errorLevel": "0-3", // 0: Strict, 1: Medium, 2: Light, 3: No control
      "validateMessage": "string",
      "attachment": "Array",
      "verifyResult": "Array"
    }
  10. Interpret global invoice recognition task status

    When querying task results, the taskStatus field indicates the current state of the recognition process. If a task fails, the errorCode provides specific details about the failure.
    // taskStatus values:
    - SUCCESS: Recognition completed successfully
    - FAILED: Recognition failed
    - PROCESSING: Task is still being processed
    - PARTIAL_SUCCESS: Some data was extracted, but not all
    
    // Common errorCode values:
    - "2005": Recognition failed because no valid information was found in the file
    - "C0110": Underlying LLM (Large Language Model) exception
  11. Query issued invoices using the 4.1.01 API

    Use the INVOICE.QUERY interface to retrieve information about issued invoices. This specific API is intended for scenarios involving tax-controlled invoices or a combination of tax-controlled and digital invoices. For pure digital invoice issuance (e.g., direct digital issuance), use interfaces 4.1.03 or 4.1.04 instead.

    Key Constraints:

    • The data object in the request body must be encrypted as a base64 string.
    • invoiceDateS (Start Date) and invoiceDateE (End Date) are mutually dependent: if one is provided, the other is required.
    • For tax-controlled invoices, invoiceCode is required; for digital invoices, it should be omitted.
    • To query a single invoice using invoice numbers, provide the same value for both invoiceNumberS and invoiceNumberE.
    POST /kapi/app/sim/openApi
    Header: access_token: {{access_token}}
    
    {
      "requestId": "1751546157921",
      "businessSystemCode": "FPY",
      "interfaceCode": "INVOICE.QUERY",
      "data": {
        "serialNo": "023115ad-0bc6-40d4-8169-15f8e8bd7529",
        "sellerTaxpayerId": "91440300XXXXXXXXXX",
        "invoiceType": "025",
        "invoiceStatus": "2",
        "pageNo": 0,
        "pageSize": 20
      }
    }
  12. Data structure for Used Car Sales Invoices (二手车销售统一发票)

    The Used Car Sales Invoice data structure is used for invoices with invoiceType: 13. It contains detailed information about the buyer, seller, vehicle specifications, and auction/market details.
    {
      "invoiceType": "13", // Used Car Sales Invoice
      "isElectricInvoice": "0|1", // 0: No, 1: Yes
      "needCheck": "0|1", // 0: No, 1: Yes
      "serialNo": "string", // Invoice serial number
      "orgNumber": "string", // Organization code
      "orgName": "string", // Organization name
      "originalState": "0|1", // 0: Not signed, 1: Signed
      "invoiceCode": "string", // Invoice code
      "invoiceNo": "string", // Invoice number
      "invoiceDate": "YYYY-MM-DD", // Issuance date
      "buyerPhoneNumber": "string", // Buyer phone
      "buyerName": "string", // Buyer name
      "buyerIdNo": "string", // Buyer Org Code/ID
      "buyerAddress": "string", // Buyer address
      "salerName": "string", // Seller name
      "salerPhoneNumber": "string", // Seller phone
      "salerIdNo": "string", // Seller Org Code/ID
      "salerAddress": "string", // Seller address
      "licensePlateNumber": "string", // License plate
      "registrationNumber": "string", // Registration certificate number
      "vehicleType": "string", // Vehicle type
      "vehicleIdentificationNo": "string", // VIN/Chassis number
      "bandModel": "string", // Brand/Model
      "vehicleManagementName": "string", // Vehicle management office name
      "totalAmount": "number", // Total vehicle price
      "auctionName": "string", // Auction/Business name
      "auctionPhoneNumber": "string", // Auction/Business phone
      "auctionAddress": "string", // Auction/Business address
      "auctionTaxpayerId": "string", // Auction/Business tax ID
      "auctionBankAccout": "string", // Auction/Business bank account
      "marketName": "string", // Second-hand market unit
      "marketPhoneNumber": "string", // Second-hand market phone
      "marketAddress": "string", // Second-hand market address
      "marketTaxpayerId": "string", // Second-hand market tax ID
      "marketBankAccout": "string", // Second-hand market bank account
      "remark": "string", // Remarks
      "invoiceStatus": "0|1|2|3|4", // 0: Normal, 1: Out of control, 2: Void, 3: Red-stamped, 4: Abnormal
      "issuingOffice": "string", // Issuing unit
      "drawer": "string", // Issuer
      "checkCode": "string", // Verification code
      "machineNo": "string", // Machine code
      "expendStatus": "1|30|60|65|70", // 1: Unused, 30: In use, 60: Used, 65: Booked, 70: Archived
      "billCreateTime": "YYYY-MM-DD HH:mm:ss", // Entry time
      "checkStatus": "1|2|3|4", // 1: Pass, 2: Fail, 3: Not checked, 4: No check needed
      "downloadUrl": "string", // Original file URL
      "pdfurl": "string", // PDF URL
      "snapshotUrl": "string", // Snapshot URL
      "fileName": "string", // File name
      "fileType": "1|2|4|9", // 1: pdf, 2: image, 4: ofd, 9: xml
      "rotationAngle": "number", // Rotation angle
      "region": "string", // Invoice region
      "pixel": "string", // Pixels
      "errorLevel": "0|1|2|3", // 0: Strict, 1: Moderate, 2: Light, 3: None
      "validateMessage": "string", // Compliance validation description
      "attachment": "Array", // Associated attachments
      "verifyResult": "Array" // Compliance verification results
    }