Reviewing 1099-MISC Statements
Two queries are available for reviewing 1099-MISC statements, getStatements
and getF1099miscStatements
. The getStatements
query is the more flexible of the two, so you should use it whenever possible and only use getF1099miscStatements
when you need to review information that only appears on Form 1099-MISC (for example, rents or royalties). More information about the distinction between the generic and distinct statement objects is included in the overview of the API design philosophy.
The getStatements
Query
The getStatements
query accepts more search parameters than getF1099miscStatements
, and it allows for retrieval of multiple statement types simultaneously. You should use the getStatements
query where possible in order to take advantage of the increased flexibility it provides. See the getStatements
documentation for more information.
The getF1099miscStatements
Query
Use the getF1099miscStatements
query when you need to retrieve information that only appears on Form 1099-MISC, for example rents or royalties.
The getF1099miscStatements
query accepts only two arguments, both of which are optional: an array of OTX IDs and an array of uploader IDs. The search logic combines these two criteria. If you supply both parameters, only statements with matching OTX IDs and matching uploader IDs are returned. Generally speaking, you should supply only one parameter or the other. Since each parameter is unique across all statements, the query returns at most one statement for each value in the list. If you wish to search for statements using different criteria, use the getStatements
query which supports additional search parameters.
Note
The getF1099miscStatements
query returns at most 100 statements.
When querying statements, always check the hasNextPage
field of the pageInfo
object to ensure you have retrieved all matching statements.
If your query does not return all statements, page through the result set by making additional queries.
The sample code below demonstrates using the getF1099miscStatements
query and retrieving a subset of fields. Full and up-to-date documentation is available as part of the introspective GraphQL documentation.
Retrieving All 1099-MISC Statements
The query below retrieves all 1099-MISC statements.
query {
getF1099miscStatements {
errors
statements {
pageInfo {
hasNextPage
}
nodes {
otxId
uploaderId
recipientFirstName
recipientLastName
medicalPayments
otherIncome
rents
}
}
}
}
The code snippets below illustrate running the query. See the documentation on authentication for information about obtaining the credential data passed in the header.
# Terminate lines with \ character to allow command to span multiple lines.
# Use here document for data stream.
# Tested using the bash interpreter on Linux.
curl 'https://sandbox.ottertax.com/v2/graphql' \
-i \
-X POST \
-H 'content-type: application/json' \
-H 'access-token: YOUR ACCESS TOKEN' \
-H 'client: YOUR CLIENT ID' \
-H 'uid: YOUR UID' \
-d @- <<END_DATA
{
"query":"
query {
getF1099miscStatements {
errors
statements {
pageInfo {
hasNextPage
}
nodes {
otxId
uploaderId
recipientFirstName
recipientLastName
medicalPayments
otherIncome
rents
}
}
}
}
"
}
END_DATA
:: Terminate lines with ^ character to allow command to span multiple lines.
:: Precede quotation marks in data stream with backslashes.
:: Tested using a command prompt on Windows 10.
curl "https://sandbox.ottertax.com/v2/graphql" ^
-i ^
-X POST ^
-H "content-type: application/json" ^
-H "access-token: YOUR ACCESS TOKEN" ^
-H "client: YOUR CLIENT ID" ^
-H "uid: YOUR UID" ^
-d "{ \"query\":\" ^
query { ^
getF1099miscStatements { ^
errors ^
statements { ^
pageInfo { ^
hasNextPage ^
} ^
nodes { ^
otxId ^
uploaderId ^
recipientFirstName ^
recipientLastName ^
medicalPayments ^
otherIncome ^
rents ^
} ^
} ^
} ^
} ^
\" }"
// Using graphql-request from
// https://github.com/prisma-labs/graphql-request
// Example tested with node version 14.16.0
import { GraphQLClient, gql } from 'graphql-request'
async function main() {
const endpoint = 'https://sandbox.ottertax.com/v2/graphql'
const graphQLClient = new GraphQLClient(endpoint, {
headers: {
'access-token': 'YOUR ACCESS TOKEN',
'client': 'YOUR CLIENT ID',
'uid': 'YOUR UID'
},
})
const query = gql`
query {
getF1099miscStatements {
errors
statements {
pageInfo {
hasNextPage
}
nodes {
otxId
uploaderId
recipientFirstName
recipientLastName
medicalPayments
otherIncome
rents
}
}
}
}
`
const data = await graphQLClient.request(query)
console.log(JSON.stringify(data))
}
main().catch((error) => console.error(error))
<?php
// Tested with php-cli version 8.0.5.
$query =<<<'END_DATA'
query {
getF1099miscStatements {
errors
statements {
pageInfo {
hasNextPage
}
nodes {
otxId
uploaderId
recipientFirstName
recipientLastName
medicalPayments
otherIncome
rents
}
}
}
}
END_DATA;
$payload = array ('query' => $query);
$options = array(
'http' => array(
'method' => 'POST',
'content' => json_encode( $payload ),
'header'=> "Content-Type: application/json\r\n" .
"access-token: YOUR ACCESS TOKEN\r\n" .
"client: YOUR CLIENT ID\r\n" .
"uid: YOUR UID\r\n"
)
);
$context = stream_context_create( $options );
$response = file_get_contents( 'https://sandbox.ottertax.com/v2/graphql',
false, $context );
if( $response === FALSE ) {
echo "Call to server failed.\n";
} else {
echo $response . "\n";
}
?>
# Using GQL from
# https://github.com/graphql-python/gql
# Tested using python version 3.8.8
from gql import gql, Client
from gql.transport.aiohttp import AIOHTTPTransport
transport = AIOHTTPTransport(url="https://sandbox.ottertax.com/v2/graphql",
headers={ 'access-token': 'YOUR ACCESS TOKEN',
'client': 'YOUR CLIENT ID',
'uid': 'YOUR UID' })
client = Client(transport=transport, fetch_schema_from_transport=True)
query = gql(
"""
query {
getF1099miscStatements {
errors
statements {
pageInfo {
hasNextPage
}
nodes {
otxId
uploaderId
recipientFirstName
recipientLastName
medicalPayments
otherIncome
rents
}
}
}
}
"""
)
result = client.execute(query)
print(result)
# If you wish to use a library instead, see
# https://github.com/github/graphql-client
# Tested using ruby 2.7.2.
require( 'net/http' )
require( 'uri' )
require( 'json' )
uri = URI( "https://sandbox.ottertax.com/v2/graphql" )
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
headers = { 'Content-Type': 'application/json',
'access-token': 'YOUR ACCESS TOKEN',
'client': 'YOUR CLIENT ID',
'uid': 'YOUR UID' }
query = <<-END_DATA
query {
getF1099miscStatements {
errors
statements {
pageInfo {
hasNextPage
}
nodes {
otxId
uploaderId
recipientFirstName
recipientLastName
medicalPayments
otherIncome
rents
}
}
}
}
END_DATA
request = Net::HTTP::Post.new(uri.request_uri, headers )
request.body = {query: query}.to_json
response = http.request(request)
if( response.code == '200' )
payload = JSON.parse( response.body )
STDOUT.puts( payload )
else
STDOUT.puts( "Response code was #{response.code}:\n#{response.inspect}" )
end
Retrieving Specific 1099-MISC Statements
The example that follows illustrates the getF1099miscStatements
query to get a specific set of statements. A list of OTX IDs is passed to the query, and only statements with matching OTX IDs are returned. To search by uploader ID, supply a list of uploaderIds
instead.
query {
getF1099miscStatements(
otxIds: [
"6a9f8470-f71d-4a50-bb8c-3ef111035030"
"d3297b6f-af23-4088-a7fd-dcae8e4621c9"
"49b63919-7b59-48e6-800a-96b8fee1fcbc"
"91e04db5-77a4-4bc4-9bbe-f97f3e4803db"
"a76f03f2-3be5-4bf3-99e3-b4f27efd43ed"
]
) {
errors
statements {
pageInfo {
hasNextPage
}
nodes {
otxId
uploaderId
recipientFirstName
recipientLastName
medicalPayments
otherIncome
rents
}
}
}
}
The code snippets below illustrate running the query. See the documentation on authentication for information about obtaining the credential data passed in the header.
# Terminate lines with \ character to allow command to span multiple lines.
# Escape quotation marks in body of mutation or query with backslashes.
# Use here document for data stream.
# Tested using the bash interpreter on Linux.
curl 'https://sandbox.ottertax.com/v2/graphql' \
-i \
-X POST \
-H 'content-type: application/json' \
-H 'access-token: YOUR ACCESS TOKEN' \
-H 'client: YOUR CLIENT ID' \
-H 'uid: YOUR UID' \
-d @- <<END_DATA
{
"query":"
query {
getF1099miscStatements(
otxIds: [
\"6a9f8470-f71d-4a50-bb8c-3ef111035030\"
\"d3297b6f-af23-4088-a7fd-dcae8e4621c9\"
\"49b63919-7b59-48e6-800a-96b8fee1fcbc\"
\"91e04db5-77a4-4bc4-9bbe-f97f3e4803db\"
\"a76f03f2-3be5-4bf3-99e3-b4f27efd43ed\"
]
) {
errors
statements {
pageInfo {
hasNextPage
}
nodes {
otxId
uploaderId
recipientFirstName
recipientLastName
medicalPayments
otherIncome
rents
}
}
}
}
"
}
END_DATA
:: Terminate lines with ^ character to allow command to span multiple lines.
:: Precede quotation marks in body of mutation or query with triple backslashes.
:: Precede other quotation marks in data stream with single backslashes.
:: Tested using a command prompt on Windows 10.
curl "https://sandbox.ottertax.com/v2/graphql" ^
-i ^
-X POST ^
-H "content-type: application/json" ^
-H "access-token: YOUR ACCESS TOKEN" ^
-H "client: YOUR CLIENT ID" ^
-H "uid: YOUR UID" ^
-d "{ \"query\":\" ^
query { ^
getF1099miscStatements( ^
otxIds: [ ^
\\\"6a9f8470-f71d-4a50-bb8c-3ef111035030\\\" ^
\\\"d3297b6f-af23-4088-a7fd-dcae8e4621c9\\\" ^
\\\"49b63919-7b59-48e6-800a-96b8fee1fcbc\\\" ^
\\\"91e04db5-77a4-4bc4-9bbe-f97f3e4803db\\\" ^
\\\"a76f03f2-3be5-4bf3-99e3-b4f27efd43ed\\\" ^
] ^
) { ^
errors ^
statements { ^
pageInfo { ^
hasNextPage ^
} ^
nodes { ^
otxId ^
uploaderId ^
recipientFirstName ^
recipientLastName ^
medicalPayments ^
otherIncome ^
rents ^
} ^
} ^
} ^
} ^
\" }"
// Using graphql-request from
// https://github.com/prisma-labs/graphql-request
// Example tested with node version 14.16.0
import { GraphQLClient, gql } from 'graphql-request'
async function main() {
const endpoint = 'https://sandbox.ottertax.com/v2/graphql'
const graphQLClient = new GraphQLClient(endpoint, {
headers: {
'access-token': 'YOUR ACCESS TOKEN',
'client': 'YOUR CLIENT ID',
'uid': 'YOUR UID'
},
})
const query = gql`
query {
getF1099miscStatements(
otxIds: [
"6a9f8470-f71d-4a50-bb8c-3ef111035030"
"d3297b6f-af23-4088-a7fd-dcae8e4621c9"
"49b63919-7b59-48e6-800a-96b8fee1fcbc"
"91e04db5-77a4-4bc4-9bbe-f97f3e4803db"
"a76f03f2-3be5-4bf3-99e3-b4f27efd43ed"
]
) {
errors
statements {
pageInfo {
hasNextPage
}
nodes {
otxId
uploaderId
recipientFirstName
recipientLastName
medicalPayments
otherIncome
rents
}
}
}
}
`
const data = await graphQLClient.request(query)
console.log(JSON.stringify(data))
}
main().catch((error) => console.error(error))
<?php
// Tested with php-cli version 8.0.5.
$query =<<<'END_DATA'
query {
getF1099miscStatements(
otxIds: [
"6a9f8470-f71d-4a50-bb8c-3ef111035030"
"d3297b6f-af23-4088-a7fd-dcae8e4621c9"
"49b63919-7b59-48e6-800a-96b8fee1fcbc"
"91e04db5-77a4-4bc4-9bbe-f97f3e4803db"
"a76f03f2-3be5-4bf3-99e3-b4f27efd43ed"
]
) {
errors
statements {
pageInfo {
hasNextPage
}
nodes {
otxId
uploaderId
recipientFirstName
recipientLastName
medicalPayments
otherIncome
rents
}
}
}
}
END_DATA;
$payload = array ('query' => $query);
$options = array(
'http' => array(
'method' => 'POST',
'content' => json_encode( $payload ),
'header'=> "Content-Type: application/json\r\n" .
"access-token: YOUR ACCESS TOKEN\r\n" .
"client: YOUR CLIENT ID\r\n" .
"uid: YOUR UID\r\n"
)
);
$context = stream_context_create( $options );
$response = file_get_contents( 'https://sandbox.ottertax.com/v2/graphql',
false, $context );
if( $response === FALSE ) {
echo "Call to server failed.\n";
} else {
echo $response . "\n";
}
?>
# Using GQL from
# https://github.com/graphql-python/gql
# Tested using python version 3.8.8
from gql import gql, Client
from gql.transport.aiohttp import AIOHTTPTransport
transport = AIOHTTPTransport(url="https://sandbox.ottertax.com/v2/graphql",
headers={ 'access-token': 'YOUR ACCESS TOKEN',
'client': 'YOUR CLIENT ID',
'uid': 'YOUR UID' })
client = Client(transport=transport, fetch_schema_from_transport=True)
query = gql(
"""
query {
getF1099miscStatements(
otxIds: [
"6a9f8470-f71d-4a50-bb8c-3ef111035030"
"d3297b6f-af23-4088-a7fd-dcae8e4621c9"
"49b63919-7b59-48e6-800a-96b8fee1fcbc"
"91e04db5-77a4-4bc4-9bbe-f97f3e4803db"
"a76f03f2-3be5-4bf3-99e3-b4f27efd43ed"
]
) {
errors
statements {
pageInfo {
hasNextPage
}
nodes {
otxId
uploaderId
recipientFirstName
recipientLastName
medicalPayments
otherIncome
rents
}
}
}
}
"""
)
result = client.execute(query)
print(result)
# If you wish to use a library instead, see
# https://github.com/github/graphql-client
# Tested using ruby 2.7.2.
require( 'net/http' )
require( 'uri' )
require( 'json' )
uri = URI( "https://sandbox.ottertax.com/v2/graphql" )
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
headers = { 'Content-Type': 'application/json',
'access-token': 'YOUR ACCESS TOKEN',
'client': 'YOUR CLIENT ID',
'uid': 'YOUR UID' }
query = <<-END_DATA
query {
getF1099miscStatements(
otxIds: [
"6a9f8470-f71d-4a50-bb8c-3ef111035030"
"d3297b6f-af23-4088-a7fd-dcae8e4621c9"
"49b63919-7b59-48e6-800a-96b8fee1fcbc"
"91e04db5-77a4-4bc4-9bbe-f97f3e4803db"
"a76f03f2-3be5-4bf3-99e3-b4f27efd43ed"
]
) {
errors
statements {
pageInfo {
hasNextPage
}
nodes {
otxId
uploaderId
recipientFirstName
recipientLastName
medicalPayments
otherIncome
rents
}
}
}
}
END_DATA
request = Net::HTTP::Post.new(uri.request_uri, headers )
request.body = {query: query}.to_json
response = http.request(request)
if( response.code == '200' )
payload = JSON.parse( response.body )
STDOUT.puts( payload )
else
STDOUT.puts( "Response code was #{response.code}:\n#{response.inspect}" )
end
Downloading PDFs
You may wish to download PDF versions of statements as part of your review process. The PDF is available on both the generic statement object and the distinct 1099-MISC statement object. The PDF is encoded as base 64 text, and the process for decoding it is explained here.