Update a trading
Changes the fields you send and leaves the rest unchanged.
The body is a JSON merge patch (RFC 7396): null clears a field
that can be empty. address, contact and billing are replaced
whole. external_ref can be set once and cannot change after that.
integrationKeyAuthorizationBearer <token>Your integration key, sent as Authorization: Bearer nik_<prefix>_<secret>.
Narya issues it.
id*stringuuid- body
company_id cannot change: create a trading under the other company instead.
1 <= propertiesexternal_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 <= 128name?string1 <= length <= 255status?string"active""inactive"mcc?|^[0-9]{4}$tags?array<>Replaces the whole list.
items <= 32contact?|nulladdress?|nullThe updated trading
application/json- response
id*stringuuidexternal_ref?|nullcompany_id*stringuuidenterprise_id*|The company's enterprise, or null when it has none.
uuidname*stringstatus*string"active""inactive"mcc?string|nulltags*array<string>contact?|nulladdress?|nullcreated_at*stringdate-timeupdated_at*stringdate-timedeleted_at*|When the record was deleted, or null. Lists return deleted records only with include_deleted=true.
date-timecurl -X PATCH 'https://api-narya-staging.pmadvisors.my/integration/v1/tradings/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_ref": "ACQ-MBB", "company_id": "b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf", "enterprise_id": "2dbe425a-b3bc-4170-8bae-9e5391aafea6", "name": "string", "status": "active", "mcc": "string", "tags": [ "string" ], "contact": { "person": "string", "phone": "string", "email": "user@example.com" }, "address": { "line1": "string", "line2": "string", "city": "string", "postcode": "string", "state": "MY-01", "country": "MY" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z"}