Units API

List units

GET /unit
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Name Required Type Description
order_by optional string Sorting
limit optional integer Limit
offset optional integer Offset
callback optional string Javascript callback

The following sort parameters may be applied:

  • name

The following scopes are needed:

  • general
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 64
Content-Type: application/json
[
  {
    "id": 1,
    "name": "h"
  },
  {
    "id": 2,
    "name": "M"
  },
  {
    "id": 3,
    "name": "Stk."
  }
]

Search units

POST /unit/search
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
[
  {
    "field": "name",
    "value": "Stk."
  }
]
Name Required Type Description
order_by optional string Sorting
limit optional integer Limit
offset optional integer Offset
callback optional string Javascript callback

The following sort parameters may be applied:

  • name
Name Required Type Description
name optional string

The following scopes are needed:

  • general
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 24
Content-Type: application/json
[
  {
    "id": 3,
    "name": "Stk."
  }
]

Show unit

GET /unit/11
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Name Required Type Description
callback optional string Javascript callback

The following scopes are needed:

  • general
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 21
Content-Type: application/json
{
  "id": 11,
  "name": "ms"
}

Create unit

POST /unit
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "name": "ms"
}
Name Required Type Description
callback optional string Javascript callback
Name Required Type Description
name required string

The following scopes are needed:

  • general
Status: 201 Created
X-Authenticated-User: apiextract_1
Content-Length: 21
Content-Type: application/json
{
  "id": 11,
  "name": "ms"
}

Overwrite unit

PUT /unit/11
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "name": "ms"
}
Name Required Type Description
callback optional string
Name Required Type Description
name required string

The following scopes are needed:

  • general
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 21
Content-Type: application/json
{
  "id": 11,
  "name": "ms"
}

Edit unit

POST /unit/11
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "name": "ms"
}
Name Required Type Description
callback optional string Javascript callback
Name Required Type Description
name optional string

The following scopes are needed:

  • general
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 21
Content-Type: application/json
{
  "id": 11,
  "name": "ms"
}

Delete unit

DELETE /unit/11
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Name Required Type Description
callback optional string Javascript callback

The following scopes are needed:

  • general
Status: 200 OK
X-Authenticated-User: apiextract_1
Content-Length: 16
Content-Type: application/json
{
  "success": true
}