Skip to content
PharmaFlow Knowledgebase
Esc
↑↓navigate↵open⌘Jpreview

Resolve the effective rate

Admin only. Returns the rate a sale priced right now would freeze. An admin may pass branch_id to preview another branch, and anyone else is refused.

GET/api/v1/currency/effective
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT from POST /api/v1/auth/login sent as Authorization Bearer.

Query parameters
branch_idstring

Preview another branch. Admins only; every other caller is pinned to their own branch.

Responses
200

The rate that would be frozen

currencyCodestringrequired
baseCurrencystringrequired
ratenumberrequired
rateIdstring | nullrequired
effectiveAtstring | nullrequired
isStalebooleanrequired
ageDaysinteger | nullrequired
Show properties
Any of:
integer
integer
null
null
400

No exchange rate is filed from the base currency to this branch currency

detailstringrequired
401

Not authenticated

detailstringrequired
403

Caller is not an admin, or asked for another branch

detailstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://localhost:8000/api/v1/currency/effective' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "currencyCode": "string",
  "baseCurrency": "string",
  "rate": 0,
  "rateId": "string",
  "effectiveAt": "string",
  "isStale": true,
  "ageDays": -9007199254740991
}