Skip to main content

sgrAtualizarDocumentoAE

Updates the fields of the documents linked to the Shipment Authorization.

SoapAction

PARAMETERS

FieldTypeRequired?Description
keyaccessstringYesKey returned by the sgrLogin method.
cdpasintegerYesPAS code, returned by the sgrListPASUser method
cdclienteopentechintegerYesCustomer code, returned by the sgrListCompaniesPASUsers method.
cdviagemintegerYesNumber of the shipment authorization to which the document was linked.
tpdocintegerYesDocument type code. This code is returned by sgrListDocumentType.
nrdocstringYesNumber of the document to be changed.
cdfieldintegerYesDefines the field of the document to be updated. Enter the value: 1-Customer nrcontrolfield1 of sgrDocumentAE 2-Customer nrcontrolfield2 of sgrDocumentAE 3-Customer nrcontrolfield3 of sgrDocumentAE 4-Customer nrcontrolfield4 of sgrDocumentAE 5-Customer nrcontrolfield5 of sgrDocumentAE 6-Customer nrcontrolfield6 of sgrDocumentAE 7-Start of loading/unloading 8-. End of loading/unloading 9-Arrival at delivery/collection point 10-Expected date of departure 12-Expected date 13-Defines whether exchange of invoice (substitute document) is allowed 14-Substitute document number 15-Edit document number 16-Available for new implementations 17-Change docsclient. nrcontrole7 18-Change docscliente.nrcontrole8 19-Change docscliente.nrcontrole9 20-Change docscliente.nrcontrole10
contentstringYesValue to be entered in the specified field. For field codes 1 to 6, the field allows a string of up to 20 characters. When using field codes 7, 8 and 9, the value of this field must be a valid date in the “YYYY-MM-DD HH:MM” standard. If it is 13, enter 1 if it allows document substitution, or 0 if it does not). And if 14 is entered in the cdfield, the content parameter receives the number of the replacement document.
nrProgramacaostringNoNumber of the schedule to which the document was linked, to enable the start and end date of loading to be changed.

EXAMPLE:

@nrDoc = 1234

@cdField = 13

@context = 1

Result: The Flag that allows the document '1234' to be exchanged will be changed to marked;

@nrDoc = 4321

@cdField = 14

@context = 9876

Result: Document 4321 will have the information that it has been replaced by document 9876;

@nrDoc = 1234

@cdField = 15

@context = ABCD

Result: The document number '1234' will be changed to 'ABCD';

METHOD RETURN:

ReturnDataset: If the parameters are correct, the desired field is changed and the property will display

FieldTypeDescription
CDALTERACAOintegerChange request code

ReturnDescription: If there is an error when executing the method, the property will display:

ErrorDescription
The field code (cdfield) entered is not validYou must enter a value between 1 and 10 (to check each value, go back to the description of this method's parameters).
It is mandatory to enter the number of the shipment authorization.
Shipment authorization/Document not foundThe shipment authorization number has not been found. Check the information and try again.
The change history could not be saved. Try again.This error may be caused by an incorrect parameter, the field to be corrected will be indicated in the returnDataset property. This means you need to check the parameters and run the method again. It may also indicate a timeout or a dropped connection to the database. It is necessary to pass on the data entered, as well as the method name, issue time and customer code to the following e-mail address: [email protected] so that the error can be validated.
The change could not be made.Please try again.
Date entered in the content field is not valid.The date must be entered in the “YYYY-MM-DD HH:MM” pattern.
As the trip is not a tracking or logistics trip, it is not possible to change the data.