Jump to content

Posting test data - 405 Method Not Allowed


 Share

Recommended Posts

I am following the documentation at https://developer.sage.com/accounting/quick-start/posting-your-test-data/ to populate my test data. When I come to the Opening Balance Transactions I get a response of 405 Method Not Allowed.

I inspected the request body

 

{"contact_opening_balance":
    {      
        "description":"Opening Balance",       	       
          "ledger_account_id":"c63d6b22b32911ebb6a30662051ba57b",
          "quantity":"1",
            "tax_rate_id":"GB_NO_TAX",
              "total_amount":"0.01",
                "date":"31/12/2018",
                  "notes":"PC migrated from Sage 50 Accounts, Transaction No. 20, Ref: O/BAL",
                    "reference":"O/BAL",
                      "contact_opening_balance_type_id":"CREDIT_NOTE",
                        "contact_id":"ff97104069be4fa0864718f7ffea57d2"
    }
}

against the docs (https://developer.sage.com/api/accounting/api/opening-balances/#operation/postContactOpeningBalances) and everything seems to be OK, all of the required parameters are there (not that I would expect a bad body to result in a 405 response).

Link to comment
Share on other sites

  • Administrators

Hi Chris,

Thanks for bringing this to our attention. I'll investigate and let you know what I find, if required I'll update you once I've fixed it and updated the site to reflect the changes.

 

Ben

  • Like 1
Link to comment
Share on other sites

  • Administrators

Hi Chris,

So I've re-tested the process, and its working as expected - did you make the PUT request to financial settings? As it looks as though the 405 is being caused by an incorrect financial year start date. 

Is the account you are using a new one, or had you already configured anything?

If for some reason you opted to skip the PUT on financial settings, you should be able to run just that request, then import the rest without issue.

 

Ben

Link to comment
Share on other sites

Hi Ben, the account is a new one, I didn't do anything with it before starting these Postman posts.

I'm pretty sure I'd already run the PUT request but I ran it again and am still getting the same error.

I noticed something in the response body which might help, didn't see this yesterday.

[{"$severity":"error","$dataCode":"MethodNotAllowed","$message":"Action restricted for Start in United Kingdom","$source":""}]

 

Thanks,

Chris

Link to comment
Share on other sites

  • Administrators

Ah Sorry Chris,

It needs to be a Sage Business Cloud Accounting or Accounting Plus account, not SBC Accounting Start. 

I'll update the docs to make this clearer - apologies for the inconvenience - we want this to make your life easier, not harder! 

If you are ok to, create a new trial using this link: https://www.sage.com/en-gb/cart/try?sku=S1GBACCT, and hopefully it will work as intended. 

Please let me know how you get on, success or not! 

 

Ben

Link to comment
Share on other sites

Thanks Ben, I'll give that a try later and let you know.

Some feedback - as a developer I'm working on integrations with Xero and QuickBooks too, and they both give you demo companies to work with "out of the box", and I must say it's been a much simpler process to get started, so that's definitely something for Sage to look into.

All the best,

Chris

Link to comment
Share on other sites

  • Administrators

Hi Chris, 

We are definitely aware its a pain point - and part of the reason we decided to offer this collection. I appreciate its not as easy to get started as using a sandbox but hope it will help to make things a quicker for developers in the interim. We certainly hope to be able to offer sandboxes in the future.

 

Ben

  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...