GL category types

Types used to classify GL categories. Referenced by glcategories.glcategorytypeid.

The object#

FieldTypeDescription
idread-onlyintegerNolaPro id.
descriptionstring(255)Label, and the only human key this table has.
cancelbooleanTrue once cancelled.
externalidstring(100)Your own key. Scoped to your company.

Endpoints#

GET/glcategorytypes 200403

List gl category types.

Requires scope glaccounts:read.

Parameters
NameInTypeNotes
descriptionquerystringdescription. Partial match, case-insensitive.
externalidquerystringExact match on your own key. Scoped to your company.
cancelquerystringDefaults to false. Pass true for cancelled only, or any.
includequerystringComma-separated extras to embed. Only custom_fields is available: the extra fields this install has defined on the record. Off by default, and an unrecognised value is refused rather than ignored. See Conventions.
When it fails
StatusCodeMeaning
403insufficient_scopeToken lacks read scope.
curl \
  'https://acme.nolapro.com/!/api/v2/glcategorytypes' \
  -H 'Authorization: Bearer $NP_TOKEN'
POST/glcategorytypes 201400

Create.

Requires scope glaccounts:write.

Parameters
NameInTypeNotes
Idempotency-KeyheaderstringMakes the write safely retryable. Any unique string per logical operation; a UUID is fine. The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing. The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours.
Body
FieldTypeDescription
idread-onlyintegerNolaPro id.
descriptionstring(255)Label, and the only human key this table has.
cancelbooleanTrue once cancelled.
externalidstring(100)Your own key. Scoped to your company.
When it fails
StatusCodeMeaning
400invalid_requestA required field was missing.
curl -X POST \
  'https://acme.nolapro.com/!/api/v2/glcategorytypes' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '{
    "id": 1,
    "description": "Operating",
    "cancel": false
}'
Response 201
{
    "id": 1,
    "description": "Operating",
    "cancel": false
}
GET/glcategorytypes/{id} 200404

Retrieve one record.

Requires scope glaccounts:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
includequerystringComma-separated extras to embed. Only custom_fields is available: the extra fields this install has defined on the record. Off by default, and an unrecognised value is refused rather than ignored. See Conventions.
When it fails
StatusCodeMeaning
404not_foundNo record with that id.
curl \
  'https://acme.nolapro.com/!/api/v2/glcategorytypes/104' \
  -H 'Authorization: Bearer $NP_TOKEN'
Response 200
{
    "id": 1,
    "description": "Operating",
    "cancel": false
}
PATCH/glcategorytypes/{id} 200404

Update.

Requires scope glaccounts:write.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
Idempotency-KeyheaderstringMakes the write safely retryable. Any unique string per logical operation; a UUID is fine. The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing. The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours.
Body
FieldTypeDescription
idread-onlyintegerNolaPro id.
descriptionstring(255)Label, and the only human key this table has.
cancelbooleanTrue once cancelled.
externalidstring(100)Your own key. Scoped to your company.
When it fails
StatusCodeMeaning
404not_foundNo record with that id.
curl -X PATCH \
  'https://acme.nolapro.com/!/api/v2/glcategorytypes/104' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '{
    "id": 1,
    "description": "Operating",
    "cancel": false
}'
Response 200
{
    "id": 1,
    "description": "Operating",
    "cancel": false
}
DELETE/glcategorytypes/{id} 200404

Cancel.

Requires scope glaccounts:cancel.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
Idempotency-KeyheaderstringMakes the write safely retryable. Any unique string per logical operation; a UUID is fine. The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing. The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours.
When it fails
StatusCodeMeaning
404not_foundNo record with that id.
curl -X DELETE \
  'https://acme.nolapro.com/!/api/v2/glcategorytypes/104' \
  -H 'Authorization: Bearer $NP_TOKEN'
Response 200
{
    "id": 1,
    "description": "Operating",
    "cancel": false
}
POST/glcategorytypes/batch 207

Create many.

Always answers 207, one result per item.

Requires scope glaccounts:write.

Parameters
NameInTypeNotes
Idempotency-KeyheaderstringMakes the write safely retryable. Any unique string per logical operation; a UUID is fine. The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing. The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours.
Body array
FieldTypeDescription
idread-onlyintegerNolaPro id.
descriptionstring(255)Label, and the only human key this table has.
cancelbooleanTrue once cancelled.
externalidstring(100)Your own key. Scoped to your company.
curl -X POST \
  'https://acme.nolapro.com/!/api/v2/glcategorytypes/batch' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '[
    {
        "id": 1,
        "description": "Operating",
        "cancel": false
    }
]'