You can include the following optional query parameters:
-
$expand: Specifies the information for the created response returned in the response in addition to header information. You can specify multiple values, delimited by commas.
Valid values: all, items, owners, supplierInvitations, teams, none.
Default: all.
-
inheritCommodityAndRegion: If true and the event has single values for the commodity or region (the commodities or regions array contains only one entry), any items in the request body that do not have commodity or region values specified inherit the event values for the commodity or region.
-
inheritTerms: If true, missing terms (terms for defined for items or lots in the event template but not included in the request) are automatically inherited from the event template.
Default: false.
-
removeEmptyOwnerTerms: If true and inheritTerms is true, terms from the template that require an owner response but which do not have a response are removed from (not added to) the event item. This parameter is ignored if inheritTerms is false.
Default: false.
The body of the request contains a
createEvent object. At a minimum, the
createEvent object must contain the following elements:
-
title: The title (name) of the event.
-
templateDocumentInternalId: The internal ID of the event template.
If the templateDocumentInternalId refers to a placeholder event within a full project, the API transitions the event to the draft state for editing, instead of creating a new event. To create a new event, specify a regular (non-placeholder) template as the templateDocumentInternalId.
-
eventTypeName: Must be RFP.
-
isTest: Specifies if this is a test project (Test Project header field).
For information about the Test Project header field and other project header fields, refer to Sourcing project headers.
Example:
POST {{runtime_URL}}/events?user=myUser&passwordAdapter=PasswordAdapter1&realm=mySite
POST /events request body with the minimum required information:
{
"title": "simple API event",
"templateDocumentInternalId": "WS3333",
"eventTypeName": "RFP",
"isTest": "false",
}
You can also specify header field values (such as currency), content (such as lots, line items or questions), and suppliers in the request body.
The following example is a
POST /events request body with:
-
Values for currency, baseLanguage, and commodities header fields, and a value for the custom header field My Text Field. The values in the request overwrite any values specified in the template.
-
2 suppliers, specified using their assigned system IDs (sid808 and ACM_1111). No supplier contacts (users) are specified, so all contacts for the suppliers are invited.
-
A line item (My item; "itemType": 4 specifies that it is a line item). This line item is added to any content (such as question or requirement items) inherited from the template. This line item includes Price and Quantityterms. The Price term contains a value (initial value and bid value). The Price term also contains optional historicValue (historic value, used to calculate savings), and reserveValue (value which you consider the start of reasonable prices), as indicated by "historicValueProperty": 1 and "reserveValueProperty": 1.
{
"title": "API event",
"description": "An event with 1 supplier and 1 item",
"templateDocumentInternalId": "WS3333",
"isTest": "false",
"eventTypeName": "RFP",
"currency": "USD",
"baseLanguage": "en",
"commodities": [ {
"uniqueName": "47",
"domain": "unspsc" } ],
"sourcingProjectCustomFields": [
{
"fieldId": "cus_MyTextField",
"fieldDataType": "textValue",
"textValue": [
"hello, world"
],
"customField": true
}
],
"supplierInvitations": [
{
"organization": {
"systemID": "sid808"
}
}
{
"organization": {
"systemID": "ACM_1111"
}
}
],
"items": [
{
"title": "My item",
"itemType": 4,
"terms": [ {
"title": "Price",
"historicValueProperty": 1,
"reserveValueProperty": 1,
"value": {
"moneyValue": {
"amount": 100.00,
"currency": "USD"
}
},
"historyValue": {
"moneyValue": {
"amount": 100.00,
"currency": "USD"
}
}
"reserveValue": {
"moneyValue": {
"amount": 100.00,
"currency": "USD"
}
}
},
{
"title": "Quantity",
"value": {
"quantityValue": {
"amount": 2000.00,
"unitOfMeasureCode": "EA"
} } } ] } ] }
When adding items, you can also specify new term definitions to add terms that aren't defined in the event template. Refer to About Defining New Terms or Formulas with the Event Management API.