Skip to main content
POST
Create employee

Authorizations

Authorization
string
header
required

Use your app's API key as the username, and leave the password blank

Headers

Idempotency-Key
string

Makes a retry safe when you never got the answer to a call: a timeout, a dropped connection, a worker that crashed. Send a new key (a UUID, say) with each request you mean to make once, and the same key when you send that request again. A repeat with the key and the same method, path, query and body answers 201 with what the first call created, as it is now, marked Idempotent-Replayed: true, and queues nothing. The same key with a different request is a 422. A key belongs to your app (sandbox and production apps never share one), lasts as long as what it created, and is 1 to 255 printable ASCII characters.

Required string length: 1 - 255
Pattern: ^[\x20-\x7E]+$

Path Parameters

connection_id
string<uuid>
required

The connection (a customer's QuickBooks company file) this request is queued for.

Query Parameters

webhook_url
string<uri>

Where QuBe Sync POSTs the answered request (this same document with response_json filled in), signed with X-QUBE-Signature. Send one with every request: it is how answers are delivered. Optional only so a script can queue and look up links.self by hand. It must be an absolute http or https URL. It may not contain a username or password, and in production it may not point at localhost or a private, loopback or link-local address. A qube listen URL must be one of this app's.

Maximum string length: 2048

Body

application/json
department
string

The name of the department in the employment job details section.

request_id
string

Your own label for the request, sent to QuickBooks as its qbXML requestID and echoed in the raw answer (response_xml); optional, since the answer's webhook already carries the request's id.

mobile
string

Mobile telephone number.

work_auth_expire_date
string<date>

Date the employee’s work authorization expires.

employee_type
enum<string>

employee_type can affect payroll taxes for an employee. A statutory employee is a person who is defined as an employee by statute. Usually an owner or partner will be on the Other Names list, but if they are on the Employee list, their employee_type will be Owner.

Available options:
Officer,
Owner,
Regular,
Statutory
disabled
enum<string>

Is employee disabled?

Available options:
No,
Yes
ssn
string

Social security number. When you add an SSN value to an employee record, it doesn’t have to include dashes; for example, either 123-45-6789 or 123456789 would be valid.

fax
string

Fax number.

hired_date
string<date>

An employee’s date of hire.

employee_payroll_info
object

Pay information for this employee.

part_or_full_time
enum<string>

Full or Part time status of the employee.

Available options:
FullTime,
PartTime
us_citizen
enum<string>

Is employee a US citizen?

Available options:
No,
Yes
us_veteran
enum<string>

Is employee a US veteran?

Available options:
No,
Yes
additional_notes
object[]
gender
enum<string>

The gender of this employee.

Available options:
Female,
Male
billing_rate_ref
object

Billing rates are used to override the service item rate in a time transaction (TimeTrackingAdd) based on the employee or vendor performing the work. Billing rates are assigned to an employee or a vendor to specify overrides to service items.

description
string

The description details in the employment job details section.

job_title
string

The job title of a customer, vendor, employee, or person on the “other names” list.

name
string

A concatenation of first_name, middle_name, and last_name.

email
string

E-mail address.

supervisor_ref
object

The name of a customer, vendor, employee, or person on the “other names” list in the employment job details section.

pager_pin
string

A personal identification number for this employee’s pager.

salutation
string

A formal reference, such as Mr. or Dr., that precedes a name.

military_status
enum<string>

Military status if the employee is a US veteran.

Available options:
Active,
Reserve
phone
string

The telephone number.

key_employee
enum<string>

Is employee a key or critical employee.

Available options:
No,
Yes
external_guid
string

Allows for the attachment of a user defined GUID value.

employee_address
object

If an address request fails, some combination of address fields might be too long. If you use payroll, you must specify the employee’s city, state (or province), ZIP (or postal) code, and at least one line of the street address. (Note that the State element has restrictions when it’s used in the employee_address aggregate. For more information, click State in the table.)

ethnicity
enum<string>

Ethnicity of employee from AmericianIndian, Asian, Black, Hawaiian, Hispanic, White, TwoOrMoreRaces

Available options:
AmericianIndian,
Asian,
Black,
Hawaiian,
Hispanic,
TwoOrMoreRaces,
White
alt_phone
string

A telephone number given as an alternative to Phone.

print_as
string

By default within QuickBooks, the print_as element is the same as the Name element.

emergency_contacts
object

Emergency Contact information for the employee.

middle_name
string

The middle name of a customer, vendor, employee, or person on the “other names” list.

last_name
string

The last name of a customer, vendor, employee, or person on the “other names” list.

birth_date
string<date>

Date of birth.

released_date
string<date>

The date on which this person’s employment with the company ended.

suffix
string
additional_contact_ref
object[]
adjusted_service_date
string<date>

Adjusted service date for the employee.

is_active
boolean

If is_active is true, this object is currently enabled for use by QuickBooks. The default value is true.

pager
string

The pager number.

target_bonus
number

The target bonus amount in the employment job details section.

exempt
enum<string>

Exempt or Non-exempt status of the employee.

Available options:
Exempt,
NonExempt
disability_desc
string

Description of employee’s disablitily.

original_hire_date
string<date>

Original hire date the employee was hired.

first_name
string

The first name of a customer, vendor, employee, or person on the “other names” list.

on_file
enum<string>

Is the employee’s I-9 on file?

Available options:
No,
Yes
notes
string

Additional information.

include_ret_element
enum<string>[]
Available options:
AccountNumber,
AdditionalContactRef,
AdditionalNotesRet,
AdjustedServiceDate,
AltPhone,
BillingRateRef,
BirthDate,
DataExtRet,
Department,
Description,
DisabilityDesc,
Disabled,
EditSequence,
Email,
EmergencyContacts,
EmployeeAddress,
EmployeePayrollInfo,
EmployeeType,
Ethnicity,
Exempt,
ExternalGUID,
Fax,
FirstName,
Gender,
HiredDate,
IsActive,
JobTitle,
KeyEmployee,
LastName,
ListID,
MiddleName,
MilitaryStatus,
Mobile,
Name,
Notes,
OnFile,
OriginalHireDate,
OwnerID,
Pager,
PagerPIN,
PartOrFullTime,
Phone,
PrintAs,
ReleasedDate,
SSN,
Salutation,
Suffix,
SupervisorRef,
TargetBonus,
TimeCreated,
TimeModified,
TxnID,
TxnNumber,
USCitizen,
USVeteran,
WorkAuthExpireDate
account_number
string

Account numbers appear in the QuickBooks chart of accounts, Account fields, and reports and graphs. If the IsUsingAccountNumber preference is false (that is, if the QuickBooks user has the account numbers Preference turned off), you can still set account numbers through the SDK, but the numbers won’t be visible in the user interface.

Callbacks

POST
{$request.query.webhook_url}answered

Body

application/json

POSTed to webhook_url as JSON, signed with X-QUBE-Signature (t=<timestamp>,v1=<hex HMAC-SHA256 of "<timestamp>.<raw body>" with your app's webhook secret>).

app_id
string<uuid>
required

Your app's id.

app_name
string
required
error
object | null
required

Set when state is error, retryable, timed_out or discarded. error_type says where it failed: for a timed_out request it is timed_out, and for a discarded one discarded, unless the request was retryable when your app discarded it, which keeps the connection error that held it up. user_message is safe to show an end user; error_code is QuickBooks' own status code for a business error, hresult the Web Connector's for a connection/XML error; debug_message is for you.

id
string<uuid>
required

The request's id, as the 201 returned it. For an iterated query, every page carries the first page's id here.

page_request_id
string<uuid>
required

This page's own id. Equal to id except on later pages of an iterated query.

response_json
Success · object
required

QuBe Sync's summary of QuickBooks' answer. Only an Error severity from QuickBooks is status: "error" (and makes the request's state error), so a query that matched nothing is still success. A Warn severity is a success with warning beside it.

sandbox
boolean
required

Whether the app is a sandbox app.

state
enum<string>
required

response_received: QuickBooks accepted it; read response_json. error: it is over and QuBe Sync won't try again -- see error, and response_json.error for a QuickBooks business error; with error_type outcome_unknown a write may still have been applied, so look before sending it again. retryable: QuickBooks could not be reached and QuBe Sync keeps trying; show the customer error.user_message so they can fix it. timed_out: no answer came back -- the customer's computer lost its connection, or QuickBooks or the Web Connector was closed, mid-request. QuickBooks may still have applied it, so look before sending it again. discarded: your app discarded it before the Web Connector picked it up, so QuickBooks never got it. Both carry an error.

Available options:
response_received,
error,
retryable,
timed_out,
discarded
timestamp
integer
required

Unix seconds; the same t the signature covers.

iteration_state
enum<string>

continue: more pages will follow, each its own webhook. done: this was the last page. max_sandbox_iterations_reached: a sandbox app's page limit stopped the iteration.

Available options:
not_applicable,
continue,
done,
max_sandbox_iterations_reached

Present only with response_xml_omitted.

page
integer | null

The page number, when iterated.

response_xml
string | null

QuickBooks' raw qbXML answer. response_json is the same, summarized. One answer can be at most 4 MB as the Web Connector sends it, about 3 MB of qbXML; QuickBooks' answer over that isn't kept: this is null and error.error_type is response_too_large. A webhook whose body would be over 1 MB is sent without it: null, with response_xml_omitted true; fetch it from links.self.

response_xml_omitted
boolean

Present, and true, only when response_xml was left out to keep the body under 1 MB. response_json is still here; GET links.self for response_xml.

Response

2XX

Received. Anything else is retried with backoff for about 8 hours.

Response

Queued for the connection's Web Connector. Pass webhook_url and QuBe Sync POSTs the answer to it once QuickBooks has answered (see the answered callback: its own payload, not this document). links.self returns this document on demand, with response_json filled in.

data
object
required