POST /customers/{customer-id}/relationships
Establish a hierarchical relationship between customers. The path parameter customer_id
identifies the child in this relationship.
Prerequisite
Both parent and child customers must be part of the same business entity.
Note
- A customer can have a maximum of 250 direct children.
- The hierarchy allows a maximum of 5 levels from the root node to the lowest child node.
Note
For the use_default_hierarchy_settings
, parent_account_access
, and child_account_access
parameters below, the term "parent" usually refers to the customer with the ID payment_owner_id. However, if the payment_owner_id
is the same as the child's ID ({customer_id}
), the "parent" is identified by parent_id.
Servers
- {protocol}://{site}.{environment}:{port}/api/v2
- {protocol}://{site}-test.{environment}:{port}/api/v2
Path parameters
Name | Type | Required | Description |
---|---|---|---|
customer-id |
String | Yes |
Request headers
Name | Type | Required | Description |
---|---|---|---|
chargebee-request-origin-device |
String | No |
The device from which the customer has made the request |
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/x-www-form-urlencoded" |
chargebee-event-webhook |
String | No |
skip only webhooks Possible values:
|
chargebee-business-entity-id |
String | No |
If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. |
chargebee-event-actions |
String | No |
skip all actions to be done on the events Possible values:
|
chargebee-request-origin-user |
String | No |
The email address of your customer/user. Use this when the email address has only ASCII characters. |
chargebee-request-origin-ip |
String | No |
The IP address of the customer where the request originated |
chargebee-request-origin-user-encoded |
String | No |
The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header |
chargebee-event-email |
String | No |
skip only emails Possible values:
|
Request body fields
Name | Type | Required | Description |
---|---|---|---|
parent_id |
String | No |
ID of the customer intended to be set as the immediate parent of the customer identified by |
use_default_hierarchy_settings |
Boolean | No |
Decides if Chargebee should apply settings from the Chargebee Billing UI or from this API request.
Default value: true |
child_account_access |
Object | No |
Settings for the child account's access. |
child_account_access.send_subscription_emails |
Boolean | No |
If set to |
child_account_access.send_invoice_emails |
Boolean | No |
If set to |
child_account_access.portal_edit_subscriptions |
String | No |
Determines the child's access to its own subscriptions in the Self-Serve Portal. * view_only - The child account can only view its subscriptions. * yes - The child account can view and edit its subscriptions. Possible values:
|
child_account_access.portal_download_invoices |
String | No |
Determines the child's access to its own invoices in the Self-Serve Portal. * yes - The child account can both view and download its invoices. * view_only - The child account can view but not download its invoices. * no - The child account cannot view or download its own invoices. Possible values:
|
child_account_access.send_payment_emails |
Boolean | No |
If set to |
parent_account_access |
Object | No |
Settings for the parent account's access. |
parent_account_access.portal_download_child_invoices |
String | No |
Determines the parent's access to the child's invoices in the Self-Serve Portal. * no - The parent can't view or download the child's invoices. * view_only - The parent can view but not download the child's invoices. * yes - The parent can both view and download the child's invoices. Possible values:
|
parent_account_access.send_subscription_emails |
Boolean | No |
If set to |
parent_account_access.send_invoice_emails |
Boolean | No |
If set to |
parent_account_access.portal_edit_child_subscriptions |
String | No |
Determines the parent's access to the child's subscriptions in the Self-Serve Portal. * yes - The parent can view and edit the child's subscriptions. * no - The parent can't view or edit the child's subscriptions. * view_only - The parent can only view the child's subscriptions. Possible values:
|
parent_account_access.send_payment_emails |
Boolean | No |
If set to |
invoice_owner_id |
String | No |
The |
payment_owner_id |
String | No |
The |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.