Create a merchant

POST https://{{subdomain}}.commercelayer.io/api/merchants

Request Body

{"data"=>{"type"=>"merchants", "attributes"=>{"name"=>"{{merchant_name}}"}, "relationships"=>{"address"=>{"data"=>{"type"=>"addresses", "id"=>"{{merchant_rel_id}}"}}}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Authorizationstring

RESPONSES

status: Created

{"data":{"id":"xYZkjABcde","type":"merchants","links":{"self":"https://yourdomain.commercelayer.io/api/merchants/xYZkjABcde"},"attributes":{"name":"The Brand Inc.","created_at":"2018-01-01T12:00:00.000Z","updated_at":"2018-01-01T12:00:00.000Z","reference":"ANY-EXTERNAL-REFEFERNCE","reference_origin":"ANY-EXTERNAL-REFEFERNCE-ORIGIN","metadata":{"foo":"bar"}},"relationships":{"address":{"links":{"self":"https://yourdomain.commercelayer.io/api/merchants/xYZkjABcde/relationships/address","related":"https://yourdomain.commercelayer.io/api/merchants/xYZkjABcde/address"}},"attachments":{"links":{"self":"https://yourdomain.commercelayer.io/api/merchants/xYZkjABcde/relationships/attachments","related":"https://yourdomain.commercelayer.io/api/merchants/xYZkjABcde/attachments"}},"versions":{"links":{"self":"https://yourdomain.commercelayer.io/api/merchants/xYZkjABcde/relationships/versions","related":"https://yourdomain.commercelayer.io/api/merchants/xYZkjABcde/versions"}}},"meta":{"mode":"test"}}}