Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction

The purpose of this service is to save new fusion orders to Vision database,

Request

Request URL POST : https://<pathtoapi>/service/FusionOrder

POST Body structure :

 Request body sample
<?xml version="1.0" encoding="UTF-8"?>
<FUSIONS>
    <FO>
        <FH>
            <OCustomer>015</OCustomer>
            <OSite>CO</OSite>
            <DocRef>FU_1</DocRef>
            <Date>17/11/2015</Date>
            <OPCode>REDWINEFUSIONFINAL</OPCode>
            <OUnits>900</OUnits>
            <OSubUnits>0</OSubUnits>
            <OLocation>TANK D1</OLocation>
        </FH>
        <FD>
            <DPPCode>REDWINEFUSIONDP</DPPCode>
            <DPUnits>800</DPUnits>
            <DPSubUnits>4</DPSubUnits>
            <ExciseDefer>EXDEF</ExciseDefer>
            <CustomsDefer>CUSDEF</CustomsDefer>
        </FD>
        <SC>
            <SCustomer>015</SCustomer>
            <SSite>CO</SSite>
            <SPCode>BASEREDWINE</SPCode>
            <Rotation>15/D000649</Rotation>
            <RotationLn></RotationLn>
            <SUnits>300</SUnits>
            <SSubUnits>0</SSubUnits>
        </SC>
        <SC>
            <SCustomer>POL</SCustomer>
            <SSite>CO</SSite>
            <SPCode>ETHANOL</SPCode>
            <Rotation>15/0000556</Rotation>
            <RotationLn></RotationLn>
            <SUnits>48</SUnits>
            <SSubUnits>8</SSubUnits>
        </SC>
    </FO> 
</FUSIONS>

Response

Response body will have new tag <RES> attached with input XML which will have information about the response.

<RES>
       <Code></Code> 
       <Message></Message>
</RES>

Code will be 200 or 400, 200 is for success, if the code is 400 node <Message> will have reason for failure

HTTP Response Codes

Code

Message

200

OK, All request processed

406

Input XML validation failed, response body will have reason for failure

429

API access restricted (Exceeded the rate limit / access not allowed)

207

Multi-Status, <RES> tag have more information

400

Request processing all record failed, <RES> tag have more information

Response samples

Code : 200

<FUSIONS>
    <FO>
        <FH>
            <DocRef>FU_1</DocRef>
        </FH>
        <RES>
            <Code>400</Code>
            <Message>Fusion order processed</Message>
        </RES>
    </FO>
 </FUSIONS>

Code : 207

<FUSIONS>
   <FO>
        <FH>
            <DocRef>FU_1</DocRef>
        </FH>
        <RES>
            <Code>400</Code>
            <Message>Fusion order processed</Message>
        </RES>
    </FO>
    <FO>
        <FH>
            <DocRef>FU_2</DocRef>
        </FH>
        <RES>
            <Code>400</Code>
            <Message>Source Rotation Number: 15/0000556 does not exist for Product Code: ETHANOL.</Message>
        </RES>
    </FO>
</FUSIONS>

Code : 400

<FUSIONS>
    <FO>
        <FH>
            <DocRef>FU_2</DocRef>
        </FH>
        <RES>
            <Code>400</Code>
            <Message>Source Rotation Number: 15/0000556 does not exist for Product Code: ETHANOL.</Message>
        </RES>
    </FO>
</FUSIONS>

Code : 406 Response Body

Failed validation because field 'SiteCode' exceeded the maximum number of characters allowed.

  • No labels