Make partner a sub-partner
POST
/api/v2/client/partners/{partner_id}/make-sub-partner
const url = 'https://app.affisemmp.com/api/v2/client/partners/42/make-sub-partner';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"parent_partner_id":15}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.affisemmp.com/api/v2/client/partners/42/make-sub-partner \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "parent_partner_id": 15 }'Converts an external partner (without agency) into a sub-partner by connecting it to a parent partner’s agency. If the agency is not yet connected to the partner’s applications, connections will be created automatically.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” partner_id
required
integer
The ID of the partner to convert.
Example
42Request Body required
Section titled “Request Body required ” Media type application/json
object
parent_partner_id
required
The ID of the internal partner (representing an agency) to use as parent.
integer
Example
15Responses
Section titled “ Responses ” Media type application/json
object
message
string
Example
{ "message": "Partner has been successfully made a sub-partner."} Media type application/json
object
message
string
Example
{ "message": "Access denied"} Media type application/json
object
message
string
Example
{ "message": "Partner is already connected to an agency as sub-partner"}