ops
ops-contractual-entities

Validate a headroom import

Changed on

Validate the uploaded CSV of a pending headroom import and store the result. On an import that is no longer pending, return the stored result.

post/ops/contractual_entities/{entity}/headroom_imports/{id}/validate

Request

  • Base URL
    https://api.topi-staging.eu
  • URL
    https://api.topi-staging.eu/ops/contractual_entities/{entity}/headroom_imports/{id}/validate
  • Auth
    OAuth 2
    Authorization code: /oauth2/authorize
    Token URL: /oauth2/token scopes: ops-pricing-category:edit

Path parameters

entitystring required

External contractual entity code

Example:peac_de_gmbh
idstring regexp required

Headroom import ID

Example:739b63c2-9e58-4964-b38d-4ebb424de242

Response

OK response.

applied_atstring date-time

When the import was applied; absent unless applied

applied_bystring

Who applied the import; absent unless applied

contractual_entitystring required

External contractual entity code

filenamestring required

Name of the uploaded file

idstring regexp required

Headroom import ID

status'pending' | 'validated' | 'invalid' | 'applied' required

pending: waiting for the file to be validated; validated: ready to apply; invalid: the file has errors, upload a corrected one as a new import; applied

uploaded_atstring date-time required

When the import was created

uploaded_bystring required

Who created the import

Example response

{
  "applied_at": "1970-01-01T00:00:01Z",
  "applied_by": "abc123",
  "contractual_entity": "abc123",
  "filename": "abc123",
  "id": "739b63c2-9e58-4964-b38d-4ebb424de242",
  "preview": [
    {
      "current_default_tenure": 1,
      "id": "739b63c2-9e58-4964-b38d-4ebb424de242",
      "identifier": "abc123",
      "new_default_tenure": 1,
      "newly_covered": false,
      "tenures": [
        {
          "becomes_disabled": false,
          "current": {
            "expected_residual_value_ratio": 1,
            "headroom_ratio": 1,
            "is_default": false,
            "tenure": 1
          },
          "new": {
            "expected_residual_value_ratio": 1,
            "headroom_ratio": 1,
            "is_default": false,
            "tenure": 1
          },
          "tenure": 1
        }
      ]
    }
  ],
  "status": "validated",
  "uploaded_at": "1970-01-01T00:00:01Z",
  "uploaded_by": "abc123",
  "validation_errors": [
    {
      "message": "abc123",
      "pricing_category_identifier": "abc123",
      "row": 1
    }
  ]
}

Changes

    • info

      api operation id pricing-category.validate_headroom_import removed and replaced with pricing-category#validate_headroom_import

    • info

      api operation id pricing-category#validate_headroom_import removed and replaced with pricing-category.validate_headroom_import

    • info

      api tag ops-contractual-entities added