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

PropertyValue
HTTP MethodPUT
Endpoint/api/v1/merchant
Production Base URLhttps://app-api.edfapay.com
Content-Typeapplication/json
Request BodyRequired

3. Authentication

Include the API key in the request headers, as required by the API configuration.

HeaderValue
X-API-KEYYOUR_API_KEY
Content-Typeapplication/json
Accept*/*

4. Request Body

The request body must be a JSON object containing the merchant information to be updated.

Request Fields

FieldTypeDescription
idUUIDMerchant identifier.
nameStringMerchant name.
nameARStringMerchant name in Arabic.
emailAddressStringMerchant email address.
registeredMobileNumberStringRegistered mobile number.
businessCategoryIdUUIDBusiness category identifier.
countryStringMerchant's country.
cityStringMerchant's city.
activeBooleanIndicates whether the merchant is active.
logoObjectMerchant logo information.
logo.fileSizeNumberLogo file size.
logo.fileUrlStringLogo file URL.
logo.fileNameStringLogo file name.
currencyCodeStringCurrency code associated with the merchant.
feeProfileIdNumberFee 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 id in the request body.
  • Ensure UUID fields contain valid UUID values.
  • Use valid email, mobile number, currency, and business category values.
  • Confirm that the selected feeProfileId is valid for the intended merchant.
  • Verify the expected logo URL and metadata format before submitting the request.
  • Handle HTTP 400 responses 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.


Did this page help you?