Due dates
Due dates establish the limit of days from the date of issuance of an invoice until its payment.
Crear un vencimiento
This endpoint allows the creation of a new due date in your application.
HTTP Request
POST/due-dates
Parameters
Name | Type | Description |
---|---|---|
name | String / Required | Name of the due date |
days | Integer / Required / Min:0 Max:999 | Days from the date of issuance of an invoice to the payment deadline. |
default | Boolean / Required / true, false | Default due date to apply to documents such as invoices. |
When sending a due date with `default` = `true`, the rest of the due dates will be marked with a value of `false`, there will only be one due date by default.
Playload
{
"name": "Two months",
"days": 60,
"default": false
}
201Response
{
"data": {
"id": 23,
"name": "Two months",
"days": 60,
"default": false,
"created_at": "2022-09-30T15:30:15+00:00",
"updated_at": "2022-09-30T15:30:15+00:00"
}
}
List due dates
This endpoint allows you to consult all the due dates of your application. Due dates are returned ordered by days, from lowest to highest.
HTTP Request
GET/due-dates
200 Response
{
"data": [
{
"id": 17,
"name": "Payment on demand",
"days": 0,
"default": false,
"created_at": "2022-09-21T15:30:15+00:00",
"updated_at": "2022-09-21T15:30:15+00:00"
},
{
"id": 22,
"name": "One week",
"days": 7,
"default": true,
"created_at": "2022-09-29T16:30:15+00:00",
"updated_at": "2022-09-29T16:30:15+00:00"
},
{
"id": 18,
"name": "15 Days",
"days": 15,
"default": false,
"created_at": "2022-09-28T15:30:15+00:00",
"updated_at": "2022-09-28T15:30:15+00:00"
},
{
"id": 21,
"name": "One month",
"days": 30,
"default": false,
"created_at": "2022-09-29T15:30:15+00:00",
"updated_at": "2022-09-29T15:30:15+00:00"
},
{
"id": 23,
"name": "Two months",
"days": 60,
"default": false,
"created_at": "2022-09-30T15:30:15+00:00",
"updated_at": "2022-09-30T15:30:15+00:00"
}
]
}
Get a due date
This endpoint allows the consultation of a due date of your application.
HTTP Request
GET/due-dates/{id}
200 Response
{
"data": {
"id": 23,
"name": "Two months",
"days": 60,
"default": false,
"created_at": "2022-09-30T15:30:15+00:00",
"updated_at": "2022-09-30T15:30:15+00:00"
}
}
Update a due date
This endpoint allows the update of a due date of your application.
The `days` attribute of a due date in use cannot be updated, if sent it will be ignored.
HTTP Request
PATCH/due-dates/{id}
Parameters
Name | Type | Description |
---|---|---|
name | String / Optional | Name of the due date |
days | Integer / Optional / Min:0 Max:999 | Days from the date of issuance of an invoice to the payment deadline. |
default | Boolean / Optional / true, false | Default due date to apply to documents such as invoices. |
All parameters are optional but at least one parameter with value must be sent.
When sending a due date with `default` = `true`, the rest of the due dates will be marked with a value of `false`, there will only be one due date by default.
Playload
{
"name": "Two months",
"days": 60,
"default": true
}
204 Response
Response without body.
Delete a due date
This endpoint allows the removal of a due date from your application.
It is not possible to delete if it is in use in the application.
HTTP Request
DELETE/due-dates/{id}
204 Response
Response without body.