Skip to content

List cash accounts

POST
/cashAccounts.list
curl --request POST \
--url https://api.sancho-wms.pl/v1/cashAccounts.list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "filters": { "integrationId": { "$eq": "example", "$ne": "example", "$gt": "example", "$gte": "example", "$lt": "example", "$lte": "example", "$in": [ "example" ], "$nin": [ "example" ], "$exists": true, "$regex": "example", "$meta": { "preset": "example", "scoped": true } } } }'

Lists each company’s cash desks, bank accounts and credit cards. ledgerAccountNumber is the ledger account the account’s transactions are booked against, null when none is set. The whole list comes back in one response, with no nextCursor; inactive entries are included with active: false. filters.integrationId ($eq or $in) reads only some integrations, and an integration that failed to answer is named in failedIntegrationIds.

Media typeapplication/json
object
filters
object
integrationId
FieldCondition
object
$eq
FilterValue
string | number | boolean | null
$ne
FilterValue
string | number | boolean | null
$gt
FilterValue
string | number | boolean | null
$gte
FilterValue
string | number | boolean | null
$lt
FilterValue
string | number | boolean | null
$lte
FilterValue
string | number | boolean | null
$in
Array<string | number | boolean | null>
$nin
Array<string | number | boolean | null>
$exists
boolean
$regex

$regex takes literal text, optionally anchored with a leading ^ and a trailing $; escape any other regex character with a backslash. Matching ignores case.

string
$meta
object
preset
string
scoped
boolean

Example generated

{
"filters": {
"integrationId": {
"$eq": "example",
"$ne": "example",
"$gt": "example",
"$gte": "example",
"$lt": "example",
"$lte": "example",
"$in": [
"example"
],
"$nin": [
"example"
],
"$exists": true,
"$regex": "example",
"$meta": {
"preset": "example",
"scoped": true
}
}
}
}

Successful response

Media typeapplication/json
CashAccountPage
object
items
required
Array<object>
CashAccount
One of: discriminator: integrationType
ComarchOptimaCashAccount
object
id
required
number
code
required
string
name
required
string
kind
required
string
Allowed values: cash bank card other
currency
required
string
bankAccountNumber
required
string | null
splitPayment
required
boolean
ledgerAccountNumber
required
string | null
active
required
boolean
integrationId
required
number
integrationType
required
string
Allowed value: comarch-optima
symbol
required
string
nextCursor
string
failedIntegrationIds
required
Array<number>

Example

{
"items": [
{
"kind": "cash",
"integrationType": "comarch-optima"
}
]
}

Bad request

Media typeapplication/json
error.BAD_REQUEST

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "BAD_REQUEST",
"message": "Bad request",
"issues": []
}

Unauthorized

Media typeapplication/json
error.UNAUTHORIZED

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "UNAUTHORIZED",
"message": "Unauthorized",
"issues": []
}

Payment required

Media typeapplication/json
error.PAYMENT_REQUIRED

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "PAYMENT_REQUIRED",
"message": "Payment required",
"issues": []
}

Forbidden

Media typeapplication/json
error.FORBIDDEN

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "FORBIDDEN",
"message": "Forbidden",
"issues": []
}

Not found

Media typeapplication/json
error.NOT_FOUND

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}

Unprocessable content

Media typeapplication/json
error.UNPROCESSABLE_CONTENT

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "UNPROCESSABLE_CONTENT",
"message": "Unprocessable content",
"issues": []
}

Too many requests

Media typeapplication/json
error.TOO_MANY_REQUESTS

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests",
"issues": []
}

Internal server error

Media typeapplication/json
error.INTERNAL_SERVER_ERROR

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}

Service unavailable

Media typeapplication/json
error.SERVICE_UNAVAILABLE

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "SERVICE_UNAVAILABLE",
"message": "Service unavailable",
"issues": []
}