POST approval_requests/reject

Available from CRM.COM R9.0.0

Deprecated from CRM.COM R18.0.0

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:

Name

Type

Description

id

(semi-optional)

String

The ID of the approval request

number

(semi-optional)

String

The number of the approval request

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


fields_set

(optional)

List of Strings, comma separatedA list of fields that should be included in the results. If not specified then all the available fields will be returned

Restrictions

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

Response Data

Name

Type

Description

id

String

The ID of the retrieved approval request

number

String

The number of the retrieved approval request

unified_codeStringThe unified code of the retrieved approval request
life_cycle_stateString

The life cycle state of the retrieved approval request which can be PENDING, APPROVED, REJECTED or CANCELLED

entityString

The name of the entity related with the approval request. The supported entities are the following:

  • ACTIVITIES
  • ADHOCDISCOUNT
  • CREDITNOTES

  • INVOICES

  • JOBS

  • LEADS
  • PAYMENTS
  • REFUNDS
  • REWARDOFFERS
  • SERVICEREQUESTS
  • SUBSCRIPTIONS
  • REWARDOFFERS entity is available from CRM.COM R11.0.0
  • LEADS entity is available from CRM.COM R14.0.0
  • ADHOCDISCOUNT, CREDITNOTES, INVOICES, PAYMENTS, REFUNDS are available from CRM.COM R15.0.0
entity_idStringThe ID of the entity related to the approval request
subjectString

The subject of the retrieved approval request

responseStringThe response of the retrieved approval request
response_dateDateThe date that a response was provided for the retrieved approval request
responded_byUser ObjectThe user that responded to the retrieved approval request
approval_definitionApproval Definition ObjectThe approval definition that was used to create the approval request
workflow_ruleWorkflow Rule ObjectThe workflow rule that triggered the approval request
authorised_users_setSet of Users ObjectsThe users that are authorised to approve, reject or cancel the approval request
log_informationLog Information ObjectThe log information of the retrieved approval request

Referred Objects Response Data

 user object response data

Name

Type

Description

id

String

The ID of the retrieved user

username

String

The user name of the retrieved user

person_name

String

The full name of the retrieved user

email

String

The email of the retrieved user

 approval_definition object response data

Name

Type

Description

id

String

The ID of the retrieved approval definition

alternative_codeStringThe alternative code of the retrieved approval definition
nameStringThe name of the retrieved approval definition
life_cycle_stateString

The life cycle state of the retrieved approval definition. The supported life cycle states are EFFECTIVE or NOT_EFFECTIVE

 workflow_rule object response data

Name

Type

Description

id

String

The ID of the retrieved workflow rule

alternative_codeStringThe alternative code of the retrieved workflow rule
nameStringThe name of the retrieved workflow rule
life_cycle_stateString

The life cycle state of the retrieved workflow rule. The supported life cycle states are EFFECTIVE or NOT_EFFECTIVE

 log_information object response data

Name

Type

Description

created_date

Date

The date that the retrieved record was created

updated_date

Date

The last date that the retrieved record was updated

created_by_unit

Unit Object

The unit that created the retrieved record

From CRM.COM R14.1.0 and onward, group_name and community_name attributes will be returned as empty, if the related legacy compatibility setting is disabled

Deprecated from CRM.COM R18.0.0

created_by_business_unit

Unit Object

The unit that created the retrieved record

From CRM.COM R14.1.0 and onward, group_name and community_name attributes will be returned as empty, if the related legacy compatibility setting is disabled

Available from CRM.COM R18.0.0

created_by_user

User Object

The user that created the retrieved record

From CRM.COM R14.1.0 and onward, person_name and email attributes will be returned as empty, if the related legacy compatibility setting is disabled

updated_by_unit

Unit Object

The last unit that updated the retrieved record

From CRM.COM R14.1.0 and onward, group_name and community_name attributes will be returned as empty, if the related legacy compatibility setting is disabled

Deprecated from CRM.COM R18.0.0

updated_by_business_unit

Unit Object

The last unit that updated the retrieved record

Available from CRM.COM R18.0.0

updated_by_user

User Object

The last user that updated the retrieved record

From CRM.COM R14.1.0 and onward, person_name and email attributes will be returned as empty, if the related legacy compatibility setting is disabled

Referred Objects Response Data

 unit object response data

Name

Type

Description

id

String

The ID of the retrieved unit

name

String

The name of the retrieved unit

group_name

String

The name of the group that the retrieved unit belongs to

community_name

String

The name of the community that the retrieved unit belongs to

alternative_code

String

The alternative code of the retrieved unit

description

String

The description of the retrieved unit

 business unit object response data

Name

Type

Description

id

String

The ID of the retrieved business unit

name

String

The name of the retrieved business unit

codeStringThe code of the retrieved business unit
unified_codeString

The unified code of the retrieved business unit

description

String

The description of the retrieved business unit

parent_business_unit_nameStringThe name of the parent business unit that the retrieved business unit belongs to

 user object response data

Name

Type

Description

id

String

The ID of the retrieved user

username

String

The user name of the retrieved user

person_name

String

The full name of the retrieved user

email

String

The email of the retrieved user

Examples

 Example 1

HTTP Method: POST


Request:

Body:

{
          "token":"438BA44BD33B44EEBC77746030A92629",
          "approval_request_identifier":{"number":"35"},
          "response":"Test from API"
}  


Response:

{
    "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"
        }
    }
}