Inward Update

Allows customers to update an existing warehousing inward in the WMS, as long as the order has not been processed.

Note: No Content will be returned in the reponse

Required fields are in bold text.

Access

To access to Mainfreight APIs, you have to Register

Resource URI

Make an HTTP POST request to:

https://api.mainfreight.com/Warehousing/1.1/Customers/Inward/ { inward id }

Resource Information

TypeValue 
Authentication API Key  
Response Formats JSON / XML  
HTTP Methods PUT  
API Version 1.1  

HTTP Headers

You must add the following HTTP Headers to your request:

HeaderDescriptionTypeRequired
Content-Type Request content type. Supported types are "application/json" or "application/xml" string Yes
Authorization

The word " Secret" followed by a space, then your unique Logistics API Key

e.g: Secret wdnOId93-VXZECxvVRPQEJZNxPB5XZ...

string Yes

Parameters

You have to provide the parameters marked as required:

Request Parameters

ParameterDescriptionTypeLengthRequired
id Your unique order guid recivied in the order create response guid   Yes
inwardReference Your unique order reference identifying the Inward string  50 Yes
inwardReference1 Your first reference for the Inward string  50   
inwardReference2 Your second reference for the Inward  string  50 
carrierReference Not required in your request. Carrier Reference is populated when finalising/despatching your inward string  50   
supplierReference Supplier reference string  50   
vendorReference Vendor reference string  50   
customer   array   Yes
code Your customer code in the WMS string 50  Yes
warehouse   array    Yes
code Fixed value to define "Warehouse Code" integer    Yes
pickUp Suburb for the party address string 50  
address1 Additional street address details string 50  
address2 City/Place for the party address string 50  
code shorthand to identify the pick up string 50  
country Country for the pick up address string 50  
name Name for the pick up string 50   
phone Phone number for the pick up string 50  
place City/Place for the pick up address string 50  
state State for the pick up address string 50   
suburb Suburb for the pick up address  string 50  
note Note to be identified in system string 50   
bookingDate Booking date for the inward date    
arrivalDate Arrival date for the inward date    
bookingDate Booking date for the inward
Format yyyy-MM-dd
date    
arrivalDate Arrival date for the inward
Format yyyy-MM-dd
date    
units Total number of units for the inward decimal    
pallets Total number of pallets for the inward decimal    
weight Total weight for the inward decimal    
volume Total volume of the inward integer    
plant Indicates the Plant where the inward came from string 50  
inwardType Inward type list of available of types can be found here string  50   
freeStore A free text field string 50  
externalReferences List of external system references array    
externalSystem   object    
code External system code string 50  
references List of References associated with the external system array    
referenceType External reference type, list of available types can be found here string 50  
value Reference value string 50  
connoteNumber connote number string 50  
inwardLines List of products related to this inward array   Yes
inwardLine
Product related to this inward array   Yes
lineNo Number identifying the inward line in your inward integer   Yes 
units Number of units for this product decimal    
noteType Note type, list of available of types can be found here string 50  
note Value for note to appear against the line string 50  
product   object   Yes, if kitset not provided
code Product code
When providing a product code as well as a kitset code, all products for the kitset
should be provided with the correct ratios
string 50 Yes
description Product description, only required if configured to automatically create new products string 50 Conditional
alternativeDisplayName Alternative product description string 50  
weight Weight of product decimal    
volume Volume of product decimal    
grade1 Grade 1 attribute field against products in the WMS string 50   
grade2 Grade 2 attribute field against products in the WMS string  50   
grade3 Grade 3 attribute field against products in the WMS string  50   
expiryDate Expiry date attribute field against products in the WMS date    
packingDate Packing date attribute field against products in the WMS date    
shippingNotification Shipping Notification      
purchaseOrderNumber
Purchase Order Number string 50   
purchaseOrderLineNumber
Purchase Order Line Number string  50   
packType
Pack type ordered for product string 50  
entryNumber
Entry Number string 50   
entryLineNumber
Entry Line Number string  50   
arrivalDate
Arrival date attribute field against products in the WMS date    
vfd
Value For Duty decimal     
vti
Value Transport Insurance decimal     
underBond
Underbond must be a boolean value boolean     
kitsetCode
Kitset code identifying the kitset. When providing a kitset code, product code is optional. string 50  
externalReferences
External reference's, list of available of external reference types can be found here array    
externalSystem
  array    
code
  string  50   
references
  array    
reference
  array    
referenceType
External reference types, list of available of types can be found here string     
value
  string     
externalReferences List of external system references associated with the line array    
externalSystem   object    
code External system code string 50  
references List of References associated with the external system array    
referenceType External reference type, list of available types can be found here string 50  
value Reference value string 50  

Response Parameters

Responds with an HTTP 204 response code on success 

Code samples

JSON Example

To Create an Inward in JSON format you will need to POST a JSON object:

  • URL
< > grab code
https://api.mainfreight.com/warehousing/1.1/customers/inward/00000000-0000-0000-0000-000000000000

You are going to send a JSON object similar to this:

  • REQUEST JSON
< > grab code
{
{
 "id": "000000000000-0000-0000-0000-000000000000"   
"inwardReference": "reference", "inwardReference1": "reference2", "inwardReference2": "reference3", "supplierReference": "reference4", "vendorReference": "reference5", "clientReference": "reference6", "customer": [{ "code": "{customerCode}" }], "warehouse": [{ "code": "{warehouseCode}" }], "pickUp": [{ "address1": "42 O'rorke Road", "address2": "", "code": "123", "country": "New Zealand", "name": "Cosignee ABCD", "phone": "123-456-789", "place": "Auckland", "postCode": "1234", "state:": "", "suburb": "" }], "note": "note", "bookingDate": "", "arrivalDate": "", "units": "1", "pallets": "1", "weight": "1", "volume": "1", "plant": "1", "inwardType": "", "freeStore": "", "connoteNumber": "connote number", "inwardLines": [{ "inwardLine": [{ "lineNo": "1", "units": "1", "noteType": "", "note": "Product Line", "product": [{ "code": "product code", "description": "product description", "alternativeDescription": "" }], "weight": "23", "volume": "23", "grade1": "grade1", "grade2": "grade2", "grade3": "grade3", "expiryDate": "2019-03-03", "packingDate": "2019-02-12", "shippingNotification": "", "purchaseOrderNumber": "", "purchaseOrderLineNumber": "", "packType": "", "entryNumber": "1", "entryLineNumber": "2", "arrivalDate": "", "vfd": "", "vti": "", "underBond": "", "kitsetCode": "", "externalReferences": [{ "externalSystem": [{ "code": "", "references": [{ "reference": [{ "referenceType": "", "value": "" }] }] }] }] }] }], "externalReferences": [{ "externalSystem": [{ "code": "", "references": [{ "reference": [{ "referenceType": "", "value": "" }] }] }] }] }

You are going get another JSON object similar to this:

  • RESPONSE HTTP
< > grab code
{
Responds with an HTTP 204 response code on success.
XML Example

To Create an Inward in XML format, you will need to POST XML object.

  • URL
< > grab code
https://api.mainfreight.com/warehousing/1.1/customers/inward/00000000-0000-0000-0000-000000000000

You are going to send XML document similar to this:

  • XML REQUEST
< > grab code
<inward>
    <id>000000000-0000-0000-0000-00000000000</id>
    <inwardReference>Reference1</inwardReference>
    <inwardReference1>Reference2</inwardReference1>
    <inwardReference2>Reference3</inwardReference2>
    <supplierReference>Reference4</supplierReference>
    <vendorReference>Reference5</vendorReference>
    <clientReference>Reference6</clientReference>
    <customer>
        <code>{{customerCode}}</code>
    </customer>
    <warehouse>
        <code>{{warehouseCode}}</code>
    </warehouse>
    <pickUp>
        <address1>1115 broadway floor 3</address1>
        <address2/>
            <code>179707</code>
        <country>US</country>
        <name>Sage,Ashique</name>
        <phone>(718) 926-7450</phone>
        <place>New York</place>
        <postCode>10010</postCode>
        <state>NY</state>
        <suburb/>
    </pickUp>
    <note>note</note>
    <bookingDate></bookingDate>
    <arrivalDate></arrivalDate>
    <units>1</units>
    <pallets>1</pallets>
    <weight>1</weight>
    <volume>1</volume>
    <plant>1</plant>
    <inwardType></inwardType>
    <freeStore></freeStore>
    <connoteNumber>ConnoteNumber</connoteNumber>
    <inwardLines>
        <inwardLine>
            <lineNo>1</lineNo> 
            <units>1</units> 
            <noteType></noteType>
            <note>Product Line</note>
            <product>
                <code>{{productCode}}</code>
                <description>{ProductDescription}</description>
                <alternativeDescription>{ProductDescription}</alternativeDescription>
            </product>
            <weight>23</weight>
            <volume>23</volume>
            <grade1>[grade1]</grade1>
            <grade2>[grade2]</grade2>
            <grade3>[grade3]</grade3>
            <expiryDate>2019-03-03</expiryDate>
            <packingDate>2019-02-12</packingDate>
            <shippingNotification></shippingNotification>
            <purchaseOrderNumber></purchaseOrderNumber>
            <purchaseOrderLineNumber></purchaseOrderLineNumber>
            <packType></packType>
            <stockStatus></stockStatus>
            <entryNumber>1</entryNumber>
            <entryLineNumber>2</entryLineNumber>
            <arrivalDate></arrivalDate>
            <vfd></vfd>
            <vti></vti>
            <underBond></underBond>
            <kitsetCode/>
            <externalReferences>
                <externalSystem>
                    <code></code>
                    <references>
                        <reference>
                            <referenceType></referenceType>
                            <value></value>
                        </reference>
                        <reference>
                            <referenceType></referenceType>
                            <value></value>
                        </reference>
                    </references>
                </externalSystem>
            </externalReferences>
        </inwardLine>
    </inwardLines>
    <externalReferences>
        <externalSystem>
            <code></code>
            <references>
                <reference>
                    <referenceType></referenceType>
                    <value></value>
                </reference>
                <reference>
                    <referenceType></referenceType>
                    <value></value>
                </reference>
            </references>
        </externalSystem>
    </externalReferences>       
</inward>

You are going to get a XML document similar to this:

  • HTTP RESPONSE
< > grab code
Responds with an HTTP 204 response code on success.
NOTE: Content in the panels below this point are not visible on the site unless used by other features e.g. gadgets, OB&E, etc.