AMCS Group CostAgreement API

The CostAgreement API from AMCS Group — 3 operation(s) for costagreement.

Specifications

OpenAPI Specification

amcs-group-costagreement-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Core AccessGroup CostAgreement API
  version: core
tags:
- name: CostAgreement
paths:
  /productCatalogue/costAgreements/changes:
    get:
      tags:
      - CostAgreement
      summary: Retrieve changes
      description: "| Property| Description|\r\n| ----------------------------------------------------------|-------------------------------------------------------------------------------------- |\r\n| GUID| The GUID associated to the cost agreement.|\r\n| Description| The description associated to the cost agreement.|        \r\n| IsDefault| Is default cost agreement.|    \r\n| AgreementNumber| The agreement number associated to the cost agreement.|    \r\n| CostCentreListItem| The GUID and description of the cost centre associated to the cost agreement.|    \r\n| CompanyOutletListItems| The list of company outlets associated to the cost agreement.|    \r\n| CompanyOutletListItems[0].CompanyOutletListItem| The GUID and description of the company outlet associated to the cost agreement.|    \r\n| RelatedSupplierGuid| Used to filter on the related supplier GUID.|    \r\n| RelatedSupplierSiteGuid| Used to filter on the related supplier site GUID.|\r\n| RelatedSupplierSiteGuids| The list of supplier site GUIDs associated to the cost agreement.|    \r\n| RelatedLocationSourceGuid| Used to filter on the source location associated to the cost.|\r\n| RelatedLocationDestinationGuid| Used to filter on the destination location associated to the cost.|\r\n| RelatedCostGuidFilter| Used to filter on the related cost GUID.|\r\n| RelatedSupplierSiteGuids[0].RelatedSupplierSiteGuid| The GUID of the supplier site associated to the cost agreement.|\r\n| EndDate| The end date associated to the cost agreement in ISO format (YYYY-MM-DD).|    \r\n| EndReasonListItem| The GUID and description of the end reason associated to the cost agreement.|    \r\n| IsAutoRenewal| Is the cost agreement has auto renewal enabled.|    \r\n| IsForAllSites| Is the cost agreement for all sites.|    \r\n| PrimaryServiceListItem| The GUID and description of the end reason associated to the cost agreement.|    \r\n| ReviewDate| The review date associated to the cost agreement in ISO format (YYYY-MM-DD).|    \r\n| StartDate| The start date associated to the cost agreement in ISO format (YYYY-MM-DD).|    \r\n| Costs| The list of costs associated to the cost agreement.|\r\n| Costs[0].GUID| The GUID associated to the cost.|\r\n| Costs[0].IsDeleted| Whether the cost is deleted.|\r\n| Costs[0].Description| The description associated to the cost.|\r\n| Costs[0].DefaultActionListItem| The GUID and description of the default action associated to the cost.|\r\n| Costs[0].ServiceFrequencyListItem| The GUID and description of the service frequency associated to the cost.|\r\n| Costs[0].ContainerTypeListItem| The GUID and description of the container type associated to the cost.|\r\n| Costs[0].RentTermListItem| The GUID and description of the rent term associated to the cost.|\r\n| Costs[0].MaterialListItem| The GUID and description of the material associated to the cost.|\r\n| Costs[0].RelatedLocationSourceGuid| The GUID related to the source location associated to the cost.|\r\n| Costs[0].RelatedLocationDestinationGuid| The GUID related to the destination location associated to the cost.|\r\n| Costs[0].EffectiveFrom| The date effective from date associated to the cost.|\r\n| Costs[0].Amount| The amount object associated to the cost.|\r\n| Costs[0].Amount.Cost| The cost value associated to the amount.|\r\n| Costs[0].Amount.MaximumCost| The maximum cost associated to the amount.|\r\n| Costs[0].Amount.MinimumCost| The minimum cost associated to the amount.|\r\n| Costs[0].Amount.Allowance| The allowance associated to the amount.|\r\n| Costs[0].Amount.VATListItem| The GUID and description of the VAT associated to the amount.|\r\n| Costs[0].Amount.TaxTemplateCollectionListItem| The GUID and description of the tax template collection associated to the amount.|\r\n| RelatedServiceAgreements| The list of service agreements related to the cost agreement.|\r\n| RelatedServiceAgreements[0].Guid| The Guid associated to the service agreement cost agreement.|\r\n| RelatedServiceAgreements[0].IsDeleted| Whether the service agreement cost agreement is deleted.|\r\n| RelatedServiceAgreements[0].RelatedServiceAgreementGuid| The Guid of the service agreement associated to the cost agreement.|\r\n| RelatedServiceAgreementGuidFilter    | Used to filter on the related service agreement GUID.|\r\n"
      operationId: CostAgreement_GetChanges
      parameters:
      - name: since
        in: query
        schema:
          type: string
      - name: cursor
        in: query
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResourceChanges[ApiIntegratorCostAgreementResource]'
  /productCatalogue/costAgreements/{guid}:
    get:
      tags:
      - CostAgreement
      summary: Find with GUID
      description: "| Property| Description|\r\n| ----------------------------------------------------------|-------------------------------------------------------------------------------------- |\r\n| GUID| The GUID associated to the cost agreement.|\r\n| Description| The description associated to the cost agreement.|        \r\n| IsDefault| Is default cost agreement.|    \r\n| AgreementNumber| The agreement number associated to the cost agreement.|    \r\n| CostCentreListItem| The GUID and description of the cost centre associated to the cost agreement.|    \r\n| CompanyOutletListItems| The list of company outlets associated to the cost agreement.|    \r\n| CompanyOutletListItems[0].CompanyOutletListItem| The GUID and description of the company outlet associated to the cost agreement.|    \r\n| RelatedSupplierGuid| Used to filter on the related supplier GUID.|    \r\n| RelatedSupplierSiteGuid| Used to filter on the related supplier site GUID.|\r\n| RelatedSupplierSiteGuids| The list of supplier site GUIDs associated to the cost agreement.|    \r\n| RelatedLocationSourceGuid| Used to filter on the source location associated to the cost.|\r\n| RelatedLocationDestinationGuid| Used to filter on the destination location associated to the cost.|\r\n| RelatedCostGuidFilter| Used to filter on the related cost GUID.|\r\n| RelatedSupplierSiteGuids[0].RelatedSupplierSiteGuid| The GUID of the supplier site associated to the cost agreement.|\r\n| EndDate| The end date associated to the cost agreement in ISO format (YYYY-MM-DD).|    \r\n| EndReasonListItem| The GUID and description of the end reason associated to the cost agreement.|    \r\n| IsAutoRenewal| Is the cost agreement has auto renewal enabled.|    \r\n| IsForAllSites| Is the cost agreement for all sites.|    \r\n| PrimaryServiceListItem| The GUID and description of the end reason associated to the cost agreement.|    \r\n| ReviewDate| The review date associated to the cost agreement in ISO format (YYYY-MM-DD).|    \r\n| StartDate| The start date associated to the cost agreement in ISO format (YYYY-MM-DD).|    \r\n| Costs| The list of costs associated to the cost agreement.|\r\n| Costs[0].GUID| The GUID associated to the cost.|\r\n| Costs[0].IsDeleted| Whether the cost is deleted.|\r\n| Costs[0].Description| The description associated to the cost.|\r\n| Costs[0].DefaultActionListItem| The GUID and description of the default action associated to the cost.|\r\n| Costs[0].ServiceFrequencyListItem| The GUID and description of the service frequency associated to the cost.|\r\n| Costs[0].ContainerTypeListItem| The GUID and description of the container type associated to the cost.|\r\n| Costs[0].RentTermListItem| The GUID and description of the rent term associated to the cost.|\r\n| Costs[0].MaterialListItem| The GUID and description of the material associated to the cost.|\r\n| Costs[0].RelatedLocationSourceGuid| The GUID related to the source location associated to the cost.|\r\n| Costs[0].RelatedLocationDestinationGuid| The GUID related to the destination location associated to the cost.|\r\n| Costs[0].EffectiveFrom| The date effective from date associated to the cost.|\r\n| Costs[0].Amount| The amount object associated to the cost.|\r\n| Costs[0].Amount.Cost| The cost value associated to the amount.|\r\n| Costs[0].Amount.MaximumCost| The maximum cost associated to the amount.|\r\n| Costs[0].Amount.MinimumCost| The minimum cost associated to the amount.|\r\n| Costs[0].Amount.Allowance| The allowance associated to the amount.|\r\n| Costs[0].Amount.VATListItem| The GUID and description of the VAT associated to the amount.|\r\n| Costs[0].Amount.TaxTemplateCollectionListItem| The GUID and description of the tax template collection associated to the amount.|\r\n| RelatedServiceAgreements| The list of service agreements related to the cost agreement.|\r\n| RelatedServiceAgreements[0].Guid| The Guid associated to the service agreement cost agreement.|\r\n| RelatedServiceAgreements[0].IsDeleted| Whether the service agreement cost agreement is deleted.|\r\n| RelatedServiceAgreements[0].RelatedServiceAgreementGuid| The Guid of the service agreement associated to the cost agreement.|\r\n| RelatedServiceAgreementGuidFilter    | Used to filter on the related service agreement GUID.|\r\n"
      operationId: CostAgreement_Get
      parameters:
      - name: guid
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: udf
        in: query
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResourceResultEntity[ApiIntegratorCostAgreementResource]'
    put:
      tags:
      - CostAgreement
      summary: Partial update
      description: "| Property| Description| Required |\r\n| ----------------------------------------------------------|-------------------------------------------------------------------------------------- |----------|\r\n| GUID| The GUID associated to the cost agreement.|   No     |\r\n| Description| The description associated to the cost agreement.|   Yes    |        \r\n| IsDefault| Is default cost agreement.|   Yes    |    \r\n| AgreementNumber| The agreement number associated to the cost agreement.|   Yes    |    \r\n| CostCentreListItem| The GUID and description of the cost centre associated to the cost agreement.|   No     | \r\n| CompanyOutletListItems| The list of company outlets associated to the cost agreement.|   No     | \r\n| CompanyOutletListItems[0].CompanyOutletListItem| The GUID and description of the company outlet associated to the cost agreement.|   No     |\r\n| RelatedSupplierGuid| The GUID and description of the supplier GUID associated to the cost agreement.|   No     | \r\n| RelatedSupplierSiteGuids| The list of supplier site GUIDs associated to the cost agreement.|   Yes    |\r\n| RelatedLocationSourceGuid| Used to filter on the source location associated to the cost.|No   |\r\n| RelatedLocationDestinationGuid| Used to filter on the destination location associated to the cost.|   No   |\r\n| RelatedCostGuidFilter| Used to filter on the related cost GUID.|   No   |\r\n| RelatedSupplierSiteGuids[0].RelatedSupplierSiteGuid| The GUID of the supplier site associated to the cost agreement.|   Yes    |\r\n| EndDate| The end date associated to the cost agreement in ISO format (YYYY-MM-DD).|   No     | \r\n| EndReasonListItem| The GUID and description of the end reason associated to the cost agreement.|   No     | \r\n| IsAutoRenewal| Is the cost agreement has auto renewal enabled.|   No     | \r\n| IsForAllSites| Is the cost agreement for all sites.|   No     | \r\n| PrimaryServiceListItem| The GUID and description of the end reason associated to the cost agreement.|   No     | \r\n| ReviewDate| The review date associated to the cost agreement in ISO format (YYYY-MM-DD).|   No     | \r\n| StartDate| The start date associated to the cost agreement in ISO format (YYYY-MM-DD).|   No     | \r\n| Costs| The list of costs associated to the cost agreement.|   No     |\r\n| Costs[0].GUID| The GUID associated to the cost.|   No     |\r\n| Costs[0].IsDeleted| Whether the cost is deleted.|Yes   |\r\n| Costs[0].Description| The description associated to the cost.|   No     |\r\n| Costs[0].DefaultActionListItem| The GUID and description of the default action associated to the cost.|   No     |\r\n| Costs[0].ServiceFrequencyListItem| The GUID and description of the service frequency associated to the cost.|   No     |\r\n| Costs[0].ContainerTypeListItem| The GUID and description of the container type associated to the cost.|   No     |\r\n| Costs[0].RentTermListItem| The GUID and description of the rent term associated to the cost.|No     |\r\n| Costs[0].MaterialListItem| The GUID and description of the material associated to the cost.|No     |\r\n| Costs[0].RelatedLocationSourceGuid| The GUID related to the source location associated to the cost.|No     |\r\n| Costs[0].RelatedLocationDestinationGuid| The GUID related to the destination location associated to the cost.|No     |\r\n| Costs[0].EffectiveFrom| The date effective from date associated to the cost.|No     |\r\n| Costs[0].Amount| The amount object associated to the cost.|No     |\r\n| Costs[0].Amount.Cost| The cost value associated to the amount.|   No     |\r\n| Costs[0].Amount.MaximumCost| The maximum cost associated to the amount.|No     |\r\n| Costs[0].Amount.MinimumCost| The minimum cost associated to the amount.|No     |\r\n| Costs[0].Amount.Allowance| The allowance associated to the amount.|No     |\r\n| Costs[0].Amount.VATListItem| The GUID and description of the VAT associated to the amount.|No     |\r\n| Costs[0].Amount.TaxTemplateCollectionListItem| The GUID and description of the tax template collection associated to the amount.|No     |\r\n| RelatedServiceAgreements| The list of service agreements related to the cost agreement.|No   |\r\n| RelatedServiceAgreements[0].Guid| The Guid associated to the service agreement cost agreement.|No   |\r\n| RelatedServiceAgreements[0].IsDeleted| Whether the service agreement cost agreement is deleted.|Yes   |\r\n| RelatedServiceAgreements[0].RelatedServiceAgreementGuid| The Guid of the service agreement associated to the cost agreement.|Yes   |\r\n| RelatedServiceAgreementGuidFilter    | Used to filter on the related service agreement GUID.|No     |\r\n\r\n**Extra validations**\r\n\r\n| Condition | Error message |\r\n| --------- | ------------- |\r\n| If Costs[0].GUID is duplicated on another Cost | Failed to save. Entity already exists Guid of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |\r\n| If all existing Costs[] items are not supplied | Failed to save. Cost with GUID of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx was not supplied |\r\n| If Costs[0].GUID is not associated with the current cost agreement| Failed to save. Cost with Guid of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  does not belong to CostAgreement |\r\n| If Costs[0] has a related field set that is not allowed given the cost agreement primary service and the costs action | Cost has the property RelatedSiteDestinationGuid with value of 355dbd83-abce-4797-a5b4-ac59632dc821 that is not supported. The given DefaultActionListItem: 4fd49204-7123-eb11-8d03-98e74393fee2 only allows the following fields: RelatedSupplierSiteDestinationGuid. | \r\n| If RelatedServiceAgreements.Guid is changed on update | RelatedServiceAgreements.Guid is a read-only property |\r\n| If RelatedServiceAgreements.RelatedServiceAgreementGuid is changed on update | RelatedServiceAgreements.RelatedServiceAgreementGuid is a read-only property |\r\n| If RelatedServiceAgreements.IsDeleted is changed on update | RelatedServiceAgreements.IsDeleted is a read-only property |\r\n| If we insert duplicate service agreement on cost agreement update | Failed to save. Serviceagreement already exists with Guid of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |\r\n| If Costs.IsDeleted is changed on update | Costs.IsDeleted is a read-only property |"
      operationId: CostAgreement_Update
      parameters:
      - name: guid
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiIntegratorCostAgreementResource'
        required: true
        x-bodyName: null
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResourceId'
  /productCatalogue/costAgreements:
    get:
      tags:
      - CostAgreement
      summary: Find with Filters
      description: "| Property| Description|\r\n| ----------------------------------------------------------|-------------------------------------------------------------------------------------- |\r\n| GUID| The GUID associated to the cost agreement.|\r\n| Description| The description associated to the cost agreement.|        \r\n| IsDefault| Is default cost agreement.|    \r\n| AgreementNumber| The agreement number associated to the cost agreement.|    \r\n| CostCentreListItem| The GUID and description of the cost centre associated to the cost agreement.|    \r\n| CompanyOutletListItems| The list of company outlets associated to the cost agreement.|    \r\n| CompanyOutletListItems[0].CompanyOutletListItem| The GUID and description of the company outlet associated to the cost agreement.|    \r\n| RelatedSupplierGuid| Used to filter on the related supplier GUID.|    \r\n| RelatedSupplierSiteGuid| Used to filter on the related supplier site GUID.|\r\n| RelatedSupplierSiteGuids| The list of supplier site GUIDs associated to the cost agreement.|    \r\n| RelatedLocationSourceGuid| Used to filter on the source location associated to the cost.|\r\n| RelatedLocationDestinationGuid| Used to filter on the destination location associated to the cost.|\r\n| RelatedCostGuidFilter| Used to filter on the related cost GUID.|\r\n| RelatedSupplierSiteGuids[0].RelatedSupplierSiteGuid| The GUID of the supplier site associated to the cost agreement.|\r\n| EndDate| The end date associated to the cost agreement in ISO format (YYYY-MM-DD).|    \r\n| EndReasonListItem| The GUID and description of the end reason associated to the cost agreement.|    \r\n| IsAutoRenewal| Is the cost agreement has auto renewal enabled.|    \r\n| IsForAllSites| Is the cost agreement for all sites.|    \r\n| PrimaryServiceListItem| The GUID and description of the end reason associated to the cost agreement.|    \r\n| ReviewDate| The review date associated to the cost agreement in ISO format (YYYY-MM-DD).|    \r\n| StartDate| The start date associated to the cost agreement in ISO format (YYYY-MM-DD).|    \r\n| Costs| The list of costs associated to the cost agreement.|\r\n| Costs[0].GUID| The GUID associated to the cost.|\r\n| Costs[0].IsDeleted| Whether the cost is deleted.|\r\n| Costs[0].Description| The description associated to the cost.|\r\n| Costs[0].DefaultActionListItem| The GUID and description of the default action associated to the cost.|\r\n| Costs[0].ServiceFrequencyListItem| The GUID and description of the service frequency associated to the cost.|\r\n| Costs[0].ContainerTypeListItem| The GUID and description of the container type associated to the cost.|\r\n| Costs[0].RentTermListItem| The GUID and description of the rent term associated to the cost.|\r\n| Costs[0].MaterialListItem| The GUID and description of the material associated to the cost.|\r\n| Costs[0].RelatedLocationSourceGuid| The GUID related to the source location associated to the cost.|\r\n| Costs[0].RelatedLocationDestinationGuid| The GUID related to the destination location associated to the cost.|\r\n| Costs[0].EffectiveFrom| The date effective from date associated to the cost.|\r\n| Costs[0].Amount| The amount object associated to the cost.|\r\n| Costs[0].Amount.Cost| The cost value associated to the amount.|\r\n| Costs[0].Amount.MaximumCost| The maximum cost associated to the amount.|\r\n| Costs[0].Amount.MinimumCost| The minimum cost associated to the amount.|\r\n| Costs[0].Amount.Allowance| The allowance associated to the amount.|\r\n| Costs[0].Amount.VATListItem| The GUID and description of the VAT associated to the amount.|\r\n| Costs[0].Amount.TaxTemplateCollectionListItem| The GUID and description of the tax template collection associated to the amount.|\r\n| RelatedServiceAgreements| The list of service agreements related to the cost agreement.|\r\n| RelatedServiceAgreements[0].Guid| The Guid associated to the service agreement cost agreement.|\r\n| RelatedServiceAgreements[0].IsDeleted| Whether the service agreement cost agreement is deleted.|\r\n| RelatedServiceAgreements[0].RelatedServiceAgreementGuid| The Guid of the service agreement associated to the cost agreement.|\r\n| RelatedServiceAgreementGuidFilter    | Used to filter on the related service agreement GUID.|\r\n"
      operationId: CostAgreement_GetCollection
      parameters:
      - name: filter
        in: query
        schema:
          type: string
      - name: max
        in: query
        schema:
          type: integer
          format: int32
      - name: page
        in: query
        schema:
          type: integer
          format: int32
      - name: includeCount
        in: query
        schema:
          type: boolean
      - name: udf
        in: query
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResourceResultCollection[ApiIntegratorCostAgreementResource]'
    post:
      tags:
      - CostAgreement
      summary: Create or update
      description: "| Property| Description| Required |\r\n| ----------------------------------------------------------|-------------------------------------------------------------------------------------- |----------|\r\n| GUID| The GUID associated to the cost agreement.|   No     |\r\n| Description| The description associated to the cost agreement.|   Yes    |        \r\n| IsDefault| Is default cost agreement.|   Yes    |    \r\n| AgreementNumber| The agreement number associated to the cost agreement.|   Yes    |    \r\n| CostCentreListItem| The GUID and description of the cost centre associated to the cost agreement.|   No     | \r\n| CompanyOutletListItems| The list of company outlets associated to the cost agreement.|   No     | \r\n| CompanyOutletListItems[0].CompanyOutletListItem| The GUID and description of the company outlet associated to the cost agreement.|   No     |\r\n| RelatedSupplierGuid| The GUID and description of the supplier GUID associated to the cost agreement.|   No     | \r\n| RelatedSupplierSiteGuids| The list of supplier site GUIDs associated to the cost agreement.|   Yes    |\r\n| RelatedLocationSourceGuid| Used to filter on the source location associated to the cost.|No   |\r\n| RelatedLocationDestinationGuid| Used to filter on the destination location associated to the cost.|   No   |\r\n| RelatedCostGuidFilter| Used to filter on the related cost GUID.|   No   |\r\n| RelatedSupplierSiteGuids[0].RelatedSupplierSiteGuid| The GUID of the supplier site associated to the cost agreement.|   Yes    |\r\n| EndDate| The end date associated to the cost agreement in ISO format (YYYY-MM-DD).|   No     | \r\n| EndReasonListItem| The GUID and description of the end reason associated to the cost agreement.|   No     | \r\n| IsAutoRenewal| Is the cost agreement has auto renewal enabled.|   No     | \r\n| IsForAllSites| Is the cost agreement for all sites.|   No     | \r\n| PrimaryServiceListItem| The GUID and description of the end reason associated to the cost agreement.|   No     | \r\n| ReviewDate| The review date associated to the cost agreement in ISO format (YYYY-MM-DD).|   No     | \r\n| StartDate| The start date associated to the cost agreement in ISO format (YYYY-MM-DD).|   No     | \r\n| Costs| The list of costs associated to the cost agreement.|   No     |\r\n| Costs[0].GUID| The GUID associated to the cost.|   No     |\r\n| Costs[0].IsDeleted| Whether the cost is deleted.|Yes   |\r\n| Costs[0].Description| The description associated to the cost.|   No     |\r\n| Costs[0].DefaultActionListItem| The GUID and description of the default action associated to the cost.|   No     |\r\n| Costs[0].ServiceFrequencyListItem| The GUID and description of the service frequency associated to the cost.|   No     |\r\n| Costs[0].ContainerTypeListItem| The GUID and description of the container type associated to the cost.|   No     |\r\n| Costs[0].RentTermListItem| The GUID and description of the rent term associated to the cost.|No     |\r\n| Costs[0].MaterialListItem| The GUID and description of the material associated to the cost.|No     |\r\n| Costs[0].RelatedLocationSourceGuid| The GUID related to the source location associated to the cost.|No     |\r\n| Costs[0].RelatedLocationDestinationGuid| The GUID related to the destination location associated to the cost.|No     |\r\n| Costs[0].EffectiveFrom| The date effective from date associated to the cost.|No     |\r\n| Costs[0].Amount| The amount object associated to the cost.|No     |\r\n| Costs[0].Amount.Cost| The cost value associated to the amount.|   No     |\r\n| Costs[0].Amount.MaximumCost| The maximum cost associated to the amount.|No     |\r\n| Costs[0].Amount.MinimumCost| The minimum cost associated to the amount.|No     |\r\n| Costs[0].Amount.Allowance| The allowance associated to the amount.|No     |\r\n| Costs[0].Amount.VATListItem| The GUID and description of the VAT associated to the amount.|No     |\r\n| Costs[0].Amount.TaxTemplateCollectionListItem| The GUID and description of the tax template collection associated to the amount.|No     |\r\n| RelatedServiceAgreements| The list of service agreements related to the cost agreement.|No   |\r\n| RelatedServiceAgreements[0].Guid| The Guid associated to the service agreement cost agreement.|No   |\r\n| RelatedServiceAgreements[0].IsDeleted| Whether the service agreement cost agreement is deleted.|Yes   |\r\n| RelatedServiceAgreements[0].RelatedServiceAgreementGuid| The Guid of the service agreement associated to the cost agreement.|Yes   |\r\n| RelatedServiceAgreementGuidFilter    | Used to filter on the related service agreement GUID.|No     |   \r\n\r\n**Extra validations**\r\n\r\n| Condition | Error message |\r\n| --------- | ------------- |\r\n| If Costs[0].GUID is duplicated on another Cost | Failed to save. Entity already exists Guid of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |\r\n| If all existing Costs[] items are not supplied | Failed to save. Cost with GUID of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx was not supplied |\r\n| If Costs[0].GUID is not associated with the current cost agreement| Failed to save. Cost with Guid of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  does not belong to CostAgreement |\r\n| If Costs[0] has a related field set that is not allowed given the cost agreement primary service and the costs action | Cost has the property RelatedSiteDestinationGuid with value of 355dbd83-abce-4797-a5b4-ac59632dc821 that is not supported. The given DefaultActionListItem: 4fd49204-7123-eb11-8d03-98e74393fee2 only allows the following fields: RelatedSupplierSiteDestinationGuid. | \r\n| If RelatedServiceAgreements.Guid is not null on insert | Attempting to update service agreement when creating the cost agreement . Could not process the request. Provide service agreement without a Guid property to create new cost agreement rather than attempting an update |\r\n| If RelatedServiceAgreements.IsDeleted is TRUE | Could not process the request. RelatedServiceAgreements can not be deleted via the REST API |\r\n| If RelatedServiceAgreements.Guid is changed on update | RelatedServiceAgreements.Guid is a read-only property |\r\n| If RelatedServiceAgreements.RelatedServiceAgreementGuid is changed on update | RelatedServiceAgreements.RelatedServiceAgreementGuid is a read-only property |\r\n| If RelatedServiceAgreements.IsDeleted is changed on update | RelatedServiceAgreements.IsDeleted is a read-only property |\r\n| If we insert duplicate service agreement on cost agreement update | Failed to save. Serviceagreement already exists with Guid of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |\r\n| If Costs.IsDeleted is changed on update | Costs.IsDeleted is a read-only property |\r\n| If Costs.IsDeleted is TRUE on insert | IsDeleted is TRUE. Could not process the request. Costs can not be deleted via the REST API |"
      operationId: CostAgreement_Create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiIntegratorCostAgreementResource'
        required: true
        x-bodyName: null
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResourceId'
components:
  schemas:
    ApiIntegratorListItemResource:
      type: object
      properties:
        Description:
          type: string
        Guid:
          type: string
          format: uuid
          example: 00000000-0000-0000-0000-000000000000
    ApiResourceResultUpdatesExtra:
      type: object
      properties:
        until:
          type: string
        cursor:
          type: string
    ApiIntegratorCostAgreementAmountResource:
      type: object
      properties:
        Cost:
          type: number
          format: double
        MaximumCost:
          type: number
          format: double
        MinimumCost:
          type: number
          format: double
        Allowance:
          type: number
          format: double
        VATListItem:
          $ref: '#/components/schemas/ApiIntegratorListItemResource'
        TaxTemplateCollectionListItem:
          $ref: '#/components/schemas/ApiIntegratorListItemResource'
    ApiResourceId:
      type: object
      properties:
        resource:
          type: string
          format: uuid
        errors:
          $ref: '#/components/schemas/ApiResourceErrors'
        status:
          $ref: '#/components/schemas/ApiResourceStatus'
    ApiIntegratorCostAgreementCompanyOutletResource:
      type: object
      properties:
        CompanyOutletListItem:
          $ref: '#/components/schemas/ApiIntegratorListItemResource'
    ApiIntegratorCostAgreementCostResource:
      type: object
      properties:
        Guid:
          type: string
          format: uuid
          example: 00000000-0000-0000-0000-000000000000
        IsDeleted:
          type: boolean
        DefaultActionListItem:
          $ref: '#/components/schemas/ApiIntegratorListItemResource'
        ServiceFrequencyListItem:
          $ref: '#/components/schemas/ApiIntegratorListItemResource'
        ContainerTypeListItem:
          $ref: '#/components/schemas/ApiIntegratorListItemResource'
        RentTermListItem:
          $ref: '#/components/schemas/ApiIntegratorListItemResource'
        MaterialListItem:
          $ref: '#/components/schemas/ApiIntegratorListItemResource'
        RelatedLocationSourceGuid:
          type: string
          format: uuid
          example: 00000000-0000-0000-0000-000000000000
        RelatedLocationDestinationGuid:
          type: string
          format: uuid
          example: 00000000-0000-0000-0000-000000000000
        EffectiveFrom:
          type: string
          format: localDate
          example: '2000-01-01'
        Amount:
          $ref: '#/components/schemas/ApiIntegratorCostAgreementAmountResource'
    ApiResourceErrors:
      type: object
      properties:
        errors:
          type: string
    ApiResourceResultCollection[ApiIntegratorCostAgreementResource]:
      type: object
      properties:
        resource:
          type: array
          items:
            $ref: '#/components/schemas/ApiIntegratorCostAgreementResource'
        extra:
          $ref: '#/components/schemas/ApiResourceResultCollectionExtra'
        errors:
          $ref: '#/components/schemas/ApiResourceErrors'
        status:
          $ref: '#/components/schemas/ApiResourceStatus'
    ApiIntegratorCostAgreementRelatedSupplierSiteResource:
      type: object
      properties:
        RelatedSupplierSiteGuid:
          type: string
          format: uuid
          example: 00000000-0000-0000-0000-000000000000
    ApiResourceResultCol

# --- truncated at 32 KB (36 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/amcs-group/refs/heads/main/openapi/amcs-group-costagreement-api-openapi.yml