servers:
- url: https://api.astaraconnect.com
  description: Production API server
- url: https://api-staging.astaraconnect.com
  description: Staging API server
paths:
  /v1/links/tracker-travels-more-than-n-km/:
    post:
      summary: Create
      description: "\n                    This endpoint enables you to generate notifications\
        \ for a specified tracker *(tracker_oid)* or a group of trackers *(group_oid)*\
        \ within your company *(company_oid)*. \n                    You will receive\
        \ an email notification at the specified email address *(email)* when the\
        \ distance traveled by any of the trackers reaches *(n_km)* within the predefined\
        \ time range *(periodicity)*, which can be set as Daily, Weekly, or Monthly.\n\
        \                    The vehicle type *(vehicle_type)* specification is optional.\n\
        \                "
      tags:
      - Tracker travels more than n km
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-aaa8d8fccc23
                    enable: true
                    group_oid: 596c18f7-4aeb-4ef7-bd16-c46d55695f5a
                    n_km: 11222
                    notify: Runs 11222 on Day
                    notify_by:
                    - email
                    oid: 55420691-12bd-42bb-8f0c-2b83c29fd4e7
                    periodicity: daily
                    vehicle_type:
                    - car
                    email: example.email@mailing.com
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
        '422':
          description: Unprocessable entity
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 422
                    msg: 'link body is not valid, {''n_km'': [''Missing data for required
                      field.'']}'
                    status: error
        '401':
          description: unauthorized
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 401
                    msg: APIKEY wrong
                    status: error
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tracker_oid:
                  type: string
                group_oid:
                  type: string
                n_km:
                  type: integer
                vehicle_type:
                  type: array
                  items:
                    type: string
                    enum:
                    - car
                    - van
                    - other
                periodicity:
                  type: string
                  enum:
                  - daily
                  - weekly
                  - monthly
                notify_by:
                  type: array
                  items:
                    type: string
                    enum:
                    - email
                email:
                  type: string
              required:
              - n_km
              - notify_by
              - periodicity
              - email
            examples:
              example1:
                value:
                  group_oid: 596c18f7-4aeb-4ef7-bd16-aaa8d8fccc23
                  n_km: '11222'
                  periodicity: daily
                  vehicle_type:
                  - car
                  notify_by:
                  - email
                  email: example.email@mailing.com
    get:
      summary: Get all
      description: "\n                    This endpoint enables you to fetch notifications\
        \ that you've set up within your company *(company_oid)* that are associated\
        \ with [Tracker travels more than N km within a specified time range](https://docs.astaraconnect.com/reference/post_v1-links-tracker-travels-more-than-n-km-1).\n\
        \                "
      tags:
      - Tracker travels more than n km
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                  - company_oid: 1ddfbac7-8729-4efc-bfd4-aaa8d8fccc23
                    enable: true
                    group_oid: 596c18f7-4aeb-4ef7-bd16-c46d55695f5a
                    n_km: 11222
                    notify: Runs 11222 on Day
                    notify_by:
                    - email
                    oid: 55420691-12bd-42bb-8f0c-2b83c29fd4e7
                    periodicity: daily
                    vehicle_type:
                    - car
                    email: example.email@mailing.com
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    parameters:
    - name: company_oid
      in: query
      schema:
        type: string
      required: true
  /v1/links/tracker-travels-more-than-n-km/{oid}:
    get:
      summary: Get a notification by ID
      description: "\n                    This endpoint enables you to fetch a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ travels more than N km within a specified time range](https://docs.astaraconnect.com/reference/post_v1-links-tracker-travels-more-than-n-km-1).\n\
        \                "
      tags:
      - Tracker travels more than n km
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-aaa8d8fccc23
                    enable: true
                    group_oid: 596c18f7-4aeb-4ef7-bd16-c46d55695f5a
                    n_km: 11222
                    notify: Runs 11222 on Day
                    notify_by:
                    - email
                    oid: 55420691-12bd-42bb-8f0c-2b83c29fd4e7
                    periodicity: daily
                    vehicle_type:
                    - car
                    email: example.email@mailing.com
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    put:
      summary: Update
      description: "\n                    This endpoint enables you to modify a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ travels more than N km within a specified time range](https://docs.astaraconnect.com/reference/post_v1-links-tracker-travels-more-than-n-km-1).\n\
        \                    Consequently, the parameters adhere to the same requirements\
        \ as the [POST endpoint](https://docs.astaraconnect.com/reference/post_v1-links-tracker-travels-more-than-n-km-1).\n\
        \                "
      tags:
      - Tracker travels more than n km
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-aaa8d8fccc23
                    enable: true
                    group_oid: 596c18f7-4aeb-4ef7-bd16-c46d55695f5a
                    n_km: 11222
                    notify: Runs 11222 on Day
                    notify_by:
                    - email
                    oid: 55420691-12bd-42bb-8f0c-2b83c29fd4e7
                    periodicity: daily
                    vehicle_type:
                    - car
                    email: example.email@mailing.com
        '422':
          description: Unprocessable entity
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 422
                    msg: 'link body is not valid, {''n_km'': [''Missing data for required
                      field.'']}'
                    status: error
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tracker_oid:
                  type: string
                group_oid:
                  type: string
                n_km:
                  type: integer
                vehicle_type:
                  type: array
                  items:
                    type: string
                    enum:
                    - car
                    - van
                    - other
                periodicity:
                  type: string
                  enum:
                  - daily
                  - weekly
                  - monthly
                notify_by:
                  type: array
                  items:
                    type: string
                    enum:
                    - email
                email:
                  type: string
              required:
              - n_km
              - notify_by
              - periodicity
              - email
            examples:
              example1:
                value:
                  group_oid: 596c18f7-4aeb-4ef7-bd16-aaa8d8fccc23
                  n_km: '11222'
                  periodicity: daily
                  vehicle_type:
                  - car
                  notify_by:
                  - email
                  email: example.email@mailing.com
    delete:
      summary: Delete
      description: "\n                    This endpoint enables you to delete a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ travels more than N km within a specified time range](https://docs.astaraconnect.com/reference/post_v1-links-tracker-travels-more-than-n-km-1).\n\
        \                "
      tags:
      - Tracker travels more than n km
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-aaa8d8fccc23
                    enable: true
                    group_oid: 596c18f7-4aeb-4ef7-bd16-c46d55695f5a
                    n_km: 11222
                    notify: Runs 11222 on Day
                    notify_by:
                    - email
                    oid: 55420691-12bd-42bb-8f0c-2b83c29fd4e7
                    periodicity: daily
                    vehicle_type:
                    - car
                    email: example.email@mailing.com
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    parameters:
    - name: oid
      in: path
      schema:
        type: string
      required: true
  /v1/links/tracker-close-to-poi/:
    post:
      summary: Create
      description: "\n                    This endpoint enables you to generate notifications\
        \ for a specified tracker *(tracker_oid)* or a group of trackers *(group_oid)*\
        \ within your company *(company_oid)*. \n                    You will receive\
        \ an email notification at the specified email address *(email)* if any of\
        \ the trackers comes within a distance of n meters *(meters)* to a predefined\
        \ point/area of interest *(poi_oid)* within your company. To create custom\
        \ points of interest, please consult our [Docs](https://docs.astaraconnect.com/reference/post_v1-pois-create).\n\
        \                    The vehicle type *(vehicle_type)* specification is optional.\n\
        \                "
      tags:
      - Tracker close to poi
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    meters: 1234
                    notify: Approaching Mercamadrid by 1234 from Mercamadrid
                    notify_by:
                    - email
                    oid: 1fdd20f4-d372-4b6c-9981-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
                    email: example.email@mailing.com
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
        '422':
          description: Unprocessable entity
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 422
                    msg: 'link body is not valid, {''meters'': [''Missing data for required
                      field.'']}'
                    status: error
        '401':
          description: unauthorized
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 401
                    msg: APIKEY wrong
                    status: error
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tracker_oid:
                  type: string
                group_oid:
                  type: string
                meters:
                  type: string
                vehicle_type:
                  type: array
                  items:
                    type: string
                    enum:
                    - car
                    - van
                    - other
                notify_by:
                  type: array
                  items:
                    type: string
                    enum:
                    - email
                email:
                  type: string
                poi_oid:
                  type: string
              required:
              - notify_by
              - poi_oid
              - meters
              - email
            examples:
              example1:
                value:
                  tracker_oid: 00a0b668-ab9d-4190-a54e-23432edwr
                  meters: '1234'
                  poi_oid: 8cd13aef-9774-4e46-9687-23rfewr23r
                  notify_by:
                  - email
                  email: example.email@mailing.com
    get:
      summary: Get all
      description: "\n                    This endpoint enables you to fetch notifications\
        \ that you've set up within your company *(company_oid)* that are associated\
        \ with [Tracker is close to poi](https://docs.astaraconnect.com/reference/post_v1-links-tracker-close-to-poi-1).\n\
        \                "
      tags:
      - Tracker close to poi
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                  - company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    meters: 1234
                    notify: Approaching Mercamadrid by 1234 from Mercamadrid
                    notify_by:
                    - email
                    oid: 1fdd20f4-d372-4b6c-9981-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
                    email: example.email@mailing.com
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    parameters:
    - name: company_oid
      in: query
      schema:
        type: string
      required: true
  /v1/links/tracker-close-to-poi/{oid}:
    get:
      summary: Get
      description: "\n                    This endpoint enables you to fetch a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ is close to poi](https://docs.astaraconnect.com/reference/post_v1-links-tracker-close-to-poi-1).\n\
        \                "
      tags:
      - Tracker close to poi
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    meters: 1234
                    notify: Approaching Mercamadrid by 1234 from Mercamadrid
                    notify_by:
                    - email
                    oid: 1fdd20f4-d372-4b6c-9981-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
                    email: example.email@mailing.com
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    put:
      summary: Update
      description: "\n                    This endpoint enables you to modify a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ is close to poi](https://docs.astaraconnect.com/reference/post_v1-links-tracker-close-to-poi-1).\n\
        \                    Consequently, the parameters adhere to the same requirements\
        \ as the [POST endpoint](https://docs.astaraconnect.com/reference/post_v1-links-tracker-close-to-poi-1).\n\
        \                "
      tags:
      - Tracker close to poi
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    meters: 1234
                    notify: Approaching Mercamadrid by 1234 from Mercamadrid
                    notify_by:
                    - email
                    oid: 1fdd20f4-d372-4b6c-9981-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
                    email: example.email@mailing.com
        '422':
          description: Unprocessable entity
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 422
                    msg: 'link body is not valid, {''meters'': [''Missing data for required
                      field.'']}'
                    status: error
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tracker_oid:
                  type: string
                group_oid:
                  type: string
                meters:
                  type: string
                vehicle_type:
                  type: array
                  items:
                    type: string
                    enum:
                    - car
                    - van
                    - other
                notify_by:
                  type: array
                  items:
                    type: string
                    enum:
                    - email
                email:
                  type: string
                poi_oid:
                  type: string
              required:
              - notify_by
              - poi_oid
              - meters
              - email
            examples:
              example1:
                value:
                  tracker_oid: 00a0b668-ab9d-4190-a54e-23432edwr
                  meters: '1234'
                  poi_oid: 8cd13aef-9774-4e46-9687-23rfewr23r
                  notify_by:
                  - email
                  email: example.email@mailing.com
    delete:
      summary: Delete
      description: "\n                    This endpoint enables you to delete a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ is close to poi](https://docs.astaraconnect.com/reference/post_v1-links-tracker-close-to-poi-1).\n\
        \                "
      tags:
      - Tracker close to poi
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    meters: 1234
                    notify: Approaching Mercamadrid by 1234 from Mercamadrid
                    notify_by:
                    - email
                    oid: 1fdd20f4-d372-4b6c-9981-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
                    email: example.email@mailing.com
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    parameters:
    - name: oid
      in: path
      schema:
        type: string
      required: true
  /v1/links/tracker-outside-geofence/:
    post:
      summary: Create
      description: "\n                    This endpoint enables you to generate notifications\
        \ for a specified tracker *(tracker_oid)* or a group of trackers *(group_oid)*\
        \ within your company *(company_oid)*. \n                    You will receive\
        \ an email notification at the specified email address *(email)* if any of\
        \ the trackers is being located outside of a predefined area of interest *(poi_oid)*\
        \ within your company. To create custom areas of interest, please consult\
        \ our [Docs](https://docs.astaraconnect.com/reference/post_v1-pois-create).\n\
        \                    The vehicle type *(vehicle_type)* specification is optional.\n\
        \                "
      tags:
      - Tracker outside geofence
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    notify: Leaving Mercamadrid
                    notify_by:
                    - email
                    oid: 248b9635-4697-4161-a80f-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
                    email: example.email@mailing.com
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
        '422':
          description: Unprocessable entity
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 422
                    msg: 'link body is not valid, {''poi_oid'': [''Missing data for required
                      field.'']}'
                    status: error
        '401':
          description: unauthorized
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 401
                    msg: APIKEY wrong
                    status: error
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tracker_oid:
                  type: string
                group_oid:
                  type: string
                vehicle_type:
                  type: array
                  items:
                    type: string
                    enum:
                    - car
                    - van
                    - other
                notify_by:
                  type: array
                  items:
                    type: string
                    enum:
                    - email
                email:
                  type: string
                poi_oid:
                  type: string
              required:
              - notify_by
              - poi_oid
              - email
            examples:
              example1:
                value:
                  tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
                  notify_by:
                  - email
                  email: example.email@mailing.com
                  poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
    get:
      summary: Get all
      description: "\n                    This endpoint enables you to fetch notifications\
        \ that you've set up within your company *(company_oid)* that are associated\
        \ with [Tracker Outside Geofence](https://docs.astaraconnect.com/reference/post_v1-links-tracker-outside-geofence).\n\
        \                "
      tags:
      - Tracker outside geofence
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                  - company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    notify: Leaving Mercamadrid
                    notify_by:
                    - email
                    oid: 248b9635-4697-4161-a80f-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
                    email: example.email@mailing.com
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    parameters:
    - name: company_oid
      in: query
      schema:
        type: string
      required: true
  /v1/links/tracker-outside-geofence/{oid}:
    get:
      summary: Get
      description: "\n                    This endpoint enables you to fetch a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ Outside Geofence](https://docs.astaraconnect.com/reference/post_v1-links-tracker-outside-geofence).\n\
        \                "
      tags:
      - Tracker outside geofence
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    notify: Leaving Mercamadrid
                    notify_by:
                    - email
                    oid: 248b9635-4697-4161-a80f-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
                    email: example.email@mailing.com
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    put:
      summary: Update
      description: "\n                    This endpoint enables you to modify a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ Outside Geofence](https://docs.astaraconnect.com/reference/post_v1-links-tracker-outside-geofence).\n\
        \                    Consequently, the parameters adhere to the same requirements\
        \ as the [POST endpoint](https://docs.astaraconnect.com/reference/post_v1-links-tracker-outside-geofence).\n\
        \                "
      tags:
      - Tracker outside geofence
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    notify: Leaving Mercamadrid
                    notify_by:
                    - email
                    oid: 248b9635-4697-4161-a80f-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
                    email: example.email@mailing.com
        '422':
          description: Unprocessable entity
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 422
                    msg: 'link body is not valid, {''poi_oid'': [''Missing data for required
                      field.'']}'
                    status: error
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tracker_oid:
                  type: string
                group_oid:
                  type: string
                vehicle_type:
                  type: array
                  items:
                    type: string
                    enum:
                    - car
                    - van
                    - other
                notify_by:
                  type: array
                  items:
                    type: string
                    enum:
                    - email
                email:
                  type: string
                poi_oid:
                  type: string
              required:
              - notify_by
              - poi_oid
              - email
            examples:
              example1:
                value:
                  tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
                  notify_by:
                  - email
                  email: example.email@mailing.com
                  poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
    delete:
      summary: Delete
      description: "\n                    This endpoint enables you to delete a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ Outside Geofence](https://docs.astaraconnect.com/reference/post_v1-links-tracker-outside-geofence).\n\
        \                "
      tags:
      - Tracker outside geofence
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    notify: Leaving Mercamadrid
                    notify_by:
                    - email
                    oid: 248b9635-4697-4161-a80f-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
                    email: example.email@mailing.com
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    parameters:
    - name: oid
      in: path
      schema:
        type: string
      required: true
  /v1/links/tracker-inside-geofence/:
    post:
      summary: Create
      description: "\n                    This endpoint enables you to generate notifications\
        \ for a specified tracker *(tracker_oid)* or a group of trackers *(group_oid)*\
        \ within your company *(company_oid)*. \n                    You will receive\
        \ an email notification at the specified email address *(email)* if any of\
        \ the trackers is being located inside of a predefined area of interest *(poi_oid)*\
        \ within your company. To create custom areas of interest, please consult\
        \ our [Docs](https://docs.astaraconnect.com/reference/post_v1-pois-create).\n\
        \                    The vehicle type *(vehicle_type)* specification is optional.\n\
        \                "
      tags:
      - Tracker inside geofence
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    notify: Entering Mercamadrid
                    notify_by:
                    - email
                    email: example.email@mailing.com
                    oid: 248b9635-4697-4161-a80f-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
        '422':
          description: Unprocessable entity
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 422
                    msg: 'link body is not valid, {''poi_oid'': [''Missing data for required
                      field.'']}'
                    status: error
        '401':
          description: unauthorized
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 401
                    msg: APIKEY wrong
                    status: error
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tracker_oid:
                  type: string
                group_oid:
                  type: string
                vehicle_type:
                  type: array
                  items:
                    type: string
                    enum:
                    - car
                    - van
                    - other
                notify_by:
                  type: array
                  items:
                    type: string
                    enum:
                    - email
                email:
                  type: string
                poi_oid:
                  type: string
              required:
              - notify_by
              - poi_oid
              - email
    get:
      summary: Get all
      description: "\n                    This endpoint enables you to fetch notifications\
        \ that you've set up within your company *(company_oid)* that are associated\
        \ with [Tracker Inside Geofence](https://docs.astaraconnect.com/reference/post_v1-links-tracker-inside-geofence-1).\n\
        \                "
      tags:
      - Tracker inside geofence
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                  - company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    notify: Entering Mercamadrid
                    notify_by:
                    - email
                    email: example.email@mailing.com
                    oid: 248b9635-4697-4161-a80f-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    parameters:
    - name: company_oid
      in: query
      schema:
        type: string
      required: true
  /v1/links/tracker-inside-geofence/{oid}:
    get:
      summary: Get
      description: "\n                    This endpoint enables you to fetch a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ Inside Geofence](https://docs.astaraconnect.com/reference/post_v1-links-tracker-inside-geofence-1).\n\
        \                "
      tags:
      - Tracker inside geofence
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    notify: Entering Mercamadrid
                    notify_by:
                    - email
                    email: example.email@mailing.com
                    oid: 248b9635-4697-4161-a80f-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    put:
      summary: Update
      description: "\n                    This endpoint enables you to modify a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ Inside Geofence](https://docs.astaraconnect.com/reference/post_v1-links-tracker-inside-geofence-1).\n\
        \                    Consequently, the parameters adhere to the same requirements\
        \ as the [POST endpoint](https://docs.astaraconnect.com/reference/post_v1-links-tracker-inside-geofence-1).\n\
        \                "
      tags:
      - Tracker inside geofence
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    notify: Entering Mercamadrid
                    notify_by:
                    - email
                    email: example.email@mailing.com
                    oid: 248b9635-4697-4161-a80f-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
        '422':
          description: Unprocessable entity
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 422
                    msg: 'link body is not valid, {''poi_oid'': [''Missing data for required
                      field.'']}'
                    status: error
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tracker_oid:
                  type: string
                group_oid:
                  type: string
                vehicle_type:
                  type: array
                  items:
                    type: string
                    enum:
                    - car
                    - van
                    - other
                notify_by:
                  type: array
                  items:
                    type: string
                    enum:
                    - email
                email:
                  type: string
                poi_oid:
                  type: string
              required:
              - notify_by
              - poi_oid
              - email
    delete:
      summary: Delete
      description: "\n                    This endpoint enables you to delete a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ Inside Geofence](https://docs.astaraconnect.com/reference/post_v1-links-tracker-inside-geofence-1).\n\
        \                "
      tags:
      - Tracker inside geofence
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-c46d55695f5a
                    enable: true
                    notify: Entering Mercamadrid
                    notify_by:
                    - email
                    email: example.email@mailing.com
                    oid: 248b9635-4697-4161-a80f-c46d55695f5a
                    poi_oid: 8cd13aef-9774-4e46-9687-c46d55695f5a
                    tracker_oid: 00a0b668-ab9d-4190-a54e-c46d55695f5a
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    parameters:
    - name: oid
      in: path
      schema:
        type: string
      required: true
  /v1/links/tracker-inside-geofence-for-more-than-n-minutes/:
    post:
      summary: Create
      description: "\n                    This endpoint enables you to generate notifications\
        \ for a specified tracker *(tracker_oid)* or a group of trackers *(group_oid)*\
        \ within your company *(company_oid)*. \n                    You will receive\
        \ an email notification at the specified email address *(email)* if any of\
        \ the trackers spends n minutes *(minutes)* within a predefined area of interest\
        \ *(poi_oid)* in your company. To create custom areas of interest, please\
        \ consult our [Docs](https://docs.astaraconnect.com/reference/post_v1-pois-create).\n\
        \                    The vehicle type *(vehicle_type)* specification is optional.\n\
        \                "
      tags:
      - Tracker inside geofence for more than n minutes
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-dbda27cde3c8
                    enable: true
                    minutes: 1001
                    notify: Entrando en España peninsular
                    notify_by:
                    - email
                    email: example.email@mailing.com
                    oid: f7b696f0-ebc1-4d8c-b9a6-bc32ec955b89
                    poi_oid: 8cd13aef-9774-4e46-9687-41092d827303
                    tracker_oid: 00a0b668-ab9d-4190-a54e-bc32ec955b89
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
        '422':
          description: Unprocessable entity
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 422
                    msg: 'link body is not valid, {''minutes'': [''Missing data for required
                      field.'']}'
                    status: error
        '401':
          description: unauthorized
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 401
                    msg: APIKEY wrong
                    status: error
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tracker_oid:
                  type: string
                group_oid:
                  type: string
                minutes:
                  type: string
                vehicle_type:
                  type: array
                  items:
                    type: string
                    enum:
                    - car
                    - van
                    - other
                notify_by:
                  type: array
                  items:
                    type: string
                    enum:
                    - email
                email:
                  type: string
                poi_oid:
                  type: string
              required:
              - notify_by
              - email
              - poi_oid
              - minutes
            examples:
              example1:
                value:
                  tracker_oid: 00a0b668-ab9d-4190-a54e-41092d827303
                  minutes: '1001'
                  poi_oid: 8cd13aef-9774-4e46-9687-bc32ec955b89
                  notify_by:
                  - email
                  email: example.email@mailing.com
    get:
      summary: Get all
      description: "\n                    This endpoint enables you to fetch notifications\
        \ that you've set up within your company *(company_oid)* that are associated\
        \ with [Tracker inside a geofence for more than n minutes](https://docs.astaraconnect.com/reference/post_v1-links-tracker-inside-geofence-for-more-than-n-minutes-1).\n\
        \                "
      tags:
      - Tracker inside geofence for more than n minutes
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                  - company_oid: 1ddfbac7-8729-4efc-bfd4-dbda27cde3c8
                    enable: true
                    minutes: 1001
                    notify: Entrando en España peninsular
                    notify_by:
                    - email
                    email: example.email@mailing.com
                    oid: f7b696f0-ebc1-4d8c-b9a6-bc32ec955b89
                    poi_oid: 8cd13aef-9774-4e46-9687-41092d827303
                    tracker_oid: 00a0b668-ab9d-4190-a54e-bc32ec955b89
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    parameters:
    - name: company_oid
      in: query
      schema:
        type: string
      required: true
  /v1/links/tracker-inside-geofence-for-more-than-n-minutes/{oid}:
    get:
      summary: Get
      description: "\n                    This endpoint enables you to fetch a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ inside a geofence for more than n minutes](https://docs.astaraconnect.com/reference/post_v1-links-tracker-inside-geofence-for-more-than-n-minutes-1).\n\
        \                "
      tags:
      - Tracker inside geofence for more than n minutes
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-dbda27cde3c8
                    enable: true
                    minutes: 1001
                    notify: Entrando en España peninsular
                    notify_by:
                    - email
                    email: example.email@mailing.com
                    oid: f7b696f0-ebc1-4d8c-b9a6-bc32ec955b89
                    poi_oid: 8cd13aef-9774-4e46-9687-41092d827303
                    tracker_oid: 00a0b668-ab9d-4190-a54e-bc32ec955b89
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    put:
      summary: Update
      description: "\n                    This endpoint enables you to modify a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ inside a geofence for more than n minutes](https://docs.astaraconnect.com/reference/post_v1-links-tracker-inside-geofence-for-more-than-n-minutes-1).\n\
        \                    Consequently, the parameters adhere to the same requirements\
        \ as the [POST endpoint](https://docs.astaraconnect.com/reference/post_v1-links-tracker-inside-geofence-for-more-than-n-minutes-1).\n\
        \                "
      tags:
      - Tracker inside geofence for more than n minutes
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-dbda27cde3c8
                    enable: true
                    minutes: 1001
                    notify: Entrando en España peninsular
                    notify_by:
                    - email
                    email: example.email@mailing.com
                    oid: f7b696f0-ebc1-4d8c-b9a6-bc32ec955b89
                    poi_oid: 8cd13aef-9774-4e46-9687-41092d827303
                    tracker_oid: 00a0b668-ab9d-4190-a54e-bc32ec955b89
        '422':
          description: Unprocessable entity
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 422
                    msg: 'link body is not valid, {''minutes'': [''Missing data for required
                      field.'']}'
                    status: error
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tracker_oid:
                  type: string
                group_oid:
                  type: string
                minutes:
                  type: string
                vehicle_type:
                  type: array
                  items:
                    type: string
                    enum:
                    - car
                    - van
                    - other
                notify_by:
                  type: array
                  items:
                    type: string
                    enum:
                    - email
                email:
                  type: string
                poi_oid:
                  type: string
              required:
              - notify_by
              - email
              - poi_oid
              - minutes
            examples:
              example1:
                value:
                  tracker_oid: 00a0b668-ab9d-4190-a54e-41092d827303
                  minutes: '1001'
                  poi_oid: 8cd13aef-9774-4e46-9687-bc32ec955b89
                  notify_by:
                  - email
                  email: example.email@mailing.com
    delete:
      summary: Delete
      description: "\n                    This endpoint enables you to delete a specific\
        \ notification using the notification oid *(oid)* associated with [Tracker\
        \ inside a geofence for more than n minutes](https://docs.astaraconnect.com/reference/post_v1-links-tracker-inside-geofence-for-more-than-n-minutes-1).\n\
        \                "
      tags:
      - Tracker inside geofence for more than n minutes
      security:
      - BearerAuth:
        - read
      - ApiKeyAuth:
        - read
      responses:
        '200':
          description: Success
          content:
            application/json:
              examples:
                example1:
                  value:
                    company_oid: 1ddfbac7-8729-4efc-bfd4-dbda27cde3c8
                    enable: true
                    minutes: 1001
                    notify: Entrando en España peninsular
                    notify_by:
                    - email
                    email: example.email@mailing.com
                    oid: f7b696f0-ebc1-4d8c-b9a6-bc32ec955b89
                    poi_oid: 8cd13aef-9774-4e46-9687-41092d827303
                    tracker_oid: 00a0b668-ab9d-4190-a54e-bc32ec955b89
        '404':
          description: Not found
          content:
            application/json:
              examples:
                example1:
                  value:
                    err_code: 701
                    error: 404
                    msg: OID not found
                    status: error
    parameters:
    - name: oid
      in: path
      schema:
        type: string
      required: true
info:
  title: Links
  version: 1.213.0
openapi: 3.0.2
components:
  schemas:
    LinkKMSchema:
      type: object
      properties:
        enable:
          type: boolean
        group_oid:
          type: string
          nullable: true
        company_oid:
          type: string
        tracker_oid:
          type: string
          nullable: true
        periodicity:
          type: string
        oid:
          type: string
        notify_by:
          type: array
          items:
            type: string
        webhook:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        n_km:
          type: integer
          format: int32
      required:
      - n_km
      - notify_by
      - periodicity
    TrackerOutsidePOISchema:
      type: object
      properties:
        enable:
          type: boolean
        group_oid:
          type: string
          nullable: true
        poi_oid:
          type: string
        company_oid:
          type: string
        tracker_oid:
          type: string
          nullable: true
        oid:
          type: string
        notify_by:
          type: array
          items:
            type: string
        webhook:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
      required:
      - notify_by
      - poi_oid
    TrackerClosePOISchema:
      type: object
      properties:
        meters:
          type: integer
          format: int32
        enable:
          type: boolean
        group_oid:
          type: string
          nullable: true
        poi_oid:
          type: string
        company_oid:
          type: string
        tracker_oid:
          type: string
          nullable: true
        oid:
          type: string
        notify_by:
          type: array
          items:
            type: string
        webhook:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
      required:
      - meters
      - notify_by
      - poi_oid
    TrackerInsidePOISchema:
      type: object
      properties:
        enable:
          type: boolean
        group_oid:
          type: string
          nullable: true
        poi_oid:
          type: string
        company_oid:
          type: string
        tracker_oid:
          type: string
          nullable: true
        oid:
          type: string
        notify_by:
          type: array
          items:
            type: string
        webhook:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
      required:
      - notify_by
      - poi_oid
    TrackerMaxTimePOI:
      type: object
      properties:
        enable:
          type: boolean
        group_oid:
          type: string
          nullable: true
        poi_oid:
          type: string
        company_oid:
          type: string
        tracker_oid:
          type: string
          nullable: true
        minutes:
          type: integer
          format: int32
        oid:
          type: string
        notify_by:
          type: array
          items:
            type: string
        webhook:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
      required:
      - minutes
      - notify_by
      - poi_oid
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-BOTON-APIKEY
