Skip to content

Sync the books now

POST
/api/v1/accounting/{provider}/sync
curl --request POST \
--url https://digize.com/api/v1/accounting/quickbooks/sync \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>'

Sends what’s waiting to QuickBooks or Xero now, and tries the records that failed again.

Needs the settings:write permission.

provider
required

quickbooks or xero.

string
Allowed values: quickbooks xero
Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69

Done

Media typeapplication/json
object
provider
required

quickbooks or xero.

string
Allowed values: quickbooks xero
connected
required
boolean
settings
required
Any of:
object
exportFrom
required
string
/^\d{4}-\d{2}-\d{2}$/
paused
required
boolean
itemId
required
Any of:
string
<= 64 characters
itemName
required
Any of:
string
<= 200 characters
shippingItemId
required
Any of:
string
<= 64 characters
taxCode
required
Any of:
string
<= 64 characters
noTaxCode
required
Any of:
string
<= 64 characters
salesTaxCode
required
Any of:
string
<= 64 characters
accounts
required
object
stripe
required
Any of:
string
<= 64 characters
manual
required
Any of:
string
<= 64 characters
missing
required

What’s still to choose before the export can run.

Array<string>
running
required
boolean
lastRunAt
required
Any of:
string format: date-time
lastRunStatus
required
Any of:
string
Allowed values: synced failed partial
lastError
required
string | null
counts
required
object
pending
required
integer
>= -9007199254740991 <= 9007199254740991
synced
required
integer
>= -9007199254740991 <= 9007199254740991
failed
required
integer
>= -9007199254740991 <= 9007199254740991
skipped
required
integer
>= -9007199254740991 <= 9007199254740991
failures
required
Array<object>
object
kind
required
string
Allowed values: customer invoice order payment
localId
required

The invoice, order, payment or contact it is in Digize.

string
label
required
string
status
required
string
Allowed values: pending synced failed skipped
error
required

Why the books wouldn’t take it.

string | null
attempts
required
integer
>= -9007199254740991 <= 9007199254740991
remoteId
required

Its id in the books.

string | null
syncedAt
required
Any of:
string format: date-time
updatedAt
required
string format: date-time
recent
required
Array<object>
object
kind
required
string
Allowed values: customer invoice order payment
localId
required

The invoice, order, payment or contact it is in Digize.

string
label
required
string
status
required
string
Allowed values: pending synced failed skipped
error
required

Why the books wouldn’t take it.

string | null
attempts
required
integer
>= -9007199254740991 <= 9007199254740991
remoteId
required

Its id in the books.

string | null
syncedAt
required
Any of:
string format: date-time
updatedAt
required
string format: date-time

Example

{
"provider": "quickbooks",
"lastRunStatus": "synced",
"failures": [
{
"kind": "customer",
"status": "pending"
}
],
"recent": [
{
"kind": "customer",
"status": "pending"
}
]
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}