Skip to content

Instantly share code, notes, and snippets.

@renearias
Last active April 27, 2020 17:10
Show Gist options
  • Save renearias/7c7140cae1da10232abecf85d3e61375 to your computer and use it in GitHub Desktop.
Save renearias/7c7140cae1da10232abecf85d3e61375 to your computer and use it in GitHub Desktop.
Multiacademico Api

Autorizacion

EndPoint

Para solicitar un token se enviara una solicitud POST a continuacion un ejemplo en javascript;

const url = "https://{{API_SUBDOMAIN}}/oauth/v2/token";


const headers = {
  "Authorization": "Basic {{CLIENT CREDENTIALS BASE 64}}",
  "Content-Type": "application/json" 
}


const bodyRequest = {
  "grant_type": "client_credentials",
  "scope": ""
}

fetch(url,{ method: 'POST',
            headers: headers,
            body: bodyRequest })
.then(function(response) {
  return response;
})

Consulta de Facturas Emitidas

Endpoint

var url = "https://{{API_SUBDOMAIN}}/api/v2/factura/all/contable.json"

Ejemplo de Resultado

  [
    {
        "secuencial": 0,
        "clave_acceso": "0123456789099261363700110020010000000021234567818",
        "firmado": true,
        "autorizado": true,
        "enviado": true
    },
    //......
  ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment