Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Tip

Available from CRM.COM R9.0.0


Table of Contents
maxLevel2

...

Name

Type

Description

token

String

The token retrieved from the login method

approval_request_identifier

(mandatory)

Approval Request Identifier

The identifier of the approval request that should be returned as a result. The allowed approval request Identifier fields are the following:

Include Page
V4:approval_request_identifier
V4:approval_request_identifier

fields_set

(optional)

List of Strings, comma separated 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

...

Name

Type

Description

token

String

The token retrieved from the login method

authorised_user_identifier
(semi-optional)
User IdentifierThe identifier of the authorised user related with the approval requests that should be returned as a result. The allowed user identifier fields are the following:

Include Page
V4:user_identifier
V4:user_identifier

approval_definition_identifier

(semi-optional)

Approval Definition IdentifierThe identifier of the approval definition related with the approval requests that should be returned as a result. The allowed approval definition identifier fields are the following:

Include Page
V4:approval_definition_identifier
V4:approval_definition_identifier

workflow_rule_identifier

(semi-optional)

Workflow Rule IdentifierThe identifier of the workflow rule that triggered the approval requests that should be returned as a result. The allowed workflow rule identifier fields are the following:

Include Page
V4:workflow_rule_identifier
V4:workflow_rule_identifier

entity

(semi-optional)

String

The name of the entity related with the approval requests that should be returned as a result. The supported entities are the following:

  • ACTIVITIES

entity_id

(semi-optional)

StringThe ID of the entity related with the approval requests that should be returned as a result

responded_by_user_identifier

(optional)

User IdentifierThe identifier of the responded by user related with the approval requests that should be returned as a result. The allowed user identifier fields are the following:

Include Page
V4:user_identifier
V4:user_identifier

unified_code

(optional)

String The unified code of the approval requests that should be returned as a result

life_cycle_state

(optional)

StringThe life cycle state of the approval requests that should be returned as a result. The supported options are PENDING, ACCEPTED, REJECTED or CANCELLED

created_date

(optional)

Date The created date of the approval requests that should be returned as a result.

response_date

(optional)

Date The response date of the approval requests that should be returned as a result.

fields_set
(optional)

List of Strings, comma separated 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

...

Name

Type

Description

 

token

String

The token retrieved from the login method

 
approval_request_identifier

(mandatory)

Approval Request Identifier

The identifier of the approval request that should be approved. The allowed approval request Identifier fields are the following:

Include Page
V4:approval_request_identifier
V4:approval_request_identifier

Note that only pending approval requests are allowed to be specified

 

response

(mandatory)

String

The response to the approval request as provided by the user that approved the approval request

 

...

Expand
titleExample 1

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejs
linenumberstrue
 

 

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
 

POST approval_requests/reject

This method is used to reject pending approval requests.  A single approval request can be rejected through this method

Resource URL

Parameters

...

Name

...

Type

...

Description

...

token

...

String

...

The token retrieved from the login method

...

(mandatory)

...

Approval Request Identifier

The identifier of the approval request that should be rejected. The allowed approval request Identifier fields are the following:

...

Note that only pending approval requests are allowed to be specified

...

response

(mandatory)

...

String

...

The response to the approval request as provided by the user that rejected the approval request

...

Restrictions

  • It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.

Response Data

...

Examples

Expand
titleExample 1

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejs
linenumberstrue
 

 

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
 {
          "token":"438BA44BD33B44EEBC77746030A92629",
          "approval_request_identifier":{"number":"40"},
          "response":"Test from API"
} 

 

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
    "status":
    {
        "message": "",
        "description": "",
        "code": "OK"
    },
    "data":
    {
        "authorised_users_set":
        [
            {
                "person_name": "Marios Lannister",
                "username": "MPAdministrator",
                "id": "1",
                "email": "crm.com.tst@gmail.com"
            },
            {
                "person_name": "Eleni Michailidou",
                "username": "emichailidou",
                "id": "63ACDBBC5B39AD2DF5B167FA70EE57DD",
                "email": "crm.com.tst@gmail.com"
            }
        ],
        "response": "Test from API",
        "responded_by":
        {
            "person_name": "Marios Lannister",
            "username": "MPAdministrator",
            "id": "1"
        },
        "entity": "ACTIVITIES",
        "number": "40",
        "subject": "Approval for Activities by Manager and Assigned to User",
        "response_date": "2016-01-19T11:01:00",
        "approval_definition":
        {
            "life_cycle_state": "EFFECTIVE",
            "id": "D159E061650D40E689CADDF17ABB424A",
            "name": "Installation Approval WT",
            "alternative_code": "IAW"
        },
        "log_information":
        {
            "updated_date": "2016-01-19T11:01:00",
            "created_date": "2016-01-22T12:19:47",
            "created_by_unit":
            {
                "community_name": "Internal Community",
                "id": "48305F8849E3C18B227C5BE3A27BA6DF",
                "name": "Admin Unit",
                "group_name": "Main Group",
                "description": "r1",
                "alternative_code": "MG"
            },
            "updated_by_unit":
            {
                "community_name": "Internal Community",
                "id": "48305F8849E3C18B227C5BE3A27BA6DF",
                "name": "Admin Unit",
                "group_name": "Main Group",
                "description": "r1",
                "alternative_code": "MG"
            },
            "created_by_user":
            {
                "person_name": "MPAdministrator",
                "username": "MPAdministrator",
                "id": "1",
                "email": "crm.com.tst@gmail.com"
            },
            "updated_by_user":
            {
                "person_name": "Marios Lannister",
                "username": "MPAdministrator",
                "id": "1"
            }
        },
        "life_cycle_state": "APPROVED",
        "entity_id": "05B26D3F1B494780B9108B8876AD2A5A",
        "unified_code": "31",
        "id": "E7FA4634AF0D435E8DF926E53BD2A0B3",
        "workflow_rule":
        {
            "life_cycle_state": "EFFECTIVE",
            "id": "F935C2C73CB948DCBD5101DFFF79FC6E",
            "name": "Installations Activities - Approvals WT",
            "alternative_code": "IA-AW"
        }
    }
} 

POST approval_requests/reject

This method is used to reject pending approval requests.  A single approval request can be rejected through this method

Resource URL

Parameters

Name

Type

Description

 

token

String

The token retrieved from the login method

 
approval_request_identifier

(mandatory)

Approval Request Identifier

The identifier of the approval request that should be rejected. The allowed approval request Identifier fields are the following:

Include Page
V4:approval_request_identifier
V4:approval_request_identifier

Note that only pending approval requests are allowed to be specified

 

response

(mandatory)

String

The response to the approval request as provided by the user that rejected the approval request

 

Restrictions

  • It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.

Response Data

Include Page
V4:approval_request_complete
V4:approval_request_complete

Examples

Expand
titleExample 1

HTTP Method: POST

 

Request:

Body:

Code Block
themeConfluence
languagejs
linenumberstrue
{
          "token":"438BA44BD33B44EEBC77746030A92629",
          "approval_request_identifier":{"number":"35"},
          "response":"Test from API"
}  

 

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
    "status":
    {
        "message": "",
        "description": "",
        "code": "OK"
    },
    "data":
    {
        "authorised_users_set":
        [
            {
                "person_name": "Marios Lannister",
                "username": "MPAdministrator",
                "id": "1",
                "email": "crm.com.tst@gmail.com"
            },
            {
                "person_name": "Eleni Michailidou",
                "username": "emichailidou",
                "id": "63ACDBBC5B39AD2DF5B167FA70EE57DD",
                "email": "crm.com.tst@gmail.com"
            }
        ],
        "response": "Test from API",
        "responded_by":
        {
            "person_name": "Marios Lannister",
            "username": "MPAdministrator",
            "id": "1"
        },
        "entity": "ACTIVITIES",
        "number": "35",
        "subject": "Approval for Activities by Manager and Assigned to User",
        "response_date": "2016-01-19T11:05:01",
        "approval_definition":
        {
            "life_cycle_state": "EFFECTIVE",
            "id": "D159E061650D40E689CADDF17ABB424A",
            "name": "Installation Approval WT",
            "alternative_code": "IAW"
        },
        "log_information":
        {
            "updated_date": "2016-01-19T11:05:01",
            "created_date": "2016-01-15T12:46:37",
            "created_by_unit":
            {
                "community_name": "Internal Community",
                "id": "48305F8849E3C18B227C5BE3A27BA6DF",
                "name": "Admin Unit",
                "group_name": "Main Group",
                "description": "r1",
                "alternative_code": "MG"
            },
            "updated_by_unit":
            {
                "community_name": "Internal Community",
                "id": "48305F8849E3C18B227C5BE3A27BA6DF",
                "name": "Admin Unit",
                "group_name": "Main Group",
                "description": "r1",
                "alternative_code": "MG"
            },
            "created_by_user":
            {
                "person_name": "emichailidou",
                "username": "emichailidou",
                "id": "63ACDBBC5B39AD2DF5B167FA70EE57DD",
                "email": "crm.com.tst@gmail.com"
            },
            "updated_by_user":
            {
                "person_name": "Marios Lannister",
                "username": "MPAdministrator",
                "id": "1"
            }
        },
        "life_cycle_state": "REJECTED",
        "entity_id": "8EA429235CA8401BB9DFAF2CBBDB53B1",
        "unified_code": "27",
        "id": "D36C79EDCD024309ADB9F1AAC1B9046C",
        "workflow_rule":
        {
            "life_cycle_state": "EFFECTIVE",
            "id": "F935C2C73CB948DCBD5101DFFF79FC6E",
            "name": "Installations Activities - Approvals WT",
            "alternative_code": "IA-AW"
        }
    }
} 

POST approval_requests/cancel

...

Name

Type

Description

 

token

String

The token retrieved from the login method

 
approval_request_identifier

(mandatory)

Approval Request Identifier

The identifier of the approval request that should be cancelled. The allowed approval request Identifier fields are the following:

Include Page
V4:approval_request_identifier
V4:approval_request_identifier

Note that only pending approval requests are allowed to be specified

 

response

(mandatory)

String

The response to the approval request as provided by the user that cancelled the approval request

 

...

Name

Type

Description

 

token

String

The token retrieved from the login method

 
approval_request_identifier

(mandatory)

Approval Request Identifier

The identifier of the approval request that should be deleted. The allowed approval request Identifier fields are the following:

Include Page
V4:approval_request_identifier
V4:approval_request_identifier

Note that only rejected, approved or cancelled approval requests are allowed to be specified

 

...