Inserta valores de indicadores
Deprecated
POST
/api/{apikey}/IndicatorsValues/Insert
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api-prod.scoreplan.com.br/api/example/IndicatorsValues/Insert"), Content = new StringContent("{ \"cnpj\": \"example\", \"valores\": [ { \"campo\": \"example\", \"tipoPeriodo\": \"example\", \"periodo\": \"example\", \"valor\": 1, \"excecao\": \"example\" } ] }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api-prod.scoreplan.com.br/api/example/IndicatorsValues/Insert"
payload := strings.NewReader("{ \"cnpj\": \"example\", \"valores\": [ { \"campo\": \"example\", \"tipoPeriodo\": \"example\", \"periodo\": \"example\", \"valor\": 1, \"excecao\": \"example\" } ] }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api-prod.scoreplan.com.br/api/example/IndicatorsValues/Insert")) .header("Content-Type", "application/json") .method("POST", HttpRequest.BodyPublishers.ofString("{ \"cnpj\": \"example\", \"valores\": [ { \"campo\": \"example\", \"tipoPeriodo\": \"example\", \"periodo\": \"example\", \"valor\": 1, \"excecao\": \"example\" } ] }")) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"cnpj\": \"example\", \"valores\": [ { \"campo\": \"example\", \"tipoPeriodo\": \"example\", \"periodo\": \"example\", \"valor\": 1, \"excecao\": \"example\" } ] }");Request request = new Request.Builder() .url("https://api-prod.scoreplan.com.br/api/example/IndicatorsValues/Insert") .post(body) .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'POST', url: 'https://api-prod.scoreplan.com.br/api/example/IndicatorsValues/Insert', headers: {'Content-Type': 'application/json'}, data: { cnpj: 'example', valores: [ { campo: 'example', tipoPeriodo: 'example', periodo: 'example', valor: 1, excecao: 'example' } ] }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api-prod.scoreplan.com.br/api/example/IndicatorsValues/Insert';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"cnpj":"example","valores":[{"campo":"example","tipoPeriodo":"example","periodo":"example","valor":1,"excecao":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")val body = RequestBody.create(mediaType, "{ \"cnpj\": \"example\", \"valores\": [ { \"campo\": \"example\", \"tipoPeriodo\": \"example\", \"periodo\": \"example\", \"valor\": 1, \"excecao\": \"example\" } ] }")val request = Request.Builder() .url("https://api-prod.scoreplan.com.br/api/example/IndicatorsValues/Insert") .post(body) .addHeader("Content-Type", "application/json") .build()
val response = client.newCall(request).execute()curl --request POST \ --url https://api-prod.scoreplan.com.br/api/example/IndicatorsValues/Insert \ --header 'Content-Type: application/json' \ --data '{ "cnpj": "example", "valores": [ { "campo": "example", "tipoPeriodo": "example", "periodo": "example", "valor": 1, "excecao": "example" } ] }'Deprecated. API heredada con apikey: no la use en integraciones nuevas.
Reemplazo: /IndicatorsValues/External/Insert en la API External.
Parameters
Sección titulada « Parameters »Path Parameters
Sección titulada «Path Parameters » apikey
required
string
Clave de acceso de la API heredada. Trátela como una contraseña.
Request Body required
Sección titulada «Request Body required » Media type application/json
object
cnpj
null | string
valores
Array<object> | null
object
campo
null | string
tipoPeriodo
null | string
periodo
null | string
valor
null | number format: double
excecao
null | string
Example generated
{ "cnpj": "example", "valores": [ { "campo": "example", "tipoPeriodo": "example", "periodo": "example", "valor": 1, "excecao": "example" } ]}Responses
Sección titulada « Responses »OK