---
updatedAt: 2025-06-04T20:06:01.000Z
agentTools:
  projectIndex: https://developers.plugg.to/llms.txt
---

# Create or Update an Invoice

## Request body example

```json
{
    "files": [
        {
            "url": "https://s3-sa-east-1.amazonaws.com/pluggto-documents/129/6233103fbb7e-4281-4212-ba03-c6d1fbd78021.com/users/93092400/invoices/documents/xml/463781327/authorized",
            "type": "xml_authorization"
        },
        {
            "url": "https://s3-sa-east-1.amazonaws.com/pluggto-documents/129/62330fcc23bf-4c01-4d1e-86f2-9d86bfcea6a6.com/users/93092400/invoices/sites/MLB/documents/danfe/463781327",
            "type": "danfe_authorization"
        }
    ],
    "log_history": [],
    "number": "135110",
    "nfe_serie": "2",
    "xml_version": "4.00",
    "app_origin": "mercadolivre",
    "reference_order": "60bf664ae8937025962f6a0c",
    "app_sub_origin": "4SALE$",
    "nfe_type": "inbound",
    "nfe_key": "35210618232641000101550020001350991756071712",
    "nfe_date": "2021-06-09T18:41:50.717Z",
    "nfe_creation_date": "2021-06-09T18:41:50.000Z",
    "nfe_protocol": "2021-06-09T18:41:50.717Z",
    "nfe_receipt": "351006539916966",
    "nfe_receipt_date": "2021-06-09T18:41:55.000Z",
    "nfe_authorization_date": "2021-06-09T18:41:59.000Z",
    "nfe_status": "authorized"
}
```

## Request object has the following properties:

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Attribute
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        number
      </td>

      <td>
        string
      </td>

      <td>
        Invoice number
      </td>
    </tr>

    <tr>
      <td>
        nfe\_serie
      </td>

      <td>
        string
      </td>

      <td>
        Invoice Series
      </td>
    </tr>

    <tr>
      <td>
        reference\_order
      </td>

      <td>
        string
      </td>

      <td>
        Plugg.to order ID
      </td>
    </tr>

    <tr>
      <td>
        files type
      </td>

      <td>
        string
      </td>

      <td>
        Return the file type.\
        **Values:**\
        danfe\_authorization\
        xml\_authorization\
        danfe\_cancellation\
        xml\_cancellation\
        danfe\_correction\_letter\
        xml\_correction\_letter\
        other\_xml\
        other\_danfe
      </td>
    </tr>

    <tr>
      <td>
        nfe\_type
      </td>

      <td>
        string
      </td>

      <td>
        Informs the type of invoice.
      </td>
    </tr>

    <tr>
      <td>
        nfe\_status
      </td>

      <td>
        string
      </td>

      <td>
        Inform the invoice status.\
        **Values:**\
        authorized\
        canceled\
        forbidden\_disablement\
        others
      </td>
    </tr>
  </tbody>
</Table>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-pluggto",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.plugg.to"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/invoices/{number}/{serie}": {
      "put": {
        "summary": "Create or Update an Invoice",
        "description": "",
        "operationId": "create-or-update-an-invoice",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "description": "Invoice Number",
            "schema": {
              "type": "string",
              "default": "number"
            },
            "required": true
          },
          {
            "name": "serie",
            "in": "path",
            "description": "Invoice Serie",
            "schema": {
              "type": "string",
              "default": "serie"
            },
            "required": true
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer Token",
            "schema": {
              "type": "string",
              "default": "Bearer {ACCESS_TOKEN}"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```