> ## Documentation Index
> Fetch the complete documentation index at: https://developer.easyparkgroup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Import a parking

> Starts, extends or stops a parking. Posting an `externalParkingId` that
already exists updates that parking's `endDate`. Numeric IDs are unique
per source system (your API user's external system); non-numeric IDs
must be unique across all imports, so prefix them with something
system-specific.

**Statuses:** most outcomes return HTTP `200` — always check the
body's `status`: `SUCCESS_OK`; `PERMISSION_DENIED` when the user may not
import to that operator or area; `VALIDATION_EXCEPTION` when the request
is invalid (see `techErrorString` / `userErrorString`); `ERROR_INTERNAL`
on an unexpected error. HTTP `401` means bad credentials, `503` service
unavailable.




## OpenAPI

````yaml https://api-docs.europe.parkinghub.net/manage/openapi/external post /rest/resources/external-api/parkings/import
openapi: 3.1.0
info:
  title: SmartHUB API
  description: >
    SmartHUB is EasyPark's API for parking enforcement and integration

    partners. Use it to check whether a vehicle has a valid parking, and to

    send parkings from your own system (pay stations, apps) to EasyPark.


    **Getting access**


    Every call needs an API user. Email

    [api-developer-portal@arrive.com](mailto:api-developer-portal@arrive.com)

    with your company, the city you operate in and what you want to build, and

    we'll send you credentials. Send them as HTTP Basic auth on each request.


    **Your SmartHUB domain**


    Each city has its own host, e.g.
    `https://{your-city-name}.europe.parkinghub.net`

    in Europe or `https://{your-city-name}.usa.parkinghub.net` in the US. Always

    call your own domain: it decides which operator's parkings and areas you

    see. We'll tell you yours together with the credentials.


    **Regions**


    Europe and the US have separate specs, because a few operations and fields

    exist in one region only. Use the one for the region your city is in.
  version: v0.0.1
servers:
  - url: https://{your-city-name}.europe.parkinghub.net
    description: Your SmartHUB domain
    variables:
      your-city-name:
        description: Your SmartHUB domain prefix
        default: your-city-name
security:
  - basicAuth: []
tags:
  - name: External API Resource
    description: Rest API for external operations
  - name: Checkparking Resource
    description: |
      REST API for checkparking operations — vehicle parking lookups for
      enforcement clients and integration partners.

      **Search criteria** (applies to every operation in this resource)

      The request must include at least one search parameter, e.g.
      `licenseNumber`, `areaNo` or `superZoneNo` (see the operation's
      parameter list for everything supported here).

      Requests with none of these return `INSUFFICIENT_SEARCHCRITERIA`.

      **Error response**

      Validation failures do NOT change the HTTP status — the endpoint
      always returns `200 OK`. The response body's `status` field signals
      the outcome:

        - `OK` — validation passed; `parkings` contains the results.
        - `INSUFFICIENT_SEARCHCRITERIA` — no valid search criteria provided,
          or a required companion parameter is missing. `parkings`
          is `null`; `techErrorString` / `userErrorKey` / `userErrorString`
          carry diagnostic detail.
paths:
  /rest/resources/external-api/parkings/import:
    post:
      tags:
        - External API Resource
      summary: Import a parking
      description: |
        Starts, extends or stops a parking. Posting an `externalParkingId` that
        already exists updates that parking's `endDate`. Numeric IDs are unique
        per source system (your API user's external system); non-numeric IDs
        must be unique across all imports, so prefix them with something
        system-specific.

        **Statuses:** most outcomes return HTTP `200` — always check the
        body's `status`: `SUCCESS_OK`; `PERMISSION_DENIED` when the user may not
        import to that operator or area; `VALIDATION_EXCEPTION` when the request
        is invalid (see `techErrorString` / `userErrorString`); `ERROR_INTERNAL`
        on an unexpected error. HTTP `401` means bad credentials, `503` service
        unavailable.
      operationId: importParking
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportedParkingDto'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SingleStatusResponse'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ExceptionDto'
              examples:
                HttpMessageNotReadableException:
                  description: HttpMessageNotReadableException
                  value:
                    message: Cannot parse request
                    exception: msg
                    msgId: sample
                    errCode: null
                MaxUploadSizeExceededException:
                  description: MaxUploadSizeExceededException
                  value:
                    message: Uploaded file too big
                    exception: Maximum upload size of 1024 bytes exceeded
                    msgId: sample
                    errCode: null
                BusinessLogicException:
                  description: BusinessLogicException
                  value:
                    message: Unprocessable Entity
                    exception: msg
                    msgId: sample
                    errCode: ERR_DUPLICATE_ENTITY
        '401':
          description: Unauthorized
          content:
            '*/*':
              example:
                message: Unauthorized
                exception: 401 Unauthorized
                msgId: sample
                errCode: null
        '404':
          description: Not Found
          content:
            '*/*':
              example:
                message: Entity not found
                exception: Parking not found
                msgId: sample
                errCode: null
        '500':
          description: Internal Server Error
          content:
            '*/*':
              example:
                message: Internal server error
                exception: Smth bad happened
                msgId: sample
                errCode: null
components:
  schemas:
    ImportedParkingDto:
      type: object
      properties:
        externalParkingId:
          type:
            - string
            - 'null'
          description: Your unique parking ID. Re-posting the same ID updates the parking.
        areaCountryCode:
          type:
            - string
            - 'null'
          description: 2-letter ISO country code of the area.
        areaNo:
          type:
            - integer
            - 'null'
          format: int64
          description: EasyPark parking area number.
        startDate:
          type:
            - string
            - 'null'
          format: date-time
          description: Parking start (ISO-8601 UTC).
        endDate:
          type:
            - string
            - 'null'
          format: date-time
          description: Parking end (ISO-8601 UTC).
        licenseNumber:
          type:
            - string
            - 'null'
          description: Vehicle license plate.
        subType:
          type:
            - string
            - 'null'
          description: Parking sub-type, e.g. `NORMAL_TIME`.
          enum:
            - NORMAL_TIME
            - NORMAL_BUCKET
            - PERSONNEL_TIME
            - PERSONNEL_BUCKET
            - RESIDENTIAL_TIME
            - RESIDENTIAL_BUCKET
            - ANPR_TIME
            - PRE_BOOKING
            - EVC_TIME
            - EXT_TIME
            - EXT_PRE_BOOKING
            - NORMAL_TOLLING
            - BUY_TIME
            - CHARGING
            - EXT_BUCKET
            - PERMIT
            - SUBTICKET
        vehicleType:
          type:
            - string
            - 'null'
          description: Vehicle type, e.g. `MOTORCYCLE`.
        fuelType:
          type:
            - string
            - 'null'
          description: Fuel type, e.g. `PETROL`.
        parkingFeeExclusiveVAT:
          type:
            - number
            - 'null'
          description: Fee excluding VAT.
        parkingFeeInclusiveVAT:
          type:
            - number
            - 'null'
          description: Fee including VAT.
        parkingFeeVAT:
          type:
            - number
            - 'null'
          description: VAT amount.
        currency:
          type:
            - object
            - 'null'
          description: ISO-4217 currency code, e.g. `SEK`.
          properties:
            currencyCode:
              type: string
            symbol:
              type: string
            defaultFractionDigits:
              type: integer
              format: int32
            numericCode:
              type: integer
              format: int32
            numericCodeAsString:
              type: string
            displayName:
              type: string
        latitude:
          type:
            - number
            - 'null'
          format: double
          description: Latitude (decimal degrees).
        longitude:
          type:
            - number
            - 'null'
          format: double
          description: Longitude (decimal degrees).
        parkingSpotNumber:
          type:
            - string
            - 'null'
          description: Parking spot number.
    SingleStatusResponse:
      type: object
      properties:
        status:
          type:
            - string
            - 'null'
          description: >-
            `SUCCESS_OK` on success; otherwise an error status such as
            `PERMISSION_DENIED`.
        techErrorString:
          type:
            - string
            - 'null'
          description: Technical error description; null on success.
        userErrorString:
          type:
            - string
            - 'null'
          description: User-facing error message; null on success.
      required: []
    ExceptionDto:
      type: object
      properties:
        message:
          type: string
          description: Human readable high level explanation what happened
        exception:
          type:
            - string
            - 'null'
          description: >-
            Optional exception for cases when you don't have to hide the
            internal details
        msgId:
          type:
            - string
            - 'null'
          description: >-
            Correlation id that can be used to find the request easily from
            client side
        errCode:
          oneOf:
            - $ref: '#/components/schemas/BusinessLogicErrCode'
            - type: 'null'
      required:
        - message
    BusinessLogicErrCode:
      type: string
      enum:
        - ERR_DUPLICATE_ENTITY
  securitySchemes:
    basicAuth:
      type: http
      description: Your SmartHUB API user's username and password.
      scheme: basic

````