Status code 400 Bad Request

Description The input message is incorrect. Look for more details in the issues property.

The following issue types may be returned by any API:

Issue type description

urn:problem-type:belgif:input-validation:schemaViolation

violation of the OpenAPI description of the API

urn:problem-type:belgif:input-validation:invalidInput

Request contains invalid input

This issue type is used when the input is invalid against validations that aren’t formally expressed in the OpenAPI description.

urn:problem-type:belgif:input-validation:unknownInput

Request contains an unknown input field

urn:problem-type:belgif:input-validation:referencedResourceNotFound

A resource referenced in the request by its identifier can’t be found.

APIs can provide their own types for other input validation issues that require specific handling by client applications. Additional issue types SHOULD be defined as URNs in one of following formats:

Issues follow the same structure as a Problem, but don’t use the status or instance properties. As for problems, API clients can use the type to determine how the handle an issue. They should not parse the title or detail properties to extract information; additional properties are a more suitable and less error-prone way to obtain such information.

POST /enterprises/abc

{
  "name": "exampleEnterprise",
  "boardMembers": [
    {
      "ssin": "12345678901",
      "period": {
         "startDate": "2020-12-31",
         "endDate": "2020-01-01"
      }
    },
    {
      "ssin": "98765432109",
      "period": {
         "startDate": "2023-01-01",
         "endDate": "2024-01-01"
      }
    }
  ]
}

returns

HTTP/1.1 400 Bad Request
Content-Type: application/problem+json

{
  "type": "urn:problem-type:belgif:badRequest",
  "href": "https://www.belgif.be/specification/rest/api-guide/problems/badRequest.html",
  "title": "Bad Request",
  "status": 400,
  "detail": "The input message is incorrect",
  "instance": "urn:uuid:123456-1234-1235-4567489798",
  "issues": [
    {
      "type": "urn:problem-type:belgif:input-validation:schemaViolation",
      "href": "https://www.belgif.be/specification/rest/api-guide/issues/schemaViolation.html",
      "title": "Input isn't valid with respect to schema",
      "detail": "enterpriseNumber abc should be numeric",
      "in": "path",
      "name": "enterpriseNumber",
      "value": "abc"
    },
    {
      "type": "urn:problem-type:cbss:input-validation:replacedSsin",
      "href": "https://example.cbss.be/problems/replacedSsin",
      "title": "SSIN has been replaced. Use new SSIN.",
      "detail": "SSIN 12345678901 has been replaced by 23456789012",
      "in": "body",
      "name": "boardMembers[0].ssin",
      "value": "12345678901",
      "replacedBy": "23456789012"
    },
    {
      "type": "urn:problem-type:belgif:input-validation:referencedResourceNotFound",
      "href": "https://www.belgif.be/specification/rest/api-guide/issues/referencedResourceNotFound.html",
      "title": "Referenced resource not found",
      "detail": "Referenced resource boardMembers[1].ssin = '98765432109' does not exist",
      "in": "body",
      "name": "boardMembers[1].ssin",
      "value": "98765432109"
    },
    {
      "type": "urn:problem-type:belgif:input-validation:invalidInput",
      "href": "https://www.belgif.be/specification/rest/api-guide/issues/invalidInput.html",
      "title": "Invalid input",
      "detail": "endDate of a period should be after its startDate",
      "in": "body",
      "name": "boardMembers[0].period",
      "value": {
        "startDate": "2020-12-31",
        "endDate": "2020-01-01"
      }
    }
  ]
}