The Party Account object

Attributes

id string

Unique identifier for the object.

idx integer
parent_id string required
parent_type string required
company string required
account string
advance_account string
The Party Account object
{
  "id": "party-account_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "company": "Example Corp",
  "account": "account_example",
  "advance_account": "advance_account_example"
}
GET /api/accounts/party-account?parent_id={id}

List party accounts by parent

Returns all party accounts belonging to the specified parent.

Query parameters

parent_id string required

The ID of the parent to list children for.

Returns

A list of party account objects belonging to the parent.

GET /api/accounts/party-account?parent_id={id}
curl https://api.overplane.dev/api/accounts/party-account?parent_id=parent_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "party-account_abc123",
      "idx": 1,
      "parent_id": null,
      "parent_type": "parent_type_example",
      "company": "Example Corp",
      "account": "account_example",
      "advance_account": "advance_account_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/party-account

Create a party account

Creates a new party account object.

Body parameters

idx integer
parent_id string required
parent_type string required
company string required
account string
advance_account string

Returns

Returns the newly created party account object if the call succeeded.

POST /api/accounts/party-account
curl https://api.overplane.dev/api/accounts/party-account \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"parent_id":null,"parent_type":"parent_type_example","company":"Example Corp"}'
Response
{
  "id": "party-account_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "company": "Example Corp",
  "account": "account_example",
  "advance_account": "advance_account_example"
}
PATCH /api/accounts/party-account/{id}

Update a party account

Updates the specified party account 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 party account to update.

Body parameters

idx integer
parent_id string
parent_type string
company string
account string
advance_account string

Returns

Returns the updated party account object.

PATCH /api/accounts/party-account/{id}
curl https://api.overplane.dev/api/accounts/party-account/party-account_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"idx":1,"parent_id":null}'
Response
{
  "id": "party-account_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "company": "Example Corp",
  "account": "account_example",
  "advance_account": "advance_account_example"
}
DELETE /api/accounts/party-account/{id}

Delete a party account

Permanently deletes a party account. This cannot be undone.

Path parameters

id string required

The identifier of the party account to delete.

Returns

Returns a confirmation that the party account has been deleted.

DELETE /api/accounts/party-account/{id}
curl https://api.overplane.dev/api/accounts/party-account/party-account_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "party-account_abc123",
  "deleted": true
}
POST /api/accounts/party-account/reorder

Reorder party accounts

Updates the sort order of party accounts within their parent by setting new index values.

Returns

Returns the reordered list.

POST /api/accounts/party-account/reorder
curl https://api.overplane.dev/api/accounts/party-account/reorder \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "party-account_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "company": "Example Corp",
  "account": "account_example",
  "advance_account": "advance_account_example"
}