curl --request GET \
--url https://rest.yafacture.com/borradores-complementos/{borradorId} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://rest.yafacture.com/borradores-complementos/{borradorId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://rest.yafacture.com/borradores-complementos/{borradorId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rest.yafacture.com/borradores-complementos/{borradorId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://rest.yafacture.com/borradores-complementos/{borradorId}")
.header("x-api-key", "<api-key>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rest.yafacture.com/borradores-complementos/{borradorId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}[
{
"emisorId": "<string>",
"borradorId": "<string>",
"tipoComplemento": "<string>",
"pagos": null,
"cartaPorte": null,
"comercioExterior": null,
"removible": true,
"editable": true,
"status": true,
"fecha": "2023-11-07T05:31:56Z"
}
]{
"message": "Forbidden resource",
"error": "Forbidden",
"statusCode": 403
}Obtener complementos de un borrador
curl --request GET \
--url https://rest.yafacture.com/borradores-complementos/{borradorId} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://rest.yafacture.com/borradores-complementos/{borradorId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://rest.yafacture.com/borradores-complementos/{borradorId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rest.yafacture.com/borradores-complementos/{borradorId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://rest.yafacture.com/borradores-complementos/{borradorId}")
.header("x-api-key", "<api-key>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rest.yafacture.com/borradores-complementos/{borradorId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}[
{
"emisorId": "<string>",
"borradorId": "<string>",
"tipoComplemento": "<string>",
"pagos": null,
"cartaPorte": null,
"comercioExterior": null,
"removible": true,
"editable": true,
"status": true,
"fecha": "2023-11-07T05:31:56Z"
}
]{
"message": "Forbidden resource",
"error": "Forbidden",
"statusCode": 403
}Authorizations
X-API-Key authentication header for the development token generated in Yafacture
Path Parameters
Query Parameters
Response
Identificador único del emisor
Identificador único del borrador
Tipo de complemento del borrador
Información de pagos del complemento
Datos del complemento Carta Porte 3.1. Estructura: IdCCP: 'CCC---' transpInternac: 'Sí' | 'No' totalDistRec: string (km totales) entradaSalidaMerc?: 'Entrada' | 'Salida' (solo si transpInternac=Sí) paisOrigenDestino?: string (solo si transpInternac=Sí) viaEntradaSalida?: string (solo si transpInternac=Sí) registroISTMO?: 'Sí' | 'No' (solo si transpInternac=Sí) ubicaciones: [{ tipoUbicacion, idUbicacion, rfcRemitenteDestinatario, nombreRemitenteDestinatario, fechaHoraSalidaLlegada, distanciaRecorrida (solo Destino), domicilio? }] mercancias: { pesoBrutoTotal, unidadPeso, numTotalMercancias, mercancias: [{ bienesTransp, descripcion, cantidad, claveUnidad, pesoEnKg, materialPeligroso, cantidadTransporta?, detalleMercancia? }], autotransporte?: { permSCT, numPermisoSCT, identificacionVehicular: { configVehicular, pesoBrutoVehicular, placaVM, anioModeloVM }, seguros: { aseguradoraRespCivil, polizaRespCivil }, remolques?: [{ subTipoRem, placa }] } } figuraTransporte: [{ tipoFigura, rfcFigura, nombreFigura, numLicencia (requerido si tipoFigura=01), partesTransporte?, domicilio? }]
Información de comercio exterior
Indicador si el complemento es removible
Indicador si el complemento es editable
Estado activo/inactivo del complemento
Fecha de creación del registro

