/
admission_reject ()

admission_reject ()

Function prototype

admission_reject, admission, type, [date])

API Version

2.7.27 and higher

Supported interfaces

SOAP, REST

Description

Rejects an ADMISSION

Sets the admission in ‘rejected’ status. This involves the following actions:

  • If the ADMISSION was already rejected, then do nothing

  • Insert a new SYSTEM task with task code = "REJECT"

  • Update all open TASKs and set its status to “CANCELLED”

Input parameters:

  • session: is the session token obtained in the session_init() call

  • admission: Reference of the ADMISSION that will be rejected

  • type: reserved for future use

  • date: (optional) By default the date of “reject” of the ADMISSION will considered to be the current date, but it is possible to indicate a specific date.

Output parameters:

  • result: a summary with the information of the ADMISSION after rejecting it. The response format is the same than the returned by admission_get ()

  • ErrorMsg: If any error occurs, then this value contains a description of the error translated to the current language

  • ErrorCode: If any error occurs, then this value contains any of the standard ERROR CODES

Request sample:

api_function ( “LCAAAAAAAAAAAA”, "xxx", "yyy" );

Request example

admission_reject ( “LCAAAAAAAAAAAA”, 32131)

Reponse

The response format is XML when the function has been invoked via the SOAP API, and JSON when it has been invoked via the REST API

Return Error codes

ERROR CODE



ERROR CODE



INVALID_TOKEN

The session token provided is not valid

INSUFFICIENT_PRIVILEGES

The session user does not have the necessary privileges to change the status of the ADMISSION

ADMISSION.NOT_FOUND

The requested ADMISSION was not found



Related content