← All requests

POST /v1/advertiser/auth/register/establishment/otp

Status
200
Duration
26.3 ms
Started (UTC)
2026-10-07 15:11:10.120
Route
/v1/advertiser/auth/register/establishment/otp
Request ID
d4b95ddc-0182-4e2d-b5d6-74968de90cae
IP
37.19.196.100
User agent
curl/8.7.1
Language
ar
Queries
8 (13.5 ms)
Cache hit / miss
1 / 0

Timeline

query +4.0 ms 1.3 ms
select `id`, `mobile`, `status`, `language`, `last_sign_in_at`, `disabled_reason`, `created_at`, `updated_at`, `deleted_at`, `account_type`, `name`, `email`, `city_id`, `avatar_file_id`, `logo_file_id`, `establishment_name`, `cr_number`, `cr_file_id`, `address`, `tax_number`, `terms_accepted_at` from `advertisers` where `advertisers`.`mobile` = '+966524216590'

Parameters

[
  "+966524216590"
]

0 rows

cache +5.3 ms 0.7 ms
hit list:cities:bf21a9e8fbc5a384
query +7.0 ms 1.8 ms
select `id` from `advertisers` where `advertisers`.`cr_number` = '1034216590'

Parameters

[
  "1034216590"
]

0 rows

query +9.0 ms 0.6 ms
select `id`, `purpose`, `visibility`, `storage_key`, `original_name`, `mime_type`, `size_bytes`, `sha256`, `owner_type`, `owner_id`, `attached_at`, `created_at`, `updated_at` from `files` where `files`.`id` = '01a116eb-19d1-7759-a924-ea6ee8750216'

Parameters

[
  "01a116eb-19d1-7759-a924-ea6ee8750216"
]

1 rows

query +11.0 ms 0.9 ms
select `created_at` from `otp_codes` where (`otp_codes`.`namespace` = 'advertiser' and `otp_codes`.`purpose` = 'register' and `otp_codes`.`mobile` = '+966524216590') order by `otp_codes`.`created_at` desc limit 1

Parameters

[
  "advertiser",
  "register",
  "+966524216590",
  1
]

0 rows

query +12.0 ms 0.7 ms
select count(*), min(`created_at`) from `otp_codes` where (`otp_codes`.`mobile` = '+966524216590' and `otp_codes`.`created_at` > '2026-10-07 14:11:10.130')

Parameters

[
  "+966524216590",
  "2026-10-07 14:11:10.130"
]

1 rows

query +13.0 ms 1.0 ms
select count(*), min(`created_at`) from `otp_codes` where (`otp_codes`.`ip` = '37.19.196.100' and `otp_codes`.`created_at` > '2026-10-07 14:11:10.130')

Parameters

[
  "37.19.196.100",
  "2026-10-07 14:11:10.130"
]

1 rows

query +15.0 ms 1.2 ms
update `otp_codes` set `consumed_at` = '2026-10-07 15:11:10.130' where ((`otp_codes`.`namespace` = 'advertiser' and `otp_codes`.`purpose` = 'register' and `otp_codes`.`mobile` = '+966524216590') and `otp_codes`.`consumed_at` is null)

Parameters

[
  "2026-10-07 15:11:10.130",
  "advertiser",
  "register",
  "+966524216590"
]

0 rows

query +16.0 ms 5.9 ms
insert into `otp_codes` (`id`, `namespace`, `purpose`, `mobile`, `code_hash`, `attempts`, `ip`, `created_at`, `expires_at`, `consumed_at`) values ('01a116eb-1f38-706c-859a-a079ac63f82d', 'advertiser', 'register', '+966524216590', '90325e6e0e8521808ded59fa13dbebb6e8fe9be29b67af5f89601b011085f772', default, '37.19.196.100', '2026-10-07 15:11:10.130', '2026-10-07 15:12:10.130', default)

Parameters

[
  "01a116eb-1f38-706c-859a-a079ac63f82d",
  "advertiser",
  "register",
  "+966524216590",
  "90325e6e0e8521808ded59fa13dbebb6e8fe9be29b67af5f89601b011085f772",
  "37.19.196.100",
  "2026-10-07 15:11:10.130",
  "2026-10-07 15:12:10.130"
]

1 rows

Request

Headers
{
  "host": "maqsed-api.dev-moltaqa.cloud",
  "user-agent": "curl/8.7.1",
  "content-length": "256",
  "accept": "*/*",
  "content-type": "application/json",
  "x-forwarded-for": "37.19.196.100",
  "x-forwarded-host": "maqsed-api.dev-moltaqa.cloud",
  "x-forwarded-port": "443",
  "x-forwarded-proto": "https",
  "x-forwarded-server": "2608fbae9cc2",
  "x-real-ip": "37.19.196.100",
  "accept-encoding": "gzip"
}
Query
{}
Body
{
  "establishmentName": "مؤسسة تجربة",
  "crNumber": "********",
  "name": "خالد",
  "mobile": "0524216590",
  "cityId": "01a116db-4248-772b-be06-e37ca966bf09",
  "taxNumber": "300000000000003",
  "crFileId": "01a116eb-19d1-7759-a924-ea6ee8750216",
  "acceptTerms": true
}

Response

Body
{
  "expiresAt": "2026-10-07T15:12:10.130Z",
  "resendAfterSeconds": 60
}