That specific field requires access to the payment_terms scope. It’s available for private apps, but not currently for the GraphiQL admin app, which is why you would receive an error when performing this operation through that interface.
You can manually apply the necessary permission to a private app and run your GraphQL query that way while we work on making this scope available to the GraphiQL app.
Do either of you know if this is the suggested way to accomplish Net-30 terms? Like, just calculate the 30 days, and assign that date as the dueAt property?
@bbarr Yes I did. Unfortunately I could not solve the problem in time. I currently am not working on that project anymore so I did not do further research to fix it. Sorry I couldn’t help.
If you manage to solve it, it would be nice if you shared it
@kmatsumo This is classic Shopify, they hid a bunch of data that you have to eventually guess exists and go looking for it. No documentation for it, no references in how-to or post.
{
paymentTermsTemplates {
id
dueInDays
}
}
This will give you a list of various “templates” to use. This has been yet another terrible developer experience.
mutation PaymentTermsUpdate($input: PaymentTermsUpdateInput!) {
paymentTermsUpdate(input: $input) {
paymentTerms {
id
}
userErrors {
code
field
message
}
}
}
Note the variables below are using the Net15 template, template found through the paymentTermsTemplates query shown above by another poster or in the api docs. This means the issuedAt and dueAt DateTime must be that difference