Sites

This Endpoint only works if the company is set to 'company_type' == 'industry'.

Get Sites

GET https://api.binity.io/v1/companies/:uuid/sites

Get all sites of that specific company.

Headers

Name
Type
Description

Authorization

string

Bearer Token

{
  "sites":[
    {
      "uuid":"e1535b8d-78b2-4a74-ab64-3dc01f12cee1",
      "name":"Test",
      "description":"",
      "lat":"51.55394735",
      "lng":"7.47145698",
      "zoom":17,
      "image":"path_to.jpg",
      "image_coordinates":"[[7.4714428259425745,51.553947348620795],[7.4715843426321555,51.55395966748398],[7.471618306636827,51.55366577369577],[7.471476789948014,51.553658734300114]]",
      "rotated":true,
      "uploaded":true,
      "created_at":"2021-07-14T10:39:22.198+02:00",
      "updated_at":"2021-07-14T10:39:56.872+02:00",
    }
  ],
  "meta":{
    "pagination":{
      "per_page":25,
      "total_pages":1,
      "total_objects":5,
      "links":{
        "first":"/v1/companies/2938e76d-7b1f-4c88-ab67-f0b54eac3265/sites?page=1",
        "last":"/v1/companies/2938e76d-7b1f-4c88-ab67-f0b54eac3265/sites?page=1"
      }
    }
  }
}

Create Site

POST https://api.binity.io/v1/companies/:uuid/sites

Create a new site.

Headers

Name
Type
Description

Authorization

string

Bearer Token

Request Body

Name
Type
Description

image

string

Image of the site plan, sent as multipart.

name

string

The name of this site.

image_coordinates

array

Array of coordinates.

project_uuid

string

The project this vehicle should be part of.

{
  "site":{
    "uuid":"e1535b8d-78b2-4a74-ab64-3dc01f12cee1",
    "name":"Test",
    "description":"",
    "lat":"51.55394735",
    "lng":"7.47145698",
    "zoom":17,
    "image":"path_to.jpg",
    "image_coordinates":"[[7.4714428259425745,51.553947348620795],[7.4715843426321555,51.55395966748398],[7.471618306636827,51.55366577369577],[7.471476789948014,51.553658734300114]]",
    "rotated":true,
    "uploaded":true,
    "created_at":"2021-07-14T10:39:22.198+02:00",
    "updated_at":"2021-07-14T10:39:56.872+02:00",
  }
}

Get Site

GET https://api.binity.io/v1/companies/:uuid/sites/:site_uuid

Get data of a single site.

Headers

Name
Type
Description

Authorization

string

Bearer Token

{
  "site":{
    "uuid":"e1535b8d-78b2-4a74-ab64-3dc01f12cee1",
    "name":"Test",
    "description":"",
    "lat":"51.55394735",
    "lng":"7.47145698",
    "zoom":17,
    "image":"path_to.jpg",
    "image_coordinates":"[[7.4714428259425745,51.553947348620795],[7.4715843426321555,51.55395966748398],[7.471618306636827,51.55366577369577],[7.471476789948014,51.553658734300114]]",
    "rotated":true,
    "uploaded":true,
    "created_at":"2021-07-14T10:39:22.198+02:00",
    "updated_at":"2021-07-14T10:39:56.872+02:00",
  }
}

Update Site

PATCH https://api.binity.io/v1/companies/:uuid/sites/:site_uuid

Update data of a single site.

Headers

Name
Type
Description

Authorization

string

Bearer Token

{
  "site":{
    "uuid":"e1535b8d-78b2-4a74-ab64-3dc01f12cee1",
    "name":"Test",
    "description":"",
    "lat":"51.55394735",
    "lng":"7.47145698",
    "zoom":17,
    "image":"path_to.jpg",
    "image_coordinates":"[[7.4714428259425745,51.553947348620795],[7.4715843426321555,51.55395966748398],[7.471618306636827,51.55366577369577],[7.471476789948014,51.553658734300114]]",
    "rotated":true,
    "uploaded":true,
    "created_at":"2021-07-14T10:39:22.198+02:00",
    "updated_at":"2021-07-14T10:39:56.872+02:00",
  }
}

Delete Site

DELETE https://api.binity.io/v1/companies/:uuid/sites/:site_uuid

Delete a single site.

Headers

Name
Type
Description

Authorization

string

Bearer Token

{
  "deleted": true
}

Last updated

Was this helpful?