Consulta CPE
post
https://apiperu.dev/api
/cpe
Consulta CPE

Ejemplos de uso

PHP
1
$curl = curl_init();
2
$data = [
3
"ruc_emisor" => "20384734091",
4
"codigo_tipo_documento" => "03",
5
"serie_documento" => "B002",
6
"numero_documento" => "409",
7
"fecha_de_emision" => "2021-09-30",
8
"total" => "210.00"
9
];
10
11
$post_data = http_build_query($data);
12
13
curl_setopt_array($curl, array(
14
CURLOPT_URL => "https://apiperu.dev/api/cpe?api_token=INGRESAR_TOKEN_AQUI",
15
CURLOPT_RETURNTRANSFER => true,
16
CURLOPT_CUSTOMREQUEST => "POST",
17
CURLOPT_POSTFIELDS => $post_data,
18
CURLOPT_SSL_VERIFYPEER => false
19
));
20
21
$response = curl_exec($curl);
22
$err = curl_error($curl);
23
24
curl_close($curl);
25
26
if ($err) {
27
echo "cURL Error #:" . $err;
28
} else {
29
echo $response;
30
}
Copied!
Última actualización 7d ago
Copiar enlace