openapi: 3.2.0 info: version: 1.6.0 title: iBanFirst Logs API description: "iBanFirst API for cross-border payments, FX trades, account management, beneficiaries, and webhooks.\n\n**Try it out in Postman:** [View Postman Collection](https://www.postman.com/productibf/ibanfirst-rest-api-workspace/collection/d24hl8d/ibanfirst-rest-api?action=share&creator=44872188)\n\n---\n\n## Authentication — X-WSSE\n\nEvery request must include an `X-WSSE` header. Plain HTTP calls will fail. The token is **stateless and expires after ~5 minutes**, so it must be computed fresh for each request.\n\n### Header format\n\n```\nX-WSSE: UsernameToken Username=\"\", PasswordDigest=\"\", Nonce=\"\", Created=\"\"\n```\n\n### Fields\n\n| Field | Description |\n|---|---|\n| `Username` | The username assigned during onboarding. |\n| `Nonce` | A Base64-encoded random hex string (≥ 32 hex characters). |\n| `Created` | Current UTC timestamp in ISO 8601: `YYYY-MM-DDTHH:MM:SSZ`. |\n| `PasswordDigest` | `Base64( SHA-1( nonce_bytes ∥ created_bytes ∥ secret_bytes ) )` — SHA-1 **binary** digest, then Base64. |\n\n### Algorithm (step-by-step)\n\n1. Generate a random nonce: at least 32 lowercase hexadecimal characters (e.g. `d36e3162829ed4c89851497a717f0001`).\n2. Get the current UTC timestamp as an ISO-8601 string (e.g. `2026-05-12T10:30:00Z`).\n3. Encode the nonce string as UTF-8 bytes, the timestamp as UTF-8 bytes, and the API secret as UTF-8 bytes.\n4. Compute `SHA-1( nonce_bytes + created_bytes + secret_bytes )`. The hash **must** be the raw binary digest (not hex).\n5. `PasswordDigest` = `Base64( sha1_binary_digest )`\n6. `Nonce` = `Base64( nonce_utf8_bytes )`\n\n### Code samples\n\n**Python**\n```python\nimport base64, hashlib, os, binascii\nfrom datetime import datetime, timezone\n\ndef generate_xwsse(username: str, secret: str) -> str:\n nonce = binascii.b2a_hex(os.urandom(16)) # 32 hex bytes\n created = datetime.now(timezone.utc).strftime(\"%Y-%m-%dT%H:%M:%SZ\")\n digest = base64.b64encode(\n hashlib.sha1(nonce + created.encode() + secret.encode()).digest()\n ).decode()\n nonce_b64 = base64.b64encode(nonce).decode()\n return f'UsernameToken Username=\"{username}\", PasswordDigest=\"{digest}\", Nonce=\"{nonce_b64}\", Created=\"{created}\"'\n```\n\n**JavaScript (Node.js)**\n```javascript\nconst crypto = require('crypto');\nfunction generateXWSSE(username, secret) {\n const nonce = crypto.randomBytes(16);\n const created = new Date().toISOString();\n const digest = crypto.createHash('sha1')\n .update(nonce)\n .update(Buffer.from(created))\n .update(Buffer.from(secret))\n .digest('base64');\n return `UsernameToken Username=\"${username}\", PasswordDigest=\"${digest}\", Nonce=\"${nonce.toString('base64')}\", Created=\"${created}\"`;\n}\n```\n\n**PHP**\n```php\nfunction generateXWSSE(string $username, string $secret): string {\n $nonce = bin2hex(random_bytes(16)); // 32 hex chars\n $created = gmdate('Y-m-d\\TH:i:s\\Z');\n $digest = base64_encode(sha1($nonce . $created . $secret, true));\n return sprintf('UsernameToken Username=\"%s\", PasswordDigest=\"%s\", Nonce=\"%s\", Created=\"%s\"',\n $username, $digest, base64_encode($nonce), $created);\n}\n```\n\n### Environments\n\n| Environment | Base URL |\n|---|---|\n| Demo (testing) | `https://api-demo.ibanfirst.com/api` |\n| Live (production) | `https://api.ibanfirst.com/api` |\n\n### Forbidden characters in input fields\n\nThe following characters are rejected in route parameters, query parameters, and JSON bodies: `&` `<` `>` `%` `?` `\\` `/` `|`" servers: - url: https://api-demo.ibanfirst.com/api security: - X-WSSE: [] tags: - name: Logs paths: /logs: get: summary: Get logs list tags: - Logs description: "The iBanFirst API provides a log feed for every request sent allowing you to know exactly the result on our platform.\n\n This service uses the login sent in your header as a filter to get logs about this user's actions." parameters: - name: page in: query description: 'Index of the page. ' required: false schema: type: string default: '1' - name: per_page in: query description: 'Number of items returned. ' required: false schema: type: string default: '50' - name: sort in: query description: 'A code representing the order of rendering objects. ' required: false schema: type: string enum: - ASC - DESC responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Log' '204': description: No logs found default: description: ERROR content: application/json: schema: $ref: '#/components/schemas/Error' /logs/{nonce}: get: summary: Get log details tags: - Logs description: "In case of somewhat happens during the request, this service API allows you to retrieve a log entry by its nonce. \n" parameters: - name: nonce in: path description: 'The nonce used to authenticate the request. As the one in the header, this nonce has to be Base64 encoded. The nonce you get with `GET /logs` is already encoded. ' required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Log' default: description: ERROR content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: Error: type: object description: 'Representation of an error. ' properties: errorCode: type: number format: int description: 'The code referring the error. ' errorType: type: string description: 'A short description identifying a general category for the error that occurred. ' errorMessage: type: string description: Error description. link: type: string description: 'An hyperlink to access the page that describes more accurately the error. ' Log: type: object description: 'Representation of a log. ' properties: id: $ref: '#/components/schemas/ID' createdAt: $ref: '#/components/schemas/Datetime' closedAt: $ref: '#/components/schemas/Datetime' tokenNonce: type: string description: 'The nonce used in the HTTP header to authenticate the request. ' remoteAddress: type: string maxLength: 15 description: 'The IP address of the request''s emiter. ' requestMethod: type: string maxLength: 6 description: 'The HTTP method of the request ' uriRequested: type: string description: 'The Universal Resource Identifier given for this request. ' parametersGiven: type: string description: 'The optional parameters *(e.g. after the ?)* given for this request. ' requestBody: type: string description: 'The HTTP request body. ' httpResponseCode: type: number format: int description: 'The HTTP response code. ' responseBody: type: string description: 'The text sent by the server as a result for the request. ' restErrorTypeId: type: number format: integer description: 'If there is an error during the processing the request, this id could be used to find this error. ' login: type: string description: 'The login used for the request. ' legalname: type: string description: 'The legal name of the client used for the request. ' Datetime: type: string pattern: ^((19[0,99]|2[0-9]{3})\-(0[1-9]|1[012])\-([012][0-9]|3[01])\ ([01][0-9]|2[0-3])\:([0-5][0-9])\:([0-5][0-9]))$ format: ^((19[0,99]|2[0-9]{3})\-(0[1-9]|1[012])\-([012][0-9]|3[01])\ ([01][0-9]|2[0-3])\:([0-5][0-9])\:([0-5][0-9]))$ example: '2016-01-01 00:00:00' description: 'A String representing a date by its year, month, day in month, hour, minute and second. ' ID: type: string pattern: ^[A-Za-z0-9]+$ format: ^[A-Za-z0-9]+$ example: Na5Dv6E description: 'A String representing the id of an object. This string contains alpha-numeric characters, including the capital ones. ' securitySchemes: X-WSSE: type: apiKey in: header name: X-WSSE description: 'X-WSSE token-based authentication. The header value must be computed fresh for every request (tokens expire in ~5 minutes). Header value format: ``` UsernameToken Username="", PasswordDigest="", Nonce="", Created="" ``` Algorithm: 1. Generate a random nonce: ≥ 32 lowercase hex characters. 2. Get current UTC timestamp in ISO 8601: `YYYY-MM-DDTHH:MM:SSZ`. 3. Compute `PasswordDigest = Base64( SHA-1( nonce_bytes + created_bytes + secret_bytes ) )` — SHA-1 over the raw UTF-8 bytes concatenated in that order, result must be the binary digest before Base64 encoding. 4. Compute `Nonce = Base64( nonce_utf8_bytes )`. See the `info.description` field at the top of this spec for full code samples in Python, JavaScript, PHP, Java, and Go.'