{"id":29027110,"url":"https://github.com/saulmoralespa/servientrega-webservice-php","last_synced_at":"2025-08-20T02:05:23.678Z","repository":{"id":62540600,"uuid":"188136648","full_name":"saulmoralespa/servientrega-webservice-php","owner":"saulmoralespa","description":"Web service Servientrega PHP","archived":false,"fork":false,"pushed_at":"2024-01-17T14:14:44.000Z","size":15,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-04T02:12:57.454Z","etag":null,"topics":["colombia","php","servientrega","webservice"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saulmoralespa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-05-23T01:07:22.000Z","updated_at":"2025-05-14T22:19:06.000Z","dependencies_parsed_at":"2024-01-13T04:11:59.583Z","dependency_job_id":"defd21f2-a221-4e39-bd18-2a627c2da61d","html_url":"https://github.com/saulmoralespa/servientrega-webservice-php","commit_stats":{"total_commits":10,"total_committers":3,"mean_commits":"3.3333333333333335","dds":0.6,"last_synced_commit":"e38e21a89dc568ca1058408f264e1931c24d9f96"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/saulmoralespa/servientrega-webservice-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulmoralespa%2Fservientrega-webservice-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulmoralespa%2Fservientrega-webservice-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulmoralespa%2Fservientrega-webservice-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulmoralespa%2Fservientrega-webservice-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saulmoralespa","download_url":"https://codeload.github.com/saulmoralespa/servientrega-webservice-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulmoralespa%2Fservientrega-webservice-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271252993,"owners_count":24726918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["colombia","php","servientrega","webservice"],"created_at":"2025-06-26T06:03:45.687Z","updated_at":"2025-08-20T02:05:23.652Z","avatar_url":"https://github.com/saulmoralespa.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Servientrega Webservice PHP\n============================================================\n\n## Installation\n\nYou will need at least PHP 8.1. We match [officially supported](https://www.php.net/supported-versions.php) versions of PHP.\n\nUse [composer](https://getcomposer.org/) package manager to install the lastest version of the package:\n\n```bash\ncomposer require saulmoralespa/servientrega-webservice-php\n```\n\n```php\n// ... please, add composer autoloader first\ninclude_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';\n\n// import webservice class\nuse Servientrega\\WebService;\n\n$user = 'testajagroup';\n$pwd = 'Colombia1';\n$billingCode = 'SER408';\n$idClient = '900917801';\n\n//optional\n$namePack = 'My shop';\n\n\n$servientrega = new WebService($user, $pwd, $billingCode, $idClient, $namePack);\n\n//Call this method each time you save credentials\n//Token expire every 4 days\n$servientrega-\u003einvalidateToken();;\n```\n\n### Shipping quoting\n\n```php\n$params = [\n            'IdProducto'          =\u003e 2, //1 documento unitario  or 6 mercancía industrial \n            'NumeroPiezas'        =\u003e 1,\n            'Piezas'              =\u003e\n                [\n                    [\n                        'Peso'  =\u003e 19,\n                        'Largo' =\u003e 120,\n                        'Ancho' =\u003e 70,\n                        'Alto'  =\u003e 5,\n                    ]\n                ],\n            'ValorDeclarado'      =\u003e 177400,\n            'IdDaneCiudadOrigen'  =\u003e '05001000',\n            'IdDaneCiudadDestino' =\u003e '76001000',\n            'EnvioConCobro'       =\u003e true,\n            'FormaPago'           =\u003e 2,\n            'TiempoEntrega'       =\u003e 1,\n            'MedioTransporte'     =\u003e 1,\n            'NumRecaudo'          =\u003e 1\n        ];\n  \ntry{\n$data = $this-\u003ewebservice-\u003eliquidation($params);\nvar_dump($data);\n}catch (\\Exception $exception){\n echo $exception-\u003egetMessage();\n}\n```\n\n### CargueMasivoExterno\n\n```php\n\n$params = [\n            'Num_Guia' =\u003e 0,\n            'Num_Sobreporte' =\u003e 0,\n            'Num_Piezas' =\u003e 1,\n            'Des_TipoTrayecto' =\u003e 1,\n            'Ide_Producto' =\u003e 2,\n            'Ide_Destinatarios' =\u003e '00000000-0000-0000-0000-000000000000',\n            'Ide_Manifiesto' =\u003e '00000000-0000-0000-0000-000000000000',\n            'Des_FormaPago' =\u003e 2,\n            'Des_MedioTransporte' =\u003e 1,\n            'Num_PesoTotal' =\u003e 3,\n            'Num_ValorDeclaradoTotal' =\u003e 50000,\n            'Num_VolumenTotal' =\u003e 0,\n            'Num_BolsaSeguridad' =\u003e 0,\n            'Num_Precinto' =\u003e 0,\n            'Des_TipoDuracionTrayecto' =\u003e 1,\n            'Des_Telefono' =\u003e 7700380,\n            'Des_Ciudad' =\u003e 'BOGOTA',\n            'Des_Direccion' =\u003e 'CALLE 5 # 66-44',\n            'Nom_Contacto' =\u003e 'TRIQUINET',\n            'Des_VlrCampoPersonalizado1' =\u003e '',\n            'Num_ValorLiquidado' =\u003e 0,\n            'Des_DiceContener' =\u003e 'PAQUETE ESTANDAR',\n            'Des_TipoGuia' =\u003e 0,\n            'Num_VlrSobreflete' =\u003e 0,\n            'Num_VlrFlete' =\u003e 0,\n            'Num_Descuento' =\u003e 0,\n            'idePaisOrigen' =\u003e 1,\n            'idePaisDestino' =\u003e 1,\n            'Des_IdArchivoOrigen' =\u003e 1,\n            'Des_DireccionRemitente' =\u003e 'TERMINAL MARITIMO S.P.R.B. ED. ALCAZAR BG N. 2 Y 3',\n            'Num_PesoFacturado' =\u003e 0,\n            'Est_CanalMayorista' =\u003e false,\n            'Num_IdentiRemitente' =\u003e '',\n            'Num_TelefonoRemitente' =\u003e '',\n            'Num_Alto' =\u003e 1,\n            'Num_Ancho' =\u003e 1,\n            'Num_Largo' =\u003e 1,\n            'Des_DepartamentoDestino' =\u003e 'CUNDINAMARCA',\n            'Des_DepartamentoOrigen' =\u003e '',\n            'Gen_Cajaporte' =\u003e 0,\n            'Gen_Sobreporte' =\u003e 0,\n            'Nom_UnidadEmpaque' =\u003e 'GENERICA',\n            'Des_UnidadLongitud' =\u003e 'cm',\n            'Des_UnidadPeso' =\u003e 'kg',\n            'Num_ValorDeclaradoSobreTotal' =\u003e 0,\n            'Num_Factura' =\u003e 'FACT-001',\n            'Des_CorreoElectronico' =\u003e 'youremail@gmail.com',\n            'Num_Recaudo' =\u003e 0,\n            'Est_EnviarCorreo' =\u003e false\n        ];\n\ntry{\n$data = $servientrega-\u003eCargueMasivoExterno($params);\nvar_dump($data);\n}catch (\\Exception $exception){\n echo $exception-\u003egetMessage();\n}\n```\n\n### AnularGuias\n\n```php\n$params = [\n            'num_Guia' =\u003e '292710910',\n            'num_GuiaFinal' =\u003e '292710910'\n        ];\n\ntry{\n$data = $servientrea-\u003eAnularGuias($params);\nvar_dump($data);\n}catch (\\Exception $exception){\n echo $exception-\u003egetMessage();\n}\n```\n\n### EncriptarContrasena\n\n```php\n$params = [\n            'strcontrasena' =\u003e 'Colombia1'\n        ];\n\ntry{\n$data = $servientrea-\u003eEncriptarContrasena($params);\nvar_dump($data);\n}catch (\\Exception $exception){\n echo $exception-\u003egetMessage();\n}\n```\n\n### DesencriptarContrasena\n\n```php\n$params = [\n            'strcontrasenaEncriptada' =\u003e 'BpSUh12jBIiWdACDozgOaQ=='\n        ];\n\ntry{\n$data = $servientrea-\u003eDesencriptarContrasena($params);\nvar_dump($data);\n}catch (\\Exception $exception){\n echo $exception-\u003egetMessage();\n}\n```\n\n### ConsultarGuia\n\n```php\n$params = [\n            'NumeroGuia' =\u003e '292710915'\n        ];\n\ntry{\n$data = $servientrea-\u003eConsultarGuia($params);\nvar_dump($data);\n}catch (\\Exception $exception){\n echo $exception-\u003egetMessage();\n}\n```\n\n### EstadoGuia\n\n```php\n$params = [\n           'guia' =\u003e '30007691'\n        ];\n\ntry{\n$data = $servientrea-\u003eEstadoGuia(($params);\nvar_dump($data);\n}catch (\\Exception $exception){\n echo $exception-\u003egetMessage();\n}\n```\n### EstadoGuiaXML\n\n```php\n$params = [\n           'guia' =\u003e '30007691'\n        ];\n\ntry{\n$data = $servientrea-\u003eEstadoGuiaXML(($params);\nvar_dump($data);\n}catch (\\Exception $exception){\n echo $exception-\u003egetMessage();\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaulmoralespa%2Fservientrega-webservice-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaulmoralespa%2Fservientrega-webservice-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaulmoralespa%2Fservientrega-webservice-php/lists"}