### Get Shipping Methods (cURL) Source: https://developers.cubbo.com/index This snippet demonstrates how to make a GET request to the Cubbo API to retrieve shipping methods for a specific store using cURL. It requires a store ID as a query parameter and authorization via a Bearer Token. ```shell curl --location 'https://api.cubbo.com/v1/shipping-methods?store_id=1' ``` -------------------------------- ### GET /v1/shipping-methods Source: https://developers.cubbo.com/index Retrieves a list of shipping methods available for a specific store. Requires a store ID as a query parameter. ```APIDOC ## GET /v1/shipping-methods ### Description Retrieves a list of shipping methods available for a specific store. This endpoint is useful for displaying shipping options to users during checkout or for internal store management. ### Method GET ### Endpoint /v1/shipping-methods ### Parameters #### Query Parameters - **store_id** (integer) - Required - The unique identifier of the store for which to retrieve shipping methods. ### Request Example ```bash curl --location 'https://api.cubbo.com/v1/shipping-methods?store_id=1' ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the shipping method. - **carrier_name** (string) - The name of the shipping carrier (e.g., "99MINUTOS", "DHL"). - **shipping_type** (string) - The type of shipping (e.g., "national", "international", "pickup"). - **delivery_type** (string) - The estimated delivery timeframe (e.g., "SameDay", "NextDay", "Ground", "International", "Pickup"). - **country** (string) - The country code associated with the shipping method (e.g., "MX"). - **is_cod** (boolean) - Indicates whether Cash on Delivery is available for this shipping method. #### Response Example ```json [ { "id": 1, "carrier_name": "99MINUTOS", "shipping_type": "national", "delivery_type": "NextDay", "country": "MX", "is_cod": false }, { "id": 2, "carrier_name": "TREGGO", "shipping_type": "national", "delivery_type": "SameDay", "country": "MX", "is_cod": false } ] ``` ``` -------------------------------- ### POST Auth - Get Token (cURL) Source: https://developers.cubbo.com/index Obtains an authentication token using client credentials. This token is then used for authenticating subsequent requests to the Cubbo Clients API. It follows the Bearer token standard. ```cURL curl --location 'https://api.cubbo.com/v1/auth/token' \ --data '{ "client_id": "{{clients_api_client_id}}", "client_secret": "{{clients_api_secret}}" }' ``` -------------------------------- ### POST Auth - Get Token Request Body (JSON) Source: https://developers.cubbo.com/index The JSON payload required for the POST /v1/auth/token endpoint to request an authentication token. It includes the client ID and client secret. ```json { "client_id": "{{clients_api_client_id}}", "client_secret": "{{clients_api_secret}}" } ``` -------------------------------- ### POST /v1/auth/token - Authentication Source: https://developers.cubbo.com/index Obtain an authentication token using client credentials. This token is required for authenticating subsequent requests to the API. ```APIDOC ## POST /v1/auth/token ### Description Obtain an authentication token using client credentials. This token is required for authenticating subsequent requests to the API. The API uses Bearer Token authentication. ### Method POST ### Endpoint https://api.cubbo.com/v1/auth/token ### Parameters #### Request Body - **client_id** (string) - Required - Your client ID. - **client_secret** (string) - Required - Your client secret. ### Request Example ```json { "client_id": "{{clients_api_client_id}}", "client_secret": "{{clients_api_secret}}" } ``` ### Response #### Success Response (200 OK) - **token** (string) - The authentication token. - **expires_in** (integer) - The token's expiration time in seconds. - **type** (string) - The type of token, typically "Bearer". #### Response Example ```json { "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjE4YjV5UmRxNkF0TE1yNWRUZHROeSJ9.eyJpc3MiOiJodHRwczovL2N1YmJvLnVzLmF1dGgwLmNvbS8iLCJzdWIiOiJXME1oVEI2ZmR0aVRGaVphRkZUMmZnMWJOZFdYNXdYYSBjbGllbnRzIiwiYXVkIjoiaHR0cHM6Ly9jdWJiby1jbGllbnRzLWFwaSIsImlhdCI6MTY2NTExMTQxMiwiZXhwIjoxNjY1MTk3ODEyLCJhenAiOiJXME1oVEI2ZmR0aVRGaVphRkZUMmZnMWJOZFdYNXdYYSIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.Z0_n71mtGTaUL5IX9ow6cm8lf3QdvDE-JVudmQsdQWPigRggwK4UmQiQYTQa1fdA6M2c3kkTEq3Nl5WobSWxGepfE0gFQFPOTqflUaDWCUmPgdQkMBtYjyPyKXsShhzl5-QXuaVQSaM4dLIEU7NrquhQZ65aZY3CkuRTD6Fdjg24qs3A7CCqU93JSRv5zGQKLS_h2UnkHGKwBZ4ugFbadlT7pYvINO-FFFX5AMAQ6ILbvZvqabadu88tiSo34PJodZitsvcYCk_CWATKV2nAhPjMOqp_FeC7qE4G0hcOa72eyEj_yUPa_iwHGGc_p4Kan1rolzYJqYrYbtNPCkrsoQ", "expires_in": 86400, "type": "Bearer" } ``` ``` -------------------------------- ### Shipping Methods Response Structure (JSON) Source: https://developers.cubbo.com/index This JSON structure represents the successful response from the Cubbo API when requesting shipping methods. It includes details about each shipping option, such as carrier name, type, delivery options, country, and cash-on-delivery availability. ```json [ { "id": 1, "carrier_name": "99MINUTOS", "shipping_type": "national", "delivery_type": "NextDay", "country": "MX", "is_cod": false }, { "id": 2, "carrier_name": "TREGGO", "shipping_type": "national", "delivery_type": "SameDay", "country": "MX", "is_cod": false }, { "id": 5, "carrier_name": "ESTAFETA", "shipping_type": "national", "delivery_type": "Ground", "country": "MX", "is_cod": false }, { "id": 6, "carrier_name": "DHL", "shipping_type": "international", "delivery_type": "International", "country": "MX", "is_cod": false }, { "id": 11, "carrier_name": "Almacen", "shipping_type": "pickup", "delivery_type": "Pickup", "country": "MX", "is_cod": false }, { "id": 16, "carrier_name": "iVoy", "shipping_type": "national", "delivery_type": "NextDay", "country": "MX", "is_cod": false }, { "id": 17, "carrier_name": "Mercado EnvĂ­os", "shipping_type": "pickup", "delivery_type": "Pickup", "country": "MX", "is_cod": false }, { "id": 18, "carrier_name": "Externo", "shipping_type": "pickup", "delivery_type": "Pickup", "country": "MX", "is_cod": false }, { "id": 37, "carrier_name": "ESTAFETA", "shipping_type": "national", "delivery_type": "NextDay", "country": "MX", "is_cod": false }, { "id": 71, "carrier_name": "TREGGO", "shipping_type": "national", "delivery_type": "NextDay", "country": "MX", "is_cod": false }, { "id": 72, "carrier_name": "iVoy", "shipping_type": "national", "delivery_type": "SameDay", "country": "MX", "is_cod": false }, { "id": 100, "carrier_name": "DHL", "shipping_type": "national", "delivery_type": "NextDay", "country": "MX", "is_cod": false }, { "id": 101, "carrier_name": "DHL", "shipping_type": "national", "delivery_type": "Ground", "country": "MX", "is_cod": false } ] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.