Enroll a trading in a product
Enrolls a trading in a product through an acquirer.
If the same trading, product, vendor and acquirer are already
enrolled, the existing enrollment is returned with 200. A
different acquirer adds a second enrollment beside the first.
integrationKeyAuthorizationBearer <token>Your integration key, sent as Authorization: Bearer nik_<prefix>_<secret>.
Narya issues it.
Idempotency-Key?stringA unique value per logical request, such as a UUID. Within 24 hours a repeat
with the same key, path and body returns the first response; the same key
with a different path or body is a 409.
1 <= length <= 255application/json- body
Name the trading by trading_id or trading_external_ref, and the acquirer
by acquirer_id or acquirer_external_ref: one of each is required, and
sending both of a pair is a 400 with invalid_params[].code exclusive.
trading_id?stringuuidtrading_external_ref?ExternalRefYour own reference for a record: any format, compared exactly and case-sensitively. Leading or trailing whitespace is refused rather than trimmed, so a stored reference always matches what was sent.
^\S(.*\S)?$1 <= length <= 128product_code*string^[a-z][a-z0-9_]{0,63}$vendor_id?stringRequired only when the product has more than one vendor.
uuidacquirer_id?stringuuidacquirer_external_ref?ExternalRefYour own reference for a record: any format, compared exactly and case-sensitively. Leading or trailing whitespace is refused rather than trimmed, so a stored reference always matches what was sent.
^\S(.*\S)?$1 <= length <= 128The same enrollment already exists; it is returned
application/json- response
id*stringuuidtrading_id*stringuuidproduct*vendor*acquirer?|nullstatus*string"active""ended"activated_at?|date-timeended_at?|date-timecreated_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api-narya-staging.pmadvisors.my/integration/v1/trading-enrollments' \ -H 'Content-Type: application/json' \ -d '{ "product_code": "string"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "trading_id": "1697ee0a-d655-4892-9ce3-9e2a05ec9dc1", "product": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "code": "string", "name": "string" }, "vendor": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "acquirer": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "external_ref": "ACQ-MBB" }, "status": "active", "activated_at": "2019-08-24T14:15:22Z", "ended_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}