Skip to content

Change the export's settings

PATCH
/api/v1/accounting/{provider}/settings
curl --request PATCH \
--url https://digize.com/api/v1/accounting/quickbooks/settings \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "exportFrom": "example", "paused": true, "itemId": "example", "itemName": "example", "shippingItemId": "example", "taxCode": "example", "noTaxCode": "example", "salesTaxCode": "example", "salesAccountCode": "example", "shippingAccountCode": "example", "taxType": "example", "noTaxType": "example", "accounts": { "stripe": "example", "manual": "example" } }'

Sets where sales and payments go in the books, how tax is coded, the day the export starts from, and whether it’s paused. Fields left out stay as they are. Failed records go again with the new settings.

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
Media typeapplication/json
object
exportFrom

Records dated before this day stay out of the books.

string
/^\d{4}-\d{2}-\d{2}$/
paused
boolean
itemId
Any of:
string
<= 64 characters
itemName
Any of:
string
<= 200 characters
shippingItemId
Any of:
string
<= 64 characters
taxCode
Any of:
string
<= 64 characters
noTaxCode
Any of:
string
<= 64 characters
salesTaxCode
Any of:
string
<= 64 characters
salesAccountCode
Any of:
string
<= 64 characters
shippingAccountCode
Any of:
string
<= 64 characters
taxType
Any of:
string
<= 64 characters
noTaxType
Any of:
string
<= 64 characters
accounts

The accounts payments go into: Stripe’s, and those marked paid by hand.

object
stripe
Any of:
string
<= 64 characters
manual
Any of:
string
<= 64 characters

Example generated

{
"exportFrom": "example",
"paused": true,
"itemId": "example",
"itemName": "example",
"shippingItemId": "example",
"taxCode": "example",
"noTaxCode": "example",
"salesTaxCode": "example",
"salesAccountCode": "example",
"shippingAccountCode": "example",
"taxType": "example",
"noTaxType": "example",
"accounts": {
"stripe": "example",
"manual": "example"
}
}

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"
}
}