Mint a sandbox link code
POST
/billing/sandbox/link-code
const url = 'https://api.sloose.com/billing/sandbox/link-code';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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.sloose.com/billing/sandbox/link-code \ --header 'Authorization: Bearer <token>'An admin of the production org mints a one-time code, valid for 24 hours. An admin of the org that is to become the sandbox then redeems it at POST /billing/sandbox/attach.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”A single-use code, valid for 24 hours.
Media typeapplication/json
object
code
required
string
expiresAt
required
string
Examplegenerated
{ "code": "example", "expiresAt": "example"}No bearer, or one that is expired, revoked or no longer resolves to a member.
Media typeapplication/json
The error envelope every non-2xx answer uses.
object
error
required
Human-readable explanation.
string
code
Machine-readable reason. Absent on a few legacy 400s.
string
key
additional properties
Examplegenerated
{ "error": "example", "code": "example"}The plan’s sandbox allowance is already used up.
Media typeapplication/json
object
error
required
string
code
required
string
max
required
number
used
required
number
key
additional properties
Example
{ "code": "LIMIT_SANDBOX"}The session’s org no longer exists.
Media typeapplication/json
object
error
required
string
key
additional properties
Examplegenerated
{ "error": "example"}A sandbox cannot have sandboxes of its own.
Media typeapplication/json
object
error
required
string
code
required
string
key
additional properties
Example
{ "code": "SANDBOX_ORG"}