ErpNext Postman API Get 'Payment Terms Template Detail'

Hello all. Struggling here.

I am trying to do a get (ultimately a post!) on following endpoint…
api/resource/Payment Terms Template Detail

I am using postman.

Ultimately, i want to ‘post’ a ‘Payment Terms Template’ with its associated ‘Payment Terms Template Detail’. However, i cant even get the ‘get’ to work on Payment Terms Templage Detail. I get ‘frappe.exceptions.PermissionError’, ‘PermissionError’. (even though i already have the get to ‘Payment Terms’ and ‘Payment Terms Template’ working. Ultimately, i want to post a ‘Payment Terms Template’ with its associated ‘Payment Terms Template Details’, but cannot even access the Details. Any help would be greatly appreciated in getting the ‘get’ to work on Payment Terms Template Detail, and a post to ultimately work (i think if i get the ‘get’ to work, i will be able to figure out the post).

The error is pretty clear, it’s a permission error.
Make sure that

  1. The method is whitelisted
  2. Provide necessary permissions to a role
  3. Assigning the role to the user making the call

Also please note that a CSRF token is necessary for PUT/POST.

Solutions if the above didn’t help:

  • Make your own API method via server script, it will be automatically whitelisted, and you can enable guest for testing purposes. Use GET to call it and pass in your parameters, then you can use frappe.insert
  • In a custom app, create your own methods

Hello Yamen, and thank you for the reply, much appreciated.

  1. where in the application would i find if the method is whitelisted? ‘api/resource/Payment Term’ API get works fine from postman. ‘api/resource/Payment Terms Template’ API get also works fine from postman. ‘api/resource/Payment Terms Template Detail’ of course does not. I never had to go to any screen to take ‘whitelisted’ off for the previous 2.

  2. Under ‘Role Permission Manager’ the system will not let me select Document Type of ‘Payment Terms Template Detail’. Thus, no role or permission level can also be added. So that screen is blank, unlike the permission page for ‘Payment Terms’ and ‘Payment Terms Template’.

  3. User making the call is Administrator.