Skip to main content

Post Document

info

All JSON array responses have been shortened for readability.

POST/<ApplicationID/collections/<CollectionID>/documents/<DocumentID>
Endpoint Requires Authentication
Example
https://api.weightron.cloud/641c1177ebc8b2f3c195b02c/collections/641c1177ebc8b2f3c195b033/documents
Request Body
{
"name": "Area 5",
"block": false
}
Description

Inserts a new document into the collection. The returned object is the object inserted to the database, after all calculations are finished.

If a document ID is provided, the target document is fully replaced. This is equivalent to a PUT request with a filter by ID. The document _hash must be included in the object (see more).

Returns
{
"timestamp": "2023-03-23T15:52:01.855Z",
"data": {
"_id": "641c75a18fde9d1d8a0e247e",
"name": "Area 5",
"block": false,
"_hash": "4f189f73cc42d5f21afb19a1125f2f94edadec3e",
"_updatedAt": "2023-03-23T15:52:01.765Z",
"_createdAt": "2023-03-23T15:52:01.765Z",
"_changedBy": "641c11c7ebc8b2f3c195b098"
}
}