Custom fields API
Content
Custom fields collection:
Single Custom field:
Custom fields collection
Custom fields index
Request
| Index behaviour | Definition |
|---|---|
| Paginated by default | No |
| Sorting | id, name, type, access, params, sort_position, created_at, updated_at |
| Filters | id:int, name:string, type:enum, access:int, sort_position:int, created_at:date, updated_at:date |
| Embedded | - |
GET /api/v0/custom-fields HTTP/1.1
Content-Type: application/json
Response
200 OK
GET /api/v0/custom-fields HTTP/1.1
Content-Type: application/json
{
"items": [
{
"id": 1,
"name": "Graphic work",
"type": "4",
"access": 1,
"params": {
"decimalPlaces": 2,
"scope": [
1
],
"symbol": "czech_koruna"
},
"sort_position": 17,
"created_at": "2022-12-02T12:17:09+0100",
"updated_at": "2022-12-02T12:17:09+0100",
"_links": [
{
"href": "/api/v0/custom-fields/1",
"rel": "self",
"type": "GET"
}
]
},
{
"id": 2,
"name": "Delivery [km]",
"type": "3",
"access": 1,
"params": {
"decimalPlaces": 1,
"scope": [
1
]
},
"sort_position": 16,
"created_at": "2022-12-02T12:17:09+0100",
"updated_at": "2022-12-02T12:17:09+0100",
"_links": [
{
"href": "/api/v0/custom-fields/2",
"rel": "self",
"type": "GET"
}
]
},
]
}
Custom field detail
Request
| Index behaviour | Definition |
|---|---|
| Paginated by default | No |
| Sorting | id, name, type, access, params, sort_position created_at, updated_at |
| Filters | id:int, name:string, type:enum, access:int, sort_position:int created_at:date, updated_at:date |
| Embedded | - |
GET /api/v0/custom-fields/3 HTTP/1.1
Content-Type: application/json
Response
200 OK
GET /api/v0/custom-fields/3 HTTP/1.1
Content-Type: application/json
{
"id": 3,
"name": "Print (w/o VAT)",
"type": "4",
"access": 1,
"params": {
"decimalPlaces": 2,
"scope": [
1
],
"symbol": "czech_koruna"
},
"sort_position": 15,
"created_at": "2022-12-02T12:17:09+0100",
"updated_at": "2022-12-02T12:17:09+0100",
"_links": [
{
"href": "/api/v0/custom-fields/3",
"rel": "self",
"type": "GET"
}
]
}
404 NOT FOUND
GET /api/v0/custom-fields/3 HTTP/1.1
Content-Type: application/json
{
"type": "NotFound",
"message": "Required model was not found.",
"id": "0cd85449-05fe-4866-9802-8192e6785fc7"
}