Introduction
Policy model
Some stores may be excluded from it.
Example
{
"policy": {
"id": 89,
"period": "week",
"closing_day": 5,
"excluded_store_ids": [3],
"currency": "nok",
"created_at": "2021-05-11T02:16:43.113Z",
"updated_at": "2021-05-11T02:16:43.113Z"
}
}
Definition
Key | Type | Optional | Description |
---|---|---|---|
id | integer | no | |
period | enum: ["day", "week", "month", "quarter] | no | unit of the report generation frequency - could be one of day, week, month, quarter |
closing_day | integer | no | no. of days after period end when reports are expected to be filled |
excluded_store_ids | array[int] | yes | represents the ids of the stores to which the policy is NOT assigned (all others are in by default) |
currency | string | no | represents the currency in which the store policy reporting entries will be reported |
created_at | datetime | no | time of the creation |
updated_at | datetime | no | time of the last update |
Tax Category model
Example
{
"tax_category": {
"id": 89,
"name": "Revenue reporting tax_category 1",
"tax_percentage": 23.8,
"created_at": "2021-05-11T02:16:43.113Z",
"updated_at": "2021-05-11T02:16:43.113Z"
}
}
Definition
Key | Type | Optional | Description |
---|---|---|---|
id | integer | no | |
name | string | no | name of the tax category |
tax_percentage | double | yes | tax percentage of the tax category |
store_ids | array[int] | yes | ids of stores associated to the tax category |
created_at | datetime | no | time of the creation |
updated_at | datetime | no | time of the last update |
Report model
{
"report": {
"id": 169,
"policy_id": 1,
"tax_category_id": 1,
"period_unit": "week",
"period_year": 2021,
"period_number": 30,
"day": "2021-07-27",
"transaction_count": 5,
"value_cents": 324328,
"value_currency": "nok",
"user_id": "c1c31507-fb38-474e-acf3-704032011393",
"member_id": 46953947,
"deadline_at": "2021-08-02T21:59:59.999Z",
"filled_at": "2021-08-06T16:06:38.472Z",
"created_at": "2021-07-27T14:18:09.548Z",
"updated_at": "2021-08-06T16:06:38.484Z"
}
}
Definition
Key | Type | Optional | Description |
---|---|---|---|
id | integer | no | |
policy_id | integer | no | see Policy model |
tax_category_id | integer | no | see Tax Category model |
period_unit | enum: ["day", "week", "month", "quarter] | no | Reporting period of the policy the report has been made for |
period_year | integer | no | Reporting period year |
period_number | integer | no | No. of period in the year. Example: 8th month, 31st week of the year |
day | date | no | Date of report |
transaction_count | integer | no | Total count of the transactions for the given day |
value_cents | integer | no | Total value of the transactions for the given day in hundredth units |
value_currency | string | no | Currency of value_cents |
user_id | string | yes | user_id of the tenant that has most recently updated the record |
member_id | integer | yes | member_id of the tenant that has most recently updated the record |
deadline_at | datetime | no | Time of the deadline by which the report has to be filled |
filled_at | datetime | yes | Time when the report has been filled by tenant |
created_at | datetime | no | Time of the report creation |
updated_at | datetime | no | Time of the last report update |
Modified at 2024-04-22 22:18:16