{"openapi":"3.0.0","paths":{"/files/{id}":{"get":{"operationId":"Files_serve","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"signature","required":false,"in":"query","description":"Private files only.","schema":{}},{"name":"expires","required":false,"in":"query","description":"Private files only.","schema":{}},{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"The file, with its stored content type."},"400":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"NOT_FOUND":{"value":{"code":"NOT_FOUND","message":"The requested item was not found","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Download a file\n\nPublic files (gallery media, icons, avatars) need nothing else. Private\nfiles (CR images, work documents) need the `expires` and `signature` from their URL; an invalid or\nexpired link answers 404. Supports `Range` for video seeking.","tags":["System"],"x-public":true,"security":[]}},"/health":{"get":{"operationId":"Health_check","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponseDto"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"The database is down.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponseDto"}}}}},"summary":"Readiness: MySQL and Redis\n\n200 while the API can serve requests (`ok`, or `degraded` when only the\ncache is down), 503 when the database is unreachable. The Docker image's\nHEALTHCHECK calls this.","tags":["System"],"x-public":true,"security":[]}},"/health/live":{"get":{"operationId":"Health_live","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LivenessResponseDto"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Liveness: the process is up","tags":["System"],"x-public":true,"security":[]}},"/v1/customer/auth/register":{"post":{"description":"Checks the registration form, saves it as an unverified sign-up and sends two 4-digit codes: by SMS to the mobile and by email to the address, each with its own `verificationId` (`mobile`, `email`). They work for 5 minutes. The account works only once `register/verify` confirms both; until then it can’t log in. Registering the same number again replaces the unverified form. `MOBILE_ALREADY_REGISTERED` means the app should offer login.","operationId":"CustomerAuth_register","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationSentDto"}}}},"400":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"409":{"description":"MOBILE_ALREADY_REGISTERED, EMAIL_ALREADY_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_ALREADY_REGISTERED":{"value":{"code":"MOBILE_ALREADY_REGISTERED","message":"The mobile number is already registered, please check the number.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_ALREADY_REGISTERED":{"value":{"code":"EMAIL_ALREADY_REGISTERED","message":"The email address is already registered.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED, EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_SEND_FAILED":{"value":{"code":"EMAIL_SEND_FAILED","message":"The verification code could not be sent to this email. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Register","tags":["Customer · Auth"],"x-public":true,"security":[]}},"/v1/customer/auth/register/resend-otp":{"post":{"description":"Once that code’s `resendAfterSeconds` have passed: a new code for one `verificationId` from `register` (`mobile` resends the SMS, `email` the email); the id stays the same.","operationId":"CustomerAuth_resendRegisterCode","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendCodeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"VERIFICATION_INVALID, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED, EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_SEND_FAILED":{"value":{"code":"EMAIL_SEND_FAILED","message":"The verification code could not be sent to this email. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Resend a registration code","tags":["Customer · Auth"],"x-public":true,"security":[]}},"/v1/customer/auth/register/verify":{"post":{"description":"One code at a time, in either order: `{ type: \"mobile\" | \"email\", verificationId, code }`, with the `verificationId` `register` answered for that type. While the other code is still due, answers `completed: false` with `verified` and `pending`; the code that completes the pair activates the account and answers `completed: true` with the session (the app then shows Home). A wrong code counts an attempt for that code only.","operationId":"CustomerAuth_verifyRegistration","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRegistrationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRegistrationProgressDto"}}}},"400":{"description":"VERIFICATION_INVALID, OTP_INVALID, OTP_EXPIRED, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_INVALID":{"value":{"code":"OTP_INVALID","message":"The verification code is incorrect.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_EXPIRED":{"value":{"code":"OTP_EXPIRED","message":"The verification code is invalid or expired. Please request a new one.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_TOO_MANY_ATTEMPTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_TOO_MANY_ATTEMPTS":{"value":{"code":"OTP_TOO_MANY_ATTEMPTS","message":"Too many incorrect attempts. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Verify a registration code","tags":["Customer · Auth"],"x-public":true,"x-session-token":{"namespace":"customer","field":"accessToken"},"security":[]}},"/v1/customer/auth/login":{"post":{"description":"The mobile tab sends `mobile`, the email tab `email` (BRD 4.1.4): sends a 4-digit code by SMS or email to a registered, active account and answers its `verificationId`. `MOBILE_NOT_REGISTERED` / `EMAIL_NOT_REGISTERED` mean the app should offer registration.","operationId":"CustomerAuth_login","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"404":{"description":"MOBILE_NOT_REGISTERED, EMAIL_NOT_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_NOT_REGISTERED":{"value":{"code":"MOBILE_NOT_REGISTERED","message":"No account is registered with this number. Please make sure the mobile number is correct.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_NOT_REGISTERED":{"value":{"code":"EMAIL_NOT_REGISTERED","message":"No account is registered with this email. Please make sure the email address is correct.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED, EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_SEND_FAILED":{"value":{"code":"EMAIL_SEND_FAILED","message":"The verification code could not be sent to this email. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Log in","tags":["Customer · Auth"],"x-public":true,"security":[]}},"/v1/customer/auth/login/resend-otp":{"post":{"description":"Once `resendAfterSeconds` have passed: a new code, by the same channel, for the `verificationId` from `login`, which stays the same.","operationId":"CustomerAuth_resendLoginCode","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendCodeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"VERIFICATION_INVALID, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED, EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_SEND_FAILED":{"value":{"code":"EMAIL_SEND_FAILED","message":"The verification code could not be sent to this email. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Resend the login code","tags":["Customer · Auth"],"x-public":true,"security":[]}},"/v1/customer/auth/login/verify":{"post":{"description":"The `verificationId` from `login` and the code: starts a session.","operationId":"CustomerAuth_verifyLogin","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCodeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSessionDto"}}}},"400":{"description":"VERIFICATION_INVALID, OTP_INVALID, OTP_EXPIRED, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_INVALID":{"value":{"code":"OTP_INVALID","message":"The verification code is incorrect.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_EXPIRED":{"value":{"code":"OTP_EXPIRED","message":"The verification code is invalid or expired. Please request a new one.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"404":{"description":"MOBILE_NOT_REGISTERED, EMAIL_NOT_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_NOT_REGISTERED":{"value":{"code":"MOBILE_NOT_REGISTERED","message":"No account is registered with this number. Please make sure the mobile number is correct.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_NOT_REGISTERED":{"value":{"code":"EMAIL_NOT_REGISTERED","message":"No account is registered with this email. Please make sure the email address is correct.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_TOO_MANY_ATTEMPTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_TOO_MANY_ATTEMPTS":{"value":{"code":"OTP_TOO_MANY_ATTEMPTS","message":"Too many incorrect attempts. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Verify the login","tags":["Customer · Auth"],"x-public":true,"x-session-token":{"namespace":"customer","field":"accessToken"},"security":[]}},"/v1/customer/auth/logout":{"post":{"description":"Ends the session of the token sent; it stops working immediately. Other devices stay signed in.","operationId":"CustomerSession_logout","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"204":{"description":"Logged out."},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Log out","tags":["Customer · Auth"],"security":[{"customer":[]}]}},"/v1/customer/account":{"get":{"operationId":"CustomerAccount_get","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"My account","tags":["Customer · Account"],"security":[{"customer":[]}]},"patch":{"description":"The \"Change language\" screen (`ar`, `en`, `ur`, `bn`; Urdu and Bengali get English text for now). Requests without `Accept-Language` or `?lang=` are answered in it from the next request, and SMS and email messages use it.","operationId":"CustomerAccount_update","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"400":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Change my language","tags":["Customer · Account"],"security":[{"customer":[]}]},"delete":{"description":"Call after the app's confirmation dialog; there is no code. Your details and files are removed, every device is signed out (this one included), and your number, email (and Iqama or CR number) can register a new, empty account.","operationId":"CustomerAccount_delete","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"204":{"description":"The account was deleted."},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Delete my account","tags":["Customer · Account"],"security":[{"customer":[]}]}},"/v1/customer/account/change-mobile":{"post":{"description":"Step 1 of changing the mobile number: the code goes to the new number, and the answer carries the `verificationId` for step 2. Resend with `POST account/change-mobile/resend-otp`.","operationId":"CustomerAccount_requestCode","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMobileOtpDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"MOBILE_UNCHANGED, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_UNCHANGED":{"value":{"code":"MOBILE_UNCHANGED","message":"The new number is the same as your current number.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"409":{"description":"MOBILE_ALREADY_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_ALREADY_REGISTERED":{"value":{"code":"MOBILE_ALREADY_REGISTERED","message":"The mobile number is already registered, please check the number.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Send a code to a new number","tags":["Customer · Account"],"security":[{"customer":[]}]}},"/v1/customer/account/change-mobile/resend-otp":{"post":{"description":"Once `resendAfterSeconds` have passed: a new code for the `verificationId` from `account/change-mobile`, which stays the same.","operationId":"CustomerAccount_resendCode","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendCodeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"VERIFICATION_INVALID, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Resend the code to the new number","tags":["Customer · Account"],"security":[{"customer":[]}]}},"/v1/customer/account/change-mobile/verify":{"post":{"description":"Step 2: the `verificationId` and the code sent to the new number; swaps it in, and the old number no longer signs in. Every other device is signed out; this one stays signed in. A wrong code keeps the old number.","operationId":"CustomerAccount_changeMobile","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMobileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"400":{"description":"MOBILE_UNCHANGED, VERIFICATION_INVALID, OTP_INVALID, OTP_EXPIRED, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_UNCHANGED":{"value":{"code":"MOBILE_UNCHANGED","message":"The new number is the same as your current number.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_INVALID":{"value":{"code":"OTP_INVALID","message":"The verification code is incorrect.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_EXPIRED":{"value":{"code":"OTP_EXPIRED","message":"The verification code is invalid or expired. Please request a new one.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"409":{"description":"MOBILE_ALREADY_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_ALREADY_REGISTERED":{"value":{"code":"MOBILE_ALREADY_REGISTERED","message":"The mobile number is already registered, please check the number.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_TOO_MANY_ATTEMPTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_TOO_MANY_ATTEMPTS":{"value":{"code":"OTP_TOO_MANY_ATTEMPTS","message":"Too many incorrect attempts. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Change my mobile number","tags":["Customer · Account"],"security":[{"customer":[]}]}},"/v1/customer/account/change-email":{"post":{"description":"Step 1 of changing the email (BRD 4.1.12.3): the code is emailed to the new address, and the answer carries the `verificationId` for step 2. Resend with `POST account/change-email/resend-otp`.","operationId":"CustomerAccount_requestEmailCode","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeEmailOtpDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"EMAIL_UNCHANGED, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"EMAIL_UNCHANGED":{"value":{"code":"EMAIL_UNCHANGED","message":"The new email is the same as your current email.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"409":{"description":"EMAIL_ALREADY_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"EMAIL_ALREADY_REGISTERED":{"value":{"code":"EMAIL_ALREADY_REGISTERED","message":"The email address is already registered.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED, EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_SEND_FAILED":{"value":{"code":"EMAIL_SEND_FAILED","message":"The verification code could not be sent to this email. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Send a code to a new email","tags":["Customer · Account"],"security":[{"customer":[]}]}},"/v1/customer/account/change-email/resend-otp":{"post":{"description":"Once `resendAfterSeconds` have passed: a new code for the `verificationId` from `account/change-email`, which stays the same.","operationId":"CustomerAccount_resendEmailCode","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendCodeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"VERIFICATION_INVALID, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED, EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_SEND_FAILED":{"value":{"code":"EMAIL_SEND_FAILED","message":"The verification code could not be sent to this email. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Resend the code to the new email","tags":["Customer · Account"],"security":[{"customer":[]}]}},"/v1/customer/account/change-email/verify":{"post":{"description":"Step 2: the `verificationId` and the code emailed to the new address; swaps it in, and the old address no longer signs in. Every other device is signed out; this one stays signed in.","operationId":"CustomerAccount_changeEmail","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeEmailDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"400":{"description":"EMAIL_UNCHANGED, VERIFICATION_INVALID, OTP_INVALID, OTP_EXPIRED, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"EMAIL_UNCHANGED":{"value":{"code":"EMAIL_UNCHANGED","message":"The new email is the same as your current email.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_INVALID":{"value":{"code":"OTP_INVALID","message":"The verification code is incorrect.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_EXPIRED":{"value":{"code":"OTP_EXPIRED","message":"The verification code is invalid or expired. Please request a new one.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"409":{"description":"EMAIL_ALREADY_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"EMAIL_ALREADY_REGISTERED":{"value":{"code":"EMAIL_ALREADY_REGISTERED","message":"The email address is already registered.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_TOO_MANY_ATTEMPTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_TOO_MANY_ATTEMPTS":{"value":{"code":"OTP_TOO_MANY_ATTEMPTS","message":"Too many incorrect attempts. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Change my email","tags":["Customer · Account"],"security":[{"customer":[]}]}},"/v1/customer/profile":{"get":{"operationId":"CustomerProfile_get","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"My profile","tags":["Customer · Profile"],"security":[{"customer":[]}]},"patch":{"description":"Send only the fields that changed. Name and photo: a new photo goes in the `avatar` part (the old one is deleted), and `avatarFileId` sent empty removes it. The mobile and email change through `account/change-mobile` and `account/change-email`.\n\n**Files with the form:** send it as `multipart/form-data` (fields as text; lists and objects in brackets, e.g. `specifications[0][name]`) with `avatar` as file parts.","operationId":"CustomerProfile_update","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Letters and digits, 2–100 characters.","example":"سارة أحمد"},"avatarFileId":{"type":"string","nullable":true,"description":"Leave out to keep the current file; send it empty to remove it. To replace it, send the `avatar` file instead."},"avatar":{"type":"string","format":"binary","description":"PNG, JPG, WEBP, up to 10 MB."}},"required":[]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"400":{"description":"FILE_NOT_AVAILABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"FILE_NOT_AVAILABLE":{"value":{"code":"FILE_NOT_AVAILABLE","message":"This file can't be used. Please upload it again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"413":{"description":"FILE_TOO_LARGE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"FILE_TOO_LARGE":{"value":{"code":"FILE_TOO_LARGE","message":"File size exceeds the allowed limit ({maxMb} MB).","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"415":{"description":"FILE_TYPE_NOT_ALLOWED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"FILE_TYPE_NOT_ALLOWED":{"value":{"code":"FILE_TYPE_NOT_ALLOWED","message":"Unsupported file type. Allowed: {allowed}","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Save my profile","tags":["Customer · Profile"],"security":[{"customer":[]}]}},"/v1/customer/cities":{"get":{"description":"The active cities, for city pickers (ads, filters), each with its region, sorted by name in the request language. Public. Send the chosen `id`; an inactive or unknown city is refused with `CITY_NOT_AVAILABLE`.","operationId":"CustomerCities_list","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CityListDto"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"List cities","tags":["Customer · Cities"],"x-public":true,"security":[]}},"/v1/customer/cities/{id}/neighbourhoods":{"get":{"description":"The active neighbourhoods of an active city, for the location screen, the search filter and the provider’s profile and areas, each with its centre (for maps and \"nearest\"). Public. Sorted by name in the request language.","operationId":"CustomerCities_neighbourhoods","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeighbourhoodListDto"}}}},"400":{"description":"CITY_NOT_AVAILABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"CITY_NOT_AVAILABLE":{"value":{"code":"CITY_NOT_AVAILABLE","message":"This city is not available. Please choose another.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"NOT_FOUND":{"value":{"code":"NOT_FOUND","message":"The requested item was not found","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"List a city’s neighbourhoods","tags":["Customer · Cities"],"x-public":true,"security":[]}},"/v1/customer/services":{"get":{"description":"The active home services, in display order: the home screen cards, the search filter, and the list providers pick theirs from. Public. `iconUrl` is null until an admin uploads one; the app may show its bundled icon for `code` meanwhile. An inactive or unknown service is refused with `SERVICE_NOT_AVAILABLE` where one is sent.","operationId":"CustomerServices_list","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceListDto"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"List services","tags":["Customer · Services"],"x-public":true,"security":[]}},"/v1/customer/settings":{"get":{"description":"The admin’s contact channels (Contact Us; BRD 4.3.20: only the configured ones are included, `phones` is always a list) and the apps’ store links. Public and cached. The grace period, VAT and reminders are server-side only.","operationId":"CustomerSettings_read","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSettingsDto"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Read app settings","tags":["Customer · Settings"],"x-public":true,"security":[]}},"/v1/customer/content/pages/{key}":{"get":{"description":"About, Terms or Privacy (the account menu, and the Terms link on sign-up), as rich text (HTML). About is shared; `terms` and `privacy` are this app’s own (the customer’s or the provider’s, BRD 4.3.20). When the text is empty in the request language, the other language is used. Public and cached.","operationId":"CustomerContent_page","parameters":[{"name":"key","required":true,"in":"path","schema":{"enum":["about","terms","privacy"],"type":"string"}},{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppPageDto"}}}},"400":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"NOT_FOUND":{"value":{"code":"NOT_FOUND","message":"The requested item was not found","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Read a page","tags":["Customer · Content"],"x-public":true,"security":[]}},"/v1/customer/contact":{"get":{"description":"The configured contact channels (as in `GET settings`) and the message types, in the request language. Public.","operationId":"CustomerContact_screen","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppContactDto"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Contact Us screen","tags":["Customer · Contact"],"x-public":true,"security":[]}},"/v1/customer/contact/messages":{"post":{"description":"To the administration (BRD 4.1.12.4): name, mobile, email, an optional type and the text. Guests can send; with a valid token of this app the message is linked to the account, and a missing or expired token sends as a guest. At most 3 an hour per account (or mobile, for guests) and 5 an hour per network. On 201 the app shows `message` (\"Your message has been successfully sent\").","operationId":"CustomerContact_send","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendContactMessageDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSentDto"}}}},"400":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Send a message","tags":["Customer · Contact"],"x-public":true,"security":[]}},"/v1/customer/report-reasons":{"get":{"description":"The active reasons for \"Report the service provider\" (BRD 4.1.9.1), in display order and the request language. When `notesRequired` is true, the report must give its details. Public (reporting itself needs login).","operationId":"ReportReasons_list","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportReasonListDto"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Report reasons","tags":["Customer · Reports"],"x-public":true,"security":[]}},"/v1/customer/banners":{"get":{"description":"The banners running today (BRD 4.1.6: active and inside their dates), in display order; an image or a video each. `link.type` says what a tap opens: nothing, a web page (`url`), a provider’s profile (`providerId`) or a service’s providers (`serviceId`). Empty when none is running: the app hides the space. Also part of the customer home (API-062). Guests allowed.","operationId":"CustomerBanners_list","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BannerListDto"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Banners","tags":["Customer · Home"],"x-public":true,"security":[]}},"/v1/provider/auth/register":{"post":{"description":"One multipart form (BRD 4.2.5): `accountType` `individual` with `iqamaNumber`, or `company` with `crNumber` and the `crFile` part (D13). Checks the form, saves it as an unverified sign-up and sends two 4-digit codes: by SMS to the mobile and by email to the address, each with its own `verificationId` (`mobile`, `email`). They work for 5 minutes. The account works only once `register/verify` confirms both; until then it can’t log in. Registering the same number again replaces the unverified form. `MOBILE_ALREADY_REGISTERED` means the app should offer login.\n\n**Files with the form:** send it as `multipart/form-data` (fields as text; lists and objects in brackets, e.g. `specifications[0][name]`) with `crFile` as file parts.","operationId":"ProviderAuth_register","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"accountType":{"type":"string","description":"`individual` (an individual advertiser) or `company` (a company or\nestablishment).","example":"company","enum":["individual","company"]},"name":{"type":"string","description":"The provider's or company's name: letters and numbers, 2–100.","example":"شركة الريان للمقاولات"},"mobile":{"type":"string","description":"Saudi mobile number, `05XXXXXXXX`; verified by SMS.","example":"0551234567"},"email":{"type":"string","description":"Required; unique, at most 100 characters; verified by email (D21).","example":"info@alrayan.sa"},"iqamaNumber":{"type":"string","description":"Individuals: the residence (Iqama) number, 10 digits starting with 2.","example":"2123456789"},"crNumber":{"type":"string","description":"Companies: the commercial registration number, 10 digits.","example":"1010123456"},"acceptTerms":{"type":"boolean","description":"The Terms and Conditions checkbox; must be `true`."},"crFile":{"type":"string","format":"binary","description":"PDF, PNG, JPG, up to 10 MB."}},"required":["accountType","name","mobile","email","acceptTerms"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationSentDto"}}}},"400":{"description":"FILE_NOT_AVAILABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"FILE_NOT_AVAILABLE":{"value":{"code":"FILE_NOT_AVAILABLE","message":"This file can't be used. Please upload it again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"409":{"description":"MOBILE_ALREADY_REGISTERED, EMAIL_ALREADY_REGISTERED, IQAMA_ALREADY_REGISTERED, CR_ALREADY_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_ALREADY_REGISTERED":{"value":{"code":"MOBILE_ALREADY_REGISTERED","message":"The mobile number is already registered, please check the number.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_ALREADY_REGISTERED":{"value":{"code":"EMAIL_ALREADY_REGISTERED","message":"The email address is already registered.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"IQAMA_ALREADY_REGISTERED":{"value":{"code":"IQAMA_ALREADY_REGISTERED","message":"The residence number is already registered.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"CR_ALREADY_REGISTERED":{"value":{"code":"CR_ALREADY_REGISTERED","message":"Commercial registration number already registered.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED, EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_SEND_FAILED":{"value":{"code":"EMAIL_SEND_FAILED","message":"The verification code could not be sent to this email. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Register","tags":["Provider · Auth"],"x-public":true,"security":[]}},"/v1/provider/auth/register/resend-otp":{"post":{"description":"Once that code’s `resendAfterSeconds` have passed: a new code for one `verificationId` from `register` (`mobile` resends the SMS, `email` the email); the id stays the same.","operationId":"ProviderAuth_resendRegisterCode","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendCodeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"VERIFICATION_INVALID, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED, EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_SEND_FAILED":{"value":{"code":"EMAIL_SEND_FAILED","message":"The verification code could not be sent to this email. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Resend a registration code","tags":["Provider · Auth"],"x-public":true,"security":[]}},"/v1/provider/auth/register/verify":{"post":{"description":"One code at a time, in either order: `{ type: \"mobile\" | \"email\", verificationId, code }`, with the `verificationId` `register` answered for that type. While the other code is still due, answers `completed: false` with `verified` and `pending`; the code that completes the pair activates the account and answers `completed: true` with the session (the app then shows Home). A wrong code counts an attempt for that code only.","operationId":"ProviderAuth_verifyRegistration","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRegistrationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderRegistrationProgressDto"}}}},"400":{"description":"VERIFICATION_INVALID, OTP_INVALID, OTP_EXPIRED, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_INVALID":{"value":{"code":"OTP_INVALID","message":"The verification code is incorrect.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_EXPIRED":{"value":{"code":"OTP_EXPIRED","message":"The verification code is invalid or expired. Please request a new one.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_TOO_MANY_ATTEMPTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_TOO_MANY_ATTEMPTS":{"value":{"code":"OTP_TOO_MANY_ATTEMPTS","message":"Too many incorrect attempts. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Verify a registration code","tags":["Provider · Auth"],"x-public":true,"x-session-token":{"namespace":"provider","field":"accessToken"},"security":[]}},"/v1/provider/auth/login":{"post":{"description":"The mobile tab sends `mobile`, the email tab `email` (BRD 4.1.4): sends a 4-digit code by SMS or email to a registered, active account and answers its `verificationId`. `MOBILE_NOT_REGISTERED` / `EMAIL_NOT_REGISTERED` mean the app should offer registration.","operationId":"ProviderAuth_login","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"404":{"description":"MOBILE_NOT_REGISTERED, EMAIL_NOT_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_NOT_REGISTERED":{"value":{"code":"MOBILE_NOT_REGISTERED","message":"No account is registered with this number. Please make sure the mobile number is correct.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_NOT_REGISTERED":{"value":{"code":"EMAIL_NOT_REGISTERED","message":"No account is registered with this email. Please make sure the email address is correct.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED, EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_SEND_FAILED":{"value":{"code":"EMAIL_SEND_FAILED","message":"The verification code could not be sent to this email. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Log in","tags":["Provider · Auth"],"x-public":true,"security":[]}},"/v1/provider/auth/login/resend-otp":{"post":{"description":"Once `resendAfterSeconds` have passed: a new code, by the same channel, for the `verificationId` from `login`, which stays the same.","operationId":"ProviderAuth_resendLoginCode","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendCodeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"VERIFICATION_INVALID, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED, EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_SEND_FAILED":{"value":{"code":"EMAIL_SEND_FAILED","message":"The verification code could not be sent to this email. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Resend the login code","tags":["Provider · Auth"],"x-public":true,"security":[]}},"/v1/provider/auth/login/verify":{"post":{"description":"The `verificationId` from `login` and the code: starts a session.","operationId":"ProviderAuth_verifyLogin","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCodeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderSessionDto"}}}},"400":{"description":"VERIFICATION_INVALID, OTP_INVALID, OTP_EXPIRED, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_INVALID":{"value":{"code":"OTP_INVALID","message":"The verification code is incorrect.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_EXPIRED":{"value":{"code":"OTP_EXPIRED","message":"The verification code is invalid or expired. Please request a new one.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"404":{"description":"MOBILE_NOT_REGISTERED, EMAIL_NOT_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_NOT_REGISTERED":{"value":{"code":"MOBILE_NOT_REGISTERED","message":"No account is registered with this number. Please make sure the mobile number is correct.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_NOT_REGISTERED":{"value":{"code":"EMAIL_NOT_REGISTERED","message":"No account is registered with this email. Please make sure the email address is correct.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_TOO_MANY_ATTEMPTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_TOO_MANY_ATTEMPTS":{"value":{"code":"OTP_TOO_MANY_ATTEMPTS","message":"Too many incorrect attempts. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Verify the login","tags":["Provider · Auth"],"x-public":true,"x-session-token":{"namespace":"provider","field":"accessToken"},"security":[]}},"/v1/provider/auth/logout":{"post":{"description":"Ends the session of the token sent; it stops working immediately. Other devices stay signed in.","operationId":"ProviderSession_logout","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"204":{"description":"Logged out."},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Log out","tags":["Provider · Auth"],"security":[{"provider":[]}]}},"/v1/provider/account":{"get":{"operationId":"ProviderAccount_get","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDto"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"My account","tags":["Provider · Account"],"security":[{"provider":[]}]},"patch":{"description":"The \"Change language\" screen (`ar`, `en`, `ur`, `bn`; Urdu and Bengali get English text for now). Requests without `Accept-Language` or `?lang=` are answered in it from the next request, and SMS and email messages use it.","operationId":"ProviderAccount_update","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDto"}}}},"400":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Change my language","tags":["Provider · Account"],"security":[{"provider":[]}]},"delete":{"description":"Call after the app's confirmation dialog; there is no code. Your details and files are removed, every device is signed out (this one included), and your number, email (and Iqama or CR number) can register a new, empty account.","operationId":"ProviderAccount_delete","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"204":{"description":"The account was deleted."},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Delete my account","tags":["Provider · Account"],"security":[{"provider":[]}]}},"/v1/provider/account/change-mobile":{"post":{"description":"Step 1 of changing the mobile number: the code goes to the new number, and the answer carries the `verificationId` for step 2. Resend with `POST account/change-mobile/resend-otp`.","operationId":"ProviderAccount_requestCode","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMobileOtpDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"MOBILE_UNCHANGED, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_UNCHANGED":{"value":{"code":"MOBILE_UNCHANGED","message":"The new number is the same as your current number.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"409":{"description":"MOBILE_ALREADY_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_ALREADY_REGISTERED":{"value":{"code":"MOBILE_ALREADY_REGISTERED","message":"The mobile number is already registered, please check the number.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Send a code to a new number","tags":["Provider · Account"],"security":[{"provider":[]}]}},"/v1/provider/account/change-mobile/resend-otp":{"post":{"description":"Once `resendAfterSeconds` have passed: a new code for the `verificationId` from `account/change-mobile`, which stays the same.","operationId":"ProviderAccount_resendCode","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendCodeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"VERIFICATION_INVALID, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Resend the code to the new number","tags":["Provider · Account"],"security":[{"provider":[]}]}},"/v1/provider/account/change-mobile/verify":{"post":{"description":"Step 2: the `verificationId` and the code sent to the new number; swaps it in, and the old number no longer signs in. Every other device is signed out; this one stays signed in. A wrong code keeps the old number.","operationId":"ProviderAccount_changeMobile","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMobileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDto"}}}},"400":{"description":"MOBILE_UNCHANGED, VERIFICATION_INVALID, OTP_INVALID, OTP_EXPIRED, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_UNCHANGED":{"value":{"code":"MOBILE_UNCHANGED","message":"The new number is the same as your current number.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_INVALID":{"value":{"code":"OTP_INVALID","message":"The verification code is incorrect.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_EXPIRED":{"value":{"code":"OTP_EXPIRED","message":"The verification code is invalid or expired. Please request a new one.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"409":{"description":"MOBILE_ALREADY_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"MOBILE_ALREADY_REGISTERED":{"value":{"code":"MOBILE_ALREADY_REGISTERED","message":"The mobile number is already registered, please check the number.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_TOO_MANY_ATTEMPTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_TOO_MANY_ATTEMPTS":{"value":{"code":"OTP_TOO_MANY_ATTEMPTS","message":"Too many incorrect attempts. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Change my mobile number","tags":["Provider · Account"],"security":[{"provider":[]}]}},"/v1/provider/account/change-email":{"post":{"description":"Step 1 of changing the email (BRD 4.1.12.3): the code is emailed to the new address, and the answer carries the `verificationId` for step 2. Resend with `POST account/change-email/resend-otp`.","operationId":"ProviderAccount_requestEmailCode","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeEmailOtpDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"EMAIL_UNCHANGED, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"EMAIL_UNCHANGED":{"value":{"code":"EMAIL_UNCHANGED","message":"The new email is the same as your current email.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"409":{"description":"EMAIL_ALREADY_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"EMAIL_ALREADY_REGISTERED":{"value":{"code":"EMAIL_ALREADY_REGISTERED","message":"The email address is already registered.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED, EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_SEND_FAILED":{"value":{"code":"EMAIL_SEND_FAILED","message":"The verification code could not be sent to this email. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Send a code to a new email","tags":["Provider · Account"],"security":[{"provider":[]}]}},"/v1/provider/account/change-email/resend-otp":{"post":{"description":"Once `resendAfterSeconds` have passed: a new code for the `verificationId` from `account/change-email`, which stays the same.","operationId":"ProviderAccount_resendEmailCode","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendCodeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationSentDto"}}}},"400":{"description":"VERIFICATION_INVALID, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_RESEND_TOO_SOON, TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_RESEND_TOO_SOON":{"value":{"code":"OTP_RESEND_TOO_SOON","message":"You can request a new code in {seconds} seconds.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"503":{"description":"SMS_SEND_FAILED, EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SMS_SEND_FAILED":{"value":{"code":"SMS_SEND_FAILED","message":"The verification code could not be sent. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"EMAIL_SEND_FAILED":{"value":{"code":"EMAIL_SEND_FAILED","message":"The verification code could not be sent to this email. Please try again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Resend the code to the new email","tags":["Provider · Account"],"security":[{"provider":[]}]}},"/v1/provider/account/change-email/verify":{"post":{"description":"Step 2: the `verificationId` and the code emailed to the new address; swaps it in, and the old address no longer signs in. Every other device is signed out; this one stays signed in.","operationId":"ProviderAccount_changeEmail","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeEmailDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDto"}}}},"400":{"description":"EMAIL_UNCHANGED, VERIFICATION_INVALID, OTP_INVALID, OTP_EXPIRED, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"EMAIL_UNCHANGED":{"value":{"code":"EMAIL_UNCHANGED","message":"The new email is the same as your current email.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VERIFICATION_INVALID":{"value":{"code":"VERIFICATION_INVALID","message":"This verification is no longer valid. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_INVALID":{"value":{"code":"OTP_INVALID","message":"The verification code is incorrect.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"OTP_EXPIRED":{"value":{"code":"OTP_EXPIRED","message":"The verification code is invalid or expired. Please request a new one.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"409":{"description":"EMAIL_ALREADY_REGISTERED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"EMAIL_ALREADY_REGISTERED":{"value":{"code":"EMAIL_ALREADY_REGISTERED","message":"The email address is already registered.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"OTP_TOO_MANY_ATTEMPTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"OTP_TOO_MANY_ATTEMPTS":{"value":{"code":"OTP_TOO_MANY_ATTEMPTS","message":"Too many incorrect attempts. Please request a new code.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Change my email","tags":["Provider · Account"],"security":[{"provider":[]}]}},"/v1/provider/profile":{"get":{"operationId":"ProviderProfile_get","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDto"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"My profile","tags":["Provider · Profile"],"security":[{"provider":[]}]},"patch":{"description":"Send only the fields that changed: `name`, `bio`, `cityId` and `neighbourhoodId` (from `GET /cities` and `GET /cities/{id}/neighbourhoods`; the neighbourhood must be in the city), the photo as the `avatar` part and the cover as the `cover` part (replaced ones are deleted); `avatarFileId` / `coverFileId` / `bio` sent empty remove them. The account type, Iqama and CR are read-only; the mobile and email change through `account/change-mobile` and `account/change-email`.\n\n**Files with the form:** send it as `multipart/form-data` (fields as text; lists and objects in brackets, e.g. `specifications[0][name]`) with `avatar`, `cover` as file parts.","operationId":"ProviderProfile_update","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The provider's or company's name: letters and digits, 2–100.","example":"شركة الريان للمقاولات"},"bio":{"type":"string","nullable":true,"description":"The description customers read (BRD 4.1.9.1), at most 500\ncharacters; sent empty, removes it.","example":"خبرة أكثر من 10 سنوات في أعمال الكهرباء والسباكة."},"cityId":{"type":"string","nullable":true,"description":"From `GET /cities`; sent empty, removes the city and neighbourhood. A\nnew city without a `neighbourhoodId` clears the neighbourhood."},"neighbourhoodId":{"type":"string","nullable":true,"description":"From `GET /cities/{cityId}/neighbourhoods`; must be in the city.\nSent empty, removes it."},"avatarFileId":{"type":"string","nullable":true,"description":"Leave out to keep the current file; send it empty to remove it. To replace it, send the `avatar` file instead."},"coverFileId":{"type":"string","nullable":true,"description":"Leave out to keep the current file; send it empty to remove it. To replace it, send the `cover` file instead."},"avatar":{"type":"string","format":"binary","description":"PNG, JPG, WEBP, up to 10 MB."},"cover":{"type":"string","format":"binary","description":"PNG, JPG, WEBP, up to 10 MB."}},"required":[]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDto"}}}},"400":{"description":"CITY_NOT_AVAILABLE, NEIGHBOURHOOD_NOT_AVAILABLE, FILE_NOT_AVAILABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"CITY_NOT_AVAILABLE":{"value":{"code":"CITY_NOT_AVAILABLE","message":"This city is not available. Please choose another.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"NEIGHBOURHOOD_NOT_AVAILABLE":{"value":{"code":"NEIGHBOURHOOD_NOT_AVAILABLE","message":"This neighbourhood is not available. Please choose another.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"FILE_NOT_AVAILABLE":{"value":{"code":"FILE_NOT_AVAILABLE","message":"This file can't be used. Please upload it again.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"413":{"description":"FILE_TOO_LARGE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"FILE_TOO_LARGE":{"value":{"code":"FILE_TOO_LARGE","message":"File size exceeds the allowed limit ({maxMb} MB).","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"415":{"description":"FILE_TYPE_NOT_ALLOWED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"FILE_TYPE_NOT_ALLOWED":{"value":{"code":"FILE_TYPE_NOT_ALLOWED","message":"Unsupported file type. Allowed: {allowed}","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Save my profile","tags":["Provider · Profile"],"security":[{"provider":[]}]}},"/v1/provider/me/services":{"get":{"description":"Every active service the administration offers, in display order, with `selected` on the ones you provide (BRD 4.2.11). Only these can be chosen; there is no adding a service of your own.","operationId":"ProviderMyServices_screen","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderServicesDto"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"My services","tags":["Provider · My services"],"security":[{"provider":[]}]},"put":{"description":"The whole selection: one or more service ids, replacing the previous ones (BRD: \"at least one service must be selected\"). An inactive or unknown one is `SERVICE_NOT_AVAILABLE`, saving nothing. Customers find you by these services, and you are listed only with at least one (API-044). Answers the screen as saved.","operationId":"ProviderMyServices_save","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveProviderServicesDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderServicesDto"}}}},"400":{"description":"SERVICE_NOT_AVAILABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SERVICE_NOT_AVAILABLE":{"value":{"code":"SERVICE_NOT_AVAILABLE","message":"This service is not available. Please choose another.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Save my services","tags":["Provider · My services"],"security":[{"provider":[]}]}},"/v1/provider/cities":{"get":{"description":"The active cities, for city pickers (ads, filters), each with its region, sorted by name in the request language. Public. Send the chosen `id`; an inactive or unknown city is refused with `CITY_NOT_AVAILABLE`.","operationId":"ProviderCities_list","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CityListDto"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"List cities","tags":["Provider · Cities"],"x-public":true,"security":[]}},"/v1/provider/cities/{id}/neighbourhoods":{"get":{"description":"The active neighbourhoods of an active city, for the location screen, the search filter and the provider’s profile and areas, each with its centre (for maps and \"nearest\"). Public. Sorted by name in the request language.","operationId":"ProviderCities_neighbourhoods","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeighbourhoodListDto"}}}},"400":{"description":"CITY_NOT_AVAILABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"CITY_NOT_AVAILABLE":{"value":{"code":"CITY_NOT_AVAILABLE","message":"This city is not available. Please choose another.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"NOT_FOUND":{"value":{"code":"NOT_FOUND","message":"The requested item was not found","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"List a city’s neighbourhoods","tags":["Provider · Cities"],"x-public":true,"security":[]}},"/v1/provider/services":{"get":{"description":"The active home services, in display order: the home screen cards, the search filter, and the list providers pick theirs from. Public. `iconUrl` is null until an admin uploads one; the app may show its bundled icon for `code` meanwhile. An inactive or unknown service is refused with `SERVICE_NOT_AVAILABLE` where one is sent.","operationId":"ProviderServices_list","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceListDto"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"List services","tags":["Provider · Services"],"x-public":true,"security":[]}},"/v1/provider/settings":{"get":{"description":"The admin’s contact channels (Contact Us; BRD 4.3.20: only the configured ones are included, `phones` is always a list) and the apps’ store links. Public and cached. The grace period, VAT and reminders are server-side only.","operationId":"ProviderSettings_read","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSettingsDto"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Read app settings","tags":["Provider · Settings"],"x-public":true,"security":[]}},"/v1/provider/content/pages/{key}":{"get":{"description":"About, Terms or Privacy (the account menu, and the Terms link on sign-up), as rich text (HTML). About is shared; `terms` and `privacy` are this app’s own (the customer’s or the provider’s, BRD 4.3.20). When the text is empty in the request language, the other language is used. Public and cached.","operationId":"ProviderContent_page","parameters":[{"name":"key","required":true,"in":"path","schema":{"enum":["about","terms","privacy"],"type":"string"}},{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppPageDto"}}}},"400":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"NOT_FOUND":{"value":{"code":"NOT_FOUND","message":"The requested item was not found","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Read a page","tags":["Provider · Content"],"x-public":true,"security":[]}},"/v1/provider/contact":{"get":{"description":"The configured contact channels (as in `GET settings`) and the message types, in the request language. Public.","operationId":"ProviderContact_screen","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppContactDto"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Contact Us screen","tags":["Provider · Contact"],"x-public":true,"security":[]}},"/v1/provider/contact/messages":{"post":{"description":"To the administration (BRD 4.1.12.4): name, mobile, email, an optional type and the text. Guests can send; with a valid token of this app the message is linked to the account, and a missing or expired token sends as a guest. At most 3 an hour per account (or mobile, for guests) and 5 an hour per network. On 201 the app shows `message` (\"Your message has been successfully sent\").","operationId":"ProviderContact_send","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendContactMessageDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSentDto"}}}},"400":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"429":{"description":"TOO_MANY_REQUESTS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"TOO_MANY_REQUESTS":{"value":{"code":"TOO_MANY_REQUESTS","message":"Too many requests, please try again shortly","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Send a message","tags":["Provider · Contact"],"x-public":true,"security":[]}},"/v1/provider/payments/{id}":{"get":{"description":"The status of one of your payments (a subscription or a boost). When the result of a payment is unclear (a timeout, the app closed during checkout), check it here before trying again (BRD); retry only after `failed` or `cancelled`. Anyone else’s payment is `NOT_FOUND`.","operationId":"Payments_find","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentDto"}}}},"400":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"NOT_FOUND":{"value":{"code":"NOT_FOUND","message":"The requested item was not found","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Check a payment","tags":["Provider · Payments"],"security":[{"provider":[]}]}},"/v1/provider/packages":{"get":{"description":"The active packages for your account type (BRD 4.2.6; D4), each with its name, description, picture, price (VAT excluded) and duration; empty when none is available (Figma \"لا توجد باقات\"). `isCurrent` marks the package of your active subscription.","operationId":"Packages_list","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageListDto"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Packages","tags":["Provider · Packages"],"security":[{"provider":[]}]}},"/v1/provider/packages/{id}":{"get":{"description":"One package before subscribing: its benefits and what subscribing charges (price, VAT at today’s rate and total; D8). An inactive package, or one for the other account type, is `PACKAGE_NOT_AVAILABLE` (Figma \"الباقة لم تعد متاحة\").","operationId":"Packages_detail","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDetailDto"}}}},"400":{"description":"PACKAGE_NOT_AVAILABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"PACKAGE_NOT_AVAILABLE":{"value":{"code":"PACKAGE_NOT_AVAILABLE","message":"This package is no longer available. Please choose another package.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"NOT_FOUND":{"value":{"code":"NOT_FOUND","message":"The requested item was not found","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Package details","tags":["Provider · Packages"],"security":[{"provider":[]}]}},"/v1/provider/subscriptions/current":{"get":{"description":"The active subscription: package, picture, fee, VAT and total, start and end dates, remaining days and benefits (Figma \"اشتراكي الحالي\"; the provider home card). `subscription: null` means none: the app shows the packages. Reading never creates or charges anything.","operationId":"Subscriptions_current","parameters":[{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentSubscriptionDto"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"My current subscription","tags":["Provider · Subscriptions"],"security":[{"provider":[]}]}},"/v1/provider/subscriptions":{"get":{"description":"Your current and past subscriptions, newest first (BRD 4.2.7: package name and picture, fee, VAT, total, start, end, period, status active / expired). An expired one has `canRenew`. Empty: \"No subscriptions have been registered yet\".","operationId":"Subscriptions_history","parameters":[{"name":"page","required":false,"in":"query","description":"1-based page number.","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page (1–100).","schema":{"minimum":1,"maximum":100,"default":20,"example":20,"type":"number"}},{"$ref":"#/components/parameters/AcceptLanguage"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPageDto"}}}},"400":{"description":"VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"My subscriptions log","tags":["Provider · Subscriptions"],"security":[{"provider":[]}]},"post":{"description":"After the confirm screen (Figma \"تأكيد الاشتراك\": package, fee, VAT, total from `GET packages/{id}`). Only one active subscription at a time (`SUBSCRIPTION_ALREADY_ACTIVE`, Figma \"يوجد اشتراك نشط\"); renewing is this call once the last one expired. The total (VAT at today’s rate) is charged through the payment gateway: open `payment.checkoutUrl` when set; the subscription starts when the payment is confirmed (at once with the fake gateway, Figma \"تم الاشتراك بنجاح\"). Send an `Idempotency-Key` so a retry never pays twice.","operationId":"Subscriptions_subscribe","parameters":[{"name":"Idempotency-Key","in":"header","description":"A unique value per attempt (8–64 letters, digits, `-`, `_`), e.g. a UUID. Sending the same request again with the same key returns the first result and charges nothing more (a retry after a timeout); the same key with a different request is `IDEMPOTENCY_KEY_REUSED`.","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/AcceptLanguage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseDto"}}}},"400":{"description":"PACKAGE_NOT_AVAILABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"PACKAGE_NOT_AVAILABLE":{"value":{"code":"PACKAGE_NOT_AVAILABLE","message":"This package is no longer available. Please choose another package.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"VALIDATION_FAILED":{"value":{"code":"VALIDATION_FAILED","message":"The request data is invalid","details":[{"field":"mobile","code":"isSaudiMobileRequired","message":"Mobile number must be entered."}],"requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"UNAUTHORIZED":{"value":{"code":"UNAUTHORIZED","message":"Please log in to complete this action.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"403":{"description":"ACCOUNT_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"ACCOUNT_DISABLED":{"value":{"code":"ACCOUNT_DISABLED","message":"This user is disabled. Please contact the administration.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"409":{"description":"SUBSCRIPTION_ALREADY_ACTIVE, IDEMPOTENCY_KEY_REUSED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"SUBSCRIPTION_ALREADY_ACTIVE":{"value":{"code":"SUBSCRIPTION_ALREADY_ACTIVE","message":"You already have an active subscription. You can subscribe again once it ends.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}},"IDEMPOTENCY_KEY_REUSED":{"value":{"code":"IDEMPOTENCY_KEY_REUSED","message":"This Idempotency-Key was already used for a different request.","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"INTERNAL_ERROR":{"value":{"code":"INTERNAL_ERROR","message":"Something went wrong, please try again","requestId":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}}}}},"summary":"Subscribe to a package","tags":["Provider · Subscriptions"],"security":[{"provider":[]}]}}},"info":{"title":"Otlob Amel API","description":"One API for the three Otlob Amel clients: the customer app (`/v1/customer`), the provider app (`/v1/provider`), and the admin control panel (`/v1/admin`).\n\n**Authentication.** Each namespace has its own opaque session token, sent as `Authorization: Bearer <token>`. Tokens are revocable server-side; a token from one namespace is rejected by the others. Routes without a lock are public: guests can call them, and some recognise a signed-in caller too.\n\n**Errors.** Every error has the same shape: `{ code, message, details?, requestId }`. Branch on `code`, which is stable; `message` is translated for display. For `VALIDATION_FAILED`, `details` lists each field problem as `{ field, code, message }`, where `code` is the rule that failed (e.g. `isSaudiMobileRequired` for an empty mobile, `isSaudiMobile` for an invalid one), and `message` is the first of them, ready to show, with the field's name in front when the text doesn't say it (\"Mobile number: A valid number must be entered.\").\n\n**Mobile numbers** are accepted as typed (`05XXXXXXXX`, `+9665…`, Arabic-Indic digits) and returned in E.164 (`+9665XXXXXXXX`).\n\n**Language.** Messages are Arabic by default. Send `Accept-Language: en` (or `?lang=en`) for English. When signed in, the account's saved language is used if the request names none. Error responses carry `Content-Language`.\n\n**Request IDs.** Every response has an `X-Request-Id` header; quote it when reporting a problem.","version":"0.0.1","contact":{}},"tags":[{"name":"Customer · Account"},{"name":"Customer · Auth"},{"name":"Customer · Cities"},{"name":"Customer · Contact"},{"name":"Customer · Content"},{"name":"Customer · Home"},{"name":"Customer · Profile"},{"name":"Customer · Reports"},{"name":"Customer · Services"},{"name":"Customer · Settings"},{"name":"Provider · Account"},{"name":"Provider · Auth"},{"name":"Provider · Cities"},{"name":"Provider · Contact"},{"name":"Provider · Content"},{"name":"Provider · My services"},{"name":"Provider · Packages"},{"name":"Provider · Payments"},{"name":"Provider · Profile"},{"name":"Provider · Services"},{"name":"Provider · Settings"},{"name":"Provider · Subscriptions"},{"name":"System"}],"servers":[],"components":{"securitySchemes":{"customer":{"scheme":"bearer","bearerFormat":"opaque session token","type":"http","description":"Session token from the customer sign-in."},"provider":{"scheme":"bearer","bearerFormat":"opaque session token","type":"http","description":"Session token from the provider sign-in."},"admin":{"scheme":"bearer","bearerFormat":"opaque session token","type":"http","description":"Session token from the admin sign-in."}},"schemas":{"DependencyCheckDto":{"type":"object","properties":{"status":{"type":"string","description":"Whether the dependency answered within the timeout.","example":"up","enum":["up","down"]},"latencyMs":{"type":"number","description":"How long the check took, in milliseconds.","example":1.8}},"required":["status","latencyMs"]},"HealthChecksDto":{"type":"object","properties":{"database":{"description":"MySQL (`select 1`). The API can't serve requests without it.","allOf":[{"$ref":"#/components/schemas/DependencyCheckDto"}]},"cache":{"description":"Redis (`PING`). Without it the API still works, uncached.","allOf":[{"$ref":"#/components/schemas/DependencyCheckDto"}]}},"required":["database","cache"]},"HealthResponseDto":{"type":"object","properties":{"status":{"description":"`ok` when everything is up; `degraded` when only the cache is down\n(still 200); `down` when the database is down (503).","example":"ok","enum":["down","ok","degraded"],"type":"string"},"checks":{"$ref":"#/components/schemas/HealthChecksDto"}},"required":["status","checks"]},"LivenessResponseDto":{"type":"object","properties":{"status":{"type":"string","description":"Always `ok` while the process is serving requests.","example":"ok","enum":["ok"]}},"required":["status"]},"RegisterDto":{"type":"object","properties":{"name":{"type":"string","description":"Letters and numbers only, 2–100 characters.","example":"سارة أحمد"},"mobile":{"type":"string","description":"Saudi mobile number, `05XXXXXXXX`.","example":"0551234567"},"email":{"type":"string","description":"Required (BRD 4.1.5); unique across accounts, at most 100 characters.\nThe email login tab sends its code here.","example":"sara@example.com"},"acceptTerms":{"type":"boolean","description":"The Terms and Conditions checkbox; must be `true`."}},"required":["name","mobile","email","acceptTerms"]},"VerificationSentDto":{"type":"object","properties":{"verificationId":{"type":"string","description":"Send it back with the code, and to resend the code.","example":"vrf_Zk3n0x8Qy1u4b2V7s9Lr5mT6pWcA0dEfGhIjKlMnOpQ"},"expiresAt":{"format":"date-time","type":"string","description":"When the code stops working: 60 seconds for login (BRD), 5 minutes for\nthe two registration codes."},"resendAfterSeconds":{"type":"number","description":"Seconds until \"resend\" may be offered (the app's countdown).","example":60},"verificationExpiresAt":{"format":"date-time","type":"string","description":"When `verificationId` stops working (10 minutes): after that, start\nagain from the first step."}},"required":["verificationId","expiresAt","resendAfterSeconds","verificationExpiresAt"]},"RegistrationSentDto":{"type":"object","properties":{"mobile":{"description":"The code sent by SMS to the mobile.","allOf":[{"$ref":"#/components/schemas/VerificationSentDto"}]},"email":{"description":"The code sent by email to the address.","allOf":[{"$ref":"#/components/schemas/VerificationSentDto"}]}},"required":["mobile","email"]},"ResendCodeDto":{"type":"object","properties":{"verificationId":{"type":"string","description":"From the first step's answer."}},"required":["verificationId"]},"VerifyRegistrationDto":{"type":"object","properties":{"type":{"description":"Which code this is: `mobile` (the SMS) or `email`. The\n`verificationId` must be the one `register` answered for it.","example":"mobile","enum":["email","mobile"],"type":"string"},"verificationId":{"type":"string","description":"From the first step's answer.","example":"vrf_Zk3n0x8Qy1u4b2V7s9Lr5mT6pWcA0dEfGhIjKlMnOpQ"},"code":{"type":"string","description":"The code from the SMS or email (`1234` while the fake drivers are on).","example":"1234"}},"required":["type","verificationId","code"]},"CustomerDto":{"type":"object","properties":{"id":{"type":"string","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"},"name":{"type":"string","nullable":true,"example":"سارة أحمد"},"mobile":{"type":"string","description":"E.164.","example":"+966551234567"},"email":{"type":"string","nullable":true,"example":"sara@example.com"},"avatarUrl":{"type":"string","nullable":true,"description":"The profile photo; set from the profile (API-026)."},"language":{"description":"Used when a request names no language, and for SMS.","example":"ar","enum":["ar","en","ur","bn"],"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","name","mobile","email","avatarUrl","language","createdAt"]},"CustomerRegistrationProgressDto":{"type":"object","properties":{"customer":{"description":"Set when completed: the new account.","allOf":[{"$ref":"#/components/schemas/CustomerDto"}]},"completed":{"type":"boolean","description":"True once both codes are confirmed: the account is active and\n`accessToken` is set."},"verified":{"type":"array","description":"The codes confirmed so far.","example":["mobile"],"items":{"type":"string","enum":["email","mobile"]}},"pending":{"type":"array","description":"The codes still to confirm; empty when completed.","example":["email"],"items":{"type":"string","enum":["email","mobile"]}},"accessToken":{"type":"string","description":"Set when completed: the session token, shown only once. Send it as\n`Authorization: Bearer …`."}},"required":["completed","verified","pending"]},"LoginDto":{"type":"object","properties":{"mobile":{"type":"string","description":"Saudi mobile number, `05XXXXXXXX` (`5…` and `+9665…` are accepted too).\nSend this or `email`, not both.","example":"0551234567"},"email":{"type":"string","description":"The account's email; the code is emailed. Send this or `mobile`, not\nboth (`loginEitherMobileOrEmail`).","example":"sara@example.com"}}},"VerifyCodeDto":{"type":"object","properties":{"verificationId":{"type":"string","description":"From the first step's answer.","example":"vrf_Zk3n0x8Qy1u4b2V7s9Lr5mT6pWcA0dEfGhIjKlMnOpQ"},"code":{"type":"string","description":"The code from the SMS or email (`1234` while the fake drivers are on).","example":"1234"}},"required":["verificationId","code"]},"CustomerSessionDto":{"type":"object","properties":{"accessToken":{"type":"string","description":"The session token, shown only once. Send it as `Authorization: Bearer …`.","example":"oa_cus_3q2-7wEvxN1c9kP0YyR5bA8dF6gH4jL2mZ1xV7sT0uQ"},"customer":{"$ref":"#/components/schemas/CustomerDto"}},"required":["accessToken","customer"]},"UpdateAccountDto":{"type":"object","properties":{"language":{"description":"The app's language. Requests without `Accept-Language` or `?lang=` are\nanswered in it, and SMS and email messages are sent in it. Urdu and\nBengali get English text until their translations exist (D1).","example":"en","enum":["ar","en","ur","bn"],"type":"string"}},"required":["language"]},"ChangeMobileOtpDto":{"type":"object","properties":{"mobile":{"type":"string","description":"Saudi mobile number, `05XXXXXXXX` (`5…` and `+9665…` are accepted too).","example":"0551234567"}},"required":["mobile"]},"ChangeMobileDto":{"type":"object","properties":{"verificationId":{"type":"string","description":"From the first step's answer.","example":"vrf_Zk3n0x8Qy1u4b2V7s9Lr5mT6pWcA0dEfGhIjKlMnOpQ"},"code":{"type":"string","description":"The code from the SMS or email (`1234` while the fake drivers are on).","example":"1234"}},"required":["verificationId","code"]},"ChangeEmailOtpDto":{"type":"object","properties":{"email":{"type":"string","description":"Unique across accounts, at most 100 characters.","example":"sara.new@example.com"}},"required":["email"]},"ChangeEmailDto":{"type":"object","properties":{"verificationId":{"type":"string","description":"From the first step's answer.","example":"vrf_Zk3n0x8Qy1u4b2V7s9Lr5mT6pWcA0dEfGhIjKlMnOpQ"},"code":{"type":"string","description":"The code from the SMS or email (`1234` while the fake drivers are on).","example":"1234"}},"required":["verificationId","code"]},"UpdateCustomerProfileDto":{"type":"object","properties":{"name":{"type":"string","description":"Letters and digits, 2–100 characters.","example":"سارة أحمد"},"avatarFileId":{"type":"string","nullable":true,"description":"Sent empty, removes the photo; a new `avatar` part replaces it."}}},"RegionDto":{"type":"object","properties":{"code":{"type":"string","example":"riyadh"},"name":{"type":"string","description":"In the request language.","example":"منطقة الرياض"}},"required":["code","name"]},"CityDto":{"type":"object","properties":{"id":{"type":"string","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"},"name":{"type":"string","description":"In the request language.","example":"الرياض"},"region":{"$ref":"#/components/schemas/RegionDto"}},"required":["id","name","region"]},"CityListDto":{"type":"object","properties":{"items":{"description":"Active cities, sorted by name in the request language.","type":"array","items":{"$ref":"#/components/schemas/CityDto"}}},"required":["items"]},"NeighbourhoodDto":{"type":"object","properties":{"id":{"type":"string","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7c"},"name":{"type":"string","description":"In the request language.","example":"النرجس"},"latitude":{"type":"number","nullable":true,"description":"The centre, for maps and \"nearest\" (D16); null until known.","example":24.83},"longitude":{"type":"number","nullable":true,"example":46.655}},"required":["id","name","latitude","longitude"]},"NeighbourhoodListDto":{"type":"object","properties":{"items":{"description":"The city's active neighbourhoods, sorted by name in the request language.","type":"array","items":{"$ref":"#/components/schemas/NeighbourhoodDto"}}},"required":["items"]},"ServiceDto":{"type":"object","properties":{"id":{"type":"string","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"},"code":{"type":"string","nullable":true,"description":"The seed slug, for the app's bundled icon while `iconUrl` is null;\nnull for services admins add.","example":"plumbing"},"name":{"type":"string","description":"In the request language.","example":"السباكة"},"iconUrl":{"type":"string","nullable":true,"description":"The icon an admin uploaded; null until then."}},"required":["id","code","name","iconUrl"]},"ServiceListDto":{"type":"object","properties":{"items":{"description":"Active services, in display order.","type":"array","items":{"$ref":"#/components/schemas/ServiceDto"}}},"required":["items"]},"ContactChannelsDto":{"type":"object","properties":{"phones":{"description":"E.164; empty when none.","example":["+966501234567"],"type":"array","items":{"type":"string"}},"email":{"type":"string","example":"support@otlobamel.sa"},"whatsapp":{"type":"string","example":"+966509876543"},"facebook":{"type":"string","example":"https://facebook.com/otlob_amel"},"x":{"type":"string","example":"https://x.com/otlob_amel"},"instagram":{"type":"string","example":"https://instagram.com/otlob_amel"},"snapchat":{"type":"string","example":"https://snapchat.com/add/otlob_amel"},"tiktok":{"type":"string","example":"https://tiktok.com/@otlob_amel"},"youtube":{"type":"string","example":"https://youtube.com/@otlob_amel"}},"required":["phones"]},"StoreLinksDto":{"type":"object","properties":{"ios":{"type":"string","nullable":true,"example":"https://apps.apple.com/app/id0000000000"},"android":{"type":"string","nullable":true,"example":"https://play.google.com/store/apps/details?id=net.moltaqa.otlob_amel"}},"required":["ios","android"]},"AppLinksDto":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/StoreLinksDto"},"provider":{"$ref":"#/components/schemas/StoreLinksDto"}},"required":["customer","provider"]},"AppSettingsDto":{"type":"object","properties":{"contactChannels":{"$ref":"#/components/schemas/ContactChannelsDto"},"appLinks":{"$ref":"#/components/schemas/AppLinksDto"}},"required":["contactChannels","appLinks"]},"AppPageDto":{"type":"object","properties":{"key":{"description":"One of `about`, `terms`, `privacy`.","enum":["about","terms","privacy"],"type":"string"},"title":{"type":"string","description":"In the request language.","example":"الشروط والأحكام"},"content":{"type":"string","description":"Rich text (HTML), in the request language, or the other language when\nit is empty there; empty until the control panel writes it.","example":"<p>…</p>"},"updatedAt":{"format":"date-time","type":"string"}},"required":["key","title","content","updatedAt"]},"ContactTypeDto":{"type":"object","properties":{"key":{"type":"string","example":"inquiry","enum":["request","suggestion","inquiry","complaint","other"]},"label":{"type":"string","example":"استفسار"}},"required":["key","label"]},"AppContactDto":{"type":"object","properties":{"channels":{"description":"Configured channels only (the same as `GET settings`).","allOf":[{"$ref":"#/components/schemas/ContactChannelsDto"}]},"messageTypes":{"description":"The message types, in the request language (BRD order).","type":"array","items":{"$ref":"#/components/schemas/ContactTypeDto"}}},"required":["channels","messageTypes"]},"SendContactMessageDto":{"type":"object","properties":{"type":{"description":"One of the types from `GET contact`; optional (BRD).","example":"inquiry","enum":["request","suggestion","inquiry","complaint","other"],"type":"string"},"name":{"type":"string","description":"2–50 letters and numbers (BRD).","example":"سارة العتيبي"},"email":{"type":"string","example":"sara@example.com"},"mobile":{"type":"string","description":"Saudi mobile, 05XXXXXXXX (BRD).","example":"0551234567"},"message":{"type":"string","description":"At most 500 characters (BRD).","example":"كيف أغيّر الخدمات التي أقدمها؟"}},"required":["name","email","mobile","message"]},"MessageSentDto":{"type":"object","properties":{"id":{"type":"string","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"},"message":{"type":"string","description":"What the app shows, in the request language.","example":"تم إرسال رسالتك بنجاح"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","message","createdAt"]},"ReportReasonDto":{"type":"object","properties":{"id":{"type":"string","description":"Send as `reasonId` when reporting a provider (API-067)."},"name":{"type":"string","description":"In the request language.","example":"طلب مبالغ خارج التطبيق"},"notesRequired":{"type":"boolean","description":"True when the report must give its details (\"Other reason\")."}},"required":["id","name","notesRequired"]},"ReportReasonListDto":{"type":"object","properties":{"items":{"description":"Active reasons, in display order.","type":"array","items":{"$ref":"#/components/schemas/ReportReasonDto"}}},"required":["items"]},"BannerLinkDto":{"type":"object","properties":{"type":{"type":"string","description":"What a tap opens (D14): `none`; `external`, the web page `url`;\n`provider`, the provider's profile (`providerId`; guests go to login\nfirst, BRD 4.1.3); `service`, that service's providers (`serviceId`).","example":"provider","enum":["provider","none","external","service"]},"url":{"type":"string","nullable":true,"example":"https://example.com/offer"},"providerId":{"type":"string","nullable":true},"serviceId":{"type":"string","nullable":true}},"required":["type","url","providerId","serviceId"]},"BannerDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","example":"خصم 20% على صيانة المكيفات"},"mediaUrl":{"type":"string"},"mediaKind":{"type":"string","enum":["image","video"]},"link":{"$ref":"#/components/schemas/BannerLinkDto"}},"required":["id","name","mediaUrl","mediaKind","link"]},"BannerListDto":{"type":"object","properties":{"items":{"description":"In display order; empty when none is running (the app hides the space).","type":"array","items":{"$ref":"#/components/schemas/BannerDto"}}},"required":["items"]},"ProviderRegisterDto":{"type":"object","properties":{"accountType":{"type":"string","description":"`individual` (an individual advertiser) or `company` (a company or\nestablishment).","example":"company","enum":["individual","company"]},"name":{"type":"string","description":"The provider's or company's name: letters and numbers, 2–100.","example":"شركة الريان للمقاولات"},"mobile":{"type":"string","description":"Saudi mobile number, `05XXXXXXXX`; verified by SMS.","example":"0551234567"},"email":{"type":"string","description":"Required; unique, at most 100 characters; verified by email (D21).","example":"info@alrayan.sa"},"iqamaNumber":{"type":"string","description":"Individuals: the residence (Iqama) number, 10 digits starting with 2.","example":"2123456789"},"crNumber":{"type":"string","description":"Companies: the commercial registration number, 10 digits.","example":"1010123456"},"crFileId":{"type":"string","description":"Companies: filled from the `crFile` part (PDF, JPG, JPEG or PNG, up to\n10 MB), or an id from the upload route."},"acceptTerms":{"type":"boolean","description":"The Terms and Conditions checkbox; must be `true`."}},"required":["accountType","name","mobile","email","acceptTerms"]},"FileDto":{"type":"object","properties":{"id":{"type":"string","description":"Pass this id to the endpoint that uses the file (profile, gallery, chat, …).","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"},"purpose":{"type":"string","example":"work_image","enum":["video_poster","chat_video_poster","work_image","work_video","customer_avatar","provider_avatar","provider_cover","commercial_registration","chat_image","chat_video","chat_file","chat_voice","service_icon","package_icon","banner_media","admin_avatar"]},"name":{"type":"string","description":"The name the file was uploaded with.","example":"logo.png"},"mimeType":{"type":"string","example":"image/png"},"size":{"type":"number","description":"Size in bytes.","example":48213},"url":{"type":"string","description":"Where to download it. Public files have a permanent URL; private ones\n(CR images, work documents) a signed URL that expires at `urlExpiresAt`.","example":"https://api.otlobamel.sa/files/0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"},"urlExpiresAt":{"type":"string","description":"When a private file's URL stops working; absent for public files."}},"required":["id","purpose","name","mimeType","size","url"]},"ProviderDto":{"type":"object","properties":{"id":{"type":"string","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"},"accountType":{"description":"A company shows a company badge on its profile (BRD).","example":"company","enum":["individual","company"],"type":"string"},"name":{"type":"string","example":"شركة الريان للمقاولات"},"mobile":{"type":"string","description":"E.164.","example":"+966551234567"},"email":{"type":"string","nullable":true,"example":"info@alrayan.sa"},"iqamaNumber":{"type":"string","nullable":true,"description":"Individuals.","example":"2123456789"},"crNumber":{"type":"string","nullable":true,"description":"Companies.","example":"1010123456"},"crFile":{"nullable":true,"description":"Companies: the CR file, as a signed link that expires.","type":"object","allOf":[{"$ref":"#/components/schemas/FileDto"}]},"avatarUrl":{"type":"string","nullable":true,"description":"The profile photo; set from the profile (API-027)."},"coverUrl":{"type":"string","nullable":true,"description":"The picture at the top of the public profile."},"bio":{"type":"string","nullable":true,"description":"The description customers read on the profile.","example":"خبرة أكثر من 10 سنوات في أعمال الكهرباء والسباكة."},"services":{"description":"The active services you offer (API-050), in display order.","type":"array","items":{"$ref":"#/components/schemas/ServiceDto"}},"listed":{"type":"boolean","description":"Whether customers can find you now (API-044): during the free grace\nperiod from registration, then while a subscription runs, and only\nwith at least one service."},"listedUntil":{"format":"date-time","type":"string","nullable":true,"description":"Until when you are listed; null before verification."},"city":{"nullable":true,"description":"Where the provider is based; null until set in the profile.","type":"object","allOf":[{"$ref":"#/components/schemas/CityDto"}]},"neighbourhood":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/NeighbourhoodDto"}]},"language":{"description":"Used when a request names no language, and for SMS and email.","example":"ar","enum":["ar","en","ur","bn"],"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","accountType","name","mobile","email","iqamaNumber","crNumber","crFile","avatarUrl","coverUrl","bio","services","listed","listedUntil","city","neighbourhood","language","createdAt"]},"ProviderRegistrationProgressDto":{"type":"object","properties":{"provider":{"description":"Set when completed: the new account.","allOf":[{"$ref":"#/components/schemas/ProviderDto"}]},"completed":{"type":"boolean","description":"True once both codes are confirmed: the account is active and\n`accessToken` is set."},"verified":{"type":"array","description":"The codes confirmed so far.","example":["mobile"],"items":{"type":"string","enum":["email","mobile"]}},"pending":{"type":"array","description":"The codes still to confirm; empty when completed.","example":["email"],"items":{"type":"string","enum":["email","mobile"]}},"accessToken":{"type":"string","description":"Set when completed: the session token, shown only once. Send it as\n`Authorization: Bearer …`."}},"required":["completed","verified","pending"]},"ProviderSessionDto":{"type":"object","properties":{"accessToken":{"type":"string","description":"The session token, shown only once. Send it as `Authorization: Bearer …`.","example":"oa_pro_3q2-7wEvxN1c9kP0YyR5bA8dF6gH4jL2mZ1xV7sT0uQ"},"provider":{"$ref":"#/components/schemas/ProviderDto"}},"required":["accessToken","provider"]},"UpdateProviderProfileDto":{"type":"object","properties":{"name":{"type":"string","description":"The provider's or company's name: letters and digits, 2–100.","example":"شركة الريان للمقاولات"},"bio":{"type":"string","nullable":true,"description":"The description customers read (BRD 4.1.9.1), at most 500\ncharacters; sent empty, removes it.","example":"خبرة أكثر من 10 سنوات في أعمال الكهرباء والسباكة."},"cityId":{"type":"string","nullable":true,"description":"From `GET /cities`; sent empty, removes the city and neighbourhood. A\nnew city without a `neighbourhoodId` clears the neighbourhood."},"neighbourhoodId":{"type":"string","nullable":true,"description":"From `GET /cities/{cityId}/neighbourhoods`; must be in the city.\nSent empty, removes it."},"avatarFileId":{"type":"string","nullable":true,"description":"Sent empty, removes the photo; a new `avatar` part replaces it."},"coverFileId":{"type":"string","nullable":true,"description":"Sent empty, removes the cover; a new `cover` part replaces it."}}},"ProviderServiceDto":{"type":"object","properties":{"id":{"type":"string","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"},"code":{"type":"string","nullable":true,"description":"The seed slug, for the app's bundled icon while `iconUrl` is null;\nnull for services admins add.","example":"plumbing"},"name":{"type":"string","description":"In the request language.","example":"السباكة"},"iconUrl":{"type":"string","nullable":true,"description":"The icon an admin uploaded; null until then."},"selected":{"type":"boolean","description":"Whether you offer it."}},"required":["id","code","name","iconUrl","selected"]},"ProviderServicesDto":{"type":"object","properties":{"items":{"description":"Every active service, in display order, marked when you offer it.","type":"array","items":{"$ref":"#/components/schemas/ProviderServiceDto"}}},"required":["items"]},"SaveProviderServicesDto":{"type":"object","properties":{"serviceIds":{"description":"One or more ids from `GET services` (at most 50); replaces the\nselection.","example":["0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"],"type":"array","items":{"type":"string"}}},"required":["serviceIds"]},"PaymentDto":{"type":"object","properties":{"id":{"type":"string","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"},"purpose":{"type":"string","description":"`subscription` (a package) or `boost` (a visibility boost).","enum":["subscription","boost"]},"amount":{"type":"number","description":"SAR, VAT included.","example":228.85},"currency":{"type":"string","example":"SAR","enum":["SAR"]},"status":{"type":"string","description":"`pending` until the gateway confirms it; then `paid`, or `failed` /\n`cancelled`. Retry only after `failed` or `cancelled`.","enum":["pending","paid","failed","cancelled"]},"checkoutUrl":{"type":"string","nullable":true,"description":"Open it to pay when set (the real gateway, API-121); null when nothing\nis left to do (always with the fake gateway, which confirms at once)."},"createdAt":{"format":"date-time","type":"string"},"paidAt":{"format":"date-time","type":"string","nullable":true}},"required":["id","purpose","amount","currency","status","checkoutUrl","createdAt","paidAt"]},"PackageDurationDto":{"type":"object","properties":{"days":{"type":"number","example":30},"label":{"type":"string","description":"In the request language.","example":"30 يومًا"}},"required":["days","label"]},"PackageDto":{"type":"object","properties":{"id":{"type":"string","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"},"name":{"type":"string","example":"الباقة الذهبية"},"description":{"type":"string","example":"كل مزايا الفضية مع أولوية الظهور ودعم مخصص"},"iconUrl":{"type":"string","nullable":true,"description":"The package picture; null until an admin uploads one (seeds)."},"price":{"type":"number","description":"SAR, VAT excluded (D8); the details add the VAT.","example":199},"currency":{"type":"string","example":"SAR","enum":["SAR"]},"duration":{"$ref":"#/components/schemas/PackageDurationDto"},"isCurrent":{"type":"boolean","description":"The package of your active subscription."}},"required":["id","name","description","iconUrl","price","currency","duration","isCurrent"]},"PackageListDto":{"type":"object","properties":{"accountType":{"type":"string","description":"Your account type: the list holds the packages for it (D4; Figma's\n\"حساب فرد\" badge).","example":"individual","enum":["individual","company"]},"items":{"description":"Active packages for your account type, in display order.","type":"array","items":{"$ref":"#/components/schemas/PackageDto"}}},"required":["accountType","items"]},"PricingDto":{"type":"object","properties":{}},"PackageDetailDto":{"type":"object","properties":{"id":{"type":"string","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"},"name":{"type":"string","example":"الباقة الذهبية"},"description":{"type":"string","example":"كل مزايا الفضية مع أولوية الظهور ودعم مخصص"},"iconUrl":{"type":"string","nullable":true,"description":"The package picture; null until an admin uploads one (seeds)."},"price":{"type":"number","description":"SAR, VAT excluded (D8); the details add the VAT.","example":199},"currency":{"example":"SAR","enum":["SAR"],"type":"string"},"duration":{"$ref":"#/components/schemas/PackageDurationDto"},"isCurrent":{"type":"boolean","description":"The package of your active subscription."},"benefits":{"description":"One line per benefit, in the request language.","type":"array","items":{"type":"string"}},"pricing":{"description":"What subscribing charges: price, VAT and total (D8).","allOf":[{"$ref":"#/components/schemas/PricingDto"}]}},"required":["id","name","description","iconUrl","price","currency","duration","isCurrent","benefits","pricing"]},"SubscriptionDto":{"type":"object","properties":{"id":{"type":"string","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"},"packageId":{"type":"string","description":"The package it bought (`GET packages`)."},"name":{"type":"string","description":"As bought, in the request language.","example":"الباقة الذهبية"},"iconUrl":{"type":"string","nullable":true,"description":"The package picture when bought; null when none."},"pricing":{"description":"What was charged: fee, VAT (rate as charged) and total (BRD 4.2.7).","allOf":[{"$ref":"#/components/schemas/PricingDto"}]},"duration":{"$ref":"#/components/schemas/PackageDurationDto"},"benefits":{"description":"As bought, in the request language.","type":"array","items":{"type":"string"}},"status":{"type":"string","description":"`pending_payment` until the payment is confirmed, then `active` and\n`expired`; `cancelled` when its payment failed.","enum":["active","cancelled","pending_payment","expired"]},"startsAt":{"format":"date-time","type":"string","nullable":true,"description":"Set once active."},"endsAt":{"format":"date-time","type":"string","nullable":true},"remainingDays":{"type":"number","description":"Whole days left while active, rounded up; 0 otherwise.","example":18},"canRenew":{"type":"boolean","description":"True once expired: \"Renew\" opens the packages."}},"required":["id","packageId","name","iconUrl","pricing","duration","benefits","status","startsAt","endsAt","remainingDays","canRenew"]},"CurrentSubscriptionDto":{"type":"object","properties":{"subscription":{"nullable":true,"description":"Null: the app shows \"No active subscription\" and the packages.","type":"object","allOf":[{"$ref":"#/components/schemas/SubscriptionDto"}]}},"required":["subscription"]},"SubscriptionPageDto":{"type":"object","properties":{"items":{"description":"Active and expired subscriptions, newest first.","type":"array","items":{"$ref":"#/components/schemas/SubscriptionDto"}},"page":{"type":"number","example":1},"limit":{"type":"number","example":20},"total":{"type":"number","example":2}},"required":["items","page","limit","total"]},"SubscribeDto":{"type":"object","properties":{"packageId":{"type":"string","description":"One of `GET packages`.","format":"uuid"}},"required":["packageId"]},"PurchaseDto":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/SubscriptionDto"},"payment":{"$ref":"#/components/schemas/PaymentDto"}},"required":["subscription","payment"]},"ErrorResponse":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string","enum":["VALIDATION_FAILED","INVALID_JSON","UNAUTHORIZED","FORBIDDEN","ACCOUNT_DISABLED","NOT_FOUND","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","MOBILE_NOT_REGISTERED","EMAIL_NOT_REGISTERED","MOBILE_ALREADY_REGISTERED","EMAIL_UNCHANGED","MOBILE_UNCHANGED","EMAIL_ALREADY_REGISTERED","IQAMA_ALREADY_REGISTERED","CR_ALREADY_REGISTERED","CITY_NOT_AVAILABLE","NEIGHBOURHOOD_NOT_AVAILABLE","SERVICE_NOT_AVAILABLE","REPORT_REASON_NOT_AVAILABLE","OTP_INVALID","OTP_EXPIRED","OTP_TOO_MANY_ATTEMPTS","OTP_RESEND_TOO_SOON","VERIFICATION_INVALID","SMS_SEND_FAILED","EMAIL_SEND_FAILED","FILE_REQUIRED","FILE_TOO_LARGE","FILE_TYPE_NOT_ALLOWED","FILE_NOT_AVAILABLE","IDEMPOTENCY_KEY_REUSED","PACKAGE_NOT_AVAILABLE","SUBSCRIPTION_ALREADY_ACTIVE","INTERNAL_ERROR"],"description":"Stable error code. Clients branch on this.","example":"NOT_FOUND"},"message":{"type":"string","description":"Translated message for display.","example":"The requested item was not found"},"details":{"type":"array","description":"Field problems, only for `VALIDATION_FAILED`.","items":{"type":"object","required":["field","code","message"],"properties":{"field":{"type":"string","description":"Dotted path, for example `address.city`.","example":"mobile"},"code":{"type":"string","description":"The rule that failed, e.g. `isSaudiMobileRequired` (empty) or `isSaudiMobile` (invalid).","example":"isSaudiMobileRequired"},"message":{"type":"string","example":"Mobile number must be entered."}}}},"requestId":{"type":"string","description":"Same as the `X-Request-Id` response header.","example":"0199a3c4-5b6e-7f80-9a1b-2c3d4e5f6a7b"}}}},"parameters":{"AcceptLanguage":{"name":"Accept-Language","in":"header","required":false,"description":"Language of messages. Arabic by default.","schema":{"type":"string","enum":["ar","en"],"default":"ar"}}}}}