# Manage Order

## Manage Order

The Manage Order API allow to manage orders from creation stage to completion stage

## Input Parameters:

| Name                        | Required | Definition                                                                                                                                                                                                                                                                                                                   | Comments                                                                                                                                                                         |
| --------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ApprovedBy                  | Y        | Format: Alphanumeric, 30                                                                                                                                                                                                                                                                                                     | Relevant for Event values of: APPROVE\_ORDER                                                                                                                                     |
| CardsBoxesInCases           | Y        | Format: Numeric, 2                                                                                                                                                                                                                                                                                                           | Relevant for Event values of: CREATE\_ORDER                                                                                                                                      |
| CardsBoxesInCasesReceived   | Y        | Format: Numeric, 2                                                                                                                                                                                                                                                                                                           | Relevant for Event values of: COMPLETE\_ORDER                                                                                                                                    |
| CardsBundlesInBox           | Y        | Format: Numeric, 2                                                                                                                                                                                                                                                                                                           | Relevant for Event values of: CREATE\_ORDER                                                                                                                                      |
| CardsBundlesInBoxReceived   | Y        | Format: Numeric, 2                                                                                                                                                                                                                                                                                                           | Relevant for Event values of: COMPLETE\_ORDER                                                                                                                                    |
| CardsNumberInBundle         | Y        | Format: Numeric, 2                                                                                                                                                                                                                                                                                                           | Relevant for Event values of: CREATE\_ORDER                                                                                                                                      |
| CardsNumberInBundleReceived | Y        | Format: Numeric, 2                                                                                                                                                                                                                                                                                                           | Relevant for Event values of: COMPLETE\_ORDER                                                                                                                                    |
| CompletionDescription       | N        | <p>Format: 1-500,<br>supported characters: Blank a-z A-Z 0-9 . , # $ ( ) / : ? - % + \*</p>                                                                                                                                                                                                                                  | & ; @ ! \~ = \_ \ '                                                                                                                                                              |
| Description                 | N        | <p>Format: 1-500,<br>supported characters: Blank a-z A-Z 0-9 . , # $ ( ) / : ? - % + \*</p>                                                                                                                                                                                                                                  | & ; @ ! \~ = \_ \ '                                                                                                                                                              |
| Event                       | Y        | <p>Options:<br>CREATE\_ORDER,<br>MANUAL\_CREATE\_CARDS,<br>APPROVE\_ORDER,<br>COMPLETE\_ORDER,<br>CREATE\_CARDS,<br>MANUAL\_CREATE\_CARDS,<br>CANCEL\_ORDER,<br>DECLINE\_ORDER,<br>FAILURE,<br>GET\_ORDER\_INITIAL\_VALUES</p>                                                                                               | Relevant for all events                                                                                                                                                          |
| FromCase                    | O        | Format: Alphanumeric, 20                                                                                                                                                                                                                                                                                                     | Relevant for Event values of: MANUAL\_CREATE\_CARDS                                                                                                                              |
| FromCaseReceived            | Y        | Format: Alphanumeric, 20                                                                                                                                                                                                                                                                                                     | Relevant for Event values of: COMPLETE\_ORDER                                                                                                                                    |
| FromRPID                    | O        | Format: Numeric, 1-19                                                                                                                                                                                                                                                                                                        | Relevant for Event values of: MANUAL\_CREATE\_CARDS                                                                                                                              |
| FromRPIDReceived            | Y        | Format: Numeric, 1-19                                                                                                                                                                                                                                                                                                        | Relevant for Event values of: COMPLETE\_ORDER                                                                                                                                    |
| Message                     | N        | Format: 1-500, supported characters: Blank a-z A-Z 0-9 . , # $ ( ) / : ? - % + \*                                                                                                                                                                                                                                            | & ; @ ! \~ = \_ \ '                                                                                                                                                              |
| NamePrinted                 | Y        | Format: 2-26, alpha. Can contains as well space                                                                                                                                                                                                                                                                              | Relevant for Event values of: CREATE\_ORDER, APPROVE\_ORDER                                                                                                                      |
| OrderArrivalDate            | Y        | Format: YYYY-MM-DD                                                                                                                                                                                                                                                                                                           | Relevant for Event values of: COMPLETE\_ORDER                                                                                                                                    |
| OrderID                     | Y        | Format: Alphanumeric, 20                                                                                                                                                                                                                                                                                                     | Relevant for Event values of: APPROVE\_ORDER, APPROVE\_ORDER, COMPLETE\_ORDER, COMPLETE\_ORDER, CREATE\_CARDS, MANUAL\_CREATE\_CARDS, CANCEL\_ORDER , DECLINE\_ORDER , \~FAILURE |
| OrderShippingDestination    | Y        | Options: PM/Distributor/DistributorShipping/Reseller by default: None                                                                                                                                                                                                                                                        | Relevant for Event values of: CREATE\_ORDER                                                                                                                                      |
| PackageSafetyReceived       | Y        | Format: Y/N                                                                                                                                                                                                                                                                                                                  | Relevant for Event values of: COMPLETE\_ORDER                                                                                                                                    |
| PT                          | Y        | <p>Format: Alphanumeric, 1-120<br>Description: Each sub program in Praxell consists of one or more product types.<br>A product type is a set of attributes that are applied to the cards that belong to this product type.<br>The ProductTypeName field is the name of the product used when creating and issuing cards.</p> | Relevant for Event values of: CREATE\_ORDER, GET\_ORDER\_INITIAL\_VALUES                                                                                                         |
| RequestedCards              | Y        | Format: numeric, 6                                                                                                                                                                                                                                                                                                           | Relevant for Event values of: CREATE\_ORDER,APPROVE\_ORDER                                                                                                                       |
| RequestedCardsReceived      | Y        | Format: numeric, 6                                                                                                                                                                                                                                                                                                           | Relevant for Event values of: COMPLETE\_ORDER                                                                                                                                    |
| ResellerName                | N        | Format: Alphanumeric, 1-30                                                                                                                                                                                                                                                                                                   | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES, CREATE\_ORDER                                                                                                         |
| ShippingAddress1            | Y        | <p>Format: Alphanumeric, 30<br>Can contains as well all special characters beside: <, ></p>                                                                                                                                                                                                                                  | Relevant for Event Event of: CREATE\_ORDER                                                                                                                                       |
| ShippingAddress2            | Y        | <p>Format: Alphanumeric, 30<br>Can contains as well all special characters beside: <, ></p>                                                                                                                                                                                                                                  | Relevant for Event values of: CREATE\_ORDER                                                                                                                                      |
| ShippingCity                | Y        | <p>Format: Alpha, 1-20<br>Can contains as well these special characters: /, -, space, comma, period,</p>                                                                                                                                                                                                                     | Relevant for Event values of: CREATE\_ORDER                                                                                                                                      |
| ShippingCompany             | Y        | Format: Alphanumeric, 40                                                                                                                                                                                                                                                                                                     | Relevant for Event values of: CREATE\_ORDER                                                                                                                                      |
| ShippingState               | Y        | Format: Alphanumeric, 2                                                                                                                                                                                                                                                                                                      | Relevant for Event values of: CREATE\_ORDER                                                                                                                                      |
| ShippingZip                 | Y        | Format: Numeric, 5                                                                                                                                                                                                                                                                                                           | Relevant for Event values of: CREATE\_ORDER                                                                                                                                      |
| ToCase                      | O        | Format: Alphanumeric, 20                                                                                                                                                                                                                                                                                                     | Relevant for Event values of: MANUAL\_CREATE\_CARDS                                                                                                                              |
| ToCaseReceived              | Y        | Format: Alphanumeric, 20                                                                                                                                                                                                                                                                                                     | Relevant for Event values of: COMPLETE\_ORDER                                                                                                                                    |
| ToRPID                      | O        | Format: Numeric, 1-19                                                                                                                                                                                                                                                                                                        | Relevant for Event values of: MANUAL\_CREATE\_CARDS                                                                                                                              |
| ToRPIDReceived              | Y        | Format: Numeric, 1-19                                                                                                                                                                                                                                                                                                        | Relevant for Event values of: COMPLETE\_ORDER                                                                                                                                    |

## Output Parameters:

| Name                                | Definition                                                                                               | Failure Case | Success Case | Comments                                                  |
| ----------------------------------- | -------------------------------------------------------------------------------------------------------- | ------------ | ------------ | --------------------------------------------------------- |
| BIN                                 | <p>Format: Numeric, 9<br>Description: includes BIN (6) and SUBBIN (3)</p>                                | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| CardsBoxesInCases                   | Format: Numeric, 2                                                                                       | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| CardsBundlesInBox                   | Format: Numeric, 2                                                                                       | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| CardsNumberInBundle                 | Format: Numeric, 2                                                                                       | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| ExistingInventoryCards              | Format: Numeric, 7                                                                                       | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| ExpirationDate                      | Format: MMYY                                                                                             | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| InvoiceFile                         | Format: Binary (provided in PDF file format)                                                             | Not returned | Returned     | Relevant for Event values of: CREATE\_ORDER               |
| FFHouseName                         | Format: Alphanumeric 50                                                                                  | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| IncompletedPreviousOrderIDForPT     | Format: Alphanumeric, 30                                                                                 | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| IncompletedPreviousOrderStatusForPT | Format: Alphanumeric, 30                                                                                 | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| NamePrintedOnCard                   | Format: 2-26, alpha. Can contains as well space                                                          | Not returned | Returned     |                                                           |
| OrderShippingDestination            | Options: PM/Distributor/DistributorShipping/Reseller by default: None                                    | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| ShippingAddress1                    | <p>Format: Alphanumeric, 30<br>Can contains as well all special characters beside: <, ></p>              | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| ShippingAddress2                    | <p>Format: Alphanumeric, 30<br>Can contains as well all special characters beside: <, ></p>              | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| ShippingCity                        | <p>Format: Alpha, 1-20<br>Can contains as well these special characters: /, -, space, comma, period,</p> | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| ShippingCompany                     | Format: Alphanumeric, 40                                                                                 | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| ShippingState                       | Format: Alphanumeric, 2                                                                                  | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| ShippingType                        | Format: Alphanumeric 20                                                                                  | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| ShippingZip                         | Format: Numeric, 5                                                                                       | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| SUBBIN                              | Format: Numeric, 3                                                                                       | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |
| TotalDistributorPendingOrders       | Format: Numeric, 2                                                                                       | Not returned | Returned     | Relevant for Event values of: GET\_ORDER\_INITIAL\_VALUES |

## XML Samples

### Input XML

```json
Create order:
<?xml version="1.0" ?>
<PraxellXMLRequest>
    <AuthenticationDetails>
        <UserName>test_sad1</UserName>
        <UserPassword>test_sad</UserPassword>
    </AuthenticationDetails>
    <ServiceDetails>
        <ServiceName>ManageOrder</ServiceName>
        <UniqueRequestId>1212121212121213</UniqueRequestId>
    </ServiceDetails>
    <Origin>
        <OriginType>ExtApi</OriginType>
    </Origin>
    <ServiceParams>
        <EventName>CREATE_ORDER</EventName>
        <CardsNumber>10</CardsNumber>
        <Description>Test create order</Description>
        <OrderShippingDestination>PM</OrderShippingDestination>
        <ShippingCompany>Praxell company</ShippingCompany>
        <ShippingAddress1>Broadway</ShippingAddress1>
        <ShippingAddress2>1200</ShippingAddress2>
        <ShippingCity>New York</ShippingCity>
        <ShippingState>NY</ShippingState>
        <ShippingZip>10001</ShippingZip>
        <PT>Z_Progreso STAR - Low Limit</PT>
        <BoxesInCases>2</BoxesInCases>
        <CardsInBundle>3</CardsInBundle>
        <BundlesInBox>4</BundlesInBox>
        <NamePrinted>My Name Cardholder</NamePrinted>
    </ServiceParams>
</PraxellXMLRequest>

Approve Order:
<?xml version="1.0" ?>
<PraxellXMLRequest>
    <AuthenticationDetails>
        <UserName>st_manager</UserName>
        <UserPassword>st_manager</UserPassword>
    </AuthenticationDetails>
    <ServiceDetails>
        <ServiceName>ManageOrder</ServiceName>
        <UniqueRequestId>1212121212121213</UniqueRequestId>
    </ServiceDetails>
    <Origin>
        <OriginType>ExtApi</OriginType>
    </Origin>
    <ServiceParams>
        <EventName>APPROVE_ORDER</EventName>
        <OrderId>1</OrderId>
        <CardsNumber>11</CardsNumber>
        <NamePrinted>Test Update name</NamePrinted>
        <FinanceApprovedBy>st_manager</FinanceApprovedBy>
        <BundlesInBox>2</BundlesInBox>
        <CardsInBundle>3</CardsInBundle>
        <BoxesInCases>1</BoxesInCases>
        <Description>Test approve</Description>
    </ServiceParams>
</PraxellXMLRequest>

Cancel Order:
<?xml version="1.0" ?>
<PraxellXMLRequest>
    <AuthenticationDetails>
        <UserName>test_sad1</UserName>
        <UserPassword>test_sad</UserPassword>
    </AuthenticationDetails>
    <ServiceDetails>
        <ServiceName>ManageOrder</ServiceName>
        <UniqueRequestId>1212121212121213</UniqueRequestId>
    </ServiceDetails>
    <Origin>
        <OriginType>ExtApi</OriginType>
    </Origin>
    <ServiceParams>
        <EventName>CANCEL_ORDER</EventName>
        <OrderId>1</OrderId>
        <Description>Test cancel</Description>
    </ServiceParams>
</PraxellXMLRequest>
Complete:
<?xml version="1.0" ?>
<PraxellXMLRequest>
    <AuthenticationDetails>
        <UserName>test_sad1</UserName>
        <UserPassword>test_sad</UserPassword>
    </AuthenticationDetails>
    <ServiceDetails>
        <ServiceName>ManageOrder</ServiceName>
        <UniqueRequestId>1212121212121213</UniqueRequestId>
    </ServiceDetails>
    <Origin>
        <OriginType>ExtApi</OriginType>
    </Origin>
    <ServiceParams>
       <EventName>COMPLETE_ORDER</EventName>
        <OrderId>2</OrderId>
        <Description>Test complete order</Description>
        <FromCaseReceived>10</FromCaseReceived>
        <ToCaseReceived>12</ToCaseReceived>
        <FromRPIDReceived>12</FromRPIDReceived>
        <ToRPIDReceived>120</ToRPIDReceived>
        <CardsInBundleReceived>6</CardsInBundleReceived>
        <BoxesInCasesReceived>8</BoxesInCasesReceived>
        <BundlesInBoxReceived>7</BundlesInBoxReceived>
        <OrderArrivalDate>2013-12-22</OrderArrivalDate>
        <CardsNumberReceived>222</CardsNumberReceived>
        <PackageSafetyReceived>Y</PackageSafetyReceived>
    </ServiceParams>
</PraxellXMLRequest>

Manual Create Cards:
<?xml version="1.0" ?>
<PraxellXMLRequest>
    <AuthenticationDetails>
        <UserName>st_manager</UserName>
        <UserPassword>st_manager</UserPassword>
    </AuthenticationDetails>
    <ServiceDetails>
        <ServiceName>ManageOrder</ServiceName>
        <UniqueRequestId>1212121212121213</UniqueRequestId>
    </ServiceDetails>
    <Origin>
        <OriginType>ExtApi</OriginType>
    </Origin>
    <ServiceParams>
        <EventName>MANUAL_CREATE_CARDS</EventName>
        <OrderId>2</OrderId>
        <Description>Test man create cards order</Description>
        <FromRPID>12</FromRPID>
        <ToRPID>211</ToRPID>
        <FromCase>12</FromCase>
        <ToCase>14</ToCase>
    </ServiceParams>
</PraxellXMLRequest>

Get Order Initial Values:
<?xml version="1.0" ?>
<PraxellXMLRequest>
    <AuthenticationDetails>
        <UserName>test_sad1</UserName>
        <UserPassword>test_sad</UserPassword>
    </AuthenticationDetails>
    <ServiceDetails>
        <ServiceName>ManageOrder</ServiceName>
        <UniqueRequestId>1212121212121213</UniqueRequestId>
    </ServiceDetails>
    <Origin>
        <OriginType>ExtApi</OriginType>
    </Origin>
    <ServiceParams>
        <EventName>GET_ORDER_INITIAL_VALUES</EventName>
        <PT>Z_Progreso STAR - Low Limit</PT>
    </ServiceParams>
</PraxellXMLRequest>

Decline Order:
<?xml version="1.0" ?>
<PraxellXMLRequest>
    <AuthenticationDetails>
      <UserName>stmanager</UserName>
      <UserPassword>st_manager</UserPassword>
    </AuthenticationDetails>
    <ServiceDetails>
        <ServiceName>ManageOrder</ServiceName>
        <UniqueRequestId>1212121212121213</UniqueRequestId>
    </ServiceDetails>
    <Origin>
        <OriginType>ExtApi</OriginType>
    </Origin>
    <ServiceParams>
        <EventName>DECLINE_ORDER</EventName>
        <OrderId>1</OrderId>
        <Description>Test decline</Description>
        <DeclineMessage>Test message</DeclineMessage>
    </ServiceParams>
</PraxellXMLRequest>
```

```json
Get Order Initial Values:
<?xml version="1.0"?>
<PraxellXMLResponse>
     <ResponseDetails>
        <ServiceName>ManageOrder</ServiceName>
        <SessionId>09ad8525-9148-4943-ab37-f1eba5153d33</SessionId>
        <StatusCode>0</StatusCode>
        <StatusName>StatusOK</StatusName>
        <StatusDescription>NA</StatusDescription>
        <ServiceDate>2013-12-29 14:00:02</ServiceDate>
        <ServiceId>09ad8525-9148-4943-ab37-f1eba5153d33</ServiceId>
    </ResponseDetails>
<ResponseParams>
  <ShippingDestination>DistributorShipping</ShippingDestination>
  <ShippingCompany>no name</ShippingCompany>
  <ShippingAddress1>ee_e</ShippingAddress1>
  <ShippingAddress2>bbb</ShippingAddress2>
  <ShippingCity>ccc</ShippingCity>
  <ShippingState>AK</ShippingState>
  <ShippingZip>11111</ShippingZip>
  <FulfillmentHouse>ArrowEye</FulfillmentHouse>
  <NamePrinted>Test Cardholder</NamePrinted>
  <ShippingType></ShippingType>
  <CardsInBundle>2</CardsInBundle>
  <BoxesInCases>4</BoxesInCases>
  <BundlesInBox>3</BundlesInBox>
  <SubBin>000</SubBin>
  <Bin>991909</Bin>
  <IncompletedPreviousOrderIDForPT></IncompletedPreviousOrderIDForPT>
  <IncompletedPreviousOrderStatusForPT></IncompletedPreviousOrderStatusForPT>
  <ExistingInventoryCards>9886</ExistingInventoryCards>
  <ExpirationDate></ExpirationDate>
  <TotalDistributorPendingOrders>7</TotalDistributorPendingOrders>
  <ProcessorIssuerID>999-222</ProcessorIssuerID>
</ResponseParams>
</PraxellXMLResponse>

All Others:
<?xml version="1.0"?>
<PraxellXMLResponse>
     <ResponseDetails>
        <ServiceName>ManageOrder</ServiceName>
        <SessionId>09ad8525-9148-4943-ab37-f1eba5153d33</SessionId>
        <StatusCode>0</StatusCode>
        <StatusName>StatusOK</StatusName>
        <StatusDescription>NA</StatusDescription>
        <ServiceDate>2013-12-29 14:00:02</ServiceDate>
        <ServiceId>09ad8525-9148-4943-ab37-f1eba5153d33</ServiceId>
    </ResponseDetails>
<ResponseParams></ResponseParams>
</PraxellXMLResponse>
```

```json
<?xml version="1.0"?>
<PraxellXMLResponse>
  <ResponseDetails>
    <ServiceName>ManageOrder</ServiceName>
    <SessionId>07071612200737105</SessionId>
    <StatusCode>80000</StatusCode>
    <StatusName>General error (no balance back from MV)</StatusName>
    <StatusDescription>General error (no balance back from MV)</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/manage-order.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.
