# Channels Channels represent a source or destination of different entities. They can be used to model warehouses or stores. Channels are used across the different APIs to connect different entities (like inventory or price) to some specific source or destination of entities. For example, inventory may be connected to a supply channel that would describe from which supplier a stock comes from. Price may also have connection to the channel. In this case, you can save the inventory pricing information from the specific channel into the system. Similarly, after the disposition process, line items can get supply channel information that would uniquely identify inventory entries that should be reserved. Learn more about Channels in our self-paced [Stores and Channels](/learning-model-your-business-structure/stores-and-channels/overview.md) module. ## Representations #### Channel [type definition](/api/projects/channels.md?urn=ctp:api:type:Channel). #### ChannelDraft [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelDraft). #### ChannelPagedQueryResponse [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelPagedQueryResponse). #### ChannelReference [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelReference). #### ChannelKeyReference [type definition](/api/projects/channels.md?urn=ctp:import:type:ChannelKeyReference). #### ChannelResourceIdentifier [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelResourceIdentifier). #### ChannelRoleEnum [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelRoleEnum). ## Get Channel ### Get Channel by ID [endpoint definition](/api/projects/channels.md?urn=ctp:api:endpoint:/\{projectKey}/channels/\{id}:GET). ### Get Channel by Key [endpoint definition](/api/projects/channels.md?urn=ctp:api:endpoint:/\{projectKey}/channels/key=\{key}:GET). ## Query Channels [endpoint definition](/api/projects/channels.md?urn=ctp:api:endpoint:/\{projectKey}/channels:GET). ## Check if Channel exists ### Check if Channel exists by ID [endpoint definition](/api/projects/channels.md?urn=ctp:api:endpoint:/\{projectKey}/channels/\{id}:HEAD). ### Check if Channel exists by Key [endpoint definition](/api/projects/channels.md?urn=ctp:api:endpoint:/\{projectKey}/channels/key=\{key}:HEAD). ### Check if Channel exists by Query Predicate [endpoint definition](/api/projects/channels.md?urn=ctp:api:endpoint:/\{projectKey}/channels:HEAD). ## Create Channel [endpoint definition](/api/projects/channels.md?urn=ctp:api:endpoint:/\{projectKey}/channels:POST). ## Update Channel ### Update Channel by ID [endpoint definition](/api/projects/channels.md?urn=ctp:api:endpoint:/\{projectKey}/channels/\{id}:POST). ### Update Channel by Key [endpoint definition](/api/projects/channels.md?urn=ctp:api:endpoint:/\{projectKey}/channels/key=\{key}:POST). ## Update actions #### Change Key [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelChangeKeyAction). #### Change Name [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelChangeNameAction). #### Change Description [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelChangeDescriptionAction). #### Set Roles [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelSetRolesAction). #### Add Roles [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelAddRolesAction). #### Remove Roles [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelRemoveRolesAction). #### Set Address [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelSetAddressAction). #### Set Custom Type [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelSetCustomTypeAction). #### Set CustomField [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelSetCustomFieldAction). #### Set Custom Type in Address [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelSetAddressCustomTypeAction). #### Set CustomField in Address [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelSetAddressCustomFieldAction). #### Set GeoLocation [type definition](/api/projects/channels.md?urn=ctp:api:type:ChannelSetGeoLocationAction). ## Delete Channel A Channel can only be deleted if it is not referenced by an [InventoryEntry](/urn?urn=ctp%3Aapi%3Atype%3AInventoryEntry), a [LineItem](/urn?urn=ctp%3Aapi%3Atype%3ALineItem), a [Store](/urn?urn=ctp%3Aapi%3Atype%3AStore), a [Price](/api/types.md#price), a [StandalonePrice](/urn?urn=ctp%3Aapi%3Atype%3AStandalonePrice), or a [CartDiscountValueGiftLineItem](/urn?urn=ctp%3Aapi%3Atype%3ACartDiscountValueGiftLineItem). To avoid dependency conflicts and errors, delete resources that reference the Channel in the correct order before deleting the Channel itself. You must delete all active and anonymous [Carts](/api/projects/carts.md#delete-cart) that reference the Channel first, then delete the [Orders](/api/projects/orders.md#delete-order) that reference the Channel, and finally delete the [Stores](/api/projects/stores.md#delete-store) that reference the Channel before you can safely delete the Channel itself. ### Delete Channel by ID [endpoint definition](/api/projects/channels.md?urn=ctp:api:endpoint:/\{projectKey}/channels/\{id}:DELETE). ### Delete Channel by Key [endpoint definition](/api/projects/channels.md?urn=ctp:api:endpoint:/\{projectKey}/channels/key=\{key}:DELETE). ## Related pages - [Area overview page with navigation](/api.md) - [Previous page: Project](/api/projects/project.md) - [Next page: Stores](/api/projects/stores.md)