Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

The purpose of this service is to update new manufacture complete on Vision database,

Request

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

POST Body structure : MC XML Structure

Expand
titleRequest body sample
Code Block
languagexml
<?xml version="1.0"  standalone="yes"?>
<MANUFACTURING>
    <MC>
        <Customer>CUS1</Customer>
        <Site>CO</Site>
        <DocRef>API_1</DocRef>
        <CompletionDT>2020-07-20T09:53:33</CompletionDT>
        <InputQty>12</InputQty>
        <OutputQty>12</OutputQty>
    </MC>
    <MC>
        <Customer>CUS1</Customer>
        <Site>PFeeee</Site>
        <DocRef>API_1</DocRef>
        <CompletionDT>2020-07-20T09:53:33</CompletionDT>
        <InputQty>13</InputQty>
        <OutputQty>13</OutputQty>
    </MC>
</MANUFACTURING>

Response

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

...

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

Code Block
languagexml
<MANUFACTURING>
    <MC>
        <DocRef>API_1</DocRef>
        <Customer>JOE</Customer>
        <RES>
            <Code>200</Code>
            <Message>Manufacture complete processed</Message>
        </RES>
    </MC>
</MANUFACTURING>

Code : 207

Code Block
languagexml
<MANUFACTURING>
    <MC>
        <DocRef>API_1</DocRef>
        <Customer>JOE</Customer>
        <RES>
            <Code>200</Code>
            <Message>Manufacture complete processed</Message>
        </RES>
    </MC>
    <MC>
        <DocRef>API_2</DocRef>
        <Customer>JOE</Customer>
        <RES>
            <Code>400</Code>
            <Message>Validation failure occurred on line: 1 Customer Code: JOE and site code: PF does not exist.</Message>
        </RES>
    </MC>
</MANUFACTURING>

Code : 400

Code Block
languagexml
<MANUFACTURING>
    <MC>
        <DocRef>API_1</DocRef>
        <Customer>JOE</Customer>
        <RES>
            <Code>400</Code>
            <Message>Record already exists</Message>
        </RES>
    </MC>
    <MC>
        <DocRef>API_2</DocRef>
        <Customer>JOE</Customer>
        <RES>
            <Code>400</Code>
            <Message>Validation failure occurred on line: 1 Customer Code: JOE and site code: PF does not exist.</Message>
        </RES>
    </MC>
</MANUFACTURING>

Code : 406 Response Body

Code Block
Failed validation because field 'Site' exceeded the maximum number of characters allowed.

...