1. Migrate Merchant Account
This endpoint facilitates the migration of a merchant's account to a new system. The migration process involves transferring various account details, such as registration type, license number, mobile number, and other personal and business information. The endpoint ensures that the account migration is processed securely and accurately.This endpoint migrates an account based on the provided registration migration request.
Authorization
This endpoint requires the user to have the role
MERCHANT_API_ACCOUNT
Endpoint
POST /api/partner/register/migrate
Request Headers
Header | Required | Description |
---|---|---|
Authorization | Yes | Bearer token provided by Authentication Endpoint |
Accept | Yes | It must be set to application/JSON. |
Content-Type | Yes | It must be set to application/JSON. |
{
"Authorization": "Bearer [id_token]",
"Accept": "application/json",
"Content-Type": "application/json"
}
Request Body Parameters
Field | Type | Required | Description |
---|---|---|---|
sessionUuid | String | True | The session UUID of the registration |
registrationType | String | True | The registration type. Allowed values: "cr", "freelancer" |
licenseNumber | String | True | The license number of the cr or freelancer |
mobileNumber | String | True | The mobile number of the merchant |
hijriYear | String | True | The Hijri year |
hijriMonth | String | True | The Hijri month |
hijriDay | String | True | The Hijri day |
partnerProfileNo | String | True | The partner profile number |
iban | String | True | The IBAN of the merchant |
bankSwiftName | String | True | The bank swift code |
monthlySalesVolume | double | True | The expected monthly sales volume |
categoryDescription | String | True | The category description |
sellingScope | String | True | The selling scope. Allowed values: "domestic", "global" |
nationalId | String | True | The national ID of the merchant |
String | True | The email of the merchant | |
firstName | String | True | The first name of the merchant |
lastName | String | True | The last name of the merchant |
password | String | True | The password of the merchant |
nafathCallbackUrl | String | True | The Nafath callback URL |
nafathCallbackHeader1Name | String | True | The name of the first Nafath callback header |
nafathCallbackHeader1Value | String | True | The value of the first Nafath callback header |
nafathCallbackHeader2Name | String | True | The name of the second Nafath callback header |
nafathCallbackHeader2Value | String | True | The value of the second Nafath callback header |
An example of the request:
{
"sessionUuid": "96ea8e22-edef-414b-9724-3bd2d494b710",
"registrationType": "cr",
"licenseNumber": "2041231231",
"mobileNumber": "966501234567",
"hijriYear": "1445",
"hijriMonth": "02",
"hijriDay": "16",
"partnerProfileNo": "12312312",
"iban": "SA1234567890123456789012",
"bankSwiftName": "RJHISARI",
"monthlySalesVolume": 10000,
"categoryDescription": "Grocery",
"sellingScope": "domestic",
"nationalId": "1234567890",
"email": "[email protected]",
"firstName": "Mohammed",
"lastName": "Ali",
"password": "password",
"nafathCallbackUrl": "https://example/nafath-callback",
"nafathCallbackHeader1Name": "header1",
"nafathCallbackHeader1Value": "value1",
"nafathCallbackHeader2Name": "header2",
"nafathCallbackHeader2Value": "value2"
}
Success Response
The response will be a JSON object of type RegistrationMigrationResponse
.
Field | Type | Description |
---|---|---|
mobile | String | The mobile number of the merchant |
sessionUuid | String | The session UUID |
success | Boolean | Indicates if the migration was successful |
note | String | Any note regarding the response |
nafathRandomNo | String | The random number to choose inside Nafath App |
Example of the response:
{
"mobile": "00966512345678",
"sessionUuid": "96ea8e22-edef-414b-9724-3bd2d494b710",
"success": true,
"nafathRandomNo": "10",
"note": "any note ..."
}
HTTP Status Codes
200 OK
: The account was successfully migrated.400 Bad Request
: The request body is invalid or missing required fields.401 Unauthorized
: The user is not authorized to perform this action.500 Internal Server Error
: An unexpected error occurred on the server.
Updated 5 months ago