Shace
Shace Partner API

Sandbox

Server

Sandbox only, full integration only. These endpoints exist on api-sandbox.shace.se and not in production, where they answer 404. Like the Deals endpoints they need full integration and answer 403 with listings sync. They play the tenant's side of a lead, one call per step, so you can watch every deal event reach your receiver and build against it without a real tenant.

Start with POST /sandbox/deals on one of your published listings: a test tenant shows interest and deal.created fires. Then answer it the way you will in production (POST /deals/{id}/accept or /decline, or by mail) and drive the rest from here: the tenant writes, books a viewing, signs, withdraws and comes back, or the lead expires. Each call returns the deal as it is afterwards, and the events arrive at your endpoints as they would in production.

The steps only act on test deals made here, and the test tenant is the same for every organization in the sandbox.


Create a test lead

POST
https://api-sandbox.shace.se/partner/v1
/sandbox/deals
Bearer

A test tenant shows interest in one of your published listings. The deal starts pending and fires deal.created, exactly like a real lead; answer it with POST /deals/{id}/accept or /decline, or by mail. Answers 409 when the listing is not published, and 412 when the sandbox's test tenant is not set up on this environment.

Create a test lead › Request Body

listingId
​string · minLength: 1 · required

The listing the tenant is interested in: its Shace id, or ext:<your reference>.

Create a test lead › Responses

OK

A tenant's interest in one of your listings.
id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of the deal.

status
​string · enum · required

pending: waiting for your answer. accepted: you took the tenant on and the conversation is open. declined: you said no. expired: nobody answered in time. lost: the tenant withdrew or Shace closed it.

Enum values:
pending
accepted
declined
expired
lost
createdAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the tenant showed interest.

statusChangedAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the deal entered its current status. Events that do not change the status (a viewing, a message) keep it. Neither this nor an event's createdAt guarantees the order events arrive in; when order matters, read the deal.

​required

When a pending deal expires unanswered; null in every other status. Expiry runs nightly, so the deal can still be answered until that run; deal.expired follows it.

​required

The deal's number at your organization, counting from 1000. Fixed for the deal's life.

​required

How people refer to the deal, like VAS-1042: your organization's prefix and the deal's number. Show it to your staff; key your records on id.

replyAddress
​string · email · pattern: ^(?!\.)(?!.*\.\.)([A… · required

The tenant's contact address for this deal. Store it as the lead's email: the tenant's messages arrive from it, and mail your staff send to it reaches the tenant's chat. The first mail to a pending deal accepts it.

url
​string · uri · required

The deal in Shace, for people with an account. Its form follows the status: /dashboard/deals?peek=<reference> (the lead) while pending, /chats/<id> (the conversation) once accepted, /dashboard/deals after that. Take it as a link; do not parse it.

​required

The listing the tenant is interested in; null when the match was not on one of your listings.

​object · required

Who the tenant is. Personal contact details are never shared; use replyAddress.

​object · required

What the tenant asked for. The listed codes are the current ones; treat an unknown value as free text.


Write as the tenant

POST
https://api-sandbox.shace.se/partner/v1
/sandbox/deals/{id}/message
Bearer

The test tenant writes in the deal's conversation, which fires deal.message_created and is mailed to your side like any tenant message. Only an accepted deal has a conversation; answers 409 before that.

Write as the tenant › path Parameters

id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of a test deal, from POST /sandbox/deals or the event.

Write as the tenant › Request Body optional

message
​string · minLength: 1 · maxLength: 2000

What the tenant writes, in plain text. Defaults to "Hej! Passar torsdag kl 10 för en visning? (simulerat)"

Write as the tenant › Responses

OK

A tenant's interest in one of your listings.
id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of the deal.

status
​string · enum · required

pending: waiting for your answer. accepted: you took the tenant on and the conversation is open. declined: you said no. expired: nobody answered in time. lost: the tenant withdrew or Shace closed it.

Enum values:
pending
accepted
declined
expired
lost
createdAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the tenant showed interest.

statusChangedAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the deal entered its current status. Events that do not change the status (a viewing, a message) keep it. Neither this nor an event's createdAt guarantees the order events arrive in; when order matters, read the deal.

​required

When a pending deal expires unanswered; null in every other status. Expiry runs nightly, so the deal can still be answered until that run; deal.expired follows it.

​required

The deal's number at your organization, counting from 1000. Fixed for the deal's life.

​required

How people refer to the deal, like VAS-1042: your organization's prefix and the deal's number. Show it to your staff; key your records on id.

replyAddress
​string · email · pattern: ^(?!\.)(?!.*\.\.)([A… · required

The tenant's contact address for this deal. Store it as the lead's email: the tenant's messages arrive from it, and mail your staff send to it reaches the tenant's chat. The first mail to a pending deal accepts it.

url
​string · uri · required

The deal in Shace, for people with an account. Its form follows the status: /dashboard/deals?peek=<reference> (the lead) while pending, /chats/<id> (the conversation) once accepted, /dashboard/deals after that. Take it as a link; do not parse it.

​required

The listing the tenant is interested in; null when the match was not on one of your listings.

​object · required

Who the tenant is. Personal contact details are never shared; use replyAddress.

​object · required

What the tenant asked for. The listed codes are the current ones; treat an unknown value as free text.


Book a viewing as the tenant

POST
https://api-sandbox.shace.se/partner/v1
/sandbox/deals/{id}/viewing
Bearer

Proposes a viewing tomorrow at 10:00 Stockholm time on your organization's behalf and has the test tenant book it, which fires deal.viewing_proposed and then deal.viewing_booked (and deal.viewing_cancelled first when it replaces a booked viewing). Only an accepted deal can book a viewing; answers 409 before that.

Book a viewing as the tenant › path Parameters

id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of a test deal, from POST /sandbox/deals or the event.

Book a viewing as the tenant › Responses

OK

A tenant's interest in one of your listings.
id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of the deal.

status
​string · enum · required

pending: waiting for your answer. accepted: you took the tenant on and the conversation is open. declined: you said no. expired: nobody answered in time. lost: the tenant withdrew or Shace closed it.

Enum values:
pending
accepted
declined
expired
lost
createdAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the tenant showed interest.

statusChangedAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the deal entered its current status. Events that do not change the status (a viewing, a message) keep it. Neither this nor an event's createdAt guarantees the order events arrive in; when order matters, read the deal.

​required

When a pending deal expires unanswered; null in every other status. Expiry runs nightly, so the deal can still be answered until that run; deal.expired follows it.

​required

The deal's number at your organization, counting from 1000. Fixed for the deal's life.

​required

How people refer to the deal, like VAS-1042: your organization's prefix and the deal's number. Show it to your staff; key your records on id.

replyAddress
​string · email · pattern: ^(?!\.)(?!.*\.\.)([A… · required

The tenant's contact address for this deal. Store it as the lead's email: the tenant's messages arrive from it, and mail your staff send to it reaches the tenant's chat. The first mail to a pending deal accepts it.

url
​string · uri · required

The deal in Shace, for people with an account. Its form follows the status: /dashboard/deals?peek=<reference> (the lead) while pending, /chats/<id> (the conversation) once accepted, /dashboard/deals after that. Take it as a link; do not parse it.

​required

The listing the tenant is interested in; null when the match was not on one of your listings.

​object · required

Who the tenant is. Personal contact details are never shared; use replyAddress.

​object · required

What the tenant asked for. The listed codes are the current ones; treat an unknown value as free text.


Sign a contract

POST
https://api-sandbox.shace.se/partner/v1
/sandbox/deals/{id}/contract
Bearer

Both sides sign a placeholder contract, which fires deal.contract_signed. No e-signing service is involved. Only an accepted deal without a contract can be signed; answers 409 otherwise.

Sign a contract › path Parameters

id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of a test deal, from POST /sandbox/deals or the event.

Sign a contract › Responses

OK

A tenant's interest in one of your listings.
id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of the deal.

status
​string · enum · required

pending: waiting for your answer. accepted: you took the tenant on and the conversation is open. declined: you said no. expired: nobody answered in time. lost: the tenant withdrew or Shace closed it.

Enum values:
pending
accepted
declined
expired
lost
createdAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the tenant showed interest.

statusChangedAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the deal entered its current status. Events that do not change the status (a viewing, a message) keep it. Neither this nor an event's createdAt guarantees the order events arrive in; when order matters, read the deal.

​required

When a pending deal expires unanswered; null in every other status. Expiry runs nightly, so the deal can still be answered until that run; deal.expired follows it.

​required

The deal's number at your organization, counting from 1000. Fixed for the deal's life.

​required

How people refer to the deal, like VAS-1042: your organization's prefix and the deal's number. Show it to your staff; key your records on id.

replyAddress
​string · email · pattern: ^(?!\.)(?!.*\.\.)([A… · required

The tenant's contact address for this deal. Store it as the lead's email: the tenant's messages arrive from it, and mail your staff send to it reaches the tenant's chat. The first mail to a pending deal accepts it.

url
​string · uri · required

The deal in Shace, for people with an account. Its form follows the status: /dashboard/deals?peek=<reference> (the lead) while pending, /chats/<id> (the conversation) once accepted, /dashboard/deals after that. Take it as a link; do not parse it.

​required

The listing the tenant is interested in; null when the match was not on one of your listings.

​object · required

Who the tenant is. Personal contact details are never shared; use replyAddress.

​object · required

What the tenant asked for. The listed codes are the current ones; treat an unknown value as free text.


Withdraw as the tenant

POST
https://api-sandbox.shace.se/partner/v1
/sandbox/deals/{id}/withdraw
Bearer

The test tenant loses interest before you answer, which fires deal.lost. Only a pending deal can be withdrawn.

Withdraw as the tenant › path Parameters

id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of a test deal, from POST /sandbox/deals or the event.

Withdraw as the tenant › Responses

OK

A tenant's interest in one of your listings.
id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of the deal.

status
​string · enum · required

pending: waiting for your answer. accepted: you took the tenant on and the conversation is open. declined: you said no. expired: nobody answered in time. lost: the tenant withdrew or Shace closed it.

Enum values:
pending
accepted
declined
expired
lost
createdAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the tenant showed interest.

statusChangedAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the deal entered its current status. Events that do not change the status (a viewing, a message) keep it. Neither this nor an event's createdAt guarantees the order events arrive in; when order matters, read the deal.

​required

When a pending deal expires unanswered; null in every other status. Expiry runs nightly, so the deal can still be answered until that run; deal.expired follows it.

​required

The deal's number at your organization, counting from 1000. Fixed for the deal's life.

​required

How people refer to the deal, like VAS-1042: your organization's prefix and the deal's number. Show it to your staff; key your records on id.

replyAddress
​string · email · pattern: ^(?!\.)(?!.*\.\.)([A… · required

The tenant's contact address for this deal. Store it as the lead's email: the tenant's messages arrive from it, and mail your staff send to it reaches the tenant's chat. The first mail to a pending deal accepts it.

url
​string · uri · required

The deal in Shace, for people with an account. Its form follows the status: /dashboard/deals?peek=<reference> (the lead) while pending, /chats/<id> (the conversation) once accepted, /dashboard/deals after that. Take it as a link; do not parse it.

​required

The listing the tenant is interested in; null when the match was not on one of your listings.

​object · required

Who the tenant is. Personal contact details are never shared; use replyAddress.

​object · required

What the tenant asked for. The listed codes are the current ones; treat an unknown value as free text.


Come back as the tenant

POST
https://api-sandbox.shace.se/partner/v1
/sandbox/deals/{id}/reopen
Bearer

The test tenant is interested again after withdrawing, which fires deal.reopened and makes the deal pending again. Only a withdrawn deal can come back.

Come back as the tenant › path Parameters

id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of a test deal, from POST /sandbox/deals or the event.

Come back as the tenant › Responses

OK

A tenant's interest in one of your listings.
id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of the deal.

status
​string · enum · required

pending: waiting for your answer. accepted: you took the tenant on and the conversation is open. declined: you said no. expired: nobody answered in time. lost: the tenant withdrew or Shace closed it.

Enum values:
pending
accepted
declined
expired
lost
createdAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the tenant showed interest.

statusChangedAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the deal entered its current status. Events that do not change the status (a viewing, a message) keep it. Neither this nor an event's createdAt guarantees the order events arrive in; when order matters, read the deal.

​required

When a pending deal expires unanswered; null in every other status. Expiry runs nightly, so the deal can still be answered until that run; deal.expired follows it.

​required

The deal's number at your organization, counting from 1000. Fixed for the deal's life.

​required

How people refer to the deal, like VAS-1042: your organization's prefix and the deal's number. Show it to your staff; key your records on id.

replyAddress
​string · email · pattern: ^(?!\.)(?!.*\.\.)([A… · required

The tenant's contact address for this deal. Store it as the lead's email: the tenant's messages arrive from it, and mail your staff send to it reaches the tenant's chat. The first mail to a pending deal accepts it.

url
​string · uri · required

The deal in Shace, for people with an account. Its form follows the status: /dashboard/deals?peek=<reference> (the lead) while pending, /chats/<id> (the conversation) once accepted, /dashboard/deals after that. Take it as a link; do not parse it.

​required

The listing the tenant is interested in; null when the match was not on one of your listings.

​object · required

Who the tenant is. Personal contact details are never shared; use replyAddress.

​object · required

What the tenant asked for. The listed codes are the current ones; treat an unknown value as free text.


Expire the lead

POST
https://api-sandbox.shace.se/partner/v1
/sandbox/deals/{id}/expire
Bearer

Skips the wait: the deal runs out unanswered now instead of at expiresAt, which fires deal.expired. Only a pending deal can expire.

Expire the lead › path Parameters

id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of a test deal, from POST /sandbox/deals or the event.

Expire the lead › Responses

OK

A tenant's interest in one of your listings.
id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Shace id of the deal.

status
​string · enum · required

pending: waiting for your answer. accepted: you took the tenant on and the conversation is open. declined: you said no. expired: nobody answered in time. lost: the tenant withdrew or Shace closed it.

Enum values:
pending
accepted
declined
expired
lost
createdAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the tenant showed interest.

statusChangedAt
​string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

When the deal entered its current status. Events that do not change the status (a viewing, a message) keep it. Neither this nor an event's createdAt guarantees the order events arrive in; when order matters, read the deal.

​required

When a pending deal expires unanswered; null in every other status. Expiry runs nightly, so the deal can still be answered until that run; deal.expired follows it.

​required

The deal's number at your organization, counting from 1000. Fixed for the deal's life.

​required

How people refer to the deal, like VAS-1042: your organization's prefix and the deal's number. Show it to your staff; key your records on id.

replyAddress
​string · email · pattern: ^(?!\.)(?!.*\.\.)([A… · required

The tenant's contact address for this deal. Store it as the lead's email: the tenant's messages arrive from it, and mail your staff send to it reaches the tenant's chat. The first mail to a pending deal accepts it.

url
​string · uri · required

The deal in Shace, for people with an account. Its form follows the status: /dashboard/deals?peek=<reference> (the lead) while pending, /chats/<id> (the conversation) once accepted, /dashboard/deals after that. Take it as a link; do not parse it.

​required

The listing the tenant is interested in; null when the match was not on one of your listings.

​object · required

Who the tenant is. Personal contact details are never shared; use replyAddress.

​object · required

What the tenant asked for. The listed codes are the current ones; treat an unknown value as free text.