← All requests

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

Status
200
Duration
31.2 ms
Started (UTC)
2026-10-07 15:10:49.001
Route
/v1/advertiser/auth/register/establishment/otp
Request ID
3315fb74-b12c-493f-a719-df6edd188a67
IP
37.19.196.100
User agent
curl/8.7.1
Language
ar
Queries
8 (10.5 ms)
Cache hit / miss
1 / 0

Timeline

query +16.0 ms 4.2 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` = '+966572340472'

Parameters

[
  "+966572340472"
]

0 rows

cache +20.5 ms 0.5 ms
hit list:cities:bf21a9e8fbc5a384
query +22.0 ms 0.8 ms
select `id` from `advertisers` where `advertisers`.`cr_number` = '1002460920'

Parameters

[
  "1002460920"
]

0 rows

query +23.0 ms 0.8 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` = '01a116ea-c847-7655-b9bb-0c782c7cbede'

Parameters

[
  "01a116ea-c847-7655-b9bb-0c782c7cbede"
]

1 rows

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

Parameters

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

0 rows

query +25.0 ms 0.3 ms
select count(*), min(`created_at`) from `otp_codes` where (`otp_codes`.`mobile` = '+966572340472' and `otp_codes`.`created_at` > '2026-10-07 14:10:49.025')

Parameters

[
  "+966572340472",
  "2026-10-07 14:10:49.025"
]

1 rows

query +25.0 ms 0.3 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:10:49.025')

Parameters

[
  "37.19.196.100",
  "2026-10-07 14:10:49.025"
]

1 rows

query +26.0 ms 0.3 ms
update `otp_codes` set `consumed_at` = '2026-10-07 15:10:49.025' where ((`otp_codes`.`namespace` = 'advertiser' and `otp_codes`.`purpose` = 'register' and `otp_codes`.`mobile` = '+966572340472') and `otp_codes`.`consumed_at` is null)

Parameters

[
  "2026-10-07 15:10:49.025",
  "advertiser",
  "register",
  "+966572340472"
]

0 rows

query +27.0 ms 3.3 ms
insert into `otp_codes` (`id`, `namespace`, `purpose`, `mobile`, `code_hash`, `attempts`, `ip`, `created_at`, `expires_at`, `consumed_at`) values ('01a116ea-ccc3-73c2-a2e3-a1e8ea2df4e8', 'advertiser', 'register', '+966572340472', 'dcbe7475ae4bd96727d9f1808dfee1defab5cb688218f2057714e62198d20b2d', default, '37.19.196.100', '2026-10-07 15:10:49.025', '2026-10-07 15:11:49.025', default)

Parameters

[
  "01a116ea-ccc3-73c2-a2e3-a1e8ea2df4e8",
  "advertiser",
  "register",
  "+966572340472",
  "dcbe7475ae4bd96727d9f1808dfee1defab5cb688218f2057714e62198d20b2d",
  "37.19.196.100",
  "2026-10-07 15:10:49.025",
  "2026-10-07 15:11:49.025"
]

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": "0572340472",
  "cityId": "01a116db-4248-772b-be06-e37ca966bf09",
  "taxNumber": "300000000000003",
  "crFileId": "01a116ea-c847-7655-b9bb-0c782c7cbede",
  "acceptTerms": true
}

Response

Body
{
  "expiresAt": "2026-10-07T15:11:49.025Z",
  "resendAfterSeconds": 60
}