Question 500
At fictional Lakeshore Energy, the Business Central development team is supporting asset maintenance procurement and reviewing external-service integration during a troubleshooting exercise (MB820-6.1-184). The observed development issue is that a supplier API requires JSON content but the AL request transmits plain text with the wrong media type. Which observed result would most clearly show the intended correction works?
Explanation
Correct Answer
This is the outcome that directly verifies the intended correction: the partner accepts a correctly formatted request and returns the expected schema. The related solution is to build a JsonObject/JsonToken payload and set the appropriate content headers; it is based on the principle that hTTP integrations require aligned payload and content-type contracts.
Incorrect Answers
“Simulated 503 yields a visible failure or safe fallback without a fake quote” concerns the alternative task “check both transport execution and HTTP response status before accepting returned data”, but the stated failure is that a supplier API requires JSON content but the AL request transmits plain text with the wrong media type. The required measure is to the partner accepts a correctly formatted request and returns the expected schema.
The proposed “The quote is retrieved through the service contract without direct database access” tests a different control: use AL HttpClient/HttpRequestMessage to invoke the authorized REST endpoint and parse its response. The reported condition is that a supplier API requires JSON content but the AL request transmits plain text with the wrong media type; the more direct action is to the partner accepts a correctly formatted request and returns the expected schema.
“All shipment entries are parsed without truncation or runtime conversion errors” supports the separate task “inspect JSON token types and iterate JsonArray elements using supported AL JSON APIs”, not the reported problem: a supplier API requires JSON content but the AL request transmits plain text with the wrong media type. This case instead calls for “The partner accepts a correctly formatted request and returns the expected schema”.