curl --request GET \
--url https://qubesync.com/api/v1/connections/{connection_id}/credit_memos \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://qubesync.com/api/v1/connections/{connection_id}/credit_memos"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://qubesync.com/api/v1/connections/{connection_id}/credit_memos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qubesync.com/api/v1/connections/{connection_id}/credit_memos",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://qubesync.com/api/v1/connections/{connection_id}/credit_memos"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://qubesync.com/api/v1/connections/{connection_id}/credit_memos")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qubesync.com/api/v1/connections/{connection_id}/credit_memos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"state": "waiting",
"request_xml": "<QBXML><QBXMLMsgsRq onError='stopOnError'><CustomerQueryRq requestID='1'><MaxReturned>100</MaxReturned></CustomerQueryRq></QBXMLMsgsRq></QBXML>",
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"webhook_state": "not_applicable",
"request_json": {
"version": "13.0",
"request": {
"name": "CustomerQueryRq",
"attributes": {
"requestID": "1"
},
"children": [
{
"name": "MaxReturned",
"text": "100"
}
]
}
},
"response_xml": "<QBXML><QBXMLMsgsRs statusCode='0' statusSeverity='Info' statusMessage='Status OK'><CustomerQueryRs requestID='1' statusCode='0' statusSeverity='Info' statusMessage='Status OK'><CustomerRet><ListID>80000001-1234567890</ListID><Name>Sample Customer</Name></CustomerRet></CustomerQueryRs></QBXMLMsgsRs></QBXML>",
"response_json": [
{}
],
"webhook_url": "https://example.com/webhook",
"webhook_attempts": [
{
"attempted_at": "2023-11-07T05:31:56Z",
"response": "<string>"
}
],
"webhook_error": "<string>",
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
},
"links": {
"self": "/api/v1/connections/123e4567-e89b-12d3-a456-426614174000/queued_requests/550e8400-e29b-41d4-a716-446655440000",
"ui": "/app/queued_requests/550e8400-e29b-41d4-a716-446655440000",
"connection_ui": "/app/connections/123e4567-e89b-12d3-a456-426614174000"
},
"inserted_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-01T12:00:01Z"
}
}{
"error": {
"code": "invalid_request",
"message": "The request was invalid"
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found"
}
}Query Credit Memos
Executes a pre-built query to retrieve credit memo data from QuickBooks.
curl --request GET \
--url https://qubesync.com/api/v1/connections/{connection_id}/credit_memos \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://qubesync.com/api/v1/connections/{connection_id}/credit_memos"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://qubesync.com/api/v1/connections/{connection_id}/credit_memos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qubesync.com/api/v1/connections/{connection_id}/credit_memos",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://qubesync.com/api/v1/connections/{connection_id}/credit_memos"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://qubesync.com/api/v1/connections/{connection_id}/credit_memos")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qubesync.com/api/v1/connections/{connection_id}/credit_memos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"state": "waiting",
"request_xml": "<QBXML><QBXMLMsgsRq onError='stopOnError'><CustomerQueryRq requestID='1'><MaxReturned>100</MaxReturned></CustomerQueryRq></QBXMLMsgsRq></QBXML>",
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"webhook_state": "not_applicable",
"request_json": {
"version": "13.0",
"request": {
"name": "CustomerQueryRq",
"attributes": {
"requestID": "1"
},
"children": [
{
"name": "MaxReturned",
"text": "100"
}
]
}
},
"response_xml": "<QBXML><QBXMLMsgsRs statusCode='0' statusSeverity='Info' statusMessage='Status OK'><CustomerQueryRs requestID='1' statusCode='0' statusSeverity='Info' statusMessage='Status OK'><CustomerRet><ListID>80000001-1234567890</ListID><Name>Sample Customer</Name></CustomerRet></CustomerQueryRs></QBXMLMsgsRs></QBXML>",
"response_json": [
{}
],
"webhook_url": "https://example.com/webhook",
"webhook_attempts": [
{
"attempted_at": "2023-11-07T05:31:56Z",
"response": "<string>"
}
],
"webhook_error": "<string>",
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
},
"links": {
"self": "/api/v1/connections/123e4567-e89b-12d3-a456-426614174000/queued_requests/550e8400-e29b-41d4-a716-446655440000",
"ui": "/app/queued_requests/550e8400-e29b-41d4-a716-446655440000",
"connection_ui": "/app/connections/123e4567-e89b-12d3-a456-426614174000"
},
"inserted_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-01T12:00:01Z"
}
}{
"error": {
"code": "invalid_request",
"message": "The request was invalid"
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found"
}
}Authorizations
Use your app's API_KEY as the username, and leave the password blank
Path Parameters
ID of the connection to use for the query
Query Parameters
A custom ID that can be used to identify the request and response. This could be your local ID for the request.
"1"
If true, QuBe Sync will automatically handle the QBXML iteration until all records are returned. Each page of results will have its own request record and webhook. The id and webhook_url will be the same across each page request, and there will also be page_request_id, page values to distinguish pages from each other.
true
Maximum number of results to return
List of fields for QuickBooks to include in the response. Values correspond to the top-level elements of CreditMemoRet.
TxnID, TimeCreated, TimeModified, EditSequence, TxnNumber, CustomerRef, ClassRef, ARAccountRef, TemplateRef, TxnDate, RefNumber, BillAddress, BillAddressBlock, ShipAddress, ShipAddressBlock, IsPending, PONumber, TermsRef, DueDate, SalesRepRef, FOB, ShipDate, ShipMethodRef, Subtotal, ItemSalesTaxRef, SalesTaxPercentage, SalesTaxTotal, TotalAmount, CreditRemaining, CurrencyRef, ExchangeRate, CreditRemainingInHomeCurrency, Memo, CustomerMsgRef, IsToBePrinted, IsToBeEmailed, IsTaxIncluded, CustomerSalesTaxCodeRef, Other, ExternalGUID, LinkedTxn, CreditMemoLineRet, CreditMemoLineGroupRet, DiscountLineRet, SalesTaxLineRet, ShippingLineRet, DataExtRet Filter credit memos by customer ListID
Filter credit memos with transaction dates on or after this date (YYYY-MM-DD)
Filter credit memos with transaction dates on or before this date (YYYY-MM-DD)
Filter credit memos modified after this date (ISO 8601 format)
Filter credit memos modified before this date (ISO 8601 format)
Filter credit memos by one or more account ListIDs
Filter credit memos by reference number (partial match, case-insensitive). Mutually exclusive with from_ref_number/to_ref_number
Filter credit memos with reference numbers starting from this value (inclusive)
Filter credit memos with reference numbers up to this value (inclusive)
Filter credit memos by one or more currency ListIDs
Whether to include line item details in the response
Optional URL to receive a webhook when the request is completed
Response
Credit memos query accepted and queued for processing. Returns a queued request object.
Show child attributes
Show child attributes

