# Actions

> Canonical actions for B2B organization accounts, quotes, approvals, and cart sharing

Canonical B2B actions define account and workflow mutations shared by connector apps. Import them from `@laioutr-core/canonical-types/b2b`.

**Since v0.26.0** in `@laioutr-core/canonical-types`.

## Organization context

### OrganizationGetMembershipsAction `b2b/organization/get-memberships`

```ts
import { OrganizationGetMembershipsAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"null","id":"action:b2b_organization_get-memberships:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"organizations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"businessUnitName":{"description":"The business unit within the organization, where the membership is unit-scoped (e.g. a Spryker company user) — disambiguates memberships that share an organization name.","type":"string"},"isDefault":{"description":"Whether this organization is the customer's default organization context.","type":"boolean"}},"required":["id","name"],"additionalProperties":false}}},"required":["organizations"],"additionalProperties":false,"id":"action:b2b_organization_get-memberships:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/get-memberships \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationGetMembershipsAction } from '@laioutr-core/canonical-types/b2b';

const { data, status } = useQueryAction(OrganizationGetMembershipsAction);
```

### OrganizationSwitchAction `b2b/organization/switch`

```ts
import { OrganizationSwitchAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"organizationId":{"description":"The ID of the organization to switch to.","type":"string"}},"required":["organizationId"],"id":"action:b2b_organization_switch:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_switch:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/switch \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationSwitchAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationSwitchAction);
await mutate(input);
```

### OrganizationSetLoginPreferencesAction `b2b/organization/set-login-preferences`

```ts
import { OrganizationSetLoginPreferencesAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"defaultOrganizationId":{"description":"The organization to enter on login. `null` means the customer is asked to choose on every login. Omit to leave unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"loginTarget":{"description":"Portal page to land on after login (open coded set, e.g. `standard`, `dashboard`, `order-overview`). Omit to leave unchanged.","type":"string"}},"id":"action:b2b_organization_set-login-preferences:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_set-login-preferences:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/set-login-preferences \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationSetLoginPreferencesAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationSetLoginPreferencesAction);
await mutate(input);
```

## Employees

### OrganizationEmployeeInviteAction `b2b/organization/employee-invite`

```ts
import { OrganizationEmployeeInviteAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"person":{"type":"object","properties":{"firstName":{"description":"The first name(s) of a person.","examples":["Stephen"],"type":"string"},"lastName":{"description":"The last name(s) of a person.","examples":["Hawking"],"type":"string"},"salutation":{"description":"Salutation of a person as lowercase key.","examples":["ms , \"mr\", \"mx\", \"none\", etc."],"type":"string"},"title":{"description":"Title of a person as lowercase key.","examples":["dr , \"prof\", etc."],"type":"string"}}},"jobTitle":{"description":"The employee's job title (`EmployeeBase.jobTitle`).","type":"string"},"roleIds":{"description":"IDs of the roles to assign.","type":"array","items":{"type":"string"}},"customFields":{"allOf":[{"$ref":"#/definitions/CustomFields"}]}},"required":["email"],"id":"action:b2b_organization_employee-invite:input","definitions":{"CustomFields":{"description":"Custom fields are a way for implementations to pass arbitrary data to actions, queries, etc.","title":"CustomFields","id":"CustomFields","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"id":{"description":"The ID of the created employee.","type":"string"}},"required":["id"],"additionalProperties":false,"id":"action:b2b_organization_employee-invite:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/employee-invite \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationEmployeeInviteAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationEmployeeInviteAction);
await mutate(input);
```

### OrganizationEmployeeUpdateAction `b2b/organization/employee-update`

```ts
import { OrganizationEmployeeUpdateAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"employeeId":{"type":"string"},"person":{"type":"object","properties":{"firstName":{"description":"The first name(s) of a person.","examples":["Stephen"],"type":"string"},"lastName":{"description":"The last name(s) of a person.","examples":["Hawking"],"type":"string"},"salutation":{"description":"Salutation of a person as lowercase key.","examples":["ms , \"mr\", \"mx\", \"none\", etc."],"type":"string"},"title":{"description":"Title of a person as lowercase key.","examples":["dr , \"prof\", etc."],"type":"string"}}},"jobTitle":{"description":"The employee's job title (`EmployeeBase.jobTitle`).","type":"string"},"roleIds":{"description":"IDs of the roles to assign, replacing the current assignment.","type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","inactive"]},"customFields":{"allOf":[{"$ref":"#/definitions/CustomFields"}]}},"required":["employeeId"],"id":"action:b2b_organization_employee-update:input","definitions":{"CustomFields":{"description":"Custom fields are a way for implementations to pass arbitrary data to actions, queries, etc.","title":"CustomFields","id":"CustomFields","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_employee-update:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/employee-update \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationEmployeeUpdateAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationEmployeeUpdateAction);
await mutate(input);
```

### OrganizationEmployeeDeleteAction `b2b/organization/employee-delete`

```ts
import { OrganizationEmployeeDeleteAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"employeeId":{"type":"string"}},"required":["employeeId"],"id":"action:b2b_organization_employee-delete:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_employee-delete:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/employee-delete \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationEmployeeDeleteAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationEmployeeDeleteAction);
await mutate(input);
```

## Roles

### OrganizationRoleGetAllAction `b2b/organization/role-get-all`

```ts
import { OrganizationRoleGetAllAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"null","id":"action:b2b_organization_role-get-all:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scope":{"description":"Whether the role is platform-provided (`global`) or owned by the organization (`organization`).","type":"string","enum":["global","organization"]},"permissions":{"description":"Permission codes granted by this role.","type":"array","items":{"type":"string"}},"isDeletable":{"description":"Whether this role may be deleted (global roles may not be).","type":"boolean"}},"required":["id","name","scope"],"additionalProperties":false}}},"required":["roles"],"additionalProperties":false,"id":"action:b2b_organization_role-get-all:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/role-get-all \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationRoleGetAllAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationRoleGetAllAction);
await mutate(input);
```

### OrganizationRoleCreateAction `b2b/organization/role-create`

```ts
import { OrganizationRoleCreateAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"name":{"type":"string"},"permissions":{"description":"Permission codes to grant (open coded set, seeded with the Shopware Commercial vocabulary).","type":"array","items":{"type":"string"}}},"required":["name","permissions"],"id":"action:b2b_organization_role-create:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"id":{"description":"The ID of the created role.","type":"string"}},"required":["id"],"additionalProperties":false,"id":"action:b2b_organization_role-create:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/role-create \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationRoleCreateAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationRoleCreateAction);
await mutate(input);
```

### OrganizationRoleUpdateAction `b2b/organization/role-update`

```ts
import { OrganizationRoleUpdateAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"roleId":{"type":"string"},"name":{"type":"string"},"permissions":{"description":"Permission codes, replacing the current set.","type":"array","items":{"type":"string"}}},"required":["roleId"],"id":"action:b2b_organization_role-update:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_role-update:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/role-update \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationRoleUpdateAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationRoleUpdateAction);
await mutate(input);
```

### OrganizationRoleDeleteAction `b2b/organization/role-delete`

```ts
import { OrganizationRoleDeleteAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"roleId":{"type":"string"}},"required":["roleId"],"id":"action:b2b_organization_role-delete:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_role-delete:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/role-delete \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationRoleDeleteAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationRoleDeleteAction);
await mutate(input);
```

## Organization addresses

### OrganizationAddressGetAllAction `b2b/organization/address-get-all`

```ts
import { OrganizationAddressGetAllAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"null","id":"action:b2b_organization_address-get-all:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"address":{"$ref":"#/definitions/MailingAddress"},"isDefaultBilling":{"type":"boolean"},"isDefaultShipping":{"type":"boolean"},"isDeletable":{"description":"Whether this address may be deleted.","type":"boolean"}},"required":["id","address"],"additionalProperties":false}}},"required":["addresses"],"additionalProperties":false,"id":"action:b2b_organization_address-get-all:output","definitions":{"MailingAddress":{"description":"Represents a mailing address for customers and shipping. If you are looking for just a location address, use {@link LocationAddress} instead.","title":"MailingAddress","id":"MailingAddress","type":"object","properties":{"address1":{"description":"The first line of the address. E.g. the street address or PO Box number.","type":"string"},"address2":{"description":"The second line of the address. E.g. the number of the apartment, suite, or unit.","type":"string"},"city":{"description":"The name of the city, district, village, or town.","type":"string"},"countryCode":{"description":"The country code of the address. In {@link https://www.iso.org/glossary-for-iso-3166.html | ISO 3166-1 (alpha-2)} format","type":"string"},"postalCode":{"description":"The zip or postal code of the address.","type":"string"},"provinceCode":{"description":"The region/province code of the address. In {@link https://www.iso.org/glossary-for-iso-3166.html | ISO 3166-2} format, without the country code.","type":"string"},"firstName":{"description":"The first name(s) of a person.","examples":["Stephen"],"type":"string"},"lastName":{"description":"The last name(s) of a person.","examples":["Hawking"],"type":"string"},"salutation":{"description":"Salutation of a person as lowercase key.","examples":["ms , \"mr\", \"mx\", \"none\", etc."],"type":"string"},"title":{"description":"Title of a person as lowercase key.","examples":["dr , \"prof\", etc."],"type":"string"},"company":{"description":"The name of the company or organization of the address.","type":"string"},"phone":{"allOf":[{"$ref":"#/definitions/PhoneNumber"}]},"geo":{"allOf":[{"$ref":"#/definitions/GeoCoordinates"}]}},"required":["address1","city","countryCode","postalCode","firstName","lastName"],"additionalProperties":false},"PhoneNumber":{"description":"Represents a phone number. Formatted as a {@link https://en.wikipedia.org/wiki/E.164 | E.164} number.","title":"PhoneNumber","id":"PhoneNumber","examples":["\"+4915756789013\""],"type":"string","pattern":"^\\+?[1-9]\\d{1,14}$"},"GeoCoordinates":{"description":"A geographic point: latitude and longitude in decimal degrees. Coordinates are in the GPS (WGS84) reference system.","title":"GeoCoordinates","id":"GeoCoordinates","type":"object","properties":{"latitude":{"description":"Latitude in decimal degrees (WGS84).","type":"number"},"longitude":{"description":"Longitude in decimal degrees (WGS84).","type":"number"}},"required":["latitude","longitude"],"additionalProperties":false}}}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/address-get-all \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationAddressGetAllAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationAddressGetAllAction);
await mutate(input);
```

### OrganizationAddressCreateAction `b2b/organization/address-create`

```ts
import { OrganizationAddressCreateAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"address":{"$ref":"#/definitions/MailingAddress"}},"required":["address"],"id":"action:b2b_organization_address-create:input","definitions":{"MailingAddress":{"description":"Represents a mailing address for customers and shipping. If you are looking for just a location address, use {@link LocationAddress} instead.","title":"MailingAddress","id":"MailingAddress","type":"object","properties":{"address1":{"description":"The first line of the address. E.g. the street address or PO Box number.","type":"string"},"address2":{"description":"The second line of the address. E.g. the number of the apartment, suite, or unit.","type":"string"},"city":{"description":"The name of the city, district, village, or town.","type":"string"},"countryCode":{"description":"The country code of the address. In {@link https://www.iso.org/glossary-for-iso-3166.html | ISO 3166-1 (alpha-2)} format","type":"string"},"postalCode":{"description":"The zip or postal code of the address.","type":"string"},"provinceCode":{"description":"The region/province code of the address. In {@link https://www.iso.org/glossary-for-iso-3166.html | ISO 3166-2} format, without the country code.","type":"string"},"firstName":{"description":"The first name(s) of a person.","examples":["Stephen"],"type":"string"},"lastName":{"description":"The last name(s) of a person.","examples":["Hawking"],"type":"string"},"salutation":{"description":"Salutation of a person as lowercase key.","examples":["ms , \"mr\", \"mx\", \"none\", etc."],"type":"string"},"title":{"description":"Title of a person as lowercase key.","examples":["dr , \"prof\", etc."],"type":"string"},"company":{"description":"The name of the company or organization of the address.","type":"string"},"phone":{"allOf":[{"$ref":"#/definitions/PhoneNumber"}]},"geo":{"allOf":[{"$ref":"#/definitions/GeoCoordinates"}]}},"required":["address1","city","countryCode","postalCode","firstName","lastName"]},"PhoneNumber":{"description":"Represents a phone number. Formatted as a {@link https://en.wikipedia.org/wiki/E.164 | E.164} number.","title":"PhoneNumber","id":"PhoneNumber","examples":["\"+4915756789013\""],"type":"string","pattern":"^\\+?[1-9]\\d{1,14}$"},"GeoCoordinates":{"description":"A geographic point: latitude and longitude in decimal degrees. Coordinates are in the GPS (WGS84) reference system.","title":"GeoCoordinates","id":"GeoCoordinates","type":"object","properties":{"latitude":{"description":"Latitude in decimal degrees (WGS84).","type":"number"},"longitude":{"description":"Longitude in decimal degrees (WGS84).","type":"number"}},"required":["latitude","longitude"]}}}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_address-create:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/address-create \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationAddressCreateAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationAddressCreateAction);
await mutate(input);
```

### OrganizationAddressUpdateAction `b2b/organization/address-update`

```ts
import { OrganizationAddressUpdateAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"id":{"description":"The ID of the address to update.","type":"string"},"address":{"type":"object","properties":{"address1":{"description":"The first line of the address. E.g. the street address or PO Box number.","type":"string"},"address2":{"description":"The second line of the address. E.g. the number of the apartment, suite, or unit.","type":"string"},"city":{"description":"The name of the city, district, village, or town.","type":"string"},"countryCode":{"description":"The country code of the address. In {@link https://www.iso.org/glossary-for-iso-3166.html | ISO 3166-1 (alpha-2)} format","type":"string"},"postalCode":{"description":"The zip or postal code of the address.","type":"string"},"provinceCode":{"description":"The region/province code of the address. In {@link https://www.iso.org/glossary-for-iso-3166.html | ISO 3166-2} format, without the country code.","type":"string"},"firstName":{"description":"The first name(s) of a person.","examples":["Stephen"],"type":"string"},"lastName":{"description":"The last name(s) of a person.","examples":["Hawking"],"type":"string"},"salutation":{"description":"Salutation of a person as lowercase key.","examples":["ms , \"mr\", \"mx\", \"none\", etc."],"type":"string"},"title":{"description":"Title of a person as lowercase key.","examples":["dr , \"prof\", etc."],"type":"string"},"company":{"description":"The name of the company or organization of the address.","type":"string"},"phone":{"allOf":[{"$ref":"#/definitions/PhoneNumber"}]},"geo":{"allOf":[{"$ref":"#/definitions/GeoCoordinates"}]}}}},"required":["id","address"],"id":"action:b2b_organization_address-update:input","definitions":{"PhoneNumber":{"description":"Represents a phone number. Formatted as a {@link https://en.wikipedia.org/wiki/E.164 | E.164} number.","title":"PhoneNumber","id":"PhoneNumber","examples":["\"+4915756789013\""],"type":"string","pattern":"^\\+?[1-9]\\d{1,14}$"},"GeoCoordinates":{"description":"A geographic point: latitude and longitude in decimal degrees. Coordinates are in the GPS (WGS84) reference system.","title":"GeoCoordinates","id":"GeoCoordinates","type":"object","properties":{"latitude":{"description":"Latitude in decimal degrees (WGS84).","type":"number"},"longitude":{"description":"Longitude in decimal degrees (WGS84).","type":"number"}},"required":["latitude","longitude"]}}}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_address-update:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/address-update \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationAddressUpdateAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationAddressUpdateAction);
await mutate(input);
```

### OrganizationAddressDeleteAction `b2b/organization/address-delete`

```ts
import { OrganizationAddressDeleteAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"id":{"description":"The ID of the address to delete.","type":"string"}},"required":["id"],"id":"action:b2b_organization_address-delete:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_address-delete:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/address-delete \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationAddressDeleteAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationAddressDeleteAction);
await mutate(input);
```

### OrganizationAddressSetDefaultAction `b2b/organization/address-set-default`

```ts
import { OrganizationAddressSetDefaultAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"id":{"description":"The ID of the address to set as default.","type":"string"},"type":{"description":"The type of default to set. Not all backends may support this distinction.","type":"string","enum":["shipping","billing"]}},"required":["id","type"],"id":"action:b2b_organization_address-set-default:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_address-set-default:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/address-set-default \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationAddressSetDefaultAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationAddressSetDefaultAction);
await mutate(input);
```

## Cost centers

### OrganizationCostCenterCreateAction `b2b/organization/cost-center-create`

```ts
import { OrganizationCostCenterCreateAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"name":{"type":"string"},"description":{"description":"Free-text description (`CostCenterInfo.description`).","type":"string"},"status":{"description":"The status value set — shared with the `b2b/organization/cost-center-*` actions so the vocabulary has a single source.","type":"string","enum":["active","inactive"]}},"required":["name"],"id":"action:b2b_organization_cost-center-create:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"id":{"description":"The ID of the created cost center.","type":"string"}},"required":["id"],"additionalProperties":false,"id":"action:b2b_organization_cost-center-create:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/cost-center-create \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationCostCenterCreateAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationCostCenterCreateAction);
await mutate(input);
```

### OrganizationCostCenterUpdateAction `b2b/organization/cost-center-update`

```ts
import { OrganizationCostCenterUpdateAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"costCenterId":{"type":"string"},"name":{"type":"string"},"description":{"description":"Free-text description (`CostCenterInfo.description`).","type":"string"},"status":{"description":"The status value set — shared with the `b2b/organization/cost-center-*` actions so the vocabulary has a single source.","type":"string","enum":["active","inactive"]}},"required":["costCenterId"],"id":"action:b2b_organization_cost-center-update:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_cost-center-update:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/cost-center-update \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationCostCenterUpdateAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationCostCenterUpdateAction);
await mutate(input);
```

### OrganizationCostCenterDeleteAction `b2b/organization/cost-center-delete`

```ts
import { OrganizationCostCenterDeleteAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"costCenterId":{"type":"string"}},"required":["costCenterId"],"id":"action:b2b_organization_cost-center-delete:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_cost-center-delete:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/cost-center-delete \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationCostCenterDeleteAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationCostCenterDeleteAction);
await mutate(input);
```

## Budgets

### OrganizationBudgetCreateAction `b2b/organization/budget-create`

```ts
import { OrganizationBudgetCreateAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"name":{"type":"string"},"period":{"type":"string"},"limit":{"$ref":"#/definitions/Money"},"status":{"description":"The status value set — shared with the `b2b/organization/budget-*` actions so the vocabulary has a single source.","type":"string","enum":["active","inactive"]},"description":{"description":"Free-text description (`BudgetInfo.description`).","type":"string"},"approverEmployeeId":{"type":"string"},"notificationThreshold":{"description":"Consumption percentage at which a notification is sent (`BudgetAllowance.notificationThreshold`).","type":"number","minimum":0,"maximum":100}},"required":["name","period","limit"],"id":"action:b2b_organization_budget-create:input","definitions":{"Money":{"description":"A Money object describes a monetary value. You can use e.g. `@screeny05/ts-money` to create and manipulate Money objects more elegantly.","title":"Money","id":"Money","type":"object","properties":{"amount":{"description":"Amount in smallest unit of currency. E.g. cents, pence, etc.","type":"number"},"currency":{"description":"ISO 4217 currency code. E.g. 'USD', 'EUR', 'GBP', etc.","type":"string"}},"required":["amount","currency"]}}}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"id":{"description":"The ID of the created budget.","type":"string"}},"required":["id"],"additionalProperties":false,"id":"action:b2b_organization_budget-create:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/budget-create \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationBudgetCreateAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationBudgetCreateAction);
await mutate(input);
```

### OrganizationBudgetUpdateAction `b2b/organization/budget-update`

```ts
import { OrganizationBudgetUpdateAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"budgetId":{"type":"string"},"name":{"type":"string"},"period":{"type":"string"},"limit":{"allOf":[{"$ref":"#/definitions/Money"}]},"status":{"description":"The status value set — shared with the `b2b/organization/budget-*` actions so the vocabulary has a single source.","type":"string","enum":["active","inactive"]},"description":{"description":"Free-text description (`BudgetInfo.description`).","type":"string"},"approverEmployeeId":{"type":"string"},"notificationThreshold":{"description":"Consumption percentage at which a notification is sent (`BudgetAllowance.notificationThreshold`).","type":"number","minimum":0,"maximum":100}},"required":["budgetId"],"id":"action:b2b_organization_budget-update:input","definitions":{"Money":{"description":"A Money object describes a monetary value. You can use e.g. `@screeny05/ts-money` to create and manipulate Money objects more elegantly.","title":"Money","id":"Money","type":"object","properties":{"amount":{"description":"Amount in smallest unit of currency. E.g. cents, pence, etc.","type":"number"},"currency":{"description":"ISO 4217 currency code. E.g. 'USD', 'EUR', 'GBP', etc.","type":"string"}},"required":["amount","currency"]}}}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_budget-update:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/budget-update \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationBudgetUpdateAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationBudgetUpdateAction);
await mutate(input);
```

### OrganizationBudgetDeleteAction `b2b/organization/budget-delete`

```ts
import { OrganizationBudgetDeleteAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"budgetId":{"type":"string"}},"required":["budgetId"],"id":"action:b2b_organization_budget-delete:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_budget-delete:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/budget-delete \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationBudgetDeleteAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationBudgetDeleteAction);
await mutate(input);
```

## Customer product numbers

### OrganizationProductNumberGetAllAction `b2b/organization/product-number-get-all`

```ts
import { OrganizationProductNumberGetAllAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"null","id":"action:b2b_organization_product-number-get-all:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"productNumbers":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"variantId":{"description":"The variant the reference is for — the natural key of the mapping.","type":"string"},"productNumber":{"description":"The shop's product number (SKU) of the variant.","type":"string"},"number":{"description":"The customer's own product number for this variant (`ProductVariantCustomerReference.number`).","type":"string"},"name":{"description":"The customer's own name for this product, where provided.","type":"string"},"productName":{"description":"Display name of the product.","type":"string"}},"required":["variantId","number"],"additionalProperties":false}}},"required":["productNumbers"],"additionalProperties":false,"id":"action:b2b_organization_product-number-get-all:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/product-number-get-all \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationProductNumberGetAllAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationProductNumberGetAllAction);
await mutate(input);
```

### OrganizationProductNumberSetAction `b2b/organization/product-number-set`

```ts
import { OrganizationProductNumberSetAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"productId":{"type":"string"},"variantId":{"description":"The variant the reference is for — the natural key of the mapping.","type":"string"},"number":{"description":"The customer's own product number for this variant (`ProductVariantCustomerReference.number`; SAP `KDMAT`).","type":"string"},"name":{"description":"The customer's own name for this product, where supported (`ProductVariantCustomerReference.name`; SAP `POSTX`).","type":"string"}},"required":["variantId","number"],"id":"action:b2b_organization_product-number-set:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_product-number-set:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/product-number-set \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationProductNumberSetAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationProductNumberSetAction);
await mutate(input);
```

### OrganizationProductNumberDeleteAction `b2b/organization/product-number-delete`

```ts
import { OrganizationProductNumberDeleteAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"variantId":{"description":"The variant whose customer product number is removed — the natural key of the mapping.","type":"string"}},"required":["variantId"],"id":"action:b2b_organization_product-number-delete:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_organization_product-number-delete:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/organization/product-number-delete \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { OrganizationProductNumberDeleteAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(OrganizationProductNumberDeleteAction);
await mutate(input);
```

## Quotes

### QuoteRequestAction `b2b/quote/request`

```ts
import { QuoteRequestAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"comment":{"description":"Free-text message from the buyer accompanying the request.","type":"string"},"purchaseOrderNumber":{"description":"The buyer's purchase order number for this quote.","type":"string"}},"id":"action:b2b_quote_request:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"id":{"description":"The ID of the created quote (request).","type":"string"},"status":{"type":"string"},"statusLabel":{"description":"Connector-resolved display label for the status.","type":"string"}},"required":["id","status"],"additionalProperties":false,"id":"action:b2b_quote_request:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/quote/request \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { QuoteRequestAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(QuoteRequestAction);
await mutate(input);
```

### QuoteAcceptAction `b2b/quote/accept`

```ts
import { QuoteAcceptAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"quoteId":{"description":"The ID of the quote to accept.","type":"string"}},"required":["quoteId"],"id":"action:b2b_quote_accept:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_quote_accept:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/quote/accept \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { QuoteAcceptAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(QuoteAcceptAction);
await mutate(input);
```

### QuoteDeclineAction `b2b/quote/decline`

```ts
import { QuoteDeclineAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"quoteId":{"description":"The ID of the quote to decline.","type":"string"},"comment":{"description":"Free-text reason for declining.","type":"string"}},"required":["quoteId"],"id":"action:b2b_quote_decline:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_quote_decline:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/quote/decline \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { QuoteDeclineAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(QuoteDeclineAction);
await mutate(input);
```

### QuoteRequestChangeAction `b2b/quote/request-change`

```ts
import { QuoteRequestChangeAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"quoteId":{"description":"The ID of the quote to renegotiate.","type":"string"},"comment":{"description":"Free-text description of the requested change.","type":"string"}},"required":["quoteId"],"id":"action:b2b_quote_request-change:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_quote_request-change:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/quote/request-change \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { QuoteRequestChangeAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(QuoteRequestChangeAction);
await mutate(input);
```

### QuoteCancelAction `b2b/quote/cancel`

```ts
import { QuoteCancelAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"quoteId":{"description":"The ID of the quote request to withdraw.","type":"string"},"comment":{"description":"Free-text reason for withdrawing.","type":"string"}},"required":["quoteId"],"id":"action:b2b_quote_cancel:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_quote_cancel:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/quote/cancel \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { QuoteCancelAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(QuoteCancelAction);
await mutate(input);
```

### QuoteGetCheckoutUrlAction `b2b/quote/get-checkout-url`

```ts
import { QuoteGetCheckoutUrlAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"quoteId":{"description":"The ID of the (accepted) quote to check out.","type":"string"}},"required":["quoteId"],"id":"action:b2b_quote_get-checkout-url:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"checkoutUrl":{"type":"string"}},"required":["checkoutUrl"],"additionalProperties":false,"id":"action:b2b_quote_get-checkout-url:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/quote/get-checkout-url \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { QuoteGetCheckoutUrlAction } from '@laioutr-core/canonical-types/b2b';

const { data, status } = useQueryAction(QuoteGetCheckoutUrlAction);
```

## Approval flows

### ApprovalFlowDecideAction `b2b/approval-flow/decide`

```ts
import { ApprovalFlowDecideAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"approvalId":{"type":"string"},"decision":{"type":"string","enum":["approve","reject"]},"comment":{"description":"Free-text note by the approver.","type":"string"}},"required":["approvalId","decision"],"id":"action:b2b_approval-flow_decide:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_approval-flow_decide:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/approval-flow/decide \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { ApprovalFlowDecideAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(ApprovalFlowDecideAction);
await mutate(input);
```

## Cart sharing

### CartShareSetAction `b2b/cart/share-set`

```ts
import { CartShareSetAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"cartId":{"description":"The cart to share. Absent ⇒ the current session's active cart.","type":"string"},"employeeId":{"description":"The employee to share the cart with — the natural key of the grant.","type":"string"},"permission":{"type":"string"}},"required":["employeeId","permission"],"id":"action:b2b_cart_share-set:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_cart_share-set:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/cart/share-set \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { CartShareSetAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(CartShareSetAction);
await mutate(input);
```

### CartShareGetAllAction `b2b/cart/share-get-all`

```ts
import { CartShareGetAllAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"cartId":{"description":"The cart to inspect. Absent ⇒ the current session's active cart.","type":"string"}},"id":"action:b2b_cart_share-get-all:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"shares":{"type":"array","items":{"type":"object","properties":{"employeeId":{"description":"The employee the cart is shared with — the natural key of the grant.","type":"string"},"employeeLabel":{"description":"Connector-resolved display label for the employee.","type":"string"},"permission":{"type":"string"},"permissionLabel":{"description":"Connector-resolved display label for the permission level.","type":"string"}},"required":["employeeId","permission"],"additionalProperties":false}}},"required":["shares"],"additionalProperties":false,"id":"action:b2b_cart_share-get-all:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/cart/share-get-all \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { CartShareGetAllAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(CartShareGetAllAction);
await mutate(input);
```

### CartShareDeleteAction `b2b/cart/share-delete`

```ts
import { CartShareDeleteAction } from '@laioutr-core/canonical-types/b2b';
```

#### Input

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"cartId":{"description":"The cart the share is on. Absent ⇒ the current session's active cart.","type":"string"},"employeeId":{"description":"The employee whose share is revoked — the natural key of the grant.","type":"string"}},"required":["employeeId"],"id":"action:b2b_cart_share-delete:input"}
```

#### Output

```json
{"$schema":"http://json-schema.org/draft-07/schema#","id":"action:b2b_cart_share-delete:output"}
```

#### Usage

```bash
curl -X POST http://localhost:3000/api/orchestr/action/b2b/cart/share-delete \
  -H "Content-Type: application/json" \
  -d '{ "input": ... }'
```

```vue
import { CartShareDeleteAction } from '@laioutr-core/canonical-types/b2b';

const { mutate, status } = useMutationAction(CartShareDeleteAction);
await mutate(input);
```
