Refresh Token
POST https://api.staging.sawfish.com.au/api/v2/accounting/token/refresh-tokenWhen the token has expired, use this endpoint to get a new valid token.
Headers
Section titled “Headers”| Header | Type | Required |
|---|---|---|
x-client-id |
string | ✅ |
x-api-key |
string | ✅ |
Body Params
Section titled “Body Params”| Param | Type | Description |
|---|---|---|
refresh_token |
string | The refresh token returned by Generate Token |
Example Request
Section titled “Example Request”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" }'Responses
Section titled “Responses”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"}
