Integrate Budget Items with an External Data Source

To integrate budget items with an external data source:

  1. Create or generate a JSON object containing the following fields:
    • sourceId: The unique identifier of budget item data in an external source, such as an ERP system.
    • costSheetItemId: The unique identifier of a cost sheet item this budget item will be associated with.
    • projectBudgetId: The unique identifier of a project budget this budget item will be associated with.
    • itemName: The name of the budget item.
  2. Send a request to the API using the following information:
    • Endpoint: https://localhost:7001/api/restapi/project/budgetItem/syncBatch
    • Operation: POST
    • Example Request Body:
    [ 
          	{ 
                  "sourceId": 1, 
                  "costSheetItemId": 36207, 
                  "projectBudgetId": 40103 
                  "budgetItemCost": { 
                      "originalCost": 300, 
                      "currentCost": 700, 
                      "originalCostProject": 300, 
                      "currentCostProject": 700 
                  } 
              }, 
              { 
                  "sourceId": 2, 
                  "costSheetItemId": 36207, 
                  "projectBudgetId": 40103, 
                  "itemName": "Example Budget Item Two", 
                  "budgetItemCost": { 
                      "originalCost": 300, 
                      "currentCost": 300, 
                      "originalCostProject": 300, 
                      "currentCostProject": 300 
                  } 
              } 
          ]
    		
  3. The API should return a response similar to the following:
    • Response Code: 207
    • Example Response Body:
    [ 
              { 
                  "statusCode": 201, 
                  "primaryKeyName": "budgetItemId", 
                  "primaryKeyValue": 8002, 
                  "sourceId": "1" 
              }, 
              { 
                  "statusCode": 201, 
                  "primaryKeyName": "budgetItemId", 
                  "primaryKeyValue": 8003, 
                  "sourceId": "2" 
              } 
          ]