Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel3
outlinefalse
styledefault
typelist
printablefalse

...

Operation/Type of operation

Behavior

Examples

1

Any operation that creates a customer resource.

  • If business_entity_id is provided, the customer resource is created and linked to it.

  • If business_entity_id is not provided, the customer resource is created under the default business entity of the site.

2

Create a resource other than customer

 

  • If business_entity_id is provided, and it is the same as that linked to the target resource: the resource is created and linked to the business entity provided.

  • If business_entity_id is provided, and it is not the same as that linked to the target resource, a 404 Not Found response is sent because the resource cannot be found in the context of the business entity specified.

  • If business_entity_id is not provided, the resource is created and linked to the business entity of the target resource.

3

Update/delete a resource

  • If business_entity_id is provided, and it is the same as that linked to theresource, the operation proceeds successfully.

  • If business_entity_id is provided, and it is not the same as that linked to the resource, a 404 Not Found response is sent because the resource cannot be found in the context of the business entity specified.

  • If business_entity_id is not provided, the operation proceeds successfully.

4

List resources

  • If business_entity_id is provided, then only those resources linked to the business entity are returned since the context of the operation is now restricted to the business entity specified.

  • If business_entity_id is not provided,then all resources in the site are returned.

5

Retrieve a resource

  • If business_entity_id is provided, and it is the same as that linked to theresource, the resource is retrieved successfully.

  • If business_entity_id is provided, and it is not the same as that linked to the resource, a 404 Not Found response is sent because the resource cannot be found in the context of the business entity specified.

  • If business_entity_id is not provided, the resource is retrieved successfully.

Terminology

This section defines some useful terms for describing how business entities work.

...

  • While creating an invoice resource for a one-time charge, you must specify either the customer or the subscription resource to which it belongs. The customer or subscription resource, in this case, is the target resource of the invoice.

  • While creating a subscription, the target resource of a subscription resource is always a customer resource.

  • While creating a quote resource of type change_subscription, the target resource is a subscription resource.

Sample business_entity

Code Block
languagejson
{
    "id": "1",
    "name": "1",
    "status": "active",
    "deleted": false,
    "created_at": 1709892529,
    "updated_at": 1709892626,
    "resource_version": 1709892626000,
    "object": "business_entity"
}

Attributes

Name

Description

1

id

Status
colourPurple
titleSTRING
Status
titleMAX CHARS = 50

A unique and immutable identifier for the business entity. It is always autogenerated.

2

name

Status
colourPurple
titleSTRING
Status
titleMAX CHARS = 50

A human-friendly name for the business entity.

3

status

Status
colourPurple
titleENUM

The status of business entity. Possible values:

  • active
    The business entity is active and can be used.

  • inactive
    he business entity is inactive and cannot be used.

4

resource_version

Status
colourPurple
titleLONG

Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

5

deleted

Status
colourPurple
titleBOOLEAN
default=false

Indicates that the business entity has been deleted.

6

created_at

Status
colourPurple
titleUNIX TIME

Timestamp for when this business entity was created.

7

updated_at

Status
colourPurple
titleUNIX TIME

The time period when the business entity was updated.

...