0% found this document useful (0 votes)
92 views

Webservice API Specification Doc Template

Uploaded by

Sherif Fawzy
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

Webservice API Specification Doc Template

Uploaded by

Sherif Fawzy
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Barcode API Specification Doc

(AUC barcode access)

Version Date Author Description

1.0 11-Oct-2022 Sherif Fawzy Initial draft


Index
1. GetActiveAccounts
Request
Response
2. Get Barcode
Request
Response
Conventions
Status Codes
Methods

1. GetActiveAccounts
Get List of Active Accounts (Badge number, Patron Type, Expiry date) for current University ID

Request
Method URL

POST api/GetActiveAccounts/

Type Params Values

POST University ID string

University ID
AUC University ID for current person

Response
Status Response

200 {
" Badge number": string
" Patron Type": string
" Expiry Date": string format dd-MM-yyyy
}

400 {"error":"Please provide valid University ID."}

500 {"error":"Something went wrong. Please try again later."}


2. Get Barcode
Request barcode for current account

Request
Method URL

POST api/GetBarCode/

Type Params Values

POST Badge number string

Badge Number
Badge Number associated with current university id and patron type

Response
Status Response

200 {
" Bar code": string
}

400 {"error":"Invalid Badge Number"}

401 {"error":"Badge Number Expired"}

500 {"error":"Something went wrong. Please try again later."}


Glossary

Conventions
● Client - Client application.
● Status - HTTP status code of response.
● All the possible responses are listed under ‘Responses’ for each method. Only one of them
is issued per request server.
● All responses are in JSON format.
● All request parameters are mandatory unless explicitly marked as [optional]

Status Codes
All status codes are standard HTTP status codes. The below ones are used in this API.

2XX - Success of some kind


4XX - Error occurred in client’s part
5XX - Error occurred in server’s part

Status Code Description

200 OK

201 Created

202 Accepted (Request accepted, and queued for execution)

400 Bad request

401 Authentication failure

403 Forbidden

404 Resource not found

405 Method Not Allowed

409 Conflict

412 Precondition Failed


413 Request Entity Too Large

500 Internal Server Error

501 Not Implemented

503 Service Unavailable

You might also like