---
schema_version: "1"
id: 42800f345d7122d97bd8d613bf48b0ff42177eb837489e1a5ee36cf81c259bfd
title: TMF651 v4 Agreement Specification
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries-integrations/comms/references/generated-api-specs/tmf651v5s.md
canonical_url: https://developer.salesforce.com/docs/industries/communications/references/tmf651v5s
source_site: developer.salesforce.com
content_type: documentation
content_hash: b261508036b1f6d140a97ff2504a09a90595102c76bb93050124cf5d5e7c1132
products:
  - Communications Cloud TM Forum API
  - Industries Integrations
---
TMF651 v4 Agreement Specification

# TMF651 v4 Agreement Specification

The TMF651 API allows querying, creation, update and deletion of agreement specifications.

**Version:** v1

Protocols: https.

## Operations

### GET Get a List of Agreement Specifications

`GET /agreementspecification`

Retrieves a list of Agreement Specification entities. Attribute selection is enabled for first-level attributes - name.

#### Parameters

*   `fields` (query, string) fields for attribute selection. supported values- name
*   `name` (query, string) Name of the DocumentTemplate
*   `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.
*   `Authorization` (header, string, required) Specifies the bearer token to use for the authentication of request.
*   `Version` (header, string, required) Specifies the version to use with the URL path. version should be greater than or equal to v61.0
*   `Domain-Name` (header, string, required) Specifies the domain name to use with the URL path received from the userinfo API.

#### Responses

*   **200** successfully retrieved the agreement specification list
    
    Media type: `application/json`. Schema: `array of agreement_spec`.
    
    Array of `agreement_spec`.
    
*   **404** Resource not found.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    code: RECORD_NOT_FOUND
    reason: The specified resource ID doesn’t exist. Provide a valid resource ID and try again.
    ```
    

### POST Create an Agreement Specification

`POST /agreementspecification`

Creates a Agreement Specification entity.

#### Parameters

*   `Authorization` (header, string, required) Specifies the bearer token to use for the authentication of request.
*   `Version` (header, string, required) Specifies the version to use with the URL path. version should be greater than or equal to v61.0
*   `Domain-Name` (header, string, required) Specifies the domain name to use with the URL path received from the userinfo API.

#### Request body

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

Specifies the Agreement Specification to be created.

_Example_

```
{
    "name" : "Sample Unique Name",
    "lifecycleStatus" : "Draft",
    "relatedParty": [
        {
        "id": "005xx000001X8CjAAK",
        "name": "Jimmy Doe"  
        }
    ],
    "attachment" : [
        {
            "id" : "069xx0000004D3UAAU"
        }
    ]    
}
```

#### Responses

*   **201** Created the Agreement Specification resource.
    
    Media type: `application/json`. Schema: `agreement_spec`.
    
    _Example_
    
    ```
    {
        "attachment": [
            {
                "attachmentType": "PDF",
                "href": "/services/data/v60.0/sobjects/attachment/069xx0000004D3UAAU",
                "id": "069xx0000004D3UAAU",
                "mimeType": "pdf",
                "name": "TMF651B_Agreement_Management_API_Conformance_Profile_R19.0.0"
            }
        ],
        "href": "/connect/comms/agreementmanagement/v4/agreementspecification/2dtxx00000000eLAAQ",
        "id": "2dtxx00000000eLAAQ",
        "lifecycleStatus": "Draft",
        "@type": "AgreementSpecification",
        "name": "Sample Unique Name",
        "relatedParty": [
            {
                "href": "/services/data/v60.0/sobjects/User/005xx000001X8CjAAK",
                "id": "005xx000001X8CjAAK",
                "name": "min user"
            }
        ]
    }
    ```
    
*   **404** Resource not found.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    code: RECORD_NOT_FOUND
    reason: The specified resource ID doesn’t exist. Provide a valid resource ID and try again.
    ```
    

### GET Retrieve an Agreement Specification

`GET /agreementspecification/{id}`

Retrieves a Agreement Specification entity by id.

#### Parameters

*   `id` (path, string, required)
*   `fields` (query, string) fields for attribute selection. supported values- name
*   `Authorization` (header, string, required) Specifies the bearer token to use for the authentication of request.
*   `Version` (header, string, required) Specifies the version to use with the URL path. version should be greater than or equal to v61.0
*   `Domain-Name` (header, string, required) Specifies the domain name to use with the URL path received from the userinfo API.

#### Responses

*   **200** Success
    
    Media type: `application/json`. Schema: `agreement_spec`.
    
    _Example: same as POST /agreementspecification 201 response._
    
*   **404** Resource not found.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    code: RECORD_NOT_FOUND
    reason: The specified resource ID doesn’t exist. Provide a valid resource ID and try again.
    ```
    

### PATCH Update an Agreement Specification

`PATCH /agreementspecification/{id}`

This operation allows partial updates of a Agreement Specification entity by id.

#### Parameters

*   `id` (path, string, required)
*   `Authorization` (header, string, required) Specifies the bearer token to use for the authentication of request.
*   `Version` (header, string, required) Specifies the version to use with the URL path. version should be greater than or equal to v61.0
*   `Domain-Name` (header, string, required) Specifies the domain name to use with the URL path received from the userinfo API.

#### Request body

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

Specifies the Agreement Specification to be updated.

_Example_

```
{    
    "attachment" : [
        {
            "id" : "069xx0000004D56AAE"
        }
    ]      
}
```

#### Responses

*   **200** Updated the Agreement Specification.
    
    Media type: `application/json`. Schema: `agreement_spec`.
    
    _Example_
    
    ```
    {
        "attachment": [
            {
                "attachmentType": "JSON",
                "href": "/services/data/v60.0/sobjects/attachment/069xx0000004D56AAE",
                "id": "069xx0000004D56AAE",
                "mimeType": "json",
                "name": "OpenAPI-Framework.postman_collection"
            }
        ],
        "href": "/connect/comms/agreementmanagement/v4/agreementspecification/2dtxx00000000eLAAQ",
        "id": "2dtxx00000000eLAAQ",
        "lifecycleStatus": "Draft",
        "@type": "AgreementSpecification",
        "name": "Feb 24 - 4",
        "relatedParty": [
            {
                "href": "/services/data/v60.0/sobjects/User/005xx000001X8CjAAK",
                "id": "005xx000001X8CjAAK",
                "name": "min user"
            }
        ]
    }
    ```
    
*   **404** Resource not found.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    code: RECORD_NOT_FOUND
    reason: The specified resource ID doesn’t exist. Provide a valid resource ID and try again.
    ```
    

### DELETE Delete an Agreement Specification

`DELETE /agreementspecification/{id}`

This operation allows deletion of a Agreement Specification by id.

#### Parameters

*   `id` (path, string, required)
*   `Authorization` (header, string, required) Specifies the bearer token to use for the authentication of request.
*   `Version` (header, string, required) Specifies the version to use with the URL path. version should be greater than or equal to v61.0
*   `Domain-Name` (header, string, required) Specifies the domain name to use with the URL path received from the userinfo API.

#### Responses

*   **204**
*   **404** Resource not found.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    code: RECORD_NOT_FOUND
    reason: The specified resource ID doesn’t exist. Provide a valid resource ID and try again.
    ```
    

## Schemas

### agreement\_spec

Agreement specification object

*   `href` (_string_, required) URI of the DocumentTemplate
*   `id` (_string_, required) Unique identifier of the Salesforce DocumentTemplate record
*   `lifecycleStatus` (_string_) Specifies the status of the document template
*   `name` (_string_, required) Name of the DocumentTemplate
*   `@type` (_string_) Type of the TMF Entity e.g. AgreementSpecification
*   `attachment` (_array of object_, required) Specifies the Content Document associated with DocumentTemplate
    
    Includes all fields of `attachmentRef`.
    
*   `relatedParty` (_array of object_) Owner of the DocumentTemplate
    
    Includes all fields of `relatedPartyRef`.
    

### Error

Shown when an API throws an error, typically with an HTTP error response code (3xx, 4xx, or 5xx).

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

### agreement\_spec\_create

Agreement specification creation object

*   `lifecycleStatus` (_string_) Specifies the status of the document template
*   `name` (_string_, required) Name of the DocumentTemplate
*   `attachment` (_array of object_, required) Specifies the Content Document associated with DocumentTemplate
    
    Includes all fields of `attachmentRef`.
    
*   `relatedParty` (_array of object_) Owner of the DocumentTemplate
    
    Includes all fields of `relatedPartyRef`.
    

### agreement\_spec\_update

Agreement specification updation object

*   `attachment` (_array of object_, required) Specifies the Content Document associated with DocumentTemplate
    
    Includes all fields of `attachmentRef_update`.
    

### attachmentRef

*   `attachmentType` (_string_) Type of the ContentDocument
*   `id` (_string_, required) Id of the ContentDocument
*   `mimeType` (_string_) Specifies the mimetype of the ContentDocument
*   `name` (_string_) Title of the ContentDocument

### relatedPartyRef

*   `id` (_string_, required) SF id of the user
*   `name` (_string_) name of the User

### attachmentRef\_update

*   `id` (_string_, required) Id of the ContentDocument