Create Sales Order


DESCRIPTION

Sales web service.

Request

Method: POST

Content-Type: application/json

URL:

Test Environment: https://training.logiztikalliance.com:5005/externalSprint/api/PlaceOrder/ordersales
Production Environment: https://cloudus.logiztikalliance.com:5005/external/api/PlaceOrder/ordersales
INPUT PARAMETERS

 

Body
Name Type Required Description
token string(50) Yes Alliance cloud security token.
orderNumber strint(16) No The order number or invoice number.
customerId int(4) Yes The customer that will receive the order. 
carrierId int(4) Yes The carrier that will be used for the shipment. 
miamiShipDate Date(MM/dd/yy) Yes The order ship date.
poNumber string(16) No The purchase order number. 
lotNumber string(16) No The lot number.
lotQty int(4) No Quantity of boxes you want to get from the inventory and the specified lot number.
generateBOL boolean No true or false. If it’s true, the system will assign a number of BOL to the boxes once they are properly assigned.
instructions string(256) No A special instructions or comments on the order.
BoxId string(16) Yes The boxes that will be assigned to the order.
stemPrice decimal(9,3) Yes Price by stem.
markCode string(16) No Mark code.
EXAMPLE
{
  “token”: “LoMi0-G6pR6sr8aFd”,
  “orderNumber”: “123456”,
  “customerId”: “INV-1124”,
  “carrierId”: “DEL”,
  “miamiShipDate”: “11/15/2022”,
  “poNumber”: “Nr111 #00”,
  “lotNumber”:null,
  “lotQty”:null,
  “generateBOL”:false,
  “instructions”:null,
  “boxIds”: [
    {
      “BoxId”: “SK10080830”,
      “stemPrice”: 0.51,
      “markCode”:null
    }
  ]
}
Response

 

Output Success

 

BODY

Name Type Description
status string(5) Output Success (1).

EXAMPLE

{
    “status”: “1”
}
 
Output Error

 

BODY

Name Type Description
boxesNotAvailable array string  
error string(400) In case of an error, we return the error message in this field. 
status string(5)  Output error (0).

EXAMPLE

{
    “boxesNotAvailable”: [  
    ],
    “error”: “The shipping date Friday, January 24, 2020 of the box cannot be earlier than today”,
    “status”: “0”
}
 
OUTPUT ERROR

 

BODY

Name Type Description
[Field Name] string(250) Error message generated by an exception in a field of the sent Body
ERRORS MESSAGES

 

INVALID TOKEN

 

{
    “error”: “Invalid Token”,
    “status”: “0”
}
EMPTY TOKEN

 

{
    “Token”: [
        “Token is required”
    ]
}
CARRIER DOES NOT EXIST

 

{
    “error”: “Carrier does not exist”,
    “status”: “0”
}
EMPTY CARRIERID

 

{
    “CarrierId”: [
        “CarrierId is required”
    ]
}
CUSTOMER DOES NOT EXIST

 

{
    “error”: “Customer does not exist”,
    “status”: “0”
}
EMPTY CUSTOMERID

 

{
    “CustomerId”: [
        “CustomerId is required”
    ]
}
INCORRECT BOX SHIPPING DATE

 

{
    “boxesNotAvailable”: [],
    “error”: “The shipping date Tuesday, May 11, 2021 of the box cannot be earlier than today”,
    “status”: “0”,
    “codigoBarra”: [
        “SK10080830”,
        “SK10080831”,
        “SK10080832”,
        “SK10080833”
    ]
}
INCORRECT SHIPPING DATE

 

{
    “miamiShipDate”: [
        “Could not convert string to DateTime: 15/11/2021. Path ‘miamiShipDate’, line 6, position 31.”
    ]
}
BOXES NOT AVAILABLE

 

{
    “error”: “Boxes not available:  – Boxes not found: 1 (SK10080830) – Boxes not inventory: “,
    “status”: “0”,
    “codigoBarra”: [
        “SK10080830”
    ]
}
SYNTAX ERROR

 

{
    “boxIds[0].stemPrice”: [
        “Unexpected character encountered while parsing value: D. Path ‘boxIds[0].stemPrice’, line 11, position 20.”,
        “Unexpected character encountered while parsing value: D. Path ‘boxIds[0].stemPrice’, line 11, position 20.”,
        “Unexpected character encountered while parsing value: D. Path ‘boxIds[0].stemPrice’, line 11, position 20.”,
        “Unexpected character encountered while parsing value: D. Path ‘boxIds[0].stemPrice’, line 11, position 20.”
    ]
}