Consulta CPE

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

Ejemplos de uso

PHP
$curl = curl_init();
$data = [
"ruc_emisor" => "20384734091",
"codigo_tipo_documento" => "03",
"serie_documento" => "B002",
"numero_documento" => "409",
"fecha_de_emision" => "2021-09-30",
"total" => "210.00"
];
​
$post_data = http_build_query($data);
​
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apiperu.dev/api/cpe?api_token=INGRESAR_TOKEN_AQUI",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $post_data,
CURLOPT_SSL_VERIFYPEER => false
));
​
$response = curl_exec($curl);
$err = curl_error($curl);
​
curl_close($curl);
​
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}