Poll an approval request created by a 202 response from post/send/void, credit-notes or refunds.
Poll an approval request created by a 202 response from post/send/void, credit-notes or refunds.
GET
https://staging.softsolz.uk/api/v1/services/invoicing/approvals/{id}Recent Requests
Log in to see full request historyTimeStatusUser Agent
Make a request to see history.
Path Params
idstringrequiredHeaders
AuthorizationstringrequiredBearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.
Response
Response Body
idintegerApproval request id (the approval_instance_id from the 202 response).statusstringApproval status.resource_typestringWhat is awaiting approval (invoice.post, invoice.refund, invoice.write_off, invoice.credit).resource_idintegerId of the resource awaiting approval.resource_summarystring | nullHuman summary of the resource.current_step_orderintegerStep currently awaiting action.final_decisionstring | nullFinal decision once resolved.requested_atstringWhen the approval was requested.finished_atstring | nullWhen the approval was resolved.stepsarray of objectsPer-step progress as { step_order, status }.Request
import { SoftSolz } from '@softsolz/sdk';
const client = new SoftSolz({ apiKey: process.env.SOFTSOLZ_API_KEY });
const result = await client.invoicing.getApproval('<id>');console.log(result);Credentials
Sent as a Bearer token. Stored only in your browser.
Response · 200
{ "data": { "id": 0, "status": "string", "resource_type": "string", "resource_id": 0, "resource_summary": "string", "current_step_order": 0, "final_decision": "string", "requested_at": "string", "finished_at": "string", "steps": [] }}