Parameters are different ways to configure endpoints. The parameters you pass with an endpoint affect the response.
Parameters Types
REST APIs have four kind of parameters:
1. Path parameters: Parameters that appear within the path of the endpoint, before the query string (?). For example, in https://[[app:InstanceURL]]/services/apexrest/FieloPLT/v1/members/123, in which 123 is the path parameter.
2. Query string parameters: Parameters that appear in the query string of the endpoint, after the question mark (?). For example, https://[[app:InstanceURL]]/services/apexrest/FieloPLT/v1/members/details?show_fields=field1,field2,field3, in which show_fields is the query string parameter. Here are some query parameters you can use with Fielo's endpoints:
| Query Parameters | Description | Data type |
|---|---|---|
| fields | A comma-separated list of fields (API name) to return new fieldsets in the response. | String |
| limit | The number of records to return. | Integer |
| offset | The number of records from a collection to skip. | Integer |
| orderby | Records returned in an ascending or descending order. | String |
| fromdate | Records as of the creation date (MM/DD/YYYY) | String |
| todate | Records up to the creation date (MM/DD/YYYY) | String |
| memberid | The id of the member which the information will be returned. | String |
3. Request body parameters: Parameters that are included in the request body. Usually submitted as JSON.
4. Header parameters: Parameters that are included in the request header. Usually header parameters relate to authorization.
Parameters Data Type
The following data types are the most common with REST APIs:
- string: An alphanumeric sequence of letters and/or numbers.
- integer: A whole number, which can be positive or negative.
- boolean: true or false.
- object: Key-value pairs in JSON format.
Parameter Data typeList the data type for each parameter, otherwise APIs may not process the parameter correctly if it's the wrong data type or wrong format.
