Is there a full example on how to create a Manual Supplier Invoice using the API? If not, here’s my attempt:
- Get Token:
- https://[root].cloud/auth/realms/linmcfg1/protocol/openid-connect/token
- Post Header:
- https://[root]/main/ifsapplications/projection/v1/ManualSupplierInvoiceAssistantHandling.svc/ManSuppInvoiceVirtualSet
- Body:
-
{
"Company": "001",
"AffLinePost":false,
"AdvInv":false,
"ProposalExist":false,
"PostPrelTaxWith":false,
"PrepayBasedInv":false,
"UseProjAddressForTax":false,
"SiiProposal":false,
"AboveTaxControlLimit":false,
"EinvoiceSent":false,
"UseDeliveryInvAddress":false,
"ExcludePostingAuth":true,
"CurrDifferenceInvoice":false,
"CPeriodicInvoice":false,
"PrepayBasedEnabled":"FALSE",
"InvoiceNo":"INV-10042",
"Identity":"10042",
"InvGrossCurrAmt":250,
"Currency": "CAD",
"CurrRate":1,
"AuthId":"*",
"DueDate":"2025-08-10",
"InvoiceRecipient":"*",
"TaxCurrRate": 1.3718,
"PayTermId": "0",
"DivFactor":1
}
-
- Post Invoice Line:
- https://[root]/main/ifsapplications/projection/v1/ManualSupplierInvoiceAssistantHandling.svc/ManSuppInvoiceVirtualSet('3B2587DDEC9283BDE063A478EF0AA2EA')/ManSuppInvoiceItems
- Body
-
{
"ParentObjkey": "3B2587DDEC9283BDE063A478EF0AA2EA",
"Company": "001",
"ItemId": 1,
"CurrCode":"CAD",
"CurrRate":1,
"NetCurrAmount": 221.24,
"Creator":"JSMITH",
"Identity":"001",
"PartyType":"Supplier",
"DivFactor":1,
"TaxCodeRef":"1"
}
-
- Posting Lines
- https://[root]/main/ifsapplications/projection/v1/ManualSupplierInvoiceAssistantHandling.svc/$batch
- content-type: multipart/mixed; boundary=42d4c04e-78b3-448c-b5b3-de6ff7df35e8
- Body (raw)
-
--42d4c04e-78b3-448c-b5b3-de6ff7df35e8
Content-Type: multipart/mixed;boundary=138bf85c-46b4-48bd-9300-12bde713fe50
--138bf85c-46b4-48bd-9300-12bde713fe50
Content-Type: application/http
Content-Transfer-Encoding:binary
Content-Id: 1
POST SaveCheckOk HTTP/1.1
Accept:application/json;odata.metadata=full;IEEE754Compatible=true
Content-Type: application/json;IEEE754Compatible=true
{"Init":true}
--138bf85c-46b4-48bd-9300-12bde713fe50
Content-Type: application/http
Content-Transfer-Encoding:binary
Content-Id: 2
POST ManSuppInvoiceVirtualSet(Objkey='3B2587DDEC9283BDE063A478EF0AA2EA')/ManSuppInvoicePostingsArray?select-fields=PeriodAllocSeq,CurrAmount,DomAmount,CodeA,VoucherDate,Company,InternalSeq,Identity,InvoiceId,ItemId,VoucherType,CurrRate,DivFactor,ParallelCurrRate,ParallelDivFactor,RowId,CurrCode,AddInternal,ProjectId,Objkey,InvoiceNo,PeriodAllocAccount,CodeB,CodeC,CodeD,CodeE,CodeF,CodeG,CodeH,CodeI,CodeJ,Quantity,ProjectActivityId,WoNo,WorkTask,PostingType,VoucherCompany,NetCurrAmount,LineRef,OptionalCode,ParentObjkey,ProjectCodePart,Text,RequiredString,AutoPostingProcCode,OrderNo,CurrAmountDebit,CurrAmountCredit,DomAmountDebit,DomAmountCredit,ThirdAmount,ThirdAmountDebit,ThirdAmountCredit,NonDeductTaxCurrAmount,CurrAmtDummy,luname,keyref HTTP/1.1
Accept:application/json;odata.metadata=full;IEEE754Compatible=true
Content-Type: application/json;IEEE754Compatible=true
X-IFS-Accept-Warnings: false
{
"ParentObjkey": "3B2587DDEC9283BDE063A478EF0AA2EA",
"Company": "001",
"CodeA": "0000001",
"Identity": "00001",
"PartyType": "Supplier",
"CodeB": "00001",
"CodeC": "00",
"OptionalCode": "HST",
"CurrAmount": "221.24",
"DomAmount": "221.24",
"CurrAmountDebit": "221.24",
"DomAmountDebit": "221.24",
"Text": "SOME SUPPLIER- CAD",
"PostingType": "MANUAL",
"VoucherType": "I",
"VoucherDate": "2025-07-17",
"UserGroup": "AC",
"Reference": "MANUAL",
"VoucherCompany": "001",
"AddInternal": false,
"LineRef": "1",
"CurrCode": "CAD",
"CurrRate": "1",
"DivFactor": "1",
"Spend": false,
"InvoiceRecipient": "JSMITH",
"RequiredString": "M;K;K;S;S;K;S;S;S;K;K;K;N;"
}
--138bf85c-46b4-48bd-9300-12bde713fe50
Content-Type: application/http
Content-Transfer-Encoding:binary
Content-Id: 3
POST SaveCheckOk HTTP/1.1
Accept:application/json;odata.metadata=full;IEEE754Compatible=true
Content-Type: application/json;IEEE754Compatible=true
{"Init":false}
--138bf85c-46b4-48bd-9300-12bde713fe50--
--42d4c04e-78b3-448c-b5b3-de6ff7df35e8--
-
- Finish Invoice
- https://[root]/main/ifsapplications/projection/v1/ManualSupplierInvoiceAssistantHandling.svc/FinishInvoice
- Body
-
{
"Objkey":"3B2587DDEC9283BDE063A478EF0AA2EA",
"Identity":"00001",
"UpdateHeader":false,
"IsZeroInv":false
}
-
- FAILS WITH:
-
{
"error": {
"code": "DATABASE_ERROR",
"message": "Database error occurred. Contact administrator.",
"details": [
{
"code": 20110,
"message": "ORA-20110: TaxHandlingUtil.SUP_TAX_MANDATORY: A Tax Code is required when supplier tax validation has Transaction Level selected on Company, Tax Control tab."
}
]
}
}
-
Everything works fine until step 5 (finish the invoice), it asks me for a taxcode
I don’t know the field I must use, there is TaxId, but it only accepts numeric values and I don’t know where to get those from, so I can’t just put “HST”, any help is welcome
