Inward Create
Allows customers to create a new warehousing inward in the WMS. The id value in the result can be used for further update and delete operations. 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
Resource Information
Type | Value | ||
---|---|---|---|
Authentication | API Key | ||
Response Formats | JSON / XML | ||
HTTP Methods | POST | ||
API Version | 1.1 |
HTTP Headers
You must add the following HTTP Headers to your request:
Header | Description | Type | Required |
---|---|---|---|
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
Parameter | Description | Type | Length | Required |
---|---|---|---|---|
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 | object | 50 | Yes | |
code | Your customer code in the WMS | string | 50 | Yes |
warehouse | object | 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 | |
connoteNumber | connote number | string | 50 | |
inwardLines | List of products related to this inward | array | Yes | |
inwardLine
|
Product related to this inward | object | 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 | 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 | string | 50 | |
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 | object | ||
externalSystem
|
object | |||
code
|
string | 50 | ||
references
|
array | |||
reference
|
array | |||
referenceType
|
External reference types, list of available of types can be found here | string | 50 | |
value
|
string | 50 |
Response Parameters
Parameter | Description | Type | Length | |
---|---|---|---|---|
id | Inward identifier that can be used to update and delete this inward | guid | 36 | |
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 | |
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 | 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 | string | 50 | |
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 | integer | ||
vti
|
Value Transport Insurance | integer | ||
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 | |||
references
|
array | |||
reference
|
array | |||
referenceType
|
External reference types, list of available of types can be found here | string | ||
value
|
string |
Code samples
To Create an Order in JSON format you will need to POST a JSON object:
- URL
https://api.mainfreight.com/warehousing/1.1/customers/inward
You are going to send a JSON object similar to this:
- REQUEST JSON
{
"inwardReference": "SandfieldARI",
"inwardReference1": "Reference2",
"inwardReference2": "Reference3",
"supplierReference": "Reference4",
"vendorReference": "Reference5",
"clientReference": "Reference6",
"customer": {
"code": "{{customerCode}}"
},
"warehouse": {
"code": "{{warehouseCode}}"
},
"pickUp": {
"address1": "1115 broadway floor 3",
"address2": "",
"code": "179707",
"country": "US",
"name": "Sage,Ashique",
"phone": "(718) 926-7450",
"place": "New York",
"postCode": "10010",
"state": "NY"
},
"note": "note",
"units": "1",
"pallets": "1",
"weight": "1",
"volume": "1",
"plant": "1",
"connoteNumber": "ConnoteNumber",
"inwardLines": [
{
"lineNo": "1",
"units": "1",
"noteType": "",
"note": "Product Line",
"product": {
"code": "{{productCode}}",
"description": "{ProductDescription}",
"alternativeDescription": "{ProductDescription}"
},
"weight": "23",
"volume": "23",
"grade1": "[grade1]",
"grade2": "[grade2]",
"grade3": "[grade3]",
"expiryDate": "2019-03-03",
"packingDate": "2019-02-12",
"entryNumber": "1",
"entryLineNumber": "2",
"externalReferences": {
"externalSystem": {
"code": "",
"references": []
}
}
}
],
}
You are going get another JSON object similar to this:
- RESPONSE JSON
To Create an Order in XML format, you will need to POST XML object.
- URL
https://api.mainfreight.com/warehousing/1.1/customers/inward
You are going to send XML document similar to this:
- XML REQUEST
You are going to get a XML document similar to this:
- XML RESPONSE