Created
March 20, 2025 12:12
-
-
Save sts-developer/6e7caa903332d9eaab80437f0772f0ea to your computer and use it in GitHub Desktop.
Sample code for Node js Form1099OID Transmit method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const axios = require('axios'); | |
| let data = JSON.stringify({ | |
| "SubmissionId": "efacde0b-93e4-4327-84f5-f003b14fdc47", | |
| "RecordIds": [ | |
| "7629fc38-5a6f-4b51-842e-b3058bc5a94c" | |
| ] | |
| }); | |
| let config = { | |
| method: 'post', | |
| maxBodyLength: Infinity, | |
| url: 'https://testapi.taxbandits.com/v1.7.3/Form1099OID/Transmit', | |
| headers: { | |
| 'Authorization': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhM2VkMWE1ZTkwMWI0YmQzOTY5NTYwMTljYTRjMWZmOCIsImV4cCI6MTcyMzQ1Nzc1NiwiaWF0IjoxNzIzNDU0MTU2LCJpc3MiOiJodHRwczovL3Rlc3RvYXV0aC5leHByZXNzYXV0aC5uZXQvdjIvIiwic3ViIjoiOTc0YTFiZDU5Yjk3ZTE1YyJ9.DOdss97pIy6_rrS2IMDG5H8-sj0sg2cRF5upCVhBpBU', | |
| 'Content-Type': 'application/json' | |
| }, | |
| data : data | |
| }; | |
| 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