For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Categories

get

This class will define the view behavior

Args: viewsets ([OCSVIewSet])

Authorizations
AuthorizationstringRequired

Token-based authentication with required prefix "Token"

Query parameters
descriptionstringOptional
formatstring · enumOptionalPossible values:
idintegerOptional
inventory_sectionsinteger[]Optional
is_protectedbooleanOptional
limitintegerOptional

Number of results to return per page.

namestringOptional
offsetintegerOptional

The initial index from which to return the results.

orderingstringOptional

Which field to use when ordering the results.

searchstringOptional

A search term.

Responses
200Success
countintegerRequiredExample: 123
nextstring · uri · nullableOptionalExample: http://api.example.org/accounts/?offset=400&limit=100
previousstring · uri · nullableOptionalExample: http://api.example.org/accounts/?offset=200&limit=100
get/categories/
GET /categories/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
200Success
{
  "count": 123,
  "next": "http://api.example.org/accounts/?offset=400&limit=100",
  "previous": "http://api.example.org/accounts/?offset=200&limit=100",
  "results": [
    {
      "id": 1,
      "name": "text",
      "description": "text",
      "inventory_sections": [
        1
      ],
      "is_protected": true
    }
  ]
}
post

Handle post request, suitable for single and multi creation

Args: request ([dict]): can be dict or list of dicts

Returns: [type]: [description]

Authorizations
AuthorizationstringRequired

Token-based authentication with required prefix "Token"

Query parameters
formatstring · enumOptionalPossible values:
Body

This serialize class provide the API representation

Args: serializers ([ModelSerializer])

idintegerRead-onlyRequired
namestring · max: 50Required
descriptionstring · max: 255Required
inventory_sectionsinteger[]Optional
is_protectedbooleanOptional
Responses
201Success

This serialize class provide the API representation

Args: serializers ([ModelSerializer])

idintegerRead-onlyRequired
namestring · max: 50Required
descriptionstring · max: 255Required
inventory_sectionsinteger[]Optional
is_protectedbooleanOptional
post/categories/
POST /categories/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 81

"name='text'&description='text'&inventory_sections=[1]&is_protected=true"
201Success
{
  "id": 1,
  "name": "text",
  "description": "text",
  "inventory_sections": [
    1
  ],
  "is_protected": true
}
get

This class will define the view behavior

Args: viewsets ([OCSVIewSet])

Authorizations
AuthorizationstringRequired

Token-based authentication with required prefix "Token"

Path parameters
idintegerRequired

A unique integer value identifying this category.

Query parameters
formatstring · enumOptionalPossible values:
Responses
200Success

This serialize class provide the API representation

Args: serializers ([ModelSerializer])

idintegerRead-onlyRequired
namestring · max: 50Required
descriptionstring · max: 255Required
inventory_sectionsinteger[]Optional
is_protectedbooleanOptional
get/categories/{id}/
GET /categories/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
200Success
{
  "id": 1,
  "name": "text",
  "description": "text",
  "inventory_sections": [
    1
  ],
  "is_protected": true
}
put

This class will define the view behavior

Args: viewsets ([OCSVIewSet])

Authorizations
AuthorizationstringRequired

Token-based authentication with required prefix "Token"

Path parameters
idintegerRequired

A unique integer value identifying this category.

Query parameters
formatstring · enumOptionalPossible values:
Body

This serialize class provide the API representation

Args: serializers ([ModelSerializer])

idintegerRead-onlyRequired
namestring · max: 50Required
descriptionstring · max: 255Required
inventory_sectionsinteger[]Optional
is_protectedbooleanOptional
Responses
200Success

This serialize class provide the API representation

Args: serializers ([ModelSerializer])

idintegerRead-onlyRequired
namestring · max: 50Required
descriptionstring · max: 255Required
inventory_sectionsinteger[]Optional
is_protectedbooleanOptional
put/categories/{id}/
PUT /categories/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 81

"name='text'&description='text'&inventory_sections=[1]&is_protected=true"
200Success
{
  "id": 1,
  "name": "text",
  "description": "text",
  "inventory_sections": [
    1
  ],
  "is_protected": true
}
delete

This class will define the view behavior

Args: viewsets ([OCSVIewSet])

Authorizations
AuthorizationstringRequired

Token-based authentication with required prefix "Token"

Path parameters
idintegerRequired

A unique integer value identifying this category.

Query parameters
formatstring · enumOptionalPossible values:
Responses
204

No response body

No content

delete/categories/{id}/
DELETE /categories/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
204

No response body

No content

patch

This class will define the view behavior

Args: viewsets ([OCSVIewSet])

Authorizations
AuthorizationstringRequired

Token-based authentication with required prefix "Token"

Path parameters
idintegerRequired

A unique integer value identifying this category.

Query parameters
formatstring · enumOptionalPossible values:
Body

This serialize class provide the API representation

Args: serializers ([ModelSerializer])

idintegerRead-onlyOptional
namestring · max: 50Optional
descriptionstring · max: 255Optional
inventory_sectionsinteger[]Optional
is_protectedbooleanOptional
Responses
200Success

This serialize class provide the API representation

Args: serializers ([ModelSerializer])

idintegerRead-onlyRequired
namestring · max: 50Required
descriptionstring · max: 255Required
inventory_sectionsinteger[]Optional
is_protectedbooleanOptional
patch/categories/{id}/
PATCH /categories/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 81

"name='text'&description='text'&inventory_sections=[1]&is_protected=true"
200Success
{
  "id": 1,
  "name": "text",
  "description": "text",
  "inventory_sections": [
    1
  ],
  "is_protected": true
}

Last updated