Skip to main content

Customer & Contract API

Introduction

The Customer & Contract API for registered parking users allows you

  • to sync parking permits and the associated master data
  • to manage customer relationships, consumer accounts and related parking operations.

These APIs are essential for 3rd party applications that need to handle Customer data which is based on a company (Customer) and employee (Consumer) data structure, embedded in a contract. Parking access is granted on an assigned parking product containing an access (date, time, location) profile.

Key APIs in this category are:

  • Customer API - Create. read, update. and delete customer accounts (i.e. entity for parking permits)
  • Consumer API - Manage Consumer profiles and accounts (i.e. parking permits)
  • Contract API - Handle Customer contracts and agreements (i.e. contractual parameters for parking permits)

Note: If you only manage / sync one dedicated Customer (Company) it can be suitable to not dynamically create a Customer and an associated Contract as references/entities for the sync of Consumer (parker/employee) but to create these entities in the parking management first and to use the associated references as pre-shared information for the REST requests. In this case the Consumer API is mainly used.

  • pre-configured Tenant Name
  • pre-configured CustomerBusinessID
  • pre-configured ContractBusinessID
  • productBusinessID
Note

If the sync of parking permits is based on a 3rd party application reference, the field externalReference needs to be used (references are always unique and used for indexing.)

   

Explore APIs

Customer & Contracts Data Topology

Your Project

Business Terms

TermDefinitionComment
YOURPROJECTA placeholder (path parameter) in the URL that developers must replace with the actual project name or project ID for their environmentPre-shared
Technical TenantA project is a technical tenant and has separate data, no multi-tenancy across tenants
CustomerCustomer is an organization entity, usually a company
A Person is a single entity
Usually, one company is used for sync initiated from 3rd party systems
ContractIs an entity which provides the business context for parking permits
Consumer (i.e. parker)Has at least one parking product and a license plate number and is assigned to a contractThis is the entity which uses a parking permit and parks in a car park
ProductProvides the business context where and when and how to parkCan be used to differentiate groups for different parking policies
InvitationAn invitation is used to invite/enable a consumer to use SmartSelect portal for self-management of his accountOnly valid if smart select portal is used in the project

Premises

TermDefinitionComment
Identification for parkingThe Parking management system provides the following identification options: License plate, QR code.
Mandatory pre-shared references for API usageThe Parking management system:
  • pre-configured Tenant Name
  • pre-configured Customer-BusinessID
  • pre-configured Contract-BusinessID
  • productBusinessId
Conditions for creating and updating a consumer (which is the one that is parking)
  • license plate is valid
    (pattern = "^[A-ZÄÖÜ0-9]*$", length %, country, region code if entered is valid, check …)
  • product exists and is configured in the contract
  • email is valid (optional)
  • There is no check for uniqueness for two consumers with same e-mail address
  • There is a check for uniqueness of external externalReference (S&B external ID for staffID) per Consumer
  • there is a check for uniqueness for license plate number
  • license plate is not used for another consumer, also not for another Company (Customer)
externalReference can be used as a reference for synchronizing consumer master data

productBusinessId refers to a parking product (can also be dynamically consumed)
Conditions for a consumer to be able to park are:
  • Valid Customer
  • Valid contract with parking products for that facility
  • Valid parking product
  • Valid consumer
  • Valid parking media: License plate
  • first name and last name
  • e-mail address mandatory
  • assigned product
See also pre-shared references

Minimal Use Case for Data Feed (Sync) from 3rd Party System

The synchronization of consumers (which are parking in a car park) is based on CRUD operations for a single consumer or a list of consumers using solely the Consumer API.

If a POST method is called and the c is found in the parking system, the existing record is updated with the new data.

Use CaseParking Management SystemComment
The 3rd party system is the leading system, and a minimal data set is synced to the parking management systemexternalReference can be used for sync with 3rd party systemsNote: If not, all fields are populated, some parking management functions will not be available, e.g.
Syncing for only one Customer (Company)The Parking management system:
  • pre-configured Tenant Name
  • pre-configured Customer-BusinessID
  • pre-configured Contract-BusinessID
Initial Load (of consumers)
Create Consumer for the given Customer (Company)
CustomerBusinessID plus externalReference (to be unique for each consumer)Recommendation is to use this on very low frequency
Incremental Update (of consumers)
Create Consumer for the given Customer (Company)
CustomerBusinessID plus externalReference (to be unique for each consumer)
Search for a Consumer by externalReferenceSearch by external reference and/or e-mail (in all customers)
POST https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/yourproject/consumers
Disable Consumer for the given Customer (Company)
Delete Consumer for the given Customer (Company)

Customer APIs

GET list of customers

GET  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/customers

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/Customer/getCustomers

Request Body Example

{

}

Create customer

POST  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/customers

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/Customer/createCustomer

Company - Request Body Example

{
"customerType": "COMPANY",
"company": {
"name": "Name",
"certificateOfRegistration": "Company registration number",
"registerCourt": "Registration authority",
"taxNumber": "Tax number",
"vatId": "VAT identification number",
"costCenter": "Cost center"
},
"addresses": [
{
"street": "Street",
"houseNo": "51",
"postCode": "Postcode",
"city": "City",
"country": "DEU"
}
],
"defaultContact": {
"firstName": "First ",
"lastName": "Last ",
"email": "test@test.com",
"phoneNumber": "+32875554"
},
"contacts": []
}

Person - Request Body Example

{
"customerType": "PERSON",
"person": {
"firstName": "First",
"lastName": "Last ",
"email": "test@test.test",
"costCenter": "Cost center",
"phoneNumber": "+9874644"
},
"addresses": [
{
"street": "Street",
"houseNo": "11",
"postCode": "Postcode",
"city": "Postcode",
"country": "DEU"
}
]
}

GET customer

GET  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/customers/{customerBusinessID}

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/Customer/getCustomer

Update customer

PUT  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/customers/{customerBusinessID}

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/Customer/updateCustomer

Company - Request Body Example

{
"customerType": "COMPANY",
"addresses": [
{
"street": "Street",
"houseNo": "11",
"postCode": "Postcode",
"city": "City",
"country": "DEU",
"revision": 0
}
],
"company": {
"name": "Name",
"certificateOfRegistration": "Company registration number",
"registerCourt": "Registration authority",
"taxNumber": "Tax number",
"vatId": "VAT identification number",
"costCenter": "Cost center"
},
"defaultContact": {
"firstName": "First ",
"lastName": "Last ",
"email": "test@test.com",
"phoneNumber": "+3287555"
},
"revision": 1
}

Person - Request Body Example

{
"customerType": "PERSON",
"person": {
"firstName": "First",
"lastName": "Last ",
"email": "test@test.test",
"costCenter": "Cost center",
"phoneNumber": "+9874644"
},
"addresses": [
{
"street": "Street",
"houseNo": "11",
"postCode": "Postcode",
"city": "Postcode",
"country": "DEU",
"revision": 1
}
]
}

Delete customer

DELETE  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/customers/{customerBusinessID}

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/Customer/deleteCustomer

Contract APIs

Create contract

POST  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/contracts

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/Contract/createContract

Request Body Example

{
"label": "Contract name",
"startTime": "2024-12-01T00:00:00Z",
"endTime": "2025-02-28T23:59:00Z",
"customer": "C2024C4H3i30",
"operator": "OP9763070",
"status": "ACTIVE",
"productsDetails": [
{
"productId": "PP000017",
"contingentAmount": 1,
"facilities": [
"FC9763070",
"FC5579040",
"FC5802558"
]
},
{
"productId": "PP000019",
"contingentAmount": 1,
"facilities": [
"FC9763070",
"FC5579040",
"FC5802558"
]
}
]
}

GET contract

GET  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/contracts/{contractBusinessID}

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/Contract/getContract

Update contract

PUT  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/contracts/{contractBusinessID}

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/Contract/updateContract

Request Body Example

{
"label": "Contract name11",
"startTime": "2024-12-01T00:00:00Z",
"endTime": "2025-02-28T23:59:00Z",
"customer": "C2024C4H3i30",
"operator": "OP9763070",
"status": "ACTIVE",
"revision": 0,
"productsDetails": [
{
"productId": "PP000017",
"contingentAmount": 1,
"facilities": [
"FC9763070",
"FC5579040",
"FC5802558"
]
},
{
"productId": "PP000019",
"contingentAmount": 1,
"facilities": [
"FC9763070",
"FC5579040",
"FC5802558"
]
}
]
}

Delete contract

DELETE  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/contracts/{contractBusinessID}

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/Contract/deleteContract

Consumer APIs

GET list of consumers

GET  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/consumers

Swagger: https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html?urls.primaryName=v2#/Consumer/getConsumers

Request body example

{

}

Create consumer

POST  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/customers/{customerBusinessID}/consumers/regular/aggregates?sendInvitation=false

Parameters: sendInvitation: if true, system sends an invitation after the creation of the consumer.

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/RegularConsumer/createConsumer

Request body example

{
"firstName": "First ",
"lastName": "Last ",
"email": "test@mail.de",
"externalReference": "External ID",
"costCenter": "Cost center",
"mediums": [
{
"businessId": null,
"revision": null,
"type": "LICENSEPLATE",
"value": "MM5478",
"encoding": "HEX",
"licencePlateRegion": {
"code": "M",
"country": "DEU"
}
}
],
"contract": {
"businessId": "A2024XW3pYsa2f",
"products": [
"PP000053",
"PP000019"
]
}
}

GET consumer

GET  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/customers/{customerBusinessID}/consumers/regular/{consumerBusinessID}

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/RegularConsumer/getConsumer_1

Update consumer

PUT  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/customers/{customerBusinessID}/consumers/regular/aggregates/{consumerBusinessID}

Parameters:

sendInvitation: if true, system sends an invitation after the update of the consumer.

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/RegularConsumer/updateConsumer

Request body example

{
"businessId": "N20243gOoi3ef",
"firstName": "First 1",
"lastName": "Last ",
"email": "test@mail.de",
"externalReference": "External ID",
"costCenter": "Cost center",
"mediums": [
{
"businessId": "MPliczWk",
"revision": 0,
"type": "LICENSEPLATE",
"value": "MM54785",
"encoding": "HEX",
"licencePlateRegion": {
"code": "M",
"country": "DEU"
}
}
],
"contract": {
"businessId": "A2024XW3pYsa2f",
"products": [
"PP000053",
"PP000019"
]
},
"revision": 0
}

Delete consumer

DELETE  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/customers/{customerBusinessID}/consumers/regular/aggregates/{consumerBusinessID}

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/RegularConsumer/deleteConsumer

Search consumer

Search by email (for a customer)

GET  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/customers/{customerBusinessID}/consumers/regular/aggregates

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/RegularConsumer/getConsumersAggregatesByCustomer

Request body example

{
"page": 0,
"size": 10,
"sortBy": "email",
"sortDirection": "ASC",
"productBusinessId": [
"PP000022",
"PP000040"
],
"name": "Paxton",
"lpn": "MS1987",
"email": "Fausto_Bernhard62@gmail.com"
}

Search by external reference and/or email (in all customers)

POST  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/consumers

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html?urls.primaryName=v2#/Consumer/getConsumers

{
"page": 0,
"size": 100,
"sortDirection": "DESC",
"and": {
"consumer": {
"consumerEmail": null,
"regular": {
"externalReference": "93635"
}
}
}
}

Search consumers in all customers by license plate

POST  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/consumers

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html?urls.primaryName=v2#/Consumer/getConsumers

Request body example

{
"page": 0,
"size": 100,
"sortDirection": "DESC",
"and": {
"consumer": {
"consumerTypeList": [
"REGULAR"
],
"consumerLpn": "E031002"
}
}
}

Block/Unblock consumer

PATCH  https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/v2/YOURPROJECT/consumers/{consumerBusinessID}/block-status

Request body example

{
"blocked": true
}

Swagger:
https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swagger-ui/index.html#/Consumer/updateConsumerBlockStatus

Swagger documentation URL

https://pm.preprod.parking.scheidt-bachmann.net/customers-contracts/swaggerui/index.html