Provider-API

Provider-API

For connecting provider backends and CRM systems with DigiPark One, you need to use our provider API.
In the following, you find general information, a detailed description of possible requests and a short introduction to our events.


General information: 
  1. All timestamps are in 8601 - UTC format.
  1. Base-URL for TEST environment: https://server-test.digipark.de/api/v2/provider
  2. Base-URL for PROD environment: https://server.digipark.de/api/v2/provider
  3. Content-type for requests: 'application/json'
  1. For authentication, send the token as URL-param. The token can be set in DigiPark One: https://portal-test.digipark.de/settings/connectivity.
    You can look up to see, how the provider API configuration in DigiPark One works.
  1. Responses:
    1. 200: OK
    2. 201: Created
    3. 400: Bad Request
    4. 401: Unauthorized
    5. 403: Forbidden
    6. 404: Not Found
    7. 500: Internal Server Error
    8. 503: Service unavailable



Requests:

POST /partners/{partner_id}/entrypermissions    

#### POST `/` `partners/{partner_id}/entrypermissions`
Adds one or more items to the provider whitelist.
##### Example Request
```json
[  
    {"identifier_code":"LB-TH1989"},
    {"identifier_code":"S-AB3300"}
]
```



GET /partners/{partner_id}/entrypermissons

#### GET `/` `partners/{partner_id}/entrypermissions`
Returns all items from provider whitelist.
> | url param | example value | description |
> |---------|------------------|------------|
> | `size`          | `1000`          | Items per page          |
> | `withTotal` | `true`          | Gets all items paged. When "false" only the first page will be returned.          |


DELETE /partners/{partner_id}/entrypermissions

#### DELETE `/` `partners/{partner_id}/entrypermissions`
Deletes one or more items from provider whitelist.
##### Example Request
```json
[  
    "LB-TH1989",
    "S-AB3300"
]
```
                              



Events: 

AUTHORIZE_LICENSEPLATE:
      --> If a barrier system detects a license plate, the license plate is authorized and the AUTHORIZE_LICENSEPLATE event will be initiated by our DigiPark Provider API.

##### Example Request:
```json
{
    "action": "AUTHORIZE_LICENSEPLATE",
    "creation_timestamp":"2024-04-12T09:06:04.357Z",
    "identifier_type": "LICENSE_PLATE",
    "identifier_code": "ABCD1234",
    "identifier_region": "AB", // optional
    "identifier_country": "DE" //optional
}
```


PARKING_TRANSACTION_STARTED:
      --> Passing an entry barrier automatically starts a transaction and initiates the PARKING_TRANSACTION_STARTED event.

##### Example Request
```json
{
  "action": "PARKING_TRANSACTION_STARTED",
  "ops_transaction_id": "1862845a-5e06-48a6-8843-f56b9c7e7201",
  "provider": {
      "ops_partner_id": "swu",
      "identifier_type": "LICENSE_PLATE",
      "identifier_code": "ABCD1234",
      "identifier_region": "AB", // optional
      "identifier_country": "DE" //optional
  },
  "operator": {
      "ops_partner_id": "pbgulm",
      "partner_poi_id": "partnerPoiId",
      "poi_country_code": "DE"
  },
  "creation_timestamp": "2024-01-01T12:06:04.357Z",
  "start_time": "2024-01-01T12:00Z",
}
```

PARKING_TRANSACTION_FINISHED:
      --> If a license plate passes the exit barrier, the transaction ends and the PARKING_TRANSACTION_FINISHED event is triggered.

    ##### Example Request
    ```json
    {
      "action": "PARKING_TRANSACTION_FINISHED",
      "ops_transaction_id": "1862845a-5e06-48a6-8843-f56b9c7e7201",
      "provider": {
          "ops_partner_id": "swu",
          "identifier_type": "LICENSE_PLATE",
          "identifier_code": "ABCD1234",
          "identifier_region": "AB", // optional
          "identifier_country": "DE" //optional
      },
      "operator": {
          "ops_partner_id": "pbgulm",
          "partner_poi_id": "partnerPoiId",
          "poi_country_code": "DE"
      },
      "creation_timestamp": "2024-01-01T12:06:04.357Z",
      "start_time": "2024-01-01T12:06:04.357981593Z",
      "end_time": "2024-01-02T12:06:04.357981593Z",
      "total_amount": 10,
      "currency": "EUR",        // optional  
      "vat_percentage": 19.00   // optional  
    }
    ```
AVAILABILITY_CHANGE:
      --> Whenever the availabe amount changes, the change will be transmitted between the  DigiPark provider API and the provider.

            
##### Example Request
```json
{
  "action": "AVAILABILITY_CHANGE",
  "partner_poi_id": "partnerPoiId",
  "total_supply": 90,
  "availability": 10,
  "availability_at": "2024-01-01T12:06:04.357Z"
}
```

For further details and more examples, you can download the DigiPark Provider API Specification from the attachment section of this article.
    • Related Articles

    • Provider-API einrichten

      Über die Provider-API können Informationen zu Autorisierungen und Transaktionen sowie Verfügbarkeitsdaten ausgetauscht werden. 1. Navigieren Sie nach Einstellungen > Konnektivität und gehen Sie in den Bereich Provider. 2. Betätigen Sie die ...
    • M2M API

      Swagger UI (parconomy.org) Change Log 2020-07-01: V1 Identifiers Pois Reservations Transaction Records
    • Admin API

      Swagger UI (parconomy.org) Change Log 2020-01-01: V1 initial endpoints
    • App API

      Swagger UI (parconomy.org) Change Log 2022-06-20: V2 credit card: GET /users/payment-methods GET /users deliver "Users" endpoints unraveled 2020-10-01: V1 initial "users" endpoints
    • Authentication

      Requirements: File demo-workspace.ncf Nightingale Program (free REST client) Procedure: 1. Open Nightingale. 2. Click on "Import". 3. Import the "demo-workspace.ncf" file. 4. Send following request: 5. Copy the content of the Access-Token-String in ...