Request and Response Parameters
The List UDZ API for Rule accepts the request attributes and returns the corresponding response attributes as shown below.
| API Request | API Response |
|---|---|
carrier: Carrier code — requiredzoneName: Zone name — required if assignName is blankassignName: Auto-assign indicator — required if zoneName is blankdescription: Zone description — requireduserDefinedZone978Items: Array containing location and restriction details for the defined zone — Required└── notPermitted: Not Permitted indicator — required└── loc: Location(s) — required | tblNum: Table number assigned to the created User Defined ZonezoneName: Zone name returned by the system (either user-specified or auto-assigned) |
The response will also echo the original request parameters.
Create a New 978 Table
The API response shall return a newly generated 978 table number when a valid request is made, as illustrated in the examples below.
| Sample Request | Sample Response |
|---|---|
{"userDefinedZone978": {"carrier": "QR","zoneName": "TST1","assignName": "","description": "UDZ Perf Test","userDefinedZone978Items": [{"notPermitted": "X","loc": "MEL"},{"notPermitted": "","loc": "AU"}]}} | {"userDefinedZone978": {"tblNum": "823875","zoneName": "TST1"}} |
{"userDefinedZone978": {"carrier": "QR","zoneName": "","assignName": "X","description": "UDZ Perf Test","userDefinedZone978Items": [{"notPermitted": "X","loc": "AKL"},{"notPermitted": "","loc": "NZ"}]}} | {"userDefinedZone978": {"tblNum": "823876","zoneName": "0001"}} |
Error Handling
When a request contains any of the following conditions, the system responds with the appropriate HTTP error code for each scenario. The corresponding error message is returned in the response payload, as illustrated below.
| Field Name | Error Condition | Actual Message |
|---|---|---|
carrier |
|
|
zoneName |
|
|
assignName |
|
|
description |
|
|
userDefinedZone978Items |
|
|
notPermitted |
|
|
loc |
|
|
Request with Error
| Sample Request | Sample Response |
|---|---|
{"userDefinedZone978": {"carrier": "QR","zoneName": "TEST","assignName": "X","description": "UDZ Perf Test","userDefinedZone978Items": [{"notPermitted": "X","loc": "AKL"},{"notPermitted": "","loc": "NZ"}]}} | {"msg": "Table creation was unsuccessful","userDefinedZone978": {"msgs": {"errors": ["[zoneName, assignName] - zoneName or assignName cant be used together"]},"carrier": "QR","zoneName": "TEST","assignName": "X","description": "UDZ PERF TEST","userDefinedZone978Items": [{"notPermitted": "X","loc": "AKL"},{"notPermitted": "","loc": "NZ"}]}} |
{"userDefinedZone978": {"carrier": "QR","zoneName": "","assignName": "X","description": "UDZ Perf Test","userDefinedZone978Items": [{"notPermitted": "X","loc": "AKL"},{"notPermitted": "X","loc": "NZ"}]}} | {"msg": "Table creation was unsuccessful","userDefinedZone978": {"msgs": {"errors": ["[userDefinedZone978Items] - At least one location must be permitted"]},"carrier": "QR","assignName": "X","description": "UDZ Perf Test","zoneName": "","userDefinedZone978Items": [{"loc": "AKL","notPermitted": "X"},{"loc": "NZ","notPermitted": "X"}]}} |
Security
Internal Systems must send a user id and correlation id as part of the header in the API request.
External systems gateway user id will be configured in the Axway by ATPCO.
This will help in debugging the request in future.