The invoices timeline keeps an audit trail of changes and activity for each invoice.
Retrieve a list of invoice timeline messages.
limit | integer [ 0 .. 1000 ] The collection items limit. |
offset | integer >= 0 The collection items offset. |
filter | string The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format. |
sort | Array of strings The collection items sort field and order (prefix with "-" for descending sort). |
q | string The partial search of the text fields. |
A list of invoice timeline messages was retrieved successfully.
Pagination-Total | integer Total items count. |
Pagination-Limit | integer Items per page limit. |
Pagination-Offset | integer Pagination offset. |
Unauthorized access, invalid credentials were used.
Access forbidden.
// all parameters are optional except for the `id` const firstCollection = await api.invoices .getAllTimelineMessages({id: 'my-invoice'}); // alternatively you can specify one or more of them const params = {id: 'my-invoice', limit: 20, offset: 100}; const secondCollection = await api.invoices.getAllTimelineMessages(params); // access the collection items, each item is a Member secondCollection.items .forEach(message => console.log(message.fields.eventType));
[- {
- "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "type": "coupon-applied",
- "triggeredBy": "rebilly",
- "message": "string",
- "extraData": {
- "actions": [
- {
- "action": "resend-email"
}
], - "tables": [
- {
- "type": "list",
- "title": "string",
- "footer": "string"
}
], - "author": {
- "userFullName": "string",
- "userId": "string"
}, - "mentions": {
- "property1": {
- "@test@mail.com": "userId-1"
}, - "property2": {
- "@test@mail.com": "userId-1"
}
}, - "links": [
- {
- "resourceType": "kyc-document",
- "resourceId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "placeholder": "KYC Document",
}
]
}, - "occurredTime": "2019-08-24T14:15:22Z",
- "_links": [
- {
- "rel": "self",
- "href": "string"
}
]
}
]
Create an invoice Timeline comment.
Invoice Timeline comment was created.
id | string <= 50 characters The resource ID. Defaults to UUID v4. | ||||||||||||||||||||
type | string Timeline message type. | ||||||||||||||||||||
triggeredBy | string Shows who or what triggered the Timeline event. | ||||||||||||||||||||
message | string The message that describes the message details. | ||||||||||||||||||||
object (TimelineExtraData) Additional data. | |||||||||||||||||||||
| |||||||||||||||||||||
occurredTime | string <date-time> Read-only timestamp, automatically assigned on back-end. | ||||||||||||||||||||
Array of objects (SelfLink) non-empty The links related to resource. | |||||||||||||||||||||
Unauthorized access, invalid credentials were used.
Access forbidden.
Invalid data was sent.
{- "message": "string"
}
{- "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "type": "coupon-applied",
- "triggeredBy": "rebilly",
- "message": "string",
- "extraData": {
- "actions": [
- {
- "action": "resend-email"
}
], - "tables": [
- {
- "type": "list",
- "title": "string",
- "footer": "string"
}
], - "author": {
- "userFullName": "string",
- "userId": "string"
}, - "mentions": {
- "property1": {
- "@test@mail.com": "userId-1"
}, - "property2": {
- "@test@mail.com": "userId-1"
}
}, - "links": [
- {
- "resourceType": "kyc-document",
- "resourceId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "placeholder": "KYC Document",
}
]
}, - "occurredTime": "2019-08-24T14:15:22Z",
- "_links": [
- {
- "rel": "self",
- "href": "string"
}
]
}
Retrieve a invoice message with specified identifier string.
Invoice message was retrieved successfully.
id | string <= 50 characters The resource ID. Defaults to UUID v4. | ||||||||||||||||||||
type | string Timeline message type. | ||||||||||||||||||||
triggeredBy | string Shows who or what triggered the Timeline event. | ||||||||||||||||||||
message | string The message that describes the message details. | ||||||||||||||||||||
object (TimelineExtraData) Additional data. | |||||||||||||||||||||
| |||||||||||||||||||||
occurredTime | string <date-time> Read-only timestamp, automatically assigned on back-end. | ||||||||||||||||||||
Array of objects (SelfLink) non-empty The links related to resource. | |||||||||||||||||||||
Unauthorized access, invalid credentials were used.
Access forbidden.
Resource was not found.
const message = await api.invoices .getTimelineMessage({id: 'foobar-001', messageId: 'message-202'}); console.log(message.fields.eventType);
{- "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "type": "coupon-applied",
- "triggeredBy": "rebilly",
- "message": "string",
- "extraData": {
- "actions": [
- {
- "action": "resend-email"
}
], - "tables": [
- {
- "type": "list",
- "title": "string",
- "footer": "string"
}
], - "author": {
- "userFullName": "string",
- "userId": "string"
}, - "mentions": {
- "property1": {
- "@test@mail.com": "userId-1"
}, - "property2": {
- "@test@mail.com": "userId-1"
}
}, - "links": [
- {
- "resourceType": "kyc-document",
- "resourceId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "placeholder": "KYC Document",
}
]
}, - "occurredTime": "2019-08-24T14:15:22Z",
- "_links": [
- {
- "rel": "self",
- "href": "string"
}
]
}
Delete an Invoice Timeline message with predefined identifier string.
Invoice Timeline message was deleted.
Unauthorized access, invalid credentials were used.
Access forbidden.
Resource was not found.
Conflict.
const request = await api.invoices .deleteTimelineMessage({id: 'foobar-001', messageId: 'message-202'}); // the request does not return any fields but // you can confirm the success using the status code console.log(request.response.status); // 204
{- "status": 401,
- "title": "string",
- "detail": "string",
- "instance": "string"
}