sgrRetornaProgramacao
Returns the schedule data posted in the system.
PARAMETERS:
| Field | Type | Req. | Description |
|---|---|---|---|
| keyaccess | string | Yes | Key returned by the sgrLogin method. |
| cdpas | integer | Yes | PAS code, returned by the sgrListaPASUsuario method |
| cdcliente | integer | Yes | Customer code, returned by the sgrListaEmpresasPASUsuario method. |
| cdprogramacao* | integer | Yes | Code of the program to be consulted. |
| nrprogramacao* | integer | Yes | Number of the schedule to be consulted. |
METHOD RETURN:
*ReturnDataset: If the parameters are correct, the dataset will display two tables:
sgrTB:
| Field | Type | Description |
|---|---|---|
| cdProgramming | int | Programming code |
| nrProgramacao | string | Programming number |
| cdProduct | int | Product code |
| vlWeight | double | Weight of the load to be transported, in kg or t depending on the unit of measurement configured in [Programming parameters]. |
| vlCubage | double | Cubage of the cargo to be transported, in m³. |
| vlVolume | double | Volume of cargo to be transported. |
| cdCargoType | int | Cargo type code. |
| cdPackingType | int | Cargo packing type code. |
| cdPFJLocalLoading | string | CPF or CNPJ registration number of the loading location. |
| dtPrevIniCarreg | DateTime | Estimated date/time for the start of loading. |
| dtPrevEndLoad | DateTime | Estimated date/time for the end of loading. |
| cdProgrammingType | int | Programming type code. |
| dtConfirmation | DateTime | Date on which it will be confirmed whether the schedule will take place or not. |
| cdTransp | int | Carrier code. |
| cdVeicType | int | Vehicle type code. |
| cdBodyType | int | Body type code. |
| cdTranspGroup | int | Carrier group code. |
| vlMinimumCapacity | double | Minimum vehicle capacity. |
| vlMinimumCubage | double | Minimum vehicle cubage. |
| cdOpIncl | int | Code of the operator responsible for including the schedule. |
| dtIncl | Datetime | Date of schedule inclusion |
| flsituacao | Int | Scheduling status: 0 - NEW, 1 - SCHEDULED, 2 - REFUSED, 3 - TRAVELING, 4 - LOADING, 5 - CLOSED, 6 - CANCELLED, 7 - RESCHEDULED. |
| cdCli | int | Customer code |
| vlLoadWeight | double | Load weight, in kg or t depending on the unit of measurement configured in [Programming parameters]. |
| vlLoadCubage | double | Load cubage, in m³. |
| vlLoadVolume | double | Load volume. |
| cdPFJLocalBaixa | int | Code of the local of low. |
| dtRealIniCarreg | Datetime | Actual start date of loading (Arrival). |
| dtRealEndLoad | Datetime | Actual end of load date (Exit). |
| dsDischargeDetail | string | Schedule discharge detail. |
| cdOpDischarge | int | Discharge user code. |
| dtBaixa | string | CPF or CNPJ registration number of the cargo shipper. |
| cdMotivoCancelaProg | string | Field for free use by the customer. |
| dsCancelDetail | string | Cancellation detail. |
| cdOpCancel | int | Code of the operator who canceled the schedule. |
| dtCancel | Datetime | Code of the reason for canceling the schedule. |
| cdReasonRefusalProg | int | Code for the reason for refusing the schedule. . |
| dsRefusalDetail | string | Refusal detail. |
| cdOpRefusal | int | Code of the operator who refused the schedule. |
| ddDenial | Datetime | Date the schedule was denied. |
| cdOpAlter | int | Code of the operator responsible for the last change. |
| dtAlter | Datetime | Date of last change. |
| cdVeic, cdCarreta1, cdCarreta2 | int | Vehicle code. |
| cdMot1 | int | Driver code |
| dtAgendamento | Datetime | Scheduling date |
| cdOpSchedule | int | Code of the operator who made the appointment. |
| cdShipper | int | Shipper code |
| nrControleCarga, dsControleProgramacao (1 to 10) | string | Field for free use by the client. *This field may be mandatory depending on what has been configured for the client. |
| flSitLocalCarreg | int | Service location status |
| dtLaixaLocalCarreg | Datetime | Charging location write-off date |
| dsMotDischargeLocalCarreg | String | Discharge reason |
| cdOpLaixaLocalCarreg | Int | Code of the operator who carried out the write-off |
| dsBooking | string | Reservation of spaces for cargo on the ship (Square Booking) |
| dsCte | string | CT-e code |
| cdTipoServico | Int | Programming service type code. |
| cdContainer (1 to 3) | int | Programming container code |
| cdReservation | int | Vehicle reservation code. |
| nrSolicColeta | string | Collection request number. |
| dsShip | string | Ship. |
| nrTrip | string | Trip number generated |
| dsDirection | string | Direction. |
| dsBU | string | BU. |
| dsObsOpen | string | Observation Open. |
| cdObsClosed | int | Observation Closed. |
| dsLacresContainer | string | Description |
| cdRespUnit | int | Responsible unit |
| cdReasonCancelSchedule | int | Reason code for canceling the schedule. |
| dsDetailCancelSchedule | String | Description |
| cdOpCancelSchedule | int | Code of the operator who canceled the schedule. |
| dtCancelSchedule | datetime | Date the schedule was canceled. |
| dtPrevRecalculated | datetime | Estimated date recalculated. |
| vlDistanciaRestante | double | Remaining Distance. |
| vlKmTraveled | double | KmTraveled. |
| vlPredictedDistance | int | Predicted Distance. |
| vlProd | double | Service Location Product Value. |
| dsObs | string | Observations |
| vlLat, vlLong | double | Latitude, Longitude |
| dtArrivalCli | datetime | Customer arrival date |
| dtDepartureCli | datetime | Customer departure date |
sgrTBDest:
| Field | Type | Description |
|---|---|---|
| cdProgramacaoDestinatario | Int | Code of the programming recipient. |
| cdProgramacao | int | Code of the schedule to which the recipient is linked. |
| cdProgrammingOperationType | int | Programming operation type code. |
| cdPFJLocalDescarga | int | Code of the unloading location. |
| dsCliDestino | string | Programming recipient name. |
| cdCidDestination | int | Destination city code. |
| dtPrevArrival | datetime | Estimated date of arrival at destination. |
| cdProduct | Int | Product to be delivered. |
| vlProduct | double | Value of the product to be delivered. |
| nrControlProgramming[1 to 10] | string | Field for free use by the customer. |
| cdCli | Int | Customer code. |
| flSitLocalDescarga | int | Status of the transit location |
| dtLaixaLocalDescarga | datetime | Date of write-off at the transit location. |
| dsMotDischargeLocation | string | Reason for discharging from the transit location |
| cdOpDischargeLocation | Int | Operator responsible for the discharge. |
| flNoteExchange | int | This field indicates whether the document allows invoices to be exchanged (1-Yes, 2-No). |
| cdDoc | int | Document code created when the trip was created with Scheduling. |
| dtPrevDeparture | datetime | Expected date/time for the end of passage at the unloading point. |
| dtPrevRecalculated | datetime | Estimated date recalculated. |
| vlDistanceRestant | double | Distance Remaining. |
| vlKmTraveled | double | KmTraveled. |
| vlPredictedDistance | double | Predicted Distance. |
| vlLat, vlLong | double | Latitude, Longitude |
| dtDepartureCli | datetime | Expected date of departure from the transit point |
| dtArrivalCli | datetime | Estimated date of arrival at the transit point |
| flSituation | int | Situation: 0 = inactive and 1 = active |