Request Parameters
This section describes how an API call passes the request parameters to REST APIs for SwiftFederation solutions.
Request Parameters
Based on the parameter location, the client passes the request parameters to the API in 5 types:
- Path Parameters, such as
/v1.1/customer/{customer_id}
- Query Parameters, such as
/user?role=admin&location=SG
- Header Parameters, such as
X-SFD-Date: 20250725T023747Z
- Cookie Parameters, such as
Cookie: type=1; token=SPe28ioladkDC
- Body Parameters, such as
{ "name": "jike", "location": "SG" }
in JSON format
Path Parameters
Path parameters are the variable parts of a URL path to point to a specific resource within a collection, such as a user identified by ID. A URL can have several path parameters, each denoted with curly braces { }
.
# Path parameters to pass the customer ID
# Here
# {customer_id} to demote the customer ID
GET /v1.1/customer/{customer_id} HTTP/1.1
Query Parameters
Query parameters are appended to the end of the request URI after a question mark (?
). They consist of one or more key=value
pairs separated by ampersands (&
). Query parameters can be either required or optional.
GET /v1.1/customer/35394?role=viewer&location=SG HTTP/1.1
Header Parameters
An API call enables sending the custom headers as parameters to the API gateway. Custom request headers are defined by the client. By default, the request headers for the signature purpose must be included:
- Authorisation
- X-SFD-Date
- X-SFD-Fzone
- X-SFD-Nonce
- X-SFD-Signature-Version
GET /v1.1/customer/35394 HTTP/1.1
Host: open-api.swiftfederation.com
Content-Type: application/json; charset=utf-8
Authorization: HMAC-SHA256 O80ybSq26xUE383u:3ebba5b79c247db566d957638ecc9d085d4805a957f84ad8114af721635a41a7
X-SFD-FZone: SG
X-SFD-Date: 20250806T045529Z
X-SFD-Nonce: 15121
X-SFD-Signature-Version: 2
Cookie Parameters
An API call can pass parameters in the Cookie
header, such as Cookie: name=value
. Multiple cookie parameters can be sent in the same Cookie
header, separated by a semicolon and space.
GET /v1.1/customer/35394 HTTP/1.1
Host: open-api.swiftfederation.com
Cookie: type=1; token=SPe28ioladkDC
Body Parameters
In most cases, an API call uses the request body to pass parameters, making it easier to pass a large number of parameters. Below is an example of body parameter, do not use it to make an API call:
POST /upload HTTP/1.1
Host: open-api.swiftfederation.com
{
"name": "jike",
"location": "SG"
}