POST /property/post
This endpoint is ON HOLD. Do not implement it yet: the behaviour described here (creation in Mapaprop, image processing, rollback) is under review and may change.
The property object's fields are no longer documented here: they live in The property JSON object, which is the current reference. And the conceptual model, in The property model.
General Rules
Through a structured JSON, a property can be imported into Mapaprop.
- You must have a Mapaprop account.
- You must have at least 1 image.
- Images must be available at a URL.
- Certain fields are required.
- Upon certain failures, the import is rolled back.
- Regarding images:
- If there is more than one image, they are processed in ordered list.
- If at least one image can be fetched, the import is processed.
- If all images fail, the import is cancelled.
- The first image in the list will always be the
mainImage.
- You can set whether the property is published via the
published = truefield. - You must know the
branchId. ThecustomerIdis derived automatically from the authentication token (any value sent in the body is ignored for security reasons).
This service will import property JSON to Mapaprop.
Processing is asynchronous. The endpoint responds immediately with an executionArn that identifies the execution. Property creation, image download/processing and indexing happen in the background. Progress status can be queried with GET /property/get/status/machine/{executionArn}.
| Resource information | |
|---|---|
| Authentication | Required (JWT) |
| HTTP Method | POST |
| Response | JSON |
| Version | 1 |
Resource URL
https://property-api.mapaprop.com/property/post
Sample code
POST /property/post
Host: property-api.mapaprop.com
Content-Type: application/json
Authorization: Bearer {access_token}
The request body is the property JSON (see "Complete JSON model"). The customerId is derived from the authentication token: if included in the body, it is ignored and replaced with the one from the token.
The object you send
The required fields, the complete JSON model and the internals of location, images and
attributes are in The property JSON object. They
are documented once, there.
Response
The import is asynchronous. The endpoint starts background processing and responds immediately with the execution identifier (executionArn), which is then used to query the status via GET /property/get/status/machine/{executionArn}.
| Field | Type | Description |
|---|---|---|
message | string | Confirmation that processing has started (Property creation started). |
executionArn | string | Execution identifier to query progress status. |
Sample response
{
"message": "Property creation started",
"executionArn": "arn:aws:states:us-east-1:000000000000:execution:PropertyWorkflow:Property-1717500000000"
}
Errors
| Status | Body | Cause |
|---|---|---|
| 401 | { "error": "Unauthorized: missing auth context" } | The token did not resolve a valid customerId. |
| 401 | { "error": "Unauthorized: missing Bearer token" } | The Authorization: Bearer {access_token} header is missing. |
| 500 | { "error": "..." } | Error starting the processing. |
Validation errors for required fields (Missing required field: {field}, Invalid type for {field}: expected {type}) occur during asynchronous processing and are reported when querying the execution status.