API referenceDeal
POST /api/Deal/Post
This endpoint will create a new Deal if the ID is null or zero, or update an existing Deal if a valid ID is provided. Passing empty name will automatically create a name for the Deal based on the rule {Company}_{Commodity}_{Product Period}_{ProfileType}_{Transaction Date}_Deal{ID}
POST
/api/Deal/Postcurl -X POST "/api/Deal/Post" \
-H "Authorization: $ATLAS_ETRM_API_DOCUMENTATION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": [
{
"id": 1,
"externalId": null,
"name": "Deal 1",
"dealClass": 0,
"commodity": 0,
"dealDirection": 0,
"dealStatus": null,
"dealDelivery": 0,
"timeZoneInfo": 0,
"companyId": null,
"businessUnitId": null,
"bookId": null,
"folderId": null,
"portfolioId": null,
"counterPartyId": 0,
"validFrom": "0001-01-01T00:00:00",
"validTo": "0001-01-01T00:00:00",
"profiles": null,
"totalQuantity": null,
"priceType": 0,
"currency": null,
"legs1": null,
"mtmDataseriesId": null,
"transactionTime": null,
"exchangeId": null,
"traderId": null,
"masterAgreementId": null,
"includedInSettlement": false,
"calendar": null,
"ibanId": null,
"vatLevel": null,
"deliveryDate": null,
"consumptionStart": null,
"consumptionEnd": null,
"productionEntityExternalId": null,
"consumptionEntityExternalId": null,
"technology": null,
"country": null,
"counterPartyRegistryAccount": null,
"amount": null,
"dealClusterId": null,
"dealTemplateId": null,
"linkedDeals": null,
"memo": null,
"memo2": null
}
]
}'Authorization
AuthorizationstringheaderrequiredJWT Authorization header using the Bearer scheme. Enter your token including the 'Bearer ' prefix (e.g. 'Bearer eyJ...').
Body
application/json
dataEtrmApiGateway.DTOs.PortfolioManagement.DealApiRequestDto[] | null
Response
application/json
A list of Deals.
successbooleanerrorCodestring | nullerrorMessagestring | nullwarningMessagestring | nullinfoMessagestring | nullrecordCountinteger<int32>dataEtrmApiGateway.DTOs.PortfolioManagement.DealApiRequestDto
{
"success": true,
"errorCode": "string",
"errorMessage": "string",
"warningMessage": "string",
"infoMessage": "string",
"recordCount": 0,
"data": {
"id": 0,
"externalId": "string",
"name": "string",
"dealClass": 1,
"commodity": 0,
"dealDirection": 1,
"dealStatus": 10,
"dealDelivery": 1,
"timeZoneInfo": 0,
"companyId": 0,
"businessUnitId": 0,
"bookId": 0,
"folderId": 0,
"portfolioId": 0,
"counterPartyId": 0,
"validFrom": "2026-01-15T09:30:00Z",
"validTo": "2026-01-15T09:30:00Z",
"profiles": [
{
"id": 0,
"timeseriesId": 0,
"type": 1,
"quantity": 0,
"uom": 1,
"granularity": 1
}
],
"totalQuantity": 0,
"priceType": 0,
"currency": 1,
"legs1": [
{
"id": 0,
"dealUpfront": 0,
"dealUpfront2": 0,
"dealMultiplier": 0,
"priceDataseriesId": 0,
"validFrom": "2026-01-15T09:30:00Z"
}
],
"mtmDataseriesId": 0,
"transactionTime": "2026-01-15T09:30:00Z",
"exchangeId": 0,
"traderId": 0,
"masterAgreementId": 0,
"includedInSettlement": true,
"calendar": 1,
"ibanId": 0,
"vatLevel": 0,
"deliveryDate": "2026-01-15T09:30:00Z",
"consumptionStart": "2026-01-15T09:30:00Z",
"consumptionEnd": "2026-01-15T09:30:00Z",
"productionEntityExternalId": "string",
"consumptionEntityExternalId": "string",
"technology": 0,
"country": 1,
"counterPartyRegistryAccount": "string",
"amount": 0,
"dealClusterId": 0,
"dealTemplateId": 0,
"linkedDeals": [
0
],
"memo": "string",
"memo2": "string"
}
}