Category defaulting to Sundries (280) when creating an expense

When I create a new expense, all fields seem to work (so far) accept category. For instance, from the documentation if I wanted to create a new Web Hosting expense I would expect the request body to be something like this

  category: "",
  user: "https://api.sandbox,",
  dated_on: "2021-08-08",
  description: "Etc..."

This creates the new expense successfully, however the category is always

Is this a bug or am I doing something wrong?

Hi Jof,

I’ve managed to locate your requests against the sandbox in our logs, and we see the category in the original request coming through as

Would you be able to double check the request body please? Perhaps category is simply listed twice and we’re using the second.

Kind regards,

Thanks for the fast reply, Dominic. This is the request body

    expense: {
      type: 'Payment',
      category: '',
      user: '',
      dated_on: '2021-08-08',
      description: 'Foo #Expensify_Expense_ID=55843834797490180',
      currency: 'GBP',
      gross_value: '-79.00',
      attachment: {
        data: 'JVBERi0xLj...'
        content_type: 'application/x-pdf',
        file_name: 'test-file.pdf'

That’s it.

Sorry, that’s a bad example. That’s one I was messing with. One sec

Aha, I was hard-coding it in my backend :man_facepalming:

Whoops! Glad it’s sorted :slight_smile: