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
NameTypeRequiredDescription
tokenstring(50)YesAlliance cloud security token.
orderNumberstrint(16)NoThe order number or invoice number.
customerIdint(4)YesThe customer that will receive the order. 
carrierIdint(4)YesThe carrier that will be used for the shipment. 
miamiShipDateDate(MM/dd/yy)YesThe order ship date.
poNumberstring(16)NoThe purchase order number. 
lotNumberstring(16)NoThe lot number.
lotQtyint(4)NoQuantity of boxes you want to get from the inventory and the specified lot number.
generateBOLbooleanNotrue or false. If it’s true, the system will assign a number of BOL to the boxes once they are properly assigned.
instructionsstring(256)NoA special instructions or comments on the order.
BoxIdstring(16)YesThe boxes that will be assigned to the order.
stemPricedecimal(9,3)YesPrice by stem.
markCodestring(16)NoMark 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

NameTypeDescription
statusstring(5)Output Success (1).

EXAMPLE

{
    “status”: “1”
}
Output Error

 

BODY

NameTypeDescription
boxesNotAvailablearray string
errorstring(400)In case of an error, we return the error message in this field. 
statusstring(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

NameTypeDescription
[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.”
    ]
}