---
updatedAt: 2026-02-12T14:06:00.000Z
agentTools:
  projectIndex: https://transport-freight-management.docs.developers.aeb.com/llms.txt
---

# deleteDocumentReferenceObject

<h3>Delete an existing document reference object</h3><p>Deletes the document reference object with the requested <code>referenceType</code> and <code>referenceNumber</code> along with all its documents (optionally the documents can be preserved).</p>

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Document Service HTTP API",
    "description": "Thank you for using our HTTP API documentation.",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://rz3.aeb.de/demo1docs/rest"
    }
  ],
  "security": [
    {
      "SWAGGER_AUTH_KEY": []
    },
    {
      "BASIC_AUTH": []
    }
  ],
  "tags": [
    {
      "name": "DocumentService",
      "description": "REST API for the Document Service"
    }
  ],
  "paths": {
    "/DocumentService/referenceObject/{referenceType}/{referenceNumber}": {
      "delete": {
        "tags": [
          "DocumentService"
        ],
        "summary": "deleteDocumentReferenceObject",
        "description": "<h3>Delete an existing document reference object</h3><p>Deletes the document reference object with the requested <code>referenceType</code> and <code>referenceNumber</code> along with all its documents (optionally the documents can be preserved).</p>",
        "operationId": "deleteDocumentReferenceObject",
        "parameters": [
          {
            "name": "referenceType",
            "in": "path",
            "description": "Unique Id of the reference type",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "SHIPMENT"
          },
          {
            "name": "referenceNumber",
            "in": "path",
            "description": "Unique Id of the reference number",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": 4711
          },
          {
            "name": "preserveDocuments",
            "in": "query",
            "description": "If activated, the documents are not deleted",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Reference object was successfully deleted"
          },
          "404": {
            "description": "The required data was not found"
          },
          "423": {
            "description": "Reference object locked, cannot delete"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "SWAGGER_AUTH_KEY": {
        "type": "apiKey",
        "name": "X-XNSG_WEB_TOKEN",
        "in": "header"
      },
      "BASIC_AUTH": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-proxy-enabled": false,
  "x-readme": {
    "explorer-enabled": true
  }
}
```