# Drawer Operations

Drawer Operations endpoint helps you analyze all transactions made in the cash drawer by each user, including sales, refunds, cash drops, etc..

# The Drawer Operation Object

# Sample

{
  "id": "8cd1956b",
  "amount": 1000,
  "recorded_at": "2019-02-22 07:00:00",
  "notes": null,
  "type": 1,
  "user": {
    "id": "8f12f639"
  },
  "till": {
    "id": "8f73e6c7"
  },
  "reason": {
    "id": "8e54452f"
  },
  "created_at": "2019-02-23 07:28:29",
  "updated_at": "2019-02-23 07:28:29"
}

# Attributes

Field Type Rule Description
id string Unique identifier for the drawer operation.
amount* double the amount of the operation
recorded_at* string Time YYYY-MM-DD HH-MM-SS in UTC at which the operation was recorded.
notes string nullable The notes of the operation entered by the user.
type* integer The Drawer Operation Type.
user* object includable The User attached to the operation.
till object includable The Till attached to the operation.
reason object nullable includable The Reason object attached to the operation.
created_at string sortable Time YYYY-MM-DD HH-MM-SS in UTC at which the object was created.
updated_at string sortable Time YYYY-MM-DD HH-MM-SS in UTC at which the object was updated.

# Drawer Operation Types

Type Description
1 Pay in.
2 Pay out.
3 Cash drop.
4 Open Drawer.
5 Sales.
6 Return.

# List Drawer Operations

GET /drawer_operations

# Scope

operations.read

# Filters

  • id
  • type
  • till_id
  • reason_id
  • user_id
  • updated_after
  • created_on
  • updated_on

# Response

{
  "data": [
    {
      "id": "8cd1956b",
      "amount": 1000,
      "recorded_at": "2019-02-22 07:00:00",
      "notes": null,
      "type": 1,
      "user": {
        "id": "8f12f639"
      },
      "till": {
        "id": "8f73e6c7"
      },
      "reason": {
        "id": "8e54452f"
      },
      "created_at": "2019-02-23 07:28:29",
      "updated_at": "2019-02-23 07:28:29"
    }
  ]
}

# Get Drawer Operation

GET /drawer_operations/{drawerOperationId}

# Scope

operations.read

# Response

{
  "data": {
    "id": "8cd1956b",
    "amount": 1000,
    "recorded_at": "2019-02-22 07:00:00",
    "notes": null,
    "type": 1,
    "user": {
      "id": "8f12f639"
    },
    "till": {
      "id": "8f73e6c7"
    },
    "reason": {
      "id": "8e54452f"
    },
    "created_at": "2019-02-23 07:28:29",
    "updated_at": "2019-02-23 07:28:29"
  }
}

# Create Drawer Operation

POST /drawer_operations

# Scope

operations.write

# Request

{
    "amount": 1000,
    "recorded_at": "2019-02-22 07:00:00",
    "notes": "",
    "type": 1,
    "till_id": "8cd1956b",
    "tag_id": "8cd1956b",
    "user_id": "8cd1956b"
}

# Response

{
  "data": {
    "id": "8cd1956b",
    "amount": 1000,
    "recorded_at": "2019-02-22 07:00:00",
    "notes": null,
    "type": 1,
    "user": {
      "id": "8f12f639"
    },
    "till": {
      "id": "8f73e6c7"
    },
    "reason": {
      "id": "8e54452f"
    },
    "created_at": "2019-02-23 07:28:29",
    "updated_at": "2019-02-23 07:28:29"
  }
}
Last Updated: 11/9/2023, 2:42:32 PM