riverty logo

Docs

API Information

Creating a new Receivable

POST/v1/clients/{clientId}/receivables
This endpoint allows users to submit a new Parking Receivable to be invoiced.

Request Body Parameters

invoicingScheme (object): Contains the following invoicing options:

direct (boolean): true = invoices should be created asap, currently the only supported option

addConfiguredFee (boolean): If true configured fees will be added to the invoice. See the POST /v1/clients/{clientId}/merchantfees endpoint documentation for more information.
-- Default is false

sessions (array of Session): List of parking sessions to be payed. Currently allowed only one parking Session per Receivable. Contains the following session details:

externalReference (string): merchant's own reference

actualStart (string): parking session start date and time. Accepted formats:
-- 1985-04-12T23:02:50
-- 1985-04-12T23:02:50Z
-- 1985-04-12T23:02:50-04:00

actualEnd (string): parking session end date and time. Accepted formats:
-- 1985-04-12T23:02:50
-- 1985-04-12T23:02:50Z
-- 1985-04-12T23:02:50-04:00

identifiedCredentials (array): currently only one credential is allowed. Contains the following credential details:

-- type (string): licensePlate

-- identifier (object):
id (string): license plate number of the car
country (string): ISO 3166-1 alpha-2 or alpha-3 country code of the car

element (object): Parking space location

-- id (string): facility ID
-- name (array of MultiLingualString): facility name:
languageCode (string): ISO language code
value (string): localized facility name

initiator (object):
-- id (string): ID of current receivable owner

segments (array): Time periods to be payed

-- actualStart (string): start date and time of the segment. Accepted formats:
▪ 1985-04-12T23:02:50
▪ 1985-04-12T23:02:50Z
▪ 1985-04-12T23:02:50-04:00

-- actualEnd (string): end date and time of the segment. Accepted formats:
▪ 1985-04-12T23:02:50
▪ 1985-04-12T23:02:50Z
▪ 1985-04-12T23:02:50-04:00

assignedRight (object): Descriptor for parking activity and segment cost

-- id (string)
-- name (array):
languageCode (string): ISO language code
value (string): localized parking activity name
-- zoneName (string)
-- zoneCode (string)
-- FacilityCode (string)
-- FacilityName (string)

monetaryValue (object): Descriptor for segment fee

-- value (object):
currencyValue (string): decimal with period as a separator
currencyType (string): 3-letter currency code
taxIncluded (boolean): value contains gross amount if true, net amount if false

-- taxLines (array): Tax information for the segment
taxLabel (array of MultiLingualString):
languageCode (string): ISO language code
value (string): localized tax label
taxRate (string): decimal with period as a separator. Tax rate as ratio of 1
taxAmount (string): decimal with period as a separator. Tax amount in currency

feeType (string): Normally can be SEGMENT or PENALTY. Default is SEGMENT

-- SEGMENT - parking fee
-- PENALTY - parking penalty
-- INVOICE - fee for invoicing service (returned by the system when configured fee is added). See the POST /v1/clients/{clientId}/merchantfees endpoint documentation for more information
-- REMINDER, LOOKUP - reserved for other types of automated fees

Responses

Code Description
200 OK
400 Bad Request
401 Missing or invalid "Authorization" header
403 Lacking permissions
404 Resource not found
409 Invoice already exists
422 Unprocessable Content
500 Unexpected internal server error

Upload Receivable Picture

This endpoint allows users to upload pictures to the Receivable in a form of a binary file.

When creating the invoice, attached pictures will be uploaded to the invoicing platform. Delivering images to customers is a subject for future development.

Request Form parts

binaryFile (file):

Picture file to upload. Currently supported only data of types image/jpeg, image/png. File size should not exceed 5MB.

MetaData (object):

Metadata for the uploaded file.

  • description (string): picture description

  • exposeToCustomer (boolean): default is false. Alternative functionality is not supported yet.

Responses

Code Description
200 OK
400 Bad request
401 Missing or invalid "Authorization" header
403 Lacking permissions
404 Resource not found
422 Unprocessable Content
500 Unexpected internal server error

Process Flow

POST/v1/clients/{clientId}/receivables/{receivableId}/picturesurl
This endpoint allows users to attach a picture to the Receivable in a form of URL or Base64 data.
When creating the invoice, attached pictures will be uploaded to the invoicing platform. Delivering images to customers is a subject for future development.

Request Body Parameters

  • type (string): type of the value: [URL, BASE64]. Default is URL.

  • value (string): picture base64 source or link to the image file. Currently supported only data of content types image/jpeg, image/png. Image size should not exceed 5MB.

  • description (string): picture (license plate) description

  • exposeToCustomer (boolean): default is false. Alternative functionality is not supported yet.

Example of a valid URL attachment

{
  "value": "https://collect.mobility-hub.com/pictures/some_photo_of_B-MK58.jpg",
  "description": "B  MK  58"
}

Example of a valid BASE64 data attachment

{
 "type": "BASE64",
  "value": "iVBORw0KGgoAAAANSUhEUgAAA…",
  "description": "BASE64 data for license plate photo"
} 
Code Description
200 OK —
400 Bad request
401 Missing or invalid "Authorization" header
403 Lacking permissions
404 Resource not found
422 Unprocessable Content
500 Unexpected internal server error

Crediting a Receivable

POST/v1/clients/{clientId}/receivables/{receivableId}/credit

This endpoint allows users to refund an invoiced Receivable. Currently only full refunds are supported.

To view the status of the refund, refer to the GET
/v1/clients/{clientId}/receivables/{receivableId} endpoint documentation.

Request Body Parameters

RefundType (string): The type of refund. One value must to be assigned: [FULL].

Tax Calculations

For credit requests, the tax calculations must follow specific rules based on the taxIncluded flag:
When taxIncluded = true

  • GrossAmount = currencyValue
  • NetAmount = currencyValue - taxAmount
  • VatPercentage = taxRate

Example of valid values:

{
  "currencyValue": "100",
  "taxAmount": "20",
  "taxRate": "0.25"
}

Results in:

  • GrossAmount: 100.0
  • NetAmount: 80.0
  • VatPercentage: 25.0

When taxIncluded = false

  • GrossAmount = currencyValue + taxAmount
  • NetAmount = currencyValue
  • VatPercentage = taxRate

Example of valid values:

{
  "currencyValue": "100",
  "taxAmount": "25",
  "taxRate": "0.25"
}

Results in:

  • GrossAmount: 125.0
  • NetAmount: 100.0
  • VatPercentage: 25.0

Merchant Fees

For configured MerchantFees, values are always treated as if taxIncluded = true:

  • GrossAmount = currencyValue
  • NetAmount = currencyValue - taxAmount
  • VatPercentage = taxRate

Example of a valid full refund credit request

{
  "RefundType": "FULL"
}

Responses

Code Description
200 OK —
400 Bad request
401 Missing or invalid "Authorization" header
403 Lacking permissions
404 Resource not found
409 Invoice already exists
422 Unprocessable Content
500 Unexpected internal server error

Get a Receivable by its ID

GET/v1/clients/{clientId}/receivables/

Responses

Code Description
200 OK — {
   |   "id": "string",  
   |   "status": "PENDING",  
   |   "invoicingScheme": {  
   |     "direct": true,  
   |     "customerDataDeferred": false  
   |   },  
   |   "sessions": [  
   |     {  
   |       "externalReference": "string",  
   |       "actualStart": "string",  
   |       "actualEnd": "string",  
   |       "identifiedCredentials": [  
   |         {  
   |           "type": "licensePlate",  
   |           "identifier": { "id": "string" },  
   |           "country": "no"  
   |         }  
   |       ],  
   |       "element": {  
   |         "id": "string",  
   |         "name": [  
   |           { "languageCode": "en", "value": "string" }  
   |         ]  
   |       },  
   |       "initiator": { "id": "string" },  
   |       "segments": [  
   |         {  
   |           "actualStart": "string",  
   |           "actualEnd": "string",  
   |           "assignedRight": {  
   |             "id": "string",  
   |             "name": [  
   |               { "languageCode": "en", "value": "string" }  
   |             ],  
   |             "zoneName": "string",  
   |             "zoneCode": "string",  
   |             "FacilityCode": "string",  
   |             "FacilityName": "string",  
   |             "monetaryValue": {  
   |               "value": {  
   |                 "currencyValue": "string",  
   |                 "currencyType": "NOK"  
   |               },  
   |               "taxIncluded": true,  
   |               "taxLines": [  
   |                 {  
   |                   "taxLabel": [  
   |                     { "languageCode": "en", "value": "string" }  
   |                   ],  
   |                   "taxRate": "string",  
   |                   "taxAmount": "string"  
   |                 }  
   |               ],  
   |               "feeType": "SEGMENT"  
   |             }  
   |           }  
   |         }  
   |       ]  
   |     }  
   |   ]  
   | } |

| 400 | Bad request |
| 401 | Missing or invalid "Authorization" header |
| 403 | Lacking permissions |
| 404 | Resource not found |
| 500 | Unexpected internal server error |

Do you find this page helpful?