Listar Planos

Route (Rota)

Método Rota Descrição
GET /webservice/plans/list Retorna os planos cadastrados na plataforma

Headers (Cabeçalho)

Param Tipo Descrição Obrigatório
Accept String application/json Sim
secret String *Secret Key Sim
token String **Webservice Token Sim

*Para conseguir a Secret Key acesse sua Plataforma, abra o Menu, vá na área de Usuários e acesse Webservice, lá você terá a lista de usuários com suas respectivas Secret Key

** Token gerado pela rota de autenticação

Exemplos

cURL

				
					curl --location 'https://dev3.nochalks.com/plans/list' \
--header 'Accept: application/json' \
--header 'secret: {{._webservice_secret}}' \
--header 'token: {{._webservice_token}}'
				
			

Node.js

				
					const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://dev3.nochalks.com/plans/list',
  headers: { 
    'Accept': 'application/json', 
    'secret': '{{._webservice_secret}}', 
    'token': '{{._webservice_token}}', 
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
;

				
			

PHP

				
					<?php
$client = new Client();
$headers = [
  'Accept' => 'application/json',
  'secret' => '{{._webservice_secret}}',
  'token' => '{{._webservice_token}}',
];
$request = new Request('GET', 'https://dev3.nochalks.com/plans/list', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();

				
			

Response (Respostas)

- Status: 200

				
					{
  "data": [
    {
      "id": 1,
      "type": 3,
      "sale_type": "UNIQUE",
      "days": null,
      "start_date": null,
      "end_date": null,
      "url": "https://plataforma-nochalks.com/plans/plano",
      "category": null,
      "translation": {
        "name": "Plano",
        "description": "<p>A<\/p>",
        "language_id": 1
      }
    },
    {
      "id": 2,
      "type": 4,
      "sale_type": "RECURRENT",
      "days": null,
      "start_date": null,
      "end_date": null,
      "url": "https://plataforma-nochalks.com/plans/recorrente",
      "category": null,
      "translation": {
        "name": "Recorrente",
        "description": "<p>Teste<\/p>",
        "language_id": 1
      }
    }
  ],
  "links": {
    "first": "https://plataforma-nochalks.com/webservice/plans/list?page=1",
    "last": "https://plataforma-nochalks.com/webservice/plans/list?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "https://plataforma-nochalks.com/webservice/plans/list",
    "per_page": 10,
    "to": 2,
    "total": 2
  }
}
				
			
ESCOLHA UM ATENDIMENTO:
Contato por Chat CHAT
Contato por E-mail E-MAIL
Contato por Telefone TELEFONE
Contato por Whatsapp WHATSAPP