Skip to content

Instantly share code, notes, and snippets.

@sts-developer
Created March 20, 2025 12:22
Show Gist options
  • Select an option

  • Save sts-developer/b9c8321fd8ce40139dc6c0a526c23e58 to your computer and use it in GitHub Desktop.

Select an option

Save sts-developer/b9c8321fd8ce40139dc6c0a526c23e58 to your computer and use it in GitHub Desktop.
Sample code for Node js Form1099OID Validate method
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://testapi.taxbandits.com/v1.7.3/Form1099OID/Validate?SubmissionId=42c589e6-f824-4a0c-afca-8f592c62b2fd&RecordIds=7c1654e0-b0a0-4719-b5af-76596d79ca25',
headers: {
'Authorization': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJlYzE0NTIxYjMxNGY0N2RhOTc5ODMzYjVlZjkxNDU5ZSIsImV4cCI6MTcyMzQ1MzY0OSwiaWF0IjoxNzIzNDUwMDQ5LCJpc3MiOiJodHRwczovL3Rlc3RvYXV0aC5leHByZXNzYXV0aC5uZXQvdjIvIiwic3ViIjoiYTQyMWE2MWUzOWUyY2U3ZSJ9.VM4jhtJ6xM3Nbc9JJDLxwESDj6wP7LCY2U1E51o9fbE'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data),null,2);
})
.catch((error) => {
if (error.response) {
console.error(JSON.stringify(error.response.data),null,2);
} else if (error.request) {
console.error(error.request);
} else {
console.error(error.message);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment