const options = {
method: 'GET',
headers: {
'x-api-key': '<api-key>',
'x-api-secret': '<api-key>',
'x-connector-id': '<api-key>',
'x-owner-id': '<api-key>',
'x-session-token': '<api-key>'
}
};
fetch('https://api.runmorph.dev/v1/resources/accountingInvoice/{resourceId}', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
{
"object": "resource",
"model": "<string>",
"id": "<string>",
"fields": {
"invoiceCode": "<string>",
"customerContact": {
"id": "<string>",
"object": "resourceRef",
"model": "<string>",
"fields": "<any>",
"rawResource": "<any>",
"remote": {
"id": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
},
"customerCompany": {
"id": "<string>",
"object": "resourceRef",
"model": "<string>",
"fields": "<any>",
"rawResource": "<any>",
"remote": {
"id": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
},
"issuedAt": "<string>",
"dueAt": "<string>",
"paidAt": "<string>",
"status": "draft",
"lineItems": [
{
"id": "<string>",
"object": "resourceRef",
"model": "<string>",
"fields": "<any>",
"rawResource": "<any>",
"remote": {
"id": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"currency": "<string>",
"preTaxAmount": 1,
"taxAmount": 1,
"totalAmount": 1,
"inclusiveOfTax": true,
"balance": 1,
"note": "<string>"
},
"remote": {
"id": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>",
"rawResource": "<any>",
"warnings": [
{
"code": "<string>",
"message": "<string>"
}
]
}
const options = {
method: 'GET',
headers: {
'x-api-key': '<api-key>',
'x-api-secret': '<api-key>',
'x-connector-id': '<api-key>',
'x-owner-id': '<api-key>',
'x-session-token': '<api-key>'
}
};
fetch('https://api.runmorph.dev/v1/resources/accountingInvoice/{resourceId}', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
{
"object": "resource",
"model": "<string>",
"id": "<string>",
"fields": {
"invoiceCode": "<string>",
"customerContact": {
"id": "<string>",
"object": "resourceRef",
"model": "<string>",
"fields": "<any>",
"rawResource": "<any>",
"remote": {
"id": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
},
"customerCompany": {
"id": "<string>",
"object": "resourceRef",
"model": "<string>",
"fields": "<any>",
"rawResource": "<any>",
"remote": {
"id": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
},
"issuedAt": "<string>",
"dueAt": "<string>",
"paidAt": "<string>",
"status": "draft",
"lineItems": [
{
"id": "<string>",
"object": "resourceRef",
"model": "<string>",
"fields": "<any>",
"rawResource": "<any>",
"remote": {
"id": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"currency": "<string>",
"preTaxAmount": 1,
"taxAmount": 1,
"totalAmount": 1,
"inclusiveOfTax": true,
"balance": 1,
"note": "<string>"
},
"remote": {
"id": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>",
"rawResource": "<any>",
"warnings": [
{
"code": "<string>",
"message": "<string>"
}
]
}
OK
The response is of type object
.