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

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

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:

  • "all-disabled"
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:

  • "all-disabled"
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-request-origin-user is ignored.

chargebee-event-email String No

skip only emails

Possible values:

  • "all-disabled"

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 customer_id.

use_default_hierarchy_settings Boolean No

Decides if Chargebee should apply settings from the Chargebee Billing UI or from this API request.

  • If set to true: Chargebee uses settings configured in the Chargebee Billing UI.
  • If set to false: Settings provided in the parent_account_access and child_account_access parameters are applied.

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 true, the child account receives email notifications for its subscriptions.

child_account_access.send_invoice_emails Boolean No

If set to true, the child account receives email notifications for its invoices.

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:

  • "yes"
  • "view_only"
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:

  • "yes"
  • "view_only"
  • "no"
child_account_access.send_payment_emails Boolean No

If set to true, the child account receives email notifications for payment-related activities for its invoices.

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:

  • "yes"
  • "view_only"
  • "no"
parent_account_access.send_subscription_emails Boolean No

If set to true, the parent receives email notifications for the child's subscriptions.

parent_account_access.send_invoice_emails Boolean No

If set to true, the parent receives email notifications for the child's invoices.

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:

  • "yes"
  • "view_only"
  • "no"
parent_account_access.send_payment_emails Boolean No

If set to true, the parent receives email notifications for payment-related activities on the child's invoices.

invoice_owner_id String No

The id of the customer who receives the invoice for charges incurred by the customer identified by customer_id. This ID must match either customer_id or one of its ancestors.

payment_owner_id String No

The id of the customer responsible for paying the invoices for the customer identified by customer_id. This ID must match either customer_id or invoice_owner_id.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.