### Proposal Response Example Source: https://docs.rvhub.com.br/ Example JSON response structure for a created energy credit proposal. ```json { "id": "a68a7480-c9f2-013c-1712-06516b73870d", "document": "14743467071", "status": "awaiting_customer_information", "kind": "solar", "statuses": [ { "status": "awaiting_customer_information", "created_at": "2024-03-21T18:22:26.277Z" } ], "links": [ { "href": "/proposals/a68a7480-c9f2-013c-1712-06516b73870d", "rel": "self", "type": "GET" }, { "href": "/proposals/a68a7480-c9f2-013c-1712-06516b73870d/customer-informations", "rel": "customer_informations", "type": "POST" }, { "href": "/proposals/a68a7480-c9f2-013c-1712-06516b73870d", "rel": "cancel", "type": "DELETE" } ] } ``` -------------------------------- ### Example Request to Get Provider Source: https://docs.rvhub.com.br/ This cURL command demonstrates how to make a GET request to the /esim/providers/{id} endpoint to retrieve specific provider details. Ensure to include the necessary headers for idempotency, authorization, and content type. ```curl curl --request GET 'https://api.sbx.rvhub.com.br/esim/providers/112a8270-e63a-013c-e9ed-4a8857830e47' \ --header 'X-Idempotency-Key: 4307d04c-1f48-4318-98c6-0012f4be1b41' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Retrieve Proposal Details using CURL Source: https://docs.rvhub.com.br/ This example demonstrates how to fetch the details of a specific energy credit proposal using a GET request with CURL. Ensure you include the correct idempotency key and authorization header. ```curl curl --request GET 'https://api.sbx.rvhub.com.br/energy-credits/proposals/a68a7480-c9f2-013c-1712-06516b73870d' \ --header 'X-Idempotency-Key: 4307d04c-1f48-4318-98c6-0012f4be1b41' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Perform Paginated GET Request Source: https://docs.rvhub.com.br/ Example of a GET request to the cellphone-topups transactions endpoint with pagination parameters. ```HTTP GET https://api.sbx.rvhub.com.br/cellphone-topups/transactions?page=2&per_page=25 ``` -------------------------------- ### Retrieve Available Products Source: https://docs.rvhub.com.br/ Example JSON response for the /portfolio endpoint. ```JSON [ { "provider": "VIVO", "kind": "cellphone", "product_id": "1", "name": "VIVO R$30", "amount": 3000, "expires_in": 30, "minimum_amount": 3000, "maximum_amount": 3000, "incremental_rate": 0, "fixed_amount": true, "area_codes": [ "11", "22", "31" ] }, { "provider": "VIVO", "kind": "cellphone", "product_id": "1", "name": "VIVO R$30", "amount": 3000, "expires_in": 30, "minimum_amount": 3000, "maximum_amount": 3000, "incremental_rate": 0, "fixed_amount": true, "area_codes": [ "11", "22", "31" ] } ] ``` -------------------------------- ### Fetch Transactions Request Example Source: https://docs.rvhub.com.br/ This cURL command demonstrates how to make a GET request to the /insurances/transactions endpoint. Ensure you include the correct Authorization and Content-Type headers. ```curl curl --request GET 'https://api.sbx.rvhub.com.br/insurances/transactions' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Retrieve Available Operators Source: https://docs.rvhub.com.br/ Example JSON response for the /portfolio/providers endpoint. ```JSON [ { "provider": "GOOGLE PLAY", "kind": "pin", "links": [ { "rel": "products", "href": "/portfolio?provider=GOOGLE%20PLAY&kinds=pin", "type": "get" } ] }, { "provider": "SKY", "kind": "tv", "links": [ { "rel": "products", "href": "/portfolio?provider=SKY&kinds=tv", "type": "get" } ] }, { "provider": "VIVO", "kind": "cellphone", "links": [ { "rel": "products", "href": "/portfolio?provider=VIVO&kinds=cellphone", "type": "get" } ] } ] ``` -------------------------------- ### Transaction Response Example Source: https://docs.rvhub.com.br/ A sample JSON response object representing a successful transaction. ```json { "id": "9cf5d3e0-9bd0-0139-cb65-32150c6e8996", "product_id": "116", "area_code": "11", "cell_phone_number": "994145351", "status": "authorized", "created_at": "2021-05-20T19:36:36.136Z", "updated_at": "2021-05-20T19:36:36.556Z", "nsu": "000000002", "authorization_code": "11421", "face_amount": 1200 } ``` -------------------------------- ### Retrieve Transaction via cURL Source: https://docs.rvhub.com.br/ Example request to fetch a specific insurance transaction using the GET method. ```bash curl --request GET 'https://api.sbx.rvhub.com.br/insurances/transactions/2eed2f10-92fc-013d-6427-623e4ec8c5dc' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Create PIN Topup Transaction Source: https://docs.rvhub.com.br/ cURL request example to initiate a new PIN topup transaction. ```bash curl --request POST 'https://api.sbx.rvhub.com.br/pin-topups/transactions' \ --header 'X-Idempotency-Key: 4307d04c-1f48-4318-98c6-0012f4be1b41' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' \ --data-raw '{ "product_id": "3", "area_code": "11", "cell_phone_number": "999996666", "metadata": { "terminal_state": "SP", "terminal_id": "123", "local_user": "TESTE" } }' ``` -------------------------------- ### Account Top-up Request Example Source: https://docs.rvhub.com.br/ This cURL command demonstrates how to make a POST request to the account top-up endpoint. Ensure you include the correct Authorization header and Content-Type, along with the transaction amount in the request body. ```curl curl --request POST 'https://api.sbx.rvhub.com.br/account-topups/bills/cash-in' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "amount": 5000 \ }' ``` -------------------------------- ### GET Raffles Transactions Request Source: https://docs.rvhub.com.br/ Example of a cURL request to retrieve raffle transactions. Ensure to include the Authorization and Content-Type headers. ```curl curl --request GET 'https://api.sbx.rvhub.com.br/raffles/transactions' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Request Account Balance (CURL) Source: https://docs.rvhub.com.br/ Example CURL request to get account balance information. This requires an Authorization header and specifies the content type as JSON. ```curl curl --location --request GET 'https://api.sbx.rvhub.com.br/accounts' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Create Proposal Request Source: https://docs.rvhub.com.br/ Example cURL request to create a new energy credit proposal. ```bash curl --request POST 'https://api.sbx.rvhub.com.br/energy-credits/proposals' \ --header 'X-Idempotency-Key: 4307d04c-1f48-4318-98c6-0012f4be1b41' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' \ --data-raw '{ "kind": "solar", "document": "14743467071" }' ``` -------------------------------- ### Get Transactions Request Example Source: https://docs.rvhub.com.br/ This cURL command demonstrates how to fetch transaction data from the RVHub API. Ensure you include the correct Authorization header with your client credentials. ```cURL curl --request GET 'https://api.sbx.rvhub.com.br/pin-topups/transactions' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' ``` -------------------------------- ### Retrieve Boleto Payment by ID using CURL Source: https://docs.rvhub.com.br/ This example demonstrates how to make a GET request to retrieve specific boleto payment details using its unique ID. Ensure you include the correct Authorization header. ```cURL curl --request GET 'https://api.sbx.rvhub.com.br/bills/payments/d70603c0-6ac0-0138-d1f7-6a4d3f76afc8' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Create TV Topup Transaction Request Source: https://docs.rvhub.com.br/ Example cURL request to initiate a TV topup transaction. ```curl curl --request POST 'https://api.sbx.rvhub.com.br/tv-topups/transactions' \ --header 'X-Idempotency-Key: 4307d04c-1f48-4318-98c6-0012f4be1b41' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' \ --data-raw '{ "product_id": "5", "signer_code": "12345678910", "metadata": { "terminal_state": "SP", "terminal_id": "123", "local_user": "TESTE" } }' ``` -------------------------------- ### Exemplo de Resposta JSON para Propostas Source: https://docs.rvhub.com.br/ Estrutura de dados retornada pela requisição GET /energy-credits/proposals contendo uma lista de propostas. ```json [ { "id": "13569490-c20e-013c-c388-3279aff0e0a9", "document": "30714903051", "name": "Carlos Silva", "area_code": "12", "cell_phone_number": "999999999", "email": "teste@teste.com", "birth_date": "1987-05-21", "status": "in_review", "kind": "solar", "employment": "Dentista", "marital_status": "Solteiro(a)", "nationality": "Brasileiro", "installation_number": "111111", "networks_class": "Monofásico", "classification": "Residencial", "average_consumption": 10.0, "lead_id": "00QHZ000006FX6j2AG", "estimated_amount": 344.25, "consumer_unit": "UC-53793", "discount_percentage": 10.0, "provider": "CEMIG", "monthly_economy": 4253, "annual_economy": 51037, "statuses": [ { "status": "awaiting_customer_information", "created_at": "2024-03-11T19:47:11.248Z" }, { "status": "awaiting_electricity_bill", "created_at": "2024-03-11T19:47:18.564Z" }, { "status": "processing", "created_at": "2024-03-11T19:47:35.841Z" }, { "status": "in_review", "created_at": "2024-03-11T19:47:38.203Z" } ], "links": [ { "href": "/proposals/13569490-c20e-013c-c388-3279aff0e0a9", "rel": "self", "type": "GET" }, { "href": "https://api-energy-credits-file/13569490-c20e-013c-c388-3279aff0e0a9", "rel": "electricity-bill", "type": "GET" } ] }, { "id": "74380b40-c29e-013c-74f4-4247bed9852e", "document": "30714903051", "status": "awaiting_customer_information", "kind": "solar", "statuses": [ { "status": "awaiting_customer_information", "created_at": "2024-03-12T13:00:41.322Z" } ], "links": [ { "href": "/proposals/74380b40-c29e-013c-74f4-4247bed9852e", "rel": "self", "type": "GET" }, { "href": "/proposals/74380b40-c29e-013c-74f4-4247bed9852e/customer-informations", "rel": "customer_informations", "type": "POST" }, { "href": "/proposals/74380b40-c29e-013c-74f4-4247bed9852e", "rel": "cancel", "type": "DELETE" } ] } ] ``` -------------------------------- ### Transaction Response Example Source: https://docs.rvhub.com.br/ Example JSON response body returned after a transaction operation. ```JSON { "status": "refunded", "id": "4b3ee1d0-e95e-0138-0ad1-32726f22dc1b", "product_id": "70", "amount": 9999, "card_number": "1234", "created_at": "2020-10-05T17:29:49.440Z", "updated_at": "2020-10-05T17:29:54.121Z", "nsu": "000076305", "authorization_code": "76305", "face_amount": 9999, "due_date": "2020-10-10T00:00:00.000Z", "message": "Ative sua recarga num VALIDADOR em qualquer estacao do Metro", "authorized_at": "2020-10-05T17:29:49.000Z", "charged_amount": 9499, "metadata": { "terminal_state": "SP", "terminal_id": "123", "local_user": "TESTE" }, "statuses": [ { "status": "authorized", "created_at": "2020-10-05T17:29:49.838Z" }, { "status": "refunded", "created_at": "2020-10-05T17:29:54.128Z" } ], "links": [ { "href": "/transactions/4b3ee1d0-e95e-0138-0ad1-32726f22dc1b", "rel": "self", "type": "GET" } ] } ``` -------------------------------- ### POST /tv-topups/transactions Source: https://docs.rvhub.com.br/ Initiates a new TV top-up transaction. Requires an idempotency key in the header. ```APIDOC ## POST /tv-topups/transactions ### Description Realiza uma nova solicitação de recarga para TV. ### Method POST ### Endpoint /tv-topups/transactions ### Parameters #### Request Body - **product_id** (string) - Required - Código do produto - **signer_code** (string) - Required - Código ou CPF do assinante - **affiliation_key** (string) - Required - Chave do parceiro - **metadata** (object) - Optional - Dados sobre o terminal do cliente - **terminal_state** (string) - Optional - Sigla do estado do terminal - **terminal_id** (string) - Optional - Código do terminal - **local_user** (string) - Optional - Código ou Login do usuário local ### Request Example { "product_id": "string", "signer_code": "string", "affiliation_key": "string", "metadata": { "terminal_state": "SP", "terminal_id": "123", "local_user": "user01" } } ``` -------------------------------- ### Initiate Cellphone Top-up Transaction Source: https://docs.rvhub.com.br/ Example cURL command to initiate a cellphone top-up transaction. Ensure to include the correct idempotency key and authorization header. ```curl curl --request POST 'https://api.sbx.rvhub.com.br/cellphone-topups/transactions' \ --header 'X-Idempotency-Key: 4307d04c-1f48-4318-98c6-0012f4be1b41' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "product_id": "1", \ "area_code": "11", \ "cell_phone_number": "999995555", \ "amount": 5000, \ "metadata": { \ "terminal_state": "SP", \ "terminal_id": "123", \ "local_user": "TESTE" \ } \ }' ``` -------------------------------- ### Item Not Found Error Example Source: https://docs.rvhub.com.br/ Example JSON response for an item not found error. This occurs when a requested item, such as a non-existent recharge, cannot be located. ```json { "status": 404, "code": "item_not_found", "message": "The requested item was not found", "see": "https://docs.rvhub.com.br/#item_not_found_error" } ``` -------------------------------- ### Request Product Additional Information (CURL) Source: https://docs.rvhub.com.br/ Example CURL request to fetch additional information for a product. Ensure to replace placeholders with actual values and use a valid authorization token. ```curl curl --location --request GET 'https://api.sbx.rvhub.com.br/portfolio/providers/vivo/additional-information' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' ``` -------------------------------- ### Validation Error Example Source: https://docs.rvhub.com.br/ Example JSON response for a validation error, indicating missing or incorrectly formatted fields. Refer to the provided link for more details. ```json { "status": 400, "code": "validation", "message": "One or more fields are required and / or in an invalid format", "see": "https://docs.rvhub.com.br/#validation_error" } ``` ```json { "status": 400, "code": "validation", "message": "One or more fields are required and / or in an invalid format", "see": "https://docs.rvhub.com.br/#validation_error" } ``` -------------------------------- ### Example RVHub API Response Source: https://docs.rvhub.com.br/ This is an example of the JSON response structure for a transaction. It includes core transaction details such as IDs, status, amounts, and timestamps. ```json { "id": "9cf5d3e0-9bd0-0139-cb65-32150c6e8996", "product_id": "116", "area_code": "11", "cell_phone_number": "994145351", "status": "authorized", "created_at": "2021-05-20T19:36:36.136Z", "updated_at": "2021-05-20T19:36:36.556Z", "nsu": "000000002", "authorization_code": "11421", "face_amount": 1200, "due_date": "2021-05-25T00:00:00.000Z" } ``` -------------------------------- ### POST /tv-topups/transactions Source: https://docs.rvhub.com.br/ Initiates a new TV topup transaction. ```APIDOC ## POST /tv-topups/transactions ### Description Initiates a new TV topup transaction. ### Method POST ### Endpoint /tv-topups/transactions ### Request Body - **product_id** (string) - Required - Code of the product - **signer_code** (string) - Required - Subscriber code for the TV service - **metadata** (object) - Optional - Terminal data ### Request Example { "product_id": "5", "signer_code": "12345678910", "metadata": { "terminal_state": "SP", "terminal_id": "123", "local_user": "TESTE" } } ### Response #### Success Response (200) - **id** (string) - Unique transaction identifier - **status** (string) - Transaction status - **authorization_code** (string) - Primary key of the transaction #### Response Example { "id": "2bc05cc0-80c8-0138-0bb8-2ea82e8cddff", "product_id": "5", "status": "authorized", "authorization_code": 15471 } ``` -------------------------------- ### Transaction Response Structure Source: https://docs.rvhub.com.br/ Example JSON response showing a list of TV topup transactions with various statuses. ```json [ { "id": "ac4d9db0-7752-0138-8428-0a492e938315", "product_id": "3", "status": "denied", "created_at": "2020-05-13T14:19:25.758Z", "updated_at": "2020-05-13T14:19:29.284Z", "status_reason": "operator_or_product_not_found", "signer_code": "12345678910", "charged_amount": 1850, "affiliation_key": "12345", "metadata": { "terminal_state": "SP", "terminal_id": "123", "local_user": "TESTE" }, "statuses": [ { "status": "denied", "created_at": "2020-05-13T14:19:29.301Z" } ], "links": [ { "href": "/transactions/ac4d9db0-7752-0138-8428-0a492e938315", "rel": "self", "type": "GET" } ] }, { "id": "b9d9e130-7752-0138-8429-0a492e938315", "product_id": "5", "status": "captured", "created_at": "2020-05-13T14:19:48.488Z", "updated_at": "2020-05-13T14:21:42.516Z", "nsu": "000006049", "authorization_code": 6049, "face_amount": 1990, "due_date": "2020-05-13T00:00:00.000Z", "message": "Recarga efetuada com sucesso! Agora voce tem 7 dias para aproveitar seus canais.", "authorized_at": "2020-05-13T00:00:00.000Z", "signer_code": "10987654321", "affiliation_key": "12345", "metadata": { "terminal_state": "SP", "terminal_id": "123", "local_user": "TESTE" }, "statuses": [ { "status": "authorized", "created_at": "2020-05-13T14:19:48.752Z" }, { "status": "captured", "created_at": "2020-05-13T14:21:42.521Z" } ], "links": [ { "href": "/transactions/b9d9e130-7752-0138-8429-0a492e938315", "rel": "self", "type": "GET" } ] } ] ``` -------------------------------- ### RVHub API - Query String Filtering Example Source: https://docs.rvhub.com.br/ Filters like 'statuses' are passed via the Query String. This example shows how to filter transactions by a 'denied' status. ```url https://api.sbx.rvhub.com.br/tv-topups/transactions?statuses=denied ``` -------------------------------- ### POST /energy-credits/proposals Source: https://docs.rvhub.com.br/ Creates a new energy credit proposal. Requires an X-Idempotency-Key header for idempotency. ```APIDOC ## POST /energy-credits/proposals ### Description Creates a new energy credit proposal. This API allows you to submit applicant data from your platform to be processed by our API. It is mandatory to send the X-Idempotency-Key HTTP header for this request. ### Method POST ### Endpoint /energy-credits/proposals ### Parameters #### Request Body - **kind** (string) - Required - The type of energy (e.g., "solar"). - **document** (string) - Required - The applicant's CPF (Brazilian individual taxpayer registry ID). ### Request Example ```json { "kind": "solar", "document": "14743467071" } ``` ### Response #### Success Response (200) - **id** (string) - Unique transaction identifier based on UUIDs V4. - **document** (string) - CPF of the applicant sent in the request. - **status** (string) - Proposal status. - **kind** (string) - Type of energy sent in the request. - **statuses** (array) - Returns the statuses the transaction has passed through. - **status** (string) - Status type. - **created_at** (string) - Date the status was created. - **links** (array) - Returns the links for possible actions to be performed with the transaction from its current status. - **href** (string) - Guidance link. - **rel** (string) - Identification of the action performed by the href. - **type** (string) - HTTP verb to be used. #### Response Example ```json { "id": "a68a7480-c9f2-013c-1712-06516b73870d", "document": "14743467071", "status": "awaiting_customer_information", "kind": "solar", "statuses": [ { "status": "awaiting_customer_information", "created_at": "2024-03-21T18:22:26.277Z" } ], "links": [ { "href": "/proposals/a68a7480-c9f2-013c-1712-06516b73870d", "rel": "self", "type": "GET" }, { "href": "/proposals/a68a7480-c9f2-013c-1712-06516b73870d/customer-informations", "rel": "customer_informations", "type": "POST" }, { "href": "/proposals/a68a7480-c9f2-013c-1712-06516b73870d", "rel": "cancel", "type": "DELETE" } ] } ``` ``` -------------------------------- ### GET eSIM Transactions Request Source: https://docs.rvhub.com.br/ This cURL command demonstrates how to make a GET request to retrieve eSIM transactions. Ensure you include the necessary Idempotency-Key and Authorization headers. ```curl curl --request GET 'https://api.sbx.rvhub.com.br/esim/transactions \ --header 'X-Idempotency-Key: 4307d04c-1f48-4318-98c6-0012f4be1b41' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' \ ``` -------------------------------- ### Request Products List Source: https://docs.rvhub.com.br/ CURL request to fetch products with optional query parameters. ```CURL curl --location --request GET 'https://api.sbx.rvhub.com.br/portfolio?kinds=cellphone&area_code=22&provider=vivo' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' ``` -------------------------------- ### Transition Not Accepted Error Example Source: https://docs.rvhub.com.br/ Example JSON response for a transition not accepted error. This error is returned when attempting an invalid status change, like reversing a confirmed recharge. ```json { "status": 422, "code": "transition_not_accepted", "message": "The requested transition of status is not accepted", "see": "https://docs.rvhub.com.br/#transition_not_accepted_error" } ``` -------------------------------- ### Get Product Additional Information Source: https://docs.rvhub.com.br/ Use this endpoint to retrieve additional information about a specific product, such as terms and conditions, redemption instructions, and logos. Requires the product name in the URL. ```json { "name": "Spotify", "description": "Pague sua própria assinatura ou presenteie alguém especial.", "terms_and_conditions": "Resgatável somente para os meses de assinatura Premium individual de valor cheio via spotify.com. Indisponível para resgates de assinaturas com desconto ou de grupo. Não pode ser resgatada em espécie ou via crédito, e não pode ser retornada ou revendida (exceto quando solicitado por lei). Você deve cadastrar ou ter uma conta Spotify, ser maior de 16 anos e residir no país da compra. Uso único: o valor nominal total para uma conta individual é descontado no momento do resgate e nenhum resgate adicional é permitido. O Spotify não se responsabiliza por nenhuma perda ou dano que resulte de uso perdido, roubado ou não autorizado. Os termos completos se aplicam, visite www.spotify.com/gift-card. Fornecido por Spotify AB, número de registro 556786-5729. Deve ser resgatado dentro de 12 mês após a compra. Após esse período, o PIN expirará.", "redemption_instructions": "Para resgatar, insira o PIN em spotify.com/redeem.", "logo": "/9j/7AARRHVja3kAAQAEAAAAUAAA/+4ADkFkb2JlAGTAAAAAAf", "id": "663d0070-c50c-0138-27e5-5a5b2dd7b91d" } ``` -------------------------------- ### GET /bills/payments Source: https://docs.rvhub.com.br/ Retrieves a list of bills and payments. ```APIDOC ## GET /bills/payments ### Description Retrieves a list of bills and payments. ### Method GET ### Endpoint /bills/payments ### Request Example ```curl curl --request GET 'https://api.sbx.rvhub.com.br/bills/payments' \ --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' \ --header 'Content-Type: application/json' ``` ### Response #### Success Response (200) - **payments** (array) - List of payment objects. - **status** (string) - The status of the payment. - **created_at** (string) - The timestamp when the payment was created. - **links** (array) - Links related to the payment. - **href** (string) - The URL for the link. - **rel** (string) - The relationship of the link. - **type** (string) - The HTTP method for the link. #### Response Example ```json { "payments": [ { "status": "approved", "created_at": "2021-05-19T17:47:45.736Z" } ], "links": [ { "href": "/payments/356de010-9af8-0139-f66e-52f4cf85f143", "rel": "self", "type": "GET" } ] } ``` ``` -------------------------------- ### GET /accounts Source: https://docs.rvhub.com.br/ Retrieves the current balance for a store. ```APIDOC ## GET /accounts ### Description Retrieves the current balance for a store. This service allows you to control your requests correctly. ### Method GET ### Endpoint /accounts ### Request Example ```curl curl --location --request GET 'https://api.sbx.rvhub.com.br/accounts' --header 'Authorization: Bearer U0VVX0NMSUVOVF9JRDpTRVVfQ0xJRU5UX1NFQ1JFVA==' --header 'Content-Type: application/json' ``` ### Response #### Success Response (200) - **store** (string) - Nome da loja - **balance** (object) - Objeto referente ao saldo da loja - **credit_limit** (integer) - Limite de crédito cadastrado para a loja - **available_limit** (integer) - Limite disponível na loja - **antecipated** (integer) - Crédito antecipado da loja - **open_amount** (integer) - Valores em aberto da loja (compras não pagas, inclusive a vencer) #### Response Example ```json { "store": "rvhub", "balance": { "credit_limit": 0, "available_limit": 0, "antecipated": 176817, "open_amount": 0 } } ``` ``` -------------------------------- ### GET /account-topups/bills/cash-in Source: https://docs.rvhub.com.br/ Retrieves a list of account top-up bills. ```APIDOC ## GET /account-topups/bills/cash-in ### Description Retrieves a list of account top-up bills. ### Method GET ### Endpoint /account-topups/bills/cash-in ### Response #### Success Response (200) - **id** (string) - Unique transaction identifier. - **issuer_name** (string) - Name of the financial institution. - **issuer_code** (string) - Code of the financial institution. - **amount** (int) - Bill amount. - **due_date** (string) - Due date. - **issue_date** (string) - Issue date. - **our_number** (string) - Control code for identification. - **issuer_branch** (string) - Branch of the financial institution. - **issuer_wallet** (string) - Wallet of the financial institution. - **digitable_line** (string) - Digitable line. - **barcode** (string) - Barcode. - **kind** (string) - Transaction type (prepaid or postpaid). - **informations** (array) - Additional information from the financial institution. #### Response Example [ { "id": "c3b22d80-aced-0138-e6cc-5a9c85a494fb", "issuer_name": "BRADESCO", "issuer_code": 237, "amount": 5000, "due_date": "2020-10-10T00:00:00.000Z", "issue_date": "2020-07-20T00:00:00.000Z", "our_number": 9, "issuer_branch": "1234-3/0012345-5", "issuer_wallet": "9", "digitable_line": "23791.23405 90000.000142 77001.234507 3 84040000005000", "barcode": "23793840400000050001234090000000147700123450", "kind": "postpaid", "informations": [ "Pagável na rede bancária até a data de vencimento.", "MULTA MORA 2% JUROS 5% a.m." ] } ] ``` -------------------------------- ### Example Response for Denied Cellphone Top-up Source: https://docs.rvhub.com.br/ This JSON response illustrates a denied cellphone top-up transaction due to insufficient credit limit. It includes transaction details, status, and reason for denial. ```json { "id": "55e0f600-791a-0138-fb37-427e4842ab95", "product_id": "1", "area_code": "11", "cell_phone_number": "999990002", "status": "denied", "created_at": "2020-05-15T20:41:11.271Z", "updated_at": "2020-05-15T20:41:11.876Z", "status_reason": "insufficient_credit_limit", "statuses": [ { "status": "denied", "created_at": "2020-05-15T20:41:11.888Z" } ], "links": [ { "href": "/cellphone-topups/transactions/55e0f600-791a-0138-fb37-427e4842ab95", "rel": "self", "type": "GET" } ] } ``` -------------------------------- ### GET /account-topups/bills Source: https://docs.rvhub.com.br/ Lists all available bills for account top-ups. ```APIDOC ## GET /account-topups/bills ### Description Lists all available bills for account top-ups. ### Method GET ### Endpoint /account-topups/bills ### Response #### Success Response (200) - **bills** (array) - A list of bill objects. - **id** (string) - The unique identifier for the bill. - **amount** (integer) - The amount of the bill. - **status** (string) - The current status of the bill. - **payment_url** (string) - The URL to pay the bill. #### Response Example ```json { "bills": [ { "id": "bill-12345", "amount": 10000, "status": "pending", "payment_url": "https://pay.rvhub.com.br/bill/12345" }, { "id": "bill-67890", "amount": 5000, "status": "paid", "payment_url": "https://pay.rvhub.com.br/bill/67890" } ] } ``` ``` -------------------------------- ### POST /esim/request Source: https://docs.rvhub.com.br/ Initiates a new Esim request. ```APIDOC ## POST /esim/request ### Description Initiates a new Esim request. Requires the `X-Idempotency-Key` header. ### Method POST ### Endpoint /esim/request ### Headers - **X-Idempotency-Key** (string) - Required - An idempotency key to prevent duplicate requests. ```