通过导入示例 JSON 构建自定义连接器的操作响应不起作用
Building the Custom Connector's Actions Responses by Importing sample JSON is not working
我正在 Power Automate 和 Power Apps 中创建一个自定义连接器,并且在“操作”部分中,我正在通过导入示例 JSON 来构建响应对象,如下所示:-
这是我应用的 JSON 示例:-
{
"content": [
{
"id": 1,
"payments": [
{
"id": 15,
"evidenceId": 1,
"purpose": "INVOICE",
"reference": "sdfaasdfasdf",
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"dueDate": null,
"amountToPay": 12,
"amountDue": 89,
"currency": "GBP",
"payerDetailsResponse": {
"id": 1,
"institutionId": "modelo-sandbox",
"institutionName": "Modelo Sandbox",
"bulkAvailable": true,
"maxBulkPayments": 50,
"minBulkPayments": 2,
"iban": null,
"bic": null,
"sortCode": "700001",
"accountNumber": "70000001",
"balance": -1234500801.09,
"currency": "GBP"
},
"state": "COMPLETED",
"initiationDate": "2022-02-04T14:06:23",
"statusLastChanged": "2022-02-04T14:08:05",
"statusLastChecked": "2022-02-04T14:08:05"
},
{
"id": 14,
"evidenceId": 1,
"purpose": "INVOICE",
"reference": "asdfasqwerqwer",
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"dueDate": null,
"amountToPay": 1,
"amountDue": 89,
"currency": "GBP",
"payerDetailsResponse": {
"id": 1,
"institutionId": "modelo-sandbox",
"institutionName": "Modelo Sandbox",
"bulkAvailable": true,
"maxBulkPayments": 50,
"minBulkPayments": 2,
"iban": null,
"bic": null,
"sortCode": "700001",
"accountNumber": "70000001",
"balance": -1234500801.09,
"currency": "GBP"
},
"state": "COMPLETED",
"initiationDate": "2022-02-04T11:26:30",
"statusLastChanged": "2022-02-04T11:27:47",
"statusLastChecked": "2022-02-04T11:27:47"
},
{
"id": 13,
"evidenceId": 1,
"purpose": "INVOICE",
"reference": "petyavasyakatya",
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"dueDate": null,
"amountToPay": 1,
"amountDue": 89,
"currency": "GBP",
"payerDetailsResponse": {
"id": 1,
"institutionId": "modelo-sandbox",
"institutionName": "Modelo Sandbox",
"bulkAvailable": true,
"maxBulkPayments": 50,
"minBulkPayments": 2,
"iban": null,
"bic": null,
"sortCode": "700001",
"accountNumber": "70000001",
"balance": -1234500801.09,
"currency": "GBP"
},
"state": "COMPLETED",
"initiationDate": "2022-02-04T11:22:05",
"statusLastChanged": "2022-02-04T11:23:14",
"statusLastChecked": "2022-02-04T11:23:14"
}
],
"supplier": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"evidences": [
{
"id": 1,
"evidenceType": "INVOICE",
"storedFileFolder": "temp",
"storedFileId": 3,
"lineItems": [
{
"id": 1,
"externalId": null,
"externalAccountID": null,
"description": "",
"quantity": null,
"unitAmount": null,
"currency": null,
"itemCode": null,
"accountCode": null,
"accountName": null,
"taxType": null,
"taxAmount": null,
"lineAmount": null,
"discountRate": null,
"discountAmount": null,
"totalAmount": null,
"subtotalAmount": null
}
],
"currency": "GBP",
"total": 102,
"subtotal": 100,
"taxAmount": null,
"issueDate": "2022-01-31",
"purchaseOrderNumber": null,
"purchaseDeliveryDate": null,
"purchaseExpectedDeliveryDate": null,
"purchasePaymentDueDate": null,
"invoiceReference": "",
"invoiceDueDate": null,
"deliveryNote": null,
"deliveryDate": null,
"transactionClearedOnDate": null,
"transactionDescription": null,
"payrollSource": null,
"payrollReference": null
},
{
"id": 1002,
"evidenceType": "PAYMENT_TRANSACTION",
"storedFileFolder": null,
"storedFileId": null,
"lineItems": [],
"currency": "GBP",
"total": 1,
"subtotal": null,
"taxAmount": null,
"issueDate": null,
"purchaseOrderNumber": null,
"purchaseDeliveryDate": null,
"purchaseExpectedDeliveryDate": null,
"purchasePaymentDueDate": null,
"invoiceReference": null,
"invoiceDueDate": null,
"deliveryNote": null,
"deliveryDate": null,
"transactionClearedOnDate": "2022-02-04T11:27:47",
"transactionDescription": null,
"payrollSource": {},
"payrollReference": null
},
{
"id": 1003,
"evidenceType": "PAYMENT_TRANSACTION",
"storedFileFolder": null,
"storedFileId": null,
"lineItems": [],
"currency": "GBP",
"total": 12,
"subtotal": null,
"taxAmount": null,
"issueDate": null,
"purchaseOrderNumber": null,
"purchaseDeliveryDate": null,
"purchaseExpectedDeliveryDate": null,
"purchasePaymentDueDate": null,
"invoiceReference": null,
"invoiceDueDate": null,
"deliveryNote": null,
"deliveryDate": null,
"transactionClearedOnDate": "2022-02-04T14:08:05",
"transactionDescription": null,
"payrollSource": null,
"payrollReference": null
}
]
},
{
"id": 2,
"payments": [
{
"id": 16,
"evidenceId": 2,
"purpose": "INVOICE",
"reference": "sdfaasdfasdf",
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"dueDate": null,
"amountToPay": 12,
"amountDue": 89,
"currency": "GBP",
"payerDetailsResponse": {
"id": 1,
"institutionId": "modelo-sandbox",
"institutionName": "Modelo Sandbox",
"bulkAvailable": true,
"maxBulkPayments": 50,
"minBulkPayments": 2,
"iban": null,
"bic": null,
"sortCode": "700001",
"accountNumber": "70000001",
"balance": -1234500801.09,
"currency": "GBP"
},
"state": "COMPLETED",
"initiationDate": "2022-02-04T14:06:23",
"statusLastChanged": "2022-02-04T14:08:05",
"statusLastChecked": "2022-02-04T14:08:05"
},
{
"id": 17,
"evidenceId": 2,
"purpose": "INVOICE",
"reference": "asdfasqwerqwer",
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"dueDate": null,
"amountToPay": 1,
"amountDue": 89,
"currency": "GBP",
"payerDetailsResponse": {
"id": 1,
"institutionId": "modelo-sandbox",
"institutionName": "Modelo Sandbox",
"bulkAvailable": true,
"maxBulkPayments": 50,
"minBulkPayments": 2,
"iban": null,
"bic": null,
"sortCode": "700001",
"accountNumber": "70000001",
"balance": -1234500801.09,
"currency": "GBP"
},
"state": "COMPLETED",
"initiationDate": "2022-02-04T11:26:30",
"statusLastChanged": "2022-02-04T11:27:47",
"statusLastChecked": "2022-02-04T11:27:47"
},
{
"id": 18,
"evidenceId": 2,
"purpose": "INVOICE",
"reference": "petyavasyakatya",
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"dueDate": null,
"amountToPay": 1,
"amountDue": 89,
"currency": "GBP",
"payerDetailsResponse": {
"id": 1,
"institutionId": "modelo-sandbox",
"institutionName": "Modelo Sandbox",
"bulkAvailable": true,
"maxBulkPayments": 50,
"minBulkPayments": 2,
"iban": null,
"bic": null,
"sortCode": "700001",
"accountNumber": "70000001",
"balance": -1234500801.09,
"currency": "GBP"
},
"state": "COMPLETED",
"initiationDate": "2022-02-04T11:22:05",
"statusLastChanged": "2022-02-04T11:23:14",
"statusLastChecked": "2022-02-04T11:23:14"
}
],
"supplier": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"evidences": [
{
"id": 2,
"evidenceType": "INVOICE",
"storedFileFolder": "temp",
"storedFileId": 3,
"lineItems": [
{
"id": 2,
"externalId": null,
"externalAccountID": null,
"description": "",
"quantity": null,
"unitAmount": null,
"currency": null,
"itemCode": null,
"accountCode": null,
"accountName": null,
"taxType": null,
"taxAmount": null,
"lineAmount": null,
"discountRate": null,
"discountAmount": null,
"totalAmount": null,
"subtotalAmount": null
}
],
"currency": "GBP",
"total": 102,
"subtotal": 100,
"taxAmount": null,
"issueDate": "2022-01-31",
"purchaseOrderNumber": null,
"purchaseDeliveryDate": null,
"purchaseExpectedDeliveryDate": null,
"purchasePaymentDueDate": null,
"invoiceReference": "",
"invoiceDueDate": null,
"deliveryNote": null,
"deliveryDate": null,
"transactionClearedOnDate": null,
"transactionDescription": null,
"payrollSource": null,
"payrollReference": null
},
{
"id": 1012,
"evidenceType": "PAYMENT_TRANSACTION",
"storedFileFolder": null,
"storedFileId": null,
"lineItems": [],
"currency": "GBP",
"total": 1,
"subtotal": null,
"taxAmount": null,
"issueDate": null,
"purchaseOrderNumber": null,
"purchaseDeliveryDate": null,
"purchaseExpectedDeliveryDate": null,
"purchasePaymentDueDate": null,
"invoiceReference": null,
"invoiceDueDate": null,
"deliveryNote": null,
"deliveryDate": null,
"transactionClearedOnDate": "2022-02-04T11:27:47",
"transactionDescription": null,
"payrollSource": {},
"payrollReference": null
},
{
"id": 1013,
"evidenceType": "PAYMENT_TRANSACTION",
"storedFileFolder": null,
"storedFileId": null,
"lineItems": [],
"currency": "GBP",
"total": 12,
"subtotal": null,
"taxAmount": null,
"issueDate": null,
"purchaseOrderNumber": null,
"purchaseDeliveryDate": null,
"purchaseExpectedDeliveryDate": null,
"purchasePaymentDueDate": null,
"invoiceReference": null,
"invoiceDueDate": null,
"deliveryNote": null,
"deliveryDate": null,
"transactionClearedOnDate": "2022-02-04T14:08:05",
"transactionDescription": null,
"payrollSource": null,
"payrollReference": null
}
]
}
],
"pageable": {
"sort": {
"empty": true,
"sorted": false,
"unsorted": true
},
"offset": 0,
"pageNumber": 0,
"pageSize": 10,
"paged": true,
"unpaged": false
},
"last": true,
"totalPages": 1,
"totalElements": 2,
"size": 10,
"number": 0,
"sort": {
"empty": true,
"sorted": false,
"unsorted": true
},
"first": true,
"numberOfElements": 10,
"empty": false
}
但这是我得到的:-
因此缺少很多属性,例如“PaymentDetails”。那么我如何在自定义连接器内为我们的 JSON 示例构建响应对象?
谢谢
paymentDetails
包含许多嵌套字段。如果您将这些字段作为 JSON 对象嵌套在 paymentDetails
中,它会自动工作。
改变这个:
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
]
至:
"paymentDetails": {
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
我正在 Power Automate 和 Power Apps 中创建一个自定义连接器,并且在“操作”部分中,我正在通过导入示例 JSON 来构建响应对象,如下所示:-
这是我应用的 JSON 示例:-
{
"content": [
{
"id": 1,
"payments": [
{
"id": 15,
"evidenceId": 1,
"purpose": "INVOICE",
"reference": "sdfaasdfasdf",
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"dueDate": null,
"amountToPay": 12,
"amountDue": 89,
"currency": "GBP",
"payerDetailsResponse": {
"id": 1,
"institutionId": "modelo-sandbox",
"institutionName": "Modelo Sandbox",
"bulkAvailable": true,
"maxBulkPayments": 50,
"minBulkPayments": 2,
"iban": null,
"bic": null,
"sortCode": "700001",
"accountNumber": "70000001",
"balance": -1234500801.09,
"currency": "GBP"
},
"state": "COMPLETED",
"initiationDate": "2022-02-04T14:06:23",
"statusLastChanged": "2022-02-04T14:08:05",
"statusLastChecked": "2022-02-04T14:08:05"
},
{
"id": 14,
"evidenceId": 1,
"purpose": "INVOICE",
"reference": "asdfasqwerqwer",
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"dueDate": null,
"amountToPay": 1,
"amountDue": 89,
"currency": "GBP",
"payerDetailsResponse": {
"id": 1,
"institutionId": "modelo-sandbox",
"institutionName": "Modelo Sandbox",
"bulkAvailable": true,
"maxBulkPayments": 50,
"minBulkPayments": 2,
"iban": null,
"bic": null,
"sortCode": "700001",
"accountNumber": "70000001",
"balance": -1234500801.09,
"currency": "GBP"
},
"state": "COMPLETED",
"initiationDate": "2022-02-04T11:26:30",
"statusLastChanged": "2022-02-04T11:27:47",
"statusLastChecked": "2022-02-04T11:27:47"
},
{
"id": 13,
"evidenceId": 1,
"purpose": "INVOICE",
"reference": "petyavasyakatya",
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"dueDate": null,
"amountToPay": 1,
"amountDue": 89,
"currency": "GBP",
"payerDetailsResponse": {
"id": 1,
"institutionId": "modelo-sandbox",
"institutionName": "Modelo Sandbox",
"bulkAvailable": true,
"maxBulkPayments": 50,
"minBulkPayments": 2,
"iban": null,
"bic": null,
"sortCode": "700001",
"accountNumber": "70000001",
"balance": -1234500801.09,
"currency": "GBP"
},
"state": "COMPLETED",
"initiationDate": "2022-02-04T11:22:05",
"statusLastChanged": "2022-02-04T11:23:14",
"statusLastChecked": "2022-02-04T11:23:14"
}
],
"supplier": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"evidences": [
{
"id": 1,
"evidenceType": "INVOICE",
"storedFileFolder": "temp",
"storedFileId": 3,
"lineItems": [
{
"id": 1,
"externalId": null,
"externalAccountID": null,
"description": "",
"quantity": null,
"unitAmount": null,
"currency": null,
"itemCode": null,
"accountCode": null,
"accountName": null,
"taxType": null,
"taxAmount": null,
"lineAmount": null,
"discountRate": null,
"discountAmount": null,
"totalAmount": null,
"subtotalAmount": null
}
],
"currency": "GBP",
"total": 102,
"subtotal": 100,
"taxAmount": null,
"issueDate": "2022-01-31",
"purchaseOrderNumber": null,
"purchaseDeliveryDate": null,
"purchaseExpectedDeliveryDate": null,
"purchasePaymentDueDate": null,
"invoiceReference": "",
"invoiceDueDate": null,
"deliveryNote": null,
"deliveryDate": null,
"transactionClearedOnDate": null,
"transactionDescription": null,
"payrollSource": null,
"payrollReference": null
},
{
"id": 1002,
"evidenceType": "PAYMENT_TRANSACTION",
"storedFileFolder": null,
"storedFileId": null,
"lineItems": [],
"currency": "GBP",
"total": 1,
"subtotal": null,
"taxAmount": null,
"issueDate": null,
"purchaseOrderNumber": null,
"purchaseDeliveryDate": null,
"purchaseExpectedDeliveryDate": null,
"purchasePaymentDueDate": null,
"invoiceReference": null,
"invoiceDueDate": null,
"deliveryNote": null,
"deliveryDate": null,
"transactionClearedOnDate": "2022-02-04T11:27:47",
"transactionDescription": null,
"payrollSource": {},
"payrollReference": null
},
{
"id": 1003,
"evidenceType": "PAYMENT_TRANSACTION",
"storedFileFolder": null,
"storedFileId": null,
"lineItems": [],
"currency": "GBP",
"total": 12,
"subtotal": null,
"taxAmount": null,
"issueDate": null,
"purchaseOrderNumber": null,
"purchaseDeliveryDate": null,
"purchaseExpectedDeliveryDate": null,
"purchasePaymentDueDate": null,
"invoiceReference": null,
"invoiceDueDate": null,
"deliveryNote": null,
"deliveryDate": null,
"transactionClearedOnDate": "2022-02-04T14:08:05",
"transactionDescription": null,
"payrollSource": null,
"payrollReference": null
}
]
},
{
"id": 2,
"payments": [
{
"id": 16,
"evidenceId": 2,
"purpose": "INVOICE",
"reference": "sdfaasdfasdf",
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"dueDate": null,
"amountToPay": 12,
"amountDue": 89,
"currency": "GBP",
"payerDetailsResponse": {
"id": 1,
"institutionId": "modelo-sandbox",
"institutionName": "Modelo Sandbox",
"bulkAvailable": true,
"maxBulkPayments": 50,
"minBulkPayments": 2,
"iban": null,
"bic": null,
"sortCode": "700001",
"accountNumber": "70000001",
"balance": -1234500801.09,
"currency": "GBP"
},
"state": "COMPLETED",
"initiationDate": "2022-02-04T14:06:23",
"statusLastChanged": "2022-02-04T14:08:05",
"statusLastChecked": "2022-02-04T14:08:05"
},
{
"id": 17,
"evidenceId": 2,
"purpose": "INVOICE",
"reference": "asdfasqwerqwer",
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"dueDate": null,
"amountToPay": 1,
"amountDue": 89,
"currency": "GBP",
"payerDetailsResponse": {
"id": 1,
"institutionId": "modelo-sandbox",
"institutionName": "Modelo Sandbox",
"bulkAvailable": true,
"maxBulkPayments": 50,
"minBulkPayments": 2,
"iban": null,
"bic": null,
"sortCode": "700001",
"accountNumber": "70000001",
"balance": -1234500801.09,
"currency": "GBP"
},
"state": "COMPLETED",
"initiationDate": "2022-02-04T11:26:30",
"statusLastChanged": "2022-02-04T11:27:47",
"statusLastChecked": "2022-02-04T11:27:47"
},
{
"id": 18,
"evidenceId": 2,
"purpose": "INVOICE",
"reference": "petyavasyakatya",
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"dueDate": null,
"amountToPay": 1,
"amountDue": 89,
"currency": "GBP",
"payerDetailsResponse": {
"id": 1,
"institutionId": "modelo-sandbox",
"institutionName": "Modelo Sandbox",
"bulkAvailable": true,
"maxBulkPayments": 50,
"minBulkPayments": 2,
"iban": null,
"bic": null,
"sortCode": "700001",
"accountNumber": "70000001",
"balance": -1234500801.09,
"currency": "GBP"
},
"state": "COMPLETED",
"initiationDate": "2022-02-04T11:22:05",
"statusLastChanged": "2022-02-04T11:23:14",
"statusLastChecked": "2022-02-04T11:23:14"
}
],
"supplier": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"beneficiary": {
"id": 12,
"name": "A R C Car Wash",
"email": "ja@bra.com",
"phone": "",
"trusted": false,
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
],
"externalId": "5902be62-72f9-4a04-9aa7-cb112de665ab",
"taxResidency": null,
"nationalId": null,
"digitalId": null,
"registrationId": null,
"vatId": null,
"lei": null,
"type": "ORGANISATION"
},
"evidences": [
{
"id": 2,
"evidenceType": "INVOICE",
"storedFileFolder": "temp",
"storedFileId": 3,
"lineItems": [
{
"id": 2,
"externalId": null,
"externalAccountID": null,
"description": "",
"quantity": null,
"unitAmount": null,
"currency": null,
"itemCode": null,
"accountCode": null,
"accountName": null,
"taxType": null,
"taxAmount": null,
"lineAmount": null,
"discountRate": null,
"discountAmount": null,
"totalAmount": null,
"subtotalAmount": null
}
],
"currency": "GBP",
"total": 102,
"subtotal": 100,
"taxAmount": null,
"issueDate": "2022-01-31",
"purchaseOrderNumber": null,
"purchaseDeliveryDate": null,
"purchaseExpectedDeliveryDate": null,
"purchasePaymentDueDate": null,
"invoiceReference": "",
"invoiceDueDate": null,
"deliveryNote": null,
"deliveryDate": null,
"transactionClearedOnDate": null,
"transactionDescription": null,
"payrollSource": null,
"payrollReference": null
},
{
"id": 1012,
"evidenceType": "PAYMENT_TRANSACTION",
"storedFileFolder": null,
"storedFileId": null,
"lineItems": [],
"currency": "GBP",
"total": 1,
"subtotal": null,
"taxAmount": null,
"issueDate": null,
"purchaseOrderNumber": null,
"purchaseDeliveryDate": null,
"purchaseExpectedDeliveryDate": null,
"purchasePaymentDueDate": null,
"invoiceReference": null,
"invoiceDueDate": null,
"deliveryNote": null,
"deliveryDate": null,
"transactionClearedOnDate": "2022-02-04T11:27:47",
"transactionDescription": null,
"payrollSource": {},
"payrollReference": null
},
{
"id": 1013,
"evidenceType": "PAYMENT_TRANSACTION",
"storedFileFolder": null,
"storedFileId": null,
"lineItems": [],
"currency": "GBP",
"total": 12,
"subtotal": null,
"taxAmount": null,
"issueDate": null,
"purchaseOrderNumber": null,
"purchaseDeliveryDate": null,
"purchaseExpectedDeliveryDate": null,
"purchasePaymentDueDate": null,
"invoiceReference": null,
"invoiceDueDate": null,
"deliveryNote": null,
"deliveryDate": null,
"transactionClearedOnDate": "2022-02-04T14:08:05",
"transactionDescription": null,
"payrollSource": null,
"payrollReference": null
}
]
}
],
"pageable": {
"sort": {
"empty": true,
"sorted": false,
"unsorted": true
},
"offset": 0,
"pageNumber": 0,
"pageSize": 10,
"paged": true,
"unpaged": false
},
"last": true,
"totalPages": 1,
"totalElements": 2,
"size": 10,
"number": 0,
"sort": {
"empty": true,
"sorted": false,
"unsorted": true
},
"first": true,
"numberOfElements": 10,
"empty": false
}
但这是我得到的:-
因此缺少很多属性,例如“PaymentDetails”。那么我如何在自定义连接器内为我们的 JSON 示例构建响应对象?
谢谢
paymentDetails
包含许多嵌套字段。如果您将这些字段作为 JSON 对象嵌套在 paymentDetails
中,它会自动工作。
改变这个:
"paymentDetails": [
{
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}
]
至:
"paymentDetails": {
"id": null,
"currency": null,
"sortCode": "30-30-30",
"accountNumber": "35353535",
"iban": null,
"bic": null,
"abartn": null,
"ifscCode": null,
"type": "SC",
"address": null
}