Filtering
Show
You can filter the results by any field from the results set.
Eg. /offsets?currency=CZK will return only offsets with currency set to CZK
Eg. /offsets?createdAt=ge:2019-01-01 will return invoices since 1. 1. 2019
You may specify a modifier to filters
| Modifier | Meaning |
|---|---|
| gt | greater than |
| ge | greater or equal |
| lt | less than |
| le | less or equal |
Usage of filter modifiers
E.g. /offsets?currency=in:CZK,EUR will return only results with currency equal to CZK or EUR
Sorting
Show
You can sort results using sort parameter
E.g. /offsets?_sort=createdAt
You may specify sorting modifiers (default is asc)
| Modifier | Meaning |
|--------------|---------------------|
| asc | ascending (default) |
| desc | descending |
E.g. /offsets?_sort=createdAt:desc,dueDate:asc
GET
/offsets
curl \
-X GET https://mpapi.proxy.omnicado.com/v1/offsets?client_id=yourClientId&client_id=api_token_value \
-H "X-Application-Name: myApplicationName"
Response examples (200)
{
"data": [
{
"partner": 3000,
"documentNumber": "0000003003-06112018",
"createdAt": "2018-06-06",
"dueDate": "2018-06-20",
"currency": "CZK",
"diffPrice": 200,
"variableSymbol": 300006062018,
"supplier": {
"name": "Novak s.r.o",
"registrationNumber": "123456789",
"taxIdentification": "CZ123456789",
"vatNumber": "3210480832",
"note": "Example note",
"address": {
"city": "Praha",
"street": "U Garáží 1",
"zip": "17001",
"country": "CZ"
}
},
"customer": {
"name": "Internet Mall s.r.o",
"registrationNumber": "26204967",
"taxIdentification": "CZ26204967",
"vatNumber": "3210480832",
"note": "Example note",
"address": {
"city": "Praha",
"street": "U Garáží 1",
"zip": "17001",
"country": "CZ"
}
},
"invoices": [
{
"id": 3011000002,
"created": "2018-06-01",
"dueDate": "2018-06-01",
"sumPrice": 934,
"offsetPrice": 934,
"remainPrice": 0,
"currency": "CZK",
"purchNoC": 30030000002113,
"note": "Example note",
"invoiceNumber": "string"
}
],
"orders": [
{
"id": 10151988,
"created": "2018-06-02",
"dueDate": "2018-06-02",
"sumPrice": 1234,
"offsetPrice": 1034,
"remainPrice": 0,
"currency": "CZK"
}
],
"attachment": {
"filename": "MP_0000003000-20082021.pdf",
"mime": "application/pdf"
}
}
],
"result": {
"code": 200,
"status": "OK"
},
"paging": {
"pages": 1,
"size": 1,
"page": 1
}
}
Response examples (200)
{
"data": [
{
"partner": 3000,
"documentNumber": "0000003003-06112018",
"createdAt": "2018-06-06",
"dueDate": "2018-06-20",
"currency": "CZK",
"diffPrice": 200,
"variableSymbol": 300006062018,
"supplier": {
"name": "Novak s.r.o",
"registrationNumber": "123456789",
"taxIdentification": "CZ123456789",
"vatNumber": "3210480832",
"note": "Example note",
"address": {
"city": "Praha",
"street": "U Garáží 1",
"zip": "17001",
"country": "CZ"
}
},
"customer": {
"name": "Internet Mall s.r.o",
"registrationNumber": "26204967",
"taxIdentification": "CZ26204967",
"vatNumber": "3210480832",
"note": "Example note",
"address": {
"city": "Praha",
"street": "U Garáží 1",
"zip": "17001",
"country": "CZ"
}
},
"invoices": [
{
"id": 3011000002,
"created": "2018-06-01",
"dueDate": "2018-06-01",
"sumPrice": 934,
"offsetPrice": 934,
"remainPrice": 0,
"currency": "CZK",
"purchNoC": 30030000002113,
"note": "Example note",
"invoiceNumber": "string"
}
],
"orders": [
{
"id": 10151988,
"created": "2018-06-02",
"dueDate": "2018-06-02",
"sumPrice": 1234,
"offsetPrice": 1034,
"remainPrice": 0,
"currency": "CZK"
}
],
"attachment": {
"filename": "MP_0000003000-20082021.pdf",
"mime": "application/pdf"
}
}
],
"result": {
"code": 200,
"status": "OK"
},
"paging": {
"pages": 1,
"size": 1,
"page": 1
}
}