Curl/Bash code for JSON Payload ExampleThis Curl/Bash code snippet was generated automatically for the JSON Payload example.
<< Back to the JSON Payload example
What is JSON?
What is JSON Payload?
Payload is the essential information in a data block that you send to or receive from the server when making API requests. The Payload can be sent or received in a variety of formats, including JSON. In programming, the payload is used in the context of a message protocol to distinguish between ancillary and actual data in a request. For example, request headers are required by the server to correctly interpret and process the request from a client, but they are not the payload of the request. JSON syntax elements are also not a payload.
- "id": "12345" - Payload
- The rest of the information is called service data.
API Payload Formats
There are two types of payloads used:
1. The Payload that the client sends to the server.
- "Id": 78912 and "Customer": "Jason Sweet" are Payload
2. The Payload returned by the server.
- The OK response Payload format:
- "success": "true" and "TotalOrders": 100 are Payload
- The FAILED response payload format:
- "success": "false", "errorCode": 500 and "errorDescription": Invalid user ID" are Payload
JSON Payload Request Example
Example of sending JSON Payload to ReqBin echo URL:
JSON Payload Response Example
Example of server response with JSON Payload: