# Landings ## Landing API: `/api/bw/v2/landing` Allows you to add, update or delete Landings in a Boldest platform account. Among many other things, it can also be used to categorize Landings. --- ## Endpoints ### POST `/api/bw/v2/landing` - Create/Update Landing Create or update a Landing using JSON data according to Schema. **Request:** - `json` (POST body) - Data to import in JSON format according to Schema `/api/bw/v2/landing/schema.json` Consult the [**`Schema documentation`**](#landing-schema-documentation) for the structure of the JSON data. **Response `HTTP 200`** - Skipped (no update needed): ```json { "done": "Skip Landing TEST111", "id": "TEST111", "new": false, "update": false } ``` **Response `HTTP 201`** - Created: ```json { "done": "Create Landing TEST111", "id": "TEST111", "new": true, "update": true } ``` **Response `HTTP 202`** - Accepted (updated): ```json { "done": "Update Landing TEST111", "id": "TEST111", "new": false, "update": true } ``` **Response `HTTP 400`** - Wrong request: ```json { "fail": "Wrong request" } ``` **Response `HTTP 401`** - Unauthorized: ```json { "fail": "Unauthorized" } ``` **Response `HTTP 409`** - Conflict (invalid contents): ```json { "fail": "Explanation of the problems encountered" } ``` --- ### GET `/api/bw/v2/landing/{ids}` - Get Landings Retrieve one or more Landings by ID. **Request:** - `/{ids}` (path) - Id or Ids in CSV format (Optional) - `/published/{1|0|*}` (path) - Published status (Optional) (Default: 1) - `/fields/{fields}` (path) - Only these fields (Optional) (Omit for all) - `/ignoreFields/{fields}` (path) - Ignore these fields (Optional) (Omit for none) - `/excludeFiles` (path) - Ignore file fields (Optional) (Omit for none) **Response `HTTP 200`** - Success: Landing data in JSON format according to Schema (`schema.json` or `schema.multiple.json`) **Response `HTTP 400`** - Wrong request: ```json { "fail": "Wrong request" } ``` **Response `HTTP 401`** - Unauthorized: ```json { "fail": "Unauthorized" } ``` **Response `HTTP 404`** - Not found: ```json { "fail": "ERROR: Export fail" } ``` --- ### DELETE `/api/bw/v2/landing/{ids}` - Delete Landings Delete one or more Landings by ID. **Request:** - `/{ids}` (path) - Id or Ids in CSV format **Response `HTTP 202`** - Deleted: ```json { "done": "Deletion of 5 Landings done", "count": 5 // Number of Landings deleted } ``` Partial deletion: ```json { "done": "Deletion of 3 Landings done", "count": 3, // Number of Landings deleted "fail": "Deletion of 2 Landings not done", "failed": ["TEST114", "TEST115"] } ``` **Response `HTTP 400`** - Wrong request: ```json { "fail": "Wrong request" } ``` **Response `HTTP 401`** - Unauthorized: ```json { "fail": "Unauthorized" } ``` **Response `HTTP 404`** - Not found: ```json { "fail": "No Landings to delete" } ``` **Response `HTTP 409`** - Conflict: ```json { "fail": "Deletion of 5 Landings not done" } ``` --- ### POST/GET `/api/bw/v2/landing/clone/{id}` - Clone Landing Clone a Landing. **Request:** - `/{id}` (path) - Id (Optional) (Default: Landing "Base" is cloned) **Response `HTTP 201`** - Cloned: ```json { "done": "Cloned Landing TEST111 to Landing TEST111_8PtTXiU6mcw", "id": "TEST111_8PtTXiU6mcw" } ``` **Response `HTTP 400`** - Wrong request: ```json { "fail": "Wrong request" } ``` **Response `HTTP 401`** - Unauthorized: ```json { "fail": "Unauthorized" } ``` **Response `HTTP 404`** - Not found: ```json { "fail": "There is no Landing TEST111 to clone" } ``` **Response `HTTP 409`** - Conflict: ```json { "fail": "Not cloned Landing TEST111" } ``` --- ### GET `/api/bw/v2/landing/schema.json` - Get Schema Get JSON Schema from the data structure of a Landing. **Request:** - `/full` (path) - Schema and data (Optional) **Response `HTTP 200`** - Success: JSON schema document --- ### GET `/api/bw/v2/landing/schema.multiple.json` - Get Batch Schema Get JSON Schema of a group of Landings in a batch process. **Request:** - `/full` (path) - Schema and data (Optional) **Response `HTTP 200`** - Success: JSON schema document --- (landing-schema-documentation)= ```{include} landing.schema.json.md.merge :parser: myst_parser.sphinx_ ```