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 String (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 String (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”: “530378”,
    “carrierId”: “PIK”,
    “ShipDate”: “06/14/2024”,
    “orderNumber”: “Test1”,
    “poNumber”: “TestMar1”,
    “boxIds”: [
      {
        “boxId”: “NR378724443”,
        “unitPrice”: “0.80”,
        “units”: “500”,
        “markCode”: “12.03 Maripo”
      }
    ]
}
Response

 

BODY

 

Name Type Description
boxesNotAvailable Array[] Represents an arrangement with unavailable barcodes.
error String Represents a string in which the service response will be detailed.
status String 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”: “Boxes successfully processed: 2”,
    “status”: “1”,
    “codigoBarra”: []
}
 
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 occurre
status Int Represents the error code

 

EXAMPLE

{
    “type”: “https://tools.ietf.org/html/rfc9110#section-15.5.2”,  
    “title”: “Unauthorized”,
    “status”: 401
}
 
ERRORS MESSAGES

 

Boxes status Dispached

 

{
    “boxesNotAvailable”: null,
    “error”: “Boxes not available: 2 DISPATCHED WH(CF356783596,CF356783605) – Boxes not found: – Boxes not inventory: “,
    “status”: “0”
}
Boxes status Pending

 

{
    “boxesNotAvailable”: null,
    “error”: “Boxes not available: 1 PENDING(12400001525) – Boxes not found: – Boxes not inventory: “,
    “status”: “0”
}
Carrier does not exist

 

{
    “boxesNotAvailable”: null,
    “error”: “Carrier does not exist”,
    “status”: “0”
}
Customer does not exist

 

{
    “boxesNotAvailable”: null,
    “error”: “Customer does not exist”,
    “status”: “0”
}
Carrier does not have cutoff

 

{
    “boxesNotAvailable”: null,
    “error”: “The carrier doesn’t have day of service”,
    “status”: “0”
}
Boxes not found

 

{
    “boxesNotAvailable”: [],
    “error”: “Boxes not available: – Boxes not found: 1(1240000152500) – Boxes not inventory”,
    “status”: “0”,
}
Date Format

 

{
    “boxesNotAvailable”: [],
    “error”: “Wrong date format. Please enter this format MM/dd/yyyy”,
    “status”: “0”,
}
Boxes not available

 

{
    “error”: “Boxes not available:  – Boxes not found: 1 (SK10080830) – Boxes not inventory: “,
    “status”: “0”,
    “codigoBarra”: [
        “SK10080830”
    ]
}
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.”
            “]
         }
}