https://linen.dev logo
#help
Title
# help
p

Pradeep Vegesna

02/01/2024, 3:06 PM
Hi. Here are my Stub details: Request: POST /CXX000000YY-001/invoice Payload: { "flag": "INVOICE", "invoiceNumber": "${json-unit.regex}[1-9]+", "businessPartnerName": "purchaser name", "businessPartnerTin": "CXX000000YY", "currency": "GHS", "exchangeRate": 1.0, "saleType": "NORMAL", "discountType": "GENERAL", "discountAmount": 0.0, "calculationType": "EXCLUSIVE", "items": [ { "itemCode": "item-1", "description": "FILTER ASSY-ENGINE OIL - (item-1)", "quantity": 1.0, "levyAmountA": 2.5, "levyAmountB": 2.5, "levyAmountC": 1.0, "levyAmountD": 0.0, "levyAmountE": 0.0, "unitPrice": 100.0, "discountAmount": 0.0, "taxCode": "B", "taxRate": 15.0 }, { "itemCode": "item-2", "description": "FILTER ASSY-ENGINE OIL 2 - (item-2)", "quantity": 1.0, "levyAmountA": 2.5, "levyAmountB": 2.5, "levyAmountC": 1.0, "levyAmountD": 0.0, "levyAmountE": 0.0, "unitPrice": 100.0, "discountAmount": 0.0, "taxCode": "A", "taxRate": 0.0 } ], "transactionDate": "2023-08-17T074917.0000000Z", "totalAmount": 200.0, "totalLevy": 12.0, "totalVat": 31.8, "voucherAmount": 0.0, "reference": "", "userName": "supplier name" } Response – Enable dynamic response templating Response Body { "response": { "distributor_tin": "CXX000000YY", "message": { "num": "{{jsonPath request.body '$.invoiceNumber'}}", "ysdcid": "E000001001", "ysdcrecnum": "1001-5F76-NS35771", "ysdcintdata": "4LNB-367Z-TANR-CPKW-ENCD-UL7W-II", "ysdcregsig": "OHDC-IXJ6-UTP3-ESSN", "ysdcmrc": "000C290D90:D0", "ysdcmrctim": "{{now format='yyyy/MM/dd HHmmss'}}", "ysdctime": "{{now format='yyyy/MM/dd HHmmss'}}", "flag": "{{jsonPath request.body '$.flag'}}", "ysdcitems": "{{size request.body '$.items'}}" }, "qr_code": "https://verification.vat-gh.com?data=deTzEWyr9Ph9CcJQ9ouYz/9QUgO4PyBDUqpmpEstgi5sqYOtHwci8VMpk9DDLuL/2DqfpaXmBO+V4LzFgykriTqnlsHUuBzedzMg+uDFDFbiOzoSQDU3wId4QL7uMADO9jfUni2x/wP/VsMN+tcsr2UrtHJLyZNpaDMyoY7HYkINVsfVmiWp5jOdAat4Ssri71a/d6FMeFspDUBkUaxg6BXg4e5HjN6kbbkq1RoJd0w=&v=1.1", "status": "SUCCESS" } }