Skip to main content
POST
/
plan-items
/
v1
/
ad
/
area
Create a area plan item
curl --request POST \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/plan-items/v1/ad/area \
  --header 'Authorization: Bearer <token>' \
  --header 'content-type: <content-type>' \
  --header 'x-session-token: <x-session-token>' \
  --data '
{
  "name": "Plan Item 1",
  "rectPoint": [
    [
      1,
      1
    ],
    [
      2,
      2
    ]
  ],
  "planId": 1
}
'
{
  "data": {
    "id": 1,
    "name": "Plan Item 1",
    "type": 2,
    "entityType": 1,
    "rectPoint": [
      [
        10.5,
        20.3
      ],
      [
        30,
        45.7
      ],
      [
        15.2,
        80.9
      ]
    ],
    "planId": 1,
    "updatedAt": "2024-12-01T12:34:56.000Z",
    "createdAt": "2024-12-01T12:34:56.000Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-session-token
string
required

Session token used for authenticating the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwic2Vzc2lvbklkIjoiYWJjZGVmMTIzNDU2IiwiaWF0IjoxNjA1MDk3ODk5LCJleHAiOjE2MDUxODQyOTl9.4XRQ1iXDyvEj5LgPZHbmTmzOZs98M3YPOzgf3MhxjaI"

content-type
string
required

Content type, must be "application/json".

Allowed value: "application/json"

Body

application/json
name
string
required

The name of the plan item

Example:

"Plan Item 1"

rectPoint
tuple[]
required

The rect point of the plan item

Example:
[[1, 1], [2, 2]]
planId
number
required

The id of the plan that the plan item belongs to

Example:

1

Response

201 - application/json

Plan item created

data
object
required