Editing an Event with the Event Management API

This procedure describes how to use the Event Management API to edit header fields and edit or add items or suppliers to an RFP event created inside a full project and created as a quick (single-event) project.

Prerequisites

Context

Procedure

  1. Use one of the following methods to obtain the ID of the event you want to work with.
    • If the event was created using the POST /events endpoint, use the internalId in the response as the event ID.

    • If the event was created from a sourcing request received from an external system, use the GET /events endpoint and specify the RFQ ID sent by the external system (the RequestID sent in the cXML QuoteRequest) as the externalSystemCorrelationId query parameter value. Use the internalId in the response as the event ID.

    • View the event ID in the user interface. The classic SAP Ariba Sourcing user interface shows the event ID below the Overview tab, in the ID field. The guided sourcing user interface shows the event ID in the upper left corner of the event page, below the event name.

  2. Use the GET /events endpoint to verify that the event is in the Draft state (eventStatus is Draft). If the event isn't in the Draft state, use the POST /jobs endpoint with "resourceType": "EVENT" and "actionName": "EDIT" in the body to change the state.
    Example:
    POST {{runtime_URL}}/jobs?user=myUser&passwordAdapter=PasswordAdapter1&realm=mySite

    Request body:

    {
        "resourceType": "EVENT",
        "actionName": "EDIT",
        "ids": {
            "eventId": "Doc3500004"
        }
    }						
    		
  3. To change event header field values, use the PUT /events/{eventId} endpoint.

    Any header values you specify overwrite existing values. If you want to change only the event title, specify updateTitleOnly=true as a query parameter and value.

    For information about setting custom header field values, refer to About Setting Custom Fields with the Event Management API.

  4. To add (invite) or remove suppliers, use the following endpoints.
    • To add suppliers to an event: POST /events/{eventId}/supplierInvitations.

    • To get invitationId values for suppliers in an event: GET /events/{eventId}/supplierInvitations. Each supplier user invited to an event is identified by a unique invitationId; you use the invitationId update information about the supplier, or remove suppliers from an event or from item in the event.

      Note that by default, all suppliers invited to an event are invited to bid on all items in the event.

    • To update information about a supplier user in an event: PUT /events/{eventId}/supplierInvitations/{invitationId}.

    • To delete (uninvite) suppliers from an event: DELETE /events/{eventId}/supplierInvitations/{invitationId}.

    • To add multiple suppliers to multiple items in an event: POST /events/{eventId}/items/supplierInvitations.

    For additional information, refer to About Adding (Inviting) Suppliers to Events with the Event Management API.

  5. To modify content (lots and line items, questions, prerequisites, and requirements), use the following endpoints.
    • To add items to an event: POST /events/{eventId}/items.

    • To get itemId values for items in an event: GET /events/{eventId}/items. You must specify itemId values when updating or deleting items.

    • To update items in an event: PUT /events/{eventId}/items.

    • To delete items in an event: DELETE /events/{eventId}/items.

    For additional information, refer to About Adding and Editing Event Items with the Event Management API and About Defining New Terms or Formulas with the Event Management API.

  6. After you complete your edits, create a job request to publish or republish the event.
    Use the POST /jobs endpoint with "resourceType": "EVENT" and "actionName": "PUBLISH" in the body.
    If you're republishing a previously published event, add an actionBody to the request body with an updateChoice to specify options for updating the event and optional message to send to suppliers. Valid values for updateChoice are:
    • 0: Keep responses and send email to participants

    • 1: Keep responses, but do not send email (this is the default)

    • 2: Do not keep responses, and send email

    • 3: Do not keep responses, and do not send email

    {
    "resourceType": "EVENT",
    "actionName": "PUBLISH",
    	"ids": {
    		"eventId": "Doc3500004"
    	}
    "actionBody" : {
       "updateChoice": 0,
       "message": {
          "this is an optional message"
          }
        }
    }