POST /api/MasterAgreement/Post
This endpoint will create a new Master Agreement if the ID is null or zero, or update an existing Master Agreement if a valid ID is provided. For creation, do not include an ID or set the ID to zero in the request body. For updating, include the existing Master Agreement ID and the updated data in the request body. Passing empty name will automatically create a name for the Master Agreement based on the rule {Counterparty}_{Commodity}_{MA Type}_{Valid From}_{Valid To} Custom Fields In order to add or update custom fields, include the custom field ID, Name, Type and Value in the property customFieldValues of the request body.
curl -X POST "/api/MasterAgreement/Post" \
-H "Authorization: $ATLAS_ETRM_API_DOCUMENTATION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": [
{
"id": 0,
"name": "Sample Master Agreement",
"counterPartyId": 1,
"masterAgreementStatusId": null,
"status": null,
"validFrom": "2026-10-23T11:41:54.9722321+03:00",
"validTo": "2027-10-23T11:41:54.972234+03:00",
"memo": null,
"externalId": null,
"masterAgreementTypeIds": null,
"customFieldValues": []
}
]
}'Authorization
AuthorizationstringheaderrequiredJWT Authorization header using the Bearer scheme. Enter your token including the 'Bearer ' prefix (e.g. 'Bearer eyJ...').
Body
dataEtrmApiGateway.DTOs.BackOffice.MasterAgreementCreationDto[] | null
Response
A list of Master Agreements.
successbooleanrecordCountinteger<int32>dataEtrmApiGateway.DTOs.BackOffice.MasterAgreementDto[] | null
{
"success": true,
"recordCount": 0,
"data": [
{
"id": 0,
"name": "string",
"counterPartyId": 0,
"counterPartyName": "string",
"masterAgreementStatusId": 0,
"statusName": "string",
"status": 1,
"validFrom": "2026-01-15T09:30:00Z",
"validTo": "2026-01-15T09:30:00Z",
"memo": "string",
"externalId": "string",
"createdAt": "2026-01-15T09:30:00Z",
"modifiedAt": "2026-01-15T09:30:00Z",
"numberOfLinkedDocuments": 0,
"masterAgreementTypeIds": [
0
],
"customFieldValues": [
{
"customFieldId": 0,
"customFieldName": "string",
"customFieldType": 1,
"validFrom": "2026-01-15T09:30:00Z",
"value": "string"
}
]
}
]
}