Esta API permite la integración con el sistema Conecta Carga, ofreciendo acceso a funcionalidades clave como la gestión de DO, autenticación de usuarios y consulta de clientes.
Bienvenido a la documentación de la API de Conecta Carga. Esta API está diseñada para proporcionar una forma sencilla y segura de interactuar con nuestro sistema. Por favor, revise la documentación a continuación para obtener más información sobre cómo utilizar nuestra API.
This API is not authenticated.
Obtiene las actividades asociadas a un DO. Las actividades provienen de importación o exportación según el tipo del DO.
Número del DO.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/shipment-activities/MIMPOMD260110';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": [
{
"id": 10969,
"activity_id": 76,
"delivery_order_id": "MIMPOMD260110",
"confirmation_date": null,
"estimated_date": null,
"hour": null,
"notes": null,
"status": "",
"color": "",
"alert_date": null,
"user": null
}
]
}
Recuperación de contraseña (olvidé mi contraseña → enlace por correo → reset).
Autentica a un usuario y devuelve un token de acceso.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/auth/login';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'username' => 'admin',
'password' => 'password',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"token": "122|c72GRNHR2pLHqNsKlWHWHjpnqm3GNdsfcb3ZYkyh9e59491d",
"user": {
"id": 1,
"document_number": "1234098",
"name": "Juan Perez",
"username": "USERNAME",
"email": "user@email.com",
"phone": "3005000101",
"position": "GERENCIA",
"status": "S",
"role_id": 1,
"role_name": "Administrador",
"is_operational": "S",
"is_sales_person": "S",
"is_admin": "S",
"is_pricing": "S",
"whatsapp_status": "N",
"created_at": "2025-04-07T14:38:19.000000Z",
"updated_at": "2025-04-24T09:13:08.000000Z"
}
}
Exchanges a single-use, short-lived token issued by conecta-admin for a Sanctum session. Used to seamlessly drop the user into their fresh tenant right after the signup flow.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/auth/auto-login';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'token' => 'eyJ1c2VyX2lkIjoxfQ.abc123',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); { "token": "...", "user": { ... } }
Envía un enlace de restablecimiento al correo indicado. Responde siempre el mismo mensaje, exista o no el correo (no revela cuentas registradas).
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/auth/forgot-password';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'email' => 'user@email.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"message": "Si el correo está registrado, te enviamos un enlace para restablecer tu contraseña."
}
Valida el token del enlace y guarda la nueva contraseña.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/auth/reset-password';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'email' => 'user@email.com',
'token' => 'a1b2c3...',
'password' => 'secret123',
'password_confirmation' => 'secret123',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"message": "Tu contraseña ha sido restablecida correctamente."
}
Obtiene los datos del usuario autenticado, incluyendo su rol y permisos.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/auth/profile';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"message": "Profile fetched successfully",
"user": {
"id": 1,
"document_number": "1234098",
"name": "Juan Perez",
"username": "USERNAME",
"email": "user@email.com",
"position": "GERENCIA",
"phone": "3005000101",
"status": "S",
"role_id": 1,
"role_name": "Administrador",
"is_operational": "S",
"is_sales_person": "S",
"is_admin": "S",
"is_pricing": "S",
"whatsapp_status": "N",
"created_at": "2025-04-07T14:38:19.000000Z",
"updated_at": "2025-04-24T09:13:08.000000Z"
},
"intercom_user_hash": null,
"intercom_jwt": null
}
Obtiene la lista de permisos para el usuario autenticado.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/auth/permissions';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); Invalida el token de acceso actual del usuario.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/auth/logout';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"message": "Logged out successfully"
}
Obtiene una lista paginada de clientes. Puedes filtrar los resultados usando los parámetros de consulta disponibles.
un array de códigos de estado para filtrar.
un array de códigos de estado de información para filtrar.
un array de tipos de cliente para filtrar.
un array de categorías para filtrar.
un array de orígenes para filtrar.
un array de IDs de asesores para filtrar.
Un array con dos fechas ('d/m/Y') para filtrar por fecha de creación.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/clients';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'query' => [
'filters[statuses][0]' => 'ACTIVO',
'filters[statuses_info][0]' => 'VERIFICADO',
'filters[client_type][0]' => 'RATIFICADO',
'filters[category][0]' => 'A',
'filters[origin][0]' => 'F',
'filters[advisor][0]' => '7',
'filters[date_range][0]' => '01/01/2025',
'filters[date_range][1]' => '31/12/2025',
],
'json' => [
'page' => 16,
'perPage' => 22,
'search' => 'g',
'filters' => [
'statuses' => [
'architecto',
],
'statuses_info' => [
'architecto',
],
'client_type' => [
'architecto',
],
'category' => [
'architecto',
],
'origin' => [
'architecto',
],
'advisor' => [
16,
],
'date_range' => [
'architecto',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": [
{
"id": null,
"document_type": "CC",
"document_number": "12345678",
"external_id": "EXT-001",
"name": "John Doe",
"client_type": "IMPORTADOR",
"advisor": {
"id": 1,
"name": "Jane Smith"
},
"username": "JohnDoe",
"status": "ACTIVO",
"status_info": "VERIFICADO",
"status_lead": "CALIFICADO",
"category": {
"id": "A"
},
"origin": "WEB",
"load": "FCL",
"has_portal_access": true,
"verification_date": "2024-01-15",
"observations": "Client observations",
"user": {
"id": 1
},
"created_at": "2024-01-01 10:00:00",
"updated_at": "2024-01-15 14:30:00"
}
],
"links": {
"first": "http://yourdomain.com/api/clients?page=1",
"last": "http://yourdomain.com/api/clients?page=2",
"prev": null,
"next": "http://yourdomain.com/api/clients?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"links": [],
"path": "http://demo.csyp.com/api/clients",
"per_page": 10,
"to": 10,
"total": 20
}
}
Crea un nuevo registro de cliente.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/clients';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'document_type_id' => 'architecto',
'document_number' => 'architecto',
'generated_document_number' => false,
'external_id' => 'architecto',
'name' => 'architecto',
'client_type' => 'architecto',
'status' => 'architecto',
'status_info' => 'architecto',
'status_lead' => 'architecto',
'advisor_id' => 16,
'category_id' => 'architecto',
'origin' => 'architecto',
'observations' => 'architecto',
'verification_date' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"client": {
"id": null,
"document_type": "01",
"document_number": "123456789",
"external_id": "EXT-001",
"name": "John Doe",
"client_type": "customer",
"advisor": {
"id": 1,
"name": "Jane Smith"
},
"username": "JohnDoe",
"status": "A",
"status_info": "posible",
"status_lead": "CALIFICADO",
"category": {
"id": "A"
},
"origin": "web",
"load": "FCL",
"has_portal_access": true,
"verification_date": "2025-06-26",
"observations": "Esta es una nota.",
"user": {
"id": 1
},
"created_at": "2025-06-26T10:00:00.000000Z",
"updated_at": "2025-06-26T10:00:00.000000Z"
},
"message": "Cliente creado correctamente"
}
Endpoint que permite consultar un cliente registrado en la aplicación.
The ID of the client.
documento del cliente para realizar la acción.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/clients/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"client": {
"id": null,
"document_type": "NIT",
"document_number": "987654321-0",
"external_id": "EXT-987",
"name": "Empresa Ficticia S.A.S.",
"client_type": "RATIFICADO",
"advisor": {
"id": 555,
"name": "Jane Smith"
},
"username": null,
"status": "ACTIVO",
"status_info": "COMPLETA",
"status_lead": "CALIFICADO",
"category": {
"id": "A"
},
"origin": "MANUAL",
"load": "GENERAL",
"has_portal_access": true,
"verification_date": "27/06/2025",
"observations": "Cliente de prueba para la documentación.",
"user": {
"id": 1
},
"created_at": "01/01/2025",
"updated_at": "27/06/2025"
}
}
Endpoint que permite editar los datos de un cliente registrado en la aplicación.
The ID of the client.
documento del cliente para realizar la acción.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/clients/architecto';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'document_type_id' => 'architecto',
'document_number' => 'architecto',
'generated_document_number' => true,
'external_id' => 'architecto',
'name' => 'architecto',
'client_type' => 'architecto',
'status' => 'architecto',
'status_info' => 'architecto',
'status_lead' => 'architecto',
'advisor_id' => 16,
'category_id' => 'architecto',
'origin' => 'architecto',
'observations' => 'architecto',
'verification_date' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"client": {
"id": null,
"document_type": "01",
"document_number": "123456789",
"external_id": "EXT-001",
"name": "John Doe Updated",
"client_type": "customer",
"advisor": {
"id": 987654321,
"name": "Jane Smith"
},
"username": null,
"status": "A",
"status_info": "posible",
"status_lead": "CALIFICADO",
"category": {
"id": "A"
},
"origin": "web",
"load": "FCL",
"has_portal_access": false,
"verification_date": "2025-06-27",
"observations": "Esta es una nota actualizada.",
"user": {
"id": 1
},
"created_at": "26/06/2025",
"updated_at": "26/06/2025"
},
"message": "Cliente actualizado correctamente"
}
Endpoint que permite eliminar un cliente en la aplicación.
The ID of the client.
ID del cliente a eliminar.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/clients/architecto';
$response = $client->delete(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"message": "Cliente eliminado correctamente"
}
Actualiza el estado de acceso al portal para un cliente específico.
El ID del cliente a actualizar.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/clients/client-portal-access/123456789';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'has_portal_access' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"client": {
"has_portal_access": true
},
"message": "Acceso al portal actualizado correctamente"
}
Obtiene una lista paginada de contactos de clientes. Puedes filtrar los resultados usando los parámetros de consulta disponibles.
El ID del cliente al que pertenece el contacto.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/client-contacts';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'query' => [
'business_associate_id' => '123456',
],
'json' => [
'page' => 16,
'perPage' => 22,
'search' => 'g',
'business_associate_id' => 'z',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": [
{
"id": 1,
"business_associate": {
"id": "000000001",
"name": "Nombre cliente"
},
"business_name": "Nombre empresa",
"name": "Nombre contacto",
"position": "Cargo",
"type": "Tipo",
"email": "correo@example.com",
"city": "Ciudad",
"phone": "123456789",
"mobile_phone": "987654321",
"birthday": "1990-01-01",
"notes": "Creado automáticamente el 25/11/2020",
"is_admin": false,
"is_sales_person": false,
"is_operational": true,
"whatsapp_status": false,
"created_at": "2020-11-25 10:38:57",
"created_by": "USUARIO",
"updated_at": "2020-11-25 10:38:57",
"updated_by": "USUARIO"
}
],
"links": {
"first": "http://yourdomain.com/api/client-contacts?page=1",
"last": "http://yourdomain.com/api/client-contacts?page=2",
"prev": null,
"next": "http://yourdomain.com/api/client-contacts?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"links": [],
"path": "http://demo.csyp.com/api/client-contacts",
"per_page": 10,
"to": 10,
"total": 20
}
}
Crea un nuevo registro de contacto de cliente.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/client-contacts';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'business_associate_id' => '"0000000028"',
'business_name' => '"Empresa"',
'name' => '"Nombre"',
'position' => '"Cargo"',
'type' => '"Tipo"',
'email' => '"correo@correo.com"',
'mobile_phone' => '"987654321"',
'phone' => '"123456789"',
'city' => '"Ciudad"',
'birthday' => '"2025-11-12"',
'is_sales_person' => true,
'is_operational' => true,
'is_admin' => true,
'whatsapp_status' => false,
'notes' => '"Notas"',
'tags' => [
'13',
'11',
],
'operators' => [
'123456789',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"message": "Contacto creado correctamente",
"contact": {
"id": 1,
"business_associate": {
"id": "000000001",
"name": "Nombre cliente"
},
"business_name": "Nombre empresa",
"name": "Nombre contacto",
"position": "Cargo",
"type": "Tipo",
"email": "correo@example.com",
"city": "Ciudad",
"phone": "123456789",
"mobile_phone": "987654321",
"birthday": "1990-01-01",
"notes": "Creado automáticamente el 25/11/2020",
"is_admin": false,
"is_sales_person": false,
"is_operational": true,
"whatsapp_status": false,
"created_at": "2020-11-25 10:38:57",
"created_by": "USUARIO",
"updated_at": "2020-11-25 10:38:57",
"updated_by": "USUARIO"
}
}
Endpoint que permite consultar un contacto de cliente registrado en la aplicación.
The ID of the client contact.
ID del contacto de cliente para realizar la acción.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/client-contacts/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": {
"id": 1,
"business_associate": {
"id": "000000001",
"name": "Nombre cliente"
},
"business_name": "Nombre empresa",
"name": "Nombre contacto",
"position": "Cargo",
"type": "Tipo",
"email": "correo@example.com",
"city": "Ciudad",
"phone": "123456789",
"mobile_phone": "987654321",
"birthday": "1990-01-01",
"notes": "Creado automáticamente el 25/11/2020",
"is_admin": false,
"is_sales_person": false,
"is_operational": true,
"whatsapp_status": false,
"created_at": "2020-11-25 10:38:57",
"created_by": "USUARIO",
"updated_at": "2020-11-25 10:38:57",
"updated_by": "USUARIO"
},
"tags": [
"13",
"11"
],
"operators": [
"123456789"
]
}
Endpoint que permite editar los datos de un contacto de cliente registrado en la aplicación.
The ID of the client contact.
ID del contacto de cliente para realizar la acción.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/client-contacts/architecto';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'business_associate_id' => '"0000000028"',
'business_name' => '"EMPRESA LTDA"',
'name' => '"Nombre"',
'position' => '"Cargo"',
'type' => '"Tipo"',
'email' => '"correo@correo.com"',
'mobile_phone' => '"3012503849"',
'phone' => '"3012503849"',
'city' => '"Ciudad"',
'birthday' => '"2025-11-12"',
'is_sales_person' => true,
'is_operational' => true,
'is_admin' => true,
'whatsapp_status' => true,
'notes' => '"Creado automáticamente el 25/11/2020"',
'tags' => [
'13',
'12',
'1',
],
'operators' => [
'123456789',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"message": "Contacto actualizado correctamente",
"contact": {
"id": 1,
"business_associate": {
"id": "000000001",
"name": "Nombre cliente"
},
"business_name": "Nombre empresa",
"name": "Nombre contacto",
"position": "Cargo",
"type": "Tipo",
"email": "correo@example.com",
"city": "Ciudad",
"phone": "123456789",
"mobile_phone": "987654321",
"birthday": "1990-01-01",
"notes": "Creado automáticamente el 25/11/2020",
"is_admin": false,
"is_sales_person": false,
"is_operational": true,
"whatsapp_status": false,
"created_at": "2020-11-25 10:38:57",
"created_by": "USUARIO",
"updated_at": "2020-11-25 10:38:57",
"updated_by": "USUARIO"
}
}
Endpoint que permite eliminar un contacto de cliente.
The ID of the client contact.
ID del contacto de cliente a eliminar.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/client-contacts/architecto';
$response = $client->delete(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"message": "Contacto eliminado correctamente"
}
Obtiene una lista paginada de contenedores asociados a un DO.
Número del DO al que pertenecen los contenedores.
Número de página para la paginación.
Número de elementos por página.
Término de búsqueda para filtrar los resultados.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/containers';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'query' => [
'delivery_order_id' => 'MIMPOMD260110',
'page' => '1',
'per_page' => '10',
'search' => '"CONT-001"',
],
'json' => [
'page' => 16,
'perPage' => 22,
'search' => 'g',
'delivery_order_id' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": [
{
"id": 1,
"delivery_order_id": "MIMPOMD260110",
"container_quantity": 1,
"container_type": "40HC",
"container_number": "CONT-001",
"stamps": "SEAL-001",
"package_quantity": 10,
"package_description": "Cajas",
"merchandise": "Electrónica",
"weight": 1500.5,
"weight_unit": "KG",
"volume": 30,
"volume_unit": "M3",
"free_days": 15,
"return_date": "2025-02-15",
"external_id": "EXT-001",
"empty_return_place": "Puerto de Guayaquil",
"delivery_place": "Bodega Cliente",
"port_departure_date": "2025-01-20"
}
],
"links": {
"first": "http://yourdomain.com/api/containers?page=1",
"last": "http://yourdomain.com/api/containers?page=2",
"prev": null,
"next": "http://yourdomain.com/api/containers?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"links": [],
"path": "http://yourdomain.com/api/containers",
"per_page": 10,
"to": 10,
"total": 20
}
}
Obtiene la lista de Cotizaciones. Puedes filtrar los resultados usando los parámetros de consulta disponibles.
Buscar por número de cotización.
Filtrar por estado.
Filtrar por subtipo.
Filtrar por oficina.
Filtrar por origen.
Filtrar por destino.
Filtrar por incoterm.
Filtrar por moneda.
Filtrar por rango de fecha.
Filtrar por campos adicionales.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/quotes';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'query' => [
'search' => '123456',
],
'json' => [
'page' => 16,
'perPage' => 22,
'search' => 'g',
'filters' => [
'statuses' => [
'BORRADO',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": [
{
"id": "CSYP2055",
"consecutive": null,
"delivery_order_id": null,
"user_id": "SOPORTE",
"advisor_id": "901086265",
"advisor_name": "Soporte",
"campaign_id": "38",
"campaign_name": "TARIFAS PROMOCIONALES ",
"client_id": "",
"client_name": null,
"contact_id": "5",
"contact_name": "Adriana Zapata",
"supplier_id": "",
"supplier_name": null,
"shipper_id": null,
"shipper_name": null,
"consignee_id": null,
"consignee_name": null,
"notifier_id": null,
"notifier_name": null,
"description": "",
"entry_date": "23/04/2025",
"currency": "COP",
"office": "Routing order Honduras",
"origin": "ALEMANIA - BIELEFELD",
"destination": "ALEMANIA - ANSBACH",
"service_id": "PICKUP",
"service_name": "PICK UP ORDER nacional",
"subtype": "PICKUP",
"language": "",
"incoterm": "CIF",
"shipping_observations": null,
"rate_id": "",
"version": 1,
"status": "REQUERIMIENTO",
"rejection_reason": "REVIS",
"requirement_id": 114,
"created_at": "23/04/2025",
"updated_at": "23/04/2025"
}
]
}
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/quotes';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'sub_type' => 'architecto',
'service' => 'architecto',
'office' => 'architecto',
'entry_date' => 'architecto',
'contact_id' => 'architecto',
'sales_person_id' => 'architecto',
'origin' => 'architecto',
'destination' => 'architecto',
'incoterm' => 'architecto',
'currency' => 'architecto',
'status' => 'DO_ASIGNADO',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); Obtiene una lista paginada del Cuadro Contable. Puedes filtrar los resultados usando los parámetros de consulta disponibles.
Número de página para la paginación.
Número de elementos por página.
Término de búsqueda para filtrar los resultados.
Filtrar por DO.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/accounting-tables';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'query' => [
'page' => '1',
'per_page' => '15',
'search' => '"ABC123"',
'delivery_order_id' => '"DO12345"',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": [
{
"id": 1,
"quote_id": 1,
"delivery_order_id": 1,
"payment_term": "N/A",
"income_type": "N/A",
"concept": "N/A",
"group_id": 1,
"variation": "N/A",
"service_type": "N/A",
"supplier_type": "N/A",
"supplier_id": 1,
"supplier_name": "N/A",
"third_party_id": 1,
"applies_by": "N/A",
"unit": "N/A",
"sale_type": "N/A",
"sale_rate": 1,
"sale_rate_min": 1,
"sale_subtotal": 1,
"sale_currency": "N/A",
"sale_exchange_rate": 1,
"tax_rate": 1,
"total_sale": 1,
"total_sale_local_currency": 1,
"tax": 1,
"tax_local_currency": 1,
"sale_subtotal_local_currency": 1,
"purchase_type": "N/A",
"purchase": 1,
"purchase_rate": 1,
"purchase_rate_min": 1,
"purchase_currency": "N/A",
"purchase_exchange_rate": 1,
"purchase_local_currency": 1,
"purchase_invoice": "N/A",
"purchase_invoice_date": "2021-01-01",
"commission": 1,
"commission_value": 1,
"commission_value_local_currency": 1,
"profit": 1,
"quote_notes": "N/A",
"delivery_order_notes": "N/A",
"user_id": 1,
"created_at": null,
"updated_at": "2025-01-01 00:00:00"
}
],
"links": {
"first": "http://yourdomain.com/api/accounting-tables?page=1",
"last": "http://yourdomain.com/api/accounting-tables?page=2",
"prev": null,
"next": "http://yourdomain.com/api/accounting-tables?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"links": [],
"path": "http://demo.csyp.com/api/accounting-tables",
"per_page": 10,
"to": 10,
"total": 20
}
}
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/accounting-tables';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'delivery_order_id' => 'architecto',
'service_id' => 'architecto',
'service_type_id' => 'architecto',
'sale_tariff' => 4326.41688,
'sale_tariff_min' => 4326.41688,
'sale_exchange_rate' => 4326.41688,
'sale_tax' => 4326.41688,
'purchase_tariff' => 4326.41688,
'purchase_tariff_min' => 4326.41688,
'purchase_exchange_rate' => 4326.41688,
'commission' => 4326.41688,
'commission_total' => 4326.41688,
'commission_total_local_money' => 4326.41688,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); Obtiene una lista paginada de DO. Puedes filtrar los resultados usando los parámetros de consulta disponibles.
Número de página para la paginación.
Número de elementos por página.
Término de búsqueda para filtrar los resultados.
Un array con dos fechas ('d/m/Y') para filtrar por fecha de ingreso.
Un array de códigos de estado para filtrar.
Un array de códigos de información de estado para filtrar.
Un array de códigos de subtipo para filtrar.
Un array de códigos de oficina para filtrar.
Un array de códigos de incoterm para filtrar.
Un array de códigos de moneda para filtrar.
Término de búsqueda para filtrar por nombre o documento del cliente.
Término de búsqueda para filtrar por nombre o documento del shipper.
Término de búsqueda para filtrar por nombre o documento del consignatario.
Término de búsqueda para filtrar por nombre o documento del notificador.
Un array de números de DO para filtrar.
Un array de objetos con claves de campos para filtrar.
Un array de claves de campos para incluir en la respuesta.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/delivery-orders';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'query' => [
'page' => '1',
'per_page' => '15',
'search' => '"ABC123"',
'filters[date_range][0]' => '01/01/2025',
'filters[date_range][1]' => '31/12/2025',
'filters[statuses][0]' => 'A',
'filters[statuses_info][0]' => 'open',
'filters[subtype][0]' => 'IMP',
'filters[office][0]' => 'UIO',
'filters[incoterm][0]' => 'FOB',
'filters[currency][0]' => 'USD',
'filters[client]' => '"Juan Pérez"',
'filters[shipper]' => '"Empresa ABC"',
'filters[consignee]' => '"Importadora XYZ"',
'filters[notify]' => '"Agente 123"',
'filters[delivery_orders][0]' => 'DO-001',
'filters[delivery_orders][1]' => 'DO-002',
'filters[additional_fields]' => '[{"additional_field_key": "additional_field_value"}]',
'display_additional_fields[0]' => 'additional_field_key',
],
'json' => [
'page' => 16,
'perPage' => 22,
'search' => 'g',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": [
{
"id": 1,
"delivery_order": "DO-001",
"quote_id": "QT-001",
"type": "type",
"subtype": "IMP",
"month": "JAN",
"year": 2025,
"date": "01/01/2025",
"entry_date": "01/01/2025",
"alert_date": "15/01/2025",
"close_date": null,
"service_id": "SRV-01",
"service_name": "Service Name",
"client_id": "CLI-01",
"client_name": "Client Name",
"advisor_id": "ADV-01",
"advisor_name": "Advisor Name",
"agent_id": "AGN-01",
"agent_name": "Agent Name",
"coordinator_id": "COO-01",
"coordinator_name": "Coordinator Name",
"shipper_id": "SHIP-01",
"shipper_name": "Shipper Name",
"consignee_id": "CON-01",
"consignee_name": "Consignee Name",
"notifier_id": "NOT-01",
"notifier_name": "Notifier Name",
"etd": "01/01/2025",
"eta": "15/01/2025",
"total_sale": 1000,
"total_purchase": 800,
"status": "A",
"status_info": "open",
"shipment_name": "Shipment Name",
"office_id": "UIO",
"office_name": "Quito Office",
"currency": "USD",
"incoterm": "FOB",
"origin": "GYE",
"destination": "MIA",
"observations": "Some observations.",
"color": "#FF0000",
"user_id": "user123",
"last_novelty": "2025-01-01 10:00:00",
"updated_at": "2025-01-01 10:00:00",
"info_<campo_dinamico>": "valor"
}
],
"links": {
"first": "http://yourdomain.com/api/delivery-orders?page=1",
"last": "http://yourdomain.com/api/delivery-orders?page=2",
"prev": null,
"next": "http://yourdomain.com/api/delivery-orders?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"links": [],
"path": "http://demo.csyp.com/api/delivery-orders",
"per_page": 10,
"to": 10,
"total": 20
}
}
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/delivery-orders';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'subtype' => 'architecto',
'service' => 'architecto',
'office' => 'architecto',
'currency' => 'architecto',
'incoterm' => 'architecto',
'notes' => 'architecto',
'profit' => 4326.41688,
'quote_id' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); The client.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/clients/architecto/portal-tokens';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: https://yoursubdomain.conectacargo.co
vary: Origin
access-control-allow-credentials: true
{
"message": "Unauthenticated. Please provide valid authentication credentials.",
"error": "Authentication required"
}
The client.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/clients/architecto/portal-tokens';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'name' => 'b',
'days' => 22,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); The client.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/clients/architecto/portal-tokens/architecto';
$response = $client->delete(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); Endpoint para obtener la información adicional de Clientes, Proveedores, Cotizaciones, Requerimientos, Shipping Instruction y DO.
Tipo de recurso a consultar (client, supplier, quote, requirement, delivery-order).
ID del tipo de registro a consultar.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/additional-info/client/123456789';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": [
{
"description": "Información Adicional",
"type": "group",
"group": "group_1",
"items": [
{
"description": "Dirección Empresa",
"attribute": 1001,
"value": null,
"type": "input",
"list": null,
"group": null
}
]
}
]
}
Endpoint para editar la información adicional de Clientes, Proveedores, Cotizaciones, Requerimientos, Shipping Instruction y DO.
Tipo de recurso a consultar (client, supplier, quote, requirement, delivery-order).
ID del tipo de registro a consultar.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/additional-info/client/123456789';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
$o = [
clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
],
null,
[
'stdClass' => [
'attribute' => [
1001,
],
'value' => [
'test',
],
],
],
[
'items' => [
$o[0],
],
'version' => 1,
],
[]
),
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": {
"Dirección Empresa": "test"
},
"message": "Datos registrados"
}
Obtiene una lista paginada de Piezas. Puedes filtrar los resultados usando los parámetros de consulta disponibles.
Número de página para la paginación.
Número de elementos por página.
Término de búsqueda para filtrar los resultados.
Códigos de estado para filtrar las piezas.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/pieces';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'query' => [
'page' => '1',
'per_page' => '15',
'search' => '"ABC123"',
'filters[statuses][]' => '["PICK_UP", "ON_HAND", "CREATED", "DELIVERED"]',
],
'json' => [
'page' => 16,
'perPage' => 22,
'search' => 'g',
'filters' => [
'statuses' => [
'ON_HAND',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": [
{
"id": 168,
"external_id": "1321313",
"client_id": "1037619229",
"delivery_orders": "WR240387",
"qty": 1,
"weight_calculation_mode": 0,
"gross_weight": 4.99,
"weight_unit": "KG",
"length": 12,
"width": 23,
"height": 3,
"cubic_feet": 0.02924,
"cubic_mt": 0.00083,
"total_gross_weight": 4.99,
"volume": 828,
"volume_pieces": 0,
"dimension_unit": "cm",
"location_id": 0,
"package_type": "CAJA",
"description": "partes de motos",
"status": "ON_HAND",
"rate": 0,
"min_rate": 0,
"terms": "PESO",
"processes_count": 2,
"created_at": "2025-08-23 18:44:20",
"created_by": "SOPORTE",
"updated_at": "2025-08-23 18:44:20",
"updated_by": "SOPORTE"
}
],
"links": {
"first": "http://yoursubdomain.csyp.co/api/pieces?page=1",
"last": "http://yoursubdomain.csyp.co/api/pieces?page=2",
"prev": null,
"next": "http://yoursubdomain.csyp.co/api/pieces?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"links": [],
"path": "http://yoursubdomain.csyp.co/api/pieces",
"per_page": 10,
"to": 10,
"total": 20
}
}
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/pieces';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'qty' => 16,
'gross_weight' => 39,
'weight_unit' => 'KG',
'weight_calculation_mode' => 1,
'volume_calculation_mode' => 0,
'length' => 8,
'width' => 76,
'height' => 60,
'dimension_unit' => 'ft',
'package_type' => 'architecto',
'description' => 'Et animi quos velit et fugiat.',
'terms' => 'architecto',
'rate' => 4326.41688,
'min_rate' => 4326.41688,
'container_id' => 16,
'mode' => 'T',
'status' => 'PICK_UP',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"message": "Pieza creada correctamente",
"data": {}
}
Devuelve las columnas dinámicas (servicios/adicionales/compras) de un tipo de
tarifario, usadas para armar el formulario/grid de tarifas. type está limitado
a sales|purchase en la ruta; las columnas de compras solo aplican al tarifario de compras.
Tipo de tarifario (sales|purchase).
Id del tipo de tarifario.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/tariff-columns/sales/5';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"columns": {
"services": [
{
"service_id": 10,
"variation_id": 2,
"service_name": "Flete",
"variation_name": "Aéreo",
"order": 1
}
],
"additionals": [
{
"additional_id": 7,
"name": "Seguro",
"order": 1
}
],
"purchases": [
{
"purchase_id": 4,
"name": "Comisión",
"order": 1
}
]
}
}
Lista paginada de tarifas de compra de un tipo de tarifario. El filtro
filters[tariff_type_id] es obligatorio (el listado siempre se acota a un tarifario).
Número de página para la paginación.
Número de elementos por página.
Término de búsqueda (país/ciudad origen y destino, proveedor).
Id del tipo de tarifario.
Cédula/Id del proveedor (exacto).
País de origen (LIKE).
Ciudad de origen (LIKE).
País de destino (LIKE).
Ciudad de destino (LIKE).
Estados a filtrar (1 = Vigente, 0 = Vencida).
Fecha de vigencia (d/m/Y) para comparar.
Operador de comparación de vigencia (>= después del, <= antes del).
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/purchase-tariffs';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'query' => [
'page' => '1',
'per_page' => '15',
'search' => '"Bogota"',
'filters[tariff_type_id]' => '5',
'filters[supplier_id]' => '"900123456"',
'filters[origin_country]' => '"Colombia"',
'filters[origin_city]' => '"Bogota"',
'filters[destination_country]' => '"Peru"',
'filters[destination_city]' => '"Lima"',
'filters[statuses][0]' => '1',
'filters[validity]' => '"31/12/2025"',
'filters[validity_operator]' => '">="',
],
'json' => [
'page' => 16,
'perPage' => 22,
'search' => 'g',
'filters' => [
'tariff_type_id' => 16,
'supplier_id' => 'architecto',
'origin_country' => 'architecto',
'origin_city' => 'architecto',
'destination_country' => 'architecto',
'destination_city' => 'architecto',
'statuses' => [
1,
],
'validity' => 'gzmiyv',
'validity_operator' => '<=',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": [
{
"id": 1,
"tariff_type_id": 5,
"status": "1",
"supplier_id": "900123456",
"supplier_name": "Proveedor S.A.",
"origin_country": "Colombia",
"origin_city": "Bogota",
"destination_country": "Peru",
"destination_city": "Lima",
"validity": "31/12/2025",
"price_list_id": 3,
"price_list_name": "Lista General",
"services": [
{
"service_id": 10,
"variation_id": 2,
"value": 120
}
],
"additionals": [
{
"additional_id": 7,
"value": 18
}
],
"purchases": [
{
"purchase_id": 4,
"value": 30
}
]
}
],
"links": {
"first": "http://yourdomain.com/api/purchase-tariffs?page=1",
"last": "http://yourdomain.com/api/purchase-tariffs?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http://yourdomain.com/api/purchase-tariffs",
"per_page": 15,
"to": 1,
"total": 1
}
}
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/purchase-tariffs';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'tariff_type_id' => 16,
'supplier_id' => 'n',
'origin_country' => 'g',
'origin_city' => 'z',
'destination_country' => 'm',
'destination_city' => 'i',
'status' => 0,
'validity' => 'v',
'price_list_id' => 16,
'services' => [
[
'service_id' => 16,
'variation_id' => 16,
'value' => 4326.41688,
],
],
'additionals' => [
[
'additional_id' => 16,
'value' => 4326.41688,
],
],
'purchases' => [
[
'purchase_id' => 16,
'value' => 4326.41688,
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"purchase_tariff": {
"id": 1,
"tariff_type_id": 5,
"status": "1",
"supplier_id": "900123456",
"supplier_name": "Proveedor S.A.",
"origin_country": "Colombia",
"origin_city": "Bogota",
"destination_country": "Peru",
"destination_city": "Lima",
"validity": "31/12/2025",
"price_list_id": 3,
"price_list_name": "Lista General",
"services": [
{
"service_id": 10,
"variation_id": 2,
"value": 120
}
],
"additionals": [
{
"additional_id": 7,
"value": 18
}
],
"purchases": [
{
"purchase_id": 4,
"value": 30
}
]
},
"message": "La tarifa de compra se ha creado correctamente."
}
The ID of the purchase tariff.
Id de la tarifa de compra.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/purchase-tariffs/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"purchase_tariff": {
"id": 1,
"tariff_type_id": 5,
"status": "1",
"supplier_id": "900123456",
"supplier_name": "Proveedor S.A.",
"origin_country": "Colombia",
"origin_city": "Bogota",
"destination_country": "Peru",
"destination_city": "Lima",
"validity": "31/12/2025",
"price_list_id": 3,
"price_list_name": "Lista General",
"services": [
{
"service_id": 10,
"variation_id": 2,
"value": 120
}
],
"additionals": [
{
"additional_id": 7,
"value": 18
}
],
"purchases": [
{
"purchase_id": 4,
"value": 30
}
]
}
}
The ID of the purchase tariff.
Id de la tarifa de compra.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/purchase-tariffs/architecto';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'tariff_type_id' => 16,
'supplier_id' => 'n',
'origin_country' => 'g',
'origin_city' => 'z',
'destination_country' => 'm',
'destination_city' => 'i',
'status' => 0,
'validity' => 'v',
'price_list_id' => 16,
'services' => [
[
'service_id' => 16,
'variation_id' => 16,
'value' => 4326.41688,
],
],
'additionals' => [
[
'additional_id' => 16,
'value' => 4326.41688,
],
],
'purchases' => [
[
'purchase_id' => 16,
'value' => 4326.41688,
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"purchase_tariff": {
"id": 1,
"tariff_type_id": 5,
"status": "1",
"supplier_id": "900123456",
"supplier_name": "Proveedor S.A.",
"origin_country": "Colombia",
"origin_city": "Bogota",
"destination_country": "Peru",
"destination_city": "Lima",
"validity": "31/12/2025",
"price_list_id": 3,
"price_list_name": "Lista General",
"services": [
{
"service_id": 10,
"variation_id": 2,
"value": 120
}
],
"additionals": [
{
"additional_id": 7,
"value": 18
}
],
"purchases": [
{
"purchase_id": 4,
"value": 30
}
]
},
"message": "La tarifa de compra se ha actualizado correctamente."
}
Lista paginada de tarifas de venta de un tipo de tarifario. El filtro
filters[tariff_type_id] es obligatorio (el listado siempre se acota a un tarifario).
Número de página para la paginación.
Número de elementos por página.
Término de búsqueda (país/ciudad origen y destino, proveedor).
Id del tipo de tarifario.
Cédula/Id del proveedor (exacto).
País de origen (LIKE).
Ciudad de origen (LIKE).
País de destino (LIKE).
Ciudad de destino (LIKE).
Estados a filtrar (1 = Vigente, 0 = Vencida).
Fecha de vigencia (d/m/Y) para comparar.
Operador de comparación de vigencia (>= después del, <= antes del).
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/sales-tariffs';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'query' => [
'page' => '1',
'per_page' => '15',
'search' => '"Bogota"',
'filters[tariff_type_id]' => '5',
'filters[supplier_id]' => '"900123456"',
'filters[origin_country]' => '"Colombia"',
'filters[origin_city]' => '"Bogota"',
'filters[destination_country]' => '"Peru"',
'filters[destination_city]' => '"Lima"',
'filters[statuses][0]' => '1',
'filters[validity]' => '"31/12/2025"',
'filters[validity_operator]' => '">="',
],
'json' => [
'page' => 16,
'perPage' => 22,
'search' => 'g',
'filters' => [
'tariff_type_id' => 16,
'supplier_id' => 'architecto',
'origin_country' => 'architecto',
'origin_city' => 'architecto',
'destination_country' => 'architecto',
'destination_city' => 'architecto',
'statuses' => [
1,
],
'validity' => 'gzmiyv',
'validity_operator' => '<=',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"data": [
{
"id": 1,
"tariff_type_id": 5,
"status": "1",
"supplier_id": "900123456",
"supplier_name": "Proveedor S.A.",
"origin_country": "Colombia",
"origin_city": "Bogota",
"destination_country": "Peru",
"destination_city": "Lima",
"validity": "31/12/2025",
"price_list_id": 3,
"price_list_name": "Lista General",
"services": [
{
"service_id": 10,
"variation_id": 2,
"value": 150
}
],
"additionals": [
{
"additional_id": 7,
"value": 25
}
]
}
],
"links": {
"first": "http://yourdomain.com/api/sales-tariffs?page=1",
"last": "http://yourdomain.com/api/sales-tariffs?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http://yourdomain.com/api/sales-tariffs",
"per_page": 15,
"to": 1,
"total": 1
}
}
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/sales-tariffs';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'tariff_type_id' => 16,
'supplier_id' => 'n',
'origin_country' => 'g',
'origin_city' => 'z',
'destination_country' => 'm',
'destination_city' => 'i',
'status' => 0,
'validity' => 'v',
'price_list_id' => 16,
'services' => [
[
'service_id' => 16,
'variation_id' => 16,
'value' => 4326.41688,
],
],
'additionals' => [
[
'additional_id' => 16,
'value' => 4326.41688,
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"sales_tariff": {
"id": 1,
"tariff_type_id": 5,
"status": "1",
"supplier_id": "900123456",
"supplier_name": "Proveedor S.A.",
"origin_country": "Colombia",
"origin_city": "Bogota",
"destination_country": "Peru",
"destination_city": "Lima",
"validity": "31/12/2025",
"price_list_id": 3,
"price_list_name": "Lista General",
"services": [
{
"service_id": 10,
"variation_id": 2,
"value": 150
}
],
"additionals": [
{
"additional_id": 7,
"value": 25
}
]
},
"message": "La tarifa de venta se ha creado correctamente."
}
The ID of the sales tariff.
Id de la tarifa de venta.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/sales-tariffs/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"sales_tariff": {
"id": 1,
"tariff_type_id": 5,
"status": "1",
"supplier_id": "900123456",
"supplier_name": "Proveedor S.A.",
"origin_country": "Colombia",
"origin_city": "Bogota",
"destination_country": "Peru",
"destination_city": "Lima",
"validity": "31/12/2025",
"price_list_id": 3,
"price_list_name": "Lista General",
"services": [
{
"service_id": 10,
"variation_id": 2,
"value": 150
}
],
"additionals": [
{
"additional_id": 7,
"value": 25
}
]
}
}
The ID of the sales tariff.
Id de la tarifa de venta.
$client = new \GuzzleHttp\Client();
$url = 'https://yoursubdomain.csyp.co/api/sales-tariffs/architecto';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://yoursubdomain.conectacargo.co',
],
'json' => [
'tariff_type_id' => 16,
'supplier_id' => 'n',
'origin_country' => 'g',
'origin_city' => 'z',
'destination_country' => 'm',
'destination_city' => 'i',
'status' => 0,
'validity' => 'v',
'price_list_id' => 16,
'services' => [
[
'service_id' => 16,
'variation_id' => 16,
'value' => 4326.41688,
],
],
'additionals' => [
[
'additional_id' => 16,
'value' => 4326.41688,
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"sales_tariff": {
"id": 1,
"tariff_type_id": 5,
"status": "1",
"supplier_id": "900123456",
"supplier_name": "Proveedor S.A.",
"origin_country": "Colombia",
"origin_city": "Bogota",
"destination_country": "Peru",
"destination_city": "Lima",
"validity": "31/12/2025",
"price_list_id": 3,
"price_list_name": "Lista General",
"services": [
{
"service_id": 10,
"variation_id": 2,
"value": 150
}
],
"additionals": [
{
"additional_id": 7,
"value": 25
}
]
},
"message": "La tarifa de venta se ha actualizado correctamente."
}