curl --request POST \
--url https://qubesync.com/api/v1/connections/{connection_id}/queued_requests \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"request_json": {
"version": "13.0",
"request": {
"name": "CustomerQueryRq",
"attributes": {
"request_id": "1"
},
"children": [
{
"name": "MaxReturned",
"text": "100"
}
]
}
},
"webhook_url": "https://example.com/webhooks/qube_sync"
}
'{
"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": {
"request_id": "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"
}
}Queue a new request
Creates a new queued request for processing by the QuickBooks integration. The QuickBooks request itself can be in either XML (request_xml) or JSON (request_json) format. If a webhook URL is provided, the system will send a POST request to that URL with the result when the request is completed.
curl --request POST \
--url https://qubesync.com/api/v1/connections/{connection_id}/queued_requests \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"request_json": {
"version": "13.0",
"request": {
"name": "CustomerQueryRq",
"attributes": {
"request_id": "1"
},
"children": [
{
"name": "MaxReturned",
"text": "100"
}
]
}
},
"webhook_url": "https://example.com/webhooks/qube_sync"
}
'{
"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": {
"request_id": "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 that will process this request
"123e4567-e89b-12d3-a456-426614174000"
Body
The request payload in JSON format (alternative to request_xml)
{
"version": "13.0",
"request": {
"name": "CustomerQueryRq",
"attributes": { "request_id": "1" },
"children": [{ "name": "MaxReturned", "text": "100" }]
}
}
The request payload in QBXML format (alternative to request_json)
"<QBXML><QBXMLMsgsRq onError='stopOnError'><CustomerQueryRq requestID='1'><MaxReturned>100</MaxReturned></CustomerQueryRq></QBXMLMsgsRq></QBXML>"
Optional URL to receive a webhook when the request is completed
"https://your-webhook-url.com/endpoint"
Response
Queued request created successfully
Show child attributes
Show child attributes

