Create Sales Order


DESCRIPTION

Sales web service.

Request

Method: POST

Content-Type: application/json

URL:

Test Environment: https://testsalesapi.logiztikalliance.com/Order/new
Production Environment: https://salesapi.logiztikalliance.com/Order/new
INPUT PARAMETERS
Name Type Required Description
apiKey String (128) Yes Alliance cloud security token/ ApiKey
 

 

Body
Name Type Required Description
customerId string(16) Yes The customer that will receive the order. 
carrierId strint(16) Yes The carrier that will be used for the shipping.
generateBOL Boolean No This field can be true or false. If it’s true, the system will assign a number of BOL to the boxes once they are properly assigned.
shipDate Date (mm/dd/yy) Yes The order ship date, must be in the date format: “mm/dd/yy”.
orderNumber strint(16) No The order number or invoice number.
poNumber string(16) No The purchase order number.
boxIds

Array []

Yes This parameter is mandatory and represents an arrangement in which we will place the necessary bar code data to be able to make the sale.
BoxIds Body
Name Type Required Description
boxId string(16) Yes The box barcode that will be assigned to the order. This piece must be in received status and in inventory position or in pending status and non-inventory position.
unitPrice Decimal (9,3) No The sales price of the box that was sold. 
markCode string(16) No Mark Code of the sold barcode.
units Int (4) No Number of units in the box.
EXAMPLE

{

    “customerId”: “TCL-1953”,

    “carrierId”: “DEL”,

    “ShipDate”: “01/17/2024”,

    “orderNumber”: “TEST005”,

    “poNumber”: “TEST005”,

    “boxIds”: [

      {

        “boxId”: “CF356783596”,

        “unitPrice”: 0.70,

        “markCode”: “ABC123”,

        “units”: 100

      },

      {

        “boxId”: “CF356783605”,

        “unitPrice”: 0.70,

        “markCode”: “ABC123”,

        “units”: 100

      }

    ]

}

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 Represents an arrangement with unavailable barcodes
error string(400) Represents a string in which the service response will be detailed
status string(5) This field will have only two types of responses: 1 which will mean that everything was successful and 0 when an error has occurred.

 


Content Field BoxesNotAvailable

Name Type Description
Carrier string Represents the carrier sent
BoxCode string Represents the barcodes sent
ShipDate string Represents ship date sent
Customer string Represents the customer sent

 


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
type string Represents the type of error that has generated the exception in the service
title string Details the message of the error that occurred
status int Represents the error code
traceId string The trace error

EXAMPLE

{

    “type”: “https://tools.ietf.org/html/rfc9110#section-15.5.2”,

    “title”: “Unauthorized”,

    “status”: 401,

    “traceId”: “00-67a45e34059fe23fe2cdb7f299a02706-d43a814230304486-00”

}

ERRORS MESSAGES

 

BOXES STATUS DISPACHED

{

    “boxesNotAvailable”: null,

    “error”: “Boxes not available: 2 DISPATCHED WH(CF356783596,CF356783605) –           Boxes not found:  – Boxes not inventory: “,

    “status”: “0”,

    “codigoBarra”: []

}

BOXES STATUS PENDING

{

    “boxesNotAvailable”: null,

    “error”: “Boxes not available: 1 PENDING(12400001525) – Boxes not found:  – Boxes not inventory: “,

    “status”: “0”,

    “codigoBarra”: []

}

CARRIER DOES NOT EXIST

{

    “error”: “Carrier does not exist”,
    “status”: “0”
}
CARRIER DOES NOT HAVE CUTOFF

{

    “boxesNotAvailable”: [],

    “error”: “The carrier entered does not have a cutoff”,

    “status”: “0”,

    “codigoBarra”: []

}

CUSTOMER DOES NOT EXIST

{

    “error”: “Customer does not exist”,
    “status”: “0”
}
INCORRECT BOX SHIPPING DATE

{

    “boxesNotAvailable”: [],
    “error”: “The shipping date Tuesday, May 11, 2023 of the box cannot be earlier than today”,
    “status”: “0”,
    “codigoBarra”: []
}
INCORRECT DATE FORMAT

{

    “boxesNotAvailable”: [],

    “error”: “Wrong date format. Please enter this format MM/dd/yyyy”,

    “status”: “0”,

    “codigoBarra”: []

}

BOXES NOT FOUND

{

    “boxesNotAvailable”: [],

    “error”: “Boxes not available: – Boxes not found:  1(1240000152500) – Boxes not inventory”,

    “status”: “0”,

    “codigoBarra”: []

}

SYNTAX ERROR

{

    “type”: “https://tools.ietf.org/html/rfc9110#section-15.5.1”,

    “title”: “One or more validation errors occurred.”,

    “status”: 400,

    “errors”: {

        “inventarioRequest”: [

            “The inventarioRequest field is required.”

        ],

        “$.carrierId”: [

            “‘,’ is an invalid start of a value. Path: $.carrierId | LineNumber: 2 | BytePositionInLine: 17.”

        ]

    },

    “traceId”: “00-f838cdaef47b71de65478ac3eb350304-0dd97001e6c63f30-00”

}