Finding a Single Record

If the find endpoint is exposed to a resource, you can query for a single record for that resource.

Pass in the slug or id as the 4th parameter. It will detect whether it is a slug or id and query accordingly:

GET /api/User/find/{slug or id}

You can also pass in the id or slug query parameter to retrieve a record:

GET /api/User/find?id=12

OR

GET /api/User/find?slug=5jdfh072ak65kg2kc6jsh096

FormData Parameters
Parameter Type Value
id or slug integer or string (required) Either the slug or id should be passed in, not both
include JSON JSON formatted array of related resources to be sent with the result set. See Getting/Filtering Data form more information on how to include related resources
fields JSON JSON formatted array of field names. When this parameter is present, the collection results will only contain the fields specified.

Example

["slug",first_name","last_name"]
field string The field to find by. By default, the /find/{field} endpoint uses the id or slug field, however using this parameter you can specify which field you would like to find by.

Example

/User/find/chad?field=first_name will find the first record that matches first_name = 'chad'

If there are multiple matches, it will only return the first result.

include_deleted boolean You can recover records that are only soft-deleted (persisting in the database and have a delete flag set on them), by setting this field to true
Example Response

Responses will be returned in JSON format:

{
	success: true,
	data: {
		id: 12,
		first_name: "Chad",
		last_name: "Tiffin",
		email: "chad@tradetraks.ca"
	}
}