Parameters to requests are sent as query parameters. These are described for each request in the following pages. Some parameters are optional, which is denoted with a question mark in the type column. See the following example.
|example||Text||This parameter is a mandatory string.|
|optional||Integer?||This parameter is an optional integer.|
Header parameters must be attached to each API request (though some requests are open for end-users). API requests to closed requests without a Theca-Client-Token will be rejected with a
403 Forbidden HTTP status.
Do not prefix the headers with X- (this is a deprecated custom for custom HTTP header parameters).
|Theca-Client-Token||Text||A long string that uniquely identifies each client. Provided by Theca. |
Note that tokens may be revoked by Theca, e.g., if they are compromised or if a token generating service is implemented in a future version of the API.
|Theca-User-Token||Text?||Provided by clients to identify users through system requests. Requests using the same session token will belong to the same session. The provided token will be one-way encrypted (i.e., hashed). Though, it is still not recommended to use sensitive user data for this parameter, such as e-mails or usernames. Internal user IDs or session tokens are both recommended. The maximum size is 255 bytes, the remainder will be discarded. |
This parameter is optional and is used for improving the search results.
Search result data can be returned in either application/json or application/ld+json format. The client chooses which format to use with the HTTP Accept header parameter.
|application/json||The data will be formed in JSON standard. This is the default if no Accept parameter is provided or if / is used.|
|application/ld+json||Returned data follows the LD-JSON RDF format from https://schema.org/. The structure is equivalent to application/json but the @type of complex objects are included which might make development easier. The data returned can be validated at https://validator.schema.org/. |
Note that properties with the enum type will have values prefixed with https://schema.org/ as per the specification. For example, when using LD-JSON the item availability property of in stock will be just "availability": "InStock" for application/json but will be "availability": https://schema.org/InStock for LD-JSON.