Shace
Shace Partner API

Buildings and addresses. Push them on their own when several units share an address.


Read an object

GET
https://api-preview.shace.se/partner/v1
/objects/{id}
Bearer

id is a Shace UUID or ext:<externalRef>. A UUID that is not one of your objects is looked up as an externalRef, so the URL you pushed to with PUT always reads back.

Read an objectpath Parameters

id
string · minLength: 1 · required

Object id, or ext:<your reference>.

Read an object Responses

OK

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

Shace id.

required

Your reference, or null when the object was created in the app.

status
string · enum · required

archived objects cannot carry published listings.

Enum values:
active
archived
streetAddress
string · required

Street and number.

required

Floor, entrance or suite, or null.

postalCode
string · required

Postal code.

city
string · required

City.

required

County or region, or null.

countryCode
string · required

ISO 3166-1 alpha-2.

required

Geocoded point, WGS84.

listingCount
integer · min: -9007199254740991 · max: 9007199254740991 · required

Listings on this object, in any status.

createdVia
string · enum · required

Whether the object was created in the app or through this API.

Enum values:
app
api
createdAt
string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

ISO 8601 UTC.

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

ISO 8601 UTC.


Create or update an object (a building or address) by your own reference

PUT
https://api-preview.shace.se/partner/v1
/objects/{id}
Bearer

Idempotent. Geocoded on create and whenever the address changes; an unchanged address is a no-op. Pushing the ref of an archived object puts it back in service, but does not republish the listings that archiving unpublished: push each of them again to bring them back.

Outcomes

The same request in other situations, as outcome and status:

  • First push of a new reference: created, active
  • The same address again: not geocoded again, nothing is written: unchanged, active
  • The address changed: geocoded again, every listing on the object follows: updated, active
  • The reference of an archived object, pushed again: updated, active

Create or update an object (a building or address) by your own referencepath Parameters

id
string · minLength: 1 · maxLength: 128 · required

Your external reference for the object, URL-encoded. Send it directly, without adding ext:.

Create or update an object (a building or address) by your own reference Request Body

streetAddress
string · minLength: 1 · maxLength: 200 · required

Street and number, as the landlord writes it.

postalCode
string · minLength: 1 · maxLength: 20 · required

Postal code.

city
string · minLength: 1 · maxLength: 100 · required

City.

Floor, entrance or suite. Optional.

County or region. Optional.

countryCode
string · minLength: 2 · maxLength: 2

ISO 3166-1 alpha-2. Only SE is enabled today.

Default: SE

Create or update an object (a building or address) by your own reference Responses

OK

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

Shace id.

required

Your reference, or null when the object was created in the app.

status
string · enum · required

archived objects cannot carry published listings.

Enum values:
active
archived
streetAddress
string · required

Street and number.

required

Floor, entrance or suite, or null.

postalCode
string · required

Postal code.

city
string · required

City.

required

County or region, or null.

countryCode
string · required

ISO 3166-1 alpha-2.

required

Geocoded point, WGS84.

listingCount
integer · min: -9007199254740991 · max: 9007199254740991 · required

Listings on this object, in any status.

createdVia
string · enum · required

Whether the object was created in the app or through this API.

Enum values:
app
api
createdAt
string · date-time · pattern: ^(?:(?:\d\d[2468][04… · required

ISO 8601 UTC.

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

ISO 8601 UTC.

outcome
string · enum · required

What the request did. unchanged means the address matched what Shace already holds.

Enum values:
created
updated
unchanged

Archive an object

DELETE
https://api-preview.shace.se/partner/v1
/objects/{id}
Bearer

id is a Shace UUID or ext:<externalRef> (a UUID that is not one of your objects is looked up as an externalRef). Nothing is hard-deleted. The object is archived and any published listings on it are unpublished; their ids are returned. Idempotent.

Archive an objectpath Parameters

id
string · minLength: 1 · required

Object id, or ext:<your reference>.

Archive an object Responses

OK

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

Shace id of the object.

status
string · const · required

Always archived.

Const value: archived
unpublishedListingIds
string[] · required

Listings that were live on the object and are now unpublished.


List your objects

GET
https://api-preview.shace.se/partner/v1
/objects
Bearer

Newest first, cursor paginated. Archived objects are excluded unless includeArchived=true.

List your objectsquery Parameters

cursor
string

nextCursor from the previous page.

limit
integer · min: 1 · max: 200

Page size, 1 to 200.

Default: 50
includeArchived
string · enum

Include archived objects.

Enum values:
true
false
Default: false

List your objects Responses

OK

object[] · required

The page, newest first.

required

Pass as ?cursor= to fetch the next page; null on the last page.