---
schema_version: "1"
id: 76498f7ed944aa37819ea11b27c3fb3c5e0cdbaae5d3f3738cebcaf382c347f1
title: TMF667 v4 Document Management
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries-integrations/comms/references/generated-api-specs/tmf667v4.md
canonical_url: https://developer.salesforce.com/docs/industries/communications/references/tmf667v4
source_site: developer.salesforce.com
content_type: documentation
content_hash: f228ecaab3d6726001fd45c59ee33fbc00fd6ba8881b08ef22f3b48f18f59777
products:
  - Communications Cloud TM Forum API
  - Industries Integrations
---
TMF667 v4 Document Management

# TMF667 v4 Document Management

The Document Management API provides standardised mechanism for managing Documents, especially in the context of partnerships. This spec allows creation and query of Documents

**Version:** v1.

Protocols: https.

## Operations

### GET List Documents

`GET /document`

Retrieves a list of Document entities. Attribute selection is enabled for first-level attributes and filtering is supported for name.

#### Parameters

*   `fields` (query, string) fields for attribute selection. supported values- name, documentType, status, description, creationdate, lastupdate
*   `name` (query, string) Name of the document
*   `offset` (query, integer) Specifies the requested index for the start of the resources to be included in the response.
*   `pageLimit` (query, integer) Specifies the requested number of the resources to be included in the response.
*   `pageInfo` (query, boolean) Enables customer to get pageinformation with GET response.
*   `Authorization` (header, string, required) Specifies the bearer token to use for the authentication of request.
*   `Namespace` (header, string) Specifies the namespace to use with the URL path.
*   `Domain-Name` (header, string, required) Specifies the domain name to use with the URL path received from the userinfo API.
*   `Version` (header, string, required) Specifies the version to use with the URL path.

#### Responses

*   **200** successfully retrieved the document list
    
    Media type: `application/json`. Schema: `array of Document`.
    
    Array of `Document`.
    
*   **404** Resource not found.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    code: NOT_FOUND
    reason: There are no matching resource.
    ```
    
*   **500** Internal server error
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    code: "500"
    reason: Internal server error
    ```
    

### POST Create Document

`POST /document`

Creates a Document entity.

#### Parameters

*   `Authorization` (header, string, required) Specifies the bearer token to use for the authentication of request.
*   `Namespace` (header, string) Specifies the namespace to use with the URL path.
*   `Domain-Name` (header, string, required) Specifies the domain name to use with the URL path received from the userinfo API.
*   `Version` (header, string, required) Specifies the version to use with the URL path.

#### Request body

Media type: `application/json`. Schema: `Document_Create`.

Specifies the Document to be created.

_Example_

```
{
    "name": "Testing",
    "description": "sample description",
    "attachment": [
                {
                    "url": "<url-of-the-actual-document-stored-somewhere>"
                }
            ]
}
```

#### Responses

*   **201** Created the Document resource.
    
    Media type: `application/json`. Schema: `Document_POST_Response`.
    
    _Example_
    
    ```
    {
        "id": "068xx0000004CSOAA2",
        "href": "/connect/comms/document/v4/document/068xx0000004CSOAA2",
        "name": "Testing",
        "documentType": "LINK",
        "description": "sample description",
        "status": "PUBLISHED - PRIVATE",
        "creationDate": "2023-08-15T14:30:00Z",
        "lastUpdate": "2023-08-15T14:30:00Z",
        "@type": "Document",
        "contentDocumentId": "069xx0000004CIiAAM",
        "attachment": [
            {
                "attachmentType": "url",
                "url": "<url-of-the-actual-document-stored-somewhere>"
            }
        ]
    }
    ```
    
*   **400** There was an issue with your request.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    code: "400"
    reason: Specify the required parameter in the payload- name and attachment.url item(s) missing.
    ```
    
*   **404** Resource not found.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    code: "404"
    reason: The specified resource ID doesn’t exist. Provide a valid resource ID and try again.
    ```
    
*   **500** Internal server error
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    code: "500"
    reason: Internal server error
    ```
    

### GET Get Document by ID

`GET /document/{id}`

Retrieves a list of Document entities.

#### Parameters

*   `id` (path, string, required)
*   `Authorization` (header, string, required) Specifies the bearer token to use for the authentication of request.
*   `Namespace` (header, string) Specifies the namespace to use with the URL path.
*   `Domain-Name` (header, string, required) Specifies the domain name to use with the URL path received from the userinfo API.
*   `Version` (header, string, required) Specifies the version to use with the URL path.

#### Responses

*   **200** successfully retrieved the document
    
    Media type: `application/json`. Schema: `Document`.
    
    _Example_
    
    ```
    {
        "id": "068xx0000004CQmAAM",
        "href": "/connect/comms/document/v4/document/068xx0000004CQmAAM",
        "name": "Testing",
        "documentType": "LINK",
        "description": "sample description",
        "status": "PUBLISHED - PRIVATE",
        "creationDate": "2023-08-15T14:30:00Z",
        "lastUpdate": "2023-08-15T14:30:00Z",
        "@type": "Document",
        "contentDocumentId": "069xx0000004CIiAAM",
        "attachment": [
            {
                "attachmentType": "url",
                "url": "https://www.amazon.co.uk/via-667-post"
            }
        ]
    }
    ```
    
*   **404** Resource not found.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    code: NOT_FOUND
    reason: There are no matching resource.
    ```
    
*   **500** Internal server error
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    code: "500"
    reason: Internal server error
    ```
    

## Schemas

### Document

A Document describes the meta-data of a Document, such as the name, creationDate, and lifecycle status. The document body (binary content) is held in the associated Attachment(s), either by reference or value.

*   `creationDate` (_datetime_, required) The date and time the document was created
*   `description` (_string_, required) free-text description of the document
*   `documentType` (_string_, required) Name of the document type
*   `href` (_string_, required) Hyperlink reference to the document
*   `id` (_string_, required) Unique identifier of the document
*   `lastUpdate` (_datetime_, required) The date and time the document was last modified
*   `name` (_string_, required) Name of the document
*   `status` (_string_, required) Lifecycle status of the document  
    Allowed values: `PUBLISHED - PRIVATE`, `PUBLISHED - PUBLIC`, `NOT PUBLISHED - UPLOAD INTERRUPTED`.
*   `attachment` (_array of object_, required) A list of attachment ref or values
    
    Includes all fields of `attachmentRef`.
    
*   `contentDocumentId` (_string_, required) This is not part of TMF, but this id is the actual salesforce content document Id, if any other API has an attachment subresource then this Id will be used for reference in its POST payload

### Error

Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)

*   `code` (_string_, required) Application relevant detail, defined in the API or a common list.
*   `reason` (_string_, required) Explanation of the reason for the error which can be shown to a client user.

### Document\_Create

A Document\_create describes the name, description and the attachment to create a document through post

*   `description` (_string_) free-text description of the document
*   `name` (_string_, required) A string used to give a name to the document
*   `attachment` (_array of object_, required) A list of attachment ref or values
    
    Includes all fields of `attachmentRefPOST`.
    

### Document\_POST\_Response

A Document describes the meta-data of a Document, such as the name, creationDate, and lifecycle status. The document body (binary content) is held in the associated Attachment(s), either by reference or value.

*   `creationDate` (_datetime_, required) The date and time the document was created
*   `description` (_string_, required) free-text description of the document
*   `documentType` (_string_, required) Name of the document type
*   `href` (_string_, required) Hyperlink reference to the document
*   `id` (_string_, required) Unique identifier of the document
*   `lastUpdate` (_datetime_, required) The date and time the document was last modified
*   `name` (_string_, required) Name of the document
*   `status` (_string_, required) Lifecycle status of the document  
    Allowed values: `PUBLISHED - PRIVATE`, `PUBLISHED - PUBLIC`, `NOT PUBLISHED - UPLOAD INTERRUPTED`.
*   `attachment` (_array of object_, required) A list of attachment ref or values
    
    Includes all fields of `attachmentRef`.
    
*   `contentDocumentId` (_string_, required) This is not part of TMF, but this id is the actual salesforce content document Id, if any other API has an attachment subresource then this Id will be used for reference in its POST payload

### attachmentRef

*   `attachmentType` (_string_, required) Attachment type such as video, picture
*   `url` (_string_, required) An uri (Uri). Remote reference to the content if web-addressable

### attachmentRefPOST

*   `url` (_string_, required) An uri (Uri). Remote reference to the content if web-addressable