ReserveBatchNosWebService
ReserveBatchNosWebService
Legacy web service replication for reserving batch numbers.
Supplementary SWAGGER documentation: reserveBatchNos
Setup
Go to Setup / Reference Data and find gbcontrols "apiwebserviceswrapper_login" control. Populate with 'web_services' user login and password for API use.
Permissions
To run this API, nominated 'web-services' role needs permission.
If not actively using, leave off for better security.
Go to Roles / APIs and check on WebServices.
Authentication
Authenticate with the API before running this API.
HTTP Method
POST
URL Examples
https://api.catch-e.com/web-services/gl/system/reserveBatchNos Headers
Body (form-data)
Response - 201 Created
{ "batch_no_start": "XXXXXX", "batch_no_end": "XXXXX" } Response - 401 Unauthorized
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized" } You have not authenticated or token_timeout has passed. Authenticate again.
Response - 403 Forbidden
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } You do not have permissions. Go to System Roles, enter 'web_services', navigate to Roles / APIs and check permissions.
Response - 406 Not Acceptable
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Acceptable", "status": 406, "detail": "Cannot honor Accept type specified" } Accept Header must be set as application/vnd.catch-e-api.v1+json. Update and try again.
Response - 418 Invalid Credentials
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Invalid Credentials", "status": 418, "detail": "Web services API wrapper credentials have not been configured" } Enable Web Services. Go to Setup / Reference Data and find apiwebserviceswrapper_login control. Populate with 'web_services' user login and password.
Response - 422 Unprocessable Entity
batch_nos field empty:
{ "batch_nos": { "isEmpty": "Value is required and can't be empty" } } batch_nos is required field. Enter number of batch_nos to reserve.
Negative number:
{ "batch_nos": { "notDigits": "The input must contain only digits" } } You may have entered negative number. batch_nos must be positive. Enter value 1 or more.
Zero value:
{ "web_service_error": { "CATCH_E_ERROR_BATCH_NOS_INVALID": "Invalid batch_nos value. Must be a positive integer." } } You entered '0'. batch_nos must be positive. Enter value 1 or more.
Input Validation Errors
Response - 424 Failed Dependency
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Failed Dependency", "status": 424, "detail": "Upstream service temporarily unavailable. Please retry." } API cannot run at this time. Service resource limits exceeded or system in maintenance mode.