### API Response (All Fields) Source: https://docs.drenvio.com/en/profile/consultar-datos-del-perfil Example of a successful API response when requesting all profile fields. It includes status code, success status, and detailed user information. ```json { "code": 200, "success": true, "res": { "balance": 1000, "created_at": "2024-08-29T23:09:31.892Z", "user": "auth0|428g65ab1174d50068422000", "security": { "senders": [ "87350", "66250", "57800" ], "senders_verified": true, "identity_verified": true, "international_senders": true, "identity_verified_by_document": true, "vip": true }, "app_country": "MX", "profile": { "email": "john@drenvio.com", "phone": "8681696700", "company": "Drenvio", "name": "John Doe" } } } ``` -------------------------------- ### API Request with Parameters Source: https://docs.drenvio.com/en/profile/consultar-datos-del-perfil Send this GET request to retrieve specific profile information for the logged-in user. All optional parameters are included to fetch all available details. ```http GET https://prod.api-drenvio.com/v2/users/profile/details?balance=true&created_at=true&user=true&app_country=true&security=true&profile=true ``` -------------------------------- ### Get Profile Details Source: https://docs.drenvio.com/en/profile/consultar-datos-del-perfil Retrieves the profile information of the authenticated user. Optional parameters can be included to fetch specific details. If no parameters are provided, all available information is returned. ```APIDOC ## GET /v2/users/profile/details ### Description Retrieves the profile information of the authenticated user. This endpoint can be accessed in both production and sandbox environments. ### Method GET ### Endpoint - Production: `https://prod.api-drenvio.com/v2/users/profile/details` - Sandbox: `https://sandbox.api-drenvio.com/v2/users/profile/details` ### Parameters #### Query Parameters - **balance** (Boolean) - Optional - Returns the user’s available balance in MXN (Mexico) or COP (Colombia). - **created_at** (Boolean) - Optional - Returns the date and time when the user account was created. - **user** (Boolean) - Optional - Returns the unique identifier (User ID) associated with the user’s account. - **app_country** (Boolean) - Optional - Returns the country where the authenticated user is registered. - **security** (Boolean) - Optional - Returns security-related details, such as sender verification and account status. - **profile** (Boolean) - Optional - Returns the user’s profile information, including name, email, and phone number. ### Request Example ``` GET https://prod.api-drenvio.com/v2/users/profile/details?balance=true&created_at=true&user=true&app_country=true&security=true&profile=true ``` ### Response #### Success Response (200) - **code** (Integer) - HTTP status code. - **success** (Boolean) - Indicates if the request was successful. - **res** (Object) - Contains the profile data. - **balance** (Number) - The user’s available balance. - **created_at** (String) - The date and time the user account was created. - **user** (String) - The unique identifier of the user. - **security** (Object) - Security-related details. - **senders** (Array) - List of postal codes representing sender addresses. - **senders_verified** (Boolean) - Indicates if sender verification is enabled. - **identity_verified** (Boolean) - Indicates if the account has been verified. - **international_senders** (Boolean) - Indicates if international shipments are allowed. - **identity_verified_by_document** (Boolean) - Indicates if identity verification was completed using documents. - **vip** (Boolean) - Indicates if the user has VIP status. - **app_country** (String) - The country where the authenticated user is registered. - **profile** (Object) - User’s profile information. - **email** (String) - The user’s email address. - **phone** (String) - The user’s phone number. - **company** (String) - The name of the company associated with the user. - **name** (String) - The full name of the user. #### Response Example ```json { "code": 200, "success": true, "res": { "balance": 1000, "created_at": "2024-08-29T23:09:31.892Z", "user": "auth0|428g65ab1174d50068422000", "security": { "senders": [ "87350", "66250", "57800" ], "senders_verified": true, "identity_verified": true, "international_senders": true, "identity_verified_by_document": true, "vip": true }, "app_country": "MX", "profile": { "email": "john@drenvio.com", "phone": "8681696700", "company": "Drenvio", "name": "John Doe" } } } ``` ``` -------------------------------- ### Shipment Quote API Request Body Example Source: https://docs.drenvio.com/en/guides/cotizar-envio Example JSON body for requesting a shipment quote. Ensure carrier names match availability for origin and type. ```json { "type": "National", "origin": { "country": "MX", "postal_code": "64000" }, "destination": { "country": "MX", "postal_code": "64380" }, "packages": [ { "weight": 1, "height": 10, "width": 10, "length": 10, "volumetric": 0.2, "type": "box", "main_weight": 1 } ], "carriers": ["fedex", "estafeta", "ampm", "dhl"], "insurance": 0 } ``` -------------------------------- ### Shipping Quote API Response Example Source: https://docs.drenvio.com/en/guides/cotizar-envio This JSON structure represents a typical response from a shipping quote API, detailing various shipping options with their respective prices, delivery times, and carrier information. ```json [ { "ShippingId": "N4", "carrier": "quiken", "service": "ground", "service_id": "quiken_mx_D-C01_ground", "price": 92, "currency": "MXN", "days": "Siguiente día", "extra": "Next Day Guaranteed", "metadata": {} }, { "ObjectId": "local_express", "ShippingId": "N4", "carrier": "quiken", "service": "ground", "service_id": "quiken_mx_D-C01_ground36hrs", "price": 69, "currency": "MXN", "days": "36 horas", "extra": "Next Day - 36 hrs", "metadata": {} }, { "ObjectId": null, "ShippingId": "E1", "carrier": "mensajerosUrbanos", "service": "ground", "service_id": "mensajerosUrbanos_mx_A-P01_ground", "insurance": 0, "price": 117.29, "currency": "MXN", "days": "2 horas", "metadata": {} } ] ``` -------------------------------- ### Shipping Quotes API Response Example Source: https://docs.drenvio.com/en/guides/cotizar-envio This JSON object represents a typical response from the shipping quotes API. It lists various shipping options from different carriers, including their service IDs, prices, estimated delivery days, and carrier-specific metadata. ```json [ { "ObjectId": null, "ShippingId": "G1", "carrier": "fedex", "service_id": "fedex_mx_D-C03_ground", "service": "ground", "price": 120, "days": "3 a 5 días", "insurance": 0, "currency": "MXN", "metadata": { "extended_area": { "extended_area": false, "origin": false, "destination": false } } }, { "ObjectId": null, "ShippingId": "G1", "carrier": "fedex", "service_id": "fedex_mx_P-C00_ground", "service": "ground", "price": 94.55, "days": "3 a 5 días", "insurance": 0, "currency": "MXN", "metadata": { "account_id": "648a19d789be2a38ae8eb0d2", "account_price": 1, "extended_area": { "extended_area": false, "origin": false, "destination": false } } }, { "ObjectId": null, "ShippingId": "G1", "carrier": "fedex", "service_id": "fedex_mx_D-C03_express", "service": "express", "price": 145, "days": "1 a 2 días", "insurance": 0, "currency": "MXN", "metadata": { "extended_area": { "extended_area": false, "origin": false, "destination": false } } }, { "ObjectId": null, "ShippingId": "G1", "carrier": "fedex", "service_id": "fedex_mx_P-C00_express", "service": "express", "price": 86.52, "days": "1 a 2 días", "insurance": 0, "currency": "MXN", "metadata": { "account_id": "648a19d789be2a38ae8eb0d2", "account_price": 1, "extended_area": { "extended_area": false, "origin": false, "destination": false } } }, { "ObjectId": "T0", "ShippingId": "N6", "carrier": "estafeta", "service": "metropolitano", "currency": "MXN", "price": 68, "insurance": 0, "service_id": "estafeta_mx_D-C03_metropolitano", "days": "2 días", "metadata": { "extended_area": { "extended_area": false, "origin": false, "destination": false }, "ocurre": false } }, { "ObjectId": "78", "ShippingId": "N6", "carrier": "estafeta", "service": "ground", "currency": "MXN", "price": 120, "insurance": 0, "service_id": "estafeta_mx_D-C03_terrestre", "days": "5 días", "metadata": { "extended_area": { "extended_area": false, "origin": false, "destination": false }, "ocurre": false } }, { "ObjectId": "D8", "ShippingId": "N6", "carrier": "estafeta", "service": "2_days", "currency": "MXN", "price": 134, "insurance": 0, "service_id": "estafeta_mx_D-C03_2dias", "days": "2 días", "metadata": { "extended_area": { "extended_area": false, "origin": false, "destination": false }, "ocurre": false } }, { "ObjectId": "60", "ShippingId": "N6", "carrier": "estafeta", "service": "next_day", "currency": "MXN", "price": 135, "insurance": 0, "service_id": "estafeta_mx_D-C03_next_day", "days": "1 día", "metadata": { "extended_area": { "extended_area": false, "origin": false, "destination": false }, "ocurre": false } }, { "ShippingId": "E1", "ObjectId": "ECONOMY SELECT DOMESTIC", "carrier": "dhl", "service": "ground", "service_id": "dhl_mx_D-C01_ground", "insurance": 0, "currency": "MXN", "days": "1 a 2 días", "metadata": { "dhl": { "productCode": "G", "productName": "ECONOMY SELECT DOMESTIC" } }, "price": 170 }, { "ShippingId": "E1", "ObjectId": "ECONOMY SELECT DOMESTIC", "carrier": "dhl", "service": "ground", "service_id": "dhl_mx_P-C00_ground", "insurance": 0, "currency": "MXN", "days": "1 a 2 días", "metadata": { "account_id": "648a1a9d89be2a38ae8eb21a", "account_price": 1, "dhl": { "productCode": "G", "productName": "ECONOMY SELECT DOMESTIC" } }, "price": 138.14 }, { "ShippingId": "E1", "ObjectId": "EXPRESS DOMESTIC", "carrier": "dhl", "service": "express", "service_id": "dhl_mx_D-C01_express", "insurance": 0, "currency": "MXN", "days": "1 a 2 días", "metadata": { "dhl": { "productCode": "N", "productName": "EXPRESS DOMESTIC" } }, "price": 175 }, { "ShippingId": "E1", "ObjectId": "EXPRESS DOMESTIC", "carrier": "dhl", "service": "express", "service_id": "dhl_mx_P-C00_express", "insurance": 0, "currency": "MXN", "days": "1 a 2 días", "metadata": { "account_id": "648a1a9d89be2a38ae8eb21a", "account_price": 1, "dhl": { "productCode": "N", "productName": "EXPRESS DOMESTIC" } }, "price": 138.14 }, { "ObjectId": "next_day_guaranteed", "ShippingId": "E1", "carrier": "dhl", "service": "next_day", "service_id": "dhl_mx_D-C01_next_day", "insurance": 0, "currency": "MXN", "days": "1 día", "metadata": { "dhl": { "productCode": "ND", "productName": "NEXT DAY DOMESTIC" } }, "price": 200 } ] ``` -------------------------------- ### Production Environment URL Source: https://docs.drenvio.com/en/profile/consultar-datos-del-perfil Use this URL to retrieve profile information in the production environment. ```text https://prod.api-drenvio.com/v2/users/profile/details ``` -------------------------------- ### Sandbox Environment URL Source: https://docs.drenvio.com/en/profile/consultar-datos-del-perfil Use this URL to retrieve profile information in the sandbox environment. ```text https://sandbox.api-drenvio.com/v2/users/profile/details ``` -------------------------------- ### DrEnvío API Sandbox Endpoint Source: https://docs.drenvio.com/en/guides/cotizar-envio Use this URL for testing and development in the sandbox environment. ```text https://sandbox.api-drenvio.com/v2/shipments/rate ``` -------------------------------- ### DrEnvío API Production Endpoint Source: https://docs.drenvio.com/en/guides/cotizar-envio Use this URL for real shipment processing in the production environment. ```text https://prod.api-drenvio.com/v2/shipments/rate ``` -------------------------------- ### Available Carriers for Mexico (MX) - International Shipments Source: https://docs.drenvio.com/en/guides/cotizar-envio List of carriers valid for international shipments originating from Mexico. ```json ["dhl", "fedex", "ups", "estafeta"] ``` -------------------------------- ### Available Carriers for Mexico (MX) - National Shipments Source: https://docs.drenvio.com/en/guides/cotizar-envio List of carriers valid for national shipments originating from Mexico. ```json [ "noventa9Minutos", "aExpress", "ampm", "carssa", "coordinadora", "dhl", "estafeta", "fedex", "ivoy", "mensajerosUrbanos", "paquetexpress", "quiken", "redpack", "scm", "sendex", "tracusa", "uber", "ups", "vencedor", "jtexpress", "entrega", "borzo", "tresguerras", "treggo", "pickit", "test", "imile", "afimex", "ptx" ] ``` -------------------------------- ### Available Carriers for Colombia (CO) - International Shipments Source: https://docs.drenvio.com/en/guides/cotizar-envio List of carriers valid for international shipments originating from Colombia. ```json ["dhl", "fedex"] ``` -------------------------------- ### Available Carriers for Colombia (CO) - National Shipments Source: https://docs.drenvio.com/en/guides/cotizar-envio List of carriers valid for national shipments originating from Colombia. ```json [ "fedex", "interrapidisimo", "redServi", "serviEntrega", "mensajerosUrbanos", "noventa9Minutos", "dhl", "coordinadora", "moova", "deprisa", "picap", "tcc", "envia" ] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.