> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.staple.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.staple.ai/_mcp/server.

# Generate Fapiao PDF Document With XML Format

POST https://api.staple.io/v2/supernova/models/document/create-fapiao-xml
Content-Type: application/xml

Generate **Fapiao** PDF documents based on input XML data. The endpoint supports pre-configured formats and only specific data can go into each **Fapiao** PDF document.

Reference: https://docs.staple.ai/api-reference/v2/document-creation/generate-fapiao-pdf-document-with-xml-format

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v2
  version: 1.0.0
paths:
  /v2/supernova/models/document/create-fapiao-xml:
    post:
      operationId: generateFapiaoPdfDocumentWithXmlFormat
      summary: Generate Fapiao PDF Document With XML Format
      description: >-
        Generate **Fapiao** PDF documents based on input XML data. The endpoint
        supports pre-configured formats and only specific data can go into each
        **Fapiao** PDF document.
      tags:
        - documentCreation
      parameters:
        - name: x-api-key
          in: header
          description: API key issued by Staple.
          required: true
          schema:
            type: string
        - name: name
          in: header
          required: false
          schema:
            type: string
        - name: qid
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Document
                  Creation_generateFapiaoPdfDocumentWithXmlFormat_Response_200
      requestBody:
        content:
          application/json:
            schema:
              description: Any type
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    Document Creation_generateFapiaoPdfDocumentWithXmlFormat_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Document Creation_generateFapiaoPdfDocumentWithXmlFormat_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued by Staple.
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT obtained from the login endpoint.

```

## Examples



**Request**

```json
"<?xml version=\"1.0\" standalone=\"yes\"?>\n<EInvoice>\n    <Header>\n        <EIid>23312000000120549884</EIid>\n        <EInvoiceTag>SWEI3100</EInvoiceTag>\n        <Version>0.31</Version>\n        <InherentLabel>\n            <InIssuType>\n                <LabelCode>Y</LabelCode>\n                <LabelName>是否蓝字发票标志</LabelName>\n            </InIssuType>\n            <EInvoiceType>\n                <LabelCode>01</LabelCode>\n                <LabelName>电子发票</LabelName>\n            </EInvoiceType>\n            <GeneralOrSpecialVAT>\n                <LabelCode>02</LabelCode>\n                <LabelName>普通发票</LabelName>\n            </GeneralOrSpecialVAT>\n            <TaxpayerType>\n                <LabelCode>2</LabelCode>\n                <LabelName>小规模纳税人</LabelName>\n            </TaxpayerType>\n        </InherentLabel>\n        <UndefinedLabel>\n            <Label>\n                <LabelType>发票开具方式标签</LabelType>\n                <LabelCode>1</LabelCode>\n                <LabelName>网页开票</LabelName>\n            </Label>\n        </UndefinedLabel>\n    </Header>\n    <EInvoiceData>\n        <SellerInformation>\n            <SellerIdNum>91310110MA1G929487</SellerIdNum>\n            <SellerName>上海印佰传图文制作有限公司</SellerName>\n            <SellerAddr>上海市杨浦区国通路179号1层</SellerAddr>\n            <SellerTelNum>021-35309685</SellerTelNum>\n            <SellerBankName>中国工商银行股份有限公司上海市杨浦支行</SellerBankName>\n            <SellerBankAccNum>1001330309100174805</SellerBankAccNum>\n        </SellerInformation>\n        <BuyerInformation>\n            <BuyerIdNum>91310230MA1HHL7257</BuyerIdNum>\n            <BuyerName>逸速科技（上海）有限公司</BuyerName>\n        </BuyerInformation>\n        <BasicInformation>\n            <TotalAmWithoutTax>356.44</TotalAmWithoutTax>\n            <TotalTaxAm>3.56</TotalTaxAm>\n            <TotalTax-includedAmount>360.00</TotalTax-includedAmount>\n            <TotalTax-includedAmountInChinese>叁佰陆拾圆整</TotalTax-includedAmountInChinese>\n            <Drawer>刘爱娣</Drawer>\n            <RequestTime>2023-11-05 12:35:51</RequestTime>\n        </BasicInformation>\n        <IssuItemInformation>\n            <ItemName>*印刷品*图文制作费</ItemName>\n            <MeaUnits>项</MeaUnits>\n            <Quantity>1</Quantity>\n            <UnPrice>356.435643564356</UnPrice>\n            <Amount>356.44</Amount>\n            <TaxRate>0.01</TaxRate>\n            <ComTaxAm>3.56</ComTaxAm>\n            <TotaltaxIncludedAmount>360.00</TotaltaxIncludedAmount>\n            <TaxClassificationCode>1060203000000000000</TaxClassificationCode>\n        </IssuItemInformation>\n        <SpecificInformation/>\n        <AdditionalInformation/>\n    </EInvoiceData>\n    <SellerAuthentication>\n        <AuthenticationMethods>01</AuthenticationMethods>\n    </SellerAuthentication>\n    <TaxSupervisionInfo>\n        <InvoiceNumber>23312000000120549884</InvoiceNumber>\n        <IssueTime>2023-11-05</IssueTime>\n        <TaxBureauCode>13100000000</TaxBureauCode>\n        <TaxBureauName>国家税务总局上海市税务局</TaxBureauName>\n    </TaxSupervisionInfo>\n    <TaxBureauSignature>\n        <Reference URI=\"/Einvoice/Header|/Einvoice/EinvoiceData|/Einvoice/SellerAuthentication|/Einvoice/TaxSupervisionInfo|/Einvoice/TaxBureauSignature/SignatureTime\"/>\n        <SignatureAlgorithm>1.2.156.10197.1.501</SignatureAlgorithm>\n        <SignatureFormat>DETACH</SignatureFormat>\n        <SignatureTime>2024-02-23 12:58:44</SignatureTime>\n        <SignatureValue>3082017a060a2a811ccf550601040202a082016a30820166020101310e300c06082a811ccf550183110500300c060a2a811ccf550601040201318201413082013d02010130623058310b300906035504061302434e311b3019060355040b0c12e59bbde5aeb6e7a88ee58aa1e680bbe5b180312c302a06035504030c23e7a88ee58aa1e794b5e5ad90e8af81e4b9a6e7aea1e79086e4b8ade5bf8328534d32290206030000002631300c06082a811ccf550183110500a06e301906092a864886f70d010903310c060a2a811ccf550601040201302f06092a864886f70d010904312204208707e9cbd6f69b82b92f889b358544f00bc4f41c702a6d5b16a7195f8db40f3b3020060a2a864886f70d010919043112021032303139303930313030303030304153300c06082a811ccf55018375050004483046022100a101d123633e5e877181e0e34b63d2ea61b026378d7811846296cc6c68bbc140022100bd12c651fbd1c2ba4171360e630fa0bdc0df4be553fdd4b22a37171d7012d2f6&amp;MjAyNDAyMjMgMTI1ODQ0</SignatureValue>\n        <KeyInfo/>\n    </TaxBureauSignature>\n</EInvoice>"
```

**Response**

```json
{
  "createXmlDocument": {
    "message": "Document creation request has been accepted.",
    "requestId": "5a359a65-f380-4822-8936-81e86005c669"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.staple.io/v2/supernova/models/document/create-fapiao-xml"

payload = "\"<?xml version=\\\"1.0\\\" standalone=\\\"yes\\\"?>\\n<EInvoice>\\n    <Header>\\n        <EIid>23312000000120549884</EIid>\\n        <EInvoiceTag>SWEI3100</EInvoiceTag>\\n        <Version>0.31</Version>\\n        <InherentLabel>\\n            <InIssuType>\\n                <LabelCode>Y</LabelCode>\\n                <LabelName>是否蓝字发票标志</LabelName>\\n            </InIssuType>\\n            <EInvoiceType>\\n                <LabelCode>01</LabelCode>\\n                <LabelName>电子发票</LabelName>\\n            </EInvoiceType>\\n            <GeneralOrSpecialVAT>\\n                <LabelCode>02</LabelCode>\\n                <LabelName>普通发票</LabelName>\\n            </GeneralOrSpecialVAT>\\n            <TaxpayerType>\\n                <LabelCode>2</LabelCode>\\n                <LabelName>小规模纳税人</LabelName>\\n            </TaxpayerType>\\n        </InherentLabel>\\n        <UndefinedLabel>\\n            <Label>\\n                <LabelType>发票开具方式标签</LabelType>\\n                <LabelCode>1</LabelCode>\\n                <LabelName>网页开票</LabelName>\\n            </Label>\\n        </UndefinedLabel>\\n    </Header>\\n    <EInvoiceData>\\n        <SellerInformation>\\n            <SellerIdNum>91310110MA1G929487</SellerIdNum>\\n            <SellerName>上海印佰传图文制作有限公司</SellerName>\\n            <SellerAddr>上海市杨浦区国通路179号1层</SellerAddr>\\n            <SellerTelNum>021-35309685</SellerTelNum>\\n            <SellerBankName>中国工商银行股份有限公司上海市杨浦支行</SellerBankName>\\n            <SellerBankAccNum>1001330309100174805</SellerBankAccNum>\\n        </SellerInformation>\\n        <BuyerInformation>\\n            <BuyerIdNum>91310230MA1HHL7257</BuyerIdNum>\\n            <BuyerName>逸速科技（上海）有限公司</BuyerName>\\n        </BuyerInformation>\\n        <BasicInformation>\\n            <TotalAmWithoutTax>356.44</TotalAmWithoutTax>\\n            <TotalTaxAm>3.56</TotalTaxAm>\\n            <TotalTax-includedAmount>360.00</TotalTax-includedAmount>\\n            <TotalTax-includedAmountInChinese>叁佰陆拾圆整</TotalTax-includedAmountInChinese>\\n            <Drawer>刘爱娣</Drawer>\\n            <RequestTime>2023-11-05 12:35:51</RequestTime>\\n        </BasicInformation>\\n        <IssuItemInformation>\\n            <ItemName>*印刷品*图文制作费</ItemName>\\n            <MeaUnits>项</MeaUnits>\\n            <Quantity>1</Quantity>\\n            <UnPrice>356.435643564356</UnPrice>\\n            <Amount>356.44</Amount>\\n            <TaxRate>0.01</TaxRate>\\n            <ComTaxAm>3.56</ComTaxAm>\\n            <TotaltaxIncludedAmount>360.00</TotaltaxIncludedAmount>\\n            <TaxClassificationCode>1060203000000000000</TaxClassificationCode>\\n        </IssuItemInformation>\\n        <SpecificInformation/>\\n        <AdditionalInformation/>\\n    </EInvoiceData>\\n    <SellerAuthentication>\\n        <AuthenticationMethods>01</AuthenticationMethods>\\n    </SellerAuthentication>\\n    <TaxSupervisionInfo>\\n        <InvoiceNumber>23312000000120549884</InvoiceNumber>\\n        <IssueTime>2023-11-05</IssueTime>\\n        <TaxBureauCode>13100000000</TaxBureauCode>\\n        <TaxBureauName>国家税务总局上海市税务局</TaxBureauName>\\n    </TaxSupervisionInfo>\\n    <TaxBureauSignature>\\n        <Reference URI=\\\"/Einvoice/Header|/Einvoice/EinvoiceData|/Einvoice/SellerAuthentication|/Einvoice/TaxSupervisionInfo|/Einvoice/TaxBureauSignature/SignatureTime\\\"/>\\n        <SignatureAlgorithm>1.2.156.10197.1.501</SignatureAlgorithm>\\n        <SignatureFormat>DETACH</SignatureFormat>\\n        <SignatureTime>2024-02-23 12:58:44</SignatureTime>\\n        <SignatureValue>3082017a060a2a811ccf550601040202a082016a30820166020101310e300c06082a811ccf550183110500300c060a2a811ccf550601040201318201413082013d02010130623058310b300906035504061302434e311b3019060355040b0c12e59bbde5aeb6e7a88ee58aa1e680bbe5b180312c302a06035504030c23e7a88ee58aa1e794b5e5ad90e8af81e4b9a6e7aea1e79086e4b8ade5bf8328534d32290206030000002631300c06082a811ccf550183110500a06e301906092a864886f70d010903310c060a2a811ccf550601040201302f06092a864886f70d010904312204208707e9cbd6f69b82b92f889b358544f00bc4f41c702a6d5b16a7195f8db40f3b3020060a2a864886f70d010919043112021032303139303930313030303030304153300c06082a811ccf55018375050004483046022100a101d123633e5e877181e0e34b63d2ea61b026378d7811846296cc6c68bbc140022100bd12c651fbd1c2ba4171360e630fa0bdc0df4be553fdd4b22a37171d7012d2f6&amp;MjAyNDAyMjMgMTI1ODQ0</SignatureValue>\\n        <KeyInfo/>\\n    </TaxBureauSignature>\\n</EInvoice>\""
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/xml"
}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.staple.io/v2/supernova/models/document/create-fapiao-xml';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/xml'},
  body: '"<?xml version=\"1.0\" standalone=\"yes\"?>\n<EInvoice>\n    <Header>\n        <EIid>23312000000120549884</EIid>\n        <EInvoiceTag>SWEI3100</EInvoiceTag>\n        <Version>0.31</Version>\n        <InherentLabel>\n            <InIssuType>\n                <LabelCode>Y</LabelCode>\n                <LabelName>是否蓝字发票标志</LabelName>\n            </InIssuType>\n            <EInvoiceType>\n                <LabelCode>01</LabelCode>\n                <LabelName>电子发票</LabelName>\n            </EInvoiceType>\n            <GeneralOrSpecialVAT>\n                <LabelCode>02</LabelCode>\n                <LabelName>普通发票</LabelName>\n            </GeneralOrSpecialVAT>\n            <TaxpayerType>\n                <LabelCode>2</LabelCode>\n                <LabelName>小规模纳税人</LabelName>\n            </TaxpayerType>\n        </InherentLabel>\n        <UndefinedLabel>\n            <Label>\n                <LabelType>发票开具方式标签</LabelType>\n                <LabelCode>1</LabelCode>\n                <LabelName>网页开票</LabelName>\n            </Label>\n        </UndefinedLabel>\n    </Header>\n    <EInvoiceData>\n        <SellerInformation>\n            <SellerIdNum>91310110MA1G929487</SellerIdNum>\n            <SellerName>上海印佰传图文制作有限公司</SellerName>\n            <SellerAddr>上海市杨浦区国通路179号1层</SellerAddr>\n            <SellerTelNum>021-35309685</SellerTelNum>\n            <SellerBankName>中国工商银行股份有限公司上海市杨浦支行</SellerBankName>\n            <SellerBankAccNum>1001330309100174805</SellerBankAccNum>\n        </SellerInformation>\n        <BuyerInformation>\n            <BuyerIdNum>91310230MA1HHL7257</BuyerIdNum>\n            <BuyerName>逸速科技（上海）有限公司</BuyerName>\n        </BuyerInformation>\n        <BasicInformation>\n            <TotalAmWithoutTax>356.44</TotalAmWithoutTax>\n            <TotalTaxAm>3.56</TotalTaxAm>\n            <TotalTax-includedAmount>360.00</TotalTax-includedAmount>\n            <TotalTax-includedAmountInChinese>叁佰陆拾圆整</TotalTax-includedAmountInChinese>\n            <Drawer>刘爱娣</Drawer>\n            <RequestTime>2023-11-05 12:35:51</RequestTime>\n        </BasicInformation>\n        <IssuItemInformation>\n            <ItemName>*印刷品*图文制作费</ItemName>\n            <MeaUnits>项</MeaUnits>\n            <Quantity>1</Quantity>\n            <UnPrice>356.435643564356</UnPrice>\n            <Amount>356.44</Amount>\n            <TaxRate>0.01</TaxRate>\n            <ComTaxAm>3.56</ComTaxAm>\n            <TotaltaxIncludedAmount>360.00</TotaltaxIncludedAmount>\n            <TaxClassificationCode>1060203000000000000</TaxClassificationCode>\n        </IssuItemInformation>\n        <SpecificInformation/>\n        <AdditionalInformation/>\n    </EInvoiceData>\n    <SellerAuthentication>\n        <AuthenticationMethods>01</AuthenticationMethods>\n    </SellerAuthentication>\n    <TaxSupervisionInfo>\n        <InvoiceNumber>23312000000120549884</InvoiceNumber>\n        <IssueTime>2023-11-05</IssueTime>\n        <TaxBureauCode>13100000000</TaxBureauCode>\n        <TaxBureauName>国家税务总局上海市税务局</TaxBureauName>\n    </TaxSupervisionInfo>\n    <TaxBureauSignature>\n        <Reference URI=\"/Einvoice/Header|/Einvoice/EinvoiceData|/Einvoice/SellerAuthentication|/Einvoice/TaxSupervisionInfo|/Einvoice/TaxBureauSignature/SignatureTime\"/>\n        <SignatureAlgorithm>1.2.156.10197.1.501</SignatureAlgorithm>\n        <SignatureFormat>DETACH</SignatureFormat>\n        <SignatureTime>2024-02-23 12:58:44</SignatureTime>\n        <SignatureValue>3082017a060a2a811ccf550601040202a082016a30820166020101310e300c06082a811ccf550183110500300c060a2a811ccf550601040201318201413082013d02010130623058310b300906035504061302434e311b3019060355040b0c12e59bbde5aeb6e7a88ee58aa1e680bbe5b180312c302a06035504030c23e7a88ee58aa1e794b5e5ad90e8af81e4b9a6e7aea1e79086e4b8ade5bf8328534d32290206030000002631300c06082a811ccf550183110500a06e301906092a864886f70d010903310c060a2a811ccf550601040201302f06092a864886f70d010904312204208707e9cbd6f69b82b92f889b358544f00bc4f41c702a6d5b16a7195f8db40f3b3020060a2a864886f70d010919043112021032303139303930313030303030304153300c06082a811ccf55018375050004483046022100a101d123633e5e877181e0e34b63d2ea61b026378d7811846296cc6c68bbc140022100bd12c651fbd1c2ba4171360e630fa0bdc0df4be553fdd4b22a37171d7012d2f6&amp;MjAyNDAyMjMgMTI1ODQ0</SignatureValue>\n        <KeyInfo/>\n    </TaxBureauSignature>\n</EInvoice>"'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.staple.io/v2/supernova/models/document/create-fapiao-xml"

	payload := strings.NewReader("\"<?xml version=\\\"1.0\\\" standalone=\\\"yes\\\"?>\\n<EInvoice>\\n    <Header>\\n        <EIid>23312000000120549884</EIid>\\n        <EInvoiceTag>SWEI3100</EInvoiceTag>\\n        <Version>0.31</Version>\\n        <InherentLabel>\\n            <InIssuType>\\n                <LabelCode>Y</LabelCode>\\n                <LabelName>是否蓝字发票标志</LabelName>\\n            </InIssuType>\\n            <EInvoiceType>\\n                <LabelCode>01</LabelCode>\\n                <LabelName>电子发票</LabelName>\\n            </EInvoiceType>\\n            <GeneralOrSpecialVAT>\\n                <LabelCode>02</LabelCode>\\n                <LabelName>普通发票</LabelName>\\n            </GeneralOrSpecialVAT>\\n            <TaxpayerType>\\n                <LabelCode>2</LabelCode>\\n                <LabelName>小规模纳税人</LabelName>\\n            </TaxpayerType>\\n        </InherentLabel>\\n        <UndefinedLabel>\\n            <Label>\\n                <LabelType>发票开具方式标签</LabelType>\\n                <LabelCode>1</LabelCode>\\n                <LabelName>网页开票</LabelName>\\n            </Label>\\n        </UndefinedLabel>\\n    </Header>\\n    <EInvoiceData>\\n        <SellerInformation>\\n            <SellerIdNum>91310110MA1G929487</SellerIdNum>\\n            <SellerName>上海印佰传图文制作有限公司</SellerName>\\n            <SellerAddr>上海市杨浦区国通路179号1层</SellerAddr>\\n            <SellerTelNum>021-35309685</SellerTelNum>\\n            <SellerBankName>中国工商银行股份有限公司上海市杨浦支行</SellerBankName>\\n            <SellerBankAccNum>1001330309100174805</SellerBankAccNum>\\n        </SellerInformation>\\n        <BuyerInformation>\\n            <BuyerIdNum>91310230MA1HHL7257</BuyerIdNum>\\n            <BuyerName>逸速科技（上海）有限公司</BuyerName>\\n        </BuyerInformation>\\n        <BasicInformation>\\n            <TotalAmWithoutTax>356.44</TotalAmWithoutTax>\\n            <TotalTaxAm>3.56</TotalTaxAm>\\n            <TotalTax-includedAmount>360.00</TotalTax-includedAmount>\\n            <TotalTax-includedAmountInChinese>叁佰陆拾圆整</TotalTax-includedAmountInChinese>\\n            <Drawer>刘爱娣</Drawer>\\n            <RequestTime>2023-11-05 12:35:51</RequestTime>\\n        </BasicInformation>\\n        <IssuItemInformation>\\n            <ItemName>*印刷品*图文制作费</ItemName>\\n            <MeaUnits>项</MeaUnits>\\n            <Quantity>1</Quantity>\\n            <UnPrice>356.435643564356</UnPrice>\\n            <Amount>356.44</Amount>\\n            <TaxRate>0.01</TaxRate>\\n            <ComTaxAm>3.56</ComTaxAm>\\n            <TotaltaxIncludedAmount>360.00</TotaltaxIncludedAmount>\\n            <TaxClassificationCode>1060203000000000000</TaxClassificationCode>\\n        </IssuItemInformation>\\n        <SpecificInformation/>\\n        <AdditionalInformation/>\\n    </EInvoiceData>\\n    <SellerAuthentication>\\n        <AuthenticationMethods>01</AuthenticationMethods>\\n    </SellerAuthentication>\\n    <TaxSupervisionInfo>\\n        <InvoiceNumber>23312000000120549884</InvoiceNumber>\\n        <IssueTime>2023-11-05</IssueTime>\\n        <TaxBureauCode>13100000000</TaxBureauCode>\\n        <TaxBureauName>国家税务总局上海市税务局</TaxBureauName>\\n    </TaxSupervisionInfo>\\n    <TaxBureauSignature>\\n        <Reference URI=\\\"/Einvoice/Header|/Einvoice/EinvoiceData|/Einvoice/SellerAuthentication|/Einvoice/TaxSupervisionInfo|/Einvoice/TaxBureauSignature/SignatureTime\\\"/>\\n        <SignatureAlgorithm>1.2.156.10197.1.501</SignatureAlgorithm>\\n        <SignatureFormat>DETACH</SignatureFormat>\\n        <SignatureTime>2024-02-23 12:58:44</SignatureTime>\\n        <SignatureValue>3082017a060a2a811ccf550601040202a082016a30820166020101310e300c06082a811ccf550183110500300c060a2a811ccf550601040201318201413082013d02010130623058310b300906035504061302434e311b3019060355040b0c12e59bbde5aeb6e7a88ee58aa1e680bbe5b180312c302a06035504030c23e7a88ee58aa1e794b5e5ad90e8af81e4b9a6e7aea1e79086e4b8ade5bf8328534d32290206030000002631300c06082a811ccf550183110500a06e301906092a864886f70d010903310c060a2a811ccf550601040201302f06092a864886f70d010904312204208707e9cbd6f69b82b92f889b358544f00bc4f41c702a6d5b16a7195f8db40f3b3020060a2a864886f70d010919043112021032303139303930313030303030304153300c06082a811ccf55018375050004483046022100a101d123633e5e877181e0e34b63d2ea61b026378d7811846296cc6c68bbc140022100bd12c651fbd1c2ba4171360e630fa0bdc0df4be553fdd4b22a37171d7012d2f6&amp;MjAyNDAyMjMgMTI1ODQ0</SignatureValue>\\n        <KeyInfo/>\\n    </TaxBureauSignature>\\n</EInvoice>\"")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/xml")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v2/supernova/models/document/create-fapiao-xml")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/xml'
request.body = "\"<?xml version=\\\"1.0\\\" standalone=\\\"yes\\\"?>\\n<EInvoice>\\n    <Header>\\n        <EIid>23312000000120549884</EIid>\\n        <EInvoiceTag>SWEI3100</EInvoiceTag>\\n        <Version>0.31</Version>\\n        <InherentLabel>\\n            <InIssuType>\\n                <LabelCode>Y</LabelCode>\\n                <LabelName>是否蓝字发票标志</LabelName>\\n            </InIssuType>\\n            <EInvoiceType>\\n                <LabelCode>01</LabelCode>\\n                <LabelName>电子发票</LabelName>\\n            </EInvoiceType>\\n            <GeneralOrSpecialVAT>\\n                <LabelCode>02</LabelCode>\\n                <LabelName>普通发票</LabelName>\\n            </GeneralOrSpecialVAT>\\n            <TaxpayerType>\\n                <LabelCode>2</LabelCode>\\n                <LabelName>小规模纳税人</LabelName>\\n            </TaxpayerType>\\n        </InherentLabel>\\n        <UndefinedLabel>\\n            <Label>\\n                <LabelType>发票开具方式标签</LabelType>\\n                <LabelCode>1</LabelCode>\\n                <LabelName>网页开票</LabelName>\\n            </Label>\\n        </UndefinedLabel>\\n    </Header>\\n    <EInvoiceData>\\n        <SellerInformation>\\n            <SellerIdNum>91310110MA1G929487</SellerIdNum>\\n            <SellerName>上海印佰传图文制作有限公司</SellerName>\\n            <SellerAddr>上海市杨浦区国通路179号1层</SellerAddr>\\n            <SellerTelNum>021-35309685</SellerTelNum>\\n            <SellerBankName>中国工商银行股份有限公司上海市杨浦支行</SellerBankName>\\n            <SellerBankAccNum>1001330309100174805</SellerBankAccNum>\\n        </SellerInformation>\\n        <BuyerInformation>\\n            <BuyerIdNum>91310230MA1HHL7257</BuyerIdNum>\\n            <BuyerName>逸速科技（上海）有限公司</BuyerName>\\n        </BuyerInformation>\\n        <BasicInformation>\\n            <TotalAmWithoutTax>356.44</TotalAmWithoutTax>\\n            <TotalTaxAm>3.56</TotalTaxAm>\\n            <TotalTax-includedAmount>360.00</TotalTax-includedAmount>\\n            <TotalTax-includedAmountInChinese>叁佰陆拾圆整</TotalTax-includedAmountInChinese>\\n            <Drawer>刘爱娣</Drawer>\\n            <RequestTime>2023-11-05 12:35:51</RequestTime>\\n        </BasicInformation>\\n        <IssuItemInformation>\\n            <ItemName>*印刷品*图文制作费</ItemName>\\n            <MeaUnits>项</MeaUnits>\\n            <Quantity>1</Quantity>\\n            <UnPrice>356.435643564356</UnPrice>\\n            <Amount>356.44</Amount>\\n            <TaxRate>0.01</TaxRate>\\n            <ComTaxAm>3.56</ComTaxAm>\\n            <TotaltaxIncludedAmount>360.00</TotaltaxIncludedAmount>\\n            <TaxClassificationCode>1060203000000000000</TaxClassificationCode>\\n        </IssuItemInformation>\\n        <SpecificInformation/>\\n        <AdditionalInformation/>\\n    </EInvoiceData>\\n    <SellerAuthentication>\\n        <AuthenticationMethods>01</AuthenticationMethods>\\n    </SellerAuthentication>\\n    <TaxSupervisionInfo>\\n        <InvoiceNumber>23312000000120549884</InvoiceNumber>\\n        <IssueTime>2023-11-05</IssueTime>\\n        <TaxBureauCode>13100000000</TaxBureauCode>\\n        <TaxBureauName>国家税务总局上海市税务局</TaxBureauName>\\n    </TaxSupervisionInfo>\\n    <TaxBureauSignature>\\n        <Reference URI=\\\"/Einvoice/Header|/Einvoice/EinvoiceData|/Einvoice/SellerAuthentication|/Einvoice/TaxSupervisionInfo|/Einvoice/TaxBureauSignature/SignatureTime\\\"/>\\n        <SignatureAlgorithm>1.2.156.10197.1.501</SignatureAlgorithm>\\n        <SignatureFormat>DETACH</SignatureFormat>\\n        <SignatureTime>2024-02-23 12:58:44</SignatureTime>\\n        <SignatureValue>3082017a060a2a811ccf550601040202a082016a30820166020101310e300c06082a811ccf550183110500300c060a2a811ccf550601040201318201413082013d02010130623058310b300906035504061302434e311b3019060355040b0c12e59bbde5aeb6e7a88ee58aa1e680bbe5b180312c302a06035504030c23e7a88ee58aa1e794b5e5ad90e8af81e4b9a6e7aea1e79086e4b8ade5bf8328534d32290206030000002631300c06082a811ccf550183110500a06e301906092a864886f70d010903310c060a2a811ccf550601040201302f06092a864886f70d010904312204208707e9cbd6f69b82b92f889b358544f00bc4f41c702a6d5b16a7195f8db40f3b3020060a2a864886f70d010919043112021032303139303930313030303030304153300c06082a811ccf55018375050004483046022100a101d123633e5e877181e0e34b63d2ea61b026378d7811846296cc6c68bbc140022100bd12c651fbd1c2ba4171360e630fa0bdc0df4be553fdd4b22a37171d7012d2f6&amp;MjAyNDAyMjMgMTI1ODQ0</SignatureValue>\\n        <KeyInfo/>\\n    </TaxBureauSignature>\\n</EInvoice>\""

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.staple.io/v2/supernova/models/document/create-fapiao-xml")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/xml")
  .body("\"<?xml version=\\\"1.0\\\" standalone=\\\"yes\\\"?>\\n<EInvoice>\\n    <Header>\\n        <EIid>23312000000120549884</EIid>\\n        <EInvoiceTag>SWEI3100</EInvoiceTag>\\n        <Version>0.31</Version>\\n        <InherentLabel>\\n            <InIssuType>\\n                <LabelCode>Y</LabelCode>\\n                <LabelName>是否蓝字发票标志</LabelName>\\n            </InIssuType>\\n            <EInvoiceType>\\n                <LabelCode>01</LabelCode>\\n                <LabelName>电子发票</LabelName>\\n            </EInvoiceType>\\n            <GeneralOrSpecialVAT>\\n                <LabelCode>02</LabelCode>\\n                <LabelName>普通发票</LabelName>\\n            </GeneralOrSpecialVAT>\\n            <TaxpayerType>\\n                <LabelCode>2</LabelCode>\\n                <LabelName>小规模纳税人</LabelName>\\n            </TaxpayerType>\\n        </InherentLabel>\\n        <UndefinedLabel>\\n            <Label>\\n                <LabelType>发票开具方式标签</LabelType>\\n                <LabelCode>1</LabelCode>\\n                <LabelName>网页开票</LabelName>\\n            </Label>\\n        </UndefinedLabel>\\n    </Header>\\n    <EInvoiceData>\\n        <SellerInformation>\\n            <SellerIdNum>91310110MA1G929487</SellerIdNum>\\n            <SellerName>上海印佰传图文制作有限公司</SellerName>\\n            <SellerAddr>上海市杨浦区国通路179号1层</SellerAddr>\\n            <SellerTelNum>021-35309685</SellerTelNum>\\n            <SellerBankName>中国工商银行股份有限公司上海市杨浦支行</SellerBankName>\\n            <SellerBankAccNum>1001330309100174805</SellerBankAccNum>\\n        </SellerInformation>\\n        <BuyerInformation>\\n            <BuyerIdNum>91310230MA1HHL7257</BuyerIdNum>\\n            <BuyerName>逸速科技（上海）有限公司</BuyerName>\\n        </BuyerInformation>\\n        <BasicInformation>\\n            <TotalAmWithoutTax>356.44</TotalAmWithoutTax>\\n            <TotalTaxAm>3.56</TotalTaxAm>\\n            <TotalTax-includedAmount>360.00</TotalTax-includedAmount>\\n            <TotalTax-includedAmountInChinese>叁佰陆拾圆整</TotalTax-includedAmountInChinese>\\n            <Drawer>刘爱娣</Drawer>\\n            <RequestTime>2023-11-05 12:35:51</RequestTime>\\n        </BasicInformation>\\n        <IssuItemInformation>\\n            <ItemName>*印刷品*图文制作费</ItemName>\\n            <MeaUnits>项</MeaUnits>\\n            <Quantity>1</Quantity>\\n            <UnPrice>356.435643564356</UnPrice>\\n            <Amount>356.44</Amount>\\n            <TaxRate>0.01</TaxRate>\\n            <ComTaxAm>3.56</ComTaxAm>\\n            <TotaltaxIncludedAmount>360.00</TotaltaxIncludedAmount>\\n            <TaxClassificationCode>1060203000000000000</TaxClassificationCode>\\n        </IssuItemInformation>\\n        <SpecificInformation/>\\n        <AdditionalInformation/>\\n    </EInvoiceData>\\n    <SellerAuthentication>\\n        <AuthenticationMethods>01</AuthenticationMethods>\\n    </SellerAuthentication>\\n    <TaxSupervisionInfo>\\n        <InvoiceNumber>23312000000120549884</InvoiceNumber>\\n        <IssueTime>2023-11-05</IssueTime>\\n        <TaxBureauCode>13100000000</TaxBureauCode>\\n        <TaxBureauName>国家税务总局上海市税务局</TaxBureauName>\\n    </TaxSupervisionInfo>\\n    <TaxBureauSignature>\\n        <Reference URI=\\\"/Einvoice/Header|/Einvoice/EinvoiceData|/Einvoice/SellerAuthentication|/Einvoice/TaxSupervisionInfo|/Einvoice/TaxBureauSignature/SignatureTime\\\"/>\\n        <SignatureAlgorithm>1.2.156.10197.1.501</SignatureAlgorithm>\\n        <SignatureFormat>DETACH</SignatureFormat>\\n        <SignatureTime>2024-02-23 12:58:44</SignatureTime>\\n        <SignatureValue>3082017a060a2a811ccf550601040202a082016a30820166020101310e300c06082a811ccf550183110500300c060a2a811ccf550601040201318201413082013d02010130623058310b300906035504061302434e311b3019060355040b0c12e59bbde5aeb6e7a88ee58aa1e680bbe5b180312c302a06035504030c23e7a88ee58aa1e794b5e5ad90e8af81e4b9a6e7aea1e79086e4b8ade5bf8328534d32290206030000002631300c06082a811ccf550183110500a06e301906092a864886f70d010903310c060a2a811ccf550601040201302f06092a864886f70d010904312204208707e9cbd6f69b82b92f889b358544f00bc4f41c702a6d5b16a7195f8db40f3b3020060a2a864886f70d010919043112021032303139303930313030303030304153300c06082a811ccf55018375050004483046022100a101d123633e5e877181e0e34b63d2ea61b026378d7811846296cc6c68bbc140022100bd12c651fbd1c2ba4171360e630fa0bdc0df4be553fdd4b22a37171d7012d2f6&amp;MjAyNDAyMjMgMTI1ODQ0</SignatureValue>\\n        <KeyInfo/>\\n    </TaxBureauSignature>\\n</EInvoice>\"")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.staple.io/v2/supernova/models/document/create-fapiao-xml', [
  'body' => '"<?xml version=\\"1.0\\" standalone=\\"yes\\"?>\\n<EInvoice>\\n    <Header>\\n        <EIid>23312000000120549884</EIid>\\n        <EInvoiceTag>SWEI3100</EInvoiceTag>\\n        <Version>0.31</Version>\\n        <InherentLabel>\\n            <InIssuType>\\n                <LabelCode>Y</LabelCode>\\n                <LabelName>是否蓝字发票标志</LabelName>\\n            </InIssuType>\\n            <EInvoiceType>\\n                <LabelCode>01</LabelCode>\\n                <LabelName>电子发票</LabelName>\\n            </EInvoiceType>\\n            <GeneralOrSpecialVAT>\\n                <LabelCode>02</LabelCode>\\n                <LabelName>普通发票</LabelName>\\n            </GeneralOrSpecialVAT>\\n            <TaxpayerType>\\n                <LabelCode>2</LabelCode>\\n                <LabelName>小规模纳税人</LabelName>\\n            </TaxpayerType>\\n        </InherentLabel>\\n        <UndefinedLabel>\\n            <Label>\\n                <LabelType>发票开具方式标签</LabelType>\\n                <LabelCode>1</LabelCode>\\n                <LabelName>网页开票</LabelName>\\n            </Label>\\n        </UndefinedLabel>\\n    </Header>\\n    <EInvoiceData>\\n        <SellerInformation>\\n            <SellerIdNum>91310110MA1G929487</SellerIdNum>\\n            <SellerName>上海印佰传图文制作有限公司</SellerName>\\n            <SellerAddr>上海市杨浦区国通路179号1层</SellerAddr>\\n            <SellerTelNum>021-35309685</SellerTelNum>\\n            <SellerBankName>中国工商银行股份有限公司上海市杨浦支行</SellerBankName>\\n            <SellerBankAccNum>1001330309100174805</SellerBankAccNum>\\n        </SellerInformation>\\n        <BuyerInformation>\\n            <BuyerIdNum>91310230MA1HHL7257</BuyerIdNum>\\n            <BuyerName>逸速科技（上海）有限公司</BuyerName>\\n        </BuyerInformation>\\n        <BasicInformation>\\n            <TotalAmWithoutTax>356.44</TotalAmWithoutTax>\\n            <TotalTaxAm>3.56</TotalTaxAm>\\n            <TotalTax-includedAmount>360.00</TotalTax-includedAmount>\\n            <TotalTax-includedAmountInChinese>叁佰陆拾圆整</TotalTax-includedAmountInChinese>\\n            <Drawer>刘爱娣</Drawer>\\n            <RequestTime>2023-11-05 12:35:51</RequestTime>\\n        </BasicInformation>\\n        <IssuItemInformation>\\n            <ItemName>*印刷品*图文制作费</ItemName>\\n            <MeaUnits>项</MeaUnits>\\n            <Quantity>1</Quantity>\\n            <UnPrice>356.435643564356</UnPrice>\\n            <Amount>356.44</Amount>\\n            <TaxRate>0.01</TaxRate>\\n            <ComTaxAm>3.56</ComTaxAm>\\n            <TotaltaxIncludedAmount>360.00</TotaltaxIncludedAmount>\\n            <TaxClassificationCode>1060203000000000000</TaxClassificationCode>\\n        </IssuItemInformation>\\n        <SpecificInformation/>\\n        <AdditionalInformation/>\\n    </EInvoiceData>\\n    <SellerAuthentication>\\n        <AuthenticationMethods>01</AuthenticationMethods>\\n    </SellerAuthentication>\\n    <TaxSupervisionInfo>\\n        <InvoiceNumber>23312000000120549884</InvoiceNumber>\\n        <IssueTime>2023-11-05</IssueTime>\\n        <TaxBureauCode>13100000000</TaxBureauCode>\\n        <TaxBureauName>国家税务总局上海市税务局</TaxBureauName>\\n    </TaxSupervisionInfo>\\n    <TaxBureauSignature>\\n        <Reference URI=\\"/Einvoice/Header|/Einvoice/EinvoiceData|/Einvoice/SellerAuthentication|/Einvoice/TaxSupervisionInfo|/Einvoice/TaxBureauSignature/SignatureTime\\"/>\\n        <SignatureAlgorithm>1.2.156.10197.1.501</SignatureAlgorithm>\\n        <SignatureFormat>DETACH</SignatureFormat>\\n        <SignatureTime>2024-02-23 12:58:44</SignatureTime>\\n        <SignatureValue>3082017a060a2a811ccf550601040202a082016a30820166020101310e300c06082a811ccf550183110500300c060a2a811ccf550601040201318201413082013d02010130623058310b300906035504061302434e311b3019060355040b0c12e59bbde5aeb6e7a88ee58aa1e680bbe5b180312c302a06035504030c23e7a88ee58aa1e794b5e5ad90e8af81e4b9a6e7aea1e79086e4b8ade5bf8328534d32290206030000002631300c06082a811ccf550183110500a06e301906092a864886f70d010903310c060a2a811ccf550601040201302f06092a864886f70d010904312204208707e9cbd6f69b82b92f889b358544f00bc4f41c702a6d5b16a7195f8db40f3b3020060a2a864886f70d010919043112021032303139303930313030303030304153300c06082a811ccf55018375050004483046022100a101d123633e5e877181e0e34b63d2ea61b026378d7811846296cc6c68bbc140022100bd12c651fbd1c2ba4171360e630fa0bdc0df4be553fdd4b22a37171d7012d2f6&amp;MjAyNDAyMjMgMTI1ODQ0</SignatureValue>\\n        <KeyInfo/>\\n    </TaxBureauSignature>\\n</EInvoice>"',
  'headers' => [
    'Content-Type' => 'application/xml',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.staple.io/v2/supernova/models/document/create-fapiao-xml");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/xml");
request.AddParameter("application/xml", "\"<?xml version=\\\"1.0\\\" standalone=\\\"yes\\\"?>\\n<EInvoice>\\n    <Header>\\n        <EIid>23312000000120549884</EIid>\\n        <EInvoiceTag>SWEI3100</EInvoiceTag>\\n        <Version>0.31</Version>\\n        <InherentLabel>\\n            <InIssuType>\\n                <LabelCode>Y</LabelCode>\\n                <LabelName>是否蓝字发票标志</LabelName>\\n            </InIssuType>\\n            <EInvoiceType>\\n                <LabelCode>01</LabelCode>\\n                <LabelName>电子发票</LabelName>\\n            </EInvoiceType>\\n            <GeneralOrSpecialVAT>\\n                <LabelCode>02</LabelCode>\\n                <LabelName>普通发票</LabelName>\\n            </GeneralOrSpecialVAT>\\n            <TaxpayerType>\\n                <LabelCode>2</LabelCode>\\n                <LabelName>小规模纳税人</LabelName>\\n            </TaxpayerType>\\n        </InherentLabel>\\n        <UndefinedLabel>\\n            <Label>\\n                <LabelType>发票开具方式标签</LabelType>\\n                <LabelCode>1</LabelCode>\\n                <LabelName>网页开票</LabelName>\\n            </Label>\\n        </UndefinedLabel>\\n    </Header>\\n    <EInvoiceData>\\n        <SellerInformation>\\n            <SellerIdNum>91310110MA1G929487</SellerIdNum>\\n            <SellerName>上海印佰传图文制作有限公司</SellerName>\\n            <SellerAddr>上海市杨浦区国通路179号1层</SellerAddr>\\n            <SellerTelNum>021-35309685</SellerTelNum>\\n            <SellerBankName>中国工商银行股份有限公司上海市杨浦支行</SellerBankName>\\n            <SellerBankAccNum>1001330309100174805</SellerBankAccNum>\\n        </SellerInformation>\\n        <BuyerInformation>\\n            <BuyerIdNum>91310230MA1HHL7257</BuyerIdNum>\\n            <BuyerName>逸速科技（上海）有限公司</BuyerName>\\n        </BuyerInformation>\\n        <BasicInformation>\\n            <TotalAmWithoutTax>356.44</TotalAmWithoutTax>\\n            <TotalTaxAm>3.56</TotalTaxAm>\\n            <TotalTax-includedAmount>360.00</TotalTax-includedAmount>\\n            <TotalTax-includedAmountInChinese>叁佰陆拾圆整</TotalTax-includedAmountInChinese>\\n            <Drawer>刘爱娣</Drawer>\\n            <RequestTime>2023-11-05 12:35:51</RequestTime>\\n        </BasicInformation>\\n        <IssuItemInformation>\\n            <ItemName>*印刷品*图文制作费</ItemName>\\n            <MeaUnits>项</MeaUnits>\\n            <Quantity>1</Quantity>\\n            <UnPrice>356.435643564356</UnPrice>\\n            <Amount>356.44</Amount>\\n            <TaxRate>0.01</TaxRate>\\n            <ComTaxAm>3.56</ComTaxAm>\\n            <TotaltaxIncludedAmount>360.00</TotaltaxIncludedAmount>\\n            <TaxClassificationCode>1060203000000000000</TaxClassificationCode>\\n        </IssuItemInformation>\\n        <SpecificInformation/>\\n        <AdditionalInformation/>\\n    </EInvoiceData>\\n    <SellerAuthentication>\\n        <AuthenticationMethods>01</AuthenticationMethods>\\n    </SellerAuthentication>\\n    <TaxSupervisionInfo>\\n        <InvoiceNumber>23312000000120549884</InvoiceNumber>\\n        <IssueTime>2023-11-05</IssueTime>\\n        <TaxBureauCode>13100000000</TaxBureauCode>\\n        <TaxBureauName>国家税务总局上海市税务局</TaxBureauName>\\n    </TaxSupervisionInfo>\\n    <TaxBureauSignature>\\n        <Reference URI=\\\"/Einvoice/Header|/Einvoice/EinvoiceData|/Einvoice/SellerAuthentication|/Einvoice/TaxSupervisionInfo|/Einvoice/TaxBureauSignature/SignatureTime\\\"/>\\n        <SignatureAlgorithm>1.2.156.10197.1.501</SignatureAlgorithm>\\n        <SignatureFormat>DETACH</SignatureFormat>\\n        <SignatureTime>2024-02-23 12:58:44</SignatureTime>\\n        <SignatureValue>3082017a060a2a811ccf550601040202a082016a30820166020101310e300c06082a811ccf550183110500300c060a2a811ccf550601040201318201413082013d02010130623058310b300906035504061302434e311b3019060355040b0c12e59bbde5aeb6e7a88ee58aa1e680bbe5b180312c302a06035504030c23e7a88ee58aa1e794b5e5ad90e8af81e4b9a6e7aea1e79086e4b8ade5bf8328534d32290206030000002631300c06082a811ccf550183110500a06e301906092a864886f70d010903310c060a2a811ccf550601040201302f06092a864886f70d010904312204208707e9cbd6f69b82b92f889b358544f00bc4f41c702a6d5b16a7195f8db40f3b3020060a2a864886f70d010919043112021032303139303930313030303030304153300c06082a811ccf55018375050004483046022100a101d123633e5e877181e0e34b63d2ea61b026378d7811846296cc6c68bbc140022100bd12c651fbd1c2ba4171360e630fa0bdc0df4be553fdd4b22a37171d7012d2f6&amp;MjAyNDAyMjMgMTI1ODQ0</SignatureValue>\\n        <KeyInfo/>\\n    </TaxBureauSignature>\\n</EInvoice>\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/xml"
]

let postData = NSData(data: ""<?xml version=\"1.0\" standalone=\"yes\"?>\n<EInvoice>\n    <Header>\n        <EIid>23312000000120549884</EIid>\n        <EInvoiceTag>SWEI3100</EInvoiceTag>\n        <Version>0.31</Version>\n        <InherentLabel>\n            <InIssuType>\n                <LabelCode>Y</LabelCode>\n                <LabelName>是否蓝字发票标志</LabelName>\n            </InIssuType>\n            <EInvoiceType>\n                <LabelCode>01</LabelCode>\n                <LabelName>电子发票</LabelName>\n            </EInvoiceType>\n            <GeneralOrSpecialVAT>\n                <LabelCode>02</LabelCode>\n                <LabelName>普通发票</LabelName>\n            </GeneralOrSpecialVAT>\n            <TaxpayerType>\n                <LabelCode>2</LabelCode>\n                <LabelName>小规模纳税人</LabelName>\n            </TaxpayerType>\n        </InherentLabel>\n        <UndefinedLabel>\n            <Label>\n                <LabelType>发票开具方式标签</LabelType>\n                <LabelCode>1</LabelCode>\n                <LabelName>网页开票</LabelName>\n            </Label>\n        </UndefinedLabel>\n    </Header>\n    <EInvoiceData>\n        <SellerInformation>\n            <SellerIdNum>91310110MA1G929487</SellerIdNum>\n            <SellerName>上海印佰传图文制作有限公司</SellerName>\n            <SellerAddr>上海市杨浦区国通路179号1层</SellerAddr>\n            <SellerTelNum>021-35309685</SellerTelNum>\n            <SellerBankName>中国工商银行股份有限公司上海市杨浦支行</SellerBankName>\n            <SellerBankAccNum>1001330309100174805</SellerBankAccNum>\n        </SellerInformation>\n        <BuyerInformation>\n            <BuyerIdNum>91310230MA1HHL7257</BuyerIdNum>\n            <BuyerName>逸速科技（上海）有限公司</BuyerName>\n        </BuyerInformation>\n        <BasicInformation>\n            <TotalAmWithoutTax>356.44</TotalAmWithoutTax>\n            <TotalTaxAm>3.56</TotalTaxAm>\n            <TotalTax-includedAmount>360.00</TotalTax-includedAmount>\n            <TotalTax-includedAmountInChinese>叁佰陆拾圆整</TotalTax-includedAmountInChinese>\n            <Drawer>刘爱娣</Drawer>\n            <RequestTime>2023-11-05 12:35:51</RequestTime>\n        </BasicInformation>\n        <IssuItemInformation>\n            <ItemName>*印刷品*图文制作费</ItemName>\n            <MeaUnits>项</MeaUnits>\n            <Quantity>1</Quantity>\n            <UnPrice>356.435643564356</UnPrice>\n            <Amount>356.44</Amount>\n            <TaxRate>0.01</TaxRate>\n            <ComTaxAm>3.56</ComTaxAm>\n            <TotaltaxIncludedAmount>360.00</TotaltaxIncludedAmount>\n            <TaxClassificationCode>1060203000000000000</TaxClassificationCode>\n        </IssuItemInformation>\n        <SpecificInformation/>\n        <AdditionalInformation/>\n    </EInvoiceData>\n    <SellerAuthentication>\n        <AuthenticationMethods>01</AuthenticationMethods>\n    </SellerAuthentication>\n    <TaxSupervisionInfo>\n        <InvoiceNumber>23312000000120549884</InvoiceNumber>\n        <IssueTime>2023-11-05</IssueTime>\n        <TaxBureauCode>13100000000</TaxBureauCode>\n        <TaxBureauName>国家税务总局上海市税务局</TaxBureauName>\n    </TaxSupervisionInfo>\n    <TaxBureauSignature>\n        <Reference URI=\"/Einvoice/Header|/Einvoice/EinvoiceData|/Einvoice/SellerAuthentication|/Einvoice/TaxSupervisionInfo|/Einvoice/TaxBureauSignature/SignatureTime\"/>\n        <SignatureAlgorithm>1.2.156.10197.1.501</SignatureAlgorithm>\n        <SignatureFormat>DETACH</SignatureFormat>\n        <SignatureTime>2024-02-23 12:58:44</SignatureTime>\n        <SignatureValue>3082017a060a2a811ccf550601040202a082016a30820166020101310e300c06082a811ccf550183110500300c060a2a811ccf550601040201318201413082013d02010130623058310b300906035504061302434e311b3019060355040b0c12e59bbde5aeb6e7a88ee58aa1e680bbe5b180312c302a06035504030c23e7a88ee58aa1e794b5e5ad90e8af81e4b9a6e7aea1e79086e4b8ade5bf8328534d32290206030000002631300c06082a811ccf550183110500a06e301906092a864886f70d010903310c060a2a811ccf550601040201302f06092a864886f70d010904312204208707e9cbd6f69b82b92f889b358544f00bc4f41c702a6d5b16a7195f8db40f3b3020060a2a864886f70d010919043112021032303139303930313030303030304153300c06082a811ccf55018375050004483046022100a101d123633e5e877181e0e34b63d2ea61b026378d7811846296cc6c68bbc140022100bd12c651fbd1c2ba4171360e630fa0bdc0df4be553fdd4b22a37171d7012d2f6&amp;MjAyNDAyMjMgMTI1ODQ0</SignatureValue>\n        <KeyInfo/>\n    </TaxBureauSignature>\n</EInvoice>"".data(using: String.Encoding.utf8)!)

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v2/supernova/models/document/create-fapiao-xml")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```