Skip to content

Refresh Token

POST https://api.staging.sawfish.com.au/api/v2/accounting/token/refresh-token

When the token has expired, use this endpoint to get a new valid token.

Header Type Required
x-client-id string
x-api-key string
Param Type Description
refresh_token string The refresh token returned by Generate Token
Terminal window
curl --request POST \
--url https://api.staging.sawfish.com.au/api/v2/accounting/token/refresh-token \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-client-id: your-client-id' \
--header 'x-api-key: your-api-key' \
--data '{ "refresh_token": "your_refresh_token" }'

200 - Successful response

{
"status": "SUCCESS",
"data": {
"token": "your_token",
"refresh_token": "your_refresh_token",
"expiration": 1691123100
}
}

401 Unauthorized / 500 Internal Server Error

{
"status": "ERROR",
"message": "Sample error message"
}