← All requests
POST /v1/advertiser/auth/register/establishment
- Status
- 201
- Duration
- 81.1 ms
- Started (UTC)
- 2026-10-07 15:10:50.196
- Route
- /v1/advertiser/auth/register/establishment
- Request ID
- d77b8071-8e50-4722-9266-6dad45e45526
- IP
- 37.19.196.100
- User agent
- curl/8.7.1
- Language
- ar
- Queries
- 19 (51.8 ms)
- Cache hit / miss
- 2 / 0
Timeline
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
hit list:cities:bf21a9e8fbc5a384
select `id` from `advertisers` where `advertisers`.`cr_number` = '1002460920'
Parameters
[
"1002460920"
]
0 rows
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
select `id`, `namespace`, `purpose`, `mobile`, `code_hash`, `attempts`, `ip`, `created_at`, `expires_at`, `consumed_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
]
1 rows
update `otp_codes` set `consumed_at` = '2026-10-07 15:10:50.209' where (`otp_codes`.`id` = '01a116ea-ccc3-73c2-a2e3-a1e8ea2df4e8' and `otp_codes`.`consumed_at` is null)
Parameters
[
"2026-10-07 15:10:50.209",
"01a116ea-ccc3-73c2-a2e3-a1e8ea2df4e8"
]
1 rows
hit list:cities:bf21a9e8fbc5a384
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
insert into `advertisers` (`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`) values ('01a116ea-d16d-763c-943e-4e284825492d', '+966572340472', default, default, default, default, default, default, default, 'establishment', 'خالد', NULL, '01a116db-4248-772b-be06-e37ca966bf09', default, NULL, 'مؤسسة تجربة', '1002460920', '01a116ea-c847-7655-b9bb-0c782c7cbede', NULL, '300000000000003', '2026-10-07 15:10:50.222')Parameters
[
"01a116ea-d16d-763c-943e-4e284825492d",
"+966572340472",
"establishment",
"خالد",
null,
"01a116db-4248-772b-be06-e37ca966bf09",
null,
"مؤسسة تجربة",
"1002460920",
"01a116ea-c847-7655-b9bb-0c782c7cbede",
null,
"300000000000003",
"2026-10-07 15:10:50.222"
]
1 rows
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
update `files` set `owner_type` = 'advertiser', `owner_id` = '01a116ea-d16d-763c-943e-4e284825492d', `attached_at` = '2026-10-07 15:10:50.235', `updated_at` = '2026-10-07 15:10:50.235' where (`files`.`id` = '01a116ea-c847-7655-b9bb-0c782c7cbede' and `files`.`attached_at` is null)
Parameters
[
"advertiser",
"01a116ea-d16d-763c-943e-4e284825492d",
"2026-10-07 15:10:50.235",
"2026-10-07 15:10:50.235",
"01a116ea-c847-7655-b9bb-0c782c7cbede"
]
1 rows
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
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`.`id` = '01a116ea-d16d-763c-943e-4e284825492d' and `advertisers`.`deleted_at` is null)
Parameters
[
"01a116ea-d16d-763c-943e-4e284825492d"
]
1 rows
update `advertisers` set `last_sign_in_at` = '2026-10-07 15:10:50.246', `updated_at` = '2026-10-07 15:10:50.246' where (`advertisers`.`id` = '01a116ea-d16d-763c-943e-4e284825492d' and `advertisers`.`deleted_at` is null)
Parameters
[
"2026-10-07 15:10:50.246",
"2026-10-07 15:10:50.246",
"01a116ea-d16d-763c-943e-4e284825492d"
]
1 rows
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`.`id` = '01a116ea-d16d-763c-943e-4e284825492d' and `advertisers`.`deleted_at` is null)
Parameters
[
"01a116ea-d16d-763c-943e-4e284825492d"
]
1 rows
insert into `sessions` (`id`, `subject_type`, `subject_id`, `token_hash`, `device_name`, `ip`, `user_agent`, `created_at`, `last_used_at`, `expires_at`, `revoked_at`, `revoked_reason`) values ('01a116ea-d18a-7206-af95-0c201617b6d1', 'advertiser', '01a116ea-d16d-763c-943e-4e284825492d', '436b287b160cd48a67702f7e9ae8ec61451e9a0e4cb98ac64cabd9a3529b6ff8', NULL, '37.19.196.100', 'curl/8.7.1', '2026-10-07 15:10:50.250', '2026-10-07 15:10:50.250', '2027-10-07 15:10:50.250', NULL, NULL)Parameters
[
"01a116ea-d18a-7206-af95-0c201617b6d1",
"advertiser",
"01a116ea-d16d-763c-943e-4e284825492d",
"436b287b160cd48a67702f7e9ae8ec61451e9a0e4cb98ac64cabd9a3529b6ff8",
null,
"37.19.196.100",
"curl/8.7.1",
"2026-10-07 15:10:50.250",
"2026-10-07 15:10:50.250",
"2027-10-07 15:10:50.250",
null,
null
]
1 rows
select `id` from `sessions` where ((`sessions`.`subject_type` = 'advertiser' and `sessions`.`subject_id` = '01a116ea-d16d-763c-943e-4e284825492d') and `sessions`.`revoked_at` is null and `sessions`.`expires_at` > '2026-10-07 15:10:50.252' and `sessions`.`id` <> '01a116ea-d18a-7206-af95-0c201617b6d1') order by `sessions`.`last_used_at` desc
Parameters
[
"advertiser",
"01a116ea-d16d-763c-943e-4e284825492d",
"2026-10-07 15:10:50.252",
"01a116ea-d18a-7206-af95-0c201617b6d1"
]
0 rows
select `id`, `code`, `name_ar`, `name_en`, `region_code`, `region_ar`, `region_en`, `active`, `created_at`, `updated_at` from `cities` where `cities`.`id` = '01a116db-4248-772b-be06-e37ca966bf09'
Parameters
[
"01a116db-4248-772b-be06-e37ca966bf09"
]
1 rows
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
Request
Headers
{
"host": "maqsed-api.dev-moltaqa.cloud",
"user-agent": "curl/8.7.1",
"content-length": "270",
"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,
"code": "********"
}
Response
Body
{
"accessToken": "********",
"advertiser": {
"id": "01a116ea-d16d-763c-943e-4e284825492d",
"accountType": "establishment",
"displayName": "مؤسسة تجربة",
"name": "خالد",
"mobile": "+966572340472",
"email": null,
"city": {
"id": "01a116db-4248-772b-be06-e37ca966bf09",
"name": "أبها",
"region": {
"code": "asir",
"name": "منطقة عسير"
}
},
"language": "ar",
"createdAt": "2026-10-07T15:10:50.224Z",
"establishment": {
"name": "مؤسسة تجربة",
"crNumber": "********",
"taxNumber": "300000000000003",
"address": null,
"logoUrl": null,
"crDocument": {
"id": "01a116ea-c847-7655-b9bb-0c782c7cbede",
"purpose": "commercial_registration",
"name": "cr.pdf",
"mimeType": "application/pdf",
"size": 69,
"url": "https://maqsed-api.dev-moltaqa.cloud/files/01a116ea-c847-7655-b9bb-0c782c7cbede?expires=1791389450&signature=9835c897b1dfbbced20ff639a41972a75cd8273973d588c4be71c31abd76c00a",
"urlExpiresAt": "2026-10-07T16:10:50.000Z"
}
}
},
"nextStep": "packages"
}