sgrCancelarEntrega
Cancel the collection/delivery documents in the shipping authorization.
PARAMETERS
| Field | Type | Required? | Description |
|---|---|---|---|
| keyaccess | string | Yes | Key returned by the sgrLogin method. |
| cdpas | integer | Yes | PAS code, returned by the sgrListPASUser method |
| cdclient | integer | Yes | Customer code, returned by the sgrListCompaniesPASUser method. |
| cdviagem | integer | Yes | Boarding authorization number. |
| nrdoc | string | Yes | Number of the document you want to cancel. |
| nrcnpjcpf | string | Yes | Document recipient's CNPJ/CPF. |
| cdprod | integer | Yes | Product code of the shipment authorization, whose value will be subtracted from the value of the document. This code can be returned by the sgrListaAE method. |
METHOD RETURN:
If the cancellation is successful, the ReturnID field will return the value 0 (zero).
ReturnDescription: If there is an error when executing the method, the property will display:
| Error | Description |
|---|---|
| The collection/delivery has not been canceled. | You should check the data entered and try again. If the problem persists, please forward the parameters, along with the issue time and customer code, to the following e-mail address: [email protected] to validate the error. |
| Product not found in Authorization | The product code must be entered. To check this code, you can use the sgrListProducts method. |
| The product must be entered! | |
| The document entered was not found! | The correct document number must be checked. To check the document data, use the sgrRetornaAEV2 method. |
| The document has already been downloaded! | It will not be possible to cancel the delivery! |