Request Parameters
Data retrieval services typically include standard parameters for searching, sorting, and pagination. Take a look at the Oasis OData Documentation for more details.
You can also find example queries in our Spark API Postman Library
Attribute Selection
The $select parameter allows you to specify the top-level data components you need. For larger data sets,
such as properties, using this parameter will greatly reduce data retrieval time.
| Parameter | Description |
|---|---|
$select |
A comma separated list specifying the attributes to be returned in the response payload. |
Pagination
Pagination allows data to be retrieved in sets of a specified size and provides additional data about the result set.
| Parameter | Description |
|---|---|
$top |
Integer > 0 and <= 25 indicating how many results to return at once. The default is 10. For keys with the replication role it may be > 0 and <= 1000. |
$skip |
Indicates the number of records to skip over when retrieving the current results set. |
$count |
Boolean true or false. Indicates if the number of records in the total result set should be returned. Default is false. |
Sorting
Sorting is typically available on resources that allow searching.
| Parameter | Description |
|---|---|
$orderby |
Indicates the order in which to return records in the result set. Each service has its own default order. You can also sort by ascending (asc) or descending (desc) order. |
Any searchable field can be present in the $orderby parameter, with some exceptions (e.g. longer text fields such as PublicRemarks for properties).
Searching
Request parameters below are common to data retrieval services supporting searching.
| Parameter | Description |
|---|---|
$filter |
OData filter syntax is used for filtering. Documentation can be found here. |
Expansions
Request parameters below are common to data retrieval services supporting pulling related entities.
The most basic example is to retrieve both media and listing data with a single call to the API. This can be done by including the $expand=Media parameter in a request on the /Property endpoint.
You are also able to pass pagination and search parameters that interact exclusively with the expanded entity. The syntax for such a request is $expand=Media($top=1) and the result of this particular example is the retrieval of a single media record for each listing in your payload.
| Parameter | Description |
|---|---|
$expand |
OData expansion syntax is used for expansions. Documentation can be found here. |
Encoding
URL encoding (technically known as percent-encoding) is a method used to convert characters into a format that can be safely transmitted over the Internet.
Web browsers and servers are designed to only accept URLs composed of a specific set of ASCII characters (numbers 0-9, letters A-Z, and a few special symbols). If a URL contains characters outside of this set—such as spaces, emojis, or foreign language characters—they must be "encoded" to prevent the URL from breaking or being misinterpreted by the server.
Examples
Decoded URL
GET https://replication.sparkapi.com/Reso/OData/Property?$filter=PropertyType eq 'Farm & Ranch'
Encoded URL
GET https://replication.sparkapi.com/Reso/OData/Property?$filter=PropertyType eq 'Farm %26 Ranch'
| Character | Encoded Version |
|---|---|
space | %20 |
! | %21 |
" | %22 |
# | %23 |
$ | %24 |
% | %25 |
& | %26 |
' | %27 |
( | %28 |
) | %29 |
* | %2A |
+ | %2B |
, | %2C |
- | %2D |
. | %2E |
/ | %2F |
: | %3A |
; | %3B |
< | %3C |
= | %3D |
> | %3E |
? | %3F |
@ | %40 |
[ | %5B |
\ | %5C |
] | %5D |
^ | %5E |
_ | %5F |
` | %60 |
{ | %7B |
| | %7C |
} | %7D |
~ | %7E |
0 | %30 |
1 | %31 |
2 | %32 |
3 | %33 |
4 | %34 |
5 | %35 |
6 | %36 |
7 | %37 |
8 | %38 |
9 | %39 |
A | %41 |
B | %42 |
C | %43 |
D | %44 |
E | %45 |
F | %46 |
G | %47 |
H | %48 |
I | %49 |
J | %4A |
K | %4B |
L | %4C |
M | %4D |
N | %4E |
O | %4F |
P | %50 |
Q | %51 |
R | %52 |
S | %53 |
T | %54 |
U | %55 |
V | %56 |
W | %57 |
X | %58 |
Y | %59 |
Z | %5A |
a | %61 |
b | %62 |
c | %63 |
d | %64 |
e | %65 |
f | %66 |
g | %67 |
h | %68 |
i | %69 |
j | %6A |
k | %6B |
l | %6C |
m | %6D |
n | %6E |
o | %6F |
p | %70 |
q | %71 |
r | %72 |
s | %73 |
t | %74 |
u | %75 |
v | %76 |
w | %77 |
x | %78 |
y | %79 |
z | %7A |