About Adding and Editing Event Items with the Event Management API

You can use the Event Management API to add or edit event items, including lots, line items, questions, and requirements.

To include items when creating an event (using the POST /events endpoint) or adding new items to an event (using the POST /events/{eventId}/items endpoint), you include an items array of Item objects in the Event inside the request body. Each Item must include the following fields at a minimum:
  • title: name of the item

  • itemType: type of item, such as 4, LineItemType). For lots, sections, and KPIs, you must also specify an itemSubType. Refer to Item Fields for the valid values and meanings.

  • terms array with at least one term. In most cases, you can use a term already defined in the template or event, or you can define a new term, as described in About Adding and Editing Event Items with the Event Management API.

For additional fields and values required when adding questions, prerequisites, requirements, and attachments, refer to About Adding Questions, Prerequisites, Requirements, and Attachments with the Event Management API.

To edit an item in an event, use the PUT /events/{eventId}/items endpoint. The body must contain an array of Item objects. Each Item must include the following fields at a minimum:
  • itemId: item ID. You can obtain itemId values from POST /events/{eventId}/items or GET /events/{eventId} responses.

    You can optionally specify the query filter $expand for the GET /events/{eventId} endpoint to retrieve the event information in addition to the header information. You can specify multiple values, delimited by commas.

    Valid values: all, items, supplierInvitations, teams, owners, customFields, none

    Default: none

  • terms: array with at least 1 term.

The following example adds the item My item and specifies values for Price and Quantity terms. The Price term includes historicValueProperty and reserverValueProperty fields set to 1 to indicate that Price includes an optional historic value (historyValue) and optional reserve value (reserveValue):
                [ {
                    "title": "My item",
                    "itemType": 4,            
                    "terms": [ {
                      "title": "Price",
                      "historicValueProperty": 1,
                      "reserverValueProperty": 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"
                      } } } ] } ] }    
                    

Content Item Hierarchies and Order

Sourcing creates every event with a Totals item. The Totals item is the parent item for all top-level items in the content hierarchy and contains any rolled-up term values for the event. By default, the Event Management API adds a new item after the last item at the top level of an event (as a child of the Totals item).

When adding a new item, you can specify the following fields to add the item in a specific location relative to existing objects:
  • parentItem to add the new item inside the specified item or section, as a child of the existing item

  • afterItem to add the new item after the specified item, as a peer to the existing item

In the following example, the event contains a section with the itemId 1236666, and the request adds a new line item after the last child item inside the section:
[ {
        "title": "my child item",
        "parentItem": "1236666",
        "itemType": 4,
...

You can also add a hierarchy of items by including a children array in an item, where the children array contains child Item objects.

Item Fields

Item fields specify the item type, if a response is required, and other item properties.

The following table lists commonly used Item fields for setting item properties. The fields available for an item and the default values depend on the item definitions in the template used to create the event. For a complete list of Item fields, refer to the Event Management API specification available from the SAP Ariba developer portal.

To Set This Item Property...

Use This Field

Item name

title. For questions, specify the prompt (display text) using a title field in the terms.

Type of item

itemType; for lots and section items, use the additional itemSubType field.

Valid values for itemType:
  • 0:UndefinedItemType (reserved)
  • 1: RootSectionItemType (reserved; used for the top-level Totals item that sourcing creates for the event)
  • 2:SectionItemType (section)
  • 3:QuestionItemType (question or requirement)
  • 4:LineItemType (line item)
  • 5:LotItemType (lot)
  • 6:CostItemType (item for total cost)
  • 7:KPIItemType (key performance indicator item in a survey)
  • 8:CertificateSectionItemType (certificate section in a survey)
Valid values for itemSubType:
  • 1: ItemSectionSubType
  • 0: None
  • 16: BiddableLotSubType (item lot; bid at item level, compete at lot level)
  • 17: BasketLotSubType (basket lot with items; bid at lot level, compete at lot level)
  • 18: BasketLotNoItemSubType (basket lot with no items; bid and compete at lot level)
  • 19: ItemLotSubType
  • 20: BundleLotSubType (bundle lot; bid discounted value at item level, compete at lot level)
  • 26: KPIGroupSection
  • 24: KPISourceReport
  • 25: KPISourceSurvey
  • 22: PermutedItemSubType
  • 23: PermutedSubItemSubType
  • 27: TableSection
  • 28: RepeatableSection
  • 29: RepeatableSectionParent
  • 30: DistributionItemSubType

Specify if participants must submit a response

isBidRequired

Order or position relative to the other content items

parentItem and afterItem. If neither field is specified, the web service adds a new item after the last top-level item in the event.

Child items

children (an array of child items)

Terms

terms. Refer to Term Fields and About Defining New Terms or Formulas with the Event Management API for additional information.

Competitive term for the item

competitiveTermFieldId (you can only set this if the competitive term is delegated in the template, indicated by a true value for isCompetitiveTermEditable )

Terms that are rolled up (summed up) and listed at the event or section level

rollUpTerms

Specify if and when participants can view the item

participantVisibility. Valid values:

  • 0: Yes, always visible to participants
  • 1: No, not visible to participants
  • 2: Yes, visible to participants after access gate is cleared

Specify that a question is a prerequisite and if the event owner must review the supplier's response

prerequisiteType and prerequisiteReviewType. Ignored if itemType is not 3 (QuestionItemType).

Valid values for prerequisiteType:
  • 0: not a prerequisite
  • 1: prerequisite with no restriction
  • 2: prerequisite with gate on event content
  • 3: prerequisite required to submit responses
Valid values for prerequisiteReviewType:
  • 0: Event owner does not need to review the response to satisfy the prerequisite
  • 1: Event owner must review the response to satisfy the prerequisite

Specify that a question is a requirement

isRequirement

Suppliers invited to bid on (submit responses for) the item

invitedSuppliers.

If this array is empty, all suppliers invited to the event are invited for this item. For additional information, refer to About Adding (Inviting) Suppliers to Events with the Event Management API.

Specify the commodity code for the item

commodity

The item inherits the commodity code for the event if the following conditions are met:
  • The query parameter inheritCommodityAndRegion is true (the default value)

  • No commodity value is specified at the item level

  • Only one commodity code is set for the event (the event commodities array contains only one entry)

Specify the region for the item

region

The item inherits the region for the event if the following conditions are met:
  • The query parameter inheritCommodityAndRegion is true (the default value)

  • No region value is specified at the item level

  • Only one region is set for the event (the event regions array contains only one entry)

Specify currency and currency conversion rate set for the item (for multiple-currency events)

currency and currencyConversionRateSet