Skip to main content

Welcome to our Dev Docs!

Component subscriptions

usecase6_1.PNG

Endpoint can be called by:

GET /contractChanges/{id}?includeComponentSubscriptions=All&includeContract=false

Parameter values for the includeComponentSubscriptions:

Parameter value

Description

All

Contains unchanged and changed component subscriptions

Changed

Contains only changed component subscriptions

None

(Default) Contains no component subscriptions

{
    "Id": "645b79cbd112e6cdaf20ab1a",
    "Type": "Timebased",
    "Timestamp": "2023-05-10T11:02:33.5350000Z",
    "ContractId": "645b60b7d112e6cdaf20a9f9",
    "ComponentSubscriptions": [
        {
            "Id": "645b7940d112e6cdaf20ab01",
            "Before": {
                "Id": "645b7940d112e6cdaf20ab01",
                "ComponentId": "63e62a0d9864a09b6e4b204b",
                "Quantity": 1,
                "StartDate": "2023-05-10T11:00:03.0000000Z",
                "Status": "Active"
            },
            "After": {
                "Id": "645b7940d112e6cdaf20ab01",
                "ComponentId": "63e62a0d9864a09b6e4b204b",
                "Quantity": 1,
                "StartDate": "2023-05-10T11:00:03.0000000Z",
                "Status": "Ended",
                "EndDate": "2023-05-10T11:02:33.5350000Z"
            }
        },
        {
            "Id": "645b795fd112e6cdaf20ab08",
            "Before": {
                "Id": "645b795fd112e6cdaf20ab08",
                "ComponentId": "63e62a0d9864a09b6e4b204b",
                "Quantity": 2,
                "StartDate": "2023-06-10T09:26:55.0170000Z",
                "Status": "Inactive"
            },
            "After": {
                "Id": "645b795fd112e6cdaf20ab08",
                "ComponentId": "63e62a0d9864a09b6e4b204b",
                "Quantity": 2,
                "StartDate": "2023-06-10T09:26:55.0170000Z",
                "Status": "Inactive"
            }
        }
    ]
}
usecase6_2.PNG
usecase6_3.PNG
usecase6_4.PNG
usecase6_5.PNG
Response object contains:
  • A complete list of component subscriptions as a list with Before and After states for each object,

  • Detection of active component subscriptions has to be done evaluating around the Timestamp of the contract change compared to the StartDate or EndDate of the ComponentSubscription.