Make the company's connected Square account its merchant (explicit switch)
POST
/v1/workspace/merchant/square
const url = 'https://api.vocapable.com/v1/workspace/merchant/square';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"installation_id":"example","location_id":"example","replace_current":false,"expected_revision":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vocapable.com/v1/workspace/merchant/square \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "installation_id": "example", "location_id": "example", "replace_current": false, "expected_revision": 1 }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
WorkspaceMerchantState
The company’s own merchant account for customer payments (not Vocapable billing).
object
platform_ready
required
Platform Ready
boolean
account
required
Any of:
WorkspaceMerchantAccount
object
id
required
Id
string
provider
required
Provider
string
external_account_id
required
External Account Id
string
environment
required
Environment
string
status
required
Status
string
charges_enabled
required
Charges Enabled
boolean
details_submitted
required
Details Submitted
boolean
revision
required
Revision
integer
null
can_manage
required
Can Manage
boolean
Example
{ "platform_blocker": "platform_not_configured", "platform_environment": "test", "account": { "provider": "stripe", "environment": "test", "status": "pending" }}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}