Create, reactivate or update a merchant association
/api/v1/merchants/merchant-associationSingle entry point for partner merchant lifecycle actions selected by action. create onboards a new merchant (or associates a store with an existing user), reactivate extends an expired signup link, and update changes the credentials of a user who has not yet completed signup.
Endpoint destination URL
https://portal-api-sandbox.datmancrm.com/merchants/sandbox/api/v1/merchants/merchant-associationApiKeyAuthapi_key<token>Partner API key issued by Datman.
Request Parameters
application/json- body
Fields are conditional on action. Fields not listed for an action are rejected. Only create, reactivate and update carry action-specific fields on this endpoint.
action*stringOperation to perform.
"create""reactivate""update""patch""uploadDocuments"storeId?stringNumeric store identifier. create only; required unless isPartner is true, and forbidden when isPartner is true.
^\d+$length <= 10isPartner?booleancreate only (required). Set true to onboard a delivery partner without a storeId; must be true when storeId is omitted.
webhookUrl?stringHTTPS URL that receives onboarding webhooks for the merchant created with create.
^https://urilength <= 200email?stringMerchant owner email. create only (required). Lower-cased by the server.
emaillength <= 254phoneNumber?stringMerchant owner phone number. create only (required).
^\+\d{7,15}$country?stringMerchant country. create only (required).
"United Kingdom""Ireland""Australia""New Zealand""Canada""United States""Mexico"firstName?stringOwner first name. create only (required).
1 <= length <= 80lastName?stringOwner last name. create only (required).
1 <= length <= 80businessName?stringLegal business name (Unicode letters, digits and common punctuation). create only (required).
1 <= length <= 80tradingName?|Trading name. create only, optional; empty string or null allowed.
length <= 80changeOfownership?booleanWhether this is a change of ownership of an existing store. create only (required).
isReseller?booleanWhether the merchant is a reseller. create only (required).
merchantId?stringDatman merchant ID whose signup link is reactivated. reactivate only (required).
^\d+$length <= 100resellerId?stringOptional reseller ID (2-7 digits).
^\d{2,7}$countryOverride?booleancreate only, optional. When true, skips the check that country matches the reseller's configured country.
platform?array<>IDs of the platforms to onboard on, as agreed with Datman. Defaults to all platforms when omitted.
businessType?|create only, optional. Allowed values depend on country: UK/Ireland: Limited, Partnership, Sole Trader, Individual; Australia: those plus Trust, Other; New Zealand and Mexico: Limited, Partnership, Sole Trader, Other, Individual; Canada: Limited, Sole Trader, Individual; United States: Limited, Sole Trader, Partnership, Corporation, Other, Individual.
"Limited""Partnership""Sole Trader""Individual""Trust""Other""Corporation"""nulloldCredentials?Current user credentials. update only (required).
newCredentials?New user credentials. update only (required). Must differ from oldCredentials; to change only the phone number, keep the same email in both and supply both phone numbers.
Response parameters & Errors
Action processed. Note that some business-rule outcomes (for example user not found or update limit exhausted on update) are also returned with HTTP 200 and a Datman internal statusCode (4005-4009) in the body.
application/json- response
Result of the requested action. create returns the merchant fields; reactivate and update return message (and statusCode for update outcomes).
message?stringHuman-readable outcome.
statusCode?integerDatman internal outcome code (not an HTTP status), e.g. 6003 credentials updated, 4005-4009 update not possible.
merchantId?integerDatman merchant ID (create).
merchant_status?unknownMerchant status value stored on the merchant record (create).
account_verification_status?booleanWhether the merchant account is verified (create).
bank_verification_status?booleanWhether the merchant bank account is verified (create).
email?stringOwner email (create).
emailresponseCode?integerOnboarding flow indicator (create). 1001 = staggered onboarding only; 1002 = extra details may be patched and the account might become unverified.
10011002businessName?stringLegal business name (create).
tradingName?stringTrading name (create).
signup_link?stringPortal link for the new user to complete signup. Only present when a new user was created.

