AthausDocs

Create or update a project

Request, parameters, response and errors of PUT /v1/projects/{externalProjectId}.

Last updated:

Updates the project with this external id, which is your reference or the id Athaus gave it. It merges: a member the body does not name stays. An unknown id is a 404 unless createIfMissing=true, which creates it under the id of the path. The body's metadata.source.offererMarketingKey, if present, must equal the id in the path. Safe to repeat. Needs write access to projects.

Requires the scope propose and at least the level write on projects.

Request

PUT https://api.athaus.ai/v1/projects/{externalProjectId}

Parameters

Path

NameTypeRequiredDescription
externalProjectIdstringyesYour reference of the project: the value of metadata.source.offererMarketingKey. A project without one has its own projectId here, and the projectId always works in the path. 1 to 128 letters, digits, dots, underscores or hyphens, not starting or ending with a dot.

Query

NameTypeRequiredDescription
createIfMissingstringnoCreate the project when the id is unknown. Without it an unknown id is a 404. Default false.

Header

NameTypeRequiredDescription
Athaus-VersionstringnoOptional and carries nothing a client needs: the version is the path. Accepted when it says v1 or 1. Any other value is a 400 api_version_unsupported.
If-MatchstringnoOnly if the current ETag of the resource is listed (or *: only if the resource exists). Otherwise 412 and nothing is written.
If-None-Matchstringno*: only if no resource with this reference exists yet (create, never change). Otherwise 412 and nothing is written.

Request body

JSON with Content-Type: application/json. A field the API does not know is a 400, and errors[].name names the field. The body is required.

FieldTypeDescription
dataobject
data.estateTypestringOne of NEW_BUILD_PROJECT, NEW_HOME_PROJECT.
data.estateSubTypestring | object | null | any
data.distributionTypestringOne of BUY, RENT, BUY_RENT.
data.unitsobject
data.units.numberOfUnitsnumber0 to 999999.
data.units.priceFromnumber0 to .
data.units.priceTonumber0 to .
data.units.livingSpaceFromnumber0 to .
data.units.livingSpaceTonumber0 to .
data.units.numberOfRoomsFromnumber0 to .
data.units.numberOfRoomsTonumber0 to .
data.units.furnishingLevelstringOne of NOT_PROVIDED, STANDARD, UPSCALE, FULL.
data.units.provisionTypestringOne of PROVISION_FREE, PROVISION_FOR_BUYER, NOT_PROVIDED.
data.units.provisionPercentnumber0 to .
data.units.provisionIsVatIncludedstringOne of YES, NO, NOT_PROVIDED.
data.units.soldOutPercentagenumber0 to .
data.locationobject
data.location.postalcodestring
data.location.citystring
data.location.streetstring
data.location.houseNumberstring
data.location.unitstring
data.location.staircasestring
data.location.floorNumberinteger-5 to 999.
data.location.entrancestring
data.location.statestring
data.location.countrystringOne of 249 values from the list in the standard.
data.location.geometryobject
data.location.geometry.typestringAlways Point.
data.location.geometry.coordinatesnumber[]
data.location.showAddressbooleanDefault true.
data.location.locationNotemap<string>
data.programobject
data.program.projectStatusstringOne of CONSTRUCTION_START, PROJECT_ENDED.
data.deliveryDatestring
data.structureobject
data.structure.buildingobject
data.structure.building.numberOfFloorsinteger1 to 999.
data.textsobject
data.texts.headlinemap<string>
data.texts.descriptionmap<string>
data.texts.featuresmap<string>
data.texts.extendedInformationmap<string>
data.texts.areamap<string>
data.linksobject
data.links.externalLinksobject[]
data.links.externalLinks[].urlstring
data.links.externalLinks[].urlTypestringOne of MAP, MOVIE, PANORAMA, REVOCATION_INSTRUCTION, OFFERER_DETAIL_PAGE.
data.links.externalLinks[].titlestring
data.links.virtualToursobject[]
data.links.virtualTours[].urlstring
data.links.virtualTours[].providerstring
data.links.virtualTours[].titlestring
data.contactobject
data.contact.salutationstringOne of Mr, Mrs, Miss, Ms, Mx, Sir, Dame, Dr, Cllr, Lady, Lord.
data.contact.firstNamestring
data.contact.lastNamestring
data.contact.namestring
data.contact.emailAddressstring
data.contact.phoneNumberstring
data.contact.mobilePhoneNumberstring
data.contact.imageURLstring
data.contact.userHomepagestring
data.contact.postalCodestring
data.contact.citystring
data.contact.streetstring
data.contact.houseNumberstring
data.contact.countrystring
data.contact.preferredContactTypestringOne of ANONYMOUS, BY_PHONE, BY_EMAIL, OWN_WEBSITE.
data.contact.contactNotemap<string>
data.contact.displayedInformationobject
data.contact.displayedInformation.mainContactPersonobject
data.contact.displayedInformation.additionalContactPersonobject
metadataobject
metadata.sourceobject
metadata.source.offererMarketingKeystring
metadata.source.offererEstateIdstring
metadata.portalWebKeystring
statusstringOurs, not OpenImmo: the name of one of the office's project states, for example Sales. Without it a new project starts in the first state of the office.

Example

curl -X PUT "https://api.athaus.ai/v1/projects/PRJ-1-ext" \
  -H "Authorization: Bearer ath_live_..." \
  -H "Content-Type: application/json" \
  -d '{"data":{"estateType":"NEW_BUILD_PROJECT","estateSubType":null,"distributionType":"BUY","units":{"provisionType":"PROVISION_FREE"},"location":{"postalcode":"04107","city":"Leipzig","street":"Kantstrasse","houseNumber":"37","country":"DEU","geometry":{"type":"Point","coordinates":[12.3731,51.3397]}},"texts":{"headline":{"de":"Waldstadt Suites"},"description":{"de":"Dreißig Wohnungen am Park."}}},"metadata":{"source":{"offererEstateId":"PRJ-7","offererMarketingKey":"PRJ-7"}},"status":"Vertrieb"}'

Response

On success the status is 202 with ProjectReceipt.

ProjectReceipt

FieldTypeDescription
requestIdstring
projectIdstring
externalProjectIdstring
warningsobject[]
warnings[].typestring
warnings[].messagestring

Response headers

HeaderDescription
Request-IdIdentifies this request. Quote it in a support request.
Athaus-VersionThe API version of this response: v1.
Athaus-ReleaseThe release of v1 that answered, for example 1.0. A label for support and changelogs; no request can select it.
RateLimit-PolicyThe quota policy of the bucket that applies.
RateLimitRemaining quota and seconds until the bucket is full again.

Errors

Every error arrives as problem details. Branch on code, not on title or detail.

StatusCodesMeaning
400invalid_query, api_version_unsupported, invalid_input, invalid_bodyInvalid request.
401unauthorizedMissing or invalid API key.
403insufficient_permissions, plan_requiredThe key lacks a right, or the plan does not include API access.
404not_foundNothing under this ID.
409The request conflicts with the state of the resource (for example a duplicate), or with an idempotency key.
412precondition_failedThe condition of If-Match (or If-None-Match) does not hold for the current state of the resource. Nothing was written.
413payload_too_largeThe request body is larger than 512 KB.
415invalid_inputThe request body is not JSON. Send Content-Type: application/json.
429rate_limitedRate limit exceeded.
500internal_errorServer error.

Keep reading

On this page