The z/OS Asset response
fields need to be mapped to the API response fields. In the task Define the POST /orders responses, you defined the order in which the
response codes are checked. The next step is to map the data that is returned for each response
code.
An amber exclamation mark
indicates that the mapping is not
defined.
The OpenAPI definition defines three
possible response codes for the POST /orders operation, 200, 400®, and 500. In the following steps, you map the data that is returned from the
z/OS Asset to the API responses.
Map the 200 - OK response.
In the Operation flow diagram, click
the 200 response node.
A 200 response code indicates that the requested catalog item to be ordered has been successfully
ordered. The item order needs to be mapped to the fields of the API response.
Figure 1. 200 OK response to be mapped.
Map the z/OS Asset response input
CA-RESPONSE-MESSAGE to the message API response
field.
Type CA-RESPONSE-MESSAGE.
Figure 2. Mapping CA-RESPONSE-MESSAGE.
Map the 400 - Bad Request response.
In the Operation flow diagram, click
the 400 response node.
A 400 response code indicates that the requested catalog item to be ordered has failed due to stock being unavailable.
Input Insufficient stock to complete order into the
message field.
Insufficient stock to complete order
Figure 3. Inputting message.
Map the 500 - Internal Server Error response.
In the
Operation flow diagram, click the
500 response node.
A 500 response code indicates an internal server error.
Configure the 500 response to return the z/OS Connect error
message and the contents of the CA-RESPONSE-MESSAGE field by inputting the
following into the message field: