Skip to content

Instantly share code, notes, and snippets.

@eraad
Created April 3, 2019 14:52
Show Gist options
  • Select an option

  • Save eraad/f40a8c2e158242b855e1bc96741496b4 to your computer and use it in GitHub Desktop.

Select an option

Save eraad/f40a8c2e158242b855e1bc96741496b4 to your computer and use it in GitHub Desktop.
Consulta de comprobantes emitidos en Datil
<?php
require 'vendor/autoload.php';
$headers = array('X-Api-Key' => 'tu-api-key',
'Accept' => 'application/json');
$params = array('issue_from' => '2019-01-01',
'issue_to' => '2019-12-31',
'page_size' => '10',
'page' => '1',
'authorized' => 'true',
'customer_tax_identification' => 'el-ruc-o-cedula-del-cliente');
$url = 'https://api.datil.co/sales/invoices' . '?' . http_build_query($params);
$response = Requests::get($url, $headers, $params);
echo $response->body;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment