---
updatedAt: 2026-07-03T14:24:38.000Z
agentTools:
  projectIndex: https://developer.xentral.com/llms.txt
---

# View return document

Returns details of a single return document

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Xentral API",
    "version": "v0.1",
    "description": "Xentral is an ERP platform.",
    "contact": {
      "name": "Xentral",
      "url": "https://xentral.com",
      "email": "api@xentral.com"
    }
  },
  "tags": [
    {
      "name": "Return",
      "description": "Return represents incoming shipments from customer to supplier"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token obtained in POST /tokens endpoint or pregenerated in the system."
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://{xentralId}.xentral.biz",
      "description": "Your Xentral Instance",
      "variables": {
        "xentralId": {
          "default": "xentral"
        }
      }
    },
    {
      "url": "https://{domain}",
      "description": "Xentral at a custom domain",
      "variables": {
        "domain": {
          "default": "xentral.com"
        }
      }
    }
  ],
  "x-readme": {
    "samples-languages": []
  },
  "paths": {
    "/api/v1/returns/{id}/documents/{documentId}": {
      "get": {
        "deprecated": true,
        "tags": [
          "Return"
        ],
        "operationId": "return.viewDocument",
        "summary": "View return document",
        "description": "Returns details of a single return document",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "description": "ID of document",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "\\d+",
              "example": "17",
              "description": "Resource identifier."
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "description": "The resource's identifier.",
            "schema": {
              "type": "string",
              "pattern": "\\d+",
              "example": "17",
              "description": "Resource identifier."
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "style": "deepObject",
            "schema": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "number",
                "size"
              ],
              "properties": {
                "number": {
                  "type": "string",
                  "pattern": "\\d+",
                  "description": "Page number should be an integer greater than or equal to 1"
                },
                "size": {
                  "type": "string",
                  "pattern": "\\d+",
                  "description": "Page size should usually be an integer between 10 and 50."
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operation completed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "x-description-missing": true,
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "\\d+",
                          "example": "17",
                          "description": "Resource identifier."
                        },
                        "entity": {
                          "x-description-missing": true,
                          "type": "string",
                          "example": "Return entity"
                        },
                        "entityId": {
                          "x-description-missing": true,
                          "type": "integer",
                          "example": 12
                        },
                        "title": {
                          "x-description-missing": true,
                          "type": "string",
                          "nullable": true,
                          "example": "Return title"
                        },
                        "description": {
                          "x-description-missing": true,
                          "type": "string",
                          "nullable": true,
                          "example": "List of return document"
                        },
                        "keyword": {
                          "x-description-missing": true,
                          "type": "string",
                          "nullable": true,
                          "example": "attachment"
                        },
                        "sort": {
                          "x-description-missing": true,
                          "type": "integer",
                          "example": 1
                        },
                        "versions": {
                          "type": "array",
                          "items": {
                            "x-description-missing": true,
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "\\d+",
                                "example": "17",
                                "description": "Resource identifier."
                              },
                              "version": {
                                "type": "integer"
                              },
                              "remark": {
                                "type": "string",
                                "nullable": true
                              },
                              "filename": {
                                "type": "string"
                              },
                              "size": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "value",
                                  "unit"
                                ],
                                "properties": {
                                  "value": {
                                    "type": "integer"
                                  },
                                  "unit": {
                                    "type": "string",
                                    "enum": [
                                      "byte"
                                    ],
                                    "description": "Currently only byte as unit allowed."
                                  }
                                }
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "example": {
                              "id": "45",
                              "version": 2,
                              "remark": "Updated document",
                              "filename": "return_invoice_2024.pdf",
                              "size": {
                                "value": 1024,
                                "unit": "byte"
                              },
                              "updatedAt": "2024-09-18T14:30:00Z"
                            }
                          }
                        },
                        "currentVersion": {
                          "x-description-missing": true,
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "\\d+",
                              "example": "17",
                              "description": "Resource identifier."
                            },
                            "version": {
                              "type": "integer"
                            },
                            "remark": {
                              "type": "string",
                              "nullable": true
                            },
                            "filename": {
                              "type": "string"
                            },
                            "size": {
                              "type": "object",
                              "additionalProperties": false,
                              "required": [
                                "value",
                                "unit"
                              ],
                              "properties": {
                                "value": {
                                  "type": "integer"
                                },
                                "unit": {
                                  "type": "string",
                                  "enum": [
                                    "byte"
                                  ],
                                  "description": "Currently only byte as unit allowed."
                                }
                              }
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "example": {
                            "id": "45",
                            "version": 2,
                            "remark": "Updated document",
                            "filename": "return_invoice_2024.pdf",
                            "size": {
                              "value": 1024,
                              "unit": "byte"
                            },
                            "updatedAt": "2024-09-18T14:30:00Z"
                          }
                        },
                        "updatedAt": {
                          "x-description-missing": true,
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-09-18T14:30:00Z"
                        }
                      },
                      "example": {
                        "id": "17",
                        "entity": "Return entity",
                        "entityId": 12,
                        "title": "Return title",
                        "description": "List of return document",
                        "keyword": "attachment",
                        "sort": 1,
                        "versions": [
                          {
                            "id": "abc123",
                            "version": 1,
                            "remark": "Initial version of the document.",
                            "filename": "document_v1.pdf",
                            "size": {
                              "value": 210,
                              "unit": "byte"
                            },
                            "updatedAt": "2024-09-18T14:30:00Z"
                          }
                        ],
                        "currentVersion": {
                          "id": "abc123",
                          "version": 1,
                          "remark": "Initial version of the document.",
                          "filename": "document_v1.pdf",
                          "size": {
                            "value": 210,
                            "unit": "byte"
                          },
                          "updatedAt": "2024-09-18T14:30:00Z"
                        },
                        "updatedAt": "2024-09-18T14:30:00Z"
                      }
                    }
                  }
                }
              },
              "image/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "403": {
            "description": "Unable to authorize the client"
          },
          "404": {
            "description": "Resource was not found or not enough access privileges"
          },
          "406": {
            "description": "Requested resource representation does not exist."
          },
          "429": {
            "description": "Too many API calls made."
          }
        }
      }
    }
  }
}
```