Skip to main content

Creating an Order – createShipping()

Creating an Order

createShipping() method, available on the Horoz Logistics Domestic Distribution Integration, is a web service method that should be used to create a shipping order that contains one or more physical products such as boxes, packages, pallets, etc. to be transported from the sender to the recipient in the Horoz system.

Any merchant, which has an agreement with Horoz Logistics as part of the domestic distribution operations, can create shipping order data to the Horoz system via Horoz Logistics Domestic Distribution Integration using the createShipping() method for the product shipments from its own warehouse to its end consumers and/or for product shipments from its marketplace merchants to its end consumers.

Any shipping order, sent by the client to the Horoz Logistics system, is a job order, and after the planning and goods acceptance processes carried out by the Horoz Logistics Domestic Distribution Operations Unit, such order enters the operation life cycle and becomes an order to be transferred from the respective merchant to the end consumer. Important information about the createShipping() method and the points to be considered when creating a shipping order in the Horoz system are listed below for the information of the clients.

  • createShipping() method is a RESFtul web service method that receives data in JSON format via POST method.

  • When sending a shipping order to the Horoz system by means of the createShipping() method, the details about such order must be entered into the body of the method in JSON data type. The client's processKey details must be entered into the header of the method as a parameter type. The shipment made by means of the createShipping() method must be encoded as UTF-8 and transmitted to the Horoz Logistics Domestic Distribution Integration Web service.

  • createShipping() method consists of a main shipping order data structure and a detailed shipping order structure, containing product information as an array list below such main shipping order data structure. Within a shipping order structure, there is the order number, sender details, recipient details, total quantity, total volume details about the order given by the end consumer to the merchant, and the product information including the product code, product name, product quantity, product volume, product weight, product category details that qualify one or more products pertaining to the respective order in the details of such shipping order.

  • When a shipping order is sent to the Horoz system by the client by means of the createShipping() method, the details to be entered by the client to the senderCity, senderCounty, recipientCity and recipientCounty fields must be the city and county details that are defined in the Horoz Logistics system. Otherwise, an error will be returned to the client from the createShipping() method. The client can obtain the city and county details defined in the Horoz Logistics system by using the listCountires() method, which works with the GET method available within the Horoz Logistics Domestic Distribution Integration. The city-county details defined in the Horoz Logistics system has been clustered and created by having received such details from the Republic of Türkiye Ministry of Internal Affairs and the Türkiye Civil Administration Departments Inventory system. Available data is checked manually at intervals.

  • When a shipping order is sent to the Horoz system by the client by making use of the createShipping() method, the total desi and total quantity details about the products in the order entered in the totalDesi and shipmentCount fields in the request to be sent to the Horoz Domestic Distribution Integration Web Service must be compatible with the product-based desi and quantity details entered into the desi and quantity fields in the product information entered as an item in the shippingDetail array list. While sending the order, an incorrect and expected examplary illustration for the quantity and desi compatibility relationship in the master and detailed information in the createShipping() method is given in the tables below.

Master Entry:

REQUESTNUMBERSENDERTITLERECIPIENTTITLESHIPMENTCOUNTTOTALDESI
123456SATICI UNVANALICI UNVAN2320,000

Incorrect Entry Detail:

PRODUCTCODEPRODUCTNAMEQUANTITYWEIGHTINKGTOTALDESIPRODUCTCATEGORY
PRODUCTCODE-1PRODUCTNAME-11,00020,650160,000YATAK
PRODUCTCODE-1PRODUCTNAME-11,00020,650160,000YATAK

Correct Entry Detail:

PRODUCTCODEPRODUCTNAMEQUANTITYWEIGHTINKGTOTALDESIPRODUCTCATEGORY
PRODUCTCODE-1PRODUCTNAME-12,00041,300320,000YATAK
  • When a shipping order is sent to the Horoz system by the client by making use of the createShipping() method, the data to be entered into all fields that take values of string data type, except for the shippingType field that takes values other than enum data type, in the request to be sent to the Horoz Domestic Distribution Integration Web service, is expected to be entered as UPPERCASE and in Turkish characters.

  • When a shipping order is sent to the Horoz system by the client by making use of the createShipping() method, the requestNumber, shipmentCount, totalDesi, quantity, desi and weightInKg in the request to be sent to the Horoz Domestic Distribution Integration Web service must be filled in.

  • Among the order details in the shipping orders sent to the Horoz system by the client by making use of the createShipping() method, the actual desi details about the products in the order must be entered into the fields that specifically qualify the desi details (totalDesi, desi). Otherwise, there will be a problem in the logistics operation at the stage where the shipping order is approved and the vehicle planning is made before the goods acceptance process. Therefore, the shipping order data to be transmitted via the integration must actually contain the quantity and volume details about the products to be physically transported.

  • While passing the details about the products in the shipping orders sent to the Horoz system by the client by means of the createShipping() method, it is expected that the unit desi details, multiplied by the quantity on product basis, are entered into both the desi and weightInKg fields.

  • As part of the Horoz Logistics Domestic Distribution Integration, four types of shipping order data can be sent to the Horoz system by the client by means of the createShipping() method. For any shipping order sent by means of the createShipping() method, shipping type details are entered into the shippingType field in the request. See the detailed information about shipping order types under the headings given below.

ShippingRequest

ShippingRequest value is the value to be entered into the shippingType field when sending orders to the Horoz system by means of the createShipping() method, for the orders to be sent from the warehouse of the merchant that has an agreement with Horoz Logistics for domestic distribution operations.

The shipping order, in which this type is used, represents an order from the merchant with which Horoz Logistics has an agreement for domestic distribution operations, to the merchant's end customer. When sending data by means of the `createShipping() method for such type of notification, the client must pass the details about the warehouse or the departure point where the orders will be sent to the sender fields1 in the request content. There are 2 methods for that.

As the first method, the client enters the code of the relevant departure point defined previously in the Horoz Logistics system into the senderCode field, and leaves the other sender fields1 blank. The code details entered into the senderCode field in the createShipping() method fills in the other sender fields by looking at the customer's departure location details as defined in the Horoz system when the shipping order is created.

As the second method, the client is expected to fill in the other sender fields1 by entering 0 to the senderCode field. Both methods can be applied to the recipientCode field.

Return

Return value is the value to be entered into the shippingType field when sending orders to the Horoz system by means of the createShipping() method for the orders that the merchant, which has an agreement with Horoz Logistics for domestic distribution operations, wishes to carry out a return operation to its warehouse from its customer.

Any shipping order, in which such type is used, represents an order from the customer of the merchant with which Horoz Logistics has an agreement for domestic distribution operations, to the merchant itself. When sending data by means of the createShipping() method for such type of notification, the client must enter the details about the end customer or warehouse from which the orders will be received into the sender fields1 in the request content. There are 2 methods for that.

As the first method, the client enters the code of the relevant warehouse defined previously in the Horoz Logistics system to the senderCode field, and leaves the other sender fields1 blank. The code details entered into the senderCode field in the createShipping() method fills in the other sender fields by looking at the details about the warehouse as defined in the Horoz system when the shipping order is created.

As the second method, the client is expected to fill in the other sender fields1 by entering 0 to the senderCode field. Similarly, both methods can be applied to the recipientCode field.

BranchSales

BranchSales value is the value to be entered into the shippingType field when sending orders to the Horoz system by means of the createShipping() method for the marketplace and/or store departures of the merchant which has an agreement with Horoz Logistics for domestic distribution operations.

The shipping order, in which this type is used, represents an order from the marketplace of the merchant with which Horoz Logistics has an agreement for domestic distribution operations, to the merchant's end customer. When filling in the fields of the createShipping() method for the respective merchant's marketplace and/or store departures, the senderCode details are entered as 0, and the other sender fields1 are completed with the details about the respective merchant marketplace. Similarly, in the recipient information, the recipientCode details are passed as 0, and the other recipient fields2 are completed with the recipient details.

BranchReturn

BranchReturn value is the value to be entered into the shippingType field when sending orders to the Horoz system by means of the createShipping() method for the orders that will be returned to the marketplace and/or stores from the customers as part of the e-commerce operation of the merchant which has an agreement with Horoz Logistics for domestic distribution operations.

The shipping order, in which such type is used, represents an order from the end customer of the merchant with which Horoz Logistics has an agreement for domestic distribution operations, to the respective marketplace. When filling in the fields of the createShipping() method for the respective merchant's marketplace and/or store departures, the senderCode details are passed as 0, and the other sender fields1 are completed with the details about the respective merchant's marketplace. Similarly, in the recipient information, the recipientCode details are passed as 0, and the other recipient fields2 are completed with the recipient details.


POST createShipping()

Parameter Descriptions & Rules

The following table lists the input and output parameters of the createShipping() process, and the types and formats of such parameters.

FieldsDescriptionData TypeLengthField LocationRequirement
processKeyThe processKey details identified for the clientstring100HeaderMandatory
requestNumberOrder numberstring50inBody RequestMandatory
senderCodeSender codeinteger-inBody RequestMandatory
senderTitleSender titlestring100inBody RequestMandatory
senderCitySender city namestring50inBody RequestMandatory
senderCountySender county namestring50inBody RequestMandatory
senderAdressSender addressstring500inBody RequestMandatory
senderPhoneNumberSender phone numberstring20inBody RequestMandatory
senderEmailSender e-mailstring100inBody RequestOptional
recipientCodeRecipient codeinteger-inBody RequestMandatory
recipientTitleRecipient titlestring100inBody RequestMandatory
recipientCityRecipient city namestring50inBody RequestMandatory
recipientCountyRecipient county namestring50inBody RequestMandatory
recipientAddressRecipient addressstring500inBody RequestMandatory
recipientPhoneNumberRecipient phone numberstring20inBody RequestMandatory
recipientEmailRecipient e-mailstring100inBody RequestOptional
taxOfficeTax officestring20inBody RequestOptional
taxNumberTax ID Numberstring20inBody RequestOptional
shipmentCountTotal quantityinteger-inBody RequestMandatory
totalDesiTotal desifloat-inBody RequestMandatory
shippingTypeShipping typestring20inBody RequestMandatory
requestDateDate of sending of requestDATEYYYY-MM-DDinBody RequestMandatory
requestedDeliveryDateRequested delivery dateDATEYYYY-MM-DDinBody RequestMandatory
shippingDetail[]Shipping detailsArrayList-inBody RequestMandatory
productCodeProduct codestring50inBody RequestMandatory
productNameProduct namestring100inBody RequestMandatory
quantityQuantityinteger-inBody RequestMandatory
weightInKgWeightfloat-inBody RequestMandatory
desiDesifloat-inBody RequestMandatory
productCategoryProduct categorystring100inBody RequestMandatory

Service Responses

Response CodeResponse MessageDescription
STA-100Kayit islemi basariliIt refers to the fact that the shipment creation process is successful.
ERR-20001HATALI IŞLEM ANAHTARIIndicates that the entered processKey details are incorrect.
ERR-20002EKSİK PARAMETRE: TALEP NUMARASIIndicates that the requestNumber information has been entered incompletely.
ERR-20002GİRİLEN DEĞER ÇOK UZUN: Alan AdıIndicates that the value entered in the specified field is too long.
ERR-20003BU TALEP NUMARASI SISTEMDE MEVCUT - Key: XXX TalepNo: XXXIndicates that a shipment has already been created with the same requestNumber details.
ERR-20005GEÇERSİZ GÖNDEREN BİLGİSİIndicates that the value entered in the senderCode field is not defined in the Horoz System.
ERR-20006GEÇERSİZ ALICI BİLGİSİIndicates that the value entered in the recipientCode field is not defined in the Horoz System.
ERR-20007EKSİK PARAMETRE: TOPLAM ADET/DESİIndicates that the totalDesi and shipmentCount fields have been left blank.
ERR-20008EKSİK PARAMETRE: KARGO BİLGİLERİIndicates that the fields under the shippingDetail array are incomplete.
ERR-20009DESI BILGISI SIFIR OLAMAZ.The value entered in the desi fields must be greater than 0.
ERR-20012TOPLAM DESI SIFIR OLAMAZThe value entered in the totalDesi field must be greater than 0.
ERR-20056shippingType BİLGİSİ BOŞ GEÇİLEMEZ.Indicates that a value must be entered in the shippingType field.
ERR-20071BU TALEP DAHA ÖNCE GÖNDEREN İL/İLÇE YADA ALICI İL/İLÇE BOZUK OLARAK SİSTEME GÖNDERİLMİŞ. KAYDI DÜZELTİP TEKRAR DENEYİNİZIt refers to the fact that an entry has been previously created with incorrect city and county details by making use of the requestNumber details entered in the request, and that an entry should be created with the same requestNumber by entering the city and county details correctly.

Footnotes

Footnotes

  1. (senderTitle, senderCity, senderCounty, senderAddress, senderPhone...) 2 3 4 5 6 7 8

  2. (recipeintTitle, recipientCity, recipientCounty, recipientAddress, recipientPhone...) 2