Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This page will provide the API contracts for LC user registration.

Info

API DOC LINK


POST:

Description: Create patron.
API: https://folio-dev-volaris-edge.ci.folio.org/patron/account/{externalSystemID}?apikey=eyJzIjoieHFpNzNjNEZzOSIsInQiOiJkaWt1IiwidSI6ImRpa3VfYWRtaW4ifQ==

...

Code Block
{
    "externalPatrons": [
        {
            "generalInfo": {
                "externalSystemId": "ext-kapil-2",
                "firstName": "Kapil2",
                "preferredFirstName": "Inactive or Expired and Remote Non-circulation",
                "lastName": "Kapil2"
            },
            "addressInfo": {
                "addressLine0": "123 Main St",
                "addressLine1": "Apt 4B",
                "city": "Metropolis",
                "country": ""
            },
            "contactInfo": {
                "phone": "555-123456",
                "mobilePhone": "555-5678",
                "email": "ext-kapil-2@test.com"
            },
            "preferredEmailCommunication": [
                "Programs",
                "Support"
            ]
        }
    ],
    "totalRecords": 1 
  }

Error Code Responses

ERROR CODE for ALL the API’s (negative scenarios) - Work in progress (will be updated by end of SPRINT 197) : Also below codes are found in API DOC: API DOC LINK

Sample Error Responses:

API TYPE

ERROR

Response JSON

POST

API DOC LINK

422: User account is not active

Code Block
{
    "code": 422,
    "errorMessage": "USER_ACCOUNT_INACTIVE"
}

422: User does not belong to the required patron group

Code Block
{
    "code": 422,
    "errorMessage": "INVALID_PATRON_GROUP"
}

422: User already exists

Code Block
{
    "code": 422,
    "errorMessage": "USER_ALREADY_EXIST"
}

422: Multiple users with email

Code Block
{
    "code": 422,
    "errorMessage": "MULTIPLE_USER_WITH_EMAIL"
}

PUT

API DOC LINK

404: user does not exist

Code Block
{
    "code": 404,
    "errorMessage": "USER_NOT_FOUND"
}

422: User already exist with email provided in payload

Code Block
{
    "code": 422,
    "errorMessage": "EMAIL_ALREADY_EXIST"
}

422: Multiple users found with the same email

Code Block
{
    "code": 422,
    "errorMessage": "MULTIPLE_USER_WITH_EMAIL"
}

422: Required Patron group not applicable for user

Code Block
{
    "code": 422,
    "errorMessage": "PATRON_GROUP_NOT_APPLICABLE"
}

GET by email

API DOC LINK

404: User does not exist

Code Block
{
    "code": 404,
    "errorMessage": "USER_NOT_FOUND"
}

422: Multiple users found with the same email

Code Block
{
    "code": 422,
    "errorMessage": "MULTIPLE_USER_WITH_EMAIL"
}