Show/Hide Toolbars

Live Data Import & Export API

Navigation: Live Data Import Service

Method SubmitPurchase

Scroll Prev Top Next More

Online Transfer Purchase information is processed if the company has license Online Purchase Transfer. Requires an ongoing purchase provider to be configured in WebOffice. If terminal type is SmartPark and the internal SubmitOngoingPurchase fails, e.g. if a third-party provider does not answer, the internal SubmitPurchase process is not executed.

Top Up information is processed if the company has license Top Up.

Pay By Space information is processed if the company has license Pay By Spacer.

Description of SubmitPurchaseRequest

Name

Type

Required

Description

ArticleId

Int

Yes

Article Id

BankAuthorizationReference

String(50)

Yes

Bank authorization reference.

CardFeeAmount

Decimal

No

This field is set when the card used for payment is configured to charge a card fee amount. The card fee is based on the total amount that is to be charged the card.

CardIssuer

String(50)

No

Example:

VISA

MasterCard

Description

String(255)

No

Purchase description

EndDateUtc

DateTime

Yes

Date time when the parking ends

IsUpdate

Boolean

No

IsUpdate=true can only be used for Permit (WebOffice terminal type SmartPark).

Must be set to False if a new purchase is imported.

True if request is an update of an existing purchase, can only be used if company has license Online Purchase Transfer.

In the Ongoing Purchase Routing configuration, the Send Purchase Updates must be set to true.

The PurchaseGuid is required if IsUpdate=true.

When updating a purchase only following data are updated for the purchase in WebOffice:

EndDateUtc

PayIntervalEndDateUtc (will be set to same value as EndDateUtc)

Amount (will be set to PurchaseAmount)

Units  (will be set to (request.EndDateUtc - request.StartDateUtc).TotalMinutes)

LicencePlateId

String(20)

No

License Plate

MaskedPAN

String(20)

No

Masked card number. The card number should be in the following format: XXXXXX*XXXX

ParkingSpaceId

String(50)

No

Parking space id is used when a purchase is connected to a specific parking space. Parking space must be configured in WebOffice before import.

PayUnitID

Int

No

Id of the pay unit. Flowbird support will provide an updated list of pay unit id:s

See Pay Unit Id.

Example:

1=Coin

23= Web Payment

PurchaseAmount

Decimal

Yes

Purchase amount

PurchaseDateUtc

DateTime

Yes

Date time when the purchase is made

PurchaseGuid

String(36)

No

Unique Guid for the purchase. Required if the client application is going to update the purchase later on. E.g. attribute IsUpdate=true.

SettlementDateUtc

DateTime

No

Date time when the actual transaction was performed

StartDateUtc

DateTime

Yes

Date time when the parking starts

TariffPackageId

Int

Yes

Tariff Package Id

TerminalId

String(50)

No

Terminal Id

TicketNumber

Int

No

Ticket number for the current purchase

TopUpId

String(20)

No

Top-Up Id

TransactionReference

String(50)

Yes

Internal transaction reference.

 

Description of SubmitPurchaseResponse

Name

Type

Required

Description

ReturnCode

String

Yes

Return Code (HttpStatusCode):

OK

InternalServerError

Unauthorized

BadRequest

ReferenceId

String

No

Reference id (PurchaseGuid) if ReturnCode<>OK.

ErrorDescription

String

No

Error Description if ReturnCode<>OK.

 

Request Example

<SubmitPurchaseRequest TransactionReference="TranRef666" BankAuthorizationReference="BankRef666" TerminalId="CE" PurchaseAmount="1" PurchaseDateUtc="2020-08-12T10:00:00" StartDateUtc="2020-08-12T10:00:00" EndDateUtc="2020-08-12T11:00:00" TariffPackageId="1" ArticleId="1" LicencePlateId="ABC123" MaskedPAN="123456*1234" Description="Test" CardIssuer="VISA" CardFeeAmount="1" xmlns="http://schema.caleaccess.com/cwo2importservice/LiveDataImport/1/" />

Request update example:

To update a purchase, use the PurchaseGuid to identify the purchase

<SubmitPurchaseRequest PurchaseGuid="9a7b7b9b-4520-4a19-a848-0665551724d7" IsUpdate="true" TransactionReference="TranRef666" BankAuthorizationReference="BankRef666" TerminalId="CE" PurchaseAmount="1" PurchaseDateUtc="2020-08-12T10:00:00" StartDateUtc="2020-08-12T10:00:00" EndDateUtc="2020-08-12T11:00:00" TariffPackageId="1" ArticleId="1" LicencePlateId="ABC123" MaskedPAN="123456*1234" Description="Test" CardIssuer="VISA" CardFeeAmount="1" xmlns="http://schema.caleaccess.com/cwo2importservice/LiveDataImport/1/" />

Response Example

<SubmitPurchaseResponse ReturnCode="OK" ReferenceId="55412dd2-c649-4b64-b7df-473787066c3d" ErrorDescription="" xmlns="https://schema.caleaccess.com/cwo2importservice/LiveDataImport/1/"/>