It allows you:
to prepare (insert) courier data for a sales order
to get the prepared courier data for a sales order
Columns that can be used as filters:
Order (sales order Document No)
Actions can be done:
get_courier_data
prepare_courier_data
Restrictions:
can be used only if the sales order has shipper and it is with WMS, and the Document Status of the sales order is 'Completed' or 'Waiting Payment'
can be used only for Fan Courier, Urgent Cargus, GLS, eMAG Marketplace, Sameday
if method prepare_courier_data doesn't have a JSON body, all data for courier will be retrieved from Courier Default Values Tab from Courier API Properties Window. No field is mandatory when preparing data because it will complete his data from from Courier Default Values
if the method does have a json body, all data in the parameters is overwritten with the following rule: the data entered through json, plus the data in the Courier Default Values Tab, if active.
required fields must be filled in according to the specifications of each courier, either by json or based on default values, otherwise errors will occur when generating the AWB.
URL: https://api.socratecloud.com/webapi/rest/order/courier/get_courier_data/{version}?accessToken={access_token}&Order={sales order DocumentNo}
Method: GET
URL: https://api.socratecloud.com/webapi/rest/order/courier/prepare_courier_data/{version}?accessToken={access_token}&Order={sales order DocumentNo}
Method: POST
JSON Examples:
Get Courier Data:
{
"ShipmentType": "ST_",
"Weight": "0",
"NoPackages": "2",
"IsEnvelope": "N",
"ShipmentPayer": "D",
"CashOnDeliveryAmt": "",
"CashOnDeliveryPayer": "",
"DeclaredAmt": "",
"SalesRep_ID": "1010025",
"Observations": "observatii",
"ContentText": "",
"Ship_BPartner_ID": "1015707",
"AD_User_ID": "1012943",
"Phone": "076684684",
"Fax": "",
"EMail": "loredan.covaci@bitsofware.ro",
"C_BPartner_Location_ID": "1016540",
"Length": "0",
"Width": "0",
"Height": "0",
"Refund": "restituire",
"CostCentre": "centru cost",
"Options": "optiuni",
"Packing": " packing",
"PersonalDate": "date personale"
}
Prepare Courier Data:
{
"ShipmentType": "ST_",
"Weight": "0",
"NoPackages": "2",
"IsEnvelope": "N",
"ShipmentPayer": "D",
"CashOnDeliveryAmt": "",
"CashOnDeliveryPayer": "",
"DeclaredAmt": "",
"SalesRep_ID": "1010025",
"Observations": "observatii 123",
"ContentText": "",
"Length": "30",
"Width": "3",
"Height": "3",
"Refund": "restituire",
"CostCentre": "centru cost",
"Options": "optiuni",
"Packing": " packing",
"PersonalDate": "date personale"
}
JSON Examples:
Get Courier Data:
{
"C_BPartner_Location_ID": "1019056",
"AD_User_ID": "1012943",
"Phone": "078654654654",
"EMail": "",
"ShipmentType": "02",
"IsCashOnDelivery": "Y",
"CashOnDeliveryMethod": "1",
"IsSaturdayDelivery": "Y",
"IsReturnOtherDocuments": "N",
"DocDescription": "document de returnat",
"IsInsurance": "N",
"InsuredValue": "3323",
"ShipmentPayer": "1",
"IsEnvelope": "N",
"NoPackages": "2",
"Weight": "0",
"ContentText": "continut 32131312",
"ShipperReference": ""
}
Prepare Courier Data:
{
"ShipmentType": "02",
"IsCashOnDelivery": "Y",
"CashOnDeliveryMethod": "1",
"IsSaturdayDelivery": "Y",
"IsReturnOtherDocuments": "N",
"DocDescription": "document de returnat",
"IsInsurance": "N",
"InsuredValue": "8",
"ShipmentPayer": "1",
"IsEnvelope": "N",
"NoPackages": "2",
"Weight": "0",
"ContentText": "continut asd ",
"ShipperReference": "ref"
}
JSON Examples:
Get Courier Data:
{
"NoPackages": "1",
"LabelFormatType": "A4_2x2",
"IsLabelPrint": "Y",
"IsCustomLabel": "N",
"DateDelivered": "2020-07-20",
"ContentText": "reactivi",
"Reference": " zxcxzczx",
"Amount": "123",
"R_PnRef": "dasdsd",
"ServiceType": "",
"ServiceInfo": "",
"IsDirectPrint": "N",
"ServiceType1": "",
"ServiceInfo1": "",
"ServiceType2": "",
"ServiceInfo2": "",
"ServiceType3": "",
"ServiceInfo3": "",
"ServiceType4": "",
"ServiceInfo4": "",
"ServiceType5": "",
"ServiceInfo5": "",
"ServiceType6": "",
"ServiceInfo6": "",
"ServiceType7": "",
"ServiceInfo7": "",
"ServiceType8": "",
"ServiceInfo8": "",
"ServiceType9": "",
"ServiceInfo9": ""
}
Prepare Courier Data:
{
"NoPackages": "5",
"LabelFormatType": "A4_2x2",
"ContentText": "reactivi",
"Reference": "123zxcxzczx",
"Amount": "3233",
"R_PnRef": "dasdsd3123123123123",
"ServiceType": "",
"ServiceInfo": "",
"ServiceType1": "",
"ServiceInfo1": "",
"ServiceType2": "",
"ServiceInfo2": "",
"ServiceType3": "",
"ServiceInfo3": "",
"ServiceType4": "",
"ServiceInfo4": "",
"ServiceType5": "",
"ServiceInfo5": "",
"ServiceType6": "",
"ServiceInfo6": "",
"ServiceType7": "",
"ServiceInfo7": "",
"ServiceType8": "",
"ServiceInfo8": "",
"ServiceType9": "",
"ServiceInfo9": ""
}
JSON Examples:
Get Courier Data:
{
"NoPackages": "2",
"NoEnvelopes": "0",
"LocationID": "0",
"Weight": "0",
"CashOnDeliveryAmt": "0",
"InsuredValue": "0",
"LockerID": "",
"CourierAccountID": "0",
"Observations": "observatii",
"IsOversize": "N",
"IsPickupAndReturn": "N",
"IsSaturdayDelivery": "Y",
"IsSameDayDelivery": "Y"
}
Prepare Courier Data:
{
"NoPackages": "2",
"NoEnvelopes": "0",
"LocationID": "0",
"Weight": "0",
"CashOnDeliveryAmt": "0",
"InsuredValue": "0",
"LockerID": "",
"CourierAccountID": "0",
"Observations": "observatii",
"IsOversize": "N",
"IsPickupAndReturn": "N",
"IsSaturdayDelivery": "Y",
"IsSameDayDelivery": "Y"
}
JSON Examples:
Get Courier Data:
{
"PackageType": "1",
"ServiceType": "10",
"ServiceInfo": "SWAP",
"ServiceInfo1": "",
"ServiceInfo2": "",
"CashOnDeliveryMethod": "1",
"AWBPayment": "1",
"CashOnDeliveryAmt": "12",
"InsuredValue": "10",
"PickupTime": "",
"Reference": "",
"Observations": "observatie",
"PriceObservation": "observatie pret",
"CurrencyCode": "ron",
"ClientObservation": "observatie client",
"DateOrdered": "2021-11-29 10:05:40",
"StartDate": "2021-11-29 14:50:22",
"EndDate": "2021-1130 18:30:50",
"IsGeniusOrder": "N",
"IsThirdPartyPickup": "Y",
"C_BPartnerTo_ID": "1000056",
"C_BPartner_LocationTo_ID": "1000134",
"AD_UserTo_ID": "1015128"
}
Prepare Courier Data:
{
"PackageType": "1",
"ServiceType": "10",
"ServiceInfo": "SWAP",
"ServiceInfo1": "",
"ServiceInfo2": "",
"CashOnDeliveryMethod": "1",
"AWBPayment": "1",
"CashOnDeliveryAmt": "12",
"InsuredValue": "10",
"PickupTime": "",
"Reference": "",
"Observations": "observatie",
"PriceObservation": "observatie pret",
"CurrencyCode": "ron",
"ClientObservation": "observatie client",
"DateOrdered": "2021-11-29 10:05:40",
"StartDate": "2021-11-29 14:50:22",
"EndDate": "2021-1130 18:30:50",
"IsGeniusOrder": "N",
"IsThirdPartyPickup": "Y",
"C_BPartnerTo_ID": "1000056",
"C_BPartner_LocationTo_ID": "1000134",
"AD_UserTo_ID": "1015128"
}
JSON Examples:
Get Courier Data:
{
"PlannedDate": "2021-12-06 12:02:00.0",
"PickupTime": "",
"ServiceType": "N",
"IsRequestPickup": "Y",
"IsCustomsDeclarable": "N",
"DeclaredValue": "0",
"CurrencyCode": "",
"Description": "COC 1000500 ",
"Incoterm": "CIF",
"UnitOfMeasurement": "metric",
"NotificationType": "email",
"EMail": "alin.cruceru@wips.ro",
"LanguageCode": "",
"CountryCode": "",
"Message": ""
}
Prepare Courier Data:
{
"PlannedDate": "2021-12-06 12:02:00.0",
"PickupTime": "",
"ServiceType": "N",
"IsRequestPickup": "Y",
"IsCustomsDeclarable": "N",
"DeclaredValue": "0",
"CurrencyCode": "",
"Description": "COC 1000500 ",
"Incoterm": "CIF",
"UnitOfMeasurement": "metric",
"NotificationType": "email",
"EMail": "alin.cruceru@wips.ro",
"LanguageCode": "",
"CountryCode": "",
"Message": ""
}
JSON Examples:
Get Courier Data:
{
"C_BPartner_Location_ID": "1041058",
"AD_User_ID": "1012943",
"Phone": "078654654654",
"EMail": "loredancovaci@gmail.com",
"ShipDate": "2022-10-03 00:00:00",
"DateOrdered": "2022-10-03 00:00:00",
"CashOnDeliveryAmt": "200",
"PaidAmt": "0",
"ShipmentPayer": "SENDER",
"SourceChannel": "ONLINE",
"ShipmentReference": "COC 1000630",
"ShipperReference": "sender reference",
"ShipmentType": "FORWARD",
"PaymentType": "CASH",
"IsInsurance": "N",
"IsSaturdayDelivery": "N",
"ProductCategory": "Standard Delivery",
"CashOnDeliveryReference": "",
"Reference": "reference",
"ContentText": "content text",
"PersonalDate": "",
"Comments": "",
"IsMorningDelivery": "N",
"IsOpenPackage": "N",
"IsPriorityDelivery": "N",
"IsOversize": "N",
"Courier": "FAN"
}
Prepare Courier Data:
{
"CashOnDeliveryAmt": "200",
"PaidAmt": "0",
"ShipmentPayer": "SENDER",
"SourceChannel": "ONLINE",
"ShipmentReference": "COC 1000630",
"ShipperReference": "sender reference",
"ShipmentType": "FORWARD",
"PaymentType": "CASH",
"IsInsurance": "N",
"IsSaturdayDelivery": "N",
"ProductCategory": "Standard Delivery",
"CashOnDeliveryReference": "",
"Reference": "reference",
"ContentText": "content text",
"PersonalDate": "",
"Comments": "",
"IsMorningDelivery": "N",
"IsOpenPackage": "N",
"IsPriorityDelivery": "N",
"IsOversize": "N",
"Courier": "FAN"
}
JSON Examples:
Get Courier Data:
{
"ServiceType": "1",
"ShipmentPayer": "1",
"ShipDate": "2025-06-10T14:43:39Z",
"ShipDateEnd": "2025-06-10T14:43:39Z",
"C_BPartner_Location_ID": "1025063",
"AD_User_ID": "1065710",
"Courier": "117",
"CourierExternalOrderID": "ABC id API 123",
"LabelFormatType": "A6",
"NoPackages": "1",
"NoEnvelopes": "1",
"NoPalettes": "1",
"Weight": "2",
"ShipmentContent": "COC 1000849",
"Packing": "Test Impachetare",
"Observations": "Test Observatii",
"BankRepaymentAmount": "333",
"BankRepaymentCurrency_ID": "346",
"BankRepaymentCurrency": "RON",
"Bank": "Banca Transilvania",
"IBAN": "RO48PORL9256978936627265",
"DeclaredAmt": "444",
"DeclaredAmtCurrency_ID": "346",
"DeclaredAmtCurrency": "RON",
"InsuranceAmt": "555",
"InsuranceAmtCurrency_ID": "346",
"InsuranceAmtCurrency": "RON",
"CashOnDeliveryAmt": "333",
"CashOnDeliveryCurrency_ID": "346",
"CashOnDeliveryCurrency": "RON",
"IsCashOnDeliveryPayoutToLocation": "Y",
"IsOversize": "Y",
"IsOpenPackage": "Y",
"IsSaturdayDelivery": "Y",
"IsReturnPackage": "Y",
"IsReturnVoucher": "Y",
"IsCourierReturnDocuments": "Y",
"CourierReturnDocumentsComments": "com retur doc",
"Text1": "text rer 1",
"Text2": "text ref 2",
"Text3": "text ref 3",
"Text4": "text ref 4",
"Incoterm": "DAP",
"LockerID": "4578"
}
Prepare Courier Data:
{
"ServiceType": "1",
"ShipmentPayer": "1",
"ShipDate": "2025-06-10T14:43:39Z",
"ShipDateEnd": "2025-06-10T14:43:39Z",
"C_BPartner_Location_ID": "1078335",
"AD_User_ID": "1067172",
"Courier": "117",
"CourierExternalOrderID": "ABC id API 123",
"LabelFormatType": "A6",
"NoPackages": "1",
"NoEnvelopes": "1",
"NoPalettes": "1",
"Weight": "2",
"ShipmentContent": "COC 1000849",
"Packing": "Test Impachetare",
"Observations": "Test Observatii",
"BankRepaymentAmount": "333",
"BankRepaymentCurrency_ID": "346",
"BankRepaymentCurrency": "RON",
"Bank": "Banca Transilvania",
"IBAN": "RO48PORL9256978936627265",
"DeclaredAmt": "444",
"DeclaredAmtCurrency_ID": "346",
"DeclaredAmtCurrency": "RON",
"InsuranceAmt": "555",
"InsuranceAmtCurrency_ID": "346",
"InsuranceAmtCurrency": "RON",
"CashOnDeliveryAmt": "333",
"CashOnDeliveryCurrency_ID": "346",
"CashOnDeliveryCurrency": "RON",
"IsCashOnDeliveryPayoutToLocation": "Y",
"IsOversize": "Y",
"IsOpenPackage": "Y",
"IsSaturdayDelivery": "Y",
"IsReturnPackage": "Y",
"IsReturnVoucher": "Y",
"IsCourierReturnDocuments": "Y",
"CourierReturnDocumentsComments": "com retur doc",
"Text1": "text rer 1",
"Text2": "text ref 2",
"Text3": "text ref 3",
"Text4": "text ref 4",
"Incoterm": "DAP",
"LockerID": "4578"
}