---
updatedAt: 2026-05-01T15:26:29.000Z
agentTools:
  siteIndex: https://docs.recurly.com/llms.txt
  projectIndex: https://docs.recurly.com/recurly-revrec/llms.txt
---

# Save Document Lines

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Revrec APIs",
    "version": "1.9.0"
  },
  "servers": [
    {
      "url": "https://revrec.recurly.com"
    }
  ],
  "tags": [
    {
      "name": "Inbound APIs"
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Authentication scheme using Basic Auth where the API key is provided as the username and the password is blank.\n\nExample usage:\nIf your API key is `110eee7324cf4146ac875db3108f175c`, then the Authorization header should be:\n`Authorization: Basic MTEwZWVlNzMyNGNmNDE0NmFjODc1ZGIzMTA4ZjE3NWM6`\n\nThis value is the Base64 encoding of the string `110eee7324cf4146ac875db3108f175c:` (note the trailing colon for empty password)."
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "paths": {
    "/api/stage/saveDocLines": {
      "post": {
        "tags": [
          "Inbound APIs"
        ],
        "summary": "Save Document Lines",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ProcessedFlag": {
                      "type": "string",
                      "description": "Indicates the current state of doc line"
                    },
                    "OrdNumber": {
                      "type": "string",
                      "description": "The Sales Order Number of the associated sales order/contract line that is critical to reference the bill line to a contract."
                    },
                    "OrdLine": {
                      "type": "string",
                      "description": "The Sales Order Line of the associated sales order/contract line that is critical to reference the bill line to a contract."
                    },
                    "DocType": {
                      "type": "string",
                      "description": "The Doc Type identifies the bill line as a particular invoice or credit line, and it determines the action the Recurly RevRec system will perform on the line."
                    },
                    "DocNumber": {
                      "type": "string",
                      "description": "This is commonly the invoice or credit memo number. The combination of Doc Line + Doc Number must be unique for each bill line in Recurly RevRec"
                    },
                    "DocLine": {
                      "type": "string",
                      "description": "This is commonly the invoice or credit memo line. The combination of Doc Line + Doc Number must be unique for each bill line in Recurly RevRec"
                    },
                    "DocDate": {
                      "type": "string",
                      "description": "Doc Date is the invoice or credit memo date that is used to record the liability balance in the Recurly RevRec system"
                    },
                    "RefDocNumber": {
                      "type": "string",
                      "description": "For credit memo lines, the Reference Doc Number is the invoice number with which the credit memo is associated. This value is critical to link a credit memo to its parent invoice."
                    },
                    "RefDocLine": {
                      "type": "string",
                      "description": "For credit memo lines, the Reference Doc Line is the invoice line with which the credit memo is associated. This value is critical to link a credit memo to its parent invoice"
                    },
                    "Amount": {
                      "type": "number",
                      "description": "The Amount is the key element to be posted and represents the total value of the doc line"
                    },
                    "Quantity": {
                      "type": "number",
                      "description": "Quantity of the item sold on the bill line"
                    },
                    "Currency": {
                      "type": "string",
                      "description": "Currency is the transaction currency for the bill line"
                    },
                    "CompanyCurrency": {
                      "type": "string",
                      "description": "Company Currency is the base or company currency for the entity, which is required if it differs from the transaction currency."
                    },
                    "CExRate": {
                      "type": "number",
                      "description": "The Company Exchange Rate is the exchange rate between the transaction currency and the entity currency, which is required if they are different currencies"
                    },
                    "GExRate": {
                      "type": "number",
                      "description": "The Global/Reporting Exchange Rate is the exchange rate between the entity currency and the reporting currency which is required if they are different currencies"
                    },
                    "StartDate": {
                      "type": "string",
                      "description": "The Start Date represents the beginning of the service term (if applicable) for the bill line item"
                    },
                    "EndDate": {
                      "type": "string",
                      "description": "The End Date represents the end of the service term (if applicable) for the bill line item"
                    },
                    "DRAccount": {
                      "type": "string",
                      "description": "This field holds the Debit Account for the invoice line."
                    },
                    "CRAccount": {
                      "type": "string",
                      "description": "This field holds the Credit Account for the invoice line."
                    },
                    "CreditRule": {
                      "type": "string",
                      "description": "The Credit Rule is only applicable for credit memo lines, and it determines how the system will apply the credit amount to revenue"
                    },
                    "ObjectType": {
                      "type": "integer",
                      "description": "Object Type identifies the source object classification for the document line record."
                    },
                    "CanceledBill": {
                      "type": "boolean",
                      "description": "Canceled Bill indicates whether the document line represents a cancellation or reversal of a previously billed line."
                    },
                    "AutoBill": {
                      "type": "boolean",
                      "description": "Auto Bill indicates whether the billing record was generated automatically by the source workflow or system."
                    },
                    "F1": {
                      "type": "string",
                      "description": "Fields F1-F5 are flex fields that can be configured in the Recurly RevRec system for additional bill line attributes"
                    },
                    "F2": {
                      "type": "string",
                      "description": "Fields F1-F5 are flex fields that can be configured in the Recurly RevRec system for additional bill line attributes"
                    },
                    "F3": {
                      "type": "string",
                      "description": "Fields F1-F5 are flex fields that can be configured in the Recurly RevRec system for additional bill line attributes"
                    },
                    "F4": {
                      "type": "string",
                      "description": "Fields F1-F5 are flex fields that can be configured in the Recurly RevRec system for additional bill line attributes"
                    },
                    "F5": {
                      "type": "string",
                      "description": "Fields F1-F5 are flex fields that can be configured in the Recurly RevRec system for additional bill line attributes"
                    }
                  }
                }
              },
              "example": [
                {
                  "ProcessedFlag": "Y",
                  "OrdNumber": "SO-001",
                  "OrdLine": "1",
                  "DocType": "INV",
                  "DocNumber": "INV-1001",
                  "DocLine": "1",
                  "DocDate": "2025-08-01",
                  "RefDocNumber": "CM-1001",
                  "RefDocLine": "1",
                  "Amount": 1500,
                  "Quantity": 2,
                  "Currency": "USD",
                  "CompanyCurrency": "USD",
                  "CExRate": 1,
                  "GExRate": 1,
                  "StartDate": "2025-08-01",
                  "EndDate": "2025-08-31",
                  "DRAccount": "Accounts Receivable",
                  "CRAccount": "Revenue",
                  "CreditRule": "PRORATE",
                  "ObjectType": 1,
                  "CanceledBill": false,
                  "AutoBill": true,
                  "F1": "Value 1",
                  "F2": "Value 2",
                  "F3": "Value 3",
                  "F4": "Value 4",
                  "F5": "Value 5"
                }
              ]
            }
          }
        },
        "responses": {
          "200": {
            "description": "Doc lines saved"
          }
        }
      }
    }
  }
}
```

# Sibling pages

* [Save Order Lines](https://docs.recurly.com/recurly-revrec/reference/post_api-stage-saveorderlines.md)
* [Save Cost Lines](https://docs.recurly.com/recurly-revrec/reference/post_api-stage-savecostlines.md)
* [Save Events](https://docs.recurly.com/recurly-revrec/reference/post_api-stage-saveevents.md)
* [Clean Pipeline Data](https://docs.recurly.com/recurly-revrec/reference/put_api-books-cleanpipelinedata.md)
* [Upload transaction file](https://docs.recurly.com/recurly-revrec/reference/post_api-upload-uploadtranfile.md)