sgrIncluirDocumentosEntregas
Include documents for deliveries without shipping authorization.
PARAMETERS
| Field | Type | Required? | Description |
|---|---|---|---|
| accesskey | string | Yes | Key returned by the sgrLogin method. |
| cdpas | integer | Yes | PAS code, returned by the sgrListaPASUsuario method |
| cdcliente | integer | Yes | Client code, returned by the sgrListaEmpresasPASUsuario method. |
| cdtransp | integer | Yes | Transport company code, returned by the sgrListaTransportadoras method. If there is no code, send the client's own code [cdcliente]. |
| dtemissaodoc | string | Yes | Document issue date. Format “YYYY-MM-DD”. |
| documents | list | Yes | List of documents. To use this parameter, you must create an array of the sgrDocumentoProdutosSeqV2 type. |
METHOD RETURN:
If the parameters are filled in correctly, the document is created and the ReturnDataset property will display:
| Field | Type | Description |
|---|---|---|
| CDDOC | integer | Document code. |
| NRDOC | string | Document number |
| TPDOC | smallint | Document type |
| FLSITUACAO | smallint | Document status |
| DSSITUACAO | string | Document status (description) |
ReturnDescription: If there is an error executing the method, the property will display:
| Error | Description |
|---|---|
| There are document validation errors. Check. | For this error, the method may contain the details listed in Table 4. |
| There was an unhandled error when including the document(s). Try again! | This error may be caused by an incorrect parameter. The field to be corrected will be indicated in the returnDataset property. Therefore, it is necessary to check the parameters and run the method again. It may also indicate a timeout or a connection failure with the database. It is necessary to forward the information provided, as well as the method name, the time of issue and the client code to the email: [email protected] so that the error can be validated. |