Hankintailmoitukset / hilma-api

11 stars 0 forks source link

Different behavior between TEST and STAGE environments #188

Closed eduardsmirnov closed 1 year ago

eduardsmirnov commented 1 year ago

Attempted to create a procedure using a random company id.

POST https://hns-hilma-test-apim.azure-api.net/eforms/external-write/v1/procedure

{
    "name": "testprocedure",
    "nationalIdentifier": "2911944-3"
}

response is

{
    "id": 8160,
    "name": "testprocedure",
    "nationalIdentifier": "2911944-3",
    "users": []
}

POST https://staging-api.hankintailmoitukset.fi/eforms/external-write/v1/procedure

{
    "name": "testprocedure",
    "nationalIdentifier": "2911944-3"
}

response is

{
    "type": "Hilma API Error",
    "title": "Validation error",
    "status": 400,
    "detail": "Content validation failed, see errors and tedValidationResult for details",
    "errors": {
        "NationalIdentifier": [
            "Organisation 2911944-3 was not found in Hilma or YTJ."
        ]
    },
    "traceId": "c0c8cf9d4499d8c5da427cbd0dd6b076"
}

What national identifiers could be used on Stage env? Why environments behave differently?