Method | HTTP request | Description |
---|---|---|
createCreditNote | POST /v1/credit-notes | Creates a credit note. |
getCreditNote | GET /v1/credit-notes/{id} | Gets the credit note by GUID. |
getCreditNotePDF | GET /v1/credit-notes/{id}/pdf | Gets the credit note PDF by GUID. |
getCreditNotes | GET /v1/credit-notes | Returns a paginated list of credit notes. |
CreditNoteViewModel createCreditNote(opts)
Creates a credit note.
import * as SiigoApi from 'siigo_api';
let apiInstance = new SiigoApi.CreditNoteApi();
let opts = new SiigoApi.CreateCreditNoteCommand(); // CreateCreditNoteCommand | Represents the request with the credit note information.
apiInstance.createCreditNote(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
import * as SiigoApi from 'siigo_api';
async function main(){
try {
let apiInstance = new SiigoApi.CreditNoteApi();
let opts = new SiigoApi.CreateCreditNoteCommand(); // CreateCreditNoteCommand | Represents the request with the credit note information.
const data = await apiInstance.createCreditNote(opts);
console.log('API called successfully. Returned data: ' + data);
} catch (error) {
console.error(error);
}
}
Name | Type | Description | Notes |
---|---|---|---|
createCreditNoteCommand | CreateCreditNoteCommand | Represents the request with the credit note information. | [optional] |
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: text/plain, application/json, text/json
CreditNoteViewModel getCreditNote(id)
Gets the credit note by GUID.
import * as SiigoApi from 'siigo_api';
let apiInstance = new SiigoApi.CreditNoteApi();
let id = "id_example"; // String | Represents the unique Id of credit note, this value must be a 'Guid' with the next format 00000000-0000-0000-0000-000000000000.
apiInstance.getCreditNote(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
import * as SiigoApi from 'siigo_api';
async function main(){
try {
let apiInstance = new SiigoApi.CreditNoteApi();
let id = "id_example"; // String | Represents the unique Id of credit note, this value must be a 'Guid' with the next format 00000000-0000-0000-0000-000000000000.
const data = await apiInstance.getCreditNote(id);
console.log('API called successfully. Returned data: ' + data);
} catch (error) {
console.error(error);
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Represents the unique Id of credit note, this value must be a 'Guid' with the next format 00000000-0000-0000-0000-000000000000. |
- Content-Type: Not defined
- Accept: text/plain, application/json, text/json
CreditNotePdfViewModel getCreditNotePDF(id)
Gets the credit note PDF by GUID.
import * as SiigoApi from 'siigo_api';
let apiInstance = new SiigoApi.CreditNoteApi();
let id = "id_example"; // String | Represents the unique Id of credit note, this value must be a 'Guid' with the next format 00000000-0000-0000-0000-000000000000.
apiInstance.getCreditNotePDF(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
import * as SiigoApi from 'siigo_api';
async function main(){
try {
let apiInstance = new SiigoApi.CreditNoteApi();
let id = "id_example"; // String | Represents the unique Id of credit note, this value must be a 'Guid' with the next format 00000000-0000-0000-0000-000000000000.
const data = await apiInstance.getCreditNotePDF(id);
console.log('API called successfully. Returned data: ' + data);
} catch (error) {
console.error(error);
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Represents the unique Id of credit note, this value must be a 'Guid' with the next format 00000000-0000-0000-0000-000000000000. |
- Content-Type: Not defined
- Accept: text/plain, application/json, text/json
CreditNoteViewModelGetAllModel getCreditNotes(opts)
Returns a paginated list of credit notes.
import * as SiigoApi from 'siigo_api';
let apiInstance = new SiigoApi.CreditNoteApi();
let opts = {
'name': NC-1-1516, // String | For filtering by Credit Note name
'createdStart': new Date("2013-10-20T19:20:30+01:00"), // Date | Returns results where the \"created\" field is greater or equal than the entered date
'createdEnd': new Date("2013-10-20T19:20:30+01:00"), // Date | Returns results where the \"created\" field is less or equal than the entered date
'dateStart': new Date("2013-10-20T19:20:30+01:00"), // Date | Returns results with date greater or equal than the \"date_start\" date
'dateEnd': new Date("2013-10-20T19:20:30+01:00"), // Date | Returns results with date less or equal than the \"date_end\" date
'updatedStart': new Date("2013-10-20T19:20:30+01:00"), // Date | Returns results where the \"last_updated\" field is greater or equal than the entered date
'updatedEnd': new Date("2013-10-20T19:20:30+01:00"), // Date | Returns results where the \"last_updated\" field is less or equal than the entered date
'page': 1, // Number | Represents the current page
'pageSize': 25 // Number | Represents the number of results per page.
};
apiInstance.getCreditNotes(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
import * as SiigoApi from 'siigo_api';
async function main(){
try {
let apiInstance = new SiigoApi.CreditNoteApi();
let opts = {
'name': NC-1-1516, // String | For filtering by Credit Note name
'createdStart': new Date("2013-10-20T19:20:30+01:00"), // Date | Returns results where the \"created\" field is greater or equal than the entered date
'createdEnd': new Date("2013-10-20T19:20:30+01:00"), // Date | Returns results where the \"created\" field is less or equal than the entered date
'dateStart': new Date("2013-10-20T19:20:30+01:00"), // Date | Returns results with date greater or equal than the \"date_start\" date
'dateEnd': new Date("2013-10-20T19:20:30+01:00"), // Date | Returns results with date less or equal than the \"date_end\" date
'updatedStart': new Date("2013-10-20T19:20:30+01:00"), // Date | Returns results where the \"last_updated\" field is greater or equal than the entered date
'updatedEnd': new Date("2013-10-20T19:20:30+01:00"), // Date | Returns results where the \"last_updated\" field is less or equal than the entered date
'page': 1, // Number | Represents the current page
'pageSize': 25 // Number | Represents the number of results per page.
};
const data = await apiInstance.getCreditNotes(opts);
console.log('API called successfully. Returned data: ' + data);
} catch (error) {
console.error(error);
}
}
Name | Type | Description | Notes |
---|---|---|---|
name | String | For filtering by Credit Note name | [optional] |
createdStart | Date | Returns results where the "created" field is greater or equal than the entered date | [optional] |
createdEnd | Date | Returns results where the "created" field is less or equal than the entered date | [optional] |
dateStart | Date | Returns results with date greater or equal than the "date_start" date | [optional] |
dateEnd | Date | Returns results with date less or equal than the "date_end" date | [optional] |
updatedStart | Date | Returns results where the "last_updated" field is greater or equal than the entered date | [optional] |
updatedEnd | Date | Returns results where the "last_updated" field is less or equal than the entered date | [optional] |
page | Number | Represents the current page | [optional] |
pageSize | Number | Represents the number of results per page. | [optional] |
CreditNoteViewModelGetAllModel
- Content-Type: Not defined
- Accept: text/plain, application/json, text/json