# Allocate Inventory

## Allocate Inventory

The Allocate Inventory API allows an organization to move inventory to its sub organizations in the following way:

* In both directions – up or down
* From any organization to any child organization
* Using a single value (start values)
* Using ranges (start and end values)
* The case, box, bundle and retail pack numbers depend on the way the cards were initial created in the system using the Process Order API (Not in this documents scope).

## Input Parameters:

| Name            | Required | Definition                                                                                                                          | Comments |
| --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- | -------- |
| FromEntityName  | Y        | <p>Format: Alphanumeric, 60<br>Description: name of org/user/store/terminal</p>                                                     |          |
| FromEntityType  | Y        | <p>Format: Alphanumeric, 20<br>Description:ORGANZATION, STORE, USER or TERMINAL<br>Defines what kind of limit should be updated</p> |          |
| EndBoxId        | N        | Format: Alphanumeric, 20                                                                                                            |          |
| EndBundleId     | N        | Format: Alphanumeric, 20                                                                                                            |          |
| EndCaseId       | N        | Format: Alphanumeric, 20                                                                                                            |          |
| EndRetailPackId | Y        | <p>Format: Pattern: 12-5-1-1.<br>1..12digits-1..5digits-1digit-1 digit</p>                                                          |          |
| RetailPackId    | Y        | <p>Format: Pattern: 12-5-1-1.<br>1..12digits-1..5digits-1digit-1 digit<br>Description: Praxell Retail pack identifier</p>           |          |
| StartBoxId      | Y        | Format: Alphanumeric, 20                                                                                                            |          |
| StartBundleId   | Y        | Format: Alphanumeric, 20                                                                                                            |          |
| StartCaseId     | Y        | Format: Alphanumeric, 20                                                                                                            |          |
| ToEntityName    | Y        | <p>Format: Alphanumeric, 60<br>Description: name of org/user/store/terminal<br>ORGANIZATION</p>                                     |          |
| ToEntityType    | Y        | <p>Format: Alphanumeric, 20<br>Description:ORGANZATION, STORE, USER or TERMINAL<br>Defines what kind of limit should be updated</p> |          |

## Output Parameters:

## XML Samples

### Input XML

```json
<?xml version="1.0" ?>
<PraxellXMLRequest>
  <AuthenticationDetails>
    <UserName>FE_PM_MGR</UserName>
    <UserPassword>1q2w3e4r</UserPassword>
    <ClientSourceIP></ClientSourceIP> 
 </AuthenticationDetails>;
  <ServiceDetails>
    <ServiceName>AllocateInventory</ServiceName>
    <UniqueRequestId>1211757445</UniqueRequestId>
  </ServiceDetails>
  <Origin>
    <OriginType>ExtAPI</OriginType>
  </Origin>
  <ServiceParams>
    <FromEntityName>FE PM 0001</FromEntityName>
    <FromEntityType>ORGANIZATION</FromEntityType>
    <ToEntityName>FE_MER_01</ToEntityName>
    <ToEntityType>ORGANIZATION</ToEntityType>
    <RetailPackId>38065</RetailPackId>
    <EndRetailPackId>38065</EndRetailPackId>
    <StartCaseId></StartCaseId>
    <EndCaseId></EndCaseId>
    <StartBoxId></StartBoxId>
    <EndBoxId></EndBoxId>
    <StartBundleId></StartBundleId>
    <EndBundleId></EndBundleId>
  </ServiceParams>
</PraxellXMLRequest>
```

```json
<?xml version="1.0"?>
   <PraxellXMLResponse>
     <ResponseDetails>
        <ServiceName>AllocateInventory</ServiceName>
        <SessionId>74038908200828014</SessionId>
        <StatusCode>0</StatusCode>
        <StatusName>StatusOK</StatusName>
        <StatusDescription>NA</StatusDescription>
        <ServiceDate>2008-01-20 08:28:47</ServiceDate>
        <ServiceId>74038908200828014</ServiceId>
    </ResponseDetails>
   <ResponseParams>
   </ResponseParams>
</PraxellXMLResponse>
```

```json
<?xml version="1.0"?>
<PraxellXMLResponse>
  <ResponseDetails>
    <ServiceName>AllocateInventory</ServiceName>
    <SessionId>07071612200737105</SessionId>
    <StatusCode>70029</StatusCode>
    <StatusName>Data not found (cardholder not found)</StatusName>
    <StatusDescription>Data not found (cardholder not found)</StatusDescription>
    <ServiceDate>2021-10-01 12:37:50</ServiceDate>
    <ServiceId>07071612200737105</ServiceId>
  </ResponseDetails>
  <ResponseParams>
  </ResponseParams>
</PraxellXMLResponse>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.juicefin.com/apis/administration/allocate-inventory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
