> ## Documentation Index
> Fetch the complete documentation index at: https://cantonfoundation-feature-integrate-google-analytics.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Splice.Api.Token.AllocationRequestV1

> Documentation for Splice.Api.Token.AllocationRequestV1

This module defines the interface for an `AllocationRequest`, which is an interface that can be implemented by an app to request specific allocations from their users for the purpose of settling a DvP or a payment as part of an app's workflow.

## Interfaces

<div id="type-splice-api-token-allocationrequestv1-allocationrequest-90278">
  **interface** AllocationRequest
</div>

> A request by an app for allocations to be created to enable the execution of a settlement.
>
> Apps are free to use a single request spanning all senders or one request per sender.
>
> **viewtype** AllocationRequestView
>
> * <div id="type-splice-api-token-allocationrequestv1-allocationrequestreject-89381">
>     **Choice** AllocationRequest\_Reject
>   </div>
>
>   Reject an allocation request.
>
>   Implementations SHOULD allow any sender of a transfer leg to reject the allocation request, and thereby signal that they are definitely not going to create a matching allocation for the settlement.
>
>   Controller: actor
>
>   Returns: ChoiceExecutionMetadata
>
>   | Field     | Type                                                                                    | Description                                                  |
>   | --------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
>   | actor     | [Party](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-party-57932) | The party rejecting the allocation request.                  |
>   | extraArgs | ExtraArgs                                                                               | Additional context required in order to exercise the choice. |
>
> * <div id="type-splice-api-token-allocationrequestv1-allocationrequestwithdraw-15628">
>     **Choice** AllocationRequest\_Withdraw
>   </div>
>
>   Withdraw an allocation request as the executor.
>
>   Used by executors to withdraw the allocation request if they are unable to execute it; e.g., because a trade has been cancelled.
>
>   Controller: (DA.Internal.Record.getField @"executor" (DA.Internal.Record.getField @"settlement" (view this)))
>
>   Returns: ChoiceExecutionMetadata
>
>   | Field     | Type      | Description                                                  |
>   | --------- | --------- | ------------------------------------------------------------ |
>   | extraArgs | ExtraArgs | Additional context required in order to exercise the choice. |
>
> * **Choice** Archive
>
>   Controller: Signatories of implementing template
>
>   Returns: ()
>
>   (no fields)
>
> * **Method allocationRequest\_RejectImpl :** [ContractId](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282) AllocationRequest -> AllocationRequest\_Reject -> [Update](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072) ChoiceExecutionMetadata
>
> * **Method allocationRequest\_WithdrawImpl :** [ContractId](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282) AllocationRequest -> AllocationRequest\_Withdraw -> [Update](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072) ChoiceExecutionMetadata

## Data Types

<div id="type-splice-api-token-allocationrequestv1-allocationrequestview-51417">
  **data** AllocationRequestView
</div>

> View of `AllocationRequest`.
>
> Implementations SHOULD make sure that at least all senders of the transfer legs are observers of the implementing contract, so that their wallet can show the request to them.
>
> <div id="constr-splice-api-token-allocationrequestv1-allocationrequestview-59188">
>   AllocationRequestView
> </div>
>
> > | Field        | Type                                                                                                    | Description                                                                                                                                                                                                                                                        |
> > | ------------ | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
> > | settlement   | SettlementInfo                                                                                          | Settlement for which the assets are requested to be allocated.                                                                                                                                                                                                     |
> > | transferLegs | [TextMap](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-textmap-11691) TransferLeg | Transfer legs that are requested to be allocated for the execution of the settlement keyed by their identifier. This may or may not be a complete list of transfer legs that are part of the settlement, depending on the confidentiality requirements of the app. |
> > | meta         | Metadata                                                                                                | Additional metadata specific to the allocation request, used for extensibility.                                                                                                                                                                                    |
>
> **instance** [Eq](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-classes-eq-22713) AllocationRequestView
>
> **instance** [Show](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-show-show-65360) AllocationRequestView
>
> **instance** [HasFromAnyView](https://docs.daml.com/daml/stdlib/DA-Internal-Interface-AnyView.html#class-da-internal-interface-anyview-hasfromanyview-30108) AllocationRequest AllocationRequestView
>
> **instance** [HasInterfaceView](https://docs.daml.com/daml/stdlib/Prelude.html#class-da-internal-interface-hasinterfaceview-4492) AllocationRequest AllocationRequestView
>
> **instance** [GetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-getfield-53979) "meta" AllocationRequestView Metadata
>
> **instance** [GetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-getfield-53979) "settlement" AllocationRequestView SettlementInfo
>
> **instance** [GetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-getfield-53979) "transferLegs" AllocationRequestView ([TextMap](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-textmap-11691) TransferLeg)
>
> **instance** [SetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-setfield-4311) "meta" AllocationRequestView Metadata
>
> **instance** [SetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-setfield-4311) "settlement" AllocationRequestView SettlementInfo
>
> **instance** [SetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-setfield-4311) "transferLegs" AllocationRequestView ([TextMap](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-textmap-11691) TransferLeg)

## Functions

<div id="function-splice-api-token-allocationrequestv1-allocationrequestrejectimpl-48931">
  allocationRequest\_RejectImpl
  : AllocationRequest -> [ContractId](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282) AllocationRequest -> AllocationRequest\_Reject -> [Update](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072) ChoiceExecutionMetadata
</div>

<div id="function-splice-api-token-allocationrequestv1-allocationrequestwithdrawimpl-31866">
  allocationRequest\_WithdrawImpl
  : AllocationRequest -> [ContractId](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282) AllocationRequest -> AllocationRequest\_Withdraw -> [Update](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072) ChoiceExecutionMetadata
</div>
