MerchantsMerchant association

Create, reactivate or update a merchant association

post/api/v1/merchants/merchant-association

Single 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-association

Authorization

ApiKeyAuth
headerapi_key<token>

Partner API key issued by Datman.

Request Parameters

Request Body

application/json
  1. 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*string

Operation to perform.

Value in"create""reactivate""update""patch""uploadDocuments"
storeId?string

Numeric store identifier. create only; required unless isPartner is true, and forbidden when isPartner is true.

Match^\d+$
Lengthlength <= 10
isPartner?boolean

create only (required). Set true to onboard a delivery partner without a storeId; must be true when storeId is omitted.

webhookUrl?string

HTTPS URL that receives onboarding webhooks for the merchant created with create.

Match^https://
Formaturi
Lengthlength <= 200
email?string

Merchant owner email. create only (required). Lower-cased by the server.

Formatemail
Lengthlength <= 254
phoneNumber?string

Merchant owner phone number. create only (required).

Match^\+\d{7,15}$
country?string

Merchant country. create only (required).

Value in"United Kingdom""Ireland""Australia""New Zealand""Canada""United States""Mexico"
firstName?string

Owner first name. create only (required).

Length1 <= length <= 80
lastName?string

Owner last name. create only (required).

Length1 <= length <= 80
businessName?string

Legal business name (Unicode letters, digits and common punctuation). create only (required).

Length1 <= length <= 80
tradingName?|

Trading name. create only, optional; empty string or null allowed.

Lengthlength <= 80
changeOfownership?boolean

Whether this is a change of ownership of an existing store. create only (required).

isReseller?boolean

Whether the merchant is a reseller. create only (required).

merchantId?string

Datman merchant ID whose signup link is reactivated. reactivate only (required).

Match^\d+$
Lengthlength <= 100
resellerId?string

Optional reseller ID (2-7 digits).

Match^\d{2,7}$
countryOverride?boolean

create 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.

Value in"Limited""Partnership""Sole Trader""Individual""Trust""Other""Corporation"""null
oldCredentials?

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

Response Body

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
  1. response

Result of the requested action. create returns the merchant fields; reactivate and update return message (and statusCode for update outcomes).

message?string

Human-readable outcome.

statusCode?integer

Datman internal outcome code (not an HTTP status), e.g. 6003 credentials updated, 4005-4009 update not possible.

merchantId?integer

Datman merchant ID (create).

merchant_status?unknown

Merchant status value stored on the merchant record (create).

account_verification_status?boolean

Whether the merchant account is verified (create).

bank_verification_status?boolean

Whether the merchant bank account is verified (create).

email?string

Owner email (create).

Formatemail
responseCode?integer

Onboarding flow indicator (create). 1001 = staggered onboarding only; 1002 = extra details may be patched and the account might become unverified.

Value in10011002
businessName?string

Legal business name (create).

tradingName?string

Trading name (create).

signup_link?string

Portal link for the new user to complete signup. Only present when a new user was created.