Changing Event Times with the Event Management API

This procedure describes how to use the Event Management API to change the event preview period, open time (when the event opens for responses), and close time (when the event closes for responses).

Prerequisites

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. If the event is in the draft state, use the PUT /events/{eventId} endpoint.

    Specify XSD DateTime values for openDate and closeDate to change the event open and close times.

    For example:

    "openDate": "2022-01-01T00:00:00.000+0000",
    "closeDate": "2022-01-31T00:00:00.000+0000"
  3. If the event is published but not in the pending selection, or cancel state, use the POST /jobs endpoint to trigger a job that changes event times. You can also reset the bidding close time when reopening an event.

    In the request body, specify "resourceType": "EVENT" and "actionName": "EXTEND_TIMING".

    Specify time values and options in the actionBody element of the request body.

    The job changes event times for the current event state.
    • If the event is open for bidding, the job changes the closing time for bidding.

    • If the event is in the preview state and accepts prebids, the job changes the closing time for the preview period. You can also optionally change the bidding start time by specifying "adjustStartTime": true in the actionBody.

    In the actionBody, you can specify a new close time relative to the existing close time, or a fixed (absolute) time.

    Use the following data model for the request body:

    {
        "resourceType": "EVENT",
        "actionName": "{EXTEND_TIMING | REDUCE_TIMING | REOPEN}",
        "ids": {
            "eventId": {eventId}
        },
        "actionBody": {
            "isFixed": {true | false},
            "unit": {unitValue},
            "length": {time},
            "adjustStartTime": {true | false} 
        }
    }

    To change the closing time relative to the existing close time, specify "isFixed": false and unit and length field values as follows:

    • unit: Unit of time. Valid values for unit are:

      • 0: Minutes

      • 1: Hours

      • 2: Days

    • length: Length of time to extend the close time by, in units.

    • adjustStartTime: Optional field that is evaluated only if jobAction is EXTEND_TIMING or REDUCE_TIMING and the event is in the preview period with prebidding allowed. If true, the bidding close time is also extended or reduced in addition to the preview period. This is useful if you're extending the preview time and also need to move the bidding start time so that the bidding start time is after the end of the preview period.

    In the following example, the event is in the preview period. The request extends both the event preview closing time and the bidding start time by 30 days:

    {
        "resourceType": "EVENT",
        "actionName": "EXTEND_TIMING",
        "ids": {
            "eventId": "Doc3500004"
        },
        "actionBody": {
            "isFixed": false,
            "unit": 2,
            "length": 30,
            "adjustStartTime": true 
        }
    }

    To specify a fixed or absolute close time, include the following fields in the actionBody:

    • "isFixed": true

    • plannedEndDate: Close date, in XSD DateTime format.

    • adjustStartTime: Optional.

    In the following example, the event is open for bidding. The request sets the bidding close date to January 31, 2023 at midnight (GMT):
    {
        "resourceType": "EVENT",
        "actionName": "EXTEND_TIMING",
        "ids": {
            "eventId": "Doc3500004"
        },
        "actionBody": {
            "isFixed": "true",
            "plannedEndDate": "2023-01-31T00:00:00.000+0000"
        }
    }