The Customer Group object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

parent_id string
is_group boolean

Default: false

customer_group_name string required
parent_customer_group string
default_price_list string
payment_terms string
The Customer Group object
{
  "id": "customer-group_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "customer_group_name": "customer_group_name_example",
  "parent_customer_group": "parent_customer_group_example",
  "default_price_list": "default_price_list_example",
  "payment_terms": "payment_terms_example"
}
GET /api/setup/customer-group/{id}

Retrieve a customer group

Retrieves the details of an existing customer group. Supply the unique customer group ID that was returned from a previous request.

Path parameters

id string required

The identifier of the customer group to retrieve.

Returns

Returns the customer group object if a valid identifier was provided.

GET /api/setup/customer-group/{id}
curl https://api.overplane.dev/api/setup/customer-group/customer-group_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "customer-group_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "customer_group_name": "customer_group_name_example",
  "parent_customer_group": "parent_customer_group_example",
  "default_price_list": "default_price_list_example",
  "payment_terms": "payment_terms_example"
}
GET /api/setup/customer-group

List all customer groups

Returns a list of customer groups. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of customer group objects.

GET /api/setup/customer-group
curl https://api.overplane.dev/api/setup/customer-group \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "customer-group_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "parent_id": null,
      "is_group": false,
      "customer_group_name": "customer_group_name_example",
      "parent_customer_group": "parent_customer_group_example",
      "default_price_list": "default_price_list_example",
      "payment_terms": "payment_terms_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/setup/customer-group

Create a customer group

Creates a new customer group object.

Body parameters

parent_id string
is_group boolean

Default: false

customer_group_name string required
parent_customer_group string
default_price_list string
payment_terms string

Returns

Returns the newly created customer group object if the call succeeded.

POST /api/setup/customer-group
curl https://api.overplane.dev/api/setup/customer-group \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"customer_group_name":"customer_group_name_example"}'
Response
{
  "id": "customer-group_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "customer_group_name": "customer_group_name_example",
  "parent_customer_group": "parent_customer_group_example",
  "default_price_list": "default_price_list_example",
  "payment_terms": "payment_terms_example"
}
PATCH /api/setup/customer-group/{id}

Update a customer group

Updates the specified customer group by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the customer group to update.

Body parameters

parent_id string
is_group boolean

Default: false

customer_group_name string
parent_customer_group string
default_price_list string
payment_terms string

Returns

Returns the updated customer group object.

PATCH /api/setup/customer-group/{id}
curl https://api.overplane.dev/api/setup/customer-group/customer-group_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"parent_id":null,"is_group":false}'
Response
{
  "id": "customer-group_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "customer_group_name": "customer_group_name_example",
  "parent_customer_group": "parent_customer_group_example",
  "default_price_list": "default_price_list_example",
  "payment_terms": "payment_terms_example"
}
DELETE /api/setup/customer-group/{id}

Delete a customer group

Permanently deletes a customer group. This cannot be undone.

Path parameters

id string required

The identifier of the customer group to delete.

Returns

Returns a confirmation that the customer group has been deleted.

DELETE /api/setup/customer-group/{id}
curl https://api.overplane.dev/api/setup/customer-group/customer-group_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "customer-group_abc123",
  "deleted": true
}
GET /api/setup/customer-group/{id}/children

Get children

Returns the direct children of the specified node in the tree.

Path parameters

id string required

The identifier of the customer group to act on.

Returns

A list of direct child objects.

GET /api/setup/customer-group/{id}/children
curl https://api.overplane.dev/api/setup/customer-group/customer-group_abc123/children \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "customer-group_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "customer_group_name": "customer_group_name_example",
  "parent_customer_group": "parent_customer_group_example",
  "default_price_list": "default_price_list_example",
  "payment_terms": "payment_terms_example"
}
GET /api/setup/customer-group/{id}/ancestors

Get ancestors

Returns all ancestors from the immediate parent up to the root of the tree.

Path parameters

id string required

The identifier of the customer group to act on.

Returns

A list of ancestor objects from parent to root.

GET /api/setup/customer-group/{id}/ancestors
curl https://api.overplane.dev/api/setup/customer-group/customer-group_abc123/ancestors \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "customer-group_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "customer_group_name": "customer_group_name_example",
  "parent_customer_group": "parent_customer_group_example",
  "default_price_list": "default_price_list_example",
  "payment_terms": "payment_terms_example"
}
GET /api/setup/customer-group/{id}/descendants

Get descendants

Returns all descendants of the specified node in the tree.

Path parameters

id string required

The identifier of the customer group to act on.

Returns

A list of all descendant objects.

GET /api/setup/customer-group/{id}/descendants
curl https://api.overplane.dev/api/setup/customer-group/customer-group_abc123/descendants \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "customer-group_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "customer_group_name": "customer_group_name_example",
  "parent_customer_group": "parent_customer_group_example",
  "default_price_list": "default_price_list_example",
  "payment_terms": "payment_terms_example"
}