- General calendar info
- Info about non-working days in given period
- Bulk request for non-working days
- Deadline date evaluation taking into account the non-working days
- Bulk request for deadline date evaluation
- Start date evaluation taking into account the non-working days
- Bulk request for start date evaluation
GET /production_calendar
returns list of production calendars for different countries
{
"items": [
{
"id": 1,
"name": "Russian Federation"
}
]
}
GET /production_calendar/{calendar_id}
returns production calendar with the {calendar_id}
identifier
{
"id": 1,
"name": "Russian Federation"
}
Name | Type | Description |
---|---|---|
id | number | Unique calendar identifier |
name | str | Calendar title |
GET /production_calendar/{calendar_id}/days/{deadline}
returns info about non-working day till the {deadline}
date in the YYYY-MM-DD
format, according to the production calendar with {calendar_id}
.
Request fields:
-
start
— date in theYYYY-MM-DD
format. A date to start counting of non-working days. Optional. Default is today. -
verbose
— boolean field. Extends the response with theitems
field — list of dates, weekends and holidays within given range; inYYYY-MM-DD
format.
In addition to the request fields the following fields are added:
{
"total_days": 36,
"not_working_days": 28,
"items": ["2019-01-01"]
}
Name | Type | Description |
---|---|---|
total_days | number | Total amount of days within the range |
not_working_days | number | Amount of non-working days within the range |
items | list | List of dates, weekends and holidays within the range |
POST /production_calendar/{calendar_id}/days
bulk version of the previous request.
verbose
— boolean field. Extends the response with theitems
field — list of dates, weekends and holidays within given range; inYYYY-MM-DD
format.
Request body in the JSON format:
[
{"deadline": "2019-04-20"},
{"deadline": "2019-05-20", "start": "2018-05-20"}
]
Name | Type | Required | Description |
---|---|---|---|
deadline | date | Yes | End of the range |
start | date | No | Begin of the range; Optional, default is today |
[
{
"total_days": 36,
"not_working_days": 28,
"items": ["2019-01-01"]
}
]
Every element in the response list has the same fields as in the single request.
GET /production_calendar/{calendar_id}/deadline/{days}
- returns a deadline after {days}
working days, according to the calendar with {calendar_id}
.
start
— date inYYYY-MM-DD
format. A date to start counting. Optional. Default is today.
"2019-01-25"
POST /production_calendar/{calendar_id}/deadline
bulk version of the previous request.
Request body in the JSON format:
[
{"days": 10},
{"days": 20},
{"days": 30, "start": "2007-09-01"}
]
Name | Type | Required | Description |
---|---|---|---|
days | number | Yes | Amount of working days |
start | date | No | A date to start counting. Optional. Default is today. |
{
"items": [
"2019-01-25",
"2019-03-01"
]
}
GET /production_calendar/{calendar_id}/start/{days}
- returns a date in {days}
working days ahead, according to {calendar_id}
production calendar.
Request fields:
deadline
— date inYYYY-MM-DD
format. A date to start reverse counting. Optional. Default is today.
"2018-09-25"
POST /production_calendar/{calendar_id}/start
bulk version of the previous request.
Request body in the JSON format:
[
{"days": 10},
{"days": 20},
{"days": 30, "deadline": "2017-09-01"}
]
Name | Type | Required | Description |
---|---|---|---|
days | number | Yes | Amount of working days to count |
deadline | date | No | A date to finish the reverse counting. Optional. Default is today. |
{
"items": [
"2018-07-25",
"2018-03-01"
]
}