LoC Staging registration Contract
Purpose:
This page will provide the API contracts for LC staging-user registration.
STATUS: DRAFT
@Kalibek Turgumbayev , @Gurleen Kaur1 , @Vignesh Kalyanasundaram @Irina Pokhylets
1 POST Patron API for Staging user
Description: To insert or update the staging-user.
Endpoint: POST /patron
API Document - https://s3.amazonaws.com/foliodocs/api/edge-patron/r/edge-patron.html#patron_post
Important Points for payload fields | TIER 1 case | TIER 2 case |
|---|---|---|
isEmailVerified field | The value can be passed as either true or false, depending on the registration flow. Default value is set to false. | In case of Kiosk registration since the email verification step is skipped the value will be set to false . For other cases, the value can be either true or false, depending on the specific registration flow. |
Required Fields | firstName, lastName, email | firstName, lastName, email |
Status field | Default value is set to TIER 1 | Should be set as TIER 2 |
Assumptions made | Should any data corresponding to optional fields be included in the payload, it will be stored, even if it pertains to a TIER 1 scenario. | It is advisable that the data sent includes both TIER 1 and TIER 2 information. If optional fields are not included in the submission, their existing data will not be overridden. However, if optional data is provided, it will replace the current data. |
2 GET user by email API
Description: Check the existence of a user with email id.
Endpoint: GET /patron-registration-status/{emailId}
API Document - https://s3.amazonaws.com/foliodocs/api/edge-patron/r/edge-patron.html#patron_registration_status__emailid__get
GET /patron-registration-status/{emailId}
Regarding the error responses. I was expecting a response like the following. Sending 404 as part of the response body seems redundant.
{ "code": "USER_ACCOUNT_INACTIVE", "errorMessage": "User account is either inactive or expired" }Do we need to have 3 different 404 messages.
Inactive
Expired
Not Found
POST /patron
Do we need to allow the status to be set via this call ? Can you think of any reason where this would be used to set the patron to anything other than TIER-1 ?
We will be using this endpoint for submitting the following. How will the required fields be different when submitting just Tier 1 data ?
Tier 1 data
Tier 2 data
Tier 1 + Tier 2 data
I am going to assume that we can call POST /patron any number of times. Each time it gets called, it overwrites existing data, correct?