Create or replace a unit
Idempotent: project slug and unit code are the identity. 201 when created, 200 when replaced. Optional fields left out are cleared. `status` left out is left alone; sent on a held, reserved or sold unit it is refused with 409. `images` and `files`, when present, replace the unit's linked media.
Idempotent: project slug and unit code are the identity. 201 when created, 200 when replaced. Optional fields left out are cleared. status left out is left alone; sent on a held, reserved or sold unit it is refused with 409. images and files, when present, replace the unit's linked media.
Authorization
apiKey An API key from the back office (settings → API), sent as Authorization: Bearer mlm_live_….
In: header
Path Parameters
^[a-z0-9]+(-[a-z0-9]+)*$2 <= length <= 1001 <= length <= 50Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/v1/integration/projects/string/units/string" \ -H "Content-Type: application/json" \ -d '{ "type": "string", "areaSqm": 1, "priceSar": 1 }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8", "code": "string", "type": "string", "areaSqm": 1, "priceSar": 1, "vatIncluded": true, "vatRate": 0, "depositPercent": 0, "status": "available", "bedrooms": 0, "bathrooms": 0, "deliveryYear": 2000, "description": "string", "images": [], "files": [], "holdExpiresAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "projectName": "string", "projectSlug": "string", "ref": "string"}