Methods
(static) approveCourseEditionForSupplier(editionId, token) → {Item}
Approve a course edition by Supplier side (This service version is used by a Supplier Account in Supplier Portal)
Parameters:
| Name | Type | Description |
|---|---|---|
editionId |
string | Required: the id of the edition to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/approve-course-edition-for-supplier
Returns:
The updated edition
- Type
- Item
(static) approveDisapproveSupplierMaterial(supplierTaskId, token) → {SupplierTask}
The admin can approve/disapprove a supplier material
Parameters:
| Name | Type | Description |
|---|---|---|
supplierTaskId |
string | Required: The id of the supplier material |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/approve-disapprove-supplier-material
Returns:
The confirmed material task (supplier task)
- Type
- SupplierTask
(static) assignProposal(initiativeId, courseModuleId, proposalId, noProposal, token) → {Item}
Assign a proposal to an initiative. If a courseModuleId isn't specified and the inititive isn't a path, a new course module will be created.
Parameters:
| Name | Type | Description |
|---|---|---|
initiativeId |
string | Required: Id of the initiative to which the proposal will be assigned. The initiave must be a stage or a path. |
courseModuleId |
string | Optional: Id of the course module to which the proposal will be assigned. If it isn't present and the initiative isn't a path, a new course module will be created. |
proposalId |
string | Required (if noProposal is false): Id of the SupplierTask which represent the proposal |
noProposal |
boolean | Optional: If true, a NO_PROPOSAL_NEEDED attribute will be added to the course module, otherwise the corresponding SupplierTask will be referenced by a SELECT_PROPOSAL attribute. |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/assign-proposal
Returns:
Returns the updated/created item to which the proposal has been assigned. It can be a path or a course module, but it can't be a stage.
- Type
- Item
(static) assignTeachersToCourseEditionForSupplier(editionId, teacherIds, token) → {Item}
Assign a list of Teachers to a Course Edition (This service version is used by a Supplier Account in Supplier Portal)
Parameters:
| Name | Type | Description |
|---|---|---|
editionId |
string | Required: the id of the edition to update |
teacherIds |
Array.<string> | Optional: list of teachersId to associate to edition |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/assign-teachers-to-course-edition-for-supplier
Returns:
The updated edition
- Type
- Item
(static) assignTutorsToCourseEditionForSupplier(editionId, tutorIds, token) → {Item}
Assign a list of Tutors to a Course Edition (This service version is used by a Supplier Account in Supplier Portal)
Parameters:
| Name | Type | Description |
|---|---|---|
editionId |
string | Required: the id of the edition to update |
tutorIds |
Array.<string> | Optional: list of tutorIds to associate to edition |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/assign-tutors-to-course-edition-for-supplier
Returns:
The updated edition
- Type
- Item
(static) cancelStatusForSupplierTaskFile(parentSupplierTaskId, title, courseType, price, token) → {Upload}
Create a new Supplier Proposal. This is done creating a new 'child' SupplierTask, the proposal file is uploaded and references to uploaded file are saved in SupplierTask record
Parameters:
| Name | Type | Description |
|---|---|---|
parentSupplierTaskId |
string | Required: Id of the parent SupplierTask to which the proposal will be referenced. |
title |
string | Required: The file title |
courseType |
string | Required: The Initiative type |
price |
number | Required: The Purpose price |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/cancel-status-for-supplier-task-file
Returns:
Retrieved file's information with URL
- Type
- Upload
(static) changeAttributeOfSupplierProposal(supplierTaskId, attributeType, attributeValue, attributeOrder, removeAttribute, fromSupplier, token) → {SupplierTask}
Updates the specified attribute of a proposal (supplier task). If on attribute of the specified type doesn't exist, it will be created
Parameters:
| Name | Type | Description |
|---|---|---|
supplierTaskId |
string | Required: The id of the proposal request to revoke (that is saved in the supplier's tasks) |
attributeType |
string | Required: The type of the attribute to modify |
attributeValue |
number | Optional: The new value of the attribute to set |
attributeOrder |
string | Optional: The new order of the attribute to set |
removeAttribute |
boolean | Optional: If true, the attibute will be removed instead of modified |
fromSupplier |
boolean | Optional: If true, and a supplier is trying to update an attribute the auth required will be different |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/change-attribute-of-supplier-proposal
Returns:
The updated proposal (supplier task)
- Type
- SupplierTask
(static) confirmProposalRequest(supplierTaskId, supplierSubTaskId, token) → {SupplierTask}
Confirms a supplier's proposal. The task status will be updated, showing that the proposal is waiting to be evaluated by the client. An email will be sent to notify the action, and the recipients will be retrived from:
- in case of NEED_FUNDING_CHECK attribute on the task, from the supplier persons with FUNDING_CHECK role of the active suppliers with FUNDING_SUPPLIER type (persons that manage the funds)
- otherwise, from the supplier persons with BUYING role of the active suppliers with INTERNAL_BUYING_SUPPLIER type (persons that manage the RDAs/ODAs)
Parameters:
| Name | Type | Description |
|---|---|---|
supplierTaskId |
string | Required: The id of the proposal request to revoke (that is saved in the supplier's tasks) |
supplierSubTaskId |
string | Optional: The id of the proposal sub-task |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/confirm-proposal-request
Returns:
The confirmed proposal (supplier task)
- Type
- SupplierTask
(static) countAvailableTeachers(searchedText, roles, token) → {Array.<SupplierPerson>}
Retrieves the count of teachers that can be enrolled for the lessons. By default, only the first 50 rows will be retrieved and they will be ordered by forename in ascendant order.
Parameters:
| Name | Type | Description |
|---|---|---|
searchedText |
string | Optional: Text used to filter on the person name of the supplier person, in case-insensitive like |
roles |
string | Array.<string> | Optional: If it will filters supplier persons toles (defaults to SupplierPersonAttributeRoles.TEACHING_ROLE) |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-available-teachers
Returns:
Array with the retrieved supplier persons
- Type
- Array.<SupplierPerson>
(static) countConfirmedProposalOfCourseSupplier(supplierId, token) → {number}
Counts the confirmed proposals of a course supplier
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Required: The id of the supplier for which the proposals will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-confirmed-proposal-of-course-supplier
Returns:
Counter of the matching proposals
- Type
- number
(static) countCourseSuppliersByAny(supplierId, supplierName, supplierDescription, originApplicationName, referenceApplicationName, referenceType, referenceId, attributeType, attributeValue, attributeRefAppName, attributeRefType, attributeRefId, personName, personEmail, ignoreActive, ignoreTenant, token) → {number}
Counts the course suppliers that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Array.<string> | Optional: Id(s) used to filter on the suppliers |
supplierName |
string | Optional: Text used to filter on the supplierName of the supplier, in case-insensitive like |
supplierDescription |
string | Optional: Text used to filter on the supplierDescription of the supplier, in case-insensitive like |
originApplicationName |
string | Array.<string> | Optional: Origin application name(s) used to filter on the suppliers |
referenceApplicationName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the suppliers |
referenceType |
string | Array.<string> | Optional: Reference type(s) used to filter on the suppliers |
referenceId |
string | Array.<string> | Optional: Reference id(s) used to filter on the suppliers |
attributeType |
string | Array.<string> | Optional: Type(s) used to filter on the attributes of the supplier |
attributeValue |
string | Array.<string> | Optional: Value(s) used to filter on the attributes of the supplier |
attributeRefAppName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the attributes of the supplier |
attributeRefType |
string | Array.<string> | Optional: Reference type(s) used to filter on the attributes of the supplier |
attributeRefId |
string | Array.<string> | Optional: Reference id(s) used to filter on the attributes of the supplier |
personName |
string | Optional: Text used to filter on the forename/surname of the supplier persons, in case-insensitive like |
personEmail |
string | Optional: Text used to filter on the email of the supplier persons, in case-insensitive like |
ignoreActive |
boolean | Optional: If true, the active field of the suppliers won't be checked |
ignoreTenant |
boolean | Optional: If true, the tenants of the suppliers won't be checked |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-course-suppliers-by-any
Returns:
Counter of the matching suppliers
- Type
- number
(static) countFacultySuppliersByAny(supplierId, supplierName, supplierDescription, originApplicationName, referenceApplicationName, referenceType, referenceId, attributeType, attributeValue, attributeRefAppName, attributeRefType, attributeRefId, personName, personEmail, ignoreActive, ignoreTenant, token) → {number}
Counts the faculty suppliers that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Array.<string> | Optional: Id(s) used to filter on the suppliers |
supplierName |
string | Optional: Text used to filter on the supplierName of the supplier, in case-insensitive like |
supplierDescription |
string | Optional: Text used to filter on the supplierDescription of the supplier, in case-insensitive like |
originApplicationName |
string | Array.<string> | Optional: Origin application name(s) used to filter on the suppliers |
referenceApplicationName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the suppliers |
referenceType |
string | Array.<string> | Optional: Reference type(s) used to filter on the suppliers |
referenceId |
string | Array.<string> | Optional: Reference id(s) used to filter on the suppliers |
attributeType |
string | Array.<string> | Optional: Type(s) used to filter on the attributes of the supplier |
attributeValue |
string | Array.<string> | Optional: Value(s) used to filter on the attributes of the supplier |
attributeRefAppName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the attributes of the supplier |
attributeRefType |
string | Array.<string> | Optional: Reference type(s) used to filter on the attributes of the supplier |
attributeRefId |
string | Array.<string> | Optional: Reference id(s) used to filter on the attributes of the supplier |
personName |
string | Optional: Text used to filter on the forename/surname of the supplier persons, in case-insensitive like |
personEmail |
string | Optional: Text used to filter on the email of the supplier persons, in case-insensitive like |
ignoreActive |
boolean | Optional: If true, the active field of the suppliers won't be checked |
ignoreTenant |
boolean | Optional: If true, the tenants of the suppliers won't be checked |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-faculty-suppliers-by-any
Returns:
Counter of the matching suppliers
- Type
- number
(static) countFacultyTrainersByAny(supplierName, token) → {number}
Counts the faculty trainers that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierName |
string | Optional: Text used to filter on the full name of the persons, in case-insensitive like |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-faculty-trainers-by-any
Returns:
Counter of the matching faculty trainers
- Type
- number
(static) countFundingManagerActivities(fromRecord, numRecords, closedTaskOnly, title, allData, token) → {PaginationWrapper.<SupplierTaskWithInitiativeData>}
Retrieve list of initiatives and associated tasks by supplier (Service used by Supplier Site home page)
Parameters:
| Name | Type | Description |
|---|---|---|
fromRecord |
number | Required (if allData is false): The number of the first record to load (exclusive - 0 to start from the first) |
numRecords |
number | Required (if allData is false): The number of records to load |
closedTaskOnly |
boolean | Optional: if true, retrieve the list of closed task only |
title |
string | Optional: text filter on initiative's title |
allData |
boolean | Optional: If true, all records will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-funding-manager-activities
Returns:
Items wrapped for pagination (with count)
- Type
- PaginationWrapper.<SupplierTaskWithInitiativeData>
(static) countFundingSuppliersByAny(supplierId, supplierName, supplierDescription, originApplicationName, referenceApplicationName, referenceType, referenceId, attributeType, attributeValue, attributeRefAppName, attributeRefType, attributeRefId, personName, personEmail, ignoreActive, ignoreTenant, token) → {number}
Counts the funding suppliers that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Array.<string> | Optional: Id(s) used to filter on the suppliers |
supplierName |
string | Optional: Text used to filter on the supplierName of the supplier, in case-insensitive like |
supplierDescription |
string | Optional: Text used to filter on the supplierDescription of the supplier, in case-insensitive like |
originApplicationName |
string | Array.<string> | Optional: Origin application name(s) used to filter on the suppliers |
referenceApplicationName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the suppliers |
referenceType |
string | Array.<string> | Optional: Reference type(s) used to filter on the suppliers |
referenceId |
string | Array.<string> | Optional: Reference id(s) used to filter on the suppliers |
attributeType |
string | Array.<string> | Optional: Type(s) used to filter on the attributes of the supplier |
attributeValue |
string | Array.<string> | Optional: Value(s) used to filter on the attributes of the supplier |
attributeRefAppName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the attributes of the supplier |
attributeRefType |
string | Array.<string> | Optional: Reference type(s) used to filter on the attributes of the supplier |
attributeRefId |
string | Array.<string> | Optional: Reference id(s) used to filter on the attributes of the supplier |
personName |
string | Optional: Text used to filter on the forename/surname of the supplier persons, in case-insensitive like |
personEmail |
string | Optional: Text used to filter on the email of the supplier persons, in case-insensitive like |
ignoreActive |
boolean | Optional: If true, the active field of the suppliers won't be checked |
ignoreTenant |
boolean | Optional: If true, the tenants of the suppliers won't be checked |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-funding-suppliers-by-any
Returns:
Counter of the matching suppliers
- Type
- number
(static) countSupplierPersonsBySupplierid(supplierId, supplierPersonId, personName, personEmail, nodeType, nodeIdField, nodeIdValue, personType, referenceApplicationName, referenceType, referenceId, attributeType, attributeValue, attributeRefAppName, attributeRefType, attributeRefId, token) → {number}
Counts the supplier persons that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Array.<string> | Required: Supplier id(s) used to filter on the supplier persons |
supplierPersonId |
string | Array.<string> | Optional: Id(s) used to filter on the supplier persons |
personName |
string | Optional: Text used to filter on the forename/surname of the supplier persons, in case-insensitive like |
personEmail |
string | Optional: Text used to filter on the email of the supplier persons, in case-insensitive like |
nodeType |
string | Array.<string> | Optional: NodeType(s) used to filter on the supplier persons |
nodeIdField |
string | Array.<string> | Optional: NodeIdField(s) used to filter on the supplier persons |
nodeIdValue |
string | Array.<string> | Optional: NodeIdValue(s) used to filter on the supplier persons |
personType |
string | Array.<string> | Optional: Type(s) used to filter on the supplier persons |
referenceApplicationName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the supplier persons |
referenceType |
string | Array.<string> | Optional: Reference type(s) used to filter on the supplier persons |
referenceId |
string | Array.<string> | Optional: Reference id(s) used to filter on the supplier persons |
attributeType |
string | Array.<string> | Optional: Type(s) used to filter on the attributes of the supplier |
attributeValue |
string | Array.<string> | Optional: Value(s) used to filter on the attributes of the supplier |
attributeRefAppName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the attributes of the supplier |
attributeRefType |
string | Array.<string> | Optional: Reference type(s) used to filter on the attributes of the supplier |
attributeRefId |
string | Array.<string> | Optional: Reference id(s) used to filter on the attributes of the supplier |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-supplier-persons-by-supplierId
Returns:
Counter of the matching supplier persons
- Type
- number
(static) countSuppliersByAny(supplierId, supplierType, supplierName, supplierDescription, referenceApplicationName, referenceType, referenceId, attributeType, attributeValue, attributeRefAppName, attributeRefType, attributeRefId, personName, personEmail, token) → {number}
Counts the suppliers that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Array.<string> | Optional: Id(s) used to filter on the suppliers |
supplierType |
string | Array.<string> | Optional: Type(s) used to filter on the suppliers |
supplierName |
string | Optional: Text used to filter on the supplierName of the supplier, in case-insensitive like |
supplierDescription |
string | Optional: Text used to filter on the supplierDescription of the supplier, in case-insensitive like |
referenceApplicationName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the suppliers |
referenceType |
string | Array.<string> | Optional: Reference type(s) used to filter on the suppliers |
referenceId |
string | Array.<string> | Optional: Reference id(s) used to filter on the suppliers |
attributeType |
string | Array.<string> | Optional: Type(s) used to filter on the attributes of the supplier |
attributeValue |
string | Array.<string> | Optional: Value(s) used to filter on the attributes of the supplier |
attributeRefAppName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the attributes of the supplier |
attributeRefType |
string | Array.<string> | Optional: Reference type(s) used to filter on the attributes of the supplier |
attributeRefId |
string | Array.<string> | Optional: Reference id(s) used to filter on the attributes of the supplier |
personName |
string | Optional: Text used to filter on the forename/surname of the supplier persons, in case-insensitive like |
personEmail |
string | Optional: Text used to filter on the email of the supplier persons, in case-insensitive like |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-suppliers-by-any
Returns:
Counter of the matching suppliers
- Type
- number
(static) countSupplierTasksBySupplierid(supplierId, supplierTaskId, supplierPersonId, taskType, statusType, minStartDate, maxStartDate, minEndDate, maxEndDate, minExpectedEndDate, maxExpectedEndDate, referenceApplicationName, referenceType, referenceId, attributeType, attributeValue, attributeRefAppName, attributeRefType, attributeRefId, searchClosedStatesToo, token) → {number}
Counts the supplier tasks that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Array.<string> | Required: Supplier id(s) used to filter on the supplier tasks |
supplierTaskId |
string | Array.<string> | Optional: Supplier task id(s) used to filter on the supplier tasks |
supplierPersonId |
string | Array.<string> | Optional: Supplier person id(s) used to filter on the supplier tasks |
taskType |
string | Array.<string> | Optional: Task type(s) used to filter on the supplier tasks |
statusType |
string | Array.<string> | Optional: Task status type(s) used to filter on the supplier task statuses |
minStartDate |
Date | Optional: Minimum startDate of the tasks. Only the records with startDate greater than or equal to this parameter will be retrived |
maxStartDate |
Date | Optional: Maximum startDate of the tasks. Only the records with startDate less than or equal to this parameter will be retrived |
minEndDate |
Date | Optional: Minimum endDate of the tasks. Only the records with endDate greater than or equal to this parameter will be retrived |
maxEndDate |
Date | Optional: Maximum endDate of the tasks. Only the records with endDate less than or equal to this parameter will be retrived |
minExpectedEndDate |
Date | Optional: Minimum expectedEndDate of the tasks. Only the records with expectedEndDate greater than or equal to this parameter will be retrived |
maxExpectedEndDate |
Date | Optional: Maximum expectedEndDate of the tasks. Only the records with expectedEndDate less than or equal to this parameter will be retrived |
referenceApplicationName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the supplier tasks |
referenceType |
string | Array.<string> | Optional: Reference type(s) used to filter on the supplier tasks |
referenceId |
string | Array.<string> | Optional: Reference id(s) used to filter on the supplier tasks |
attributeType |
string | Array.<string> | Optional: Type(s) used to filter on the attributes of the supplier |
attributeValue |
string | Array.<string> | Optional: Value(s) used to filter on the attributes of the supplier |
attributeRefAppName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the attributes of the supplier |
attributeRefType |
string | Array.<string> | Optional: Reference type(s) used to filter on the attributes of the supplier |
attributeRefId |
string | Array.<string> | Optional: Reference id(s) used to filter on the attributes of the supplier |
searchClosedStatesToo |
boolean | Optional: If true, the filters will be applied on closed tasks too. By default, they apply only to tasks that are open |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-supplier-tasks-by-supplierId
Returns:
Counter of the matching supplier tasks
- Type
- number
(static) createSupplier(supplier, token) → {Supplier_new}
Creates a new supplier
Parameters:
| Name | Type | Description |
|---|---|---|
supplier |
Supplier_new | Required: Supplier object to persist |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/create-supplier
Returns:
The created supplier
- Type
- Supplier_new
(static) createSupplierForFacultyMember(facultyMemberUserId, token) → {Supplier_new}
Creates a new supplier for the specified faculty member
Parameters:
| Name | Type | Description |
|---|---|---|
facultyMemberUserId |
string | Required: UserId of the faculty member |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/create-supplier-for-faculty-member
Returns:
The newly created supplier object
- Type
- Supplier_new
(static) createSupplierInvoice(parentSupplierTaskId, title, invoiceNumber, invoiceDate, invoiceAmount, token) → {Upload}
Create a new Invoice from Supplier's site. This is done creating a new 'child' SupplierTask, the invoice file is uploaded and references to uploaded file are saved in SupplierTask child record
Parameters:
| Name | Type | Description |
|---|---|---|
parentSupplierTaskId |
string | Required: Id of the parent SupplierTask to which the invoice will be referenced. |
title |
string | Required: The invoice file title |
invoiceNumber |
string | Required: The invoice number |
invoiceDate |
Date | Required: The invoice date |
invoiceAmount |
number | Required: the invoice amount |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/create-supplier-invoice
Returns:
Retrieved file's information with URL
- Type
- Upload
(static) createSupplierMaterial(parentSupplierTaskId, title, materialType, token) → {Upload}
Create a new Supplier Financing Material data This is done creating a new 'child' SupplierTask, the material data uploaded and references to uploaded files are saved in SupplierTask record
Parameters:
| Name | Type | Description |
|---|---|---|
parentSupplierTaskId |
string | Required: Id of the parent SupplierTask to which the material data will be referenced. |
title |
string | Required: The file title |
materialType |
string | Required: The Material type |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/create-supplier-material
Returns:
Retrieved file's information with URL
- Type
- Upload
(static) createSupplierPerson(supplierPerson, token) → {SupplierPerson}
Persists the given supplier person and its attributes.
Parameters:
| Name | Type | Description |
|---|---|---|
supplierPerson |
SupplierPerson | Required: Supplier person object to persist |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/create-supplier-person
Returns:
The created supplier person
- Type
- SupplierPerson
(static) createSupplierProposal(parentSupplierTaskId, title, courseType, price, token) → {Upload}
Create a new Supplier Proposal. This is done creating a new 'child' SupplierTask, the proposal file is uploaded and references to uploaded file are saved in SupplierTask record
Parameters:
| Name | Type | Description |
|---|---|---|
parentSupplierTaskId |
string | Required: Id of the parent SupplierTask to which the proposal will be referenced. |
title |
string | Required: The file title |
courseType |
string | Required: The Initiative type |
price |
number | Required: The Purpose price |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/create-supplier-proposal
Returns:
Retrieved file's information with URL
- Type
- Upload
(static) deleteSupplier(supplierId, token) → {boolean}
Logically delete the supplier with the specified supplierId. A copy of the current state of the entity will be added to the history.
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Required: Id of the supplier to delete |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/delete-supplier/:supplierId
Returns:
Return true if no errors were thrown durign the execution
- Type
- boolean
(static) deleteSupplierPerson(supplierPersonId, token) → {boolean}
Logically delete the supplier person with the specified supplierPersonId. A copy of the current state of the entity will be added to the history.
Parameters:
| Name | Type | Description |
|---|---|---|
supplierPersonId |
string | Required: Id of the supplier person to delete |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/delete-supplier-person/:supplierPersonId
Returns:
Return true if no errors were thrown durign the execution
- Type
- boolean
(static) getCourseEditionsBySupplierTaskId(supplierTaskId, withChildsLoaded, childsTreeDepth, token) → {Item}
Retrieve list of Course Editions associated to a parent Supplier Task
Parameters:
| Name | Type | Description |
|---|---|---|
supplierTaskId |
string | Required by the action: The id of the current SupplierTask |
withChildsLoaded |
string | boolean | Optional for the action: If true all childs object are loaded into childObject |
childsTreeDepth |
number | Optional: depth in tree of childs to retrieve |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-course-editions-by-supplier-task-id
Returns:
The retrieved Item
- Type
- Item
(static) getSupplierById(supplierId, withAttributesLoaded, withFullAttributesLoaded, withPersonsLoaded, withOpenTasksLoaded, ignoreActive, ignoreTenant, token) → {Supplier}
Retrieves a supplier using his id
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Required: Id of the supplier to retrieve |
withAttributesLoaded |
boolean | Optional: If true, all the supplier attributes will be retrieved |
withFullAttributesLoaded |
boolean | Optional: If true, the cross-referenced object of each attribute will be retrieved |
withPersonsLoaded |
boolean | Optional: If true, all the supplier persons (with their attributes) will be retrieved |
withOpenTasksLoaded |
boolean | Optional: If true, all the open (and only the open) supplier tasks will be retrieved |
ignoreActive |
boolean | Optional: if true, the active field of the suppliers won't be checked |
ignoreTenant |
boolean | Optional: if true, the tenants of the suppliers won't be checked |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-supplier-by-id/:supplierId
Returns:
Retrieved supplier object
- Type
- Supplier
(static) getSupplierFromFacultyMember(facultyMemberUserId, token) → {Supplier_new}
Retrieves the supplier of a faculty member
Parameters:
| Name | Type | Description |
|---|---|---|
facultyMemberUserId |
string | Required: UserId of the faculty member |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-supplier-from-faculty-member/:facultyMemberUserId
Returns:
Retrieved supplier object
- Type
- Supplier_new
(static) getSupplierPersonById(supplierPersonId, withAttributesLoaded, withFullAttributesLoaded, withPersonsLoaded, ignoreActive, token) → {SupplierPerson}
Retrieve a supplier person using his id
Parameters:
| Name | Type | Description |
|---|---|---|
supplierPersonId |
string | Required: Id of the supplier person to retrieve |
withAttributesLoaded |
boolean | Optional: If true, all the supplier attributes will be retrieved |
withFullAttributesLoaded |
boolean | Optional: If true, the cross-referenced object of each attribute will be retrieved |
withPersonsLoaded |
boolean | Optional: If true, the referenced graph node will be loaded into the crossReferenceObject field of the supplier person |
ignoreActive |
boolean | Optional: if true, the active field of the supplier persons won't be checked |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-supplier-person-by-id/:supplierPersonId
Returns:
Retrieved supplier person object
- Type
- SupplierPerson
(static) getSupplierProposalMailRecipients(supplierId, token) → {Array.<string>}
Retrieves the email addresses that will receive the proposal-related mails
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Required: Id of supplier that need to receive the proposal request |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-supplier-proposal-mail-recipients/:supplierId
Returns:
Array with the retrieved email addresses
- Type
- Array.<string>
(static) getSupplierTaskBySuppliertaskid(supplierTaskId, token) → {SupplierTask}
Retrieve the supplier task by supplierTaskId
Parameters:
| Name | Type | Description |
|---|---|---|
supplierTaskId |
string | The supplier task id to retrieve the data |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-supplier-task-by-supplierTaskId
Returns:
Supplier Task
- Type
- SupplierTask
(static) listAvailableTeachers(searchedText, fromRecord, numRecords, roles, allData, sorting, skipPrivateData, token) → {Array.<SupplierPerson>}
Retrieves the teachers that can be enrolled for the lessons. By default, only the first 50 rows will be retrieved and they will be ordered by forename in ascendant order.
Parameters:
| Name | Type | Description |
|---|---|---|
searchedText |
string | Optional: Text used to filter on the person name of the supplier person, in case-insensitive like |
fromRecord |
number | Optional: Offset of the first record to retrieve. The default value is 0. |
numRecords |
number | Optional: Number of records to retrieve. The default value is 50. |
roles |
string | Array.<string> | Optional: If it will filters supplier persons toles (defaults to SupplierPersonAttributeRoles.TEACHING_ROLE) |
allData |
boolean | Optional: All matching rows will be retrieved |
sorting |
string | Optional: Specifies the sorting to use. Available sortings are defined in the SupplierPersonSorting common class. By default, the supplier persons will be sorted by creationDate DESC |
skipPrivateData |
boolean | Optional: if true, the returned supplier person will not have any sensible data |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-available-teachers
Returns:
Array with the retrieved supplier persons
- Type
- Array.<SupplierPerson>
(static) listAvailableTutors(searchedText, fromRecord, numRecords, allData, skipPrivateData, token) → {Array.<SupplierPerson>}
Retrieves the tutors that can be enrolled for the lessons. By default, only the first 50 rows will be retrieved and they will be ordered by forename in ascendant order.
Parameters:
| Name | Type | Description |
|---|---|---|
searchedText |
string | Optional: Text used to filter on the person name of the supplier person, in case-insensitive like |
fromRecord |
number | Optional: Offset of the first record to retrieve. The default value is 0. |
numRecords |
number | Optional: Number of records to retrieve. The default value is 50. |
allData |
boolean | Optional: All matching rows will be retrieved |
skipPrivateData |
boolean | Optional: if true, the returned supplier person will not have any sensible data |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-available-tutors
Returns:
Array with the retrieved supplier persons
- Type
- Array.<SupplierPerson>
(static) listConfirmedProposalOfCourseSupplier(supplierId, asMap, groupBySupplierId, sorting, fromRecord, numRecords, allData, token) → {Array.<SupplierTask>|MapById.<SupplierTask>|MapById.<MapById.<SupplierTask>>|MapById.<Array.<SupplierTask>>}
Retrieves the confirmed proposals of a course supplier. A fake Item object (with just the item title) will be put in the crossReferenceObject field, with the title of the referenced item.
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Required: The id of the supplier for which the proposals will be retrieved |
asMap |
boolean | Optional: If true, the response will be a Map with supplierTaskId as keys and SupplierTask objects as values |
groupBySupplierId |
boolean | Optional: If true, groups the results using their supplierId. If asMap is true the response will be a map (with supplierId as key) of maps (with supplierTaskId as key), otherwise a map (with supplierId as key) of arrays |
sorting |
string | Optional: Specifies the sorting to use. Available sortings are defined in the SupplierTaskSorting common class. By default, the supplier tasks will be sorted by creationDate DESC |
fromRecord |
number | Required (if allData is false): Offset of the first record to retrieve |
numRecords |
number | Required (if allData is false): Number of records to retrieve |
allData |
boolean | Optional (if fromRecord and numRecords are defined): All matching rows will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-confirmed-proposal-of-course-supplier/:fromRecord/:numRecords
Returns:
Array with the retrieved proposals or map with supplierTaskId as keys and SupplierTask objects as values. If groupBySupplierId is true, the response will change according to the description of that parameter.
- Type
- Array.<SupplierTask> | MapById.<SupplierTask> | MapById.<MapById.<SupplierTask>> | MapById.<Array.<SupplierTask>>
(static) listCourseSuppliersByAny(supplierId, supplierName, supplierDescription, originApplicationName, referenceApplicationName, referenceType, referenceId, attributeType, attributeValue, attributeRefAppName, attributeRefType, attributeRefId, personName, personEmail, withAttributesLoaded, withFullAttributesLoaded, withPersonsLoaded, withOpenTasksLoaded, asMap, ignoreActive, ignoreTenant, sorting, fromRecord, numRecords, allData, token) → {Array.<Supplier_new>|MapById.<Supplier_new>}
Retrieves the course suppliers that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Array.<string> | Optional: Id(s) used to filter on the suppliers |
supplierName |
string | Optional: Text used to filter on the supplierName of the supplier, in case-insensitive like |
supplierDescription |
string | Optional: Text used to filter on the supplierDescription of the supplier, in case-insensitive like |
originApplicationName |
string | Array.<string> | Optional: Origin application name(s) used to filter on the suppliers |
referenceApplicationName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the suppliers |
referenceType |
string | Array.<string> | Optional: Reference type(s) used to filter on the suppliers |
referenceId |
string | Array.<string> | Optional: Reference id(s) used to filter on the suppliers |
attributeType |
string | Array.<string> | Optional: Type(s) used to filter on the attributes of the supplier |
attributeValue |
string | Array.<string> | Optional: Value(s) used to filter on the attributes of the supplier |
attributeRefAppName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the attributes of the supplier |
attributeRefType |
string | Array.<string> | Optional: Reference type(s) used to filter on the attributes of the supplier |
attributeRefId |
string | Array.<string> | Optional: Reference id(s) used to filter on the attributes of the supplier |
personName |
string | Optional: Text used to filter on the forename/surname of the supplier persons, in case-insensitive like |
personEmail |
string | Optional: Text used to filter on the email of the supplier persons, in case-insensitive like |
withAttributesLoaded |
boolean | Optional: If true, all the supplier attributes will be retrieved for each supplier |
withFullAttributesLoaded |
boolean | Optional: If true, the cross-referenced object of each attribute will be retrieved for each supplier |
withPersonsLoaded |
boolean | Optional: If true, all the supplier persons (with their attributes) will be retrieved for each supplier |
withOpenTasksLoaded |
boolean | Optional: If true, all the open (and only the open) supplier tasks will be retrieved for each supplier |
asMap |
boolean | Optional: If true, the response will be a Map with supplierId as keys and Supplier objects as values |
ignoreActive |
boolean | Optional: If true, the active field of the suppliers won't be checked |
ignoreTenant |
boolean | Optional: If true, the tenants of the suppliers won't be checked |
sorting |
string | Optional: Specifies the sorting to use. Available sortings are defined in the SupplierSorting common class. By default, the suppliers will be sorted by creationDate DESC |
fromRecord |
number | Required (if allData is false): Offset of the first record to retrieve |
numRecords |
number | Required (if allData is false): Number of records to retrieve |
allData |
boolean | Optional (if fromRecord and numRecords are defined): All matching rows will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-course-suppliers-by-any/:fromRecord/:numRecords
Returns:
Array with the retrieved suppliers or map with supplierIds as keys and Supplier objects as values
- Type
- Array.<Supplier_new> | MapById.<Supplier_new>
(static) listFacultySuppliersByAny(supplierId, supplierName, supplierDescription, originApplicationName, referenceApplicationName, referenceType, referenceId, attributeType, attributeValue, attributeRefAppName, attributeRefType, attributeRefId, personName, personEmail, withAttributesLoaded, withFullAttributesLoaded, withPersonsLoaded, withOpenTasksLoaded, asMap, ignoreActive, ignoreTenant, sorting, fromRecord, numRecords, allData, token) → {Array.<Supplier_new>|MapById.<Supplier_new>}
Retrieves the faculty suppliers that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Array.<string> | Optional: Id(s) used to filter on the suppliers |
supplierName |
string | Optional: Text used to filter on the supplierName of the supplier, in case-insensitive like |
supplierDescription |
string | Optional: Text used to filter on the supplierDescription of the supplier, in case-insensitive like |
originApplicationName |
string | Array.<string> | Optional: Origin application name(s) used to filter on the suppliers |
referenceApplicationName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the suppliers |
referenceType |
string | Array.<string> | Optional: Reference type(s) used to filter on the suppliers |
referenceId |
string | Array.<string> | Optional: Reference id(s) used to filter on the suppliers |
attributeType |
string | Array.<string> | Optional: Type(s) used to filter on the attributes of the supplier |
attributeValue |
string | Array.<string> | Optional: Value(s) used to filter on the attributes of the supplier |
attributeRefAppName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the attributes of the supplier |
attributeRefType |
string | Array.<string> | Optional: Reference type(s) used to filter on the attributes of the supplier |
attributeRefId |
string | Array.<string> | Optional: Reference id(s) used to filter on the attributes of the supplier |
personName |
string | Optional: Text used to filter on the forename/surname of the supplier persons, in case-insensitive like |
personEmail |
string | Optional: Text used to filter on the email of the supplier persons, in case-insensitive like |
withAttributesLoaded |
boolean | Optional: If true, all the supplier attributes will be retrieved for each supplier |
withFullAttributesLoaded |
boolean | Optional: If true, the cross-referenced object of each attribute will be retrieved for each supplier |
withPersonsLoaded |
boolean | Optional: If true, all the supplier persons (with their attributes) will be retrieved for each supplier |
withOpenTasksLoaded |
boolean | Optional: If true, all the open (and only the open) supplier tasks will be retrieved for each supplier |
asMap |
boolean | Optional: If true, the response will be a Map with supplierId as keys and Supplier objects as values |
ignoreActive |
boolean | Optional: If true, the active field of the suppliers won't be checked |
ignoreTenant |
boolean | Optional: If true, the tenants of the suppliers won't be checked |
sorting |
string | Optional: Specifies the sorting to use. Available sortings are defined in the SupplierSorting common class. By default, the suppliers will be sorted by creationDate DESC |
fromRecord |
number | Required (if allData is false): Offset of the first record to retrieve |
numRecords |
number | Required (if allData is false): Number of records to retrieve |
allData |
boolean | Optional (if fromRecord and numRecords are defined): All matching rows will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-faculty-suppliers-by-any/:fromRecord/:numRecords
Returns:
Array with the retrieved suppliers or map with supplierIds as keys and Supplier objects as values
- Type
- Array.<Supplier_new> | MapById.<Supplier_new>
(static) listFacultyTrainersByAny(supplierName, token) → {Array.<Rent>}
Retrieves the faculty trainers that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierName |
string | Optional: Text used to filter on the full name of the persons, in case-insensitive like |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-faculty-trainers-by-any
Returns:
Array with the matching faculty trainers
- Type
- Array.<Rent>
(static) listFundingManagerActivities(fromRecord, numRecords, closedTaskOnly, title, allData, token) → {PaginationWrapper.<SupplierTaskWithInitiativeData>}
Retrieve list of initiatives and associated tasks by supplier (Service used by Supplier Site home page)
Parameters:
| Name | Type | Description |
|---|---|---|
fromRecord |
number | Required (if allData is false): The number of the first record to load (exclusive - 0 to start from the first) |
numRecords |
number | Required (if allData is false): The number of records to load |
closedTaskOnly |
boolean | Optional: if true, retrieve the list of closed task only |
title |
string | Optional: text filter on initiative's title |
allData |
boolean | Optional: If true, all records will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-funding-manager-activities/:fromRecord/:numRecords
Returns:
Items wrapped for pagination (with count)
- Type
- PaginationWrapper.<SupplierTaskWithInitiativeData>
(static) listFundingSuppliersByAny(supplierId, supplierName, supplierDescription, originApplicationName, referenceApplicationName, referenceType, referenceId, attributeType, attributeValue, attributeRefAppName, attributeRefType, attributeRefId, personName, personEmail, withAttributesLoaded, withFullAttributesLoaded, withPersonsLoaded, withOpenTasksLoaded, asMap, ignoreActive, ignoreTenant, sorting, fromRecord, numRecords, allData, token) → {Array.<Supplier_new>|MapById.<Supplier_new>}
Retrieves the funding suppliers that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Array.<string> | Optional: Id(s) used to filter on the suppliers |
supplierName |
string | Optional: Text used to filter on the supplierName of the supplier, in case-insensitive like |
supplierDescription |
string | Optional: Text used to filter on the supplierDescription of the supplier, in case-insensitive like |
originApplicationName |
string | Array.<string> | Optional: Origin application name(s) used to filter on the suppliers |
referenceApplicationName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the suppliers |
referenceType |
string | Array.<string> | Optional: Reference type(s) used to filter on the suppliers |
referenceId |
string | Array.<string> | Optional: Reference id(s) used to filter on the suppliers |
attributeType |
string | Array.<string> | Optional: Type(s) used to filter on the attributes of the supplier |
attributeValue |
string | Array.<string> | Optional: Value(s) used to filter on the attributes of the supplier |
attributeRefAppName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the attributes of the supplier |
attributeRefType |
string | Array.<string> | Optional: Reference type(s) used to filter on the attributes of the supplier |
attributeRefId |
string | Array.<string> | Optional: Reference id(s) used to filter on the attributes of the supplier |
personName |
string | Optional: Text used to filter on the forename/surname of the supplier persons, in case-insensitive like |
personEmail |
string | Optional: Text used to filter on the email of the supplier persons, in case-insensitive like |
withAttributesLoaded |
boolean | Optional: If true, all the supplier attributes will be retrieved for each supplier |
withFullAttributesLoaded |
boolean | Optional: If true, the cross-referenced object of each attribute will be retrieved for each supplier |
withPersonsLoaded |
boolean | Optional: If true, all the supplier persons (with their attributes) will be retrieved for each supplier |
withOpenTasksLoaded |
boolean | Optional: If true, all the open (and only the open) supplier tasks will be retrieved for each supplier |
asMap |
boolean | Optional: If true, the response will be a Map with supplierId as keys and Supplier objects as values |
ignoreActive |
boolean | Optional: If true, the active field of the suppliers won't be checked |
ignoreTenant |
boolean | Optional: If true, the tenants of the suppliers won't be checked |
sorting |
string | Optional: Specifies the sorting to use. Available sortings are defined in the SupplierSorting common class. By default, the suppliers will be sorted by creationDate DESC |
fromRecord |
number | Required (if allData is false): Offset of the first record to retrieve |
numRecords |
number | Required (if allData is false): Number of records to retrieve |
allData |
boolean | Optional (if fromRecord and numRecords are defined): All matching rows will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-funding-suppliers-by-any/:fromRecord/:numRecords
Returns:
Array with the retrieved suppliers or map with supplierIds as keys and Supplier objects as values
- Type
- Array.<Supplier_new> | MapById.<Supplier_new>
(static) listNotificationsToFundInstitute(fromRecord, numRecords, closedTaskOnly, title, allData, token) → {PaginationWrapper.<SupplierTaskWithInitiativeData>}
Retrieve list of initiatives and associated tasks by supplier (Service used by Supplier Site home page)
Parameters:
| Name | Type | Description |
|---|---|---|
fromRecord |
number | Required (if allData is false): The number of the first record to load (exclusive - 0 to start from the first) |
numRecords |
number | Required (if allData is false): The number of records to load |
closedTaskOnly |
boolean | Optional: if true, retrieve the list of closed task only |
title |
string | Optional: text filter on initiative's title |
allData |
boolean | Optional: If true, all records will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-notifications-to-fund-institute/:fromRecord/:numRecords
Returns:
Items wrapped for pagination (with count)
- Type
- PaginationWrapper.<SupplierTaskWithInitiativeData>
(static) listSupplierInitiatives(fromRecord, numRecords, closedTaskOnly, title, allData, token) → {PaginationWrapper.<SupplierTaskWithInitiativeData>}
Retrieve list of initiatives and associated tasks by supplier (Service used by Supplier Site home page)
Parameters:
| Name | Type | Description |
|---|---|---|
fromRecord |
number | Required (if allData is false): The number of the first record to load (exclusive - 0 to start from the first) |
numRecords |
number | Required (if allData is false): The number of records to load |
closedTaskOnly |
boolean | Optional: if true, retrieve the list of closed task only |
title |
string | Optional: text filter on initiative's title |
allData |
boolean | Optional: If true, all records will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-supplier-initiatives/:fromRecord/:numRecords
Returns:
Items wrapped for pagination (with count)
- Type
- PaginationWrapper.<SupplierTaskWithInitiativeData>
(static) listSupplierInvoicesByParent(parentSupplierTaskId, fromRecord, numRecords, allData, token) → {PaginationWrapper.<SupplierTask>}
Retrieve list of invoices (modeled on DB by a SupplierTask child record). All these children are all associated to a parent supplierTaskId
Parameters:
| Name | Type | Description |
|---|---|---|
parentSupplierTaskId |
string | Required: parent SupplierTask referenced by all invoices |
fromRecord |
number | Required (if allData is false): The number of the first record to load (exclusive - 0 to start from the first) |
numRecords |
number | Required (if allData is false): The number of records to load |
allData |
boolean | Optional: If true, all records will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-supplier-invoices-by-parent/:fromRecord/:numRecords
Returns:
Items wrapped for pagination (with count)
- Type
- PaginationWrapper.<SupplierTask>
(static) listSupplierMaterialsByParent(parentSupplierTaskId, fromRecord, numRecords, allData, token) → {PaginationWrapper.<SupplierTask>}
Retrieve list of funding materials (modeled on DB by a SupplierTask child record). All these children are all associated to a parent supplierTaskId
Parameters:
| Name | Type | Description |
|---|---|---|
parentSupplierTaskId |
string | Required: parent SupplierTask referenced by all material data |
fromRecord |
number | Required (if allData is false): The number of the first record to load (exclusive - 0 to start from the first) |
numRecords |
number | Required (if allData is false): The number of records to load |
allData |
boolean | Optional: If true, all records will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-supplier-materials-by-parent/:fromRecord/:numRecords
Returns:
Items wrapped for pagination (with count)
- Type
- PaginationWrapper.<SupplierTask>
(static) listSupplierPersonsBySupplierid(supplierId, supplierPersonId, personName, personEmail, nodeType, nodeIdField, nodeIdValue, personType, referenceApplicationName, referenceType, referenceId, attributeType, attributeValue, attributeRefAppName, attributeRefType, attributeRefId, withAttributesLoaded, withFullAttributesLoaded, withPersonsLoaded, withSupplierLoaded, asMap, groupBySupplierId, sorting, fromRecord, numRecords, allData, skipPrivateData, token) → {Array.<SupplierPerson>|MapById.<SupplierPerson>|MapById.<MapById.<SupplierPerson>>|MapById.<Array.<SupplierPerson>>}
Retrieves the supplier persons that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Array.<string> | Required: Supplier id(s) used to filter on the supplier persons |
supplierPersonId |
string | Array.<string> | Optional: Id(s) used to filter on the supplier persons |
personName |
string | Optional: Text used to filter on the forename/surname of the supplier persons, in case-insensitive like |
personEmail |
string | Optional: Text used to filter on the email of the supplier persons, in case-insensitive like |
nodeType |
string | Array.<string> | Optional: NodeType(s) used to filter on the supplier persons |
nodeIdField |
string | Array.<string> | Optional: NodeIdField(s) used to filter on the supplier persons |
nodeIdValue |
string | Array.<string> | Optional: NodeIdValue(s) used to filter on the supplier persons |
personType |
string | Array.<string> | Optional: Type(s) used to filter on the supplier persons |
referenceApplicationName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the supplier persons |
referenceType |
string | Array.<string> | Optional: Reference type(s) used to filter on the supplier persons |
referenceId |
string | Array.<string> | Optional: Reference id(s) used to filter on the supplier persons |
attributeType |
string | Array.<string> | Optional: Type(s) used to filter on the attributes of the supplier |
attributeValue |
string | Array.<string> | Optional: Value(s) used to filter on the attributes of the supplier |
attributeRefAppName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the attributes of the supplier |
attributeRefType |
string | Array.<string> | Optional: Reference type(s) used to filter on the attributes of the supplier |
attributeRefId |
string | Array.<string> | Optional: Reference id(s) used to filter on the attributes of the supplier |
withAttributesLoaded |
boolean | Optional: If true, all the supplier attributes will be retrieved for each supplier |
withFullAttributesLoaded |
boolean | Optional: If true, the cross-referenced object of each attribute will be retrieved for each supplier |
withPersonsLoaded |
boolean | Optional: If true, all the supplier persons (with their attributes) will be retrieved for each supplier |
withSupplierLoaded |
boolean | Optional: If true, the linked supplier will be loaded into the supplier field of the supplier person |
asMap |
boolean | Optional: If true, the response will be a Map with supplierPersonId as keys and Supplier objects as values |
groupBySupplierId |
boolean | Optional: If true, groups the results using their supplierId. If asMap is true the response will be a map (with supplierId as key) of maps (with supplierPersonId as key), otherwise a map (with supplierId as key) of arrays |
sorting |
string | Optional: Specifies the sorting to use. Available sortings are defined in the SupplierPersonSorting common class. By default, the supplier persons will be sorted by creationDate DESC |
fromRecord |
number | Required (if allData is false): Offset of the first record to retrieve |
numRecords |
number | Required (if allData is false): Number of records to retrieve |
allData |
boolean | Optional (if fromRecord and numRecords are defined): All matching rows will be retrieved |
skipPrivateData |
boolean | Optional: if true, the returned supplier person will not have any sensible data |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-supplier-persons-by-supplierId
Returns:
Array with the retrieved supplier persons or map with supplierPersonIds as keys and SupplierPerson objects as values. If groupBySupplierId is true, the response will change according to the description of that parameter.
- Type
- Array.<SupplierPerson> | MapById.<SupplierPerson> | MapById.<MapById.<SupplierPerson>> | MapById.<Array.<SupplierPerson>>
(static) listSupplierProposalsByParent(parentSupplierTaskId, fromRecord, numRecords, allData, supplierId, token) → {PaginationWrapper.<SupplierTask>}
Retrieve list of proposals (modeled on DB by a SupplierTask record) associated to parent supplierTaskId
Parameters:
| Name | Type | Description |
|---|---|---|
parentSupplierTaskId |
string | Required: parent SupplierTask referenced by all proposals |
fromRecord |
number | Required (if allData is false): The number of the first record to load (exclusive - 0 to start from the first) |
numRecords |
number | Required (if allData is false): The number of records to load |
allData |
boolean | Optional: If true, all records will be retrieved |
supplierId |
string | Optional: (only Admin), it's possible to filter task list for a specific supplierId |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-supplier-proposals-by-parent/:fromRecord/:numRecords
Returns:
Items wrapped for pagination (with count)
- Type
- PaginationWrapper.<SupplierTask>
(static) listSuppliersByAny(supplierId, supplierType, supplierName, supplierDescription, referenceApplicationName, referenceType, referenceId, attributeType, attributeValue, attributeRefAppName, attributeRefType, attributeRefId, personName, personEmail, withAttributesLoaded, withFullAttributesLoaded, withPersonsLoaded, withOpenTasksLoaded, asMap, sorting, fromRecord, numRecords, allData, token) → {Array.<Supplier_new>|MapById.<Supplier_new>}
Retrieves the suppliers that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Array.<string> | Optional: Id(s) used to filter on the suppliers |
supplierType |
string | Array.<string> | Optional: Type(s) used to filter on the suppliers |
supplierName |
string | Optional: Text used to filter on the supplierName of the supplier, in case-insensitive like |
supplierDescription |
string | Optional: Text used to filter on the supplierDescription of the supplier, in case-insensitive like |
referenceApplicationName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the suppliers |
referenceType |
string | Array.<string> | Optional: Reference type(s) used to filter on the suppliers |
referenceId |
string | Array.<string> | Optional: Reference id(s) used to filter on the suppliers |
attributeType |
string | Array.<string> | Optional: Type(s) used to filter on the attributes of the supplier |
attributeValue |
string | Array.<string> | Optional: Value(s) used to filter on the attributes of the supplier |
attributeRefAppName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the attributes of the supplier |
attributeRefType |
string | Array.<string> | Optional: Reference type(s) used to filter on the attributes of the supplier |
attributeRefId |
string | Array.<string> | Optional: Reference id(s) used to filter on the attributes of the supplier |
personName |
string | Optional: Text used to filter on the forename/surname of the supplier persons, in case-insensitive like |
personEmail |
string | Optional: Text used to filter on the email of the supplier persons, in case-insensitive like |
withAttributesLoaded |
boolean | Optional: If true, all the supplier attributes will be retrieved for each supplier |
withFullAttributesLoaded |
boolean | Optional: If true, the cross-referenced object of each attribute will be retrieved for each supplier |
withPersonsLoaded |
boolean | Optional: If true, all the supplier persons (with their attributes) will be retrieved for each supplier |
withOpenTasksLoaded |
boolean | Optional: If true, all the open (and only the open) supplier tasks will be retrieved for each supplier |
asMap |
boolean | Optional: If true, the response will be a Map with supplierId as keys and Supplier objects as values |
sorting |
string | Optional: Specifies the sorting to use. Available sortings are defined in the SupplierSorting common class. By default, the suppliers will be sorted by creationDate DESC |
fromRecord |
number | Required (if allData is false): Offset of the first record to retrieve |
numRecords |
number | Required (if allData is false): Number of records to retrieve |
allData |
boolean | Optional (if fromRecord and numRecords are defined): All matching rows will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-suppliers-by-any/:fromRecord/:numRecords
Returns:
Array with the retrieved suppliers or map with supplierIds as keys and Supplier objects as values
- Type
- Array.<Supplier_new> | MapById.<Supplier_new>
(static) listSupplierTasksBySupplierid(supplierId, supplierTaskId, supplierPersonId, taskType, statusType, minStartDate, maxStartDate, minEndDate, maxEndDate, minExpectedEndDate, maxExpectedEndDate, referenceApplicationName, referenceType, referenceId, attributeType, attributeValue, attributeRefAppName, attributeRefType, attributeRefId, withSupplierLoaded, withAttributesLoaded, withFullAttributesLoaded, withStatusesLoaded, withClosedStatusesLoaded, searchClosedStatesToo, asMap, groupBySupplierId, sorting, fromRecord, numRecords, allData, token) → {Array.<SupplierTask>|MapById.<SupplierTask>|MapById.<MapById.<SupplierTask>>|MapById.<Array.<SupplierTask>>}
Retrieves the supplier tasks that match the specified parameters
Parameters:
| Name | Type | Description |
|---|---|---|
supplierId |
string | Array.<string> | Required: Supplier id(s) used to filter on the supplier tasks |
supplierTaskId |
string | Array.<string> | Optional: Supplier task id(s) used to filter on the supplier tasks |
supplierPersonId |
string | Array.<string> | Optional: Supplier person id(s) used to filter on the supplier tasks |
taskType |
string | Array.<string> | Optional: Task type(s) used to filter on the supplier tasks |
statusType |
string | Array.<string> | Optional: Task status type(s) used to filter on the supplier task statuses |
minStartDate |
Date | Optional: Minimum startDate of the tasks. Only the records with startDate greater than or equal to this parameter will be retrived |
maxStartDate |
Date | Optional: Maximum startDate of the tasks. Only the records with startDate less than or equal to this parameter will be retrived |
minEndDate |
Date | Optional: Minimum endDate of the tasks. Only the records with endDate greater than or equal to this parameter will be retrived |
maxEndDate |
Date | Optional: Maximum endDate of the tasks. Only the records with endDate less than or equal to this parameter will be retrived |
minExpectedEndDate |
Date | Optional: Minimum expectedEndDate of the tasks. Only the records with expectedEndDate greater than or equal to this parameter will be retrived |
maxExpectedEndDate |
Date | Optional: Maximum expectedEndDate of the tasks. Only the records with expectedEndDate less than or equal to this parameter will be retrived |
referenceApplicationName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the supplier tasks |
referenceType |
string | Array.<string> | Optional: Reference type(s) used to filter on the supplier tasks |
referenceId |
string | Array.<string> | Optional: Reference id(s) used to filter on the supplier tasks |
attributeType |
string | Array.<string> | Optional: Type(s) used to filter on the attributes of the supplier |
attributeValue |
string | Array.<string> | Optional: Value(s) used to filter on the attributes of the supplier |
attributeRefAppName |
string | Array.<string> | Optional: Reference application name(s) used to filter on the attributes of the supplier |
attributeRefType |
string | Array.<string> | Optional: Reference type(s) used to filter on the attributes of the supplier |
attributeRefId |
string | Array.<string> | Optional: Reference id(s) used to filter on the attributes of the supplier |
withSupplierLoaded |
boolean | Optional: If true, the linked supplier object will be retrieved |
withAttributesLoaded |
boolean | Optional: If true, all the supplier attributes will be retrieved for each supplier |
withFullAttributesLoaded |
boolean | Optional: If true, the cross-referenced object of each attribute will be retrieved for each supplier |
withStatusesLoaded |
boolean | Optional: If true, the open supplier tasks will be retrieved |
withClosedStatusesLoaded |
boolean | Optional: If true, the closed supplier tasks will be retrieved too |
searchClosedStatesToo |
boolean | Optional: If true, the filters will be applied on closed tasks too. By default, they apply only to tasks that are open |
asMap |
boolean | Optional: If true, the response will be a Map with supplierTaskId as keys and SupplierTask objects as values |
groupBySupplierId |
boolean | Optional: If true, groups the results using their supplierId. If asMap is true the response will be a map (with supplierId as key) of maps (with supplierTaskId as key), otherwise a map (with supplierId as key) of arrays |
sorting |
string | Optional: Specifies the sorting to use. Available sortings are defined in the SupplierTaskSorting common class. By default, the supplier tasks will be sorted by creationDate DESC |
fromRecord |
number | Required (if allData is false): Offset of the first record to retrieve |
numRecords |
number | Required (if allData is false): Number of records to retrieve |
allData |
boolean | Optional (if fromRecord and numRecords are defined): All matching rows will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-supplier-tasks-by-supplierId/:fromRecord/:numRecords
Returns:
Array with the retrieved supplier tasks or map with supplierTaskId as keys and SupplierTaks objects as values. If groupBySupplierId is true, the response will change according to the description of that parameter.
- Type
- Array.<SupplierTask> | MapById.<SupplierTask> | MapById.<MapById.<SupplierTask>> | MapById.<Array.<SupplierTask>>
(static) negateCourseEditionForSupplier(editionId, token) → {Item}
Negate a course edition by Supplier side (This service version is used by a Supplier Account in Supplier Portal)
Parameters:
| Name | Type | Description |
|---|---|---|
editionId |
string | Required: the id of the edition to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/negate-course-edition-for-supplier
Returns:
The updated edition
- Type
- Item
(static) refuseProposalRequest(supplierTaskId, notifySupplier, token) → {SupplierTask}
Refuses the proposal sent by the supplier. Optionally, an email with a default template will be sent to the supplier, notifying the action.
Parameters:
| Name | Type | Description |
|---|---|---|
supplierTaskId |
Array.<string> | Required: The id of the proposal request to revoke (that is saved in the supplier's tasks) |
notifySupplier |
boolean | Optional: If true, an email will be sent to the supplier, notifying the action |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/refuse-proposal-request
Returns:
The refused proposal request
- Type
- SupplierTask
(static) requestProposalToSupplier(initiativeId, courseModuleId, supplierId, mailSenderId, mailCC, mailBCC, signatureId, messageSubject, messageBody, expectedCloseDate, token) → {SupplierTask}
Requests a proposal (for faculty members) or an estimation proposal (for external suppliers) to a supplier. An email with the specified body, and with the selected signature appended to the end, will be sent to the supplier.
Parameters:
| Name | Type | Description |
|---|---|---|
initiativeId |
string | Required: Id of the initiative to which the proposal will be assigned. The initiave must be a stage or a path. |
courseModuleId |
string | Optional: Id of the course module to which the proposal will be assigned. If it isn't present and the initiative isn't a path, a new course module will be created. |
supplierId |
string | Required: Id of supplier that will receive the proposal request |
mailSenderId |
string | Required: Id of the mail sender to use to send the email |
mailCC |
string | Optional: Email address to add in CC to the email that will be sent |
mailBCC |
string | Optional: Email address to add in BCC to the email that will be sent |
signatureId |
string | Required: Id of the signature's text template to append to the email body |
messageSubject |
string | Required: Email's subject |
messageBody |
string | Required: Email's body |
expectedCloseDate |
Date | Optional: Expected close date of the task |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/request-proposal-to-supplier
Returns:
The newly created proposal request
- Type
- SupplierTask
(static) revokeProposalRequest(supplierTaskId, token) → {SupplierTask}
Revokes the proposal request previously sent to a supplier. An email with a default template will be sent to the supplier, notifying the action.
Parameters:
| Name | Type | Description |
|---|---|---|
supplierTaskId |
string | Required: The id of the proposal request to revoke (that is saved in the supplier's tasks) |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/revoke-proposal-request
Returns:
The revoked proposal request
- Type
- SupplierTask
(static) updateFundingSupplierTask(supplierTaskId, token) → {SupplierTask}
Confirms a supplier's proposal. The task status will be updated, showing that the proposal is waiting to be evaluated by the client. An email will be sent to notify the action, and the recipients will be retrived from:
- in case of NEED_FUNDING_CHECK attribute on the task, from the supplier persons with FUNDING_CHECK role of the active suppliers with FUNDING_SUPPLIER type (persons that manage the funds)
- otherwise, from the supplier persons with BUYING role of the active suppliers with INTERNAL_BUYING_SUPPLIER type (persons that manage the RDAs/ODAs)
Parameters:
| Name | Type | Description |
|---|---|---|
supplierTaskId |
string | Required: The id of the task of the funding supplier to complete |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/update-funding-supplier-task
Returns:
The confirmed proposal (supplier task)
- Type
- SupplierTask
(static) updateSupplier(supplier, returnFullAttributes, token) → {Supplier}
Updates the given supplier, its tenants and its attributes usign the values of the "supplier" param. A copy of the current state of the entity will be added to the history.
Parameters:
| Name | Type | Description |
|---|---|---|
supplier |
Supplier | Required: Modified supplier object (with tenants and attributes loaded) |
returnFullAttributes |
boolean | Optional: If true, all cross-referenced objects of the attributes will be loaded too |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/update-supplier
Returns:
The updated supplier
- Type
- Supplier
(static) updateSupplierPerson(supplierPerson, token) → {SupplierPerson}
Updates the given supplier person and its attributes.
Parameters:
| Name | Type | Description |
|---|---|---|
supplierPerson |
SupplierPerson | Required: Supplier person object to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/update-supplier-person
Returns:
The updated supplier person
- Type
- SupplierPerson