Update Merchant
Updates an existing merchant's profile, contact details, business category, location, activation status, logo information, currency, and fee profile. Accessible to Super Admin, Partner, and Merchant roles, with documented 200 OK and 400 Bad Request responses.
1. Overview
Updates the information of an existing merchant in the EdfaPay system.
The endpoint accepts a JSON request body containing merchant details, including the merchant name, contact information, business category, location, activation status, logo information, currency, and fee profile.
Access Levels: SUPER_ADMIN, PARTNER, MERCHANT
2. Endpoint Details
| Property | Value |
|---|---|
| HTTP Method | PUT |
| Endpoint | /api/v1/merchant |
| Production Base URL | https://app-api.edfapay.com |
| Content-Type | application/json |
| Request Body | Required |
3. Authentication
Include the API key in the request headers, as required by the API configuration.
| Header | Value |
|---|---|
X-API-KEY | YOUR_API_KEY |
Content-Type | application/json |
Accept | */* |
4. Request Body
The request body must be a JSON object containing the merchant information to be updated.
Request Fields
| Field | Type | Description |
|---|---|---|
id | UUID | Merchant identifier. |
name | String | Merchant name. |
nameAR | String | Merchant name in Arabic. |
emailAddress | String | Merchant email address. |
registeredMobileNumber | String | Registered mobile number. |
businessCategoryId | UUID | Business category identifier. |
country | String | Merchant's country. |
city | String | Merchant's city. |
active | Boolean | Indicates whether the merchant is active. |
logo | Object | Merchant logo information. |
logo.fileSize | Number | Logo file size. |
logo.fileUrl | String | Logo file URL. |
logo.fileName | String | Logo file name. |
currencyCode | String | Currency code associated with the merchant. |
feeProfileId | Number | Fee profile identifier. |
The supplied Swagger example does not specify which individual fields are mandatory, their validation rules, or whether omitted fields are retained or cleared during an update. Confirm these behaviors in the API schema or implementation.
Example Request
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Example Merchant",
"nameAR": "اسم التاجر",
"emailAddress": "[email protected]",
"registeredMobileNumber": "+201000000000",
"businessCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"country": "Egypt",
"city": "Cairo",
"active": true,
"logo": {
"fileSize": 0,
"fileUrl": "https://example.com/merchant-logo.png",
"fileName": "merchant-logo.png"
},
"currencyCode": "EGP",
"feeProfileId": 0
}The values above are illustrative examples. Replace them with valid merchant data and identifiers.
5. Request Example
cURL
curl --request PUT \
--url 'https://app-api.edfapay.com/api/v1/merchant' \
--header 'X-API-KEY: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Example Merchant",
"nameAR": "اسم التاجر",
"emailAddress": "[email protected]",
"registeredMobileNumber": "+201000000000",
"businessCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"country": "Egypt",
"city": "Cairo",
"active": true,
"logo": {
"fileSize": 0,
"fileUrl": "https://example.com/merchant-logo.png",
"fileName": "merchant-logo.png"
},
"currencyCode": "EGP",
"feeProfileId": 0
}'6. Responses
6.1 HTTP 200 — OK
Description: The merchant update request was processed successfully.
Example response:
{
"code": 0,
"message": "string",
"errorCode": "string",
"data": {}
}6.2 HTTP 400 — Bad Request
Description: The request could not be processed because of invalid input or another request-related issue.
Example response:
{
"code": 0,
"message": "string",
"errorCode": "string",
"data": {}
}The response values are placeholders from Swagger and may differ from actual runtime responses.
7. Implementation Notes
- Provide the correct merchant
idin the request body. - Ensure UUID fields contain valid UUID values.
- Use valid email, mobile number, currency, and business category values.
- Confirm that the selected
feeProfileIdis valid for the intended merchant. - Verify the expected logo URL and metadata format before submitting the request.
- Handle HTTP
400responses and inspect the returned error details. - The supplied reference does not document additional status codes or field-level validation constraints.
8. Summary
The Update Merchant endpoint allows users with the documented access levels to update an existing merchant's profile and business information through a JSON request.
Updated 25 days ago