Sage API Error Codes

Sage API Error

The Accounting API from Sage is a RESTful application programming interface (API) that has been designed to expose the data and functionality driving the Sage Business Cloud products of Accounting and Start. The included products allow small to medium-sized businesses to control their financial inputs and outputs either through a web browser, or a mobile app. There are also trial versions of the products that provide access to evaluate the processing and reporting functionality the products offer.

What is an API?

API is an abbreviation for Application Programming Interface. It refers to a collection of standards and programming instructions that allow access to web-based software and enables different platforms to interact with one another. The API interface allows software applications to interact effectively without the need for human intervention.

Useful Terms

  • Accounting: This is the Sage product that offers financial control for small to medium-sized businesses. 
  • Accounting API: This is the published API for access to the business data behind Start and Accounting.
  • API: This is used generically to refer to the Accounting API
  • Business or Resource Owner: These are the individuals who pay for product subscriptions and have complete reading and writing access to Start and Accounting.
  • Client: This is the 3rd party application that wishes to integrate or intends to integrate with Sage Business Cloud Accounting. 
  • Contact: This is an individual or organization that has a business deal with the concerned company. 
  • Customer: These are the individuals or organizations that a business charges for products or services concerned. 
  • Sage Business Cloud: This is the platform for all Sage Cloud products to operate upon. 
  • Start: A standalone product offered by Sage which is a subset of the Accounting product. It offers a reduced subscription. Take note that the API documentation will refer to Accounting which also involves the Start product. Differences will be called out in the detail of the documentation.
  • Supplier: individual or organization that a business pays for products or services
  • Users: individuals that have access to Start and Accounting

Read More-: Sage 50 Network Error

The Accounting API

The Accounting API provides the opportunity to construct rich and robust integrations through common Restful principles and CRUD-based HTTP requests. Apps and integrations utilize the Create, Read, Update, and Delete options of the API to enhance and extend product functionality and processing capability. Apps and integrations can also accept data, control the products, and simplify the administration that businesses deal with daily. For instance, the user can gain access to transaction details that include attachments, create detailed quotes and invoices, and add products, customers, and suppliers.

API endpoints are segmented into logical groups so you can dive into the portion you need,

  • Chart of Accounts: Manage ledger accounts
  • Contacts: Contacts, addresses and contact types
  • Products & Services: Products, services, stock items, stock movement, and price type
  • Transactions: Journals, ledger entries and transactions
  • Sales Transactions: Quotes, estimates, invoices, credit notes, corrective invoices and quick entries
  • Purchase Transactions: Invoices, credit notes, corrective invoices, and quick entries
  • Banking: Bank accounts, bank deposits, bank reconciliation and bank transfers
  • Payments & Receipts: Payments, receipts and allocations
  • Settings: Business settings, financial settings, and invoice settings
  • Status Codes & Types: Invoice, credit note, corrective invoice, and quick entry statuses
  • Attachments: Manage attachments to transactions
  • Currencies: Currencies and exchange rates
  • Taxes: Tax rates, tax schemes, and tax return frequencies
  • Opening Balances: Contact opening balances, bank opening balances, and ledger opening balances
  • User Accounts: Users and businesses

Products & Versions

Both Sage Business Cloud products of Accounting and Start are accessible via the Accounting API in both trial and subscribed versions. Accounting offers more functionality than Start with the only subtle differences to the API being the allocation of Invoice Payments and the differences in core functionality.

The success and development of Sage Business Cloud Accounting has observed various evolutions of the product and API. The below table provides a guide to those products along with compatible versions of the APIs.

Product

Compatible API    Versions

API Status

Route to API v3.1

Sageone Accounts (Legacy Product)

New signups prohibited

V1 & V2

Deprecated

Migrate customer to Accounting via customer services

Sageone Cashbook (Legacy Product)

New signups prohibited

V1 & V2

Deprecated

Migrate customer to Start or Accounting via customer services

Sage Business Cloud Accounting

V3 & V3.1

UK, IE only V1 & V2

US only V2

Supported & Developed

Consider migrating to V3.1

Migrate to V3.1

Migrate to V3.1

Sage Business Cloud Start

V3 & V3.1

UK, IE only V1 & V2

US only V2

Supported & Developed

Consider migrating to V3.1

Migrate to V3.1

Migrate to V3.1

Authentication

The Accounting API needs every API request to offer the details of the valid access token. Using the OAuth 2.0 standard of authentication, the access token can be acquired by authenticating applications with valid business users. The three-legged OAuth process needs business-user interaction to ensure that the client has access to the business data without sharing the credentials.

API V3.1 Limitations

To make sure that the availability and integrity of the Accounting API at all times, where a request rate limit has been set. The rate limit has been set against a client application with the following limitations:

  • Rate limit of 1,296,000 requests per app per day
  • Maximum of 150 concurrent requests at any time (per app)

In the case when the rate limit is exceeded, the Accounting API will return an HTTP 429 error response. It is recommended that you wait and repeat the functionality to be implemented in your app to handle any 429 response.

What are Different API Error Codes?

A) API Error Codes related to Data Integration

SL NO

HTTP Status code

Message

      1

400

//Uploading a file failed because no filename found in parameters

{“missingParam”: {“message”: “Missing required request parameters filename”}}

     2

401

//Access token is missing or expired

{“message”: “Unauthorised”}

     3

401

//Upload a file failed because filename in parameters already existed

{“fileExists”: {“message”: “File already exists”}}

     4

500

//Delete a file from the download folder failed with server error

{“message”: “error message text”}

     5

500

//Get a download link or list of files failed with server error

{“internalError”: {“message”: “An internal error occurred”}}

B) API Error Codes related to Authorization

SL NO

HTTP Status Code

Message

     1

400

//a required parameter is missing

{ message: “Missing required request parameters” }

     2

400

//grant_type has another value as “authorization_code” or “refresh_token”

{ message: “Invalid grant type” }

     3

403

//Disabled app

{ message: “The application registered on Sage Business Cloud is disabled” }

     4

403

//the authorization request is still waiting for an approval of the customer

{ message: “The pairing request has not been accepted.” }

     5

403

//the expired date of the authorization request has expired

{ message: “The request has expired.” }

     6

403

//there is no authorization request related to the code provided

{ message: “Pairing request not found” }

     7

404

//No entreprise management configuration has been found with code provided

{ message: “Could not associate the requested url with an customer application registered on Sage Business Cloud” }

     8

404

//There is no application corresponding to the client_id provided

{ message: “Could not associate the values with an active application registered on Sage Business Cloud” }

     9

404

//There is no application corresponding to the redirect_uri provided or the grant_type is not “refresh_token”

{ message: “Could not associate the values with an application registered on Sage Business Cloud” }

    10

501

//unknown error

{ message: “An internal error occurred: “ + err }

    11

501

//no existing key for the encryption used in the token lambda

{ message: “There is no existing key” }

    12

501

//error during a pairing request deletion

{ message: “Error while deleting the pairing request” }

    13

501

//error during a refresh token storage

{ message: “Error while storing refresh token” }

Read Also-: Sage Exchange Error Codes

Final Words

We hope that the discussion above has given you a good understanding of the various types of Sage API Error Codes. If you have any questions about them, we recommend that you consult with some knowledgeable Sage professionals.

Accounting Professionals & Specialized Experts

Want quick help from accounting software experts? Get in touch with our team members who can install, configure and configure your software for you. Proficient in fixing technical issues, they can help you quickly get back to work whenever you encounter an error in Sage software. Our team is available 24/7 365 days to assist you. To get in touch.

Frequently Asked Questions(FAQs)

I am getting the Sage .NET API Error message “An Error has occurred in a CRM DOT NET(.NET) customization. Please Contact your Vendor to resolve”. How can I resolve this?

Let us assume that you have installed the Sage CRM v7.1 in the D drive on your computer. Then, perform the steps below to manually register the Sage CRM .NET DLLs. Getting the Sage .NET API Error message
🔹 Login to the Sage CRM server with the help of your Administrator account.
🔹 Run the command prompt
🔹 Browse to the path i.e. D:\Program Files\Sage\CRM\CRMDotNet\7.1\. It will include the dll files named SageCRMNet.dll and SageCRMWrapper.dll for that version.
🔹 Now, to register SageCRMNet.dll , run the command. Make sure to enter the correct name and file path, which should be D:\Program Files\Sage\CRM\CRMDotNet\7.1> regasm SageCRMNet.dll in our case
🔹 After the registration, a message will appear to inform you that the registration was successful
🔹 Next, install the DLL into the GAC or Global Assembly cache. To do this, execute the following command, D:\Program Files\Sage\CRM\CRMDotNet\7.1> gacutil -i SageCRMNet.dll
🔹 After successful registration, a message will pop up saying, “Assembly successfully added to the cache”.
🔹 Repeat the steps above to register the SageCRMWrapper.dll and install into GAC.
🔹 Finally, run the IISREST command.

How to Resolve the Sage 300 Web API Internal Server Error

This is one of the most common error messages encountered by Sage 300 web API users. The occurrence of this means the server experienced an unexpected condition and this is preventing it from executing the request sent.
Please take a note of the points below to fix this issue:
🔹 Verify your authorized user rights, which must be full in order to execute the same. 
🔹 Please make sure to type the authorized user details in upper case, in the Basic authentication window.
🔹 If you need to perform the “POST” operation through the Sage 300 WEB API, you will have to send a header parameter named “Content-Type”, in addition to the default value of “application/json”.

What are the Reasons behind the Issue of Frequent Crashes while Executing a ‘Post’ Command through the Web API.?

Some of the important reasons behind this issue are:
🔹 An Avalara issue related to the Web API
🔹 An issue related to ODBC admin 
🔹 Internal Server Error with Sage 300 Web API
🔹 An issue with the order entry

Related Posts

Further Reading