# Partner type


A business partner: a customer, a supplier or both. Requires the `partner.read` permission.

## Fields

### id

[`UUID!`](/chameleoon-max/type/uuid)

The partner's MAX id.

### code

`String!`

The partner's code in MAX.

### name

`String`

The partner's name. Null once the partner is erased.

### registrationId

`String`

The company registration number (IČO). Null when it is unknown, and once the partner is
erased.

### taxId

`String`

The tax number that is not a VAT number (the Slovak DIČ). Null for a Czech partner, when it is
unknown, and once the partner is erased.

### vatId

`String`

The VAT number, with its country prefix. The Czech DIČ is here. `vatRegistered` says whether
it is a VAT registration. Null when it is unknown, and once the partner is erased.

### vatRegistered

`Boolean!`

Whether `vatId` is a VAT registration (a VAT payer or an identified person). `false` once the
partner is erased.

### email

`String`

The organisation's general e-mail address (such as info@, not a person's). Null when it is
unknown, and once the partner is erased.

### phone

`String`

The organisation's general phone number (the switchboard). Null when it is unknown, and once
the partner is erased.

### isCustomer

`Boolean!`

Whether you sell to the partner.

### isSupplier

`Boolean!`

Whether you buy from the partner.

### billingAddresses

[`AddressConnection`](/chameleoon-max/type/address-connection)

Arguments:

- `first`: `Int`
- `after`: `String`
- `last`: `Int`
- `before`: `String`

The partner's current billing addresses. Archived addresses are left out.

- The default address comes first, then the rest by label (compared by bytes, unlabelled ones
  last) and id.
- A connection, paged with `first`/`after` or `last`/`before`, at most 250 a page.
- Its cursors belong to this partner's billing addresses and are refused anywhere else.
- Empty, with `totalCount` 0, once the partner is erased.

Null, with an error at its path, when its page cannot be read, for example because of a
cursor of another parent. The rest of the response is returned.

A page costs 2 + first (or last) × the cost of one node.

### deliveryAddresses

[`AddressConnection`](/chameleoon-max/type/address-connection)

Arguments:

- `first`: `Int`
- `after`: `String`
- `last`: `Int`
- `before`: `String`

The partner's current delivery addresses. Archived addresses are left out.

- Ordered and paged as `billingAddresses`.
- Its cursors belong to this partner's delivery addresses and are refused anywhere else.
- Empty, with `totalCount` 0, once the partner is erased.

Null, with an error at its path, when its page cannot be read, for example because of a
cursor of another parent. The rest of the response is returned.

A page costs 2 + first (or last) × the cost of one node.

### externalRefs

[`ExternalRefConnection`](/chameleoon-max/type/external-ref-connection)

Arguments:

- `first`: `Int`
- `after`: `String`
- `last`: `Int`
- `before`: `String`

The ids that external sources know the partner by.

- Sorted by external source code, then by parent id (references without a parent first), external id
  and the reference's own id.
- A connection, paged with `first`/`after` or `last`/`before`, at most 250 a page.
- Its cursors belong to this partner's references and are refused anywhere else.
- Empty, with `totalCount` 0, once the partner is erased.
- It is read with the partner, so it requires the `partner.read` permission, not
  `integration.read`. Without `partner.read` it is null, with `FORBIDDEN_ROLE` at its path.

Null, with an error at its path, when its page cannot be read, for example because of a
cursor of another parent. The rest of the response is returned.

A page costs 2 + first (or last) × the cost of one node.

## Used by

- [`Issue`](/chameleoon-max/type/issue)
- [`PartnerExternalRefResult`](/chameleoon-max/type/partner-external-ref-result)
- [`Receipt`](/chameleoon-max/type/receipt)
- [`ReceiptAdvice`](/chameleoon-max/type/receipt-advice)
- [`SalesOrder`](/chameleoon-max/type/sales-order)
