{"openapi":"3.1.0","info":{"title":"Account API","description":"Provides endpoints for managing the user account lifecycle and related account services.  \n<br>\n\nAccount Management capabilities include user registration, retrieval of authentication-related information, \npassword policy access and account hash retrieval functionality.  \n<br>\n\nThe API also includes Gift Card services that allow clients to securely register gift cards using a card number and PIN, and retrieve gift cards associated with a user account.\n","version":"1.0.0"},"servers":[{"url":"https://api.example.com","description":"Production"},{"url":"https://staging-api.example.com","description":"Staging"}],"tags":[{"name":"Account","description":"APIs for managing user account operations including registration, password policy retrieval, security questions, account hash generation, and session termination."},{"name":"GiftCard","description":"APIs for managing gift cards associated with a user account, including adding new cards and retrieving saved gift cards."},{"name":"CreditCard","description":"APIs for managing customer credit cards, including adding, updating, and retrieving saved payment methods."}],"paths":{"/account-service/api/v1/password-policy":{"get":{"tags":["Account"],"operationId":"retrievePasswordPolicy","parameters":[{"$ref":"#/components/parameters/X-Device-Token"},{"$ref":"#/components/parameters/X-Message-ID"}],"summary":"Retrieve Password Policy Information","description":"Returns the current password policy requirements including validation\nrules and regex pattern. This information is used by clients to validate\npasswords before account registration or password updates.\n","responses":{"200":{"description":"Password policy retrieved successfully","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordInfoResponse"}}}},"400":{"description":"Validation or business error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/account-service/api/v1/security-questions":{"get":{"tags":["Account"],"operationId":"retrieveSecurityQuestions","summary":"Retrieve Security Questions","description":"Returns the list of available security questions that can be selected\nduring account registration.\n","parameters":[{"$ref":"#/components/parameters/X-Device-Token"},{"$ref":"#/components/parameters/X-Message-ID"}],"responses":{"200":{"description":"Security Questions retrieved successfully","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityQuestionResponse"}}}},"400":{"description":"Validation or business error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Account"],"operationId":"retrieveSecurityQuestionsByEmail","summary":"Retrieve Security Questions by Email","description":"Returns the list of security questions selected\nduring account registration.\n","parameters":[{"$ref":"#/components/parameters/X-Device-Token"},{"$ref":"#/components/parameters/X-Message-ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSecurityQuestion"}}}},"responses":{"200":{"description":"Security Questions retrieved successfully","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityQuestionResponse"}}}},"400":{"description":"Validation or business error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/account-service/api/v1/create":{"post":{"tags":["Account"],"operationId":"createAccount","summary":"Register a New Account","description":"Creates a new user account and associates it with a registered device.\nThe request must include account details, device information, password,\nand security parameters obtained from the passphrase request (deviceRand and deviceHash).\n","parameters":[{"$ref":"#/components/parameters/X-Device-Token"},{"$ref":"#/components/parameters/X-Message-ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountRegistrationRequest"}}}},"responses":{"200":{"description":"Account created successfully","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountRegistrationResponse"}}}},"400":{"description":"Validation or business error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/account-service/api/v1/password-reset/security-answer":{"post":{"tags":["Account"],"operationId":"passwordReset","summary":"Password reset for an account","description":"Password reset using email, security answer and new password.\n","parameters":[{"$ref":"#/components/parameters/X-Device-Token"},{"$ref":"#/components/parameters/X-Message-ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequest"}}}},"responses":{"200":{"description":"Password reset successfully","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetResponse"}}}},"400":{"description":"Validation or business error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/account-service/api/v1/password-reset/email":{"post":{"tags":["Account"],"operationId":"passwordResetByEmail","summary":"Password reset for an account by customer email","description":"Password reset using email, password reset url will be send to email.\n","parameters":[{"$ref":"#/components/parameters/X-Device-Token"},{"$ref":"#/components/parameters/X-Message-ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetByEmailRequest"}}}},"responses":{"200":{"description":"Account password reset by email request processed successfully","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetResponse"}}}},"400":{"description":"Validation or business error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/account-service/api/v1/license/encrypt-key":{"get":{"tags":["Account"],"operationId":"retrieveAccountHash","summary":"Retrieve Account CC Hash","description":"Returns a securely generated account hash (ccHash) and associated\noperator URL for the authenticated user that is used for decrypting the books.\n","parameters":[{"$ref":"#/components/parameters/X-Device-Token"},{"$ref":"#/components/parameters/X-Message-ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"CCHash retrieved successfully","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseKeyResponse"}}}},"400":{"description":"Validation or business error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or expired token","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/account-service/api/v1/profile/create":{"post":{"tags":["Account"],"operationId":"createProfile","summary":"Create a New Account profile","description":"Creates a new profile and associates it with a account.\n","parameters":[{"$ref":"#/components/parameters/X-Device-Token"},{"$ref":"#/components/parameters/X-Message-ID"}],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileCreateRequest"}}}},"responses":{"200":{"description":"Profile created successfully","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileCreateResponse"}}}},"400":{"description":"Validation or business error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/account-service/api/v1/gift-cards":{"post":{"tags":["GiftCard"],"summary":"Add a gift card to an account","description":"Adds a new gift card to the authenticated user's account. The request requires the gift card number, gift card PIN, and the source channel from which the request originated. \nIf the card is valid, the system associates it with the user account and returns gift card metadata.\n","operationId":"addGiftcard","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/X-Device-Token"},{"$ref":"#/components/parameters/X-Message-ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardRequest"}}}},"responses":{"200":{"description":"successful","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardResponse"}}}},"400":{"description":"validation error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or expired access token","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["GiftCard"],"summary":"Retrieve gift cards for an account","description":"Retrieves the list of gift cards currently associated with the authenticated user's account.\nThe request requires both channel and brand parameters to identify the source of the request.\n","operationId":"getGiftcards","parameters":[{"$ref":"#/components/parameters/X-Device-Token"},{"$ref":"#/components/parameters/X-Message-ID"},{"name":"channel","in":"query","required":true,"description":"Identifies the originating channel through which the gift card is accessed (for example: NOOK, SHOPIFY,...). \nThe channel helps determine channel-specific behavior such as masking rules or response fields.\n","schema":{"type":"string","$ref":"#/components/schemas/GiftCardChannel"}},{"name":"brand","in":"query","required":true,"description":"A brand is a logical grouping of channels that belong to the same business brand or organization.\n","schema":{"type":"string","$ref":"#/components/schemas/GiftCardBrand"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Retrieves giftcard successful","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetGiftCardsResponse"}}}},"400":{"description":"validation error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or expired access token","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/account-service/api/v1/credit-cards":{"post":{"tags":["CreditCard"],"summary":"Upsert Credit Card","description":"Adds a new credit card to the customer's wallet.\nIf a card with the same cardId or card number already exists, it will be updated.\n","operationId":"upsertCreditCard","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/X-Device-Token"},{"$ref":"#/components/parameters/X-Message-ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCardRequest"}}}},"responses":{"200":{"description":"successful","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCardUpsertResponse"}}}},"400":{"description":"validation error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or expired access token","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["CreditCard"],"summary":"Retrieve credit cards for an account","description":"Retrieves all credit cards associated with the authenticated user. Sensitive card details are masked in the response.\nThe request requires channel parameter to identify the source of the request.\n","operationId":"getCreditCards","parameters":[{"$ref":"#/components/parameters/X-Device-Token"},{"$ref":"#/components/parameters/X-Message-ID"},{"name":"channel","in":"query","required":true,"description":"Identifies the originating channel through which the credit card is accessed (for example: NOOK, SHOPIFY).\n","schema":{"$ref":"#/components/schemas/CreditCardChannel"}}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Retrieves credit cards successfully","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCardsListResponse"}}}},"400":{"description":"validation error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or expired access token","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","headers":{"X-Message-ID":{"$ref":"#/components/headers/X-Message-ID"},"X-BN-Tracking-Id":{"$ref":"#/components/headers/X-BN-Tracking-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"X-Device-Token":{"description":"A device-specific authentication token issued during device registration. Required for authenticated device operations.\n","name":"X-Device-Token","in":"header","required":true,"schema":{"type":"string"}},"X-Message-ID":{"description":"A client-generated unique identifier used for request tracing and correlation across systems.\n","name":"X-Message-ID","in":"header","required":false,"schema":{"type":"string"}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Standard JWT-based Authorization header using the Bearer scheme."}},"schemas":{"AccountRegistrationRequest":{"type":"object","required":["account","device","password","deviceRand","deviceHash"],"properties":{"account":{"$ref":"#/components/schemas/AccountCreate"},"securityQuestionId":{"type":"integer"},"securityAnswer":{"type":"string"},"password":{"type":"string"},"deviceRand":{"type":"string"},"deviceHash":{"type":"string"}}},"ProfileCreateRequest":{"type":"object","required":["profileType","firstName"],"properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"password":{"type":"string"},"pin":{"type":"string"},"dob":{"type":"string","format":"date"},"gender":{"type":"string","enum":["MALE","FEMALE","OTHER"]},"profileType":{"type":"string","enum":["PRIMARY","ADDITIONAL","DEPENDENT"]},"settings":{"type":"object","description":"Client send profile preferences in json format","properties":{"preference":{"type":"string","description":"Profile preferences like avatar, auto archive, need passcode in json"},"permission":{"type":"string","description":"Profile permission like purchase, sideload, lend in json"}}}}},"PasswordResetRequest":{"type":"object","required":["email","securityAnswer","password"],"properties":{"email":{"type":"string","description":"Customer Email"},"securityAnswer":{"type":"string"},"password":{"type":"string"}}},"PasswordResetByEmailRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"Customer Email"}}},"AccountSecurityQuestion":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},"GiftCardRequest":{"allOf":[{"$ref":"#/components/schemas/GiftCard"},{"type":"object","properties":{"channel":{"type":"string","$ref":"#/components/schemas/GiftCardChannel","description":"Identifies the originating channel through which the gift card is added (for example: NOOK, SHOPIFY,...).\n"},"brand":{"type":"string","$ref":"#/components/schemas/GiftCardBrand","description":"A brand is a logical grouping of channels that belong to the same business brand or organization.\n"}},"required":["channel","brand"]}]},"CreditCardRequest":{"type":"object","required":["cardToken","cardType","cardExpiryMonth","cardExpiryYear","isDefault","billingAddress"],"properties":{"cardId":{"type":"integer","format":"int64"},"cardToken":{"type":"string"},"cardType":{"type":"string","enum":["VISA","MASTERCARD","AMEX","DISCOVER","DINERSCLUB","JB"]},"cardExpiryMonth":{"type":"integer"},"cardExpiryYear":{"type":"integer"},"isDefault":{"type":"boolean"},"nameOnCard":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"modifiedDate":{"type":"string","format":"date-time"},"billingAddress":{"$ref":"#/components/schemas/BillingAddress"}}},"BillingAddress":{"type":"object","required":["firstName","lastName","address1","city","state","postalCode","country"],"properties":{"addressId":{"type":"integer","format":"int64"},"firstName":{"type":"string"},"lastName":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"},"phone":{"type":"string"},"companyName":{"type":"string"}}},"PasswordInfoResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["message","regex"],"properties":{"message":{"type":"string"},"regex":{"type":"string"}}}}}]},"SecurityQuestionResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["questions"],"properties":{"questions":{"type":"array","items":{"$ref":"#/components/schemas/SecurityQuestion"}}}}}}]},"AccountRegistrationResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["account","token","type"],"properties":{"account":{"$ref":"#/components/schemas/Account"}}}}}]},"LicenseKeyResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["encryptedKey","operatorURL"],"properties":{"encryptedKey":{"type":"string","format":"byte","description":"Encoded binary data"},"operatorURL":{"type":"string","description":"Check with Client APP team"}}}}}]},"PasswordResetResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["status"],"properties":{"status":{"type":"integer"},"message":{"type":"string"}}}}}]},"ProfileCreateResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["status"],"properties":{"status":{"type":"integer"},"message":{"type":"string"},"profileId":{"type":"integer","format":"int64"}}}}}]},"GiftCardResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/GiftCard"}}}]},"GetGiftCardsResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","$ref":"#/components/schemas/GiftCard"}}}}]},"CreditCardUpsertResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CreditCard"}}}]},"CreditCardsListResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","$ref":"#/components/schemas/CreditCard"}}}}]},"CreditCard":{"type":"object","required":["cardType","cardExpiryMonth","cardExpiryYear","isDefault","nameOnCard","billingAddress"],"properties":{"cardId":{"type":"integer","format":"int64"},"displayNumber":{"type":"string"},"cardType":{"type":"string","enum":["VISA","MASTERCARD","AMEX","DISCOVER","DINERSCLUB","JB"]},"cardExpiryMonth":{"type":"string"},"cardExpiryYear":{"type":"string"},"isDefault":{"type":"boolean"},"nameOnCard":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"modifiedDate":{"type":"string","format":"date-time"},"billingAddress":{"$ref":"#/components/schemas/BillingAddress"}}},"SecurityQuestion":{"type":"object","required":["id","question"],"properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the security question."},"question":{"type":"string","description":"Localized security question text."}}},"Account":{"type":"object","required":["email","customerId","firstName","lastName","accountHash"],"properties":{"email":{"type":"string"},"customerId":{"type":"string","description":"Unique mercuryId assigned to the customer"},"firstName":{"type":"string"},"lastName":{"type":"string"}}},"AccountCreate":{"type":"object","required":["email","firstName","lastName","accountHash"],"properties":{"email":{"type":"string","description":"Customer email"},"firstName":{"type":"string"},"lastName":{"type":"string"}}},"GiftCardChannel":{"type":"string","enum":["NOOK","SHOPIFY","CUSTOMERMASTER","PAPERSOURCE","VFILL"]},"GiftCardBrand":{"type":"string","enum":["BN"]},"GiftCard":{"type":"object","required":["cardNo"],"properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the gift card."},"cardNo":{"type":"string","description":"Gift card number. In responses, the value may be masked depending on the requesting channel."},"pin":{"type":"string","description":"Gift card PIN. This field is required when submitting a request to adds a gift card. \nThis field may not be returned in responses depending on the requesting channel.\n"},"balance":{"type":"number","format":"double","description":"Current available balance on the gift card."},"created":{"type":"string","format":"date-time","description":"Timestamp when the gift card was created."},"updated":{"type":"string","format":"date-time","description":"Timestamp when the gift card was last updated."}}},"CreditCardChannel":{"type":"string","enum":["NOOK","SHOPIFY"]},"NotificationCategory":{"type":"string","enum":["RP","BO","AN","LO","UP","EN","LI","CCH"]},"Notification":{"description":"A notification message optionally returned alongside a successful response.","type":"object","required":["category"],"properties":{"category":{"$ref":"#/components/schemas/NotificationCategory"},"time":{"type":"string"},"desc":{"type":"string"}}},"SuccessResponse":{"description":"Base success response wrapper. All successful API responses extend this schema.\n","type":"object","required":["success"],"properties":{"success":{"type":"boolean"},"notification":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}}},"ErrorDetail":{"description":"Provides structured details describing the cause of the error.","type":"object","required":["code","text","desc"],"properties":{"code":{"type":"string","description":"Business error code"},"text":{"type":"string","description":"Error identifier"},"desc":{"type":"string","description":"Human-readable error description"}}},"ErrorResponse":{"description":"Standard error response returned when a request cannot be processed due to validation failures, business rules, or server errors.\n","type":"object","required":["success","error"],"properties":{"success":{"type":"boolean"},"error":{"$ref":"#/components/schemas/ErrorDetail"}}}},"headers":{"X-Message-ID":{"description":"Echoed request identifier for end-to-end correlation.","schema":{"type":"string"}},"X-BN-Tracking-Id":{"description":"Server-generated unique transaction identifier.","schema":{"type":"string"}}}}}