Pretty Printing Responses

Learn how to pretty print Wristband API responses.

Most Wristband APIs support pretty printing. Enable it by adding the pretty=true query parameter, or simply use pretty as a shorthand.

💡

Tip

Pretty printing is intended for developers to make responses easier to read. Avoid using it in application code, as it adds unnecessary formatting characters.

For example, calling the Get User API without the pretty parameter:

GET https://yourapp-yourcompany.us.wristband.dev/api/v1/users/123?fields=id,givenName,familyName

Returns a compact JSON response:

{"id":"123","givenName":"Bob","familyName":"Smith"}

Whereas, adding pretty=trueor pretty to the request:

GET https://yourapp-yourcompany.us.wristband.dev/api/v1/users/123?fields=id,givenName,familyName&pretty=true

Returns a formatted, human-readable response:

{
  "id": "123",
  "givenName": "Bob",
  "familyName": "Smith"
}